Add codeview
This commit is contained in:
@@ -10,8 +10,8 @@ deferred class
|
||||
inherit
|
||||
|
||||
WSF_PAGE_CONTROL
|
||||
redefine
|
||||
control
|
||||
redefine
|
||||
control
|
||||
end
|
||||
|
||||
feature
|
||||
@@ -19,6 +19,7 @@ feature
|
||||
initialize_controls
|
||||
local
|
||||
navbar: WSF_NAVBAR_CONTROL
|
||||
btn: WSF_BUTTON_CONTROL
|
||||
do
|
||||
create control.make_multi_control ("container")
|
||||
control.add_class ("container")
|
||||
@@ -27,12 +28,21 @@ feature
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/grid%"", "Grid"))
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/repeater%"", "Repeater"))
|
||||
navbar.add_list_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/slider%"", "Image Slider"))
|
||||
navbar.add_list_element_right (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"#%"", "About"))
|
||||
create btn.make_button ("scode", "Show Code")
|
||||
btn.set_click_event (agent show_code)
|
||||
btn.set_isolation (true)
|
||||
btn.add_class ("btn-success")
|
||||
control.add_control (btn)
|
||||
if not attached get_parameter ("ajax") then
|
||||
control.add_control (navbar)
|
||||
end
|
||||
end
|
||||
|
||||
show_code
|
||||
do
|
||||
start_modal_big ("/codeview?file=" + generator.as_lower, "Eiffel code " + generator)
|
||||
end
|
||||
|
||||
feature
|
||||
|
||||
control: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||
|
||||
Reference in New Issue
Block a user