From 5ba7d13c83993e743aa0a4cbe90f0c38f38527fa Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 17 Aug 2019 10:50:26 +0900 Subject: [PATCH] just some cleanup --- web/jQuery/CXM_jquery_button.anubis | 45 ++++++++++++++++++++++++++------------------- web/plugin/plugin.anubis | 3 ++- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/web/jQuery/CXM_jquery_button.anubis b/web/jQuery/CXM_jquery_button.anubis index e453d70..d5c751e 100644 --- a/web/jQuery/CXM_jquery_button.anubis +++ b/web/jQuery/CXM_jquery_button.anubis @@ -35,8 +35,14 @@ public define String }. public type JQuery_button: - jQuery_button( JQuery_button_type bt_type, - String button_id, String button_name, String button_label, JQuery_Actioner actioner, JQuery_icon primary, JQuery_icon secondary // primary icon is for left icon, secondary icon is for right icon and button_id must set with an unique ID in order to have icons working + jQuery_button( + JQuery_button_type bt_type, + String button_id, + String button_name, + String button_label, + JQuery_Actioner actioner, + JQuery_icon primary, + JQuery_icon secondary // primary icon is for left icon, secondary icon is for right icon and button_id must set with an unique ID in order to have icons working ) . @@ -78,14 +84,14 @@ define HTML_Partial_Content sequence(reverse(html_buttons)) ), [ h . t ] then - if h is jQuery_button(bt_type, id, name, label, actioner, primary, secondary) then - with onclick_action=jquery_button_get_onclick_action(id, actioner), - if id = "" then // if the ID is not set => we can't use icons in the buttonset. + if h is jQuery_button(bt_type, html_id, name, label, actioner, primary, secondary) then + with onclick_action=jquery_button_get_onclick_action(html_id, actioner), + if html_id = "" then // if the ID is not set => we can't use icons in the buttonset. _jquery_buttons( t, [ onclick_action . html_tags ], [ - literal("") + button([attr("type",to_String(bt_type)), attr("name",name)], text(label)) . html_buttons ] @@ -96,12 +102,12 @@ define HTML_Partial_Content _jquery_buttons( t, [ - js_inline(jquery_ready("$('#"+id+"').button();")), + js_inline(jquery_ready("$('#"+html_id+"').button();")), onclick_action ] +html_tags, [ - literal("") + button([attr("type",to_String(bt_type)), id(html_id), attr("name",name)], text(label)) . html_buttons ] @@ -110,12 +116,12 @@ define HTML_Partial_Content _jquery_buttons( t, [ - js_inline(jquery_ready("$('#"+id+"').button({icons:{secondary:'"+jquery_icon_to_string(secondary)+"'}});")), + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{secondary:'"+jquery_icon_to_string(secondary)+"'}});")), onclick_action ] +html_tags, [ - literal("") + literal("") . html_buttons ] @@ -125,12 +131,12 @@ define HTML_Partial_Content _jquery_buttons( t, [ - js_inline(jquery_ready("$('#"+id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"'}});")), + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"'}});")), onclick_action ] +html_tags, [ - literal("") + literal("") . html_buttons ] @@ -139,12 +145,12 @@ define HTML_Partial_Content _jquery_buttons( t, [ - js_inline(jquery_ready("$('#"+id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"',secondary:'"+jquery_icon_to_string(secondary)+"'}});")), + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"',secondary:'"+jquery_icon_to_string(secondary)+"'}});")), onclick_action ] +html_tags, [ - literal("") + literal("") . html_buttons ] @@ -161,11 +167,12 @@ public define HTML_Partial_Content = partial_content( [ js_inline(jquery_ready("$('#"+buttons_container_id+"').buttonset();")) ], - sequence([ - literal("
"), - partial(_jquery_buttons(buttons, [], [])), - literal("
") - ]) + div(id(buttons_container_id), _jquery_buttons(buttons, [], [])) +// sequence([ +// literal("
"), +// partial(_jquery_buttons(buttons, [], [])), +// literal("
") +// ]) ) . diff --git a/web/plugin/plugin.anubis b/web/plugin/plugin.anubis index 9dd0819..52067e0 100644 --- a/web/plugin/plugin.anubis +++ b/web/plugin/plugin.anubis @@ -72,9 +72,10 @@ public define Maybe(WEB_Plugin) )= if plugins is { - [] then failure, + [] then println("get_WEB_Plugin for app ["+_app+"] space ["+_space+"] NOT FOUND");failure, [h . t] then if h.app_name = _app & h.space_name = _space then + //println("get_WEB_Plugin for app ["+_app+"] space ["+_space+"] OK"); success(h) else get_WEB_Plugin(t, _app, _space) -- libgit2 0.21.4