rich_table_component 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module RichTableComponent
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
@@ -61,7 +61,7 @@ var ajaxifyTableGrid = function(){
61
61
  params = getSerializeArray($elmt.find('input#search').serializeArray());
62
62
  }
63
63
 
64
- $.extend(params, getSerializeArray($elmt.find('form#filter_form').serializeArray()));
64
+ // $.extend(params, getSerializeArray($elmt.find('form#filter_form').serializeArray()));
65
65
  params.list_view = $(this).data("list-view");
66
66
 
67
67
  settings.url += (settings.url.indexOf('?') >= 0 ? '&' : '?') + $.param(params);
@@ -162,8 +162,8 @@ var ajaxifyTableGrid = function(){
162
162
  image: LOADING_IMAGE
163
163
  });
164
164
 
165
- var params = getSerializeArray($elmt.find('form#filter_form').serializeArray());
166
- $.extend(params, getSerializeArray($(this).serializeArray()));
165
+ var params = {}; //getSerializeArray($elmt.find('form#filter_form').serializeArray());
166
+ // $.extend(params, getSerializeArray($(this).serializeArray()));
167
167
  params.page = 1;
168
168
  params.per_page = $.cookie('unm_pp');
169
169
 
@@ -232,35 +232,32 @@ var ajaxifyTableGrid = function(){
232
232
  $(
233
233
  'form.rtc_advanced_search'
234
234
  ).live('ajax:beforeSend', function(event, xhr, settings){
235
- var $el = $(this);
236
235
  var $elmt = $(this).parents('.rich_table_component');
237
236
  $('.rich_table_component.updating').removeClass('updating');
238
237
  $elmt.addClass('updating')
239
238
  //
240
239
  clearNormalSearch();
241
240
 
242
- // append filter form
243
- $el.find('.advanced_filter_form').remove();
244
- $adv_ff = $('<div class="advanced_filter_form"></div>');
245
- $adv_ff.appendTo($el);
246
- $elmt.find('form#filter_form input').each(function(){
247
- $(this).clone().appendTo($adv_ff);
248
- });
249
- $adv_ff.find('input[name=page]').val('1');
250
- $adv_ff.find('input[name=per_page]').val($.cookie('unm_pp'));
251
241
 
252
242
  $elmt.st_tableGrid_loading({
253
243
  message: t("searching"),
254
244
  image: LOADING_IMAGE
255
245
  });
256
246
 
247
+ //console.log("ADVANCED SEARCH");
248
+ //return false;
249
+
257
250
  params = {};
251
+
252
+ $elmt.find('form#filter_form input').each(function(){
253
+ params[$(this).attr('name')] = $(this).attr('value')
254
+ });
255
+
258
256
  params.page = 1;
259
257
  params.per_page = $.cookie('unm_pp');
260
258
  settings.url += (settings.url.indexOf('?') >= 0 ? '&' : '?') + $.param(params);
261
259
  }).live('ajax:complete', function(event, xhr, status){
262
- var $el = $(this);
263
- $el.find('.advanced_filter_form').remove();
260
+
264
261
  }).live("ajax:error", function(xhr, status, error){
265
262
  showGlobalNotification(translate(status.responseText), {type: ERROR});
266
263
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_table_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
12
+ date: 2013-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails