Extracted the WIDGET and FORM classes out of "cms" component
and build the wsf_html library which also include the previous css lib.
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
<setting name="concurrency" value="thread"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<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" readonly="false"/>
|
<library name="encoder" location="..\..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
|
||||||
<library name="css" location="..\..\library\text\css\css-safe.ecf" readonly="false"/>
|
<library name="wsf_html" location="..\..\..\library\server\wsf_html\wsf_html-safe.ecf" readonly="false"/>
|
||||||
<library name="http" location="..\..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
<library name="http" location="..\..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
|
||||||
<library name="openid" location="..\..\..\library\security\openid\consumer\openid-safe.ecf" readonly="false"/>
|
<library name="openid" location="..\..\..\library\security\openid\consumer\openid-safe.ecf" readonly="false"/>
|
||||||
<library name="process" location="$ISE_LIBRARY\library\process\process-safe.ecf"/>
|
<library name="process" location="$ISE_LIBRARY\library\process\process-safe.ecf"/>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
<library name="encoder" location="..\..\..\library\text\encoder\encoder.ecf" readonly="false"/>
|
<library name="encoder" location="..\..\..\library\text\encoder\encoder.ecf" readonly="false"/>
|
||||||
<library name="css" location="..\..\library\text\css\css.ecf" readonly="false"/>
|
<library name="wsf_html" location="..\..\..\library\server\wsf_html\wsf_html.ecf" readonly="false"/>
|
||||||
<library name="http" location="..\..\..\library\network\protocol\http\http.ecf" readonly="false"/>
|
<library name="http" location="..\..\..\library\network\protocol\http\http.ecf" readonly="false"/>
|
||||||
<library name="openid" location="..\..\..\library\security\openid\consumer\openid.ecf" />
|
<library name="openid" location="..\..\..\library\security\openid\consumer\openid.ecf" />
|
||||||
<library name="process" location="$ISE_LIBRARY\library\process\process.ecf"/>
|
<library name="process" location="$ISE_LIBRARY\library\process\process.ecf"/>
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ feature -- Execution
|
|||||||
set_main_content (s)
|
set_main_content (s)
|
||||||
end
|
end
|
||||||
|
|
||||||
new_table: CMS_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
new_table: WSF_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
||||||
local
|
local
|
||||||
l_table: CMS_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
l_table: WSF_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
||||||
do
|
do
|
||||||
create l_table.make
|
create l_table.make
|
||||||
l_table.add_css_style ("width: 85%%; border: solid 1px #999; padding: 2px;")
|
l_table.add_css_style ("width: 85%%; border: solid 1px #999; padding: 2px;")
|
||||||
@@ -53,10 +53,10 @@ feature -- Execution
|
|||||||
|
|
||||||
l_table.set_data (<<"foo", "bar", "foobar">>)
|
l_table.set_data (<<"foo", "bar", "foobar">>)
|
||||||
l_table.set_foot_data (<<"abc", "def">>)
|
l_table.set_foot_data (<<"abc", "def">>)
|
||||||
l_table.set_compute_item_function (agent (d: READABLE_STRING_8): CMS_WIDGET_TABLE_ROW
|
l_table.set_compute_item_function (agent (d: READABLE_STRING_8): WSF_WIDGET_TABLE_ROW
|
||||||
local
|
local
|
||||||
i: INTEGER
|
i: INTEGER
|
||||||
w: CMS_WIDGET_TABLE_ITEM
|
w: WSF_WIDGET_TABLE_ITEM
|
||||||
do
|
do
|
||||||
create Result.make (d.count)
|
create Result.make (d.count)
|
||||||
if d.is_case_insensitive_equal ("bar") then
|
if d.is_case_insensitive_equal ("bar") then
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ feature -- Message
|
|||||||
add_message (a_msg, "success")
|
add_message (a_msg, "success")
|
||||||
end
|
end
|
||||||
|
|
||||||
report_form_errors (fd: CMS_FORM_DATA)
|
report_form_errors (fd: WSF_FORM_DATA)
|
||||||
require
|
require
|
||||||
has_error: not fd.is_valid
|
has_error: not fd.is_valid
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ feature -- Hook: form_alter
|
|||||||
|
|
||||||
form_alter_hooks: detachable ARRAYED_LIST [CMS_HOOK_FORM_ALTER]
|
form_alter_hooks: detachable ARRAYED_LIST [CMS_HOOK_FORM_ALTER]
|
||||||
|
|
||||||
call_form_alter_hooks (f: CMS_FORM; a_form_data: detachable CMS_FORM_DATA; a_execution: CMS_EXECUTION)
|
call_form_alter_hooks (f: CMS_FORM; a_form_data: detachable WSF_FORM_DATA; a_execution: CMS_EXECUTION)
|
||||||
do
|
do
|
||||||
if attached form_alter_hooks as lst then
|
if attached form_alter_hooks as lst then
|
||||||
across
|
across
|
||||||
|
|||||||
43
draft/application/cms/src/form/cms_form.e
Normal file
43
draft/application/cms/src/form/cms_form.e
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {CMS_FORM}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
CMS_FORM
|
||||||
|
|
||||||
|
inherit
|
||||||
|
WSF_FORM
|
||||||
|
rename
|
||||||
|
process as process_form
|
||||||
|
end
|
||||||
|
|
||||||
|
create
|
||||||
|
make
|
||||||
|
|
||||||
|
feature -- Basic operation
|
||||||
|
|
||||||
|
prepare (a_execution: CMS_EXECUTION)
|
||||||
|
do
|
||||||
|
a_execution.service.call_form_alter_hooks (Current, Void, a_execution)
|
||||||
|
end
|
||||||
|
|
||||||
|
process (a_execution: CMS_EXECUTION)
|
||||||
|
do
|
||||||
|
process_form (a_execution.request, agent on_prepared (a_execution, ?), agent on_processed (a_execution, ?))
|
||||||
|
end
|
||||||
|
|
||||||
|
on_prepared (a_execution: CMS_EXECUTION; fd: WSF_FORM_DATA)
|
||||||
|
do
|
||||||
|
a_execution.service.call_form_alter_hooks (Current, fd, a_execution)
|
||||||
|
end
|
||||||
|
|
||||||
|
on_processed (a_execution: CMS_EXECUTION; fd: WSF_FORM_DATA)
|
||||||
|
do
|
||||||
|
if not fd.is_valid or fd.has_error then
|
||||||
|
a_execution.report_form_errors (fd)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -12,7 +12,7 @@ inherit
|
|||||||
|
|
||||||
feature -- Hook
|
feature -- Hook
|
||||||
|
|
||||||
form_alter (a_form: CMS_FORM; a_form_data: detachable CMS_FORM_DATA; a_execution: CMS_EXECUTION)
|
form_alter (a_form: CMS_FORM; a_form_data: detachable WSF_FORM_DATA; a_execution: CMS_EXECUTION)
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ feature -- Factory
|
|||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
change_node (a_execution: CMS_EXECUTION; a_form_data: CMS_FORM_DATA; a_node: like new_node)
|
change_node (a_execution: CMS_EXECUTION; a_form_data: WSF_FORM_DATA; a_node: like new_node)
|
||||||
-- Apply data from `a_form_data' to a_node
|
-- Apply data from `a_form_data' to a_node
|
||||||
require
|
require
|
||||||
a_node.has_id
|
a_node.has_id
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
new_node (a_execution: CMS_EXECUTION; a_form_data: CMS_FORM_DATA; a_node: detachable like new_node): CMS_NODE
|
new_node (a_execution: CMS_EXECUTION; a_form_data: WSF_FORM_DATA; a_node: detachable like new_node): CMS_NODE
|
||||||
-- New content created with `a_form_data'
|
-- New content created with `a_form_data'
|
||||||
deferred
|
deferred
|
||||||
ensure
|
ensure
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
note
|
|
||||||
description: "Summary description for {CMS_FORM_ITEM}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
|
||||||
revision: "$Revision$"
|
|
||||||
|
|
||||||
deferred class
|
|
||||||
CMS_FORM_ITEM
|
|
||||||
|
|
||||||
inherit
|
|
||||||
CMS_WIDGET
|
|
||||||
|
|
||||||
WITH_CSS_CLASS
|
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -81,7 +81,7 @@ feature -- Execution
|
|||||||
|
|
||||||
feature -- Forms
|
feature -- Forms
|
||||||
|
|
||||||
edit_form_submit (fd: CMS_FORM_DATA; a_roles: LIST [CMS_USER_ROLE])
|
edit_form_submit (fd: WSF_FORM_DATA; a_roles: LIST [CMS_USER_ROLE])
|
||||||
local
|
local
|
||||||
l_role: CMS_USER_ROLE
|
l_role: CMS_USER_ROLE
|
||||||
do
|
do
|
||||||
@@ -120,9 +120,9 @@ feature -- Forms
|
|||||||
new_edit_form (a_action: READABLE_STRING_8; a_roles: LIST [CMS_USER_ROLE]; a_use_data: BOOLEAN): CMS_FORM
|
new_edit_form (a_action: READABLE_STRING_8; a_roles: LIST [CMS_USER_ROLE]; a_use_data: BOOLEAN): CMS_FORM
|
||||||
local
|
local
|
||||||
perms: ARRAYED_SET [READABLE_STRING_8]
|
perms: ARRAYED_SET [READABLE_STRING_8]
|
||||||
tb: CMS_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
tb: WSF_WIDGET_AGENT_TABLE [READABLE_STRING_8]
|
||||||
i: INTEGER
|
i: INTEGER
|
||||||
tf: CMS_FORM_TEXT_INPUT
|
tf: WSF_FORM_TEXT_INPUT
|
||||||
do
|
do
|
||||||
create perms.make (10)
|
create perms.make (10)
|
||||||
perms.compare_objects
|
perms.compare_objects
|
||||||
@@ -158,10 +158,10 @@ feature -- Forms
|
|||||||
|
|
||||||
tb.add_css_style ("border: solid 1px #999;")
|
tb.add_css_style ("border: solid 1px #999;")
|
||||||
tb.set_data (perms)
|
tb.set_data (perms)
|
||||||
tb.set_compute_item_function (agent (p: READABLE_STRING_8; ia_roles: LIST [CMS_USER_ROLE]; ia_use_data: BOOLEAN): CMS_WIDGET_TABLE_ROW
|
tb.set_compute_item_function (agent (p: READABLE_STRING_8; ia_roles: LIST [CMS_USER_ROLE]; ia_use_data: BOOLEAN): WSF_WIDGET_TABLE_ROW
|
||||||
local
|
local
|
||||||
it: CMS_WIDGET_TABLE_ITEM
|
it: WSF_WIDGET_TABLE_ITEM
|
||||||
cb: CMS_FORM_CHECKBOX_INPUT
|
cb: WSF_FORM_CHECKBOX_INPUT
|
||||||
do
|
do
|
||||||
create Result.make (1 + ia_roles.count)
|
create Result.make (1 + ia_roles.count)
|
||||||
create it.make_with_text (p)
|
create it.make_with_text (p)
|
||||||
@@ -188,21 +188,21 @@ feature -- Forms
|
|||||||
create Result.make (a_action, "edit-user-roles")
|
create Result.make (a_action, "edit-user-roles")
|
||||||
Result.set_method_post
|
Result.set_method_post
|
||||||
Result.extend (tb.to_computed_table)
|
Result.extend (tb.to_computed_table)
|
||||||
Result.extend (create {CMS_FORM_SUBMIT_INPUT}.make_with_text ("op", "Apply"))
|
Result.extend (create {WSF_FORM_SUBMIT_INPUT}.make_with_text ("op", "Apply"))
|
||||||
|
|
||||||
create tf.make ("new-role")
|
create tf.make ("new-role")
|
||||||
tf.add_css_class ("horizontal")
|
tf.add_css_class ("horizontal")
|
||||||
tf.set_size (24)
|
tf.set_size (24)
|
||||||
tf.set_label ("New user role")
|
tf.set_label ("New user role")
|
||||||
Result.extend (tf)
|
Result.extend (tf)
|
||||||
Result.extend (create {CMS_FORM_SUBMIT_INPUT}.make_with_text ("op", "Add role"))
|
Result.extend (create {WSF_FORM_SUBMIT_INPUT}.make_with_text ("op", "Add role"))
|
||||||
|
|
||||||
create tf.make ("new-permission")
|
create tf.make ("new-permission")
|
||||||
tf.add_css_class ("horizontal")
|
tf.add_css_class ("horizontal")
|
||||||
tf.set_size (24)
|
tf.set_size (24)
|
||||||
tf.set_label ("New permission")
|
tf.set_label ("New permission")
|
||||||
Result.extend (tf)
|
Result.extend (tf)
|
||||||
Result.extend (create {CMS_FORM_SUBMIT_INPUT}.make_with_text ("op", "Add permission"))
|
Result.extend (create {WSF_FORM_SUBMIT_INPUT}.make_with_text ("op", "Add permission"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ feature -- Factory
|
|||||||
|
|
||||||
fill_edit_form (f: CMS_FORM; a_node: detachable CMS_NODE)
|
fill_edit_form (f: CMS_FORM; a_node: detachable CMS_NODE)
|
||||||
local
|
local
|
||||||
ti: CMS_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
fset: CMS_FORM_FIELD_SET
|
fset: WSF_FORM_FIELD_SET
|
||||||
ta: CMS_FORM_TEXTAREA
|
ta: WSF_FORM_TEXTAREA
|
||||||
tselect: CMS_FORM_SELECT
|
tselect: WSF_FORM_SELECT
|
||||||
opt: CMS_FORM_SELECT_OPTION
|
opt: WSF_FORM_SELECT_OPTION
|
||||||
do
|
do
|
||||||
create ti.make ("title")
|
create ti.make ("title")
|
||||||
ti.set_label ("Title")
|
ti.set_label ("Title")
|
||||||
@@ -96,7 +96,7 @@ feature -- Factory
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
change_node (a_execution: CMS_EXECUTION; fd: CMS_FORM_DATA; a_node: like new_node)
|
change_node (a_execution: CMS_EXECUTION; fd: WSF_FORM_DATA; a_node: like new_node)
|
||||||
local
|
local
|
||||||
b: detachable READABLE_STRING_8
|
b: detachable READABLE_STRING_8
|
||||||
f: detachable CMS_FORMAT
|
f: detachable CMS_FORMAT
|
||||||
@@ -123,7 +123,7 @@ feature -- Factory
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
new_node (a_execution: CMS_EXECUTION; fd: CMS_FORM_DATA; a_node: detachable like new_node): CMS_PAGE
|
new_node (a_execution: CMS_EXECUTION; fd: WSF_FORM_DATA; a_node: detachable like new_node): CMS_PAGE
|
||||||
-- <Precursor>
|
-- <Precursor>
|
||||||
local
|
local
|
||||||
b: detachable READABLE_STRING_8
|
b: detachable READABLE_STRING_8
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: like edit_form
|
f: like edit_form
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
create b.make_empty
|
create b.make_empty
|
||||||
if attached non_empty_string_path_parameter ("type") as s_type then
|
if attached non_empty_string_path_parameter ("type") as s_type then
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ inherit
|
|||||||
|
|
||||||
feature -- Form
|
feature -- Form
|
||||||
|
|
||||||
edit_form_validate (fd: CMS_FORM_DATA; b: STRING)
|
edit_form_validate (fd: WSF_FORM_DATA; b: STRING)
|
||||||
local
|
local
|
||||||
l_preview: BOOLEAN
|
l_preview: BOOLEAN
|
||||||
l_format: detachable CMS_FORMAT
|
l_format: detachable CMS_FORMAT
|
||||||
@@ -39,7 +39,7 @@ feature -- Form
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
edit_form_submit (fd: CMS_FORM_DATA; a_node: detachable CMS_NODE; a_type: CMS_CONTENT_TYPE; b: STRING)
|
edit_form_submit (fd: WSF_FORM_DATA; a_node: detachable CMS_NODE; a_type: CMS_CONTENT_TYPE; b: STRING)
|
||||||
local
|
local
|
||||||
l_preview: BOOLEAN
|
l_preview: BOOLEAN
|
||||||
l_node: detachable CMS_NODE
|
l_node: detachable CMS_NODE
|
||||||
@@ -77,7 +77,7 @@ feature -- Form
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- edit_form_submit (fd: CMS_FORM_DATA; a_type: CMS_CONTENT_TYPE; b: STRING)
|
-- edit_form_submit (fd: WSF_FORM_DATA; a_type: CMS_CONTENT_TYPE; b: STRING)
|
||||||
-- local
|
-- local
|
||||||
-- l_preview: BOOLEAN
|
-- l_preview: BOOLEAN
|
||||||
-- do
|
-- do
|
||||||
@@ -110,8 +110,8 @@ feature -- Form
|
|||||||
edit_form (a_node: detachable CMS_NODE; a_url: READABLE_STRING_8; a_name: STRING; a_type: CMS_CONTENT_TYPE): CMS_FORM
|
edit_form (a_node: detachable CMS_NODE; a_url: READABLE_STRING_8; a_name: STRING; a_type: CMS_CONTENT_TYPE): CMS_FORM
|
||||||
local
|
local
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
th: CMS_FORM_HIDDEN_INPUT
|
th: WSF_FORM_HIDDEN_INPUT
|
||||||
do
|
do
|
||||||
create f.make (a_url, a_name)
|
create f.make (a_url, a_name)
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: like edit_form
|
f: like edit_form
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
create b.make_empty
|
create b.make_empty
|
||||||
if
|
if
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
b: STRING
|
b: STRING
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
tf: CMS_FORM_TEXT_INPUT
|
tf: WSF_FORM_TEXT_INPUT
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
o: OPENID_CONSUMER
|
o: OPENID_CONSUMER
|
||||||
v: OPENID_CONSUMER_VALIDATION
|
v: OPENID_CONSUMER_VALIDATION
|
||||||
tb: HASH_TABLE [READABLE_STRING_8, STRING_8]
|
tb: HASH_TABLE [READABLE_STRING_8, STRING_8]
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ feature -- Hooks
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
form_alter (a_form: CMS_FORM; a_form_data: detachable CMS_FORM_DATA; a_execution: CMS_EXECUTION)
|
form_alter (a_form: CMS_FORM; a_form_data: detachable WSF_FORM_DATA; a_execution: CMS_EXECUTION)
|
||||||
local
|
local
|
||||||
i: CMS_FORM_DIV
|
i: WSF_FORM_DIV
|
||||||
fh: CMS_FORM_HIDDEN_INPUT
|
fh: WSF_FORM_HIDDEN_INPUT
|
||||||
do
|
do
|
||||||
if a_form.id.same_string ("openid-login") then
|
if a_form.id.same_string ("openid-login") then
|
||||||
create i.make_with_text_and_css_id (
|
create i.make_with_text_and_css_id (
|
||||||
@@ -82,7 +82,7 @@ feature -- Hooks
|
|||||||
,
|
,
|
||||||
"openid"
|
"openid"
|
||||||
)
|
)
|
||||||
if attached a_form.items_by_type ({CMS_WIDGET_TEXT}) as lst and then not lst.is_empty then
|
if attached a_form.items_by_type ({WSF_WIDGET_TEXT}) as lst and then not lst.is_empty then
|
||||||
a_form.insert_before (i, lst.last)
|
a_form.insert_before (i, lst.last)
|
||||||
else
|
else
|
||||||
a_form.extend (i)
|
a_form.extend (i)
|
||||||
@@ -98,7 +98,7 @@ feature -- Hooks
|
|||||||
across
|
across
|
||||||
f_lst as c
|
f_lst as c
|
||||||
loop
|
loop
|
||||||
if attached {CMS_FORM_TEXT_INPUT} c.item as txt then
|
if attached {WSF_FORM_TEXT_INPUT} c.item as txt then
|
||||||
txt.set_text_value (l_openid_nickname.to_string_32)
|
txt.set_text_value (l_openid_nickname.to_string_32)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -110,7 +110,7 @@ feature -- Hooks
|
|||||||
across
|
across
|
||||||
f_lst as c
|
f_lst as c
|
||||||
loop
|
loop
|
||||||
if attached {CMS_FORM_TEXT_INPUT} c.item as txt then
|
if attached {WSF_FORM_TEXT_INPUT} c.item as txt then
|
||||||
txt.set_text_value (l_openid_email.to_string_32)
|
txt.set_text_value (l_openid_email.to_string_32)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -122,7 +122,7 @@ feature -- Hooks
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
openid_user_register_submitted (a_form_data: CMS_FORM_DATA)
|
openid_user_register_submitted (a_form_data: WSF_FORM_DATA)
|
||||||
do
|
do
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ feature -- Execution
|
|||||||
l_url: detachable READABLE_STRING_8
|
l_url: detachable READABLE_STRING_8
|
||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
if
|
if
|
||||||
attached {WSF_STRING} request.item ("destination") as s_dest
|
attached {WSF_STRING} request.item ("destination") as s_dest
|
||||||
@@ -134,7 +134,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
on_form_submitted (fd: CMS_FORM_DATA)
|
on_form_submitted (fd: WSF_FORM_DATA)
|
||||||
local
|
local
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
do
|
do
|
||||||
@@ -159,12 +159,12 @@ feature -- Execution
|
|||||||
|
|
||||||
login_form (a_action: READABLE_STRING_8; a_form_name: READABLE_STRING_8; a_destination: READABLE_STRING_8): CMS_FORM
|
login_form (a_action: READABLE_STRING_8; a_form_name: READABLE_STRING_8; a_destination: READABLE_STRING_8): CMS_FORM
|
||||||
local
|
local
|
||||||
th: CMS_FORM_HIDDEN_INPUT
|
th: WSF_FORM_HIDDEN_INPUT
|
||||||
ti: CMS_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
tp: CMS_FORM_PASSWORD_INPUT
|
tp: WSF_FORM_PASSWORD_INPUT
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
l_logo: CMS_FORM_RAW_TEXT
|
l_logo: WSF_FORM_RAW_TEXT
|
||||||
d: CMS_FORM_DIV
|
d: WSF_FORM_DIV
|
||||||
do
|
do
|
||||||
create Result.make (a_action, a_form_name)
|
create Result.make (a_action, a_form_name)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
l_is_editing_current_user: BOOLEAN
|
l_is_editing_current_user: BOOLEAN
|
||||||
do
|
do
|
||||||
@@ -63,7 +63,7 @@ feature -- Execution
|
|||||||
set_main_content (b)
|
set_main_content (b)
|
||||||
end
|
end
|
||||||
|
|
||||||
edit_form_validate (fd: CMS_FORM_DATA; u: CMS_USER)
|
edit_form_validate (fd: WSF_FORM_DATA; u: CMS_USER)
|
||||||
local
|
local
|
||||||
fu: detachable CMS_USER
|
fu: detachable CMS_USER
|
||||||
do
|
do
|
||||||
@@ -81,7 +81,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
edit_form_submit (fd: CMS_FORM_DATA; u: CMS_USER; a_is_editing_current_user: BOOLEAN; b: STRING)
|
edit_form_submit (fd: WSF_FORM_DATA; u: CMS_USER; a_is_editing_current_user: BOOLEAN; b: STRING)
|
||||||
local
|
local
|
||||||
up: detachable CMS_USER_PROFILE
|
up: detachable CMS_USER_PROFILE
|
||||||
l_roles: like {CMS_USER}.roles
|
l_roles: like {CMS_USER}.roles
|
||||||
@@ -138,12 +138,12 @@ feature -- Execution
|
|||||||
edit_form (u: CMS_USER; a_url: READABLE_STRING_8; a_name: STRING): CMS_FORM
|
edit_form (u: CMS_USER; a_url: READABLE_STRING_8; a_name: STRING): CMS_FORM
|
||||||
local
|
local
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
ti: CMS_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
tp: CMS_FORM_PASSWORD_INPUT
|
tp: WSF_FORM_PASSWORD_INPUT
|
||||||
ta: CMS_FORM_TEXTAREA
|
ta: WSF_FORM_TEXTAREA
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
tset: CMS_FORM_FIELD_SET
|
tset: WSF_FORM_FIELD_SET
|
||||||
cb: CMS_FORM_CHECKBOX_INPUT
|
cb: WSF_FORM_CHECKBOX_INPUT
|
||||||
do
|
do
|
||||||
create f.make (a_url, a_name)
|
create f.make (a_url, a_name)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ feature -- Execution
|
|||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
set_title ("Request new password")
|
set_title ("Request new password")
|
||||||
create b.make_empty
|
create b.make_empty
|
||||||
@@ -56,7 +56,7 @@ feature -- Execution
|
|||||||
set_main_content (b)
|
set_main_content (b)
|
||||||
end
|
end
|
||||||
|
|
||||||
password_form_validate (fd: CMS_FORM_DATA)
|
password_form_validate (fd: WSF_FORM_DATA)
|
||||||
local
|
local
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
do
|
do
|
||||||
@@ -73,7 +73,7 @@ feature -- Execution
|
|||||||
initialize_primary_tabs (u)
|
initialize_primary_tabs (u)
|
||||||
end
|
end
|
||||||
|
|
||||||
password_form_submit (fd: CMS_FORM_DATA; b: STRING)
|
password_form_submit (fd: WSF_FORM_DATA; b: STRING)
|
||||||
local
|
local
|
||||||
e: detachable CMS_EMAIL
|
e: detachable CMS_EMAIL
|
||||||
l_uuid: UUID
|
l_uuid: UUID
|
||||||
@@ -113,9 +113,9 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
u: like user
|
u: like user
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
ti: CMS_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
th: CMS_FORM_HIDDEN_INPUT
|
th: WSF_FORM_HIDDEN_INPUT
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
err: BOOLEAN
|
err: BOOLEAN
|
||||||
do
|
do
|
||||||
create f.make (a_url, a_name)
|
create f.make (a_url, a_name)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ feature -- Execution
|
|||||||
local
|
local
|
||||||
b: STRING_8
|
b: STRING_8
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
fd: detachable CMS_FORM_DATA
|
fd: detachable WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
set_title ("Create new account")
|
set_title ("Create new account")
|
||||||
create b.make_empty
|
create b.make_empty
|
||||||
@@ -50,7 +50,7 @@ feature -- Execution
|
|||||||
set_main_content (b)
|
set_main_content (b)
|
||||||
end
|
end
|
||||||
|
|
||||||
registration_form_validate (fd: CMS_FORM_DATA)
|
registration_form_validate (fd: WSF_FORM_DATA)
|
||||||
local
|
local
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
do
|
do
|
||||||
@@ -68,7 +68,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
registration_form_submitted (fd: CMS_FORM_DATA; buf: STRING)
|
registration_form_submitted (fd: WSF_FORM_DATA; buf: STRING)
|
||||||
local
|
local
|
||||||
b: STRING
|
b: STRING
|
||||||
u: detachable CMS_USER
|
u: detachable CMS_USER
|
||||||
@@ -124,17 +124,17 @@ feature -- Execution
|
|||||||
registration_form (a_url: READABLE_STRING_8; a_name: STRING): CMS_FORM
|
registration_form (a_url: READABLE_STRING_8; a_name: STRING): CMS_FORM
|
||||||
local
|
local
|
||||||
f: CMS_FORM
|
f: CMS_FORM
|
||||||
ti: CMS_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
tp: CMS_FORM_PASSWORD_INPUT
|
tp: WSF_FORM_PASSWORD_INPUT
|
||||||
ta: CMS_FORM_TEXTAREA
|
ta: WSF_FORM_TEXTAREA
|
||||||
ts: CMS_FORM_SUBMIT_INPUT
|
ts: WSF_FORM_SUBMIT_INPUT
|
||||||
do
|
do
|
||||||
create f.make (a_url, a_name)
|
create f.make (a_url, a_name)
|
||||||
|
|
||||||
create ti.make ("username")
|
create ti.make ("username")
|
||||||
ti.set_label ("Username")
|
ti.set_label ("Username")
|
||||||
ti.set_is_required (True)
|
ti.set_is_required (True)
|
||||||
ti.set_validation_action (agent (fd: CMS_FORM_DATA)
|
ti.set_validation_action (agent (fd: WSF_FORM_DATA)
|
||||||
do
|
do
|
||||||
if attached {WSF_STRING} fd.item ("username") as f_username and then f_username.value.count >= 5 then
|
if attached {WSF_STRING} fd.item ("username") as f_username and then f_username.value.count >= 5 then
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ deferred class
|
|||||||
CMS_THEME
|
CMS_THEME
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
WSF_THEME
|
||||||
|
undefine
|
||||||
|
url_encoded,
|
||||||
|
html_encoded
|
||||||
|
end
|
||||||
|
|
||||||
CMS_COMMON_API
|
CMS_COMMON_API
|
||||||
|
|
||||||
feature {NONE} -- Access
|
feature {NONE} -- Access
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM}."
|
description: "Summary description for {WSF_FORM}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM
|
WSF_FORM
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_COMPOSITE
|
WSF_FORM_COMPOSITE
|
||||||
|
|
||||||
|
WSF_WITH_HTML_ATTRIBUTE
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -48,41 +50,42 @@ feature -- Access
|
|||||||
-- Form's method
|
-- Form's method
|
||||||
--| GET or POST
|
--| GET or POST
|
||||||
|
|
||||||
|
encoding_type: detachable READABLE_STRING_8
|
||||||
|
-- Encoding type
|
||||||
|
|
||||||
feature -- Basic operation
|
feature -- Basic operation
|
||||||
|
|
||||||
prepare (a_execution: CMS_EXECUTION)
|
process (req: WSF_REQUEST; a_before_callback, a_after_callback: detachable PROCEDURE [ANY, TUPLE [WSF_FORM_DATA]])
|
||||||
do
|
-- Process Current form with request `req'
|
||||||
a_execution.service.call_form_alter_hooks (Current, Void, a_execution)
|
-- agent `a_before_callback' is called before the validation
|
||||||
end
|
-- agent `a_after_callback' is called after the validation
|
||||||
|
|
||||||
process (a_execution: CMS_EXECUTION)
|
|
||||||
local
|
local
|
||||||
fd: CMS_FORM_DATA
|
fd: WSF_FORM_DATA
|
||||||
do
|
do
|
||||||
create fd.make (a_execution.request, Current)
|
create fd.make (req, Current)
|
||||||
last_data := fd
|
last_data := fd
|
||||||
a_execution.service.call_form_alter_hooks (Current, fd, a_execution)
|
if a_before_callback /= Void then
|
||||||
|
a_before_callback.call ([fd])
|
||||||
|
end
|
||||||
fd.validate
|
fd.validate
|
||||||
fd.apply_to_associated_form -- Maybe only when has error?
|
fd.apply_to_associated_form -- Maybe only when has error?
|
||||||
if fd.is_valid then
|
if fd.is_valid then
|
||||||
fd.submit
|
fd.submit
|
||||||
if fd.has_error then
|
end
|
||||||
a_execution.report_form_errors (fd)
|
if a_after_callback /= Void then
|
||||||
end
|
a_after_callback.call ([fd])
|
||||||
else
|
|
||||||
a_execution.report_form_errors (fd)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
last_data: detachable CMS_FORM_DATA
|
last_data: detachable WSF_FORM_DATA
|
||||||
|
|
||||||
feature -- Validation
|
feature -- Validation
|
||||||
|
|
||||||
validation_actions: ACTION_SEQUENCE [TUPLE [CMS_FORM_DATA]]
|
validation_actions: ACTION_SEQUENCE [TUPLE [WSF_FORM_DATA]]
|
||||||
-- Procedure to validate the data
|
-- Procedure to validate the data
|
||||||
-- report error if not valid
|
-- report error if not valid
|
||||||
|
|
||||||
submit_actions: ACTION_SEQUENCE [TUPLE [CMS_FORM_DATA]]
|
submit_actions: ACTION_SEQUENCE [TUPLE [WSF_FORM_DATA]]
|
||||||
-- Submit actions
|
-- Submit actions
|
||||||
|
|
||||||
feature -- Element change
|
feature -- Element change
|
||||||
@@ -97,17 +100,30 @@ feature -- Element change
|
|||||||
method := "POST"
|
method := "POST"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set_encoding_type (s: like encoding_type)
|
||||||
|
do
|
||||||
|
encoding_type := s
|
||||||
|
end
|
||||||
|
|
||||||
|
set_multipart_form_data_encoding_type
|
||||||
|
do
|
||||||
|
encoding_type := "multipart/form-data"
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Optional
|
feature -- Optional
|
||||||
|
|
||||||
html_classes: ARRAYED_LIST [STRING_8]
|
html_classes: ARRAYED_LIST [STRING_8]
|
||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
s: STRING_8
|
s: STRING_8
|
||||||
do
|
do
|
||||||
a_html.append ("<form action=%""+ action +"%" id=%""+ id +"%" method=%""+ method +"%" ")
|
a_html.append ("<form action=%""+ action +"%" id=%""+ id +"%" method=%""+ method +"%"")
|
||||||
|
if attached encoding_type as enctype then
|
||||||
|
a_html.append (" enctype=%""+ enctype +"%"")
|
||||||
|
end
|
||||||
if not html_classes.is_empty then
|
if not html_classes.is_empty then
|
||||||
create s.make_empty
|
create s.make_empty
|
||||||
across
|
across
|
||||||
@@ -129,7 +145,7 @@ feature -- Conversion
|
|||||||
a_html.append ("</form>%N")
|
a_html.append ("</form>%N")
|
||||||
end
|
end
|
||||||
|
|
||||||
to_html (a_theme: CMS_THEME): STRING_8
|
to_html (a_theme: WSF_THEME): STRING_8
|
||||||
do
|
do
|
||||||
create Result.make_empty
|
create Result.make_empty
|
||||||
append_to_html (a_theme, Result)
|
append_to_html (a_theme, Result)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_BUTTON_INPUT}."
|
description: "Summary description for {WSF_FORM_BUTTON_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_BUTTON_INPUT
|
WSF_FORM_BUTTON_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_CHECKBOX_INPUT}."
|
description: "Summary description for {WSF_FORM_CHECKBOX_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_CHECKBOX_INPUT
|
WSF_FORM_CHECKBOX_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_SELECTABLE_INPUT
|
WSF_FORM_SELECTABLE_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -5,10 +5,10 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_FORM_COMPOSITE
|
WSF_FORM_COMPOSITE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET_COMPOSITE
|
WSF_WIDGET_COMPOSITE
|
||||||
redefine
|
redefine
|
||||||
extend
|
extend
|
||||||
end
|
end
|
||||||
@@ -22,18 +22,18 @@ feature -- Status
|
|||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
fields_by_name (a_name: READABLE_STRING_GENERAL): detachable LIST [CMS_FORM_FIELD]
|
fields_by_name (a_name: READABLE_STRING_GENERAL): detachable LIST [WSF_FORM_FIELD]
|
||||||
do
|
do
|
||||||
Result := fields_by_name_from (Current, a_name)
|
Result := fields_by_name_from (Current, a_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Change
|
feature -- Change
|
||||||
|
|
||||||
extend (i: CMS_WIDGET)
|
extend (i: WSF_WIDGET)
|
||||||
local
|
local
|
||||||
n: READABLE_STRING_8
|
n: READABLE_STRING_8
|
||||||
do
|
do
|
||||||
if attached {CMS_FORM_FIELD} i as l_field then
|
if attached {WSF_FORM_FIELD} i as l_field then
|
||||||
n := l_field.name
|
n := l_field.name
|
||||||
if n.is_empty then
|
if n.is_empty then
|
||||||
n := (items.count + 1).out
|
n := (items.count + 1).out
|
||||||
@@ -45,34 +45,34 @@ feature -- Change
|
|||||||
|
|
||||||
feature {NONE} -- Implementation: Items
|
feature {NONE} -- Implementation: Items
|
||||||
|
|
||||||
container_has_field (a_container: ITERABLE [CMS_WIDGET]; a_name: READABLE_STRING_GENERAL): BOOLEAN
|
container_has_field (a_container: ITERABLE [WSF_WIDGET]; a_name: READABLE_STRING_GENERAL): BOOLEAN
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
a_container as i
|
a_container as i
|
||||||
until
|
until
|
||||||
Result
|
Result
|
||||||
loop
|
loop
|
||||||
if attached {CMS_FORM_FIELD} i.item as l_field and then l_field.name.same_string_general (a_name) then
|
if attached {WSF_FORM_FIELD} i.item as l_field and then l_field.name.same_string_general (a_name) then
|
||||||
Result := True
|
Result := True
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} i.item as l_cont then
|
elseif attached {ITERABLE [WSF_WIDGET]} i.item as l_cont then
|
||||||
Result := container_has_field (l_cont, a_name)
|
Result := container_has_field (l_cont, a_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
fields_by_name_from (a_container: ITERABLE [CMS_WIDGET]; a_name: READABLE_STRING_GENERAL): detachable ARRAYED_LIST [CMS_FORM_FIELD]
|
fields_by_name_from (a_container: ITERABLE [WSF_WIDGET]; a_name: READABLE_STRING_GENERAL): detachable ARRAYED_LIST [WSF_FORM_FIELD]
|
||||||
local
|
local
|
||||||
res: detachable ARRAYED_LIST [CMS_FORM_FIELD]
|
res: detachable ARRAYED_LIST [WSF_FORM_FIELD]
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
a_container as i
|
a_container as i
|
||||||
loop
|
loop
|
||||||
if attached {CMS_FORM_FIELD} i.item as l_field and then l_field.name.same_string_general (a_name) then
|
if attached {WSF_FORM_FIELD} i.item as l_field and then l_field.name.same_string_general (a_name) then
|
||||||
if res = Void then
|
if res = Void then
|
||||||
create res.make (1)
|
create res.make (1)
|
||||||
end
|
end
|
||||||
res.force (l_field)
|
res.force (l_field)
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} i.item as l_cont then
|
elseif attached {ITERABLE [WSF_WIDGET]} i.item as l_cont then
|
||||||
if attached fields_by_name_from (l_cont, a_name) as lst then
|
if attached fields_by_name_from (l_cont, a_name) as lst then
|
||||||
if res = Void then
|
if res = Void then
|
||||||
res := lst
|
res := lst
|
||||||
@@ -5,17 +5,17 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_DATA
|
WSF_FORM_DATA
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
TABLE_ITERABLE [detachable WSF_VALUE, READABLE_STRING_8]
|
TABLE_ITERABLE [detachable WSF_VALUE, READABLE_STRING_8]
|
||||||
|
|
||||||
create {CMS_FORM}
|
create {WSF_FORM}
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make (req: WSF_REQUEST; a_form: CMS_FORM)
|
make (req: WSF_REQUEST; a_form: WSF_FORM)
|
||||||
-- Initialize `Current'.
|
-- Initialize `Current'.
|
||||||
do
|
do
|
||||||
form := a_form
|
form := a_form
|
||||||
@@ -25,7 +25,7 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
form: CMS_FORM
|
form: WSF_FORM
|
||||||
|
|
||||||
feature -- Status
|
feature -- Status
|
||||||
|
|
||||||
@@ -132,11 +132,11 @@ feature -- Basic operation
|
|||||||
form.validation_actions.call ([Current])
|
form.validation_actions.call ([Current])
|
||||||
end
|
end
|
||||||
|
|
||||||
validate_item (w: CMS_WIDGET)
|
validate_item (w: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
if attached {CMS_FORM_FIELD} w as l_field then
|
if attached {WSF_FORM_FIELD} w as l_field then
|
||||||
l_field.validate (Current)
|
l_field.validate (Current)
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} w as lst then
|
elseif attached {ITERABLE [WSF_WIDGET]} w as lst then
|
||||||
across
|
across
|
||||||
lst as c
|
lst as c
|
||||||
loop
|
loop
|
||||||
@@ -182,16 +182,16 @@ feature -- Basic operation
|
|||||||
|
|
||||||
feature {NONE} -- Implementation: apply
|
feature {NONE} -- Implementation: apply
|
||||||
|
|
||||||
apply_to_associated_form_item (a_name: READABLE_STRING_8; a_value: detachable WSF_VALUE; i: CMS_WIDGET)
|
apply_to_associated_form_item (a_name: READABLE_STRING_8; a_value: detachable WSF_VALUE; i: WSF_WIDGET)
|
||||||
local
|
local
|
||||||
do
|
do
|
||||||
if attached {CMS_FORM_FIELD} i as l_field then
|
if attached {WSF_FORM_FIELD} i as l_field then
|
||||||
if not attached {CMS_FORM_SUBMIT_INPUT} l_field then
|
if not attached {WSF_FORM_SUBMIT_INPUT} l_field then
|
||||||
if l_field.name.same_string (a_name) then
|
if l_field.name.same_string (a_name) then
|
||||||
l_field.set_value (a_value)
|
l_field.set_value (a_value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} i as l_set then
|
elseif attached {ITERABLE [WSF_WIDGET]} i as l_set then
|
||||||
across
|
across
|
||||||
l_set as c
|
l_set as c
|
||||||
loop
|
loop
|
||||||
@@ -231,20 +231,20 @@ feature {NONE} -- Implementation
|
|||||||
get_form_items (req, form)
|
get_form_items (req, form)
|
||||||
end
|
end
|
||||||
|
|
||||||
get_form_items (req: WSF_REQUEST; lst: ITERABLE [CMS_WIDGET])
|
get_form_items (req: WSF_REQUEST; lst: ITERABLE [WSF_WIDGET])
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
lst as c
|
lst as c
|
||||||
loop
|
loop
|
||||||
if attached {CMS_FORM_FIELD} c.item as l_field then
|
if attached {WSF_FORM_FIELD} c.item as l_field then
|
||||||
get_form_field_item (req, l_field, l_field.name)
|
get_form_field_item (req, l_field, l_field.name)
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} c.item as l_set then
|
elseif attached {ITERABLE [WSF_WIDGET]} c.item as l_set then
|
||||||
get_form_items (req, l_set)
|
get_form_items (req, l_set)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get_form_field_item (req: WSF_REQUEST; i: CMS_FORM_FIELD; n: READABLE_STRING_8)
|
get_form_field_item (req: WSF_REQUEST; i: WSF_FORM_FIELD; n: READABLE_STRING_8)
|
||||||
local
|
local
|
||||||
v: detachable WSF_VALUE
|
v: detachable WSF_VALUE
|
||||||
do
|
do
|
||||||
@@ -269,7 +269,7 @@ feature {NONE} -- Implementation
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_error (a_field: detachable CMS_FORM_FIELD; a_msg: detachable READABLE_STRING_8)
|
add_error (a_field: detachable WSF_FORM_FIELD; a_msg: detachable READABLE_STRING_8)
|
||||||
local
|
local
|
||||||
err: like errors
|
err: like errors
|
||||||
do
|
do
|
||||||
@@ -322,7 +322,7 @@ feature -- Reports
|
|||||||
Result := attached errors as err and then not err.is_empty
|
Result := attached errors as err and then not err.is_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
errors: detachable ARRAYED_LIST [TUPLE [field: detachable CMS_FORM_FIELD; message: detachable READABLE_STRING_8]]
|
errors: detachable ARRAYED_LIST [TUPLE [field: detachable WSF_FORM_FIELD; message: detachable READABLE_STRING_8]]
|
||||||
|
|
||||||
invariant
|
invariant
|
||||||
|
|
||||||
@@ -5,14 +5,14 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_DIV
|
WSF_FORM_DIV
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_ITEM
|
WSF_FORM_ITEM
|
||||||
|
|
||||||
CMS_FORM_COMPOSITE
|
WSF_FORM_COMPOSITE
|
||||||
|
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -32,16 +32,16 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
make_with_text (s: READABLE_STRING_8)
|
make_with_text (s: READABLE_STRING_8)
|
||||||
do
|
do
|
||||||
make_with_item (create {CMS_FORM_RAW_TEXT}.make (s))
|
make_with_item (create {WSF_FORM_RAW_TEXT}.make (s))
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_item (i: CMS_WIDGET)
|
make_with_item (i: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
initialize_with_count (1)
|
initialize_with_count (1)
|
||||||
extend (i)
|
extend (i)
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_items (it: ITERABLE [CMS_WIDGET])
|
make_with_items (it: ITERABLE [WSF_WIDGET])
|
||||||
do
|
do
|
||||||
initialize_with_count (2)
|
initialize_with_count (2)
|
||||||
across
|
across
|
||||||
@@ -51,7 +51,7 @@ feature {NONE} -- Initialization
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_item_and_css_id (i: CMS_WIDGET; a_css_id: READABLE_STRING_8)
|
make_with_item_and_css_id (i: WSF_WIDGET; a_css_id: READABLE_STRING_8)
|
||||||
do
|
do
|
||||||
make_with_item (i)
|
make_with_item (i)
|
||||||
set_css_id (a_css_id)
|
set_css_id (a_css_id)
|
||||||
@@ -65,7 +65,7 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<div")
|
a_html.append ("<div")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_ITEM}."
|
description: "Summary description for {WSF_FORM_ITEM}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_FORM_FIELD
|
WSF_FORM_FIELD
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_ITEM
|
WSF_FORM_ITEM
|
||||||
|
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
DEBUG_OUTPUT
|
DEBUG_OUTPUT
|
||||||
|
|
||||||
@@ -40,10 +40,10 @@ feature -- Status report
|
|||||||
|
|
||||||
feature -- Validation
|
feature -- Validation
|
||||||
|
|
||||||
validation_action: detachable PROCEDURE [ANY, TUPLE [CMS_FORM_DATA]]
|
validation_action: detachable PROCEDURE [ANY, TUPLE [WSF_FORM_DATA]]
|
||||||
-- Function returning True if valid, otherwise False
|
-- Function returning True if valid, otherwise False
|
||||||
|
|
||||||
validate (fd: CMS_FORM_DATA)
|
validate (fd: WSF_FORM_DATA)
|
||||||
do
|
do
|
||||||
if attached validation_action as act then
|
if attached validation_action as act then
|
||||||
act.call ([fd])
|
act.call ([fd])
|
||||||
@@ -102,7 +102,7 @@ feature -- Element change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
l_class_items: detachable ARRAYED_LIST [READABLE_STRING_8]
|
l_class_items: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||||
do
|
do
|
||||||
@@ -138,7 +138,7 @@ feature -- Conversion
|
|||||||
a_html.append ("</div>")
|
a_html.append ("</div>")
|
||||||
end
|
end
|
||||||
|
|
||||||
append_item_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -5,14 +5,14 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_FIELD_SET
|
WSF_FORM_FIELD_SET
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_ITEM
|
WSF_FORM_ITEM
|
||||||
|
|
||||||
CMS_FORM_COMPOSITE
|
WSF_FORM_COMPOSITE
|
||||||
|
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -59,7 +59,7 @@ feature -- Change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<fieldset")
|
a_html.append ("<fieldset")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_FILE_INPUT}."
|
description: "Summary description for {WSF_FORM_FILE_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_FILE_INPUT
|
WSF_FORM_FILE_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
redefine
|
redefine
|
||||||
specific_input_attributes_string
|
specific_input_attributes_string
|
||||||
end
|
end
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_INPUT}."
|
description: "Summary description for {WSF_FORM_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_HIDDEN_INPUT
|
WSF_FORM_HIDDEN_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
redefine
|
redefine
|
||||||
input_type,
|
input_type,
|
||||||
append_item_to_html
|
append_item_to_html
|
||||||
@@ -27,7 +27,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_item_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<div style=%"display:none%">")
|
a_html.append ("<div style=%"display:none%">")
|
||||||
Precursor (a_theme, a_html)
|
Precursor (a_theme, a_html)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_IMAGE_INPUT}."
|
description: "Summary description for {WSF_FORM_IMAGE_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_IMAGE_INPUT
|
WSF_FORM_IMAGE_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
redefine
|
redefine
|
||||||
specific_input_attributes_string
|
specific_input_attributes_string
|
||||||
end
|
end
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_INPUT}."
|
description: "Summary description for {WSF_FORM_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_FIELD
|
WSF_FORM_FIELD
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ feature -- Element change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_item_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
old_count: INTEGER
|
old_count: INTEGER
|
||||||
do
|
do
|
||||||
@@ -121,7 +121,7 @@ feature -- Conversion
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
append_child_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_child_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
-- Specific child element if any.
|
-- Specific child element if any.
|
||||||
--| To redefine if needed
|
--| To redefine if needed
|
||||||
do
|
do
|
||||||
17
library/server/wsf_html/form/wsf_form_item.e
Normal file
17
library/server/wsf_html/form/wsf_form_item.e
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_FORM_ITEM}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
deferred class
|
||||||
|
WSF_FORM_ITEM
|
||||||
|
|
||||||
|
inherit
|
||||||
|
WSF_WIDGET
|
||||||
|
|
||||||
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_PASSWORD_INPUT}."
|
description: "Summary description for {WSF_FORM_PASSWORD_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_PASSWORD_INPUT
|
WSF_FORM_PASSWORD_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
redefine
|
redefine
|
||||||
input_type
|
input_type
|
||||||
end
|
end
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_RADIO_INPUT}."
|
description: "Summary description for {WSF_FORM_RADIO_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_RADIO_INPUT
|
WSF_FORM_RADIO_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_SELECTABLE_INPUT
|
WSF_FORM_SELECTABLE_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_RAW_TEXT}."
|
description: "Summary description for {WSF_FORM_RAW_TEXT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_RAW_TEXT
|
WSF_FORM_RAW_TEXT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET_TEXT
|
WSF_WIDGET_TEXT
|
||||||
rename
|
rename
|
||||||
set_text as set_value,
|
set_text as set_value,
|
||||||
make_with_text as make
|
make_with_text as make
|
||||||
@@ -21,12 +21,12 @@ create
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
append_item_html_to (a_theme, a_html)
|
append_item_html_to (a_theme, a_html)
|
||||||
end
|
end
|
||||||
|
|
||||||
append_item_html_to (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_html_to (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append (text)
|
a_html.append (text)
|
||||||
end
|
end
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_RESET_INPUT}."
|
description: "Summary description for {WSF_FORM_RESET_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_RESET_INPUT
|
WSF_FORM_RESET_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_SELECT}."
|
description: "Summary description for {WSF_FORM_SELECT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_SELECT
|
WSF_FORM_SELECT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_FIELD
|
WSF_FORM_FIELD
|
||||||
|
|
||||||
CMS_FORM_UTILITY
|
WSF_FORM_UTILITY
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -25,13 +25,13 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
options: ARRAYED_LIST [CMS_FORM_SELECT_OPTION]
|
options: ARRAYED_LIST [WSF_FORM_SELECT_OPTION]
|
||||||
|
|
||||||
feature -- Element change
|
feature -- Element change
|
||||||
|
|
||||||
set_text_by_value (a_text: detachable READABLE_STRING_GENERAL)
|
set_text_by_value (a_text: detachable READABLE_STRING_GENERAL)
|
||||||
local
|
local
|
||||||
opt: CMS_FORM_SELECT_OPTION
|
opt: WSF_FORM_SELECT_OPTION
|
||||||
l_found: BOOLEAN
|
l_found: BOOLEAN
|
||||||
v: READABLE_STRING_8
|
v: READABLE_STRING_8
|
||||||
do
|
do
|
||||||
@@ -96,14 +96,14 @@ feature -- Element change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_option (opt: CMS_FORM_SELECT_OPTION)
|
add_option (opt: WSF_FORM_SELECT_OPTION)
|
||||||
do
|
do
|
||||||
options.force (opt)
|
options.force (opt)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_item_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
l_is_already_selected: BOOLEAN
|
l_is_already_selected: BOOLEAN
|
||||||
h: detachable STRING_8
|
h: detachable STRING_8
|
||||||
@@ -5,10 +5,10 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_SELECT_OPTION
|
WSF_FORM_SELECT_OPTION
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_SELECTABLE_ITEM
|
WSF_FORM_SELECTABLE_ITEM
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_SELECTABLE_INPUT}."
|
description: "Summary description for {WSF_FORM_SELECTABLE_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_FORM_SELECTABLE_INPUT
|
WSF_FORM_SELECTABLE_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
rename
|
rename
|
||||||
default_value as value,
|
default_value as value,
|
||||||
make_with_text as make_with_value
|
make_with_text as make_with_value
|
||||||
@@ -18,7 +18,7 @@ inherit
|
|||||||
append_child_to_html
|
append_child_to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
CMS_FORM_SELECTABLE_ITEM
|
WSF_FORM_SELECTABLE_ITEM
|
||||||
rename
|
rename
|
||||||
is_selected as checked,
|
is_selected as checked,
|
||||||
set_is_selected as set_checked
|
set_is_selected as set_checked
|
||||||
@@ -87,7 +87,7 @@ feature -- Change
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
append_child_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_child_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
-- Specific child element if any.
|
-- Specific child element if any.
|
||||||
--| To redefine if needed
|
--| To redefine if needed
|
||||||
do
|
do
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_SELECTABLE_ITEM}."
|
description: "Summary description for {WSF_FORM_SELECTABLE_ITEM}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_FORM_SELECTABLE_ITEM
|
WSF_FORM_SELECTABLE_ITEM
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_INPUT}."
|
description: "Summary description for {WSF_FORM_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_SUBMIT_INPUT
|
WSF_FORM_SUBMIT_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_TEXT_INPUT}."
|
description: "Summary description for {WSF_FORM_TEXT_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_TEXT_INPUT
|
WSF_FORM_TEXT_INPUT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_INPUT
|
WSF_FORM_INPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_INPUT}."
|
description: "Summary description for {WSF_FORM_INPUT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_TEXTAREA
|
WSF_FORM_TEXTAREA
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_FORM_FIELD
|
WSF_FORM_FIELD
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -61,7 +61,7 @@ feature -- Element change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_item_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<textarea name=%""+ name +"%"")
|
a_html.append ("<textarea name=%""+ name +"%"")
|
||||||
if rows > 0 then
|
if rows > 0 then
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_FORM_UTILITY}."
|
description: "Summary description for {WSF_FORM_UTILITY}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_FORM_UTILITY
|
WSF_FORM_UTILITY
|
||||||
|
|
||||||
feature -- Converter
|
feature -- Converter
|
||||||
|
|
||||||
37
library/server/wsf_html/form/wsf_theme.e
Normal file
37
library/server/wsf_html/form/wsf_theme.e
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {WSF_THEME}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_THEME
|
||||||
|
|
||||||
|
feature -- Access
|
||||||
|
|
||||||
|
url_encoded (s: detachable READABLE_STRING_GENERAL): STRING_8
|
||||||
|
local
|
||||||
|
enc: URL_ENCODER
|
||||||
|
do
|
||||||
|
create enc
|
||||||
|
if s /= Void then
|
||||||
|
Result := enc.general_encoded_string (s)
|
||||||
|
else
|
||||||
|
create Result.make_empty
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
html_encoded (s: detachable READABLE_STRING_GENERAL): STRING_8
|
||||||
|
local
|
||||||
|
enc: HTML_ENCODER
|
||||||
|
do
|
||||||
|
create enc
|
||||||
|
if s /= Void then
|
||||||
|
Result := enc.general_encoded_string (s)
|
||||||
|
else
|
||||||
|
create Result.make_empty
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WITH_CSS_CLASS}."
|
description: "Summary description for {WSF_WITH_CSS_CLASS}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WITH_CSS_ID}."
|
description: "Summary description for {WSF_WITH_CSS_ID}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WITH_CSS_STYLE}."
|
description: "Summary description for {WSF_WITH_CSS_STYLE}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WITH_HTML_ATTRIBUTE}."
|
description: "Summary description for {WSF_WITH_HTML_ATTRIBUTE}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
WITH_HTML_ATTRIBUTE
|
WSF_WITH_HTML_ATTRIBUTE
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET}."
|
description: "Summary description for {WSF_WIDGET}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_WIDGET
|
WSF_WIDGET
|
||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
to_html (a_theme: CMS_THEME): STRING_8
|
to_html (a_theme: WSF_THEME): STRING_8
|
||||||
do
|
do
|
||||||
create Result.make_empty
|
create Result.make_empty
|
||||||
append_to_html (a_theme, Result)
|
append_to_html (a_theme, Result)
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_TABLE}."
|
description: "Summary description for {WSF_WIDGET_TABLE}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_AGENT_TABLE [G]
|
WSF_WIDGET_AGENT_TABLE [G]
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET
|
WSF_WIDGET
|
||||||
|
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
convert
|
convert
|
||||||
to_computed_table: {CMS_WIDGET_TABLE}
|
to_computed_table: {WSF_WIDGET_TABLE}
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
@@ -36,9 +36,9 @@ feature -- Access
|
|||||||
Result := columns.count
|
Result := columns.count
|
||||||
end
|
end
|
||||||
|
|
||||||
columns: ARRAY [CMS_WIDGET_TABLE_COLUMN]
|
columns: ARRAY [WSF_WIDGET_TABLE_COLUMN]
|
||||||
|
|
||||||
column (c: INTEGER): CMS_WIDGET_TABLE_COLUMN
|
column (c: INTEGER): WSF_WIDGET_TABLE_COLUMN
|
||||||
do
|
do
|
||||||
if c > column_count then
|
if c > column_count then
|
||||||
set_column_count (c)
|
set_column_count (c)
|
||||||
@@ -60,7 +60,7 @@ feature -- Access
|
|||||||
data: detachable ITERABLE [G]
|
data: detachable ITERABLE [G]
|
||||||
-- tbody
|
-- tbody
|
||||||
|
|
||||||
compute_item_function: detachable FUNCTION [ANY, TUPLE [data: G], CMS_WIDGET_TABLE_ROW]
|
compute_item_function: detachable FUNCTION [ANY, TUPLE [data: G], WSF_WIDGET_TABLE_ROW]
|
||||||
|
|
||||||
feature -- Change
|
feature -- Change
|
||||||
|
|
||||||
@@ -87,12 +87,12 @@ feature -- Change
|
|||||||
set_column_count (nb: INTEGER)
|
set_column_count (nb: INTEGER)
|
||||||
do
|
do
|
||||||
if nb > columns.count then
|
if nb > columns.count then
|
||||||
-- columns.conservative_resize_with_default (create {CMS_WIDGET_TABLE_COLUMN}, 1, nb)
|
-- columns.conservative_resize_with_default (create {WSF_WIDGET_TABLE_COLUMN}, 1, nb)
|
||||||
from
|
from
|
||||||
until
|
until
|
||||||
columns.count = nb
|
columns.count = nb
|
||||||
loop
|
loop
|
||||||
columns.force (create {CMS_WIDGET_TABLE_COLUMN}.make (columns.upper + 1), columns.upper + 1)
|
columns.force (create {WSF_WIDGET_TABLE_COLUMN}.make (columns.upper + 1), columns.upper + 1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
columns.remove_tail (columns.count - nb)
|
columns.remove_tail (columns.count - nb)
|
||||||
@@ -111,9 +111,9 @@ feature -- Change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
to_computed_table: CMS_WIDGET_TABLE
|
to_computed_table: WSF_WIDGET_TABLE
|
||||||
local
|
local
|
||||||
col: CMS_WIDGET_TABLE_COLUMN
|
col: WSF_WIDGET_TABLE_COLUMN
|
||||||
do
|
do
|
||||||
create Result.make
|
create Result.make
|
||||||
Result.set_column_count (column_count)
|
Result.set_column_count (column_count)
|
||||||
@@ -156,7 +156,7 @@ feature -- Conversion
|
|||||||
|
|
||||||
feature -- Conversion: HTML
|
feature -- Conversion: HTML
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
l_use_tbody: BOOLEAN
|
l_use_tbody: BOOLEAN
|
||||||
do
|
do
|
||||||
@@ -200,7 +200,7 @@ feature -- Conversion: HTML
|
|||||||
a_html.append ("</table>")
|
a_html.append ("</table>")
|
||||||
end
|
end
|
||||||
|
|
||||||
append_data_to_html (lst: ITERABLE [G]; a_theme: CMS_THEME; a_html: STRING_8)
|
append_data_to_html (lst: ITERABLE [G]; a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
fct: like compute_item_function
|
fct: like compute_item_function
|
||||||
do
|
do
|
||||||
@@ -5,10 +5,10 @@ note
|
|||||||
revision : "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_WIDGET_COMPOSITE
|
WSF_WIDGET_COMPOSITE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
ITERABLE [CMS_WIDGET]
|
ITERABLE [WSF_WIDGET]
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ feature -- Status
|
|||||||
Result := count = 0
|
Result := count = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
has_item (i: CMS_WIDGET): BOOLEAN
|
has_item (i: WSF_WIDGET): BOOLEAN
|
||||||
do
|
do
|
||||||
if has_immediate_item (i) then
|
if has_immediate_item (i) then
|
||||||
Result := True
|
Result := True
|
||||||
@@ -32,21 +32,21 @@ feature -- Status
|
|||||||
across
|
across
|
||||||
items as c
|
items as c
|
||||||
loop
|
loop
|
||||||
if attached {CMS_WIDGET_COMPOSITE} c.item as comp then
|
if attached {WSF_WIDGET_COMPOSITE} c.item as comp then
|
||||||
Result := comp.has_item (i)
|
Result := comp.has_item (i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
has_immediate_item (i: CMS_WIDGET): BOOLEAN
|
has_immediate_item (i: WSF_WIDGET): BOOLEAN
|
||||||
do
|
do
|
||||||
Result := items.has (i)
|
Result := items.has (i)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Access: cursor
|
feature -- Access: cursor
|
||||||
|
|
||||||
new_cursor: ITERATION_CURSOR [CMS_WIDGET]
|
new_cursor: ITERATION_CURSOR [WSF_WIDGET]
|
||||||
-- Fresh cursor associated with current structure
|
-- Fresh cursor associated with current structure
|
||||||
do
|
do
|
||||||
Result := items.new_cursor
|
Result := items.new_cursor
|
||||||
@@ -60,7 +60,7 @@ feature -- Access
|
|||||||
across
|
across
|
||||||
items as c
|
items as c
|
||||||
loop
|
loop
|
||||||
if attached {CMS_WIDGET_COMPOSITE} c.item as comp then
|
if attached {WSF_WIDGET_COMPOSITE} c.item as comp then
|
||||||
Result := Result + comp.count
|
Result := Result + comp.count
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -71,9 +71,9 @@ feature -- Access
|
|||||||
Result := items.count
|
Result := items.count
|
||||||
end
|
end
|
||||||
|
|
||||||
items_by_type (a_type: TYPE [detachable ANY]): detachable LIST [CMS_WIDGET]
|
items_by_type (a_type: TYPE [detachable ANY]): detachable LIST [WSF_WIDGET]
|
||||||
-- All CMS_WIDGET items conforming to a_type.
|
-- All WSF_WIDGET items conforming to a_type.
|
||||||
-- Warning: you should pass {detachable CMS_FORM_SUBMIT_INPUT} rather than just {CMS_FORM_SUBMIT_INPUT}
|
-- Warning: you should pass {detachable WSF_FORM_SUBMIT_INPUT} rather than just {WSF_FORM_SUBMIT_INPUT}
|
||||||
local
|
local
|
||||||
int: INTERNAL
|
int: INTERNAL
|
||||||
tid: INTEGER
|
tid: INTEGER
|
||||||
@@ -93,12 +93,12 @@ feature -- Access
|
|||||||
Result := items_by_type_from (Current, t)
|
Result := items_by_type_from (Current, t)
|
||||||
end
|
end
|
||||||
|
|
||||||
items_by_css_id (a_id: READABLE_STRING_GENERAL): detachable LIST [CMS_WIDGET]
|
items_by_css_id (a_id: READABLE_STRING_GENERAL): detachable LIST [WSF_WIDGET]
|
||||||
do
|
do
|
||||||
Result := items_by_css_id_from (Current, a_id)
|
Result := items_by_css_id_from (Current, a_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
first_item_by_css_id (a_id: READABLE_STRING_GENERAL): detachable CMS_WIDGET
|
first_item_by_css_id (a_id: READABLE_STRING_GENERAL): detachable WSF_WIDGET
|
||||||
do
|
do
|
||||||
if attached items_by_css_id_from (Current, a_id) as lst then
|
if attached items_by_css_id_from (Current, a_id) as lst then
|
||||||
if not lst.is_empty then
|
if not lst.is_empty then
|
||||||
@@ -109,7 +109,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Change
|
feature -- Change
|
||||||
|
|
||||||
insert_before (i: CMS_WIDGET; a_item: CMS_WIDGET)
|
insert_before (i: WSF_WIDGET; a_item: WSF_WIDGET)
|
||||||
-- Insert `i' before `a_item'
|
-- Insert `i' before `a_item'
|
||||||
require
|
require
|
||||||
has_item (a_item)
|
has_item (a_item)
|
||||||
@@ -130,7 +130,7 @@ feature -- Change
|
|||||||
until
|
until
|
||||||
done
|
done
|
||||||
loop
|
loop
|
||||||
if attached {CMS_WIDGET_COMPOSITE} c.item as comp and then comp.has_item (a_item) then
|
if attached {WSF_WIDGET_COMPOSITE} c.item as comp and then comp.has_item (a_item) then
|
||||||
comp.insert_before (i, a_item)
|
comp.insert_before (i, a_item)
|
||||||
done := True
|
done := True
|
||||||
end
|
end
|
||||||
@@ -138,7 +138,7 @@ feature -- Change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
insert_after (i: CMS_WIDGET; a_item: CMS_WIDGET)
|
insert_after (i: WSF_WIDGET; a_item: WSF_WIDGET)
|
||||||
-- Insert `i' after `a_item'
|
-- Insert `i' after `a_item'
|
||||||
require
|
require
|
||||||
has_item (a_item)
|
has_item (a_item)
|
||||||
@@ -159,7 +159,7 @@ feature -- Change
|
|||||||
until
|
until
|
||||||
done
|
done
|
||||||
loop
|
loop
|
||||||
if attached {CMS_WIDGET_COMPOSITE} c.item as comp and then comp.has_item (a_item) then
|
if attached {WSF_WIDGET_COMPOSITE} c.item as comp and then comp.has_item (a_item) then
|
||||||
comp.insert_after (i, a_item)
|
comp.insert_after (i, a_item)
|
||||||
done := True
|
done := True
|
||||||
end
|
end
|
||||||
@@ -167,26 +167,26 @@ feature -- Change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
extend (i: CMS_WIDGET)
|
extend (i: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
items.force (i)
|
items.force (i)
|
||||||
end
|
end
|
||||||
|
|
||||||
prepend (i: CMS_WIDGET)
|
prepend (i: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
items.put_front (i)
|
items.put_front (i)
|
||||||
end
|
end
|
||||||
|
|
||||||
extend_text (t: READABLE_STRING_8)
|
extend_text (t: READABLE_STRING_8)
|
||||||
do
|
do
|
||||||
extend (create {CMS_WIDGET_TEXT}.make_with_text (t))
|
extend (create {WSF_WIDGET_TEXT}.make_with_text (t))
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {NONE} -- Implementation: Items
|
feature {NONE} -- Implementation: Items
|
||||||
|
|
||||||
items_by_type_from (a_container: ITERABLE [CMS_WIDGET]; a_type: TYPE [detachable ANY]): detachable ARRAYED_LIST [CMS_WIDGET]
|
items_by_type_from (a_container: ITERABLE [WSF_WIDGET]; a_type: TYPE [detachable ANY]): detachable ARRAYED_LIST [WSF_WIDGET]
|
||||||
local
|
local
|
||||||
res: detachable ARRAYED_LIST [CMS_WIDGET]
|
res: detachable ARRAYED_LIST [WSF_WIDGET]
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
a_container as i
|
a_container as i
|
||||||
@@ -196,7 +196,7 @@ feature {NONE} -- Implementation: Items
|
|||||||
create res.make (1)
|
create res.make (1)
|
||||||
end
|
end
|
||||||
res.force (i.item)
|
res.force (i.item)
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} i.item as l_cont then
|
elseif attached {ITERABLE [WSF_WIDGET]} i.item as l_cont then
|
||||||
if attached items_by_type_from (l_cont, a_type) as lst then
|
if attached items_by_type_from (l_cont, a_type) as lst then
|
||||||
if res = Void then
|
if res = Void then
|
||||||
res := lst
|
res := lst
|
||||||
@@ -209,15 +209,15 @@ feature {NONE} -- Implementation: Items
|
|||||||
Result := res
|
Result := res
|
||||||
end
|
end
|
||||||
|
|
||||||
items_by_css_id_from (a_container: ITERABLE [CMS_WIDGET]; a_id: READABLE_STRING_GENERAL): detachable ARRAYED_LIST [CMS_WIDGET]
|
items_by_css_id_from (a_container: ITERABLE [WSF_WIDGET]; a_id: READABLE_STRING_GENERAL): detachable ARRAYED_LIST [WSF_WIDGET]
|
||||||
local
|
local
|
||||||
res: detachable ARRAYED_LIST [CMS_WIDGET]
|
res: detachable ARRAYED_LIST [WSF_WIDGET]
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
a_container as i
|
a_container as i
|
||||||
loop
|
loop
|
||||||
if
|
if
|
||||||
attached {WITH_CSS_ID} i.item as l_with_css_id and then
|
attached {WSF_WITH_CSS_ID} i.item as l_with_css_id and then
|
||||||
attached l_with_css_id.css_id as l_css_id and then
|
attached l_with_css_id.css_id as l_css_id and then
|
||||||
l_css_id.same_string_general (a_id)
|
l_css_id.same_string_general (a_id)
|
||||||
then
|
then
|
||||||
@@ -225,7 +225,7 @@ feature {NONE} -- Implementation: Items
|
|||||||
create res.make (1)
|
create res.make (1)
|
||||||
end
|
end
|
||||||
res.force (i.item)
|
res.force (i.item)
|
||||||
elseif attached {ITERABLE [CMS_WIDGET]} i.item as l_cont then
|
elseif attached {ITERABLE [WSF_WIDGET]} i.item as l_cont then
|
||||||
if attached items_by_css_id_from (l_cont, a_id) as lst then
|
if attached items_by_css_id_from (l_cont, a_id) as lst then
|
||||||
if res = Void then
|
if res = Void then
|
||||||
res := lst
|
res := lst
|
||||||
@@ -240,7 +240,7 @@ feature {NONE} -- Implementation: Items
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
items: ARRAYED_LIST [CMS_WIDGET]
|
items: ARRAYED_LIST [WSF_WIDGET]
|
||||||
-- name => item
|
-- name => item
|
||||||
|
|
||||||
invariant
|
invariant
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_FILLED_TABLE}."
|
description: "Summary description for {WSF_WIDGET_FILLED_TABLE}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TABLE
|
WSF_WIDGET_TABLE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET
|
WSF_WIDGET
|
||||||
|
|
||||||
WITH_CSS_ID
|
WSF_WITH_CSS_ID
|
||||||
|
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
ITERABLE [CMS_WIDGET_TABLE_ITEM]
|
ITERABLE [WSF_WIDGET_TABLE_ITEM]
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -27,9 +27,9 @@ feature {NONE} -- Initialization
|
|||||||
create columns.make_empty
|
create columns.make_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
make_from_table (tb: CMS_WIDGET_AGENT_TABLE [detachable ANY])
|
make_from_table (tb: WSF_WIDGET_AGENT_TABLE [detachable ANY])
|
||||||
local
|
local
|
||||||
fct: like {CMS_WIDGET_AGENT_TABLE [detachable ANY]}.compute_item_function
|
fct: like {WSF_WIDGET_AGENT_TABLE [detachable ANY]}.compute_item_function
|
||||||
do
|
do
|
||||||
make
|
make
|
||||||
set_column_count (tb.column_count)
|
set_column_count (tb.column_count)
|
||||||
@@ -75,7 +75,7 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
new_cursor: CMS_WIDGET_TABLE_ITERATION_CURSOR
|
new_cursor: WSF_WIDGET_TABLE_ITERATION_CURSOR
|
||||||
-- Fresh cursor associated with current structure
|
-- Fresh cursor associated with current structure
|
||||||
do
|
do
|
||||||
create Result.make (Current)
|
create Result.make (Current)
|
||||||
@@ -112,10 +112,10 @@ feature -- Access
|
|||||||
Result := head_row_count + body_row_count + foot_row_count
|
Result := head_row_count + body_row_count + foot_row_count
|
||||||
end
|
end
|
||||||
|
|
||||||
columns: ARRAY [CMS_WIDGET_TABLE_COLUMN]
|
columns: ARRAY [WSF_WIDGET_TABLE_COLUMN]
|
||||||
|
|
||||||
|
|
||||||
column (c: INTEGER): CMS_WIDGET_TABLE_COLUMN
|
column (c: INTEGER): WSF_WIDGET_TABLE_COLUMN
|
||||||
do
|
do
|
||||||
if c > column_count then
|
if c > column_count then
|
||||||
set_column_count (c)
|
set_column_count (c)
|
||||||
@@ -123,7 +123,7 @@ feature -- Access
|
|||||||
Result := columns[c]
|
Result := columns[c]
|
||||||
end
|
end
|
||||||
|
|
||||||
row (r: INTEGER): detachable CMS_WIDGET_TABLE_ROW
|
row (r: INTEGER): detachable WSF_WIDGET_TABLE_ROW
|
||||||
do
|
do
|
||||||
if r <= head_row_count then
|
if r <= head_row_count then
|
||||||
if attached head_rows as lst then
|
if attached head_rows as lst then
|
||||||
@@ -145,13 +145,13 @@ feature -- Access
|
|||||||
Result := across columns as c some c.item.title /= Void end
|
Result := across columns as c some c.item.title /= Void end
|
||||||
end
|
end
|
||||||
|
|
||||||
head_rows: detachable ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]
|
head_rows: detachable ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]
|
||||||
-- thead
|
-- thead
|
||||||
|
|
||||||
foot_rows: detachable ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]
|
foot_rows: detachable ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]
|
||||||
-- tfoot
|
-- tfoot
|
||||||
|
|
||||||
rows: detachable ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]
|
rows: detachable ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]
|
||||||
-- tbody
|
-- tbody
|
||||||
|
|
||||||
feature -- Change
|
feature -- Change
|
||||||
@@ -163,37 +163,37 @@ feature -- Change
|
|||||||
rows := Void
|
rows := Void
|
||||||
end
|
end
|
||||||
|
|
||||||
add_head_row (r: CMS_WIDGET_TABLE_ROW)
|
add_head_row (r: WSF_WIDGET_TABLE_ROW)
|
||||||
local
|
local
|
||||||
lst: like head_rows
|
lst: like head_rows
|
||||||
do
|
do
|
||||||
lst := head_rows
|
lst := head_rows
|
||||||
if lst = Void then
|
if lst = Void then
|
||||||
create {ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]} lst.make (1)
|
create {ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]} lst.make (1)
|
||||||
head_rows := lst
|
head_rows := lst
|
||||||
end
|
end
|
||||||
lst.force (r)
|
lst.force (r)
|
||||||
end
|
end
|
||||||
|
|
||||||
add_foot_row (r: CMS_WIDGET_TABLE_ROW)
|
add_foot_row (r: WSF_WIDGET_TABLE_ROW)
|
||||||
local
|
local
|
||||||
lst: like foot_rows
|
lst: like foot_rows
|
||||||
do
|
do
|
||||||
lst := foot_rows
|
lst := foot_rows
|
||||||
if lst = Void then
|
if lst = Void then
|
||||||
create {ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]} lst.make (1)
|
create {ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]} lst.make (1)
|
||||||
foot_rows := lst
|
foot_rows := lst
|
||||||
end
|
end
|
||||||
lst.force (r)
|
lst.force (r)
|
||||||
end
|
end
|
||||||
|
|
||||||
add_row (r: CMS_WIDGET_TABLE_ROW)
|
add_row (r: WSF_WIDGET_TABLE_ROW)
|
||||||
local
|
local
|
||||||
lst: like rows
|
lst: like rows
|
||||||
do
|
do
|
||||||
lst := rows
|
lst := rows
|
||||||
if lst = Void then
|
if lst = Void then
|
||||||
create {ARRAYED_LIST [CMS_WIDGET_TABLE_ROW]} lst.make (1)
|
create {ARRAYED_LIST [WSF_WIDGET_TABLE_ROW]} lst.make (1)
|
||||||
rows := lst
|
rows := lst
|
||||||
end
|
end
|
||||||
lst.force (r)
|
lst.force (r)
|
||||||
@@ -206,7 +206,7 @@ feature -- Change
|
|||||||
until
|
until
|
||||||
columns.count = nb
|
columns.count = nb
|
||||||
loop
|
loop
|
||||||
columns.force (create {CMS_WIDGET_TABLE_COLUMN}.make (columns.upper + 1), columns.upper + 1)
|
columns.force (create {WSF_WIDGET_TABLE_COLUMN}.make (columns.upper + 1), columns.upper + 1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
columns.remove_tail (columns.count - nb)
|
columns.remove_tail (columns.count - nb)
|
||||||
@@ -225,7 +225,7 @@ feature -- Change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
local
|
local
|
||||||
l_use_tbody: BOOLEAN
|
l_use_tbody: BOOLEAN
|
||||||
do
|
do
|
||||||
@@ -269,7 +269,7 @@ feature -- Conversion
|
|||||||
a_html.append ("</table>")
|
a_html.append ("</table>")
|
||||||
end
|
end
|
||||||
|
|
||||||
append_rows_to_html (lst: ITERABLE [CMS_WIDGET_TABLE_ROW]; a_theme: CMS_THEME; a_html: STRING_8)
|
append_rows_to_html (lst: ITERABLE [WSF_WIDGET_TABLE_ROW]; a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
across
|
across
|
||||||
lst as r
|
lst as r
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_COLUMN}."
|
description: "Summary description for {WSF_WIDGET_COLUMN}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TABLE_COLUMN
|
WSF_WIDGET_TABLE_COLUMN
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -37,7 +37,7 @@ feature -- Change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_table_header_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_table_header_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<th")
|
a_html.append ("<th")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_TABLE_ITEM}."
|
description: "Summary description for {WSF_WIDGET_TABLE_ITEM}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TABLE_ITEM
|
WSF_WIDGET_TABLE_ITEM
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET
|
WSF_WIDGET
|
||||||
|
|
||||||
WITH_HTML_ATTRIBUTE
|
WSF_WITH_HTML_ATTRIBUTE
|
||||||
|
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
ITERABLE [CMS_WIDGET]
|
ITERABLE [WSF_WIDGET]
|
||||||
|
|
||||||
create
|
create
|
||||||
make_with_text,
|
make_with_text,
|
||||||
@@ -27,7 +27,7 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
make_with_text (a_text: READABLE_STRING_8)
|
make_with_text (a_text: READABLE_STRING_8)
|
||||||
do
|
do
|
||||||
make_with_content (create {CMS_WIDGET_TEXT}.make_with_text (a_text))
|
make_with_content (create {WSF_WIDGET_TEXT}.make_with_text (a_text))
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_text_and_css (a_text: READABLE_STRING_8; a_css_classes: detachable ITERABLE [READABLE_STRING_8])
|
make_with_text_and_css (a_text: READABLE_STRING_8; a_css_classes: detachable ITERABLE [READABLE_STRING_8])
|
||||||
@@ -42,21 +42,21 @@ feature {NONE} -- Initialization
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_content (a_widget: CMS_WIDGET)
|
make_with_content (a_widget: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
content := a_widget
|
content := a_widget
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
content: CMS_WIDGET
|
content: WSF_WIDGET
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
new_cursor: ITERATION_CURSOR [CMS_WIDGET]
|
new_cursor: ITERATION_CURSOR [WSF_WIDGET]
|
||||||
-- Fresh cursor associated with current structure
|
-- Fresh cursor associated with current structure
|
||||||
local
|
local
|
||||||
lst: ARRAYED_LIST [CMS_WIDGET]
|
lst: ARRAYED_LIST [WSF_WIDGET]
|
||||||
do
|
do
|
||||||
create lst.make (1)
|
create lst.make (1)
|
||||||
lst.extend (content)
|
lst.extend (content)
|
||||||
@@ -65,7 +65,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<td")
|
a_html.append ("<td")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_TABLE_ITERATION_CURSOR}."
|
description: "Summary description for {WSF_WIDGET_TABLE_ITERATION_CURSOR}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TABLE_ITERATION_CURSOR
|
WSF_WIDGET_TABLE_ITERATION_CURSOR
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
ITERATION_CURSOR [CMS_WIDGET_TABLE_ITEM]
|
ITERATION_CURSOR [WSF_WIDGET_TABLE_ITEM]
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make (a_table: CMS_WIDGET_TABLE)
|
make (a_table: WSF_WIDGET_TABLE)
|
||||||
do
|
do
|
||||||
table := a_table
|
table := a_table
|
||||||
start
|
start
|
||||||
end
|
end
|
||||||
|
|
||||||
table: CMS_WIDGET_TABLE
|
table: WSF_WIDGET_TABLE
|
||||||
|
|
||||||
row_index: INTEGER
|
row_index: INTEGER
|
||||||
column_index: INTEGER
|
column_index: INTEGER
|
||||||
@@ -35,7 +35,7 @@ feature -- Access
|
|||||||
forth
|
forth
|
||||||
end
|
end
|
||||||
|
|
||||||
item: CMS_WIDGET_TABLE_ITEM
|
item: WSF_WIDGET_TABLE_ITEM
|
||||||
-- Item at current cursor position.
|
-- Item at current cursor position.
|
||||||
do
|
do
|
||||||
if attached table.row (row_index) as r then
|
if attached table.row (row_index) as r then
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_TABLE_ROW}."
|
description: "Summary description for {WSF_WIDGET_TABLE_ROW}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TABLE_ROW
|
WSF_WIDGET_TABLE_ROW
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WITH_CSS_CLASS
|
WSF_WITH_CSS_CLASS
|
||||||
|
|
||||||
WITH_CSS_STYLE
|
WSF_WITH_CSS_STYLE
|
||||||
|
|
||||||
ITERABLE [CMS_WIDGET_TABLE_ITEM]
|
ITERABLE [WSF_WIDGET_TABLE_ITEM]
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
@@ -25,7 +25,7 @@ feature {NONE} -- Initialization
|
|||||||
create items.make (n)
|
create items.make (n)
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_items (lst: ITERABLE [CMS_WIDGET_TABLE_ITEM])
|
make_with_items (lst: ITERABLE [WSF_WIDGET_TABLE_ITEM])
|
||||||
local
|
local
|
||||||
n: INTEGER
|
n: INTEGER
|
||||||
do
|
do
|
||||||
@@ -40,11 +40,11 @@ feature {NONE} -- Initialization
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
items: ARRAYED_LIST [CMS_WIDGET_TABLE_ITEM]
|
items: ARRAYED_LIST [WSF_WIDGET_TABLE_ITEM]
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
new_cursor: ITERATION_CURSOR [CMS_WIDGET_TABLE_ITEM]
|
new_cursor: ITERATION_CURSOR [WSF_WIDGET_TABLE_ITEM]
|
||||||
do
|
do
|
||||||
Result := items.new_cursor
|
Result := items.new_cursor
|
||||||
end
|
end
|
||||||
@@ -54,14 +54,14 @@ feature -- Access
|
|||||||
Result := items.count
|
Result := items.count
|
||||||
end
|
end
|
||||||
|
|
||||||
item (c: INTEGER): CMS_WIDGET_TABLE_ITEM
|
item (c: INTEGER): WSF_WIDGET_TABLE_ITEM
|
||||||
do
|
do
|
||||||
Result := items [c]
|
Result := items [c]
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Change
|
feature -- Change
|
||||||
|
|
||||||
set_item (w: CMS_WIDGET_TABLE_ITEM; col: INTEGER)
|
set_item (w: WSF_WIDGET_TABLE_ITEM; col: INTEGER)
|
||||||
do
|
do
|
||||||
if col > items.count then
|
if col > items.count then
|
||||||
items.grow (col)
|
items.grow (col)
|
||||||
@@ -69,7 +69,7 @@ feature -- Change
|
|||||||
until
|
until
|
||||||
items.count >= col - 1
|
items.count >= col - 1
|
||||||
loop
|
loop
|
||||||
items.force (create {CMS_WIDGET_TABLE_ITEM}.make_with_text (""))
|
items.force (create {WSF_WIDGET_TABLE_ITEM}.make_with_text (""))
|
||||||
end
|
end
|
||||||
items.force (w)
|
items.force (w)
|
||||||
else
|
else
|
||||||
@@ -77,19 +77,19 @@ feature -- Change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_widget (w: CMS_WIDGET)
|
add_widget (w: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
add_item (create {CMS_WIDGET_TABLE_ITEM}.make_with_content (w))
|
add_item (create {WSF_WIDGET_TABLE_ITEM}.make_with_content (w))
|
||||||
end
|
end
|
||||||
|
|
||||||
force, add_item (w: CMS_WIDGET_TABLE_ITEM)
|
force, add_item (w: WSF_WIDGET_TABLE_ITEM)
|
||||||
do
|
do
|
||||||
items.force (w)
|
items.force (w)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append ("<tr")
|
a_html.append ("<tr")
|
||||||
append_css_class_to (a_html, Void)
|
append_css_class_to (a_html, Void)
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_WIDGET_TEXT}."
|
description: "Summary description for {WSF_WIDGET_TEXT}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_WIDGET_TEXT
|
WSF_WIDGET_TEXT
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_WIDGET
|
WSF_WIDGET
|
||||||
|
|
||||||
create
|
create
|
||||||
make_with_text
|
make_with_text
|
||||||
@@ -33,7 +33,7 @@ feature -- Change
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
append_to_html (a_theme: CMS_THEME; a_html: STRING_8)
|
append_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
do
|
do
|
||||||
a_html.append (text)
|
a_html.append (text)
|
||||||
end
|
end
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?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-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="css" uuid="1A3423E5-9B5B-431D-A8C3-1CF638F74B6F" library_target="css">
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="wsf_html" uuid="6AAAE037-7E66-4F5D-BED0-0042245C26BC" library_target="wsf_html">
|
||||||
<target name="css">
|
<target name="wsf_html">
|
||||||
<root all_classes="true"/>
|
<root all_classes="true"/>
|
||||||
<file_rule>
|
<file_rule>
|
||||||
<exclude>/.git$</exclude>
|
<exclude>/.git$</exclude>
|
||||||
@@ -10,6 +10,10 @@
|
|||||||
<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="all" 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"/>
|
||||||
<cluster name="src" location="." recursive="true"/>
|
<library name="encoder" location="../../text/encoder/encoder-safe.ecf"/>
|
||||||
|
<library name="wsf" location="../wsf/wsf-safe.ecf"/>
|
||||||
|
<cluster name="form" location="./form" recursive="true"/>
|
||||||
|
<cluster name="widget" location="./widget" recursive="true"/>
|
||||||
|
<cluster name="css" location="./css" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
</system>
|
</system>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?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-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="css" uuid="1A3423E5-9B5B-431D-A8C3-1CF638F74B6F" library_target="css">
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="wsf_html" uuid="6AAAE037-7E66-4F5D-BED0-0042245C26BC" library_target="wsf_html">
|
||||||
<target name="css">
|
<target name="wsf_html">
|
||||||
<root all_classes="true"/>
|
<root all_classes="true"/>
|
||||||
<file_rule>
|
<file_rule>
|
||||||
<exclude>/.git$</exclude>
|
<exclude>/.git$</exclude>
|
||||||
@@ -10,6 +10,10 @@
|
|||||||
<option warning="true" full_class_checking="true" void_safety="none" syntax="standard">
|
<option warning="true" full_class_checking="true" void_safety="none" syntax="standard">
|
||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/>
|
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/>
|
||||||
<cluster name="src" location="." recursive="true"/>
|
<library name="encoder" location="../../text/encoder/encoder.ecf"/>
|
||||||
|
<library name="wsf" location="../wsf/wsf.ecf"/>
|
||||||
|
<cluster name="form" location="./form" recursive="true"/>
|
||||||
|
<cluster name="widget" location="./widget" recursive="true"/>
|
||||||
|
<cluster name="css" location="./css" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
</system>
|
</system>
|
||||||
Reference in New Issue
Block a user