Commit 7c4826f5384c80e4645396c8ab1c959bcaeb2dc8
1 parent
2d88dd67
a cancel function may be in parameters of a dialog
Showing
1 changed file
with
11 additions
and
4 deletions
Show diff stats
calexium_lib/web/CXM_dojo.anubis
| ... | ... | @@ -105,7 +105,8 @@ public define HTML_Off_Form |
| 105 | 105 | String execute, |
| 106 | 106 | String ok_label, |
| 107 | 107 | Maybe(String) cancel, |
| 108 | - List(InputDial) inputs_data | |
| 108 | + List(InputDial) inputs_data, | |
| 109 | + Maybe(String) do_cancel | |
| 109 | 110 | ) |
| 110 | 111 | = |
| 111 | 112 | sequence[ |
| ... | ... | @@ -120,7 +121,12 @@ public define HTML_Off_Form |
| 120 | 121 | if cancel is |
| 121 | 122 | { |
| 122 | 123 | failure then "", |
| 123 | - success(cancel_label) then "<button dojoType=dijit.form.Button type=\"cancel\" class=\"dialog_cancel\" onclick=\"dijit.byId('"+ dialog_id +"').hide()\">" + cancel_label + "</button>" | |
| 124 | + success(cancel_label) then "<button dojoType=dijit.form.Button type=\"cancel\" class=\"dialog_cancel\" onclick=\"" + | |
| 125 | + if do_cancel is | |
| 126 | + { | |
| 127 | + failure then "dijit.byId('"+ dialog_id +"').hide()", | |
| 128 | + success(to_do_cancel) then to_do_cancel | |
| 129 | + }+ "\">" + cancel_label + "</button>" | |
| 124 | 130 | } |
| 125 | 131 | ))]), |
| 126 | 132 | ]), |
| ... | ... | @@ -137,12 +143,13 @@ public define HTML_Off_Form |
| 137 | 143 | String execute, |
| 138 | 144 | String ok_label, |
| 139 | 145 | Maybe(String) cancel, |
| 140 | - List(InputDial) inputs_data | |
| 146 | + List(InputDial) inputs_data, | |
| 147 | + Maybe(String) do_cancel | |
| 141 | 148 | ) |
| 142 | 149 | = |
| 143 | 150 | sequence[ |
| 144 | 151 | dojo_button(name,"dijit.byId('"+dialog_id+"').show()", dialog_id + "_button"), |
| 145 | - dijit_dialog(name, dialog_id, execute, ok_label, cancel, inputs_data) | |
| 152 | + dijit_dialog(name, dialog_id, execute, ok_label, cancel, inputs_data, do_cancel) | |
| 146 | 153 | ] |
| 147 | 154 | . |
| 148 | 155 | ... | ... |