Commit 09877669a530d5fee0015e626f8726e3269392fb
1 parent
926298cb
dojo declaration
Showing
1 changed file
with
40 additions
and
11 deletions
Show diff stats
calexium_lib/web/CXM_dojo.anubis
| ... | ... | @@ -302,10 +302,12 @@ public define HTML_Off_Form |
| 302 | 302 | String the_title, |
| 303 | 303 | Bool live_splitter, |
| 304 | 304 | Bool persist, |
| 305 | + Bool closable, | |
| 306 | + String container, | |
| 305 | 307 | HTML_Off_Form content |
| 306 | 308 | ) = |
| 307 | - div([attr("dojoType", "dijit.layout.BorderContainer"), title(the_title), | |
| 308 | - attr("design", "sidebar"), attr("liveSplitters", live_splitter), attr("persist", persist) . attributes ], | |
| 309 | + div([attr("dojoType", "dijit.layout.BorderContainer"), title(the_title), attr("dojoAttachPoint", container), | |
| 310 | + attr("design", "sidebar"), attr("liveSplitters", live_splitter), attr("persist", persist), attr("closable",closable) . attributes ], | |
| 309 | 311 | content). |
| 310 | 312 | |
| 311 | 313 | |
| ... | ... | @@ -336,13 +338,40 @@ public define HTML_Off_Form |
| 336 | 338 | public define HTML_Off_Form |
| 337 | 339 | dojo_button |
| 338 | 340 | ( |
| 339 | - HtmlId html_id, | |
| 340 | - String name, | |
| 341 | - String iconclass, | |
| 342 | - String tip_msg, | |
| 343 | - String execute, | |
| 344 | - ) | |
| 345 | - = | |
| 341 | + HtmlId html_id, | |
| 342 | + String name, | |
| 343 | + String iconclass, | |
| 344 | + Maybe(String) tip_msg, | |
| 345 | + String execute, | |
| 346 | + )= | |
| 346 | 347 | literal(" |
| 347 | - <button dojoType=\"dijit.form.Button\" id=\"" + html_id.id + "\" iconClass=\"" + iconclass + "\" onclick=\"" + execute + "\">" + name + "</button> | |
| 348 | - <span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip_msg + "</span>"). | |
| 348 | + <button dojoType=\"dijit.form.Button\" id=\"" + html_id.id + "\" iconClass=\"" + iconclass + "\" onclick=\"" + execute + "\">" + name + "</button>" + | |
| 349 | + if tip_msg is | |
| 350 | + { | |
| 351 | + failure then "", | |
| 352 | + success(tip) then | |
| 353 | + "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>" | |
| 354 | + }). | |
| 355 | + | |
| 356 | + | |
| 357 | +public define HTML_Off_Form | |
| 358 | + dojo_declaration | |
| 359 | + ( | |
| 360 | + String name, | |
| 361 | + List(CoreAttrs) attributes, | |
| 362 | + HTML_Off_Form content | |
| 363 | + )= | |
| 364 | + div([attr("dojoType", "dijit.Declaration"), attr("widgetClass", name) . attributes ], | |
| 365 | + content). | |
| 366 | + | |
| 367 | + | |
| 368 | +public define HTML_Off_Form | |
| 369 | + dojo_editor | |
| 370 | + ( | |
| 371 | + List(CoreAttrs) attributes, | |
| 372 | + HTML_Off_Form text | |
| 373 | + )= | |
| 374 | + div([attr("dojoType", "dijit.Editor"), attr("style", "overflow:auto"), | |
| 375 | + attr("extraPlugins", "['createLink','insertImage',{name:'dijit._editor.plugins.FontChoice', command: 'fontName', generic: true},'fontSize']") | |
| 376 | + . attributes], text). | |
| 377 | + | ... | ... |