webmcp
changeset 80:ca3f7b001014
Made new anchor feature working
author | bsw |
---|---|
date | Wed Jun 27 19:14:34 2012 +0200 (2012-06-27) |
parents | 3a6962b9121c |
children | bfae497543a3 |
files | framework/env/encode/url.lua framework/env/ui/paginate.lua |
line diff
1.1 --- a/framework/env/encode/url.lua Wed Jun 27 18:57:53 2012 +0200 1.2 +++ b/framework/env/encode/url.lua Wed Jun 27 19:14:34 2012 +0200 1.3 @@ -25,6 +25,7 @@ 1.4 local action = args.action 1.5 local id = args.id 1.6 local params = args.params or {} 1.7 + local anchor = args.anchor 1.8 local result = {} 1.9 local id_as_param = false 1.10 local function add(...) 1.11 @@ -97,7 +98,7 @@ 1.12 if anchor ~= nil then 1.13 string_result = string.match(string_result, "^[^#]*") 1.14 if anchor then 1.15 - string_result = string_result .. anchor 1.16 + string_result = string_result .. "#" .. encode.url_part(anchor) 1.17 end 1.18 end 1.19 return string_result
2.1 --- a/framework/env/ui/paginate.lua Wed Jun 27 18:57:53 2012 +0200 2.2 +++ b/framework/env/ui/paginate.lua Wed Jun 27 19:14:34 2012 +0200 2.3 @@ -62,7 +62,7 @@ 2.4 view = request.get_view(), 2.5 id = id, 2.6 params = params, 2.7 - anchor = anchor, 2.8 + anchor = args.anchor, 2.9 text = tostring(page), 2.10 partial = partial 2.11 }