Commit f269b7e53873de577838f6cd62f3e1c0af120d32
1 parent
4433de37
Added attributes for js_file() header tag
Added CXM_dojo.anubis
Showing
2 changed files
with
115 additions
and
4 deletions
Show diff stats
| 1 | +/* | ||
| 2 | + * Created by PyramIDE. | ||
| 3 | + * User: Steve Marechal | ||
| 4 | + * Date: 11/06/2008 | ||
| 5 | + * Time: 09:54 | ||
| 6 | + * | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 10 | +read tools/basis.anubis // required for 'make_directory' | ||
| 11 | +read locale/L3LanguageInfo.anubis | ||
| 12 | + | ||
| 13 | +read mailfountain_constants.anubis | ||
| 14 | +read mailfountain_types.anubis | ||
| 15 | +read calexium_lib/web/CXM_common.anubis | ||
| 16 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 17 | +read calexium_lib/web/CXM_multihost_http_server.anubis | ||
| 18 | +read common/language_management.anubis | ||
| 19 | + | ||
| 20 | +read tools/mf_loggers.anubis | ||
| 21 | +read calexium_lib/net_services_protocols/logger_service.anubis | ||
| 22 | +read system/logger.anubis | ||
| 23 | +public define HTML_Off_Form | ||
| 24 | + dojo_dialog | ||
| 25 | + ( | ||
| 26 | + String name, | ||
| 27 | + String id, | ||
| 28 | + String execute, | ||
| 29 | + ) | ||
| 30 | + = | ||
| 31 | + literal(" | ||
| 32 | +<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('"+id+"').show()\">"+name+"</button> | ||
| 33 | + | ||
| 34 | +<div dojoType=\"dijit.Dialog\" id=\""+id+"\" title=\""+name+"\" | ||
| 35 | + execute=\""+execute+"\"> | ||
| 36 | + <table> | ||
| 37 | + <tr> | ||
| 38 | + <td><label for=\"name\"></label></td> | ||
| 39 | + <td><input dojoType=dijit.form.TextBox type=\"text\" name=\"name\" id=\"name_"+id+"\"></td> | ||
| 40 | + </tr> | ||
| 41 | + | ||
| 42 | + <tr> | ||
| 43 | + <td colspan=\"2\" align=\"center\"> | ||
| 44 | + <button dojoType=dijit.form.Button type=\"submit\">OK</button></td> | ||
| 45 | + </tr> | ||
| 46 | + </table> | ||
| 47 | +</div></br>") | ||
| 48 | + | ||
| 49 | +. | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + | ||
| 54 | +public define HTML_Off_Form | ||
| 55 | + dojo_message_box | ||
| 56 | + ( | ||
| 57 | + String name1, | ||
| 58 | + String name2, | ||
| 59 | + ) | ||
| 60 | + = | ||
| 61 | + literal("</br> | ||
| 62 | + | ||
| 63 | + <div> | ||
| 64 | + <div style=\"width:100px; height:100px; position:relative; border:1px solid #666; \"> | ||
| 65 | + <div id=\"node3\" style=\"position:absolute; top:0; left:0;\" class=\"box nopad hidden\">"+name1+"</div> | ||
| 66 | + <div id=\"node4\" style=\"position:absolute; top:0; left:0;\" class=\"box two nopad\">"+name2+"</div> | ||
| 67 | + </div> | ||
| 68 | + <br style=\"clear:both\"> | ||
| 69 | + </div></br>") | ||
| 70 | +. | ||
| 71 | + | ||
| 72 | + | ||
| 73 | + | ||
| 74 | +public define HTML_Off_Form | ||
| 75 | + dojo_tooltip | ||
| 76 | + ( | ||
| 77 | + String title, | ||
| 78 | + String keyword, | ||
| 79 | + ) = | ||
| 80 | + actioner(same,same, link([id("dojo_tip_" + keyword),class("dojoToolTip")],title, success(title)), "show_address_mailing", [("address_mailing", keyword)], []). | ||
| 81 | + //actioner(same, same, push_button([id("dojo_tip_" + keyword), class("in"), event(onclick,"new_search(this)")], keyword), "", [], []). | ||
| 82 | + | ||
| 83 | + |
calexium_lib/web/CXM_making_a_web_site.anubis
| @@ -1393,9 +1393,20 @@ public type CSS_Style: | @@ -1393,9 +1393,20 @@ public type CSS_Style: | ||
| 1393 | 1393 | ||
| 1394 | public type CSS_File: | 1394 | public type CSS_File: |
| 1395 | css_file(String file_name). | 1395 | css_file(String file_name). |
| 1396 | - | 1396 | + |
| 1397 | +public type JS_Attribute: | ||
| 1398 | + attr (String, String). | ||
| 1399 | + | ||
| 1397 | public type JS_File: | 1400 | public type JS_File: |
| 1398 | - js_file(String file_name). | 1401 | + js_file(String file_name, |
| 1402 | + List(JS_Attribute) attributes). | ||
| 1403 | + | ||
| 1404 | +public define JS_File | ||
| 1405 | + js_file | ||
| 1406 | + ( | ||
| 1407 | + String file_name | ||
| 1408 | + ) = | ||
| 1409 | + js_file(file_name, []). | ||
| 1399 | 1410 | ||
| 1400 | define String | 1411 | define String |
| 1401 | format | 1412 | format |
| @@ -4169,6 +4180,21 @@ define Printable_tree | @@ -4169,6 +4180,21 @@ define Printable_tree | ||
| 4169 | }. | 4180 | }. |
| 4170 | 4181 | ||
| 4171 | define Printable_tree | 4182 | define Printable_tree |
| 4183 | + add_js_files_attributes | ||
| 4184 | + ( | ||
| 4185 | + List(JS_Attribute) l | ||
| 4186 | + ) = | ||
| 4187 | + if l is | ||
| 4188 | + { | ||
| 4189 | + [ ] then [ ], | ||
| 4190 | + [h . t] then | ||
| 4191 | + if h is attr(name, value) then | ||
| 4192 | + [ " " + name + "=\"" + value + "\"" | ||
| 4193 | + . add_js_files_attributes(t)] | ||
| 4194 | + }. | ||
| 4195 | + | ||
| 4196 | + | ||
| 4197 | +define Printable_tree | ||
| 4172 | add_js_files | 4198 | add_js_files |
| 4173 | ( | 4199 | ( |
| 4174 | List(JS_File) l | 4200 | List(JS_File) l |
| @@ -4177,8 +4203,10 @@ define Printable_tree | @@ -4177,8 +4203,10 @@ define Printable_tree | ||
| 4177 | { | 4203 | { |
| 4178 | [ ] then [ ], | 4204 | [ ] then [ ], |
| 4179 | [h . t] then | 4205 | [h . t] then |
| 4180 | - [ ["<script src=\""+ file_name(h) +"\" type=\"text/javascript\"></script>\n" ] | ||
| 4181 | - . add_js_files(t)] | 4206 | + [ ["<script src=\""+ file_name(h) +"\" type=\"text/javascript\"" |
| 4207 | + . add_js_files_attributes(attributes(h)) ] | ||
| 4208 | + . ["></script>\n" | ||
| 4209 | + . add_js_files(t)] ] | ||
| 4182 | }. | 4210 | }. |
| 4183 | 4211 | ||
| 4184 | define Printable_tree | 4212 | define Printable_tree |