compass-jquery-plugin 0.2.4.3 → 0.2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/compass-jquery-plugin.gemspec +1 -1
- data/lib/jquery/jqgrid.rb +17 -17
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/jquery/jqgrid.rb
CHANGED
@@ -83,7 +83,7 @@ module ActionView
|
|
83
83
|
multiselect = %Q/multiselect: true,/
|
84
84
|
multihandler = %Q/
|
85
85
|
jQuery("##{id}_select_button").click( function() {
|
86
|
-
var s; s = jQuery("##{id}").
|
86
|
+
var s; s = jQuery("##{id}").jqGrid('getGridParam','selarrrow');
|
87
87
|
#{options[:selection_handler]}(s);
|
88
88
|
return false;
|
89
89
|
});/
|
@@ -96,18 +96,18 @@ module ActionView
|
|
96
96
|
onSelectRow: function(ids) {
|
97
97
|
if(ids == null) {
|
98
98
|
ids=0;
|
99
|
-
if(jQuery("##{id}_details").
|
99
|
+
if(jQuery("##{id}_details").jqGrid('getGridParam','records') >0 )
|
100
100
|
{
|
101
|
-
jQuery("##{id}_details").setGridParam
|
102
|
-
.setCaption
|
103
|
-
.trigger('reloadGrid');
|
101
|
+
jQuery("##{id}_details").jqGrid('setGridParam',{url:"#{options[:details_url]}?q=1&id="+ids,page:1})
|
102
|
+
jQuery("##{id}_details").jqGrid('setCaption',"#{options[:details_caption]}: "+ids)
|
103
|
+
jQuery("##{id}_details").trigger('reloadGrid');
|
104
104
|
}
|
105
105
|
}
|
106
106
|
else
|
107
107
|
{
|
108
|
-
jQuery("##{id}_details").setGridParam
|
109
|
-
.setCaption
|
110
|
-
.trigger('reloadGrid');
|
108
|
+
jQuery("##{id}_details").jqGrid('setGridParam',{url:"#{options[:details_url]}?q=1&id="+ids,page:1})
|
109
|
+
jQuery("##{id}_details").jqGrid('setCaption',"#{options[:details_caption]} : "+ids)
|
110
|
+
jQuery("##{id}_details").trigger('reloadGrid');
|
111
111
|
}
|
112
112
|
},/
|
113
113
|
end
|
@@ -118,7 +118,7 @@ module ActionView
|
|
118
118
|
if (options[:direct_selection].blank? || options[:direct_selection] == false) && options[:selection_handler].present? && (options[:multi_selection].blank? || options[:multi_selection] == false)
|
119
119
|
selection_link = %Q/
|
120
120
|
jQuery("##{id}_select_button").click( function(){
|
121
|
-
var id = jQuery("##{id}").
|
121
|
+
var id = jQuery("##{id}").jqGrid('getGridParam','selrow');
|
122
122
|
if (id) {
|
123
123
|
#{options[:selection_handler]}(id);
|
124
124
|
} else {
|
@@ -158,8 +158,8 @@ module ActionView
|
|
158
158
|
editable = %Q/
|
159
159
|
onSelectRow: function(id){
|
160
160
|
if(id && id!==lastsel_#{id}){
|
161
|
-
jQuery('##{id}').restoreRow
|
162
|
-
jQuery('##{id}').editRow
|
161
|
+
jQuery('##{id}').jqGrid('restoreRow',lastsel_#{id});
|
162
|
+
jQuery('##{id}').jqGrid('editRow',id, true, #{options[:inline_edit_handler]}, #{options[:error_handler]});
|
163
163
|
lastsel_#{id}=id;
|
164
164
|
}
|
165
165
|
},/
|
@@ -184,8 +184,8 @@ module ActionView
|
|
184
184
|
subgrid_inline_edit = %Q/
|
185
185
|
onSelectRow: function(id){
|
186
186
|
if(id && id!==lastsel_#{id}){
|
187
|
-
jQuery('#'+subgrid_table_id).restoreRow
|
188
|
-
jQuery('#'+subgrid_table_id).editRow
|
187
|
+
jQuery('#'+subgrid_table_id).jqGrid('restoreRow',lastsel_#{id});
|
188
|
+
jQuery('#'+subgrid_table_id).jqGrid('editRow',id,true);
|
189
189
|
lastsel_#{id}=id;
|
190
190
|
}
|
191
191
|
},
|
@@ -279,10 +279,10 @@ module ActionView
|
|
279
279
|
#{multihandler}
|
280
280
|
#{selection_link}
|
281
281
|
jQuery("##{id}").jqGrid('navGrid','##{id}_pager',{edit:#{edit_button},add:#{options[:add]},del:#{options[:delete]},search:false,refresh:true},
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
282
|
+
{afterSubmit:function(r,data){return #{options[:error_handler_return_value]}(r,data,'edit');} #{edit_options}},
|
283
|
+
{afterSubmit:function(r,data){return #{options[:error_handler_return_value]}(r,data,'add');} #{add_options}},
|
284
|
+
{afterSubmit:function(r,data){return #{options[:error_handler_return_value]}(r,data,'delete');} #{del_options}},
|
285
|
+
{#{search_options}}
|
286
286
|
);
|
287
287
|
|
288
288
|
jQuery("##{id}").jqGrid('navButtonAdd',"##{id}_pager",{
|