it-logica-application-backbone 1.2.25 → 1.2.26

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.25
1
+ 1.2.26
@@ -71,8 +71,7 @@ function on_clear_table_fill_attrs(link, form_id) {
71
71
  var checkbox_pool = $("#" + form_id + "_checkbox_pool").val();
72
72
 
73
73
  // attrs I want to send when clearing form
74
- var data = link.data("post");
75
-
74
+ var data = link.data("post");
76
75
  data["clear"] = true;
77
76
  data["checkbox_pool"] = checkbox_pool;
78
77
 
@@ -1,4 +1,4 @@
1
- <div class="page">
1
+ a<div class="page">
2
2
  <%= render :partial => "/helpers/build_table_text_description", :locals => {:settings => settings} %>
3
3
  </div>
4
4
  <% if settings[:display_method]=="print_by_checkboxes" %>
@@ -22,7 +22,7 @@
22
22
  <% if settings[:checkboxes] %>
23
23
  <span>Vybráno: <strong>
24
24
  <span title="Počet označených řádků na všech stránkách" id="<%= settings[:form_id]+ "_active_checkboxes_count" %>">
25
- <%= !settings[:params]["checkbox_pool"].blank? ? settings[:params]["checkbox_pool"].split(",").count : 0 %>
25
+ <%= !settings[:params][:checkbox_pool].blank? ? settings[:params][:checkbox_pool].split(",").count : 0 %>
26
26
  </span>
27
27
  </strong>
28
28
  </span>
@@ -1,9 +1,16 @@
1
1
  <div class="filter-paging clearfix <%= placement if defined? placement %>">
2
2
  <div class="reset">
3
- <%= ajax_post_link_to "Smazat filtr", settings[:filter_path],
4
- "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
5
- :class => "btn",
6
- "data-post" => {:clear => true}.to_json %>
3
+ <%= link_to "Smazat filtr", settings[:filter_path],
4
+ "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
5
+ :class => "btn",
6
+ "data-post" => {:clear => true}.to_json,
7
+ "onclick" => "on_clear_table_fill_attrs($(this), '#{settings[:form_id]}'); parse_link_and_post($(this)); return false;"
8
+ %>
9
+ <%#= link_to "Smazat filtr", "#",
10
+ "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
11
+ :remote => true,
12
+ :class => "btn",
13
+ :onclick => "submit_spec('#{settings[:form_id]}', 'clear', 'true'); return false;" %>
7
14
  </div>
8
15
 
9
16
  <% if settings[:data_paginate].total_pages > 1 %>
@@ -1,5 +1,5 @@
1
1
  <div class="page">
2
- <%= render :partial => "/helpers/build_table_text_description", :locals => {:settings => settings} %>
2
+ <%= render :partial => "/helpers/editable_table/build_table_text_description", :locals => {:settings => settings} %>
3
3
  </div>
4
4
  <% if settings[:display_method]=="print_by_checkboxes" %>
5
5
  <div class="print-window-buttons" style="float:right">
@@ -22,59 +22,21 @@
22
22
  <% if settings[:checkboxes] %>
23
23
  <span>Vybráno: <strong>
24
24
  <span title="Počet označených řádků na všech stránkách" id="<%= settings[:form_id]+ "_active_checkboxes_count" %>">
25
- <%= !settings[:params][:checkbox_pool].blank? ? settings[:params][:checkbox_pool].split(",").count : 0 %>
25
+ <%= !settings[:params]["checkbox_pool"].blank? ? settings[:params]["checkbox_pool"].split(",").count : 0 %>
26
26
  </span>
27
27
  </strong>
28
28
  </span>
29
- <% end %>
30
-
31
- <% if settings[:display_method].blank? %>
32
- <% if settings[:checkboxes] %>
33
- <script type="text/javascript">
34
- function submit_in_new_window(form_id, spec_attr_name, spec_attr_value) {
35
- var form_original = $("#" + form_id);
36
-
37
- // create new form by cloning without events
38
- var form = form_original.clone(false)
39
-
40
- // disabling ajax
41
- form.removeAttr("data-remote");
42
-
43
- form.attr("target", "_blank");
44
- form.attr("action", form_original.attr("action"));
45
- form.attr("style", "display: none;");
46
- form.attr("id", "");
47
-
48
- // need to append it to browser html, otherwise it wont send in many browsers (with clone it works only with chrome)
49
- form_original.after(form);
50
-
51
- //Create an input type dynamically.
52
- var element = document.createElement("input");
53
29
 
54
- //Assign different attributes to the element.
55
- element.setAttribute("type", "hidden");
56
- element.setAttribute("value", spec_attr_value);
57
- element.setAttribute("name", spec_attr_name);
58
30
 
59
- //Append the element in form
60
- form.append(element);
61
-
62
- form.submit();
63
- form.remove();
64
- }
65
-
66
- </script>
67
- <a href="#" class="btn print print_by_checkboxes" onclick="submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print_by_checkboxes'); return false;"><i class="icon-print"></i>&nbsp;
68
- Tisknout výběr</a>
69
-
70
- <a href="#" class="btn print print_by_filter" onclick="if (confirm('Tato operace může trvat několik minut v této době prosím neobnovujte stránku. Maximální počet řádků pro tisk je 10000. Chcete pokračovat?')){submit_in_new_window('<%= settings[:form_id] %>', '___display_method___', 'print');} return false;"><i class="icon-print"></i>&nbsp;
71
- Tisknout vše dle filtrace</a>
72
- <% end %>
73
31
  <% end %>
32
+ <%= render :partial => "/helpers/editable_table/build_table_checkbox_functions", :locals => {:settings => settings} %>
33
+
74
34
  </div>
75
35
  </div>
76
36
  <% end %>
77
- <%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => 'well dataGrid', :remote => true, :id => settings[:form_id] do |f| %>
37
+
38
+ <%= yield :table_form_tabs_above_form %>
39
+ <%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => 'well dataGrid no_hover editable_table', :remote => true, :id => settings[:form_id] do |f| %>
78
40
  <% if settings[:display_method].blank? %>
79
41
  <% if content_for?(:table_form) %>
80
42
  <%= yield :table_form %>
@@ -82,28 +44,52 @@
82
44
  <% end %>
83
45
 
84
46
  <fieldset>
85
- <%= render :partial => "/helpers/build_table_filter", :locals => {:settings => settings} %>
47
+ <%= render :partial => "/helpers/editable_table/build_table_filter", :locals => {:settings => settings} %>
86
48
 
87
49
  <% if settings[:display_method].blank? %>
88
50
  <% unless settings[:per_page].blank? %>
89
- <span class="select_for_per_page" style="float: right">Zobrazit na stránku: <%= select_tag("per_page_chosen", options_for_select(settings[:per_page], settings[:params]['per_page'].to_i),
90
- :onchange => "form_submit_watcher('#{settings[:form_id]}')",
91
- :class => "") %></span>
51
+ <span class="select_for_per_page" style="float: right">Zobrazit na stránku: <%= select_tag("per_page_chosen", options_for_select(settings[:per_page], settings[:params]['per_page'].to_i),
52
+ :onchange => "form_submit_watcher('#{settings[:form_id]}')",
53
+ :class => "") %></span>
92
54
  <% end %>
93
55
 
94
-
95
-
96
56
  <div class="<%= settings[:form_id] + '_ajax_pager' %>">
97
- <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-up"} %>
57
+ <%= render :partial => 'helpers/editable_table/build_table_pager', :locals => {:settings => settings, :placement => "placement-up"} %>
98
58
  </div>
59
+
99
60
  <% end %>
100
61
 
101
- <%= render :partial => "/helpers/build_table_wrapper", :locals => {:settings => settings} %>
62
+ <%= render :partial => "/helpers/editable_table/build_table_wrapper", :locals => {:settings => settings} %>
102
63
 
103
64
  <% if settings[:display_method].blank? %>
104
- <div class="<%= settings[:form_id] + '_ajax_pager' %> parent-filter-paging placement-down">
105
- <%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings, :placement => "placement-down"} %>
65
+ <div class="<%= settings[:form_id] + '_ajax_pager' %>">
66
+ <%= render :partial => 'helpers/editable_table/build_table_pager', :locals => {:settings => settings, :placement => "placement-down"} %>
106
67
  </div>
107
68
  <% end %>
108
69
  </fieldset>
109
- <% end %>
70
+ <% end %>
71
+
72
+
73
+
74
+ <div id="modal_cell_editing" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
75
+ <!--<div class="modal-header">-->
76
+ <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>-->
77
+ <!--<h3 id="myModalLabel">Modal header</h3>-->
78
+ <!--</div>-->
79
+ <!--<div class="modal-body">-->
80
+ <!--<p>One fine body…</p>-->
81
+ <!--</div>-->
82
+ <!--<div class="modal-footer">-->
83
+ <!--<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>-->
84
+ <!--<button class="btn btn-primary">Save changes</button>-->
85
+ <!--</div>-->
86
+ </div>
87
+ <script type="text/javascript">
88
+ EditableTableModalDialog.init('modal_cell_editing')
89
+ </script>
90
+
91
+ <%# moved here, document ready removed, it has been called when printed etc, ready is called event when form is send to target _blank %>
92
+ <%= render :partial => "/helpers/editable_table/build_table_ajax_callback_code", :locals => {:settings => settings} %>
93
+
94
+
95
+
@@ -1,16 +1,9 @@
1
1
  <div class="filter-paging clearfix <%= placement if defined? placement %>">
2
2
  <div class="reset">
3
- <%= link_to "Smazat filtr", settings[:filter_path],
4
- "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
5
- :class => "btn",
6
- "data-post" => {:clear => true}.to_json,
7
- "onclick" => "on_clear_table_fill_attrs($(this), '#{settings[:form_id]}'); parse_link_and_post($(this)); return false;"
8
- %>
9
- <%#= link_to "Smazat filtr", "#",
10
- "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
11
- :remote => true,
12
- :class => "btn",
13
- :onclick => "submit_spec('#{settings[:form_id]}', 'clear', 'true'); return false;" %>
3
+ <%= ajax_post_link_to "Smazat filtr", settings[:filter_path],
4
+ "data-content_id" => settings[:content_id].blank? ? "" : settings[:content_id],
5
+ :class => "btn",
6
+ "data-post" => {:clear => true}.to_json %>
14
7
  </div>
15
8
 
16
9
  <% if settings[:data_paginate].total_pages > 1 %>
@@ -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.2.25"
8
+ s.version = "1.2.26"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ladas"]
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.2.25
4
+ version: 1.2.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: htmlentities
16
- requirement: &85304670 !ruby/object:Gem::Requirement
16
+ requirement: &85193340 !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: *85304670
24
+ version_requirements: *85193340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: shoulda
27
- requirement: &85304210 !ruby/object:Gem::Requirement
27
+ requirement: &85192940 !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: *85304210
35
+ version_requirements: *85192940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &85303750 !ruby/object:Gem::Requirement
38
+ requirement: &85192390 !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: *85303750
46
+ version_requirements: *85192390
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &85303180 !ruby/object:Gem::Requirement
49
+ requirement: &85191860 !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: *85303180
57
+ version_requirements: *85191860
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &85302650 !ruby/object:Gem::Requirement
60
+ requirement: &85191300 !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: *85302650
68
+ version_requirements: *85191300
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &85302290 !ruby/object:Gem::Requirement
71
+ requirement: &85190920 !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: *85302290
79
+ version_requirements: *85190920
80
80
  description: longer description of your gem
81
81
  email: ladislav.smola@it-logica.cz
82
82
  executables: []
@@ -618,7 +618,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
618
618
  version: '0'
619
619
  segments:
620
620
  - 0
621
- hash: -605749421
621
+ hash: -61934159
622
622
  required_rubygems_version: !ruby/object:Gem::Requirement
623
623
  none: false
624
624
  requirements: