From 5de6c7c628c1f99f5b1e82b610d168c5f4299fab Mon Sep 17 00:00:00 2001 From: yekolia Date: Tue, 18 Sep 2012 14:41:13 +0000 Subject: [PATCH] New: - Adding support for jQuery tipTip plugin : it's a tooltip plugin. --- web/CXM_jquery_datatable.anubis | 2 +- web/CXM_jquery_tiptip.anubis | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 web/CXM_jquery_tiptip.anubis diff --git a/web/CXM_jquery_datatable.anubis b/web/CXM_jquery_datatable.anubis index 9e870e0..f542a02 100644 --- a/web/CXM_jquery_datatable.anubis +++ b/web/CXM_jquery_datatable.anubis @@ -15,7 +15,7 @@ read tools/basis.anubis read system/string.anubis read system/convert.anubis -/* Initialize jQuery in compatiblity mode with jQueryUI */ +/* Initialize jQuery datatables */ public define List(HTML_Head_Tag) jquery_datatables_init ( diff --git a/web/CXM_jquery_tiptip.anubis b/web/CXM_jquery_tiptip.anubis new file mode 100644 index 0000000..27208d1 --- /dev/null +++ b/web/CXM_jquery_tiptip.anubis @@ -0,0 +1,71 @@ +/* + * Created by PyramIDE. + * User: Jeremy + * Date: 18/09/2012 + * Time: 15:42 + * + * 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 +read system/convert.anubis + +/* Initialize jQuery tipTip */ +public define List(HTML_Head_Tag) + jquery_tiptip_init + ( + String web_dir, + ) + = + [ + css(css_file("/css/jquery/tipTip.css")), + js(js_file("/js/jquery/jquery.tipTip.minified.js")) + ] + . + + +/* Create a tipTip tooltip with a HTML_Partial_Content */ +public define HTML_Partial_Content + jquery_tiptip + ( + String rollovered_id, // id of the element on which toolip will be displayed => IT MUST BE UNIQUE !!!! + String tooltip_id, // id used to make a container around tooltip content => Uniqueness of the container's id is made with the addition of a timestamp as a suffix + HTML_Partial_Content tooltip_partial_content + ) + = + if tooltip_partial_content is partial_content(head, body) then + partial_content( + [ + js_inline(script("", " + $(document).ready(function() + { + var tooltip_"+now+"=$('#"+tooltip_id+"-"+now+"').html(); + $('#"+rollovered_id+"').tipTip({maxWidth: 'auto', edgeOffset: 10, content: tooltip_"+now+"}); + }); + ")) + . + head + ], + sequence([ + literal("
"), + body, + literal("
") + ]) + ) + . + +/* Create a tipTip tooltip with a HTML_Off_Form */ +public define HTML_Partial_Content + jquery_tiptip + ( + String rollovered_id, // id of the element on which toolip will be displayed => IT MUST BE UNIQUE !!!! + String tooltip_id, // id used to make a container around tooltip content => Uniqueness of the container's id is made with the addition of a timestamp as a suffix + HTML_Off_Form html_content + ) + = + jquery_tiptip(rollovered_id, tooltip_id, partial_content([], html_content)) + . + -- libgit2 0.21.4