webmcp

changeset 81:bfae497543a3

Added ui.anchor{...}
author jbe
date Wed Jun 27 19:11:18 2012 +0200 (2012-06-27)
parents ca3f7b001014
children ca44dff90b4e
files framework/env/ui/anchor.lua
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/ui/anchor.lua	Wed Jun 27 19:11:18 2012 +0200
     1.3 @@ -0,0 +1,20 @@
     1.4 +--[[--
     1.5 +ui.anchor{
     1.6 +  name    = name,    -- name of anchor
     1.7 +  attr    = attr,    -- table of HTML attributes
     1.8 +  content = content  -- string to be HTML encoded, or function to be executed
     1.9 +}
    1.10 +
    1.11 +This function writes an HTML anchor into the active slot.
    1.12 +
    1.13 +--]]--
    1.14 +
    1.15 +function ui.anchor(args)
    1.16 +  local attr = table.new(attr)
    1.17 +  attr.name = args.name
    1.18 +  return ui.tag{
    1.19 +    tag = "a",
    1.20 +    attr = attr,
    1.21 +    content = content
    1.22 +  }
    1.23 +end

Impressum / About Us