Commit 56b2af634185c4f05fc25ab721063179116769f5
1 parent
59451adf
not table for inputs in dialog
Showing
1 changed file
with
37 additions
and
39 deletions
Show diff stats
calexium_lib/web/CXM_dojo.anubis
| ... | ... | @@ -111,7 +111,7 @@ public define HTML_Off_Form |
| 111 | 111 | literal("</select>") |
| 112 | 112 | ]). |
| 113 | 113 | |
| 114 | -define HTML_Row(HTML_Off_Form) | |
| 114 | +define HTML_Off_Form | |
| 115 | 115 | input_in_dialog |
| 116 | 116 | ( |
| 117 | 117 | InputDial input_data |
| ... | ... | @@ -119,8 +119,8 @@ define HTML_Row(HTML_Off_Form) |
| 119 | 119 | if input_data is |
| 120 | 120 | { |
| 121 | 121 | input_dial(id, input, label) then |
| 122 | - row([], [cell([], sequence([ | |
| 123 | - literal("<label for=\"" + id + "\"> " + label + "</label>"), | |
| 122 | + sequence([ | |
| 123 | + literal("<div id=\"" + id +"_block\"><label for=\"" + id + "\"> " + label + "</label>"), | |
| 124 | 124 | literal("<input dojoType=dijit.form.TextBox " + |
| 125 | 125 | if input is |
| 126 | 126 | { |
| ... | ... | @@ -128,23 +128,26 @@ define HTML_Row(HTML_Off_Form) |
| 128 | 128 | text then "type=\"text\"", |
| 129 | 129 | password then "type=\"password\"" |
| 130 | 130 | } + |
| 131 | - " name=\""+id+"\" id=\""+id+"\" />") | |
| 132 | - ]))]), | |
| 131 | + " name=\""+id+"\" id=\""+id+"\" /></div>") | |
| 132 | + ]), | |
| 133 | 133 | input_date(id, label) then |
| 134 | - row([], [cell([], sequence([ | |
| 135 | - literal("<label for=\"" + id + "\"> " + label + "</label>"), | |
| 136 | - literal("<div id=\""+id+"\" type=\"text\" name=\"date1\" | |
| 137 | - dojoType=\"dijit.form.DateTextBox\"> | |
| 138 | - </div>" | |
| 139 | - ) | |
| 140 | - ]))]), | |
| 141 | - input_combo(label, id, name, list_data) then | |
| 142 | - row([], [cell([], sequence([ | |
| 143 | - dojo_combobox(name, id, label, list_data)]))]) | |
| 134 | + sequence([ | |
| 135 | + literal("<div id=\"" + id +"_block\"><label for=\"" + id + "\"> " + label + "</label>"), | |
| 136 | + literal("<div id=\""+id+"\" type=\"text\" name=\"date1\" | |
| 137 | + dojoType=\"dijit.form.DateTextBox\"> | |
| 138 | + </div></div>" | |
| 139 | + ) | |
| 140 | + ]), | |
| 141 | + input_combo(label, the_id, name, list_data) then | |
| 142 | + sequence([ | |
| 143 | + literal("<div id=\"" + the_id.id +"_block\">"), | |
| 144 | + dojo_combobox(name, the_id, label, list_data), | |
| 145 | + literal("</div>") | |
| 146 | + ]) | |
| 144 | 147 | } |
| 145 | 148 | . |
| 146 | 149 | |
| 147 | -define List(HTML_Row(HTML_Off_Form)) | |
| 150 | +define List(HTML_Off_Form) | |
| 148 | 151 | inputs_in_dialog |
| 149 | 152 | ( |
| 150 | 153 | List(InputDial) inputs_data |
| ... | ... | @@ -167,30 +170,25 @@ public define HTML_Off_Form |
| 167 | 170 | Maybe(String) do_cancel |
| 168 | 171 | ) |
| 169 | 172 | = |
| 170 | - sequence[ | |
| 173 | + sequence([ | |
| 171 | 174 | div([attr("dojoType", "dijit.Dialog"), id(dialog_id), title(name), attr("execute", execute)], |
| 172 | - table([], | |
| 173 | - empty, | |
| 174 | - append( | |
| 175 | - inputs_in_dialog(inputs_data), | |
| 176 | - [ | |
| 177 | - row([], [cell([columns(2), h_center], | |
| 178 | - literal("<button dojoType=dijit.form.Button type=\"submit\" class=\"dialog_ok\">" + ok_label + "</button>" + | |
| 179 | - if cancel is | |
| 180 | - { | |
| 181 | - failure then "", | |
| 182 | - success(cancel_label) then "<button dojoType=dijit.form.Button type=\"cancel\" class=\"dialog_cancel\" onclick=\"" + | |
| 183 | - if do_cancel is | |
| 184 | - { | |
| 185 | - failure then "dijit.byId('"+ dialog_id +"').hide()", | |
| 186 | - success(to_do_cancel) then to_do_cancel | |
| 187 | - }+ "\">" + cancel_label + "</button>" | |
| 188 | - } | |
| 189 | - ))]), | |
| 190 | - ]), | |
| 191 | - empty)), | |
| 192 | - literal("<br/>"), | |
| 193 | - ] | |
| 175 | + sequence([ | |
| 176 | + sequence(inputs_in_dialog(inputs_data)), | |
| 177 | + literal("<button dojoType=dijit.form.Button type=\"submit\" class=\"dialog_ok\">" + ok_label + "</button>" + | |
| 178 | + if cancel is | |
| 179 | + { | |
| 180 | + failure then "", | |
| 181 | + success(cancel_label) then "<button dojoType=dijit.form.Button type=\"cancel\" class=\"dialog_cancel\" onclick=\"" + | |
| 182 | + if do_cancel is | |
| 183 | + { | |
| 184 | + failure then "dijit.byId('"+ dialog_id +"').hide()", | |
| 185 | + success(to_do_cancel) then to_do_cancel | |
| 186 | + }+ "\">" + cancel_label + "</button>" | |
| 187 | + }), | |
| 188 | + literal("<br/>") | |
| 189 | + ]) | |
| 190 | + ) | |
| 191 | + ]) | |
| 194 | 192 | . |
| 195 | 193 | |
| 196 | 194 | public define HTML_Off_Form | ... | ... |