it-logica-application-backbone 1.2.7 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/assets/stylesheets/backbone_css/editable_tables.css.scss +1 -3
- data/app/assets/stylesheets/backbone_css/overrides_of_lach_design.css.scss +3 -1
- data/app/views/helpers/_build_table_wrapper.html.erb +132 -186
- data/app/views/helpers/editable_table/_build_table_header.html.erb +3 -3
- data/it-logica-application-backbone.gemspec +1 -1
- data/lib/table_settings/table_action.rb +5 -0
- metadata +14 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.8
|
@@ -1,190 +1,136 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<%
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
1
|
+
<div class="scrollTarget">
|
2
|
+
<table class="table table-bordered table-condensed table_special">
|
3
|
+
<thead>
|
4
|
+
<tr class="filtering_tr" data-row-count-number="row_with_filters">
|
5
|
+
<% if !settings[:checkboxes].blank? && settings[:checkboxes] %>
|
6
|
+
<th class="chbox filtering_th <%= "headcol" if !settings[:static_columns_left_side].blank? %>" data-width-align-id="special_checbox_filtering">
|
7
|
+
</th>
|
8
|
+
<% end %>
|
9
|
+
<% if !settings[:row].blank? && !settings[:row][:functions].blank? %>
|
10
|
+
<th class="filtering_th <%= "headcol" if !settings[:static_columns_left_side].blank? %>" data-width-align-id="special_functions"></th>
|
11
|
+
<% end %>
|
12
|
+
<% order_by_arr = settings[:params][:order_by].downcase.split(",") unless settings[:params][:order_by].blank? %>
|
13
|
+
<% settings[:columns].each do |col| %>
|
14
|
+
<% width_align_id = col[:table].blank? ? "" : col[:table]
|
15
|
+
width_align_id += col[:name].blank? ? "" : ("___" + col[:name])
|
16
|
+
%>
|
17
|
+
|
18
|
+
|
19
|
+
<th class="filtering_th <%= col[:class] unless col[:class].blank? %> <%= col[:header_class] unless col[:header_class].blank? %>
|
20
|
+
<%= "headcol" if !settings[:static_columns_left_side].blank? && settings[:static_columns_left_side].include?(col[:name]) %>"
|
21
|
+
data-width-align-id="<%= width_align_id %>">
|
22
|
+
<% if settings[:display_method].blank? %>
|
23
|
+
<% case col[:filter] %>
|
24
|
+
<% when :find %>
|
25
|
+
<div class="inputs clearfix small_padding">
|
26
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['find'].blank? && !settings[:params]['find']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['find']["#{col[:table]}.#{col[:name]}"] : "" %>
|
27
|
+
<%= text_field_tag "find[#{col[:table]}.#{col[:name]}]", saved_param,
|
28
|
+
{:class => "text first #{settings[:form_id] + '_column_find'}"} %>
|
29
|
+
</div>
|
30
|
+
<% when :find_exact %>
|
31
|
+
<div class="inputs clearfix small_padding">
|
32
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['find_exact'].blank? && !settings[:params]['find_exact']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['find_exact']["#{col[:table]}.#{col[:name]}"] : "" %>
|
33
|
+
<%= text_field_tag "find_exact[#{col[:table]}.#{col[:name]}]", saved_param,
|
34
|
+
{:class => "text first #{settings[:form_id] + '_column_find'}"} %>
|
35
|
+
</div>
|
36
|
+
<% when :multichoice %>
|
37
|
+
<div class="inputs clearfix">
|
38
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['multichoice'].blank? && !settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"] : [] %>
|
39
|
+
<%= select_tag("multichoice[#{col[:table]}.#{col[:name]}]", options_for_select(col[:filter_data], saved_param),
|
40
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
41
|
+
:multiple => true,
|
42
|
+
:class => "multiselect_class") %>
|
43
|
+
</div>
|
44
|
+
<% when :number %>
|
45
|
+
<div class="inputs range clearfix small_padding">
|
46
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['number_from'].blank? && !settings[:params]['number_from']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['number_from']["#{col[:table]}.#{col[:name]}"] : "" %>
|
47
|
+
|
48
|
+
<%= text_field_tag "number_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text first #{settings[:form_id] + '_column_find'}",
|
49
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
50
|
+
:placeholder => "min.",
|
51
|
+
:title => "Hodnota musí být vetší nebo rovna zadané hodnotě"} %>
|
52
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['number_to'].blank? && !settings[:params]['number_to']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['number_to']["#{col[:table]}.#{col[:name]}"] : "" %>
|
53
|
+
<%#= label_tag "number_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
54
|
+
<%= text_field_tag "number_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text #{settings[:form_id] + '_column_find'}",
|
41
55
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
42
|
-
:placeholder => "
|
43
|
-
:title => "Hodnota musí být
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
+
:placeholder => "max.",
|
57
|
+
:title => "Hodnota musí být menší nebo rovna zadané hodnotě"} %>
|
58
|
+
</div>
|
59
|
+
<% when :date %>
|
60
|
+
<div class="inputs range clearfix small_padding">
|
61
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_from'].blank? && !settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"] : "" %>
|
62
|
+
<%#= label_tag "date_from[#{col[:table]}.#{col[:name]}]", "Od", :class => "datetime_class_label" %>
|
63
|
+
<%= text_field_tag "date_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text datetime_class first",
|
64
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
65
|
+
:placeholder => "od",
|
66
|
+
:title => "Datum od"} %>
|
67
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_to'].blank? && !settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"] : "" %>
|
68
|
+
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
69
|
+
<%= text_field_tag "date_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text datetime_class",
|
56
70
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
57
|
-
:placeholder => "
|
58
|
-
:title => "Datum
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
if (order_by_arr.include?(col[:table] + "." + col[:name] + " desc"))
|
100
|
-
sorted_class +="sorted sorted_desc"
|
101
|
-
elsif (order_by_arr.include?(col[:table] + "." + col[:name] + " asc"))
|
102
|
-
sorted_class +="sorted sorted_asc"
|
71
|
+
:placeholder => "do",
|
72
|
+
:title => "Datum do"} %>
|
73
|
+
</div>
|
74
|
+
<% else %>
|
75
|
+
<% end %>
|
76
|
+
|
77
|
+
<% end %>
|
78
|
+
</th>
|
79
|
+
|
80
|
+
<% end %>
|
81
|
+
</tr>
|
82
|
+
|
83
|
+
<tr class="sorting_tr" data-row-count-number="row_with_sorting">
|
84
|
+
<% if !settings[:checkboxes].blank? && settings[:checkboxes] %>
|
85
|
+
<th class="chbox <%= "headcol" if !settings[:static_columns_left_side].blank? %>">
|
86
|
+
<input type="checkbox" title="Označit/odznačit vše na stránce" onclick="CheckboxPool.check_or_uncheck_page(this, '<%= settings[:form_id] %>')" id=""/>
|
87
|
+
</th>
|
88
|
+
<% end %>
|
89
|
+
<% if !settings[:row].blank? && !settings[:row][:functions].blank? %>
|
90
|
+
<th class="<%= "headcol" if !settings[:static_columns_left_side].blank? %>"></th>
|
91
|
+
<% end %>
|
92
|
+
<% order_by_arr = settings[:params][:order_by].downcase.split(",") unless settings[:params][:order_by].blank? %>
|
93
|
+
<% settings[:columns].each do |col| %>
|
94
|
+
<% order_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "") %>
|
95
|
+
<% order_asc_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "___asc") %>
|
96
|
+
<% order_desc_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "___desc") %>
|
97
|
+
|
98
|
+
<%
|
99
|
+
sorted_class = ""
|
100
|
+
if col[:column_method].blank? && col[:row_method].blank? && !col[:name].blank?
|
101
|
+
sorted_class += "sorting_th "
|
102
|
+
|
103
|
+
sorting_onclick = "TableSorting.force_toggled_change_sorting('#{settings[:form_id]}','#{col[:table] + "." +col[:name]}', this); return false;"
|
104
|
+
sorting_mouseover = "TableSorting.mouse_over_hover_sorting('#{settings[:form_id]}','#{col[:table] + "." +col[:name]}', this); return false;"
|
105
|
+
sorting_mouseout = "TableSorting.mouse_out_hover_sorting('#{settings[:form_id]}','#{col[:table] + "." +col[:name]}', this); return false;"
|
106
|
+
|
107
|
+
if (order_by_arr.include?(col[:table] + "." + col[:name] + " desc"))
|
108
|
+
sorted_class +="sorted sorted_desc"
|
109
|
+
elsif (order_by_arr.include?(col[:table] + "." + col[:name] + " asc"))
|
110
|
+
sorted_class +="sorted sorted_asc"
|
111
|
+
end
|
103
112
|
end
|
104
|
-
end
|
105
|
-
|
106
|
-
%>
|
107
|
-
|
108
|
-
<th class="<%= order_asc_id %> <%= order_desc_id %> <%= col[:class] unless col[:class].blank? %> <%= sorted_class %>"
|
109
|
-
onmouseover="<%= sorting_mouseover %>"
|
110
|
-
onmouseout="<%= sorting_mouseout %>"
|
111
|
-
onclick="<%= sorting_onclick %>"
|
112
|
-
title="<%= col[:title].html_safe unless col[:title].blank? %>"
|
113
|
-
>
|
114
|
-
<div class="th_label">
|
115
|
-
<strong>
|
116
|
-
<span><%= col[:label].html_safe %></span>
|
117
|
-
</strong>
|
118
|
-
</div>
|
119
|
-
</th>
|
120
|
-
|
121
|
-
<% end %>
|
122
|
-
</tr>
|
123
|
-
|
124
|
-
|
125
|
-
</thead>
|
126
|
-
<tbody id="<%= settings[:form_id] %>_ajax_content">
|
127
|
-
<% unless settings[:template].blank? %>
|
128
|
-
<%= render :partial => settings[:template], :locals => {:settings => settings} %>
|
129
|
-
<% end %>
|
130
|
-
</tbody>
|
131
|
-
<tfoot>
|
132
|
-
<!--<tr>-->
|
133
|
-
<!--<th colspan="100" class="<%#= settings[:form_id] + '_ajax_pager' %>">-->
|
134
|
-
<!--<%#= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %>-->
|
135
|
-
<!--</th>-->
|
136
|
-
<!--</tr>-->
|
137
|
-
</tfoot>
|
138
|
-
</table>
|
139
|
-
|
140
|
-
<script type="text/javascript">
|
141
|
-
$('.<%= settings[:form_id] + "_column_find" %>').livesearch({
|
142
|
-
searchCallback:function (searchTerm) {
|
143
|
-
FilterChangeMarker.mark_active_filters('<%= settings[:form_id] %>');
|
144
|
-
$('#<%= settings[:form_id] %>').submit();
|
145
|
-
},
|
146
|
-
queryDelay:1000,
|
147
|
-
innerText:"",
|
148
|
-
minimumSearchLength:1
|
149
|
-
});
|
150
|
-
</script>
|
151
|
-
|
152
|
-
|
153
|
-
<script type="text/javascript">
|
154
|
-
$.datepicker.setDefaults($.datepicker.regional[ "cs" ]);
|
155
|
-
$('.datetime_class').datetimepicker({
|
156
|
-
dateFormat:"yy-mm-dd",
|
157
|
-
timeFormat:'hh:mm',
|
158
|
-
separator:' ',
|
159
|
-
changeYear:true,
|
160
|
-
yearRange:'<%= Date.today.year - 100 %>:<%= Date.today.year + 30 %>',
|
161
|
-
changeMonth:true
|
162
|
-
});
|
163
|
-
</script>
|
164
|
-
|
165
|
-
|
166
|
-
<script type="text/javascript">
|
167
|
-
$('.multiselect_class').multiselect({
|
168
|
-
selectedText:'<span class="active_multiselect">***</span>',
|
169
|
-
noneSelectedText:"",
|
170
|
-
checkAllText:"Označit vše",
|
171
|
-
uncheckAllText:"Zrušit vše",
|
172
|
-
minWidth:100
|
173
|
-
},function () {
|
174
|
-
form_submit_watcher('<%=settings[:form_id] %>');
|
175
|
-
}).multiselectfilter();
|
176
|
-
//$('#filled_value_' + fid + '_' + rid).multiselect("open");
|
177
|
-
$(".ui-multiselect-menu").css("width", "240px");
|
178
|
-
// $("button.ui-multiselect").css("width", "55px");
|
179
|
-
$("button.ui-multiselect").css("width", "100%");
|
180
|
-
$("button.ui-multiselect").css("min-width", "22px");
|
181
|
-
$("button.ui-multiselect").css("max-width", "55px");
|
182
|
-
$("button.ui-multiselect").css("height", "22px");
|
183
113
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
114
|
+
%>
|
115
|
+
|
116
|
+
<th class="<%= order_asc_id %> <%= order_desc_id %> <%= col[:class] unless col[:class].blank? %> <%= sorted_class %> <%= col[:header_class] unless col[:header_class].blank? %>
|
117
|
+
<%= "headcol" if !settings[:static_columns_left_side].blank? && settings[:static_columns_left_side].include?(col[:name]) %>"
|
118
|
+
onmouseover="<%= sorting_mouseover %>"
|
119
|
+
onmouseout="<%= sorting_mouseout %>"
|
120
|
+
onclick="<%= sorting_onclick %>"
|
121
|
+
title="<%= col[:title].html_safe unless col[:title].blank? %>"
|
122
|
+
>
|
123
|
+
<div class="th_label">
|
124
|
+
<strong>
|
125
|
+
<span><%= col[:label].html_safe %></span>
|
126
|
+
</strong>
|
127
|
+
</div>
|
128
|
+
</th>
|
129
|
+
|
130
|
+
<% end %>
|
131
|
+
</tr>
|
132
|
+
|
133
|
+
|
134
|
+
</thead>
|
135
|
+
</table>
|
136
|
+
</div>
|
@@ -43,14 +43,14 @@
|
|
43
43
|
</div>
|
44
44
|
<% when :number %>
|
45
45
|
<div class="inputs range clearfix small_padding">
|
46
|
-
<% saved_param = (!settings[:params].blank? && !settings[:params]['
|
46
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['number_from'].blank? && !settings[:params]['number_from']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['number_from']["#{col[:table]}.#{col[:name]}"] : "" %>
|
47
47
|
|
48
48
|
<%= text_field_tag "number_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text first #{settings[:form_id] + '_column_find'}",
|
49
49
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
50
50
|
:placeholder => "min.",
|
51
51
|
:title => "Hodnota musí být vetší nebo rovna zadané hodnotě"} %>
|
52
|
-
<% saved_param = (!settings[:params].blank? && !settings[:params]['
|
53
|
-
<%#= label_tag "
|
52
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['number_to'].blank? && !settings[:params]['number_to']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['number_to']["#{col[:table]}.#{col[:name]}"] : "" %>
|
53
|
+
<%#= label_tag "number_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
54
54
|
<%= text_field_tag "number_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text #{settings[:form_id] + '_column_find'}",
|
55
55
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
56
56
|
:placeholder => "max.",
|
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.
|
4
|
+
version: 1.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-11-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: htmlentities
|
16
|
-
requirement: &
|
16
|
+
requirement: &82918500 !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: *
|
24
|
+
version_requirements: *82918500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &82918110 !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: *
|
35
|
+
version_requirements: *82918110
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rdoc
|
38
|
-
requirement: &
|
38
|
+
requirement: &82917690 !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: *
|
46
|
+
version_requirements: *82917690
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &82917230 !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: *
|
57
|
+
version_requirements: *82917230
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &82916620 !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: *
|
68
|
+
version_requirements: *82916620
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
|
-
requirement: &
|
71
|
+
requirement: &82916080 !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: *
|
79
|
+
version_requirements: *82916080
|
80
80
|
description: longer description of your gem
|
81
81
|
email: ladislav.smola@it-logica.cz
|
82
82
|
executables: []
|
@@ -617,7 +617,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
617
617
|
version: '0'
|
618
618
|
segments:
|
619
619
|
- 0
|
620
|
-
hash: -
|
620
|
+
hash: -926958227
|
621
621
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
622
622
|
none: false
|
623
623
|
requirements:
|