webmcp
diff framework/env/ui/link.lua @ 223:32ec28229bb5
Finished removing all references to cgi module (except demo-app); Removed partial loading mechanism
author | jbe |
---|---|
date | Fri Feb 27 21:49:00 2015 +0100 (2015-02-27) |
parents | 3a6962b9121c |
children |
line diff
1.1 --- a/framework/env/ui/link.lua Fri Feb 27 17:18:08 2015 +0100 1.2 +++ b/framework/env/ui/link.lua Fri Feb 27 21:49:00 2015 +0100 1.3 @@ -13,23 +13,11 @@ 1.4 routing = routing, -- optional routing information for action links, as described for ui.form{...} 1.5 anchor = anchor, -- for views: anchor in destination URL 1.6 text = text, -- link text 1.7 - content = content, -- link content (overrides link text, except for submit buttons for action calls without JavaScript) 1.8 - partial = { -- parameters for partial loading, see below 1.9 - module = module, 1.10 - view = view, 1.11 - id = id, 1.12 - params = params, 1.13 - target = target 1.14 - } 1.15 + content = content -- link content (overrides link text, except for submit buttons for action calls without JavaScript) 1.16 } 1.17 1.18 This function inserts a link into the active slot. It may be either an internal application link ('module' given and 'view' or 'action' given), or a link to an external web page ('external' given), or a link to a file in the static file directory of the application ('static' given). 1.19 1.20 -When passing a table as "partial" argument, AND if partial loading has been enabled by calling ui.enable_partial_loading(), then ui._partial_load_js is 1.21 -used to create an onclick event (onsubmit event for action links). The 1.22 -"partial" setting table is passed to ui._partial_load_js as first argument. 1.23 -See ui._partial_load_js(...) for further documentation. 1.24 - 1.25 --]]-- 1.26 1.27 function ui.link(args) 1.28 @@ -67,7 +55,6 @@ 1.29 id = args.id, 1.30 params = args.params, 1.31 routing = args.routing, 1.32 - partial = args.partial, 1.33 attr = form_attr, 1.34 content = function() 1.35 ui.submit{ text = args.text, attr = args.submit_attr } 1.36 @@ -105,9 +92,6 @@ 1.37 params = args.params, 1.38 anchor = args.anchor 1.39 } 1.40 - if ui.is_partial_loading_enabled() and args.partial then 1.41 - a_attr.onclick = ui._partial_load_js(args.partial) 1.42 - end 1.43 return ui.tag{ tag = "a", attr = a_attr, content = wrapped_content } 1.44 end 1.45 end