diff --git a/library/server/wsf_html/webcontrol/grid/wsf_datasource.e b/library/server/wsf_html/webcontrol/grid/wsf_datasource.e index 5c58035e..66328760 100644 --- a/library/server/wsf_html/webcontrol/grid/wsf_datasource.e +++ b/library/server/wsf_html/webcontrol/grid/wsf_datasource.e @@ -13,14 +13,14 @@ feature --State -- Return state which contains the current html and if there is an event handle attached do create Result.make - Result.put (create {JSON_NUMBER}.make_integer(page), create {JSON_STRING}.make_json("page")) - Result.put (create {JSON_NUMBER}.make_integer(page_size), create {JSON_STRING}.make_json("page_size")) + Result.put (create {JSON_NUMBER}.make_integer (page), create {JSON_STRING}.make_json ("page")) + Result.put (create {JSON_NUMBER}.make_integer (page_size), create {JSON_STRING}.make_json ("page_size")) if attached sort_column as a_sort_column then - Result.put (create {JSON_STRING}.make_json(a_sort_column), create {JSON_STRING}.make_json("sort_column")) + Result.put (create {JSON_STRING}.make_json (a_sort_column), create {JSON_STRING}.make_json ("sort_column")) else - Result.put (create {JSON_NULL}, create {JSON_STRING}.make_json("sort_column")) + Result.put (create {JSON_NULL}, create {JSON_STRING}.make_json ("sort_column")) end - Result.put (create {JSON_BOOLEAN}.make_boolean(sort_direction), create {JSON_STRING}.make_json("sort_direction")) + Result.put (create {JSON_BOOLEAN}.make_boolean (sort_direction), create {JSON_STRING}.make_json ("sort_direction")) end set_state (new_state: JSON_OBJECT) @@ -40,6 +40,7 @@ feature --State sort_direction := new_sort_direction.item end end + feature set_page (a_page: like page) @@ -71,6 +72,7 @@ feature sort_direction: BOOLEAN data: ITERABLE [G] - deferred - end + deferred + end + end diff --git a/library/server/wsf_html/webcontrol/grid/wsf_grid_column.e b/library/server/wsf_html/webcontrol/grid/wsf_grid_column.e index 4f33c3e9..f6a5aeb0 100644 --- a/library/server/wsf_html/webcontrol/grid/wsf_grid_column.e +++ b/library/server/wsf_html/webcontrol/grid/wsf_grid_column.e @@ -6,16 +6,19 @@ note class WSF_GRID_COLUMN + create make_column + feature {NONE} - make_column(a_header,a_field:STRING) - do - header:=a_header - field_name:=a_field - sorting_name:=a_field - end + make_column (a_header, a_field: STRING) + do + header := a_header + field_name := a_field + sorting_name := a_field + end + feature header: STRING diff --git a/library/server/wsf_html/webcontrol/input/wsf_checkbox_control.e b/library/server/wsf_html/webcontrol/input/wsf_checkbox_control.e index d5fd307f..99af55bc 100644 --- a/library/server/wsf_html/webcontrol/input/wsf_checkbox_control.e +++ b/library/server/wsf_html/webcontrol/input/wsf_checkbox_control.e @@ -63,13 +63,13 @@ feature -- Implementation render: STRING local - attributes: STRING + attrs: STRING do - attributes := "type=%"checkbox%"" + attrs := "type=%"checkbox%"" if checked then - attributes := attributes + " checked" + attrs := attrs + " checked" end - Result := render_tag_with_tagname ("div", render_tag_with_tagname ("label", render_tag ("", attributes) + " " + label, "", ""), "", "checkbox") + Result := render_tag_with_tagname ("div", render_tag_with_tagname ("label", render_tag ("", attrs) + " " + label, "", ""), "", "checkbox") end value: BOOLEAN diff --git a/library/server/wsf_html/webcontrol/wsf_navbar_control.e b/library/server/wsf_html/webcontrol/navbar/wsf_navbar_control.e similarity index 87% rename from library/server/wsf_html/webcontrol/wsf_navbar_control.e rename to library/server/wsf_html/webcontrol/navbar/wsf_navbar_control.e index 9e78df94..343333e8 100644 --- a/library/server/wsf_html/webcontrol/wsf_navbar_control.e +++ b/library/server/wsf_html/webcontrol/navbar/wsf_navbar_control.e @@ -16,25 +16,36 @@ create feature - collapse: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] - nav: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] - + collapse: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] + nav: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] feature {NONE} -- Initialization - make_navbar(brand:STRING) + make_navbar (brand: STRING) local container: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] header: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] + collapse_button: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] do make_multi_control add_class ("navbar navbar-inverse navbar-fixed-top") + create container.make_multi_control create header.make_multi_control - create nav.make_multi_control + create collapse_button.make_with_tag_name ("button") create collapse.make_multi_control - add_control (header) + create nav.make_multi_control + container.add_class ("container") header.add_class ("navbar-header") + collapse_button.add_class ("navbar-toggle") + collapse_button.set_attributes ("data-target=%".navbar-collapse%" data-toggle=%"collapse%" type=%"button%"") + collapse.add_class ("navbar-collapse") + collapse.add_control (nav) + container.add_control (header) + container.add_control (collapse) + add_control (container) + + -- EXAMPLE NAVBAR USED AS REFERENCE --