Merge branch 'widget' of github.com:ynh/EWF into widget

Conflicts:
	library/server/wsf_html/webcontrol/wsf_control.e
	library/server/wsf_html/webcontrol/wsf_text_control.e
This commit is contained in:
Severin Münger
2013-09-05 15:40:11 +02:00
3 changed files with 24 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ feature
render: STRING render: STRING
do do
Result := "<button data-name=%"" + control_name + "%" data-type=%"WSF_BUTTON_CONTROL%">" + generator + text + "</button>" Result := render_tag ( text, "")
end end
set_text (t: STRING) set_text (t: STRING)

View File

@@ -74,8 +74,19 @@ feature --EVENT HANDLING
feature feature
render_tag(body,attributes:STRING):STRING render_tag(body,attributes:STRING):STRING
local
css_class_string: STRING
do do
Result := "<" + tag_name + " data-name=%"" + control_name + "%" data-type=%"" + generator + "%" " + attributes css_class_string := ""
across
css_class as c
loop
css_class_string := css_class_string + " " + c.item
end
if not css_class_string.is_empty then
css_class_string := " class=%"" + css_class_string + "%""
end
Result:="<"+tag_name+" data-name=%"" + control_name + "%" data-type=%""+generator+"%" "+attributes+css_class_string
if not body.is_empty then if not body.is_empty then
Result := Result + " />" Result := Result + " />"
else else

View File

@@ -10,6 +10,9 @@ class
inherit inherit
WSF_TEXT_CONTROL WSF_TEXT_CONTROL
redefine
render
end
create create
make_textarea make_textarea
@@ -21,4 +24,11 @@ feature {NONE}
make_text (n, t) make_text (n, t)
tag_name := "textarea" tag_name := "textarea"
end end
feature
render: STRING
do
Result :=render_tag(text,"")
end
end end