Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
8fc12169
Commit
8fc12169
authored
Jan 07, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed no_auth menu to global auth object
parent
5b22b2c8
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
72 additions
and
512 deletions
+72
-512
api/TEMPLATE_login_dict
api/TEMPLATE_login_dict
+30
-0
data/.computer_status.json.kate-swp
data/.computer_status.json.kate-swp
+0
-0
data/.release_install.json.kate-swp
data/.release_install.json.kate-swp
+0
-0
data/computer_new.json
data/computer_new.json
+1
-34
data/computer_overview.json
data/computer_overview.json
+1
-64
data/computer_status.json
data/computer_status.json
+1
-34
data/computer_view.json
data/computer_view.json
+0
-31
data/network_assigned_computers.json
data/network_assigned_computers.json
+0
-31
data/network_new.json
data/network_new.json
+1
-34
data/network_overview.json
data/network_overview.json
+0
-31
data/network_status.json
data/network_status.json
+1
-34
data/person_view.json
data/person_view.json
+0
-31
data/release_install.json
data/release_install.json
+1
-34
data/service_connection.json
data/service_connection.json
+1
-33
data/service_instance_status.json
data/service_instance_status.json
+1
-34
data/service_statusbox.json
data/service_statusbox.json
+1
-34
data/software_status.json
data/software_status.json
+1
-32
js/erp5_loader.js
js/erp5_loader.js
+32
-21
No files found.
api/TEMPLATE_login_dict
View file @
8fc12169
...
...
@@ -14,6 +14,36 @@
},
"modernizr": ["localStorage"],
"redirect": {"redirect_uri":"http://localhost/sven/slapos-ui/index.html"}
},
"no_auth": {
"text":"Requires authorization.",
"text_i18n":"validation_dict.requires_auth",
"children": [
{
"generate": "widget",
"type": "controlgroup",
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct":{"className":"translate action", "href":"#global-popup"},
"attributes":{
"data-i18n":"global_dict.common_dict.login",
"data-action":"login",
"data-icon":"lock",
"data-rel": "popup"
},
"logic": {"text":"Login"}
}, {
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#person::new"},
"attributes": {
"data-i18n": "global_dict.common_dict.register",
"data-icon": "edit"
},
"logic": {"text":"Register"}
}]
}
]
}
},
...
...
data/.computer_status.json.kate-swp
0 → 100644
View file @
8fc12169
File added
data/.release_install.json.kate-swp
0 → 100644
View file @
8fc12169
File added
data/computer_new.json
View file @
8fc12169
...
...
@@ -49,38 +49,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/computer_overview.json
View file @
8fc12169
...
...
@@ -90,69 +90,6 @@
"bottom_grid"
:
1
},
"children"
:
[]
}],
"placeholder_dict"
:
{
"no_items"
:
{
"text"
:
"No items found."
,
"text_i18n"
:
"validation_dict.no_items_found"
,
"children"
:
[{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[
{
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#"
,
"className"
:
"translate "
},
"attributes"
:
{
"data-icon"
:
"chevron-sign-left"
,
"data-i18n"
:
"global_dict.pagination_dict.back"
},
"logic"
:
{
"Text"
:
"Back"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#servers::new"
},
"attributes"
:
{
"data-i18n"
:
"page_dict.servers.create"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Create instance"
}
}]
}]
},
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/computer_status.json
View file @
8fc12169
...
...
@@ -46,38 +46,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/computer_view.json
View file @
8fc12169
...
...
@@ -108,37 +108,6 @@
"logic"
:
{
"text"
:
"Create person"
}
}]
}]
},
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"page_dict.person.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/network_assigned_computers.json
View file @
8fc12169
...
...
@@ -51,37 +51,6 @@
"text"
:
"No servers associated with this network."
,
"text_i18n"
:
"page_dict.networks.no_servers"
,
"children"
:
[]
},
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
...
...
data/network_new.json
View file @
8fc12169
...
...
@@ -46,38 +46,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/network_overview.json
View file @
8fc12169
...
...
@@ -114,37 +114,6 @@
"logic"
:
{
"text"
:
"Add new network"
}
}]
}]
},
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
...
...
data/network_status.json
View file @
8fc12169
...
...
@@ -41,38 +41,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/person_view.json
View file @
8fc12169
...
...
@@ -106,37 +106,6 @@
"logic"
:
{
"text"
:
"Create person"
}
}]
}]
},
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"page_dict.person.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/release_install.json
View file @
8fc12169
...
...
@@ -67,38 +67,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"page_dict.person.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/service_connection.json
View file @
8fc12169
...
...
@@ -42,38 +42,6 @@
"bottom_grid"
:
1
},
"children"
:
[]
}],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/service_instance_status.json
View file @
8fc12169
...
...
@@ -64,38 +64,5 @@
}
]
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"page_dict.person.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/service_statusbox.json
View file @
8fc12169
...
...
@@ -51,38 +51,5 @@
"attributes"
:
{
"data-i18n"
:
"page_dict.services.destroy"
,
"data-action"
:
"destroy"
},
"logic"
:
{
"text"
:
"Destroy"
}
}
],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
}
}
}
data/software_status.json
View file @
8fc12169
...
...
@@ -55,37 +55,6 @@
}]
}],
"placeholder_dict"
:
{
"no_auth"
:
{
"text"
:
"Requires authorization."
,
"text_i18n"
:
"validation_dict.requires_auth"
,
"children"
:
[
{
"generate"
:
"widget"
,
"type"
:
"controlgroup"
,
"property_dict"
:
{
"direction"
:
"horizontal"
},
"children"
:
[{
"type"
:
"a"
,
"direct"
:{
"className"
:
"translate action"
,
"href"
:
"#global-popup"
},
"attributes"
:{
"data-i18n"
:
"global_dict.common_dict.login"
,
"data-action"
:
"login"
,
"data-icon"
:
"lock"
,
"data-rel"
:
"popup"
},
"logic"
:
{
"text"
:
"Login"
}
},
{
"type"
:
"a"
,
"direct"
:
{
"className"
:
"translate ui-btn-slapos-black"
,
"href"
:
"#person::new"
},
"attributes"
:
{
"data-i18n"
:
"global_dict.common_dict.register"
,
"data-icon"
:
"edit"
},
"logic"
:
{
"text"
:
"Register"
}
}
]
}
]
},
"no_items"
:
{
"text"
:
"No Software installed."
,
"text_i18n"
:
"page_dict.servers.no_software"
,
...
...
js/erp5_loader.js
View file @
8fc12169
...
...
@@ -642,12 +642,9 @@
* @return {object} mapped object
**/
// TODO: this should be in a storage-related utility object!
// TODO: how to get count? run query on underlying_portal_type with
// category? Lot of queries
// TODO: count/aside still not implemented on listview
// TODO: add remaining mapping!
// TODO: bad because not generic! Try!!!
// NOTE: can't use hash, because the hash updates after storage operation
// and thus may be wrong depending on storage being accessed
// TODO: MAKE GENERIC API with layout!
"
mapListItems
"
:
function
(
items
,
spec
,
url_pointer
)
{
var
property
,
obj
,
i
,
item
,
clean
,
value
,
store
,
split
,
host
,
i18n
,
application
,
level
,
core
,
arr
;
...
...
@@ -1021,6 +1018,7 @@
}
if
(
supported
)
{
app
.
default_dict
.
state_dict
.
login_pointer
=
hello
;
app
.
default_dict
.
state_dict
.
no_auth
=
logger
.
no_auth
;
if
(
hello
)
{
// initialize hellojs
...
...
@@ -1256,7 +1254,7 @@
* @return {object} fragment
**/
"
listgrid
"
:
function
(
spec
,
answer
,
field_dict
,
update
,
url_pointer
)
{
var
element
,
i
,
target
,
placeholder
;
var
element
,
i
,
target
;
// set update of gadget flag
if
(
spec
.
property_dict
.
depends_on
)
{
...
...
@@ -1268,13 +1266,10 @@
spec
.
reset
=
spec
.
property_dict
.
resets
;
}
// set placeholders
placeholder
=
spec
.
placeholder_dict
||
{};
// no auth
if
(
answer
===
null
)
{
target
=
factory
.
util
.
wrapInForm
(
spec
);
target
.
appendChild
(
app
.
noItemsFound
(
placeholder
.
no_auth
));
target
.
appendChild
(
app
.
noItemsFound
(
app
.
default_dict
.
state_dict
.
no_auth
));
return
target
;
}
...
...
@@ -1336,7 +1331,7 @@
* @return {object} fragment
**/
"
listbox
"
:
function
(
spec
,
answer
,
field_dict
,
update
,
url_pointer
)
{
var
element
,
i
,
target
,
container
,
pack
,
slot
,
pop
,
active
,
placeholder
;
var
element
,
i
,
target
,
container
,
pack
,
slot
,
pop
,
active
;
// set update of gadget flag
if
(
spec
.
property_dict
.
depends_on
)
{
...
...
@@ -1348,13 +1343,10 @@
spec
.
reset
=
spec
.
property_dict
.
resets
;
}
// set placeholders
placeholder
=
spec
.
placeholder_dict
||
{};
// no auth
if
(
answer
===
null
)
{
target
=
factory
.
util
.
wrapInForm
(
spec
);
target
.
appendChild
(
app
.
noItemsFound
(
placeholder
.
no_auth
));
target
.
appendChild
(
app
.
noItemsFound
(
app
.
default_dict
.
state_dict
.
no_auth
));
return
target
;
}
...
...
@@ -1423,7 +1415,7 @@
}
}
}
else
{
target
.
appendChild
(
app
.
noItemsFound
(
placeholder
.
no_items
));
target
.
appendChild
(
app
.
noItemsFound
());
}
// assemble and/or return
...
...
@@ -1445,7 +1437,7 @@
* @return {object} fragment
**/
"
fieldlist
"
:
function
(
spec
,
answer
,
field_dict
)
{
var
i
,
element
,
target
,
placeholder
,
update_gadget
,
reset_state
,
data
;
var
i
,
element
,
target
,
update_gadget
,
reset_state
,
data
;
// set update of gadget flag
if
(
spec
.
property_dict
.
depends_on
)
{
...
...
@@ -1457,15 +1449,12 @@
reset_state
=
spec
.
property_dict
.
reset
;
}
// set placeholders
placeholder
=
spec
.
placeholder_dict
||
{};
// no auth, no allow
if
(
answer
===
null
)
{
spec
.
reset
=
reset_state
;
spec
.
depend
=
update_gadget
;
target
=
factory
.
util
.
wrapInForm
(
spec
);
target
.
appendChild
(
app
.
noItemsFound
(
placeholder
.
no_auth
));
target
.
appendChild
(
app
.
noItemsFound
(
app
.
default_dict
.
state_dict
.
no_auth
));
return
target
;
// auth or allow
...
...
@@ -4625,6 +4614,7 @@
* return a placeholder with button in case no items were found
* @method noItemsFound
* @param {object} content_dict Type of placeholder to create
* @param {objecŧ} element
* @return {object} HTML fragment
*/
app
.
noItemsFound
=
function
(
content_dict
)
{
...
...
@@ -5431,6 +5421,7 @@
if
(
pass
.
create
===
false
)
{
// make sure include_docs is set, to fetch data. DON'T if force_fields
// is set, because then we fetch by columns only (not whole docs)
if
(
storage
===
undefined
||
(
storage
&&
storage
.
force_fields
===
undefined
))
{
pass
.
state
.
query
.
include_docs
=
true
;
...
...
@@ -6666,6 +6657,26 @@
return
;
};
/**
* escape a urlString
* @method encode
* @param {string} string String to escape
* @return {string} escaped string
**/
util
.
encode
=
function
(
string
)
{
return
encodeURIComponent
(
string
);
};
/**
* decode a urlString
* @method decode
* @param {string} string String to unescape
* @return {string} unescaped string
**/
util
.
decode
=
function
(
string
)
{
return
decodeURIComponent
(
string
);
};
/**
* parse to JSON if element is not in JSON
* @parseIfNeeded
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment