Style demo pages
This commit is contained in:
@@ -21,11 +21,14 @@ feature
|
|||||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
do
|
do
|
||||||
create container.make_multi_control ("container")
|
create container.make_multi_control ("container")
|
||||||
|
container.add_class ("container")
|
||||||
|
container.add_control (create {WSF_STATELESS_HTML_CONTROL}.make_html("h1","Grid Demo"))
|
||||||
create datasource.make_news
|
create datasource.make_news
|
||||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||||
search_query.add_class ("form-control")
|
search_query.add_class ("form-control")
|
||||||
search_query.set_change_event (agent change_query)
|
search_query.set_change_event (agent change_query)
|
||||||
container.add_control (search_query)
|
container.add_control (search_query)
|
||||||
|
container.add_control (create {WSF_STATELESS_HTML_CONTROL}.make_html("h2","Results"))
|
||||||
create grid.make_grid ("mygrid", <<create {WSF_GRID_COLUMN}.make_column ("Title", "title"), create {WSF_GRID_COLUMN}.make_column ("Content", "content"), create {WSF_GRID_IMAGE_COLUMN}.make_image_column ("Image", "image")>>, datasource)
|
create grid.make_grid ("mygrid", <<create {WSF_GRID_COLUMN}.make_column ("Title", "title"), create {WSF_GRID_COLUMN}.make_column ("Content", "content"), create {WSF_GRID_IMAGE_COLUMN}.make_image_column ("Image", "image")>>, datasource)
|
||||||
container.add_control (grid)
|
container.add_control (grid)
|
||||||
control := container
|
control := container
|
||||||
|
|||||||
@@ -20,11 +20,14 @@ feature
|
|||||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
do
|
do
|
||||||
create container.make_multi_control ("container")
|
create container.make_multi_control ("container")
|
||||||
|
container.add_class ("container")
|
||||||
|
container.add_control (create {WSF_STATELESS_HTML_CONTROL}.make_html("h1","Repeater Demo"))
|
||||||
create datasource.make_news
|
create datasource.make_news
|
||||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||||
search_query.add_class ("form-control")
|
search_query.add_class ("form-control")
|
||||||
search_query.set_change_event (agent change_query)
|
search_query.set_change_event (agent change_query)
|
||||||
container.add_control (search_query)
|
container.add_control (search_query)
|
||||||
|
container.add_control (create {WSF_STATELESS_HTML_CONTROL}.make_html("h2","Results"))
|
||||||
create repeater.make_repeater ("myrepeater", datasource)
|
create repeater.make_repeater ("myrepeater", datasource)
|
||||||
container.add_control (repeater)
|
container.add_control (repeater)
|
||||||
control := container
|
control := container
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_STATELESS_HTML_CONTROL}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_STATELESS_HTML_CONTROL
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_STATELESS_CONTROL
|
||||||
|
|
||||||
|
create
|
||||||
|
make_html
|
||||||
|
|
||||||
|
feature {NONE}
|
||||||
|
|
||||||
|
make_html (t, v: STRING)
|
||||||
|
do
|
||||||
|
make ( t)
|
||||||
|
html := v
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
feature -- Implementation
|
||||||
|
|
||||||
|
render: STRING
|
||||||
|
do
|
||||||
|
Result := render_tag (html, "")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
feature
|
||||||
|
|
||||||
|
html: STRING
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
Reference in New Issue
Block a user