Small fix removed DOCTYPE
This commit is contained in:
@@ -10,6 +10,9 @@ deferred class
|
||||
inherit
|
||||
|
||||
WSF_STATELESS_CONTROL
|
||||
redefine
|
||||
render_tag_with_tagname
|
||||
end
|
||||
|
||||
feature
|
||||
|
||||
@@ -62,6 +65,24 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
|
||||
|
||||
state_changes: JSON_OBJECT
|
||||
|
||||
feature -- Rendering
|
||||
|
||||
render_tag_with_tagname (tag, body, attributes, css_classes_string: STRING): STRING
|
||||
local
|
||||
l_attributes: STRING
|
||||
do
|
||||
l_attributes := attributes
|
||||
if not css_classes_string.is_empty then
|
||||
l_attributes := l_attributes + " class=%"" + css_classes_string + "%""
|
||||
end
|
||||
Result := "<" + tag + " id=%"" + control_name + "%" data-name=%"" + control_name + "%" data-type=%"" + generator + "%" " + l_attributes
|
||||
if body.is_empty and not tag.is_equal ("textarea") then
|
||||
Result := Result + " />"
|
||||
else
|
||||
Result := Result + " >" + body + "</" + tag + ">"
|
||||
end
|
||||
end
|
||||
|
||||
feature --EVENT HANDLING
|
||||
|
||||
handle_callback (cname: STRING; event: STRING)
|
||||
|
||||
@@ -76,7 +76,7 @@ feature
|
||||
do
|
||||
create states.make
|
||||
control.read_state (states)
|
||||
data := "<!DOCTYPE html><html><head>"
|
||||
data := "<html><head>"
|
||||
data.append ("<link href=%"/bootstrap.min.css%" rel=%"stylesheet%">")
|
||||
data.append ("<link href=%"/widget.css%" rel=%"stylesheet%">")
|
||||
data.append ("</head><body>")
|
||||
|
||||
@@ -51,7 +51,7 @@ feature
|
||||
if not css_classes_string.is_empty then
|
||||
l_attributes := l_attributes + " class=%"" + css_classes_string + "%""
|
||||
end
|
||||
Result := "<" + tag + l_attributes
|
||||
Result := "<" + tag + " " + l_attributes
|
||||
if body.is_empty and not tag.is_equal ("textarea") then
|
||||
Result := Result + " />"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user