Commit 5ba7d13c83993e743aa0a4cbe90f0c38f38527fa

Authored by David RENÉ
1 parent bedfeb30

just some cleanup

web/jQuery/CXM_jquery_button.anubis
... ... @@ -35,8 +35,14 @@ public define String
35 35 }.
36 36  
37 37 public type JQuery_button:
38   - jQuery_button( JQuery_button_type bt_type,
39   - 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
  38 + jQuery_button(
  39 + JQuery_button_type bt_type,
  40 + String button_id,
  41 + String button_name,
  42 + String button_label,
  43 + JQuery_Actioner actioner,
  44 + JQuery_icon primary,
  45 + 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
40 46 )
41 47 .
42 48  
... ... @@ -78,14 +84,14 @@ define HTML_Partial_Content
78 84 sequence(reverse(html_buttons))
79 85 ),
80 86 [ h . t ] then
81   - if h is jQuery_button(bt_type, id, name, label, actioner, primary, secondary) then
82   - with onclick_action=jquery_button_get_onclick_action(id, actioner),
83   - if id = "" then // if the ID is not set => we can't use icons in the buttonset.
  87 + if h is jQuery_button(bt_type, html_id, name, label, actioner, primary, secondary) then
  88 + with onclick_action=jquery_button_get_onclick_action(html_id, actioner),
  89 + if html_id = "" then // if the ID is not set => we can't use icons in the buttonset.
84 90 _jquery_buttons(
85 91 t,
86 92 [ onclick_action . html_tags ],
87 93 [
88   - literal("<button type=\""+to_String(bt_type)+"\" name=\""+name+"\">"+label+"</button>")
  94 + button([attr("type",to_String(bt_type)), attr("name",name)], text(label))
89 95 .
90 96 html_buttons
91 97 ]
... ... @@ -96,12 +102,12 @@ define HTML_Partial_Content
96 102 _jquery_buttons(
97 103 t,
98 104 [
99   - js_inline(jquery_ready("$('#"+id+"').button();")),
  105 + js_inline(jquery_ready("$('#"+html_id+"').button();")),
100 106 onclick_action
101 107 ]
102 108 +html_tags,
103 109 [
104   - literal("<button type=\""+to_String(bt_type)+"\" id=\""+id+"\" name=\""+name+"\">"+label+"</button>")
  110 + button([attr("type",to_String(bt_type)), id(html_id), attr("name",name)], text(label))
105 111 .
106 112 html_buttons
107 113 ]
... ... @@ -110,12 +116,12 @@ define HTML_Partial_Content
110 116 _jquery_buttons(
111 117 t,
112 118 [
113   - js_inline(jquery_ready("$('#"+id+"').button({icons:{secondary:'"+jquery_icon_to_string(secondary)+"'}});")),
  119 + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{secondary:'"+jquery_icon_to_string(secondary)+"'}});")),
114 120 onclick_action
115 121 ]
116 122 +html_tags,
117 123 [
118   - literal("<button id=\""+id+"\">"+label+"</button>")
  124 + literal("<button id=\""+html_id+"\">"+label+"</button>")
119 125 .
120 126 html_buttons
121 127 ]
... ... @@ -125,12 +131,12 @@ define HTML_Partial_Content
125 131 _jquery_buttons(
126 132 t,
127 133 [
128   - js_inline(jquery_ready("$('#"+id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"'}});")),
  134 + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"'}});")),
129 135 onclick_action
130 136 ]
131 137 +html_tags,
132 138 [
133   - literal("<button id=\""+id+"\">"+label+"</button>")
  139 + literal("<button id=\""+html_id+"\">"+label+"</button>")
134 140 .
135 141 html_buttons
136 142 ]
... ... @@ -139,12 +145,12 @@ define HTML_Partial_Content
139 145 _jquery_buttons(
140 146 t,
141 147 [
142   - js_inline(jquery_ready("$('#"+id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"',secondary:'"+jquery_icon_to_string(secondary)+"'}});")),
  148 + js_inline(jquery_ready("$('#"+html_id+"').button({icons:{primary:'"+jquery_icon_to_string(primary)+"',secondary:'"+jquery_icon_to_string(secondary)+"'}});")),
143 149 onclick_action
144 150 ]
145 151 +html_tags,
146 152 [
147   - literal("<button id=\""+id+"\">"+label+"</button>")
  153 + literal("<button id=\""+html_id+"\">"+label+"</button>")
148 154 .
149 155 html_buttons
150 156 ]
... ... @@ -161,11 +167,12 @@ public define HTML_Partial_Content
161 167 =
162 168 partial_content(
163 169 [ js_inline(jquery_ready("$('#"+buttons_container_id+"').buttonset();")) ],
164   - sequence([
165   - literal("<div id=\""+buttons_container_id+"\">"),
166   - partial(_jquery_buttons(buttons, [], [])),
167   - literal("</div>")
168   - ])
  170 + div(id(buttons_container_id), _jquery_buttons(buttons, [], []))
  171 +// sequence([
  172 +// literal("<div id=\""+buttons_container_id+"\">"),
  173 +// partial(_jquery_buttons(buttons, [], [])),
  174 +// literal("</div>")
  175 +// ])
169 176 )
170 177 .
171 178  
... ...
web/plugin/plugin.anubis
... ... @@ -72,9 +72,10 @@ public define Maybe(WEB_Plugin)
72 72 )=
73 73 if plugins is
74 74 {
75   - [] then failure,
  75 + [] then println("get_WEB_Plugin for app ["+_app+"] space ["+_space+"] NOT FOUND");failure,
76 76 [h . t] then
77 77 if h.app_name = _app & h.space_name = _space then
  78 + //println("get_WEB_Plugin for app ["+_app+"] space ["+_space+"] OK");
78 79 success(h)
79 80 else
80 81 get_WEB_Plugin(t, _app, _space)
... ...