rich_table_component 0.0.10 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/app/helpers/component_helper.rb +21 -0
- data/app/views/application/create.js.erb +5 -0
- data/app/views/application/update.js.erb +6 -1
- data/app/views/rich_table_component/_pagination.html.haml +1 -1
- data/app/views/rich_table_component/rtc/_advanced_search.html.haml +5 -5
- data/app/views/rich_table_component/rtc/_advanced_search_recapitulation.html.haml +5 -5
- data/app/views/rich_table_component/rtc/_content.html.haml +7 -1
- data/lib/pagination_list_link_renderer.rb +3 -4
- data/lib/rich_table_component/version.rb +1 -1
- data/lib/rich_table_component.rb +21 -8
- data/rich_table_component.gemspec +1 -1
- data/vendor/assets/javascripts/admin/starqle.grid.js +25 -5
- data/vendor/assets/javascripts/admin/starqle.ui.jquery.js +3 -2
- data/vendor/assets/javascripts/jquery.tokeninput.js +5 -3
- data/vendor/assets/javascripts/rich_table_component.js +1 -0
- data/vendor/assets/stylesheets/partial/_starqle.ui.grid.sass +3 -2
- data/vendor/assets/stylesheets/partial/_style.sass +1 -1
- metadata +7 -7
@@ -205,6 +205,27 @@ module ComponentHelper
|
|
205
205
|
result.html_safe
|
206
206
|
end
|
207
207
|
|
208
|
+
|
209
|
+
def fake_pagination(rtc_controller_name)
|
210
|
+
per_page_options = [5, 10, 20, 50, 100, 200]
|
211
|
+
result = '<div class="pagination">'
|
212
|
+
result += '<span class="first_page disabled"><<</span>'
|
213
|
+
result += '<span class="previous_page disabled"><</span>'
|
214
|
+
result += '<div class="current_page_part">Hal. 1 dari 1'
|
215
|
+
result += '</div>'
|
216
|
+
result += '<span class="previous_page disabled"><</span>'
|
217
|
+
result += '<span class="last_page disabled">>></span>'
|
218
|
+
result += '<div class="per_page_part">'
|
219
|
+
result += (select_tag 'per_page', (per_page_options.map{|m| "<option #{(m==params[:per_page].to_i ? 'selected=selected' : '')}>#{m}</option>"}.join.html_safe))
|
220
|
+
result += '</div>'
|
221
|
+
result += '<div class="go_to_page_part">'
|
222
|
+
result += '<input type="text" value="1" name="page">'
|
223
|
+
result += (link_to "Go", {controller: rtc_controller_name}, remote: true, class: "gotopage btn-mini")
|
224
|
+
result += 'Pedr hal.</div>'
|
225
|
+
result += '</div>'
|
226
|
+
result.html_safe
|
227
|
+
end
|
228
|
+
|
208
229
|
end
|
209
230
|
|
210
231
|
|
@@ -17,6 +17,11 @@ $rtc.find('.rtc_empty_message').remove();
|
|
17
17
|
|
18
18
|
$('.modal').modal('hide');
|
19
19
|
|
20
|
+
<% if flash[:error].present? %>
|
21
|
+
showGlobalNotification('<%= flash[:error] %>', {type: ERROR});
|
22
|
+
<% else %>
|
23
|
+
showGlobalNotification('<%= flash[:notice] %>', {type: SUCCESS});
|
24
|
+
<% end %>
|
20
25
|
|
21
26
|
<% flash[:error].try(:clear) %>
|
22
27
|
<% flash[:notice].try(:clear) %>
|
@@ -16,7 +16,12 @@ $('.lvr_entry_edited').removeClass('lvr_entry_edited');
|
|
16
16
|
|
17
17
|
$('.modal').modal('hide');
|
18
18
|
|
19
|
-
|
19
|
+
|
20
|
+
<% if flash[:error].present? %>
|
21
|
+
showGlobalNotification('<%= flash[:error] %>', {type: ERROR});
|
22
|
+
<% else %>
|
23
|
+
showGlobalNotification('<%= flash[:notice] %>', {type: SUCCESS});
|
24
|
+
<% end %>
|
20
25
|
|
21
26
|
<% flash[:error].try(:clear) %>
|
22
27
|
<% flash[:notice].try(:clear) %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- @controller_names = instance_variable_get("@#{rtc_controller_name}")
|
3
3
|
- if @controller_names.respond_to?(:total_pages)
|
4
4
|
- if @controller_names.length > 0
|
5
|
-
= will_paginate(@controller_names, :renderer => PaginationListLinkRenderer, params: params, remote: true, :page => params[:page], :per_page => params[:per_page].presence || @controller_names.per_page)
|
5
|
+
= will_paginate(@controller_names, :renderer => PaginationListLinkRenderer, params: params, remote: true, :page => params[:page], :per_page => params[:per_page].presence || @controller_names.per_page) || fake_pagination(rtc_controller_name)
|
6
6
|
.page_entries_info
|
7
7
|
= page_entries_info @controller_names
|
8
8
|
|
@@ -64,12 +64,12 @@
|
|
64
64
|
.control-group.string.optional.range
|
65
65
|
%label.string.optional.control-label{for: "q_#{attribute_name}_gteq"}= t(label_name)
|
66
66
|
.controls
|
67
|
-
%input.string.optional.datepicker{id: "q_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
67
|
+
%input.string.optional.datepicker{id: "q_#{rtc_controller_name}_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
68
68
|
%p.help-block DD-MM-YYYY
|
69
69
|
%span.floating
|
70
70
|
= t('to')
|
71
71
|
.controls.floating
|
72
|
-
%input.string.optional.datepicker{id: "q_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
72
|
+
%input.string.optional.datepicker{id: "q_#{rtc_controller_name}_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
73
73
|
%p.help-block DD-MM-YYYY
|
74
74
|
- else
|
75
75
|
= f.input "#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
@@ -78,15 +78,15 @@
|
|
78
78
|
.control-group.string.optional.range
|
79
79
|
%label.string.optional.control-label{for: "q_#{attribute_name}_gteq"}= t(label_name)
|
80
80
|
.controls
|
81
|
-
%input.string.optional.datepicker{id: "q_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
81
|
+
%input.string.optional.datepicker{id: "q_#{rtc_controller_name}_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
82
82
|
%p.help-block DD-MM-YYYY
|
83
83
|
%span.floating
|
84
84
|
= t('to')
|
85
85
|
.controls.floating
|
86
|
-
%input.string.optional.datepicker{id: "q_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
86
|
+
%input.string.optional.datepicker{id: "q_#{rtc_controller_name}_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
87
87
|
%p.help-block DD-MM-YYYY
|
88
88
|
- else
|
89
|
-
= f.input "#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
89
|
+
= f.input "#{rtc_controller_name}_#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
90
90
|
|
91
91
|
.form-actions
|
92
92
|
%button{type: 'submit', class: 'btn btn-primary'}
|
@@ -65,13 +65,13 @@
|
|
65
65
|
.control-group.string.optional.range
|
66
66
|
%label.string.optional.control-label{for: "q_#{attribute_name}_gteq"}= t(label_name)
|
67
67
|
.controls
|
68
|
-
%input.string.optional.datepicker{id: "
|
68
|
+
%input.string.optional.datepicker{id: "q_recap_#{recapitulation_model.tableize}_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
69
69
|
%p.help-block DD-MM-YYYY
|
70
70
|
.control-group.string.optional.range
|
71
71
|
%label.string.optional.control-label
|
72
72
|
= t('to')
|
73
73
|
.controls
|
74
|
-
%input.string.optional.datepicker{id: "
|
74
|
+
%input.string.optional.datepicker{id: "q_recap_#{recapitulation_model.tableize}_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
75
75
|
%p.help-block DD-MM-YYYY
|
76
76
|
- else
|
77
77
|
= f.input "#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
@@ -79,9 +79,9 @@
|
|
79
79
|
- if range
|
80
80
|
.range_input
|
81
81
|
.control-group.string.optional.range
|
82
|
-
%label.string.optional.control-label{for: "
|
82
|
+
%label.string.optional.control-label{for: "q_recap_#{recapitulation_model.tableize}_#{attribute_name}_gteq"}= t(label_name)
|
83
83
|
.controls
|
84
|
-
%input.string.optional.datepicker{id: "
|
84
|
+
%input.string.optional.datepicker{id: "q_recap_#{recapitulation_model.tableize}_#{attribute_name}_gteq", name: "q[#{attribute_name}_gteq]", size: "50", type: "text"}
|
85
85
|
%p.help-block DD-MM-YYYY
|
86
86
|
.control-group.string.optional.range
|
87
87
|
%label.string.optional.control-label
|
@@ -90,4 +90,4 @@
|
|
90
90
|
%input.string.optional.datepicker{id: "q_#{attribute_name}_lteq", name: "q[#{attribute_name}_lteq]", size: "50", type: "text"}
|
91
91
|
%p.help-block DD-MM-YYYY
|
92
92
|
- else
|
93
|
-
= f.input "#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
93
|
+
= f.input "recap_#{recapitulation_model.tableize}_#{underscore_attribute}_eq".to_sym, label: label_name, required: false, input_html: { class: 'datepicker' }, hint: 'DD-MM-YYYY'
|
@@ -21,7 +21,13 @@
|
|
21
21
|
|
22
22
|
- headers.each_with_index do |header, i|
|
23
23
|
.rtc_gh_item{'data-column-width' => columns_width[i]}
|
24
|
-
|
24
|
+
- if header.present?
|
25
|
+
- if header.instance_of?(Array) && header.try(:first).nil?
|
26
|
+
%span= raw(t(header.try(:last)))
|
27
|
+
- else
|
28
|
+
= sort_link(header, rtc_controller_name: rtc_controller_name, params: params, rtc_partial: rtc_partial)
|
29
|
+
- else
|
30
|
+
= raw(" ")
|
25
31
|
|
26
32
|
.rtc_grid
|
27
33
|
= render "rich_table_component/rtc/table",
|
@@ -18,8 +18,7 @@ class PaginationListLinkRenderer < WillPaginate::ActionView::LinkRenderer
|
|
18
18
|
protected
|
19
19
|
|
20
20
|
def pagination
|
21
|
-
|
22
|
-
[ :first_page, :previous_page, :current_page_info, :next_page, :last_page, :input_page_navigator ]
|
21
|
+
[ :first_page, :previous_page, :current_page_info, :next_page, :last_page, :per_page_navigator, :input_page_navigator ]
|
23
22
|
end
|
24
23
|
|
25
24
|
def first_page
|
@@ -39,8 +38,8 @@ class PaginationListLinkRenderer < WillPaginate::ActionView::LinkRenderer
|
|
39
38
|
end
|
40
39
|
|
41
40
|
def per_page_navigator
|
42
|
-
per_page_options = [
|
43
|
-
'<div class="per_page_part">' + (tag(:select, per_page_options.map{|m| "<option #{(m==@options[:per_page]? 'selected=selected' : '')}>#{m}</option>"}.join, :data_value => @options[:per_page], :name => "per_page").html_safe) + I18n.t("will_paginate.per_page") + '</div>'
|
41
|
+
per_page_options = [5, 10, 20, 50, 100, 200]
|
42
|
+
'<div class="per_page_part">' + (tag(:select, per_page_options.map{|m| "<option #{(m==@options[:per_page].to_i ? 'selected=selected' : '')}>#{m}</option>"}.join, :data_value => @options[:per_page], :name => "per_page").html_safe) + I18n.t("will_paginate.per_page") + '</div>'
|
44
43
|
end
|
45
44
|
|
46
45
|
def link(text, target, attributes = {})
|
data/lib/rich_table_component.rb
CHANGED
@@ -44,6 +44,12 @@ module RichTableComponent
|
|
44
44
|
end
|
45
45
|
|
46
46
|
|
47
|
+
# get session per page for pagination
|
48
|
+
def session_per_page
|
49
|
+
session[:per_page] ||= DEFAULT_PER_PAGE
|
50
|
+
end
|
51
|
+
|
52
|
+
|
47
53
|
|
48
54
|
|
49
55
|
# Removes leading and trailing whitespace from ransack search params
|
@@ -140,7 +146,8 @@ module RichTableComponent
|
|
140
146
|
|
141
147
|
if pagination
|
142
148
|
params[:page] ||= 1
|
143
|
-
params[:per_page] ||=
|
149
|
+
params[:per_page] ||= session_per_page
|
150
|
+
session[:per_page] = params[:per_page]
|
144
151
|
relation = relation.page(params[:page].to_i).per_page(params[:per_page].to_i)
|
145
152
|
end
|
146
153
|
|
@@ -179,7 +186,13 @@ module RichTableComponent
|
|
179
186
|
case join_model.columns_hash[group_attr].type
|
180
187
|
when :date
|
181
188
|
old_since = splitter_time[2].eql?('old') ? "#{splitter_time[1]}(curdate()) - " : ""
|
182
|
-
|
189
|
+
|
190
|
+
if old_since.eql?("") && splitter_time[1].eql?('month')
|
191
|
+
group_db = "(concat(year(#{group_attr}), '/', LPAD(month(#{group_attr}), 2, '0') ))"
|
192
|
+
else
|
193
|
+
group_db = "(#{old_since}#{splitter_time[1]}(#{group_attr}))"
|
194
|
+
end
|
195
|
+
|
183
196
|
if splitter_time[3].presence
|
184
197
|
group_db = "(floor((#{group_db}) / #{splitter_time[3].to_i}))"
|
185
198
|
end
|
@@ -195,7 +208,7 @@ module RichTableComponent
|
|
195
208
|
|
196
209
|
def get_as_group_db(group_db)
|
197
210
|
as_group_db = "#{group_db.to_s.gsub('.', '__')}"
|
198
|
-
as_group_db = 'datetime_calculation' if as_group_db.index('curdate').present? || as_group_db.index('year(').present?
|
211
|
+
as_group_db = 'datetime_calculation' if as_group_db.index('curdate').present? || as_group_db.downcase.index('year(').present? || as_group_db.downcase.index('month(').present?
|
199
212
|
as_group_db
|
200
213
|
end
|
201
214
|
|
@@ -499,13 +512,13 @@ module RichTableComponent
|
|
499
512
|
respond_to do |format|
|
500
513
|
case act
|
501
514
|
when :create
|
502
|
-
flash[:notice]
|
515
|
+
flash[:notice] ||= "#{obj.class.name.tableize} was successfully created."
|
503
516
|
format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
|
504
517
|
when :update
|
505
|
-
flash[:notice]
|
518
|
+
flash[:notice] ||= "#{obj.class.name.tableize} was successfully updated."
|
506
519
|
format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
|
507
520
|
when :destroy
|
508
|
-
flash[:notice]
|
521
|
+
flash[:notice] ||= "#{obj.class.name.tableize} was successfully deleted."
|
509
522
|
format.html { redirect_to controller: obj.class.name.tableize, action: :index }
|
510
523
|
else
|
511
524
|
format.html # index.html.erb
|
@@ -543,10 +556,10 @@ module RichTableComponent
|
|
543
556
|
def format_remote(format, act = action_name, obj = instance_variable_get("@#{controller_name}"), html_redirect = nil)
|
544
557
|
case act
|
545
558
|
when :create
|
546
|
-
flash[:notice]
|
559
|
+
flash[:notice] ||= "#{obj.class.name.tableize} was successfully created."
|
547
560
|
format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
|
548
561
|
when :update
|
549
|
-
flash[:notice]
|
562
|
+
flash[:notice] ||= "#{obj.class.name.tableize} was successfully updated."
|
550
563
|
format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
|
551
564
|
else
|
552
565
|
format.html { render action: act }
|
@@ -89,7 +89,7 @@ var ajaxifyTableGrid = function(){
|
|
89
89
|
params.page = $pagination.find('input').val();
|
90
90
|
$href = $(this).parents('.pagination').find('a').eq(0).get(0).href;
|
91
91
|
}
|
92
|
-
|
92
|
+
params.per_page = $.cookie('unm_pp');
|
93
93
|
if($elmt.find('input#search').val() != '') {
|
94
94
|
params.search = $elmt.find('input#search').val();
|
95
95
|
}
|
@@ -114,6 +114,7 @@ var ajaxifyTableGrid = function(){
|
|
114
114
|
});
|
115
115
|
|
116
116
|
var params = {};
|
117
|
+
params.per_page = $.cookie('unm_pp');
|
117
118
|
if($elmt.find('input#search').val() != ''){
|
118
119
|
params = getSerializeArray($elmt.find('input#search').serializeArray());
|
119
120
|
}
|
@@ -128,8 +129,6 @@ var ajaxifyTableGrid = function(){
|
|
128
129
|
}).live('ajax:success', function(){
|
129
130
|
var $ths = $(this);
|
130
131
|
var $elmt = $(this).parents('.rich_table_component');
|
131
|
-
$select = $elmt.find('.pagination_area').find('select[name=per_page]');
|
132
|
-
$select.find('option').filter(function(index) { return $(this).text() === $select.attr('data_value'); }).attr('selected', true);
|
133
132
|
|
134
133
|
$elmt.find('.rtc_gh_item a').removeClass('asc').removeClass('desc');
|
135
134
|
if($ths.attr('href').indexOf("=asc") != -1){
|
@@ -165,12 +164,14 @@ var ajaxifyTableGrid = function(){
|
|
165
164
|
|
166
165
|
var params = getSerializeArray($elmt.find('form#filter_form').serializeArray());
|
167
166
|
$.extend(params, getSerializeArray($(this).serializeArray()));
|
168
|
-
params
|
167
|
+
params.page = 1;
|
168
|
+
params.per_page = $.cookie('unm_pp');
|
169
169
|
|
170
170
|
var $this_button = $ths.find('input[type=submit]');
|
171
171
|
if($this_button.is('.disabled, .pressed')){return false;}
|
172
172
|
$this_button.addClass('pressed');
|
173
173
|
|
174
|
+
settings.url += (settings.url.indexOf('?') >= 0 ? '&' : '?') + $.param(params);
|
174
175
|
}).live('ajax:success', function(){
|
175
176
|
var $this_button = $(this).find('input[type=submit]');
|
176
177
|
$this_button.removeClass('pressed');
|
@@ -230,7 +231,7 @@ var ajaxifyTableGrid = function(){
|
|
230
231
|
// SEARCHING (advanced)
|
231
232
|
$(
|
232
233
|
'form.rtc_advanced_search'
|
233
|
-
).live('ajax:
|
234
|
+
).live('ajax:beforeSend', function(event, xhr, settings){
|
234
235
|
var $el = $(this);
|
235
236
|
var $elmt = $(this).parents('.rich_table_component');
|
236
237
|
$('.rich_table_component.updating').removeClass('updating');
|
@@ -246,11 +247,16 @@ var ajaxifyTableGrid = function(){
|
|
246
247
|
$(this).clone().appendTo($adv_ff);
|
247
248
|
});
|
248
249
|
$adv_ff.find('input[name=page]').val('1');
|
250
|
+
$adv_ff.find('input[name=per_page]').val($.cookie('unm_pp'));
|
249
251
|
|
250
252
|
$elmt.st_tableGrid_loading({
|
251
253
|
message: t("searching"),
|
252
254
|
image: LOADING_IMAGE
|
253
255
|
});
|
256
|
+
|
257
|
+
params.page = 1;
|
258
|
+
params.per_page = $.cookie('unm_pp');
|
259
|
+
settings.url += (settings.url.indexOf('?') >= 0 ? '&' : '?') + $.param(params);
|
254
260
|
}).live('ajax:complete', function(event, xhr, status){
|
255
261
|
var $el = $(this);
|
256
262
|
$el.find('.advanced_filter_form').remove();
|
@@ -295,6 +301,20 @@ var ajaxifyTableGrid = function(){
|
|
295
301
|
initActiveTab();
|
296
302
|
initRecapitulation();
|
297
303
|
initMultipleSelection();
|
304
|
+
|
305
|
+
initCookies();
|
306
|
+
};
|
307
|
+
|
308
|
+
var initCookies = function(){
|
309
|
+
if($.cookie('unm_pp') == undefined){
|
310
|
+
$.cookie('unm_pp', $('.per_page_part').find('select').val());
|
311
|
+
}
|
312
|
+
$('.per_page_part').live('change', function(){
|
313
|
+
var $elmt = $(this).parents('.rich_table_component');
|
314
|
+
$.cookie('unm_pp', $(this).find('select').val());
|
315
|
+
$elmt.find('.go_to_page_part').find('input').val(1);
|
316
|
+
$elmt.find('.gotopage').trigger('click');
|
317
|
+
});
|
298
318
|
};
|
299
319
|
|
300
320
|
|
@@ -842,7 +842,8 @@ jQuery.fn.st_recapitulationMatrix = function(options){
|
|
842
842
|
var $elmt = jQuery(this);
|
843
843
|
|
844
844
|
var columns = '';
|
845
|
-
|
845
|
+
var copy_recapitulation_matrix = $.extend(true, [], opts.recapitulation_matrix);
|
846
|
+
label_col = copy_recapitulation_matrix.shift();
|
846
847
|
for(var i=0; i<label_col.length; i++){
|
847
848
|
columns += '<div class="rtc_gh_item" title="' + label_col[i] + '"><a>' + label_col[i] + '</a></div>';
|
848
849
|
}
|
@@ -881,7 +882,7 @@ jQuery.fn.st_recapitulationMatrix = function(options){
|
|
881
882
|
markup.append(list_view_row);
|
882
883
|
|
883
884
|
$.template( 'entry_template', markup );
|
884
|
-
$.tmpl( 'entry_template',
|
885
|
+
$.tmpl( 'entry_template', copy_recapitulation_matrix ).appendTo( $elmt.find('.rtc_content .rtc_grid > table') );
|
885
886
|
|
886
887
|
$elmt.find('.component_content').st_tableGrid();
|
887
888
|
|
@@ -733,7 +733,7 @@ $.TokenList = function (input, url_or_data, settings) {
|
|
733
733
|
// Do a search and show the "searching" dropdown if the input is longer
|
734
734
|
// than settings.minChars
|
735
735
|
function do_search() {
|
736
|
-
var query = input_box.val()
|
736
|
+
var query = input_box.val(); //.toLowerCase();
|
737
737
|
|
738
738
|
if(query && query.length) {
|
739
739
|
if(selected_token) {
|
@@ -795,7 +795,8 @@ $.TokenList = function (input, url_or_data, settings) {
|
|
795
795
|
cache.add(cache_key, settings.jsonContainer ? results[settings.jsonContainer] : results);
|
796
796
|
|
797
797
|
// only populate the dropdown if the results are associated with the active search query
|
798
|
-
if(input_box.val().toLowerCase() === query) {
|
798
|
+
//if(input_box.val().toLowerCase() === query) {
|
799
|
+
if(input_box.val() === query) {
|
799
800
|
populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results);
|
800
801
|
}
|
801
802
|
};
|
@@ -805,7 +806,8 @@ $.TokenList = function (input, url_or_data, settings) {
|
|
805
806
|
} else if(settings.local_data) {
|
806
807
|
// Do the search through local data
|
807
808
|
var results = $.grep(settings.local_data, function (row) {
|
808
|
-
return row[settings.propertyToSearch].toLowerCase().indexOf(query.toLowerCase()) > -1;
|
809
|
+
// return row[settings.propertyToSearch].toLowerCase().indexOf(query.toLowerCase()) > -1;
|
810
|
+
return row[settings.propertyToSearch].indexOf(query) > -1;
|
809
811
|
});
|
810
812
|
|
811
813
|
if($.isFunction(settings.onResult)) {
|
@@ -432,8 +432,9 @@ $separator_border_right: transparentize(white, 0.1)
|
|
432
432
|
margin-right: 15px
|
433
433
|
select
|
434
434
|
margin-top: -1px
|
435
|
-
|
436
|
-
|
435
|
+
margin-bottom: 0px
|
436
|
+
height: 19px
|
437
|
+
padding: 0px 2px 2px
|
437
438
|
width: 50px
|
438
439
|
text-align: right
|
439
440
|
margin-right: 3px
|
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.
|
4
|
+
version: 0.0.13
|
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-
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass-rails
|
@@ -224,17 +224,17 @@ dependencies:
|
|
224
224
|
requirement: !ruby/object:Gem::Requirement
|
225
225
|
none: false
|
226
226
|
requirements:
|
227
|
-
- -
|
227
|
+
- - '='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
229
|
+
version: 2.2.4
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
none: false
|
234
234
|
requirements:
|
235
|
-
- -
|
235
|
+
- - '='
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version:
|
237
|
+
version: 2.2.4
|
238
238
|
description: Rich Table Component with advanced search, export file, and generate
|
239
239
|
recapitulation
|
240
240
|
email:
|
@@ -482,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
482
482
|
version: '0'
|
483
483
|
requirements: []
|
484
484
|
rubyforge_project:
|
485
|
-
rubygems_version: 1.8.
|
485
|
+
rubygems_version: 1.8.23
|
486
486
|
signing_key:
|
487
487
|
specification_version: 3
|
488
488
|
summary: Just what the description said
|