Added navlist widget

This commit is contained in:
severin
2013-11-05 16:05:24 +01:00
parent 9a392ba292
commit aba60a473a
5 changed files with 55 additions and 9 deletions

View File

@@ -0,0 +1,37 @@
note
description: "Summary description for {WSF_NAVLIST_CONTROL}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_NAVLIST_CONTROL
inherit
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
rename
make as make_multi_control
end
create
make
feature {NONE} -- Initialization
make (n: STRING)
do
make_multi_control (n)
add_class ("list-group")
end
feature -- Change
add_link (link, text: STRING)
local
c: WSF_NAVLIST_ITEM_CONTROL
do
create c.make (control_name + "_item_" + controls.count.out, link, text)
end
end

View File

@@ -5,7 +5,7 @@ note
revision: "$Revision$"
class
WSF_NAVLIST_ITEM
WSF_NAVLIST_ITEM_CONTROL
inherit
@@ -19,10 +19,12 @@ create
feature {NONE} -- Initialization
make (n, t: STRING)
make (n, link, t: STRING)
do
make_control (n, "a")
text := t
attributes := "href=%"" + link + "%"";
add_class ("list-group-item")
end
end