Fixed creation procedures (make)
This commit is contained in:
@@ -20,15 +20,15 @@ feature
|
||||
local
|
||||
btn: WSF_BUTTON_CONTROL
|
||||
do
|
||||
create control.make_multi_control ("container")
|
||||
create control.make ("container")
|
||||
control.add_class ("container")
|
||||
create navbar.make_navbar_with_brand ("navbar1", "Example")
|
||||
create navbar.make_with_brand ("navbar1", "Example")
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/%"", "Home"))
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/grid%"", "Grid"))
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/repeater%"", "Repeater"))
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/slider%"", "Slider"))
|
||||
navbar.add_list_element_right (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/about%"", "About"))
|
||||
create btn.make_button ("scode", "Show Code")
|
||||
create btn.make ("scode", "Show Code")
|
||||
btn.set_click_event (agent show_code)
|
||||
btn.set_isolation (true)
|
||||
btn.add_class ("btn-success")
|
||||
|
||||
@@ -12,7 +12,7 @@ inherit
|
||||
WSF_REPEATER_CONTROL [GOOGLE_NEWS]
|
||||
|
||||
create
|
||||
make_repeater
|
||||
make
|
||||
|
||||
feature
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ feature
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", "Grid Demo"))
|
||||
create datasource.make_news
|
||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
create search_query.make ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
search_query.add_class ("form-control")
|
||||
search_query.set_change_event (agent change_query)
|
||||
control.add_control (search_query)
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
||||
create grid.make_grid ("mygrid", <<create {WSF_GRID_COLUMN}.make ("Title", "title"), create {WSF_GRID_COLUMN}.make ("Content", "content")>>, datasource)
|
||||
create grid.make ("mygrid", <<create {WSF_GRID_COLUMN}.make ("Title", "title"), create {WSF_GRID_COLUMN}.make ("Content", "content")>>, datasource)
|
||||
control.add_control (grid)
|
||||
navbar.set_active (2)
|
||||
end
|
||||
|
||||
@@ -24,9 +24,9 @@ feature -- Implementation
|
||||
form: WSF_FORM_CONTROL
|
||||
do
|
||||
Precursor
|
||||
create slider.make_slider ("myslider")
|
||||
create form.make_form_control ("sliderform")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Input", create {WSF_INPUT_CONTROL}.make_input ("sliderformtext", "Test")))
|
||||
create slider.make ("myslider")
|
||||
create form.make ("sliderform")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make ("Input", create {WSF_INPUT_CONTROL}.make ("sliderformtext", "Test")))
|
||||
--slider.add_control (form, Void)
|
||||
--slider.add_image ("http://www.placesmustseen.com/wp-content/uploads/2013/01/paris-eiffel-tower.jpg", "Eiffel Tower")
|
||||
slider.add_image ("http://31.media.tumblr.com/43f3edae3fb569943047077cddf93c79/tumblr_mtw7wdX9cm1st5lhmo1_1280.jpg", "car")
|
||||
|
||||
@@ -24,12 +24,12 @@ feature
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", " Repeater Demo"))
|
||||
create datasource.make_news
|
||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
create search_query.make ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
search_query.add_class ("form-control")
|
||||
search_query.set_change_event (agent change_query)
|
||||
control.add_control (search_query)
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
||||
create repeater.make_repeater ("myrepeater", datasource)
|
||||
create repeater.make ("myrepeater", datasource)
|
||||
control.add_control (repeater)
|
||||
navbar.set_active (3)
|
||||
end
|
||||
|
||||
@@ -30,58 +30,58 @@ feature
|
||||
source: INCREASING_PROGRESSSOURCE
|
||||
do
|
||||
Precursor
|
||||
create form.make_form_control ("panel")
|
||||
create form.make ("panel")
|
||||
form.add_class ("form-horizontal")
|
||||
--Number 1
|
||||
create textbox1.make_input ("txtBox1", "1")
|
||||
create n1_container.make_form_element ("Number1", textbox1)
|
||||
create textbox1.make ("txtBox1", "1")
|
||||
create n1_container.make ("Number1", textbox1)
|
||||
n1_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
||||
n1_container.add_validator (create {OWN_VALIDATOR}.make_own)
|
||||
form.add_control (n1_container)
|
||||
--Number 2
|
||||
create textbox2.make_input ("txtBox2", "2")
|
||||
create n2_container.make_form_element ("Number2", textbox2)
|
||||
create textbox2.make ("txtBox2", "2")
|
||||
create n2_container.make ("Number2", textbox2)
|
||||
n2_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
||||
form.add_control (n2_container)
|
||||
--Flag autocomplete
|
||||
create autocompletion1.make_autocomplete ("autocompletion1", create {FLAG_AUTOCOMPLETION}.make)
|
||||
create n3_container.make_form_element ("Flag Autocomplete", autocompletion1)
|
||||
create autocompletion1.make ("autocompletion1", create {FLAG_AUTOCOMPLETION}.make)
|
||||
create n3_container.make ("Flag Autocomplete", autocompletion1)
|
||||
form.add_control (n3_container)
|
||||
--Contact autocomplete
|
||||
create autocompletion2.make_autocomplete ("autocompletion2", create {CONTACT_AUTOCOMPLETION}.make)
|
||||
create n4_container.make_form_element ("Contact Autocomplete", autocompletion2)
|
||||
create autocompletion2.make ("autocompletion2", create {CONTACT_AUTOCOMPLETION}.make)
|
||||
create n4_container.make ("Contact Autocomplete", autocompletion2)
|
||||
form.add_control (n4_container)
|
||||
--Google autocomplete
|
||||
create autocompletion3.make_autocomplete ("autocompletion4", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
create n5_container.make_form_element ("Google Autocomplete", autocompletion3)
|
||||
create autocompletion3.make ("autocompletion4", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
create n5_container.make ("Google Autocomplete", autocompletion3)
|
||||
form.add_control (n5_container)
|
||||
--Categories
|
||||
create cklist.make_checkbox_list_control ("categories")
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("net", "Network", "net"))
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("os", "Operating Systems", "os"))
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("fmfp", "Formal Methods and Functional Programming", "fmfp"))
|
||||
create cats_container.make_form_element ("Categories", cklist)
|
||||
create cklist.make ("categories")
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("net", "Network", "net"))
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("os", "Operating Systems", "os"))
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("fmfp", "Formal Methods and Functional Programming", "fmfp"))
|
||||
create cats_container.make ("Categories", cklist)
|
||||
cats_container.add_validator (create {WSF_MIN_VALIDATOR [STRING]}.make_min_validator (1, "Choose at least one category"))
|
||||
cats_container.add_validator (create {WSF_MAX_VALIDATOR [STRING]}.make_max_validator (2, "Choose at most two category"))
|
||||
form.add_control (cats_container)
|
||||
--Button 1
|
||||
create button1.make_button ("sample_button1", "Update")
|
||||
create button1.make ("sample_button1", "Update")
|
||||
button1.set_click_event (agent handle_click)
|
||||
button1.add_class ("col-lg-offset-2")
|
||||
form.add_control (button1)
|
||||
--Button 2
|
||||
create button2.make_button ("sample_button2", "Start Modal Grid")
|
||||
create button2.make ("sample_button2", "Start Modal Grid")
|
||||
button2.set_click_event (agent handle_click)
|
||||
form.add_control (button2)
|
||||
--Result
|
||||
create result_html.make_html ("txtBox3", "p", "")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Result", result_html))
|
||||
create result_html.make ("txtBox3", "p", "")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make ("Result", result_html))
|
||||
control.add_control (form)
|
||||
|
||||
--Progress bar
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h4", "", "Autoincrementing progressbar"))
|
||||
create source.make
|
||||
create progress.make_progress_with_source ("progress1", source)
|
||||
create progress.make_with_source ("progress1", source)
|
||||
source.set_control (progress)
|
||||
progress.set_isolation (true)
|
||||
control.add_control (progress)
|
||||
|
||||
Reference in New Issue
Block a user