Commit b08b5acc94fd01da5189c16f5c80d785a7a3b5b5

Authored by totoro
1 parent c2211587

Bump to JQuery 1.11.0 and JQueryUI 1.10.4

New - Add jquery_button with image
New - Add scrollY support for JQuery datatable
web/CXM_jquery.anubis
@@ -28,8 +28,8 @@ define List(HTML_Head_Tag) @@ -28,8 +28,8 @@ define List(HTML_Head_Tag)
28 jquery_defaults 28 jquery_defaults
29 = 29 =
30 [ 30 [
31 - js(js_file("/js/jquery/jquery-1.8.0.min.js")),  
32 - js(js_file("/js/jquery/jquery-ui-1.8.23.custom.min.js")), 31 + js(js_file("/js/jquery/jquery-1.11.0.min.js")),
  32 + js(js_file("/js/jquery/jquery-ui-1.10.4.custom.min.js")),
33 ]. 33 ].
34 34
35 /* Initialize jQuery in compatiblity mode with jQueryUI */ 35 /* Initialize jQuery in compatiblity mode with jQueryUI */
@@ -40,9 +40,9 @@ public define List(HTML_Head_Tag) @@ -40,9 +40,9 @@ public define List(HTML_Head_Tag)
40 String theme_name 40 String theme_name
41 ) 41 )
42 = 42 =
43 - if file_exists(web_dir+"/public/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css") then  
44 - [ css(css_file("/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] 43 + if file_exists(web_dir+"/public/css/jquery/"+theme_name+"/jquery-ui-1.10.4.custom.min.css") then
  44 + [ css(css_file("/css/jquery/"+theme_name+"/jquery-ui-1.10.4.custom.min.css")) . jquery_defaults ]
45 else 45 else
46 - println("Jquery Theme not found "+web_dir+"/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css");  
47 - [ css(css_file("/css/jquery/redmond/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] 46 + println("Jquery Theme not found "+web_dir+"/css/jquery/"+theme_name+"/jquery-ui-1.10.4.custom.min.css");
  47 + [ css(css_file("/css/jquery/redmond/jquery-ui-1.10.4.custom.min.css")) . jquery_defaults ]
48 . 48 .
web/jQuery/CXM_jquery_button.anubis
@@ -263,3 +263,25 @@ public define HTML_Partial_Content @@ -263,3 +263,25 @@ public define HTML_Partial_Content
263 literal("<button id=\""+id+"\">"+label+"</button>") 263 literal("<button id=\""+id+"\">"+label+"</button>")
264 ) 264 )
265 . 265 .
  266 +
  267 +public define HTML_Partial_Content
  268 + jquery_button
  269 + (
  270 + String img_url,
  271 + String label_text,
  272 + String action
  273 + )=
  274 + partial_content(
  275 + [
  276 + js_inline(script("","$(document).ready(function(){$('#jq_img_btn').button();});"))
  277 + ],
  278 + div([id("jq_img_btn")],
  279 + table([
  280 + row( cell( actioner(same,same, img_link(img_url, label_text), action, []))),
  281 + row( cell( actioner(same,same, link(label_text), action, [])))
  282 + ]
  283 + )
  284 + ))
  285 +
  286 + .
  287 +
web/jQuery/CXM_jquery_datatable.anubis
@@ -69,6 +69,7 @@ public define HTML_Partial_Content @@ -69,6 +69,7 @@ public define HTML_Partial_Content
69 Bool enable_jqueryui, 69 Bool enable_jqueryui,
70 Bool enable_pagination, 70 Bool enable_pagination,
71 JQuery_datatable_pagination_type pagination_type, 71 JQuery_datatable_pagination_type pagination_type,
  72 + JQuery_datatable_scrollY_type scrollY,
72 Bool enable_change_page_length, // if true, "enable_pagination" must be true too. 73 Bool enable_change_page_length, // if true, "enable_pagination" must be true too.
73 Bool enable_search_field, 74 Bool enable_search_field,
74 Bool enable_columns_sorting, 75 Bool enable_columns_sorting,
@@ -88,7 +89,13 @@ public define HTML_Partial_Content @@ -88,7 +89,13 @@ public define HTML_Partial_Content
88 \"bJQueryUI\":"+to_String(enable_jqueryui)+", 89 \"bJQueryUI\":"+to_String(enable_jqueryui)+",
89 \"sPaginationType\":'"+jquery_datatable_pagination_type_to_string(pagination_type)+"', 90 \"sPaginationType\":'"+jquery_datatable_pagination_type_to_string(pagination_type)+"',
90 \"bFilter\":"+to_String(enable_search_field)+", 91 \"bFilter\":"+to_String(enable_search_field)+",
91 - \"bPaginate\":"+to_String(enable_pagination)+", 92 + \"bPaginate\":"+to_String(enable_pagination)+","+
  93 + if scrollY is
  94 + {
  95 + no_scroll then "",
  96 + scrollY(size) then "\"sScrollY\": \""+size+"px\","
  97 + }+
  98 + "\"bStateSave\": true,
92 \"bLengthChange\":"+to_String(enable_change_page_length)+", 99 \"bLengthChange\":"+to_String(enable_change_page_length)+",
93 \"bSort\":"+to_String(enable_columns_sorting)+","+ 100 \"bSort\":"+to_String(enable_columns_sorting)+","+
94 get_datatable_translation(lang)+" 101 get_datatable_translation(lang)+"
@@ -110,8 +117,9 @@ public define HTML_Partial_Content @@ -110,8 +117,9 @@ public define HTML_Partial_Content
110 Bool enable_jqueryui, 117 Bool enable_jqueryui,
111 Bool enable_pagination, 118 Bool enable_pagination,
112 JQuery_datatable_pagination_type pagination_type, 119 JQuery_datatable_pagination_type pagination_type,
  120 + JQuery_datatable_scrollY_type scrollY,
113 Bool enable_change_page_length, // if true, "enable_pagination" must be true too. 121 Bool enable_change_page_length, // if true, "enable_pagination" must be true too.
114 Bool enable_search_field, 122 Bool enable_search_field,
115 Bool enable_columns_sorting 123 Bool enable_columns_sorting
116 ) = 124 ) =
117 - jquery_datatable(table_id, table, enable_jqueryui, enable_pagination, pagination_type, enable_change_page_length, enable_search_field, enable_columns_sorting, "en"). 125 + jquery_datatable(table_id, table, enable_jqueryui, enable_pagination, pagination_type, scrollY, enable_change_page_length, enable_search_field, enable_columns_sorting, "en").
web/jQuery/CXM_jquery_datatable_types.anubis
@@ -15,7 +15,10 @@ public type JQuery_datatable_pagination_type: @@ -15,7 +15,10 @@ public type JQuery_datatable_pagination_type:
15 jq_dt_pt_two_button, //default option 15 jq_dt_pt_two_button, //default option
16 jq_dt_pt_full_numbers 16 jq_dt_pt_full_numbers
17 . 17 .
18 - 18 +public type JQuery_datatable_scrollY_type:
  19 + no_scroll,
  20 + scrollY(Int size).
  21 +
19 public define String 22 public define String
20 jquery_datatable_pagination_type_to_string 23 jquery_datatable_pagination_type_to_string
21 ( 24 (