Commit 5714863d2431392f6b5339c8c8b39155d24ffa56
1 parent
23f0de20
add load_content_init function to load_content. This function return HTML_Partia…
…l_Content with script which make an autoload web_action, extra_args to target. This is useful when this is an answer with ajax (load_content)
Showing
1 changed file
with
46 additions
and
1 deletions
Show diff stats
web/load_content.anubis
| ... | ... | @@ -7,8 +7,9 @@ |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | read system/convert.anubis |
| 10 | - read calexium_lib/web/CXM_making_a_web_site.anubis | |
| 10 | +read calexium_lib/web/types/making_a_web_site.anubis | |
| 11 | 11 | read calexium_lib/web/CXM_web_action.anubis |
| 12 | +read calexium_lib/web/CXM_jquery.anubis | |
| 12 | 13 | |
| 13 | 14 | public define String |
| 14 | 15 | load_content |
| ... | ... | @@ -61,3 +62,47 @@ public define String |
| 61 | 62 | )= |
| 62 | 63 | load_content(target, web_action, [], replace) |
| 63 | 64 | . |
| 65 | + | |
| 66 | +public define HTML_Partial_Content | |
| 67 | + load_content_init | |
| 68 | + ( | |
| 69 | + String target, | |
| 70 | + WEB_Action_Name web_action, | |
| 71 | + List((String,String)) extra_args, | |
| 72 | + Bool replace | |
| 73 | + )= | |
| 74 | + partial_content([ | |
| 75 | + js(js_file("js/cxm/cxm.js")), | |
| 76 | + js_inline(jquery_ready(load_content(target, web_action, extra_args, replace))) | |
| 77 | + ], | |
| 78 | + empty) | |
| 79 | +. | |
| 80 | + | |
| 81 | +public define HTML_Partial_Content | |
| 82 | + load_content_init | |
| 83 | + ( | |
| 84 | + String target, | |
| 85 | + WEB_Action_Name web_action, | |
| 86 | + List((String,String)) extra_args | |
| 87 | + )= | |
| 88 | + load_content_init(target, web_action, extra_args, false) | |
| 89 | +. | |
| 90 | + | |
| 91 | +public define HTML_Partial_Content | |
| 92 | + load_content_init | |
| 93 | + ( | |
| 94 | + String target, | |
| 95 | + WEB_Action_Name web_action | |
| 96 | + )= | |
| 97 | + load_content_init(target, web_action, [], false) | |
| 98 | +. | |
| 99 | + | |
| 100 | +public define HTML_Partial_Content | |
| 101 | + load_content_init | |
| 102 | + ( | |
| 103 | + String target, | |
| 104 | + WEB_Action_Name web_action, | |
| 105 | + Bool replace | |
| 106 | + )= | |
| 107 | + load_content_init(target, web_action, [], replace) | |
| 108 | +. | ... | ... |