Added navlist widget
This commit is contained in:
@@ -66,7 +66,7 @@ feature -- Rendering
|
||||
render: STRING
|
||||
-- HTML representation of this control
|
||||
do
|
||||
Result := render_tag (text, "")
|
||||
Result := render_tag (text, attributes)
|
||||
end
|
||||
|
||||
feature -- Change
|
||||
|
||||
@@ -122,13 +122,13 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
|
||||
feature -- Rendering
|
||||
|
||||
render_tag (body, attrs: STRING): STRING
|
||||
render_tag (body: STRING; attrs: detachable STRING): STRING
|
||||
-- Render this control with the specified body and attributes
|
||||
do
|
||||
Result := render_tag_with_generator_name (generator, body, attrs)
|
||||
end
|
||||
|
||||
render_tag_with_generator_name (a_generator, body, attrs: STRING): STRING
|
||||
render_tag_with_generator_name (a_generator, body: STRING; attrs: detachable STRING): STRING
|
||||
-- Render this control with the specified generator name, body and attributes
|
||||
local
|
||||
css_classes_string: STRING
|
||||
@@ -140,7 +140,10 @@ feature -- Rendering
|
||||
loop
|
||||
css_classes_string := css_classes_string + " " + c.item
|
||||
end
|
||||
l_attributes := "id=%"" + control_name + "%" data-name=%"" + control_name + "%" data-type=%"" + a_generator + "%" " + attrs
|
||||
l_attributes := "id=%"" + control_name + "%" data-name=%"" + control_name + "%" data-type=%"" + a_generator + "%" "
|
||||
if attached attrs as a then
|
||||
l_attributes := l_attributes + a
|
||||
end
|
||||
if isolate then
|
||||
l_attributes.append (" data-isolation=%"1%"")
|
||||
end
|
||||
|
||||
@@ -39,7 +39,7 @@ feature -- Change
|
||||
|
||||
feature -- Rendering
|
||||
|
||||
render_tag (body, attrs: STRING): STRING
|
||||
render_tag (body: STRING; attrs: detachable STRING): STRING
|
||||
-- Generate HTML of this control with the specified body and attributes
|
||||
local
|
||||
css_classes_string: STRING
|
||||
@@ -53,12 +53,16 @@ feature -- Rendering
|
||||
Result := render_tag_with_tagname (tag_name, body, attrs, css_classes_string)
|
||||
end
|
||||
|
||||
render_tag_with_tagname (tag, body, attrs, css_classes_string: STRING): STRING
|
||||
render_tag_with_tagname (tag, body: STRING; attrs: detachable STRING; css_classes_string: STRING): STRING
|
||||
-- Generate HTML of the specified tag with specified body, attributes and css classes
|
||||
local
|
||||
l_attributes: STRING
|
||||
do
|
||||
create l_attributes.make_from_string (attrs)
|
||||
if attached attrs as a then
|
||||
create l_attributes.make_from_string (a)
|
||||
else
|
||||
l_attributes := ""
|
||||
end
|
||||
if not css_classes_string.is_empty then
|
||||
l_attributes.append (" class=%"")
|
||||
l_attributes.append (css_classes_string)
|
||||
|
||||
Reference in New Issue
Block a user