Included bootstrap datetimepicker
This commit is contained in:
@@ -26,17 +26,11 @@ inherit
|
||||
end
|
||||
|
||||
create
|
||||
make, make_with_tag_name
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (title: STRING)
|
||||
-- Make a dropdown control with div tag name and specified menu title
|
||||
do
|
||||
make_with_tag_name (title, "div")
|
||||
end
|
||||
|
||||
make_with_tag_name (title, t: STRING)
|
||||
make (t: STRING)
|
||||
-- Make a dropdown control with specified tag name (such as li) and menu title
|
||||
local
|
||||
temp: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||
@@ -64,22 +58,6 @@ feature {NONE} -- Initialization
|
||||
options.add_control (listbox)
|
||||
add_control (options)
|
||||
end
|
||||
-- <div class="bfh-selectbox bfh-countries" data-country="US"
|
||||
-- data-flags="true">
|
||||
-- <input name="country" type="hidden" value=""> <a
|
||||
-- class="bfh-selectbox-toggle" role="button"
|
||||
-- data-toggle="bfh-selectbox" href="#"> <span
|
||||
-- class="bfh-selectbox-option input-medium" data-option=""></span>
|
||||
-- <b class="caret" style="border-top-color: black !important;"></b>
|
||||
-- </a>
|
||||
-- <div class="bfh-selectbox-options">
|
||||
-- <input type="text" class="bfh-selectbox-filter">
|
||||
-- <div role="listbox">
|
||||
-- <ul role="option">
|
||||
-- </ul>
|
||||
-- </div>
|
||||
-- </div>
|
||||
-- </div>
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
@@ -90,6 +68,6 @@ feature -- Implementation
|
||||
|
||||
feature -- Properties
|
||||
|
||||
input:WSF_INPUT_CONTROL
|
||||
input: WSF_INPUT_CONTROL
|
||||
|
||||
end
|
||||
|
||||
@@ -6,6 +6,57 @@ note
|
||||
|
||||
class
|
||||
WSF_DATETIME_PICKER_CONTROL
|
||||
|
||||
inherit
|
||||
|
||||
|
||||
WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||
rename
|
||||
make as make_multi_control,
|
||||
make_with_tag_name as make_multi_control_with_tag_name
|
||||
select
|
||||
make_control
|
||||
end
|
||||
|
||||
WSF_VALUE_CONTROL [STRING]
|
||||
undefine
|
||||
load_state,
|
||||
full_state,
|
||||
read_state_changes,
|
||||
make
|
||||
end
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (t: STRING)
|
||||
-- Make a datetime picker control with specified tag name (such as li) and menu title
|
||||
local
|
||||
span: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||
do
|
||||
make_multi_control_with_tag_name (t)
|
||||
add_class ("input-group date datepicker")
|
||||
append_attribute ("data-date=%"10-09-2013%" data-date-format=%"dd-mm-yyyy%"")
|
||||
create input.make ("10-09-2013")
|
||||
input.add_class ("form-control")
|
||||
input.append_attribute ("value=%"10-09-2013%" type=%"text%" size=%"16%" readonly=%"%"")
|
||||
add_control (input)
|
||||
create span.make_with_tag_name ("span")
|
||||
span.add_class ("input-group-addon")
|
||||
span.add_control (create {WSF_BASIC_CONTROL}.make_with_body_class ("span", "", "glyphicon glyphicon-calendar", ""))
|
||||
add_control (span)
|
||||
end
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
value: STRING
|
||||
do
|
||||
Result := input.value
|
||||
end
|
||||
|
||||
feature -- Properties
|
||||
|
||||
input: WSF_INPUT_CONTROL
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user