Commit 991a338fade2d6490beb10f79a93516cd95de562
1 parent
5268228e
update jq_button_confirm with JQuery_img_button as argument to use a JQuery_Actioner
Showing
1 changed file
with
6 additions
and
29 deletions
Show diff stats
web/jQuery/CXM_jquery_button.anubis
| ... | ... | @@ -294,11 +294,12 @@ public define HTML_Partial_Content |
| 294 | 294 | String dlg_text, |
| 295 | 295 | String dlg_ok, |
| 296 | 296 | String dlg_cancel, |
| 297 | - String url, | |
| 298 | - List((String, String)) extra_ops | |
| 297 | + JQuery_Actioner actioner | |
| 298 | + //String url, | |
| 299 | + //List((String, String)) extra_ops | |
| 299 | 300 | )= |
| 300 | 301 | since button is jquery_img_button(img_url, button_label, button_name, actioner, orientation), |
| 301 | - with uid = generate_random_string(20), | |
| 302 | + with uid = generate_random_string(10), | |
| 302 | 303 | |
| 303 | 304 | js_confirm_dialog_data_obj = "CalexiumToolBox.data.confirm_dialog[" + to_js_string(uid) + "]", |
| 304 | 305 | js_data = js_confirm_dialog_data_obj + " = { |
| ... | ... | @@ -308,37 +309,13 @@ public define HTML_Partial_Content |
| 308 | 309 | cancel: " + to_js_string(dlg_cancel) + "};", |
| 309 | 310 | |
| 310 | 311 | button_name = uid, |
| 311 | - actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_js_string("/?a=" + url + format_extra_operands(extra_ops))+");"), | |
| 312 | + actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_js_string(jquery_button_get_onclick_action(actioner)) +");"), | |
| 312 | 313 | |
| 313 | 314 | partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ |
| 314 | 315 | partial(jquery_button(jquery_img_button(img_url, button_label, button_name, actioner, orientation))) |
| 315 | - ])). | |
| 316 | - | |
| 317 | -public define HTML_Partial_Content | |
| 318 | - jq_button_confirm | |
| 319 | - ( | |
| 320 | - String button_label, | |
| 321 | - String dlg_title, | |
| 322 | - String dlg_text, | |
| 323 | - String dlg_ok, | |
| 324 | - String dlg_cancel, | |
| 325 | - String url | |
| 326 | - )= | |
| 327 | - jq_button_confirm(button_label, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []). | |
| 316 | + ])). | |
| 328 | 317 | |
| 329 | 318 | public define HTML_Partial_Content |
| 330 | - jq_button_confirm | |
| 331 | - ( | |
| 332 | - JQuery_img_button button, | |
| 333 | - String dlg_title, | |
| 334 | - String dlg_text, | |
| 335 | - String dlg_ok, | |
| 336 | - String dlg_cancel, | |
| 337 | - String url | |
| 338 | - )= | |
| 339 | - jq_button_confirm(button, dlg_title, dlg_text, dlg_ok, dlg_cancel, url, []). | |
| 340 | - | |
| 341 | -public define HTML_Partial_Content | |
| 342 | 319 | img_submit_button |
| 343 | 320 | ( |
| 344 | 321 | String label, //translated label of the button | ... | ... |