Commit 89100c1c4bb4f6cb114aada71dd23df33bb83b46
1 parent
bb62e2a6
button cancel added in dojo dialog
Showing
1 changed file
with
21 additions
and
12 deletions
Show diff stats
calexium_lib/web/CXM_dojo.anubis
| ... | ... | @@ -70,11 +70,12 @@ public define HTML_Off_Form |
| 70 | 70 | public define HTML_Off_Form |
| 71 | 71 | dijit_dialog |
| 72 | 72 | ( |
| 73 | - String name, | |
| 74 | - String dialog_id, | |
| 75 | - String execute, | |
| 76 | - Bool file, | |
| 77 | - String ok_label | |
| 73 | + String name, | |
| 74 | + String dialog_id, | |
| 75 | + String execute, | |
| 76 | + Bool file, | |
| 77 | + String ok_label, | |
| 78 | + Maybe(String) cancel, | |
| 78 | 79 | ) |
| 79 | 80 | = |
| 80 | 81 | sequence[ |
| ... | ... | @@ -90,7 +91,14 @@ public define HTML_Off_Form |
| 90 | 91 | + " name=\"name\" id=\"name_"+dialog_id+"\" />") |
| 91 | 92 | |
| 92 | 93 | )]), |
| 93 | - row([], [cell([columns(2), h_center], literal("<button dojoType=dijit.form.Button type=\"submit\">" + ok_label + "</button>"))]), | |
| 94 | + row([], [cell([columns(2), h_center], | |
| 95 | + literal("<button dojoType=dijit.form.Button type=\"submit\" class=\"dialog_ok\">" + ok_label + "</button>" + | |
| 96 | + if cancel is | |
| 97 | + { | |
| 98 | + failure then "", | |
| 99 | + success(cancel_label) then "<button dojoType=dijit.form.Button type=\"cancel\" class=\"dialog_cancel\" onclick=\"dijit.byId('"+ dialog_id +"').hide()\">" + cancel_label + "</button>" | |
| 100 | + } | |
| 101 | + ))]), | |
| 94 | 102 | ], |
| 95 | 103 | empty)), |
| 96 | 104 | literal("<br/>"), |
| ... | ... | @@ -100,16 +108,17 @@ public define HTML_Off_Form |
| 100 | 108 | public define HTML_Off_Form |
| 101 | 109 | dojo_dialog |
| 102 | 110 | ( |
| 103 | - String name, | |
| 104 | - String dialog_id, | |
| 105 | - String execute, | |
| 106 | - Bool file, | |
| 107 | - String ok_label | |
| 111 | + String name, | |
| 112 | + String dialog_id, | |
| 113 | + String execute, | |
| 114 | + Bool file, | |
| 115 | + String ok_label, | |
| 116 | + Maybe(String) cancel | |
| 108 | 117 | ) |
| 109 | 118 | = |
| 110 | 119 | sequence[ |
| 111 | 120 | dojo_button(name,"dijit.byId('"+dialog_id+"').show()", dialog_id + "_button"), |
| 112 | - dijit_dialog(name, dialog_id, execute, file, ok_label) | |
| 121 | + dijit_dialog(name, dialog_id, execute, file, ok_label, cancel) | |
| 113 | 122 | ] |
| 114 | 123 | . |
| 115 | 124 | ... | ... |