Add class description to validators
Rename Wsf_progresssource
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
note
|
||||
description: "Summary description for {WSF_NAVBAR_CONTROL}."
|
||||
description: "[
|
||||
WSF_NAVBAR_CONTROL encapsulates the navbar provided by bootstrap.
|
||||
Simple menu items as well as dropdown lists and panels can be added to this control
|
||||
http://getbootstrap.com/components/#navbar
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {WSF_NAVLIST_CONTROL}."
|
||||
description: "[
|
||||
WSF_NAVLIST_CONTROL encapsulates the linked items provided by bootstrap.
|
||||
http://getbootstrap.com/components/#list-group-linked
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -28,20 +31,22 @@ feature {NONE} -- Initialization
|
||||
feature -- Change
|
||||
|
||||
add_link (link, text: STRING)
|
||||
-- Add a link to nav list
|
||||
local
|
||||
c: WSF_NAVLIST_ITEM_CONTROL
|
||||
do
|
||||
create c.make (link, text)
|
||||
add_control(c)
|
||||
add_control (c)
|
||||
end
|
||||
|
||||
add_button (event:attached like {WSF_BUTTON_CONTROL}.click_event; text: STRING)
|
||||
add_button (event: attached like {WSF_BUTTON_CONTROL}.click_event; text: STRING)
|
||||
-- Add a button control to navlist
|
||||
local
|
||||
c: WSF_NAVLIST_ITEM_CONTROL
|
||||
do
|
||||
create c.make ("", text)
|
||||
c.set_click_event(event)
|
||||
add_control(c)
|
||||
c.set_click_event (event)
|
||||
add_control (c)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_NAVLIST_ITEM}."
|
||||
description: "[
|
||||
WSF_NAVLIST_ITEM_CONTROL represents a menu item in WSF_NAVLIST_CONTROL
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -33,7 +35,7 @@ feature {NONE} -- Initialization
|
||||
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
|
||||
set_state (new_state: JSON_OBJECT)
|
||||
-- Restore text from json
|
||||
-- Restore text and active state from json
|
||||
do
|
||||
Precursor {WSF_BUTTON_CONTROL} (new_state)
|
||||
if attached {JSON_BOOLEAN} new_state.item ("active") as new_active then
|
||||
@@ -42,7 +44,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
|
||||
end
|
||||
|
||||
state: WSF_JSON_OBJECT
|
||||
-- Return state which contains the current text and if there is an event handle attached
|
||||
-- Return state which contains the current text, if the control is active and if there is an event handle attached
|
||||
do
|
||||
Result := Precursor {WSF_BUTTON_CONTROL}
|
||||
Result.put_boolean (active, "active")
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
note
|
||||
description: "Summary description for {WSF_PROGRESS_CONTROL}."
|
||||
description: "[
|
||||
WSF_PROGRESS_CONTROL encapsulates the progress bar provided by bootstrap.
|
||||
The value of the progress bar can either be set directly using set_progress
|
||||
or it can be fetched from a progress source.
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -27,7 +31,7 @@ feature {NONE} -- Initialization
|
||||
progress := 0
|
||||
end
|
||||
|
||||
make_with_source ( p: WSF_PROGRESSSOURCE)
|
||||
make_with_source ( p: WSF_PROGRESS_SOURCE)
|
||||
-- Initialize with specified control name and progresssource
|
||||
do
|
||||
make
|
||||
@@ -93,7 +97,7 @@ feature -- Implementation
|
||||
|
||||
feature -- Properties
|
||||
|
||||
progress_source: detachable WSF_PROGRESSSOURCE
|
||||
progress_source: detachable WSF_PROGRESS_SOURCE
|
||||
|
||||
progress: INTEGER
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
note
|
||||
description: "Summary description for {WSF_PROGRESSSOURCE}."
|
||||
description: "[
|
||||
Provides the WSF_PROGRESS_CONTROL with the current progress state.
|
||||
Represented by a number between 0 and 100
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
WSF_PROGRESSSOURCE
|
||||
WSF_PROGRESS_SOURCE
|
||||
|
||||
feature -- Specification
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_AGENT_VALIDATOR}."
|
||||
description: "[
|
||||
Wrapper whit which a agent can be used as validator
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_DECIMAL_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which make sure that the input is a decimal number
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_EMAIL_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which make sure that the input has a the format of an valid email address
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_FILESIZE_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which make sure that the uploaded file is smaller than x bytes
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -34,7 +36,7 @@ feature -- Implementation
|
||||
do
|
||||
Result := True
|
||||
if attached input as a_input then
|
||||
Result := a_input.size < max or a_input.size = max
|
||||
Result := a_input.size < max
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_MAX_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which make sure that the input is at most x long.
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_MIN_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which make sure that the input is at least x long.
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
note
|
||||
description: "Summary description for {WSF_PHONE_NUMBER_VALIDATOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_PHONE_NUMBER_VALIDATOR
|
||||
|
||||
inherit
|
||||
|
||||
WSF_REGEXP_VALIDATOR
|
||||
rename
|
||||
make as make_regexp_validator
|
||||
end
|
||||
|
||||
create
|
||||
make_with_message
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make_with_message (e: STRING)
|
||||
-- Initialize with specified error message which will be displayed on validation failure
|
||||
do
|
||||
make_regexp_validator ("", e)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_REGEXP_VALIDATOR}."
|
||||
description: "[
|
||||
Validator implementation which validates the input based on a given regular expression
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_VALIDATABLE}."
|
||||
description: "[
|
||||
Defines that control can be validated.
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_VALIDATOR}."
|
||||
description: "[
|
||||
Base validation class which can be added to the WSF_FORM_ELEMENT_CONTROL
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
note
|
||||
description: "[
|
||||
Advanced implementation of JSON_OBJECT with some helper functions.
|
||||
This class can be removed since the proposed changes where merged in
|
||||
to https://github.com/eiffelhub/json
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
|
||||
Reference in New Issue
Block a user