From c288c58a1cf5ecc26864c360013f8ae3b32d0ec3 Mon Sep 17 00:00:00 2001 From: yekolia Date: Wed, 12 Sep 2012 14:38:14 +0000 Subject: [PATCH] New: - Basic support of datatables. --- web/CXM_jquery_datatable.anubis | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+), 0 deletions(-) create mode 100644 web/CXM_jquery_datatable.anubis diff --git a/web/CXM_jquery_datatable.anubis b/web/CXM_jquery_datatable.anubis new file mode 100644 index 0000000..f8b7b2f --- /dev/null +++ b/web/CXM_jquery_datatable.anubis @@ -0,0 +1,41 @@ +/* + * Created by PyramIDE. + * User: Jeremy + * Date: 12/09/2012 + * Time: 16:14 + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ + +read calexium_lib/web/CXM_making_a_web_site.anubis +read calexium_lib/web/CXM_jquery.anubis +read tools/basis.anubis +read system/string.anubis + +/* Initialize jQuery in compatiblity mode with jQueryUI */ +public define List(HTML_Head_Tag) + jquery_datatables_init + ( + String web_dir, + ) + = + [ + css(css_file("/css/jquery/jquery.dataTables.css")), + css(css_file("/css/jquery/jquery.dataTables_themeroller.css")), + js(js_file("/js/jquery/jquery.dataTables.min.js")) + ] + . + + +public define HTML_Partial_Content + jquery_datatable + ( + String table_id, + HTML_Off_Form table + ) + = + partial_content( + [ js_inline(script("", "$(document).ready(function(){$('#"+table_id+"').dataTable();});")) ], + table + ) + . -- libgit2 0.21.4