From 24d72a4ddf4220a176dfa657c082c9d00ba14967 Mon Sep 17 00:00:00 2001 From: Verneuil Julien Date: Tue, 28 Apr 2015 01:28:50 +0200 Subject: [PATCH] added JQuerySelector type and function to format a jquery selector to string --- web/CXM_jquery.anubis | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 0 deletions(-) diff --git a/web/CXM_jquery.anubis b/web/CXM_jquery.anubis index 30df353..976a715 100644 --- a/web/CXM_jquery.anubis +++ b/web/CXM_jquery.anubis @@ -20,6 +20,28 @@ public type JQuery_Actioner_type: public type JQuery_Actioner: jQuery_actioner(Actioner_Target target, JQuery_Actioner_type type, String url_or_form_id_or_script). +/* jQuery Selector - http://api.jquery.com/category/selectors/ */ +public type JQuerySelector: + element(HtmlId id), + element_class(String name), + childs(HtmlId id). + +public define String + format_jquery_selector + ( + JQuerySelector selector + ) = + if selector is + { + element(html_id) then + if html_id is htmlId(id) then "'#" + id + "'", + + element_class(name) then + "'." + name + "'", + + childs(html_id) then + if html_id is htmlId(id) then "'#" + id + " > *'" + }. /* */ public define Script -- libgit2 0.21.4