Fixed creation procedures (make)
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_DROPDOWN_CONTROL}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_DROPDOWN_CONTROL
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
|
rename
|
||||||
|
make as make_multi_control
|
||||||
|
end
|
||||||
|
|
||||||
|
create
|
||||||
|
make
|
||||||
|
|
||||||
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
|
make (n: STRING)
|
||||||
|
do
|
||||||
|
make_multi_control (n)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -10,16 +10,18 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_REPEATER_CONTROL [G]
|
WSF_REPEATER_CONTROL [G]
|
||||||
|
rename
|
||||||
|
make as make_repeater
|
||||||
redefine
|
redefine
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_grid
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_grid (n: STRING; a_columns: ITERABLE [WSF_GRID_COLUMN]; a_datasource: WSF_DATASOURCE [G])
|
make (n: STRING; a_columns: ITERABLE [WSF_GRID_COLUMN]; a_datasource: WSF_DATASOURCE [G])
|
||||||
do
|
do
|
||||||
make_repeater (n, a_datasource)
|
make_repeater (n, a_datasource)
|
||||||
columns := a_columns
|
columns := a_columns
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_paging
|
make
|
||||||
|
|
||||||
feature {NONE}
|
feature {NONE}
|
||||||
|
|
||||||
make_paging (n: STRING; ds: WSF_PAGABLE_DATASOURCE [G])
|
make (n: STRING; ds: WSF_PAGABLE_DATASOURCE [G])
|
||||||
do
|
do
|
||||||
make_control (n, "ul")
|
make_control (n, "ul")
|
||||||
add_class ("pagination")
|
add_class ("pagination")
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ deferred class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
|
rename
|
||||||
|
make as make_multi_control
|
||||||
redefine
|
redefine
|
||||||
set_state,
|
set_state,
|
||||||
state,
|
state,
|
||||||
@@ -18,7 +20,7 @@ inherit
|
|||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_repeater (n: STRING; a_datasource: WSF_DATASOURCE [G])
|
make (n: STRING; a_datasource: WSF_DATASOURCE [G])
|
||||||
local
|
local
|
||||||
p: WSF_PAGINATION_CONTROL [G]
|
p: WSF_PAGINATION_CONTROL [G]
|
||||||
do
|
do
|
||||||
@@ -26,7 +28,7 @@ feature {NONE} -- Initialization
|
|||||||
datasource := a_datasource
|
datasource := a_datasource
|
||||||
datasource.set_on_update_agent (agent update)
|
datasource.set_on_update_agent (agent update)
|
||||||
if attached {WSF_PAGABLE_DATASOURCE [G]} a_datasource as ds then
|
if attached {WSF_PAGABLE_DATASOURCE [G]} a_datasource as ds then
|
||||||
create p.make_paging (n + "_paging", ds)
|
create p.make (n + "_paging", ds)
|
||||||
add_control (p)
|
add_control (p)
|
||||||
pagination_control := p
|
pagination_control := p
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,26 +10,28 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_INPUT_CONTROL
|
WSF_INPUT_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_input
|
||||||
redefine
|
redefine
|
||||||
handle_callback,
|
handle_callback,
|
||||||
state
|
state
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_autocomplete, make_autocomplete_with_agent
|
make, make_with_agent
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_autocomplete (n: STRING; c: WSF_AUTOCOMPLETION)
|
make (n: STRING; c: WSF_AUTOCOMPLETION)
|
||||||
-- Initialize with specified name and autocompletion
|
-- Initialize with specified name and autocompletion
|
||||||
do
|
do
|
||||||
make_autocomplete_with_agent (n, agent c.autocompletion)
|
make_with_agent (n, agent c.autocompletion)
|
||||||
if attached c.template as t then
|
if attached c.template as t then
|
||||||
template := t
|
template := t
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
make_autocomplete_with_agent (n: STRING; c: FUNCTION [ANY, TUPLE [STRING], JSON_ARRAY])
|
make_with_agent (n: STRING; c: FUNCTION [ANY, TUPLE [STRING], JSON_ARRAY])
|
||||||
-- Initialize with specified name and autocompletion function
|
-- Initialize with specified name and autocompletion function
|
||||||
do
|
do
|
||||||
make_input (n, "")
|
make_input (n, "")
|
||||||
|
|||||||
@@ -10,16 +10,19 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_VALUE_CONTROL [BOOLEAN]
|
WSF_VALUE_CONTROL [BOOLEAN]
|
||||||
|
rename
|
||||||
|
make as make_value_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_checkbox
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_checkbox (n, l, c: STRING)
|
make (n, l, c: STRING)
|
||||||
-- Initialize with specified control name,
|
-- Initialize with specified control name,
|
||||||
do
|
do
|
||||||
make_control (n, "input")
|
make_value_control (n, "input")
|
||||||
label := l
|
label := l
|
||||||
checked_value := c
|
checked_value := c
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_VALUE_CONTROL [LIST [STRING]]
|
WSF_VALUE_CONTROL [LIST [STRING]]
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
undefine
|
undefine
|
||||||
load_state,
|
load_state,
|
||||||
full_state,
|
full_state,
|
||||||
@@ -17,13 +19,16 @@ inherit
|
|||||||
end
|
end
|
||||||
|
|
||||||
WSF_MULTI_CONTROL [WSF_CHECKBOX_CONTROL]
|
WSF_MULTI_CONTROL [WSF_CHECKBOX_CONTROL]
|
||||||
|
rename
|
||||||
|
make as make_multi_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_checkbox_list_control
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initializaton
|
feature {NONE} -- Initializaton
|
||||||
|
|
||||||
make_checkbox_list_control (n: STRING)
|
make (n: STRING)
|
||||||
-- Initialize with specified control name
|
-- Initialize with specified control name
|
||||||
do
|
do
|
||||||
make_multi_control (n)
|
make_multi_control (n)
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ class
|
|||||||
WSF_CODEVIEW_CONTROL
|
WSF_CODEVIEW_CONTROL
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_TEXTAREA_CONTROL
|
WSF_TEXTAREA_CONTROL
|
||||||
rename
|
rename
|
||||||
make_textarea as make_codeview
|
make as make_codeview
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_codeview
|
make_codeview
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,16 +10,19 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_VALUE_CONTROL [STRING]
|
WSF_VALUE_CONTROL [STRING]
|
||||||
|
rename
|
||||||
|
make as make_value_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_input
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_input (n, v: STRING)
|
make (n, v: STRING)
|
||||||
-- Initialize with specified name and value
|
-- Initialize with specified name and value
|
||||||
do
|
do
|
||||||
make_control (n, "input")
|
make_value_control (n, "input")
|
||||||
type := "text"
|
type := "text"
|
||||||
text := v
|
text := v
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_INPUT_CONTROL
|
WSF_INPUT_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_input
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_password
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_password (n, v: STRING)
|
make (n, v: STRING)
|
||||||
-- Initialize with specified control name and text
|
-- Initialize with specified control name and text
|
||||||
do
|
do
|
||||||
make_input (n, v)
|
make_input (n, v)
|
||||||
|
|||||||
@@ -10,16 +10,18 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_INPUT_CONTROL
|
WSF_INPUT_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_input
|
||||||
redefine
|
redefine
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_textarea
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_textarea (n, t: STRING)
|
make (n, t: STRING)
|
||||||
-- Initialize with specified control name and text to be displayed in this textarea
|
-- Initialize with specified control name and text to be displayed in this textarea
|
||||||
do
|
do
|
||||||
make_input (n, t)
|
make_input (n, t)
|
||||||
|
|||||||
@@ -10,16 +10,18 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
|
rename
|
||||||
|
make as make_multi_control
|
||||||
redefine
|
redefine
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_navbar, make_navbar_with_brand
|
make, make_with_brand
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_navbar (n: STRING)
|
make (n: STRING)
|
||||||
--Initialize
|
--Initialize
|
||||||
do
|
do
|
||||||
make_multi_control (n)
|
make_multi_control (n)
|
||||||
@@ -31,10 +33,10 @@ feature {NONE} -- Initialization
|
|||||||
nav_right.add_class ("nav navbar-nav navbar-right")
|
nav_right.add_class ("nav navbar-nav navbar-right")
|
||||||
end
|
end
|
||||||
|
|
||||||
make_navbar_with_brand (n, b: STRING)
|
make_with_brand (n, b: STRING)
|
||||||
-- Initialize with specified brand string
|
-- Initialize with specified brand string
|
||||||
do
|
do
|
||||||
make_navbar (n)
|
make (n)
|
||||||
brand := b
|
brand := b
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_progress, make_progress_with_source
|
make, make_with_source
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_progress (n: STRING)
|
make (n: STRING)
|
||||||
-- Initialize with specified control name
|
-- Initialize with specified control name
|
||||||
do
|
do
|
||||||
make_control (n, "div")
|
make_control (n, "div")
|
||||||
@@ -24,10 +27,10 @@ feature {NONE} -- Initialization
|
|||||||
progress := 0
|
progress := 0
|
||||||
end
|
end
|
||||||
|
|
||||||
make_progress_with_source (n: STRING; p: WSF_PROGRESSSOURCE)
|
make_with_source (n: STRING; p: WSF_PROGRESSSOURCE)
|
||||||
-- Initialize with specified control name and progresssource
|
-- Initialize with specified control name and progresssource
|
||||||
do
|
do
|
||||||
make_progress (n)
|
make (n)
|
||||||
progress_source := p
|
progress_source := p
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,20 +10,23 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_slider
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_slider (n: STRING)
|
make (n: STRING)
|
||||||
-- Initialize with specified name
|
-- Initialize with specified name
|
||||||
do
|
do
|
||||||
make_control (n, "div")
|
make_control (n, "div")
|
||||||
add_class ("carousel slide")
|
add_class ("carousel slide")
|
||||||
create list.make_with_tag_name (control_name + "_links", "ol")
|
create list.make_with_tag_name (control_name + "_links", "ol")
|
||||||
list.add_class ("carousel-indicators")
|
list.add_class ("carousel-indicators")
|
||||||
create slide_wrapper.make_multi_control (control_name + "_wrapper")
|
create slide_wrapper.make (control_name + "_wrapper")
|
||||||
slide_wrapper.add_class ("carousel-inner")
|
slide_wrapper.add_class ("carousel-inner")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -88,7 +91,7 @@ feature -- Change
|
|||||||
cl: STRING
|
cl: STRING
|
||||||
item: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
item: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
do
|
do
|
||||||
create item.make_multi_control (control_name + "_item" + slide_wrapper.controls.count.out)
|
create item.make (control_name + "_item" + slide_wrapper.controls.count.out)
|
||||||
item.add_class ("item")
|
item.add_class ("item")
|
||||||
item.add_control (c)
|
item.add_control (c)
|
||||||
if attached caption as capt then
|
if attached caption as capt then
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_button
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_button (n: STRING; t: STRING)
|
make (n: STRING; t: STRING)
|
||||||
-- Initialize with specified control name and text
|
-- Initialize with specified control name and text
|
||||||
do
|
do
|
||||||
make_control (n, "button")
|
make_control (n, "button")
|
||||||
|
|||||||
@@ -10,19 +10,21 @@ deferred class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_STATELESS_CONTROL
|
WSF_STATELESS_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_stateless_control
|
||||||
redefine
|
redefine
|
||||||
render_tag
|
render_tag
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_control (n, a_tag_name: STRING)
|
make (n, a_tag_name: STRING)
|
||||||
-- Initialize with specified control name and tag
|
-- Initialize with specified control name and tag
|
||||||
require
|
require
|
||||||
not n.is_empty
|
not n.is_empty
|
||||||
not a_tag_name.is_empty
|
not a_tag_name.is_empty
|
||||||
do
|
do
|
||||||
make (a_tag_name)
|
make_stateless_control (a_tag_name)
|
||||||
control_name := n
|
control_name := n
|
||||||
create state_changes.make
|
create state_changes.make
|
||||||
create actions.make_array
|
create actions.make_array
|
||||||
|
|||||||
@@ -10,15 +10,18 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_MULTI_CONTROL [WSF_CONTROL]
|
WSF_MULTI_CONTROL [WSF_CONTROL]
|
||||||
|
rename
|
||||||
|
make as make_multi_control
|
||||||
|
end
|
||||||
|
|
||||||
WSF_VALIDATABLE
|
WSF_VALIDATABLE
|
||||||
|
|
||||||
create
|
create
|
||||||
make_form_control
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_form_control (n: STRING)
|
make (n: STRING)
|
||||||
-- Initialize
|
-- Initialize
|
||||||
do
|
do
|
||||||
make_multi_control (n)
|
make_multi_control (n)
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
redefine
|
redefine
|
||||||
read_state_changes,
|
read_state_changes,
|
||||||
load_state,
|
load_state,
|
||||||
@@ -19,17 +21,17 @@ inherit
|
|||||||
WSF_VALIDATABLE
|
WSF_VALIDATABLE
|
||||||
|
|
||||||
create
|
create
|
||||||
make_form_element, make_form_element_with_validators
|
make, make_with_validators
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_form_element (a_label: STRING; c: WSF_VALUE_CONTROL [G])
|
make (a_label: STRING; c: WSF_VALUE_CONTROL [G])
|
||||||
-- Initialize form element control with a specific label and value control
|
-- Initialize form element control with a specific label and value control
|
||||||
do
|
do
|
||||||
make_form_element_with_validators (a_label, c, create {ARRAYED_LIST [WSF_VALIDATOR [G]]}.make (0))
|
make_with_validators (a_label, c, create {ARRAYED_LIST [WSF_VALIDATOR [G]]}.make (0))
|
||||||
end
|
end
|
||||||
|
|
||||||
make_form_element_with_validators (a_label: STRING; c: WSF_VALUE_CONTROL [G]; v: LIST [WSF_VALIDATOR [G]])
|
make_with_validators (a_label: STRING; c: WSF_VALUE_CONTROL [G]; v: LIST [WSF_VALIDATOR [G]])
|
||||||
-- Initialize form element control with a specific label, value control and list of validators
|
-- Initialize form element control with a specific label, value control and list of validators
|
||||||
do
|
do
|
||||||
make_control (c.control_name + "_container", "div")
|
make_control (c.control_name + "_container", "div")
|
||||||
|
|||||||
@@ -10,16 +10,17 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_VALUE_CONTROL [STRING]
|
WSF_VALUE_CONTROL [STRING]
|
||||||
|
rename make as make_value_control end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_html
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_html (n, t, v: STRING)
|
make (n, t, v: STRING)
|
||||||
-- Initialize
|
-- Initialize
|
||||||
do
|
do
|
||||||
make_control (n, t)
|
make_value_control (n, t)
|
||||||
html := v
|
html := v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
|
rename
|
||||||
|
make as make_control
|
||||||
redefine
|
redefine
|
||||||
full_state,
|
full_state,
|
||||||
read_state_changes,
|
read_state_changes,
|
||||||
@@ -17,11 +19,11 @@ inherit
|
|||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make_multi_control, make_with_tag_name
|
make, make_with_tag_name
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make_multi_control (n: STRING)
|
make (n: STRING)
|
||||||
-- Initialize with specified control name and default tag "div"
|
-- Initialize with specified control name and default tag "div"
|
||||||
do
|
do
|
||||||
make_with_tag_name (n, "div")
|
make_with_tag_name (n, "div")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ inherit
|
|||||||
|
|
||||||
WSF_CONTROL
|
WSF_CONTROL
|
||||||
rename
|
rename
|
||||||
make as make_wsf_control
|
make as make_control
|
||||||
redefine
|
redefine
|
||||||
full_state,
|
full_state,
|
||||||
read_state_changes
|
read_state_changes
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-10-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-10-0 http://www.eiffel.com/developers/xml/configuration-1-10-0.xsd" name="wsf_js_widget" uuid="660D6D82-2218-11E3-86B1-F23C91AEC05E" library_target="wsf_js_widget">
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-11-0 http://www.eiffel.com/developers/xml/configuration-1-11-0.xsd" name="wsf_js_widget" uuid="660D6D82-2218-11E3-86B1-F23C91AEC05E" library_target="wsf_js_widget">
|
||||||
<target name="wsf_js_widget">
|
<target name="wsf_js_widget">
|
||||||
<root all_classes="true"/>
|
<root all_classes="true"/>
|
||||||
<file_rule>
|
<file_rule>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
<exclude>/.svn$</exclude>
|
<exclude>/.svn$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="standard">
|
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="standard">
|
||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="encoder" location="..\..\..\library\text\encoder\encoder-safe.ecf"/>
|
<library name="encoder" location="..\..\..\library\text\encoder\encoder-safe.ecf"/>
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ feature
|
|||||||
local
|
local
|
||||||
btn: WSF_BUTTON_CONTROL
|
btn: WSF_BUTTON_CONTROL
|
||||||
do
|
do
|
||||||
create control.make_multi_control ("container")
|
create control.make ("container")
|
||||||
control.add_class ("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=%"/%"", "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=%"/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=%"/repeater%"", "Repeater"))
|
||||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/slider%"", "Slider"))
|
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"))
|
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_click_event (agent show_code)
|
||||||
btn.set_isolation (true)
|
btn.set_isolation (true)
|
||||||
btn.add_class ("btn-success")
|
btn.add_class ("btn-success")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ inherit
|
|||||||
WSF_REPEATER_CONTROL [GOOGLE_NEWS]
|
WSF_REPEATER_CONTROL [GOOGLE_NEWS]
|
||||||
|
|
||||||
create
|
create
|
||||||
make_repeater
|
make
|
||||||
|
|
||||||
feature
|
feature
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ feature
|
|||||||
Precursor
|
Precursor
|
||||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", "Grid Demo"))
|
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("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 ("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)
|
||||||
control.add_control (search_query)
|
control.add_control (search_query)
|
||||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
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)
|
control.add_control (grid)
|
||||||
navbar.set_active (2)
|
navbar.set_active (2)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ feature -- Implementation
|
|||||||
form: WSF_FORM_CONTROL
|
form: WSF_FORM_CONTROL
|
||||||
do
|
do
|
||||||
Precursor
|
Precursor
|
||||||
create slider.make_slider ("myslider")
|
create slider.make ("myslider")
|
||||||
create form.make_form_control ("sliderform")
|
create form.make ("sliderform")
|
||||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Input", create {WSF_INPUT_CONTROL}.make_input ("sliderformtext", "Test")))
|
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_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://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")
|
slider.add_image ("http://31.media.tumblr.com/43f3edae3fb569943047077cddf93c79/tumblr_mtw7wdX9cm1st5lhmo1_1280.jpg", "car")
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ feature
|
|||||||
Precursor
|
Precursor
|
||||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", " Repeater Demo"))
|
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("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 ("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)
|
||||||
control.add_control (search_query)
|
control.add_control (search_query)
|
||||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
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)
|
control.add_control (repeater)
|
||||||
navbar.set_active (3)
|
navbar.set_active (3)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,58 +30,58 @@ feature
|
|||||||
source: INCREASING_PROGRESSSOURCE
|
source: INCREASING_PROGRESSSOURCE
|
||||||
do
|
do
|
||||||
Precursor
|
Precursor
|
||||||
create form.make_form_control ("panel")
|
create form.make ("panel")
|
||||||
form.add_class ("form-horizontal")
|
form.add_class ("form-horizontal")
|
||||||
--Number 1
|
--Number 1
|
||||||
create textbox1.make_input ("txtBox1", "1")
|
create textbox1.make ("txtBox1", "1")
|
||||||
create n1_container.make_form_element ("Number1", textbox1)
|
create n1_container.make ("Number1", textbox1)
|
||||||
n1_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
n1_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
||||||
n1_container.add_validator (create {OWN_VALIDATOR}.make_own)
|
n1_container.add_validator (create {OWN_VALIDATOR}.make_own)
|
||||||
form.add_control (n1_container)
|
form.add_control (n1_container)
|
||||||
--Number 2
|
--Number 2
|
||||||
create textbox2.make_input ("txtBox2", "2")
|
create textbox2.make ("txtBox2", "2")
|
||||||
create n2_container.make_form_element ("Number2", textbox2)
|
create n2_container.make ("Number2", textbox2)
|
||||||
n2_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
n2_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make_decimal_validator ("Invalid Number"))
|
||||||
form.add_control (n2_container)
|
form.add_control (n2_container)
|
||||||
--Flag autocomplete
|
--Flag autocomplete
|
||||||
create autocompletion1.make_autocomplete ("autocompletion1", create {FLAG_AUTOCOMPLETION}.make)
|
create autocompletion1.make ("autocompletion1", create {FLAG_AUTOCOMPLETION}.make)
|
||||||
create n3_container.make_form_element ("Flag Autocomplete", autocompletion1)
|
create n3_container.make ("Flag Autocomplete", autocompletion1)
|
||||||
form.add_control (n3_container)
|
form.add_control (n3_container)
|
||||||
--Contact autocomplete
|
--Contact autocomplete
|
||||||
create autocompletion2.make_autocomplete ("autocompletion2", create {CONTACT_AUTOCOMPLETION}.make)
|
create autocompletion2.make ("autocompletion2", create {CONTACT_AUTOCOMPLETION}.make)
|
||||||
create n4_container.make_form_element ("Contact Autocomplete", autocompletion2)
|
create n4_container.make ("Contact Autocomplete", autocompletion2)
|
||||||
form.add_control (n4_container)
|
form.add_control (n4_container)
|
||||||
--Google autocomplete
|
--Google autocomplete
|
||||||
create autocompletion3.make_autocomplete ("autocompletion4", create {GOOGLE_AUTOCOMPLETION}.make)
|
create autocompletion3.make ("autocompletion4", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||||
create n5_container.make_form_element ("Google Autocomplete", autocompletion3)
|
create n5_container.make ("Google Autocomplete", autocompletion3)
|
||||||
form.add_control (n5_container)
|
form.add_control (n5_container)
|
||||||
--Categories
|
--Categories
|
||||||
create cklist.make_checkbox_list_control ("categories")
|
create cklist.make ("categories")
|
||||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("net", "Network", "net"))
|
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("net", "Network", "net"))
|
||||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("os", "Operating Systems", "os"))
|
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("os", "Operating Systems", "os"))
|
||||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("fmfp", "Formal Methods and Functional Programming", "fmfp"))
|
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("fmfp", "Formal Methods and Functional Programming", "fmfp"))
|
||||||
create cats_container.make_form_element ("Categories", cklist)
|
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_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"))
|
cats_container.add_validator (create {WSF_MAX_VALIDATOR [STRING]}.make_max_validator (2, "Choose at most two category"))
|
||||||
form.add_control (cats_container)
|
form.add_control (cats_container)
|
||||||
--Button 1
|
--Button 1
|
||||||
create button1.make_button ("sample_button1", "Update")
|
create button1.make ("sample_button1", "Update")
|
||||||
button1.set_click_event (agent handle_click)
|
button1.set_click_event (agent handle_click)
|
||||||
button1.add_class ("col-lg-offset-2")
|
button1.add_class ("col-lg-offset-2")
|
||||||
form.add_control (button1)
|
form.add_control (button1)
|
||||||
--Button 2
|
--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)
|
button2.set_click_event (agent handle_click)
|
||||||
form.add_control (button2)
|
form.add_control (button2)
|
||||||
--Result
|
--Result
|
||||||
create result_html.make_html ("txtBox3", "p", "")
|
create result_html.make ("txtBox3", "p", "")
|
||||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Result", result_html))
|
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make ("Result", result_html))
|
||||||
control.add_control (form)
|
control.add_control (form)
|
||||||
|
|
||||||
--Progress bar
|
--Progress bar
|
||||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h4", "", "Autoincrementing progressbar"))
|
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h4", "", "Autoincrementing progressbar"))
|
||||||
create source.make
|
create source.make
|
||||||
create progress.make_progress_with_source ("progress1", source)
|
create progress.make_with_source ("progress1", source)
|
||||||
source.set_control (progress)
|
source.set_control (progress)
|
||||||
progress.set_isolation (true)
|
progress.set_isolation (true)
|
||||||
control.add_control (progress)
|
control.add_control (progress)
|
||||||
|
|||||||
Reference in New Issue
Block a user