it-logica-application-backbone 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.1.7
@@ -14,6 +14,9 @@
14
14
  // console.log(watched_form_id);
15
15
  // console.log(submit_timestamp)
16
16
  //ladas_loading_show();
17
+ //console.log("uaaa")
18
+ FilterChangeMarker.mark_active_filters(watched_form_id);
19
+
17
20
  clearTimeout(submit_timestamp[watched_form_id]);
18
21
  submit_timestamp[watched_form_id] = setTimeout(function() { form_submit(watched_form_id) }, 1000);
19
22
 
@@ -0,0 +1,36 @@
1
+ class FilterChangeMarker
2
+ @mark_active_filters: (form_id) ->
3
+ #console.log(form_id)
4
+ $('#' + form_id + " .filtering_th input").each (index, element) =>
5
+ # input boxes marking of active filter
6
+ el = $(element)
7
+ val = el.val()
8
+
9
+ el.removeClass("table_filter_active")
10
+ el.parents("th.filtering_th").removeClass("table_filter_active")
11
+ if val? && val.length > 0
12
+ #console.log(element)
13
+ el.addClass("table_filter_active")
14
+ el.parents("th.filtering_th").addClass("table_filter_active")
15
+
16
+
17
+ $('#' + form_id + " .filtering_th select").each (index, element) =>
18
+ # selectboxes marking active filter
19
+ el = $(element)
20
+ found = false
21
+ el.find("option:selected").each (index, element) =>
22
+ #console.log(element)
23
+ found = true
24
+
25
+ el.parents("th.filtering_th").removeClass("table_filter_active")
26
+ if found
27
+ el.parents("th.filtering_th").addClass("table_filter_active")
28
+
29
+
30
+
31
+ window.FilterChangeMarker = FilterChangeMarker
32
+
33
+
34
+
35
+
36
+
@@ -29,6 +29,7 @@
29
29
  ladas_loading_hide();
30
30
  <% end %>
31
31
  formatLinkForPaginationURL('<%= settings[:form_id] %>');
32
+ FilterChangeMarker.mark_active_filters('<%= settings[:form_id] %>');
32
33
 
33
34
  $("#<%= settings[:form_id] %>")
34
35
  .live("ajax:beforeSend", function (evt, xhr, settings) {
@@ -140,6 +140,7 @@
140
140
  <script type="text/javascript">
141
141
  $('.<%= settings[:form_id] + "_column_find" %>').livesearch({
142
142
  searchCallback:function (searchTerm) {
143
+ FilterChangeMarker.mark_active_filters('<%= settings[:form_id] %>');
143
144
  $('#<%= settings[:form_id] %>').submit();
144
145
  },
145
146
  queryDelay:1000,
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "it-logica-application-backbone"
8
- s.version = "1.1.6"
8
+ s.version = "1.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ladas"]
@@ -161,6 +161,7 @@ Gem::Specification.new do |s|
161
161
  "app/assets/javascripts/backbone_js/ladas_saving.js",
162
162
  "app/assets/javascripts/backbone_js/ladas_table_builder.js.coffee",
163
163
  "app/assets/javascripts/backbone_js/ladas_table_checkbox_pool.js.coffee",
164
+ "app/assets/javascripts/backbone_js/ladas_table_filter_change_marker.js.coffee",
164
165
  "app/assets/javascripts/backbone_js/ladas_table_for.js",
165
166
  "app/assets/javascripts/backbone_js/ladas_table_sorting.js.coffee",
166
167
  "app/assets/javascripts/backbone_js/ladas_table_summaries.js.coffee",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: it-logica-application-backbone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: htmlentities
16
- requirement: &83123760 !ruby/object:Gem::Requirement
16
+ requirement: &75681970 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *83123760
24
+ version_requirements: *75681970
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: shoulda
27
- requirement: &83123200 !ruby/object:Gem::Requirement
27
+ requirement: &75681360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *83123200
35
+ version_requirements: *75681360
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &83122610 !ruby/object:Gem::Requirement
38
+ requirement: &75752580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3.12'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *83122610
46
+ version_requirements: *75752580
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &83500180 !ruby/object:Gem::Requirement
49
+ requirement: &75752230 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *83500180
57
+ version_requirements: *75752230
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &83499820 !ruby/object:Gem::Requirement
60
+ requirement: &75751810 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.8.4
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *83499820
68
+ version_requirements: *75751810
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &83499390 !ruby/object:Gem::Requirement
71
+ requirement: &75751360 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *83499390
79
+ version_requirements: *75751360
80
80
  description: longer description of your gem
81
81
  email: ladislav.smola@it-logica.cz
82
82
  executables: []
@@ -229,6 +229,7 @@ files:
229
229
  - app/assets/javascripts/backbone_js/ladas_saving.js
230
230
  - app/assets/javascripts/backbone_js/ladas_table_builder.js.coffee
231
231
  - app/assets/javascripts/backbone_js/ladas_table_checkbox_pool.js.coffee
232
+ - app/assets/javascripts/backbone_js/ladas_table_filter_change_marker.js.coffee
232
233
  - app/assets/javascripts/backbone_js/ladas_table_for.js
233
234
  - app/assets/javascripts/backbone_js/ladas_table_sorting.js.coffee
234
235
  - app/assets/javascripts/backbone_js/ladas_table_summaries.js.coffee
@@ -599,7 +600,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
599
600
  version: '0'
600
601
  segments:
601
602
  - 0
602
- hash: 326661299
603
+ hash: -268430509
603
604
  required_rubygems_version: !ruby/object:Gem::Requirement
604
605
  none: false
605
606
  requirements: