Fixed slider

This commit is contained in:
Severin Münger
2013-09-27 18:13:55 +02:00
parent 113df6efe1
commit c6d59d3366
8 changed files with 91 additions and 55 deletions

View File

@@ -14,11 +14,6 @@ inherit
render_tag
end
feature
control_name: STRING
feature {NONE} -- Initialization
make_control (n, a_tag_name: STRING)
@@ -37,30 +32,30 @@ feature {NONE} -- Initialization
feature -- Actions
start_modal(url:STRING; title:STRING)
--Start a modal window containg an other or the same page
start_modal (url: STRING; title: STRING)
--Start a modal window containg an other or the same page
local
modal:JSON_OBJECT
modal: JSON_OBJECT
do
create modal.make
modal.put (create {JSON_STRING}.make_json("start_modal"), "type")
modal.put (create {JSON_STRING}.make_json(url), "url")
modal.put (create {JSON_STRING}.make_json(title), "title")
modal.put (create {JSON_STRING}.make_json ("start_modal"), "type")
modal.put (create {JSON_STRING}.make_json (url), "url")
modal.put (create {JSON_STRING}.make_json (title), "title")
actions.add (modal)
end
show_alert(mesage:STRING)
--Start a modal window containg an other or the same page
show_alert (mesage: STRING)
--Start a modal window containg an other or the same page
local
modal:JSON_OBJECT
modal: JSON_OBJECT
do
create modal.make
modal.put (create {JSON_STRING}.make_json("show_alert"), "type")
modal.put (create {JSON_STRING}.make_json(mesage), "message")
modal.put (create {JSON_STRING}.make_json ("show_alert"), "type")
modal.put (create {JSON_STRING}.make_json (mesage), "message")
actions.add (modal)
end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
load_state (new_states: JSON_OBJECT)
-- Select state stored with `control_name` as key
@@ -90,9 +85,9 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
end
if actions.count > 0 then
if not attached states.item ("actions") then
states.put (create {JSON_ARRAY}.make_array,"actions")
states.put (create {JSON_ARRAY}.make_array, "actions")
end
if attached {JSON_ARRAY}states.item ("actions") as action_list then
if attached {JSON_ARRAY} states.item ("actions") as action_list then
across
actions.array_representation as action
loop
@@ -138,17 +133,18 @@ feature -- Rendering
Result := render_tag_with_tagname (tag_name, body, l_attributes, css_classes_string)
end
feature -- EVENT HANDLING
feature -- Event handling
handle_callback (cname: STRING; event: STRING; event_parameter: detachable STRING)
-- Method called if any callback received. In this method you can route the callback to the event handler
deferred
end
feature -- Change
set_isolation (p: BOOLEAN)
do
isolate := true
isolate := p
end
feature -- Properties
@@ -156,4 +152,7 @@ feature -- Properties
isolate: BOOLEAN
actions: JSON_ARRAY
control_name: STRING
end