From 37aac7053aae9d2f8a72de73488e8172baee268c Mon Sep 17 00:00:00 2001 From: severin Date: Sat, 4 Jan 2014 10:30:34 +0100 Subject: [PATCH] Moved set_attributes from BASIC_CONTROL to STATELESS_CONTROL --- .../kernel/dropdown/wsf_dropdown_control.e | 12 ++++++------ .../wsf_js_widget/kernel/input/wsf_input_control.e | 2 +- .../kernel/webcontrol/wsf_basic_control.e | 8 +------- .../wsf_js_widget/kernel/webcontrol/wsf_control.e | 2 +- .../kernel/webcontrol/wsf_stateless_control.e | 6 ++++++ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/draft/library/wsf_js_widget/kernel/dropdown/wsf_dropdown_control.e b/draft/library/wsf_js_widget/kernel/dropdown/wsf_dropdown_control.e index c7001da8..db9d982a 100644 --- a/draft/library/wsf_js_widget/kernel/dropdown/wsf_dropdown_control.e +++ b/draft/library/wsf_js_widget/kernel/dropdown/wsf_dropdown_control.e @@ -20,19 +20,19 @@ create feature {NONE} -- Initialization - make ( title: STRING) + make (title: STRING) -- Make a dropdown control with div tag name and specified menu title do - make_with_tag_name ( title, "div") + make_with_tag_name (title, "div") end - make_with_tag_name ( title, t: STRING) - -- Make a dropdown control with specified tag name and menu title (such as li) + make_with_tag_name (title, t: STRING) + -- Make a dropdown control with specified tag name (such as li) and menu title do - make_multi_control_with_tag_name ( t) + make_multi_control_with_tag_name (t) add_class ("dropdown") create {WSF_BASIC_CONTROL} dropdown_toggle.make_with_body_class ("a", "data-toggle=%"dropdown%" href=%"#%"", "dropdown-toggle", title + " ") - create dropdown_menu.make_with_tag_name ( "ul") + create dropdown_menu.make_with_tag_name ("ul") dropdown_menu.add_class ("dropdown-menu") add_control (dropdown_toggle) add_control (dropdown_menu) diff --git a/draft/library/wsf_js_widget/kernel/input/wsf_input_control.e b/draft/library/wsf_js_widget/kernel/input/wsf_input_control.e index 546aaa42..7acf8f86 100644 --- a/draft/library/wsf_js_widget/kernel/input/wsf_input_control.e +++ b/draft/library/wsf_js_widget/kernel/input/wsf_input_control.e @@ -20,7 +20,7 @@ create feature {NONE} -- Initialization make (v: STRING) - -- Initialize with specified name and value + -- Initialize with specified value do make_value_control ("input") type := "text" diff --git a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_basic_control.e b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_basic_control.e index 6e58a638..0cc5969c 100644 --- a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_basic_control.e +++ b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_basic_control.e @@ -36,7 +36,7 @@ feature {NONE} -- Initialization end make_with_body_class (t, attr, c, b: STRING) - -- Initialize with specific attributes and body + -- Initialize with specific class, attributes and body do make_with_body (t, attr, b) if not c.is_empty then @@ -54,12 +54,6 @@ feature -- Rendering feature -- Change - set_attributes (a: STRING) - -- Set the attributes string of this control - do - attributes := a - end - set_body (b: STRING) -- Set the body of this control do diff --git a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_control.e b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_control.e index 102d8b5e..1b3d303b 100644 --- a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_control.e +++ b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_control.e @@ -19,7 +19,7 @@ inherit feature {NONE} -- Initialization make (a_tag_name: STRING) - -- Initialize with specified control name and tag + -- Initialize with specified and tag require not a_tag_name.is_empty do diff --git a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_stateless_control.e b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_stateless_control.e index 9294e329..79036c3c 100644 --- a/draft/library/wsf_js_widget/kernel/webcontrol/wsf_stateless_control.e +++ b/draft/library/wsf_js_widget/kernel/webcontrol/wsf_stateless_control.e @@ -43,6 +43,12 @@ feature -- Change css_classes.prune (cla) end + set_attributes (a: STRING) + -- Set the attributes of this control + do + attributes := a + end + feature -- Rendering render_tag (body: STRING; attrs: detachable STRING): STRING