Commit d2fa065faf0e482c49bd4edfddb4ef6f380fa769

Authored by Julien Verneuil
1 parent 0f60e502

include minified version of "datetimepicker.js" and remove the non minified version

call to "CalexiumToolBox.jq_tab_activate" if it exist whenever a jquery ui tab is activated
add scrollx parameter to jquery_datatable call
change initialization call from dataTable to DataTable (non-deprecated version)
web/jQuery/CXM_jquery_datatable.anubis
... ... @@ -67,7 +67,7 @@ public define HTML_Partial_Content
67 67 )
68 68 =
69 69 partial_content(jquery_datatables_1_10_init +
70   - [ js_inline(jquery_ready("$('#"+table_id+"').dataTable();")) ],
  70 + [ js_inline(jquery_ready("$('#"+table_id+"').DataTable();")) ],
71 71 table
72 72 )
73 73 .
... ... @@ -82,7 +82,7 @@ public define HTML_Partial_Content
82 82 =
83 83 if enable_jqueryui then
84 84 partial_content( jquery_datatables_1_10_init +
85   - [ js_inline(jquery_ready("$('#"+table_id+"').dataTable({\"jQueryUI\":true});")) ],
  85 + [ js_inline(jquery_ready("$('#"+table_id+"').DataTable({\"jQueryUI\":true});")) ],
86 86 table
87 87 )
88 88 else
... ... @@ -98,6 +98,7 @@ public define HTML_Partial_Content
98 98 Bool enable_jqueryui,
99 99 Bool enable_pagination,
100 100 JQuery_datatable_pagination_type pagination_type,
  101 + Bool scrollX,
101 102 JQuery_datatable_scrollY_type scrollY,
102 103 Bool enable_change_page_length, // if true, "enable_pagination" must be true too.
103 104 Bool enable_search_field,
... ... @@ -111,14 +112,14 @@ public define HTML_Partial_Content
111 112 [
112 113 js_inline(jquery_ready("
113 114 $.fn.dataTable.ext.legacy.ajax = true;
114   - $('#"+table_id+"').dataTable(
  115 + $('#"+table_id+"').DataTable(
115 116 {
116 117 \"jQueryUI\":"+to_String(enable_jqueryui)+",
117 118 \"pagingType\":'"+jquery_datatable_pagination_type_to_string(pagination_type)+"',
118 119 \"searching\":"+to_String(enable_search_field)+",
119 120 \"paging\":"+to_String(enable_pagination)+","+
120 121 // responsive: true,"+
121   -
  122 + "\"scrollX\": " + to_String(scrollX) + ","+
122 123 if scrollY is
123 124 {
124 125 no_scroll then "",
... ... @@ -152,7 +153,7 @@ public define HTML_Partial_Content
152 153 Bool enable_columns_sorting,
153 154 String web_dir
154 155 ) =
155   - jquery_datatable(table_id, partial_content(table), enable_jqueryui, enable_pagination, pagination_type, scrollY, enable_change_page_length, enable_search_field, enable_columns_sorting, "en", no_extra, web_dir).
  156 + jquery_datatable(table_id, partial_content(table), enable_jqueryui, enable_pagination, pagination_type, false, scrollY, enable_change_page_length, enable_search_field, enable_columns_sorting, "en", no_extra, web_dir).
156 157  
157 158 public define HTML_Partial_Content
158 159 jquery_datatable
... ... @@ -168,4 +169,4 @@ public define HTML_Partial_Content
168 169 Bool enable_columns_sorting,
169 170 String web_dir
170 171 ) =
171   - jquery_datatable(table_id, table, enable_jqueryui, enable_pagination, pagination_type, scrollY, enable_change_page_length, enable_search_field, enable_columns_sorting, "en", no_extra, web_dir).
  172 + jquery_datatable(table_id, table, enable_jqueryui, enable_pagination, pagination_type, false, scrollY, enable_change_page_length, enable_search_field, enable_columns_sorting, "en", no_extra, web_dir).
... ...
web/jQuery/CXM_jquery_tabs.anubis
... ... @@ -93,13 +93,15 @@ public define HTML_Partial_Content
93 93 ui.newPanel.find('input[name=jq_tabs_" + tabs_container_id + "]').each(function () {
94 94 $(this).attr('value', ui.newTab.index());
95 95 });
  96 +
  97 + if (typeof CalexiumToolBox !== 'undefined' && typeof CalexiumToolBox.jq_tab_activate !== 'undefined') {
  98 + CalexiumToolBox.jq_tab_activate(event, ui);
  99 + }
96 100 },
97 101 create: function( event, ui ) {
98 102 $('#"+tabs_container_id+"').find('form').prepend('<input type=\"hidden\" name=\"jq_tabs_" + tabs_container_id + "\" value=\"'+ui.tab.index()+'\">');
99 103 }
100 104 });
101   -
102   -
103 105 "))
104 106 .
105 107 tags
... ...
web/jQuery/ui-addon/datetimepicker.anubis
... ... @@ -34,7 +34,7 @@ public define List(HTML_Head_Tag)
34 34 =
35 35 [
36 36 css(css_file("js/jquery/plug-in/datetimepicker/datetimepicker.css")),
37   - js(js_file("js/jquery/plug-in/datetimepicker/datetimepicker.js")),
  37 + js(js_file("js/jquery/plug-in/datetimepicker/datetimepicker.min.js")),
38 38 js_inline(jquery_ready("// Datetimepicker\n
39 39 $('.datepicker').datetimepicker({lang:'"+lang+"',timepicker:false,format:'d/m/Y'});
40 40 $('.datetimepicker').datetimepicker({lang:'"+lang+"',format:'Y-m-d H:i'});
... ...