Added navlist widget
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user