it-logica-application-backbone 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/assets/javascripts/backbone_js/ladas_paginate.js +11 -1
- data/app/assets/javascripts/backbone_js/ladas_table_builder.js.coffee +1 -1
- data/app/assets/javascripts/backbone_js/ladas_table_checkbox_pool.js.coffee +8 -0
- data/app/assets/javascripts/backbone_js/ladas_table_sorting.js.coffee +8 -8
- data/app/assets/stylesheets/backbone_css/design.css +61 -0
- data/app/assets/stylesheets/backbone_css/tables.css.scss +35 -0
- data/app/views/helpers/_build_table.html.erb +16 -3
- data/app/views/helpers/_build_table_pager.html.erb +14 -11
- data/app/views/helpers/_build_table_wrapper.html.erb +97 -75
- data/it-logica-application-backbone.gemspec +3 -2
- data/lib/model_mixins/table_builder_class_methods.rb +6 -1
- metadata +16 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.19
|
@@ -13,7 +13,8 @@ function formatLinkForPaginationURL(form_id) {
|
|
13
13
|
|
14
14
|
linkElement.attr({
|
15
15
|
"url":paginationURL,
|
16
|
-
"href":"#"
|
16
|
+
"href":"#",
|
17
|
+
"class":"btn"
|
17
18
|
});
|
18
19
|
|
19
20
|
linkElement.click(function () {
|
@@ -63,6 +64,15 @@ function formatLinkForPagination(container_class) {
|
|
63
64
|
})
|
64
65
|
}
|
65
66
|
|
67
|
+
function paginate_by_enter(form_id, obj, e) {
|
68
|
+
if ((e.keyCode ? e.keyCode : e.which) == 13) {
|
69
|
+
$("#" + form_id + "_page").val($(obj).val());
|
70
|
+
$("#" + form_id).submit();
|
71
|
+
return false;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
|
66
76
|
//function filter_sort(form_id, order_by_value) {
|
67
77
|
// var default_direction = 'DESC';
|
68
78
|
// var order_by_id = '#' + form_id + '_order_by';
|
@@ -59,7 +59,7 @@ class TableBuilder
|
|
59
59
|
|
60
60
|
@add_row_checkboxes: (row) ->
|
61
61
|
if TableBuilder.obj.checkboxes?
|
62
|
-
TableBuilder.html += '<td class="
|
62
|
+
TableBuilder.html += '<td class="chbox">'
|
63
63
|
TableBuilder.html += '<input type="checkbox" class="row_checkboxes" name="checkboxes[' + row.row_id + ']"'
|
64
64
|
TableBuilder.html += ' onclick="CheckboxPool.change($(this))"'
|
65
65
|
#console.log CheckboxPool.get_pool_by_form_id(TableBuilder.obj.form_id, row.row_id)
|
@@ -35,6 +35,14 @@ class CheckboxPool
|
|
35
35
|
$(element).attr("checked", false)
|
36
36
|
CheckboxPool.change(element)
|
37
37
|
|
38
|
+
@check_or_uncheck_page: (obj, form_id) ->
|
39
|
+
if $(obj).attr('checked')
|
40
|
+
CheckboxPool.check_page(form_id)
|
41
|
+
else
|
42
|
+
CheckboxPool.uncheck_page(form_id)
|
43
|
+
|
44
|
+
|
45
|
+
|
38
46
|
#######################################################
|
39
47
|
#private
|
40
48
|
#######################################################
|
@@ -41,8 +41,8 @@ class TableSorting
|
|
41
41
|
|
42
42
|
|
43
43
|
$("#" + form_id + " .sort_button").each (index, element) =>
|
44
|
-
$(element).removeClass("
|
45
|
-
|
44
|
+
$(element).removeClass("btn-success")
|
45
|
+
#$(element).addClass("inactive") # give all disabled class
|
46
46
|
|
47
47
|
|
48
48
|
new_order_by_val = ""
|
@@ -55,8 +55,8 @@ class TableSorting
|
|
55
55
|
|
56
56
|
order_by_button_id = "#" + element.replace(" ", "___").replace(".", "___")
|
57
57
|
#console.log(order_by_button_id)
|
58
|
-
|
59
|
-
$(order_by_button_id).addClass("
|
58
|
+
#$(order_by_button_id).removeClass("inactive")
|
59
|
+
$(order_by_button_id).addClass("btn-success")
|
60
60
|
|
61
61
|
#console.log(new_order_by_val)
|
62
62
|
|
@@ -74,13 +74,13 @@ class TableSorting
|
|
74
74
|
order_by_id = '#' + form_id + '_order_by'
|
75
75
|
|
76
76
|
$("#" + form_id + " .sort_button").each (index, element) =>
|
77
|
-
$(element).removeClass("
|
78
|
-
|
77
|
+
$(element).removeClass("btn-success")
|
78
|
+
#$(element).addClass("inactive") # give all disabled class
|
79
79
|
|
80
80
|
element = order_by_value + " " + dir
|
81
81
|
order_by_button_id = "#" + element.replace(" ", "___").replace(".", "___")
|
82
|
-
|
83
|
-
$(order_by_button_id).addClass("
|
82
|
+
#$(order_by_button_id).removeClass("inactive")
|
83
|
+
$(order_by_button_id).addClass("btn-success")
|
84
84
|
|
85
85
|
$(order_by_id).val(element)
|
86
86
|
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/* added by Tomas LAch for just as a default design */
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
.table.groupStats {width: 100%;border-collapse: collapse;margin-bottom: 30px;}
|
7
|
+
.table.groupStats tr:hover th, .table.groupStats tr:hover td {background: none !important;}
|
8
|
+
.table.groupStats th, .table.groupStats td {padding: 5px 10px 5px 0;border: 0;}
|
9
|
+
.table.groupStats td {padding: 10px 10px 5px 0;border: 0;}
|
10
|
+
.table.groupStats td a.summary {margin-left: 10px;color: #000;text-decoration: underline;}
|
11
|
+
.table.groupStats td a.summary:hover {text-decoration: none;}
|
12
|
+
.table.groupStats .sep td hr {margin: 10px 0 !important;}
|
13
|
+
.table.groupStats td .sep {font-weight: normal;color: #000;padding: 0 3px;}
|
14
|
+
.table.groupStats th {text-align: left;font-weight: normal;}
|
15
|
+
.table.groupStats .subThead th {color: #7f7f7f;}
|
16
|
+
|
17
|
+
.table.messages tr:hover th, .table.messages tr:hover td {background: none !important;}
|
18
|
+
.table.messages td {padding: 8px 0;}
|
19
|
+
.table.messages a {display: block;padding-left: 25px;}
|
20
|
+
|
21
|
+
.table.messages .from {text-align: right;}
|
22
|
+
.table.messages .from a {padding-left: 0;color: #9c8866;font-size: 0.9em;}
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
.dataGrid {padding: 0 !important;}
|
27
|
+
.dataGrid .filter-paging {height: 56px !important;overflow: hidden;}
|
28
|
+
.dataGrid .filter-paging .reset {float: left;padding: 15px 0;text-align: center;border-right: 1px solid #cccccc;width: 125px;}
|
29
|
+
.dataGrid .filter-paging .paging {float: left;padding: 15px;width: 710px;}
|
30
|
+
.dataGrid .filter-paging .btn {margin: 0 !important;font-weight: bold;}
|
31
|
+
.dataGrid .filter-paging .paging .btn {margin: 0 4px !important;}
|
32
|
+
.dataGrid .filter-paging input {float: left;margin: 0 8px 0 0 !important;}
|
33
|
+
.dataGrid table {width: 100%;border: 1px solid #cccccc;border-collapse: collapse;border-left: 0;border-right: 0;}
|
34
|
+
.dataGrid table td, .dataGrid table th {border: 1px solid #cccccc;padding: 15px 12px;}
|
35
|
+
.dataGrid table tr td:first-child, .dataGrid table tr th:first-child {border-left: 0;}
|
36
|
+
.dataGrid table tr td:last-child, .dataGrid table tr th:last-child {border-right: 0;}
|
37
|
+
.dataGrid table thead th, .dataGrid table tfoot td {background: #f5f3ef;}
|
38
|
+
.dataGrid table tbody tr:hover td {background: #f1fadf !important;}
|
39
|
+
.dataGrid table tbody tr.checked td {background: #faf9f8;}
|
40
|
+
.dataGrid table tbody tr td .btn {margin: 0 !important;}
|
41
|
+
.dataGrid table thead th {text-align: left;width: 115px;}
|
42
|
+
.dataGrid table thead th.small {width: 55px;}
|
43
|
+
.dataGrid table thead th.chbox {width: 55px;max-width: 55px;text-align: center;}
|
44
|
+
.dataGrid table td.chbox {width: 55px;text-align: center;}
|
45
|
+
.dataGrid table thead th .sortable {padding: 5px 0 8px;}
|
46
|
+
.dataGrid table thead th .sortable .btn {width: 24px;padding-left: 0 !important;padding-right: 0 !important;margin: 0 0 0 3px !important;float: left;}
|
47
|
+
.dataGrid table thead th .sortable .btn.first {margin-left: 0 !important;}
|
48
|
+
.dataGrid table thead th .inputs.range {width: 115px;}
|
49
|
+
.dataGrid table thead th .inputs .text {width: 45px !important;float: left;margin: 0 0 0 5px !important;}
|
50
|
+
.dataGrid table thead th .inputs .text.first {margin: 0 !important;}
|
51
|
+
.dataGrid table thead th.sorted {background: #f1fadf;}
|
52
|
+
.dataGrid table tfoot td {font-size: 0.9em;padding: 7px 12px !important;}
|
53
|
+
|
54
|
+
|
55
|
+
.positive {color: #5a8700;}
|
56
|
+
.negative {color: #ca5856;}
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
.alignCenter {text-align: center !important;}
|
61
|
+
.alignRight {text-align: right !important;}
|
@@ -1,9 +1,26 @@
|
|
1
1
|
$marked_item_color: #008000;
|
2
2
|
|
3
|
+
table.table_special {
|
4
|
+
margin-bottom: 0px;
|
5
|
+
}
|
6
|
+
|
3
7
|
table.table_special span.sort_button {
|
4
8
|
cursor: Pointer;
|
5
9
|
}
|
6
10
|
|
11
|
+
form.dataGrid input.own_page {
|
12
|
+
width: 35px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.dataGrid tr.summarize_page td, .dataGrid tr.summarize_all td {
|
16
|
+
background: #f5f3ef;
|
17
|
+
text-align: right !important;
|
18
|
+
}
|
19
|
+
|
20
|
+
form.well {
|
21
|
+
background-color: white;
|
22
|
+
}
|
23
|
+
|
7
24
|
table.table_special span.sort_button.active {
|
8
25
|
background-color: $marked_item_color;
|
9
26
|
}
|
@@ -46,6 +63,7 @@ table.table_special label.datetime_class_label {
|
|
46
63
|
.table thead th.users_form_id_ajax_pager {
|
47
64
|
vertical-align: middle;
|
48
65
|
}
|
66
|
+
|
49
67
|
.table tfoot th.users_form_id_ajax_pager {
|
50
68
|
vertical-align: middle;
|
51
69
|
}
|
@@ -56,3 +74,20 @@ table.table_special label.datetime_class_label {
|
|
56
74
|
vertical-align: middle;
|
57
75
|
}
|
58
76
|
|
77
|
+
|
78
|
+
div.filter-paging em.current {
|
79
|
+
font-style: bold;
|
80
|
+
margin: 0px 4px;
|
81
|
+
padding: 4px 10px 4px;
|
82
|
+
font-size: 13px;
|
83
|
+
line-height: 18px;
|
84
|
+
|
85
|
+
}
|
86
|
+
span.previous_page.disabled, span.next_page.disabled {
|
87
|
+
padding: 4px 10px 4px;
|
88
|
+
font-size: 13px;
|
89
|
+
line-height: 18px;
|
90
|
+
margin: 0 4px;
|
91
|
+
}
|
92
|
+
|
93
|
+
|
@@ -1,7 +1,20 @@
|
|
1
|
-
<%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => '
|
1
|
+
<%= form_tag settings[:filter_path], :html => {:'data-type' => 'html'}, :method => 'POST', :class => 'well dataGrid', :remote => true, :id => settings[:form_id] do |f| %>
|
2
2
|
<% if content_for?(:table_form) %>
|
3
3
|
<%= yield :table_form %>
|
4
4
|
<% end %>
|
5
|
-
|
6
|
-
|
5
|
+
<fieldset>
|
6
|
+
<%= render :partial => "/helpers/build_table_filter", :locals => {:settings => settings} %>
|
7
|
+
<% unless settings[:per_page].blank? %>
|
8
|
+
<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),
|
9
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
10
|
+
:class => "") %></span>
|
11
|
+
<% end %>
|
12
|
+
<div class="<%= settings[:form_id] + '_ajax_pager' %>">
|
13
|
+
<%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %>
|
14
|
+
</div>
|
15
|
+
<%= render :partial => "/helpers/build_table_wrapper", :locals => {:settings => settings} %>
|
16
|
+
<div class="<%= settings[:form_id] + '_ajax_pager' %>">
|
17
|
+
<%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %>
|
18
|
+
</div>
|
19
|
+
</fieldset>
|
7
20
|
<% end %>
|
@@ -1,14 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div class="filter-paging clearfix">
|
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, :style => "float: left" %>
|
7
|
+
</div>
|
5
8
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
9
|
+
|
10
|
+
<div id="<%= settings[:form_id] %>_pagination" class="paging <%= settings[:form_id] %>_pager">
|
11
|
+
<input type="text" class="own_page" value="<%= settings[:params].blank? ? 1 : settings[:params]["page"] %>"
|
12
|
+
onkeypress="paginate_by_enter('<%= settings[:form_id] %>', this, event);">
|
13
|
+
<button class="btn" onclick='$("#" + "<%= settings[:form_id] %>" + "_page").val($(this).prev("input").val()); $("#" + "<%= settings[:form_id] %>").submit(); return false;'>Přejít</button>
|
14
|
+
<%= will_paginate settings[:data_paginate], :container => false %>
|
15
|
+
</div>
|
13
16
|
</div>
|
14
17
|
|
@@ -1,29 +1,32 @@
|
|
1
|
-
<% unless settings[:per_page].blank? %>
|
2
|
-
<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),
|
3
|
-
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
4
|
-
:class => "") %></span>
|
5
|
-
<% end %>
|
6
1
|
<table class="table table-bordered table-condensed table_special">
|
7
2
|
<thead>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
<!--<tr>-->
|
4
|
+
<!--<th colspan="100" class="<%= settings[:form_id] + '_ajax_pager' %>">-->
|
5
|
+
<!--<%#= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %>-->
|
6
|
+
<!--</th>-->
|
7
|
+
<!--</tr>-->
|
13
8
|
<tr>
|
14
9
|
<% if !settings[:checkboxes].blank? && settings[:checkboxes] %>
|
15
|
-
<th>
|
10
|
+
<th class="chbox">
|
16
11
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
<!--<div class="checkboxes_filtered">-->
|
13
|
+
<!--Filtrováno položek:-->
|
14
|
+
<!--<span id="<%#= settings[:form_id]+ "_active_checkboxes_count" %>">-->
|
15
|
+
<!--<%#= !settings[:params]["checkbox_pool"].blank? ? settings[:params]["checkbox_pool"].split(",").count : 0 %>-->
|
16
|
+
<!--</span>-->
|
17
|
+
<!--<a onclick="CheckboxPool.clear_by_form_id('<%#= settings[:form_id] %>')" class="btn uncheck">Odznačit vše</a>-->
|
18
|
+
<!--</div>-->
|
22
19
|
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
<span title="Počet označených řádků na všech stránkách" id="<%= settings[:form_id]+ "_active_checkboxes_count" %>">
|
21
|
+
<%= !settings[:params]["checkbox_pool"].blank? ? settings[:params]["checkbox_pool"].split(",").count : 0 %>
|
22
|
+
</span>
|
23
|
+
<br/>
|
24
|
+
<input type="checkbox" title="Označit/odznačit vše na stránce" onclick="CheckboxPool.check_or_uncheck_page(this, '<%= settings[:form_id] %>')" id=""/>
|
25
|
+
|
26
|
+
<!--<div class="checkboxes_menu">-->
|
27
|
+
<!--<a onclick="CheckboxPool.uncheck_page('<%#= settings[:form_id] %>')" class="btn">Odznačit vše</a>-->
|
28
|
+
<!--<a onclick="CheckboxPool.check_page('<%#= settings[:form_id] %>')" class="btn">Označit vše</a>-->
|
29
|
+
<!--</div>-->
|
27
30
|
|
28
31
|
|
29
32
|
</th>
|
@@ -37,66 +40,85 @@
|
|
37
40
|
<% order_desc_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "___desc") %>
|
38
41
|
<th class="<%= col[:class] %>">
|
39
42
|
<div class="th_label">
|
40
|
-
<
|
43
|
+
<strong>
|
44
|
+
<span><%= col[:label].html_safe %></span>
|
45
|
+
</strong>
|
41
46
|
</div>
|
42
47
|
|
43
|
-
<div class="
|
44
|
-
<span class="sortButtons az">
|
48
|
+
<div class="sortable clearfix">
|
45
49
|
<% if col[:column_method].blank? && col[:row_method].blank? && !col[:name].blank? %>
|
50
|
+
<a href="#"
|
51
|
+
onclick="TableSorting.change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'asc', this); return false;"
|
52
|
+
ondblclick="TableSorting.force_change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'asc', this); return false;"
|
53
|
+
title="Seřadit od nejnižší hodnoty"
|
54
|
+
class="btn first sort_button <%= (order_by_arr.include?(col[:table] + "." + col[:name] + " asc")) ? "btn-success" : "" %>"
|
55
|
+
id="<%= order_asc_id %>">
|
56
|
+
<i class="icon-arrow-up"></i>
|
57
|
+
</a>
|
46
58
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
title="Seřadit sestupně"
|
56
|
-
class="icon-arrow-down sort_button sort-down <%= (order_by_arr.include?(col[:table] + "." + col[:name] + " desc")) ? "active" : "inactive" %>"
|
57
|
-
id="<%= order_desc_id %>">
|
58
|
-
<span class="oos "></span></span>
|
59
|
+
<a href="#"
|
60
|
+
onclick="TableSorting.change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'desc', this); return false;"
|
61
|
+
ondblclick="TableSorting.force_change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'desc', this); return false;"
|
62
|
+
title="Seřadit od nejvyšší hodnoty"
|
63
|
+
class="btn sort_button <%= (order_by_arr.include?(col[:table] + "." + col[:name] + " desc")) ? "btn-success" : "" %>"
|
64
|
+
id="<%= order_desc_id %>">
|
65
|
+
<i class="icon-arrow-down"></i>
|
66
|
+
</a>
|
59
67
|
<% end %>
|
60
|
-
|
68
|
+
</div>
|
69
|
+
<script type="text/javascript">
|
70
|
+
<%= (order_by_arr.include?(col[:table] + "." + col[:name] + " asc")) ? "btn-success" : "" %>
|
71
|
+
</script>
|
72
|
+
|
73
|
+
|
74
|
+
<% case col[:filter] %>
|
61
75
|
<% when :find %>
|
76
|
+
<div class="inputs clearfix">
|
62
77
|
<% saved_param = (!settings[:params].blank? && !settings[:params]['find'].blank? && !settings[:params]['find']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['find']["#{col[:table]}.#{col[:name]}"] : "" %>
|
63
|
-
|
64
|
-
|
65
|
-
|
78
|
+
<%= text_field_tag "find[#{col[:table]}.#{col[:name]}]", saved_param,
|
79
|
+
{:class => "text first #{settings[:form_id] + '_column_find'}"} %>
|
80
|
+
</div>
|
66
81
|
<% when :multichoice %>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<% 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]}"] : "" %>
|
79
|
-
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
80
|
-
<%= text_field_tag "number_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "input-small input-mini #{settings[:form_id] + '_column_find'}",
|
81
|
-
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
82
|
-
:title => "Menší nebo rovno"} %>
|
83
|
-
<span></span>
|
84
|
-
<% when :date %>
|
85
|
-
<% 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]}"] : "" %>
|
86
|
-
<%#= label_tag "date_from[#{col[:table]}.#{col[:name]}]", "Od", :class => "datetime_class_label" %>
|
87
|
-
<%= text_field_tag "date_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "datetime_class input-small",
|
82
|
+
<div class="inputs clearfix">
|
83
|
+
<% saved_param = (!settings[:params].blank? && !settings[:params]['multichoice'].blank? && !settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"] : [] %>
|
84
|
+
<%= select_tag("multichoice[#{col[:table]}.#{col[:name]}]", options_for_select(col[:filter_data], saved_param),
|
85
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
86
|
+
:multiple => true,
|
87
|
+
:class => "multiselect_class") %>
|
88
|
+
</div>
|
89
|
+
<% when :number %>
|
90
|
+
<% 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]}"] : "" %>
|
91
|
+
|
92
|
+
<%= text_field_tag "number_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text first #{settings[:form_id] + '_column_find'}",
|
88
93
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
89
|
-
:
|
90
|
-
|
91
|
-
|
92
|
-
|
94
|
+
:placeholder => "min.",
|
95
|
+
:title => "Hodnota musí být vetší nebo rovna zadané hodnotě"} %>
|
96
|
+
<% 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]}"] : "" %>
|
97
|
+
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
98
|
+
<%= text_field_tag "number_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text #{settings[:form_id] + '_column_find'}",
|
93
99
|
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
94
|
-
:
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
+
:placeholder => "max.",
|
101
|
+
:title => "Hodnota musí být menší nebo rovna zadané hodnotě"} %>
|
102
|
+
<span></span>
|
103
|
+
<% when :date %>
|
104
|
+
<div class="inputs range clearfix">
|
105
|
+
<% 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]}"] : "" %>
|
106
|
+
<%#= label_tag "date_from[#{col[:table]}.#{col[:name]}]", "Od", :class => "datetime_class_label" %>
|
107
|
+
<%= text_field_tag "date_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text datetime_class first",
|
108
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
109
|
+
:placeholder => "od",
|
110
|
+
:title => "Datum od"} %>
|
111
|
+
<% 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]}"] : "" %>
|
112
|
+
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
|
113
|
+
<%= text_field_tag "date_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "text datetime_class",
|
114
|
+
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
|
115
|
+
:placeholder => "do",
|
116
|
+
:title => "Datum do"} %>
|
117
|
+
</div>
|
118
|
+
<% else %>
|
119
|
+
<% end %>
|
120
|
+
|
121
|
+
|
100
122
|
</th>
|
101
123
|
<% end %>
|
102
124
|
</tr>
|
@@ -108,11 +130,11 @@
|
|
108
130
|
<% end %>
|
109
131
|
</tbody>
|
110
132
|
<tfoot>
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
133
|
+
<!--<tr>-->
|
134
|
+
<!--<th colspan="100" class="<%= settings[:form_id] + '_ajax_pager' %>">-->
|
135
|
+
<!--<%#= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %>-->
|
136
|
+
<!--</th>-->
|
137
|
+
<!--</tr>-->
|
116
138
|
</tfoot>
|
117
139
|
</table>
|
118
140
|
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "it-logica-application-backbone"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.19"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ladas"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-05"
|
13
13
|
s.description = "longer description of your gem"
|
14
14
|
s.email = "ladislav.smola@it-logica.cz"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -441,6 +441,7 @@ Gem::Specification.new do |s|
|
|
441
441
|
"app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/validate.js",
|
442
442
|
"app/assets/javascripts/backbone_js/tmpl.min.js",
|
443
443
|
"app/assets/stylesheets/backbone_css/bootstrap_and_overrides.css.scss",
|
444
|
+
"app/assets/stylesheets/backbone_css/design.css",
|
444
445
|
"app/assets/stylesheets/backbone_css/index.css.scss",
|
445
446
|
"app/assets/stylesheets/backbone_css/jquery.fileupload-ui.css",
|
446
447
|
"app/assets/stylesheets/backbone_css/jquery_datetime_picker.css.scss",
|
@@ -13,8 +13,13 @@ module ModelMixins
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
+
if params[:per_page].blank?
|
17
|
+
#default per page from Class variable set in initializer
|
18
|
+
params[:per_page] = ModelMixins::TableBuilderClassMethods::PER_PAGE if defined?(ModelMixins::TableBuilderClassMethods::PER_PAGE)
|
16
19
|
|
17
|
-
|
20
|
+
#or with higher priority from table definition
|
21
|
+
params[:per_page] = settings[:default][:per_page] if params[:per_page].blank? && !settings[:default][:per_page].blank?
|
22
|
+
end
|
18
23
|
params[:per_page] = per_page if params[:per_page].blank?
|
19
24
|
per_page = params[:per_page]
|
20
25
|
|
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.0.
|
4
|
+
version: 1.0.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: htmlentities
|
16
|
-
requirement: &
|
16
|
+
requirement: &72780970 !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: *72780970
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &72780680 !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: *72780680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rdoc
|
38
|
-
requirement: &
|
38
|
+
requirement: &72780350 !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: *72780350
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &72780020 !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: *72780020
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &72779760 !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: *72779760
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
|
-
requirement: &
|
71
|
+
requirement: &72779430 !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: *72779430
|
80
80
|
description: longer description of your gem
|
81
81
|
email: ladislav.smola@it-logica.cz
|
82
82
|
executables: []
|
@@ -509,6 +509,7 @@ files:
|
|
509
509
|
- app/assets/javascripts/backbone_js/tinymce/jscripts/tiny_mce/utils/validate.js
|
510
510
|
- app/assets/javascripts/backbone_js/tmpl.min.js
|
511
511
|
- app/assets/stylesheets/backbone_css/bootstrap_and_overrides.css.scss
|
512
|
+
- app/assets/stylesheets/backbone_css/design.css
|
512
513
|
- app/assets/stylesheets/backbone_css/index.css.scss
|
513
514
|
- app/assets/stylesheets/backbone_css/jquery.fileupload-ui.css
|
514
515
|
- app/assets/stylesheets/backbone_css/jquery_datetime_picker.css.scss
|
@@ -574,7 +575,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
574
575
|
version: '0'
|
575
576
|
segments:
|
576
577
|
- 0
|
577
|
-
hash:
|
578
|
+
hash: 533650739
|
578
579
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
579
580
|
none: false
|
580
581
|
requirements:
|