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
0751f371
Commit
0751f371
authored
Jan 10, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added "hacked_view" which will be passed on all JIO GET/PUT
parent
c9db4e18
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
85 additions
and
43 deletions
+85
-43
api/TEMPLATE_listbox.json
api/TEMPLATE_listbox.json
+4
-1
data/blog.json
data/blog.json
+1
-1
data/computer_fieldlist.json
data/computer_fieldlist.json
+1
-1
data/computer_new.json
data/computer_new.json
+1
-0
data/computer_overview.json
data/computer_overview.json
+1
-0
data/computer_status.json
data/computer_status.json
+1
-0
data/computer_view.json
data/computer_view.json
+2
-1
data/dashboard.json
data/dashboard.json
+1
-1
data/documentation.json
data/documentation.json
+1
-1
data/download.json
data/download.json
+1
-1
data/forum.json
data/forum.json
+1
-1
data/help.json
data/help.json
+1
-1
data/invoice_overview.json
data/invoice_overview.json
+1
-0
data/invoices.json
data/invoices.json
+1
-1
data/network_assigned_computers.json
data/network_assigned_computers.json
+1
-0
data/network_new.json
data/network_new.json
+1
-0
data/network_overview.json
data/network_overview.json
+1
-0
data/network_status.json
data/network_status.json
+1
-0
data/networks.json
data/networks.json
+2
-2
data/person.json
data/person.json
+2
-2
data/person_view.json
data/person_view.json
+1
-0
data/pricing.json
data/pricing.json
+1
-1
data/release_install.json
data/release_install.json
+1
-0
data/release_overview.json
data/release_overview.json
+1
-0
data/servers.json
data/servers.json
+3
-3
data/service_connection.json
data/service_connection.json
+1
-0
data/service_instance_status.json
data/service_instance_status.json
+1
-0
data/service_overview.json
data/service_overview.json
+1
-0
data/service_statusbox.json
data/service_statusbox.json
+1
-0
data/services.json
data/services.json
+4
-4
data/software.json
data/software.json
+3
-3
data/software_install.json
data/software_install.json
+1
-0
data/software_overview.json
data/software_overview.json
+1
-0
data/software_status.json
data/software_status.json
+1
-0
js/erp5_loader.js
js/erp5_loader.js
+38
-18
No files found.
api/TEMPLATE_listbox.json
View file @
0751f371
...
...
@@ -19,7 +19,10 @@
"link_external"
:
null
,
"link_source"
:
null
,
"editable"
:
null
,
"action_menu"
:
true
"action_menu"
:
true
,
"search"
:
{
"text"
:
"Search available servers"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.search"
,
"id"
:
"search_server_list"
,
"records"
:
true
,
"filter"
:
true
,
"sorted"
:
true
},
"caption"
:
{
"slot"
:
1
,
"text"
:
"Created Servers"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.created_servers"
},
"pagination"
:
{
"slot"
:
2
,
"options"
:
[{
"text"
:
8
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.8"
},{
"text"
:
16
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.16"
},{
"text"
:
32
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.32"
},{
"text"
:
64
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.64"
}]}
},
"scheme"
:
{
"header"
:
[
...
...
data/blog.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Blog"
,
"title_i18n"
:
"global_dict.blog"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/computer_fieldlist.json
View file @
0751f371
...
...
@@ -58,7 +58,7 @@
},
"properties"
:
{
"enabled"
:
true
,
"editable"
:
fals
e
,
"editable"
:
tru
e
,
"external_validator"
:
null
,
"required"
:
true
,
"preserve_whitespace"
:
null
,
...
...
data/computer_new.json
View file @
0751f371
...
...
@@ -3,6 +3,7 @@
"portal_type_title"
:
"computer"
,
"portal_type_fields"
:
"computer_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_new"
,
"property_dict"
:
{
"dynamic_children"
:
[
0
],
...
...
data/computer_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"computer_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/computer_status.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"computer_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_status"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/computer_view.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"computer_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_sample"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
@@ -16,7 +17,7 @@
"position"
:
"left"
,
"fieldlist"
:
[
{
"field"
:
"title"
},
{
"field"
:
"reference"
},
{
"field"
:
"reference"
,
"overrides"
:
{
"properties"
:
{
"editable"
:
false
}}
},
{
"field"
:
"region"
},
{
"field"
:
"group"
},
{
"field"
:
"translated_validation_state_title"
}
...
...
data/dashboard.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"SlapOS"
,
"title_i18n"
:
"global_dict.slapos"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/documentation.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Documentation"
,
"title_i18n"
:
"global_dict.documentation"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/download.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Download"
,
"title_i18n"
:
"global_dict.download"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/forum.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Forum"
,
"title_i18n"
:
"global_dict.forum"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/help.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Help"
,
"title_i18n"
:
"global_dict.help"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/invoice_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"invoice_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"invoice_overview"
,
"property_dict"
:
{
"no_items"
:
{
...
...
data/invoices.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Invoices"
,
"title_i18n"
:
"portal_type_dict.invoice_dict.text_dict.title"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
data/network_assigned_computers.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"computer_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_overview"
,
"property_dict"
:
{
"no_items"
:
{
...
...
data/network_new.json
View file @
0751f371
...
...
@@ -3,6 +3,7 @@
"portal_type_title"
:
"network"
,
"portal_type_fields"
:
"network_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_new"
,
"property_dict"
:
{
"dynamic_children"
:
[
0
],
...
...
data/network_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"network_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_overview"
,
"property_dict"
:
{
"no_items"
:
{
...
...
data/network_status.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"network_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_view"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/networks.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Servers"
,
"title_i18n"
:
"portal_type_dict.network_dict.text_dict.networks"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -33,7 +33,7 @@
"title"
:
"Network Instance"
,
"title_i18n"
:
"portal_type_dict.network_dict.text_dict.network_instance"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
data/person.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Account"
,
"title_i18n"
:
"portal_type_dict.person_dict.text_dict.account"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -34,7 +34,7 @@
"title"
:
"Register"
,
"title_i18n"
:
"portal_type_dict.person_dict.text_dict.register"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
data/person_view.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"person_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"user_sample"
,
"property_dict"
:
{
"no_items"
:
{
...
...
data/pricing.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Pricing"
,
"title_i18n"
:
"global_dict.pricing"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[]
}
}
...
...
data/release_install.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"release_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"install_release"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/release_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"release_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"release_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"reference_id"
,
...
...
data/servers.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Servers"
,
"title_i18n"
:
"portal_type_dict.computer_dict.text_dict.servers"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -33,7 +33,7 @@
"title"
:
"Server Instance"
,
"title_i18n"
:
"portal_type_dict.computer_dict.text_dict.server_instance"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -55,7 +55,7 @@
"theme"
:
"slapos-white"
,
"title"
:
"Server Configuration"
,
"title_i18n"
:
"portal_type_dict.computer_dict.text_dict.instance_configuration"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"config"
:
[
{
"generate"
:
"gadget"
,
...
...
data/service_connection.json
View file @
0751f371
...
...
@@ -3,6 +3,7 @@
"portal_type_title"
:
"service"
,
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_connection"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/service_instance_status.json
View file @
0751f371
...
...
@@ -3,6 +3,7 @@
"portal_type_title"
:
"service"
,
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_instance_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/service_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"service_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
16
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"reference_computer"
,
...
...
data/service_statusbox.json
View file @
0751f371
...
...
@@ -3,6 +3,7 @@
"portal_type_title"
:
"service"
,
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_statusbox"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
...
...
data/services.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Services"
,
"title_i18n"
:
"portal_type_dict.service_dict.text_dict.services"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -25,7 +25,7 @@
"title"
:
"Service Configuration"
,
"title_i18n"
:
"portal_type_dict.service_dict.text_dict.service_configuration"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -61,7 +61,7 @@
"title"
:
"Select Release"
,
"title_i18n"
:
"portal_type_dict.service_dict.text_dict.select_release"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"add"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -77,7 +77,7 @@
"title"
:
"Install Release"
,
"title_i18n"
:
"portal_type_dict.service_dict.text_dict.install_release"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"add"
:
[
{
"generate"
:
"gadget"
,
...
...
data/software.json
View file @
0751f371
...
...
@@ -9,7 +9,7 @@
"title"
:
"Software"
,
"title_i18n"
:
"portal_type_dict.software_dict.text_dict.software"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -33,7 +33,7 @@
"title"
:
"Software"
,
"title_i18n"
:
"portal_type_dict.software_dict.text_dict.software"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[
{
"generate"
:
"gadget"
,
...
...
@@ -49,7 +49,7 @@
"title"
:
"Release"
,
"title_i18n"
:
"portal_type_dict.software_dict.text_dict.release"
,
"theme"
:
"slapos-white"
,
"
layou
t"
:
{
"
view_dic
t"
:
{
"default"
:
[],
"install"
:
[
{
...
...
data/software_install.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"software_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"software_overview"
,
"property_dict"
:
{
"link"
:
true
,
...
...
data/software_overview.json
View file @
0751f371
...
...
@@ -4,6 +4,7 @@
"portal_type_fields"
:
"software_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"software_overview"
,
"property_dict"
:
{
"link"
:
true
,
...
...
data/software_status.json
View file @
0751f371
...
...
@@ -5,6 +5,7 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"id"
:
"service_overview"
,
"view"
:
"FOO"
,
"property_dict"
:
{
"no_items"
:
{
"message"
:
"No Software installed."
,
...
...
js/erp5_loader.js
View file @
0751f371
...
...
@@ -266,7 +266,7 @@
},
{
"
fragment_list
"
:
gadget
.
state
.
fragment_list
,
"
mode
"
:
gadget
.
state
.
view
,
"
mode
"
:
gadget
.
state
.
mode
,
"
layout_level
"
:
gadget
.
state
.
layout_level
},
undefined
,
...
...
@@ -3020,7 +3020,7 @@
* @param {boolean} create Flag indicating whether to generate a new page
* @return {object} HTML fragment
*/
// NOTE: we are defaulting to fixed
toolbars!
// NOTE: we are defaulting to fixed
JQM toolbars! layout
factory
.
page
=
function
(
content_dict
,
url_dict
,
create
)
{
var
i
,
j
,
last
,
wrapper
,
split_url
,
promises
=
[],
container
,
target
,
view
,
render
;
...
...
@@ -3028,11 +3028,11 @@
container
=
document
.
getElementById
(
url_dict
.
id
);
target
=
document
.
createDocumentFragment
();
view
=
(
url_dict
&&
url_dict
.
mode
)
?
url_dict
.
mode
:
"
default
"
;
render
=
content_dict
.
layou
t
[
view
];
render
=
content_dict
.
view_dic
t
[
view
];
if
(
render
)
{
for
(
i
=
0
;
i
<
render
.
length
;
i
+=
1
)
{
//
NOTE: need to pass url and create info
//
generate all gadgets specified in the view
promises
[
i
]
=
app
.
setContent
(
render
[
i
],
url_dict
,
create
);
}
}
else
{
...
...
@@ -3042,6 +3042,11 @@
return
RSVP
.
all
(
promises
)
.
then
(
function
(
promises
)
{
for
(
j
=
0
;
j
<
promises
.
length
;
j
+=
1
)
{
// loading a file with temporary ID
if
(
promises
[
j
]
===
undefined
)
{
util
.
error
(
"
page: Element not found
"
);
util
.
loader
(
""
,
"
status_dict.not_found
"
,
"
ban-circle
"
);
}
target
.
appendChild
(
promises
[
j
]);
}
...
...
@@ -4179,7 +4184,7 @@
// overwrite portal_type if forced
if
(
property
!==
"
identifier
"
)
{
obj
[
property
.
replace
(
replace
,
""
)]
=
value
;
obj
[
property
.
replace
(
replace
,
""
)]
=
value
;
}
else
{
obj
[
property
]
=
value
;
}
...
...
@@ -4215,7 +4220,9 @@
"
pass
"
:
{
"
type
"
:
config
.
gadget
.
state
.
type
,
"
reply
"
:
true
,
"
validate_type
"
:
validate_portal_type_fields
"
validate_type
"
:
validate_portal_type_fields
,
// hacked view
"
view
"
:
config
.
gadget
.
state
.
view
}
})
.
then
(
function
(
answer
)
{
...
...
@@ -5527,7 +5534,9 @@
"
fragment_list
"
:
pass
.
fragment_list
,
"
layout_level
"
:
pass
.
layout_level
,
"
id
"
:
pass
.
id
,
"
view
"
:
pass
.
mode
"
mode
"
:
pass
.
mode
,
// TODO: integrate views properly into pageIndex!
"
view
"
:
pass
.
config
.
view
};
// on deeplinks, take the URL element and query unless mode is defined
...
...
@@ -5559,7 +5568,9 @@
if
(
pass
.
skip
===
undefined
&&
(
pass
.
no_auth
||
((
pass
.
auth
&&
pass
.
active_login
)
||
(
pass
.
mode
===
"
new
"
||
pass
.
purge
))))
{
(
pass
.
mode
===
"
new
"
||
pass
.
purge
)))
&&
(
pass
.
state
&&
pass
.
state
.
query
.
_id
===
undefined
)
)
{
// get ALL RECORDS matching query
if
(
pass
.
config
.
initial_query
)
{
...
...
@@ -5589,7 +5600,7 @@
// TODO: storages should not call this, this should call storage!
app
.
store
=
function
(
reply
)
{
var
i
,
obj
,
key
,
promises
,
record
,
items
,
store
,
pass
,
send_status
,
method
,
validate
;
method
,
validate
,
hacked_view
;
pass
=
reply
.
pass
;
...
...
@@ -5671,12 +5682,13 @@
// if an object identifier was set in the form, we PUT, else POST
if
(
obj
.
identifier
)
{
method
=
"
put
"
;
hacked_view
=
{
"
_view
"
:
pass
.
view
};
obj
.
_id
=
obj
.
identifier
;
delete
obj
.
identifier
;
}
// store
promises
[
i
]
=
store
[
method
||
"
post
"
](
obj
)
promises
[
i
]
=
store
[
method
||
"
post
"
](
obj
,
hacked_view
||
{}
)
.
then
(
function
(
answer
)
{
return
answer
;
})
...
...
@@ -5862,10 +5874,12 @@
spec
=
url_dict
||
{};
// 404 land here
if
(
content_dict
===
undefined
)
{
util
.
error
(
"
setContent: Page not found
"
);
util
.
loader
(
""
,
"
status_dict.not_found
"
,
"
ban-circle
"
);
};
switch
(
content_dict
.
generate
)
{
case
"
widget
"
:
...
...
@@ -5944,7 +5958,6 @@
* @param {object} parcel parameters & pass to pass to subsequent then()
* @return {object} object including pass and reply
*/
// TODO: should be generic, not only JIO based!
app
.
fetchConfiguration
=
function
(
parcel
)
{
var
reply
,
store
;
...
...
@@ -5996,13 +6009,14 @@
* @return {object} promise object/pass
*/
app
.
fetchData
=
function
(
parcel
)
{
var
method
,
convert
,
select_list
;
var
method
,
convert
,
select_list
,
hacked_view
;
select_list
=
parcel
.
query
&&
parcel
.
query
.
select_list
&&
parcel
.
query
.
select_list
.
length
;
if
(
parcel
.
query
.
_id
)
{
// TODO: don't set if don't need...
delete
parcel
.
query
.
limit
;
hacked_view
=
{
"
_view
"
:
parcel
.
pass
.
config
.
view
}
method
=
"
get
"
;
convert
=
"
single_item
"
;
}
...
...
@@ -6036,8 +6050,8 @@
// TODO: put/putAttachment should be set somewhere more general!
// TODO: refactor... such a mess
app
.
getFromDisk
=
function
(
property_dict
)
{
var
response
,
storage_location
,
var
response
,
storage_location
,
url
,
hacked_view
;
url
=
property_dict
.
url
||
app
.
default_dict
.
path_dict
.
data
+
property_dict
.
attachment
+
"
.json
"
;
...
...
@@ -6064,14 +6078,20 @@
(
storage
?
storage
[
app
.
default_dict
.
storage_dict
.
settings
]
:
undefined
);
// hacked view?
if
(
property_dict
&&
property_dict
.
pass
&&
property_dict
.
pass
.
config
)
{
hacked_view
=
{
"
_view
"
:
property_dict
.
pass
.
config
.
view
};
}
if
(
storage_location
===
undefined
)
{
util
.
error
(
"
getFromDisk: no storage defined
"
);
return
RSVP
.
all
([]);
}
return
storage_location
.
put
({
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
)
})
return
storage_location
.
put
(
{
"
_id
"
:
(
property_dict
.
file
||
app
.
default_dict
.
storage_dict
.
settings
)},
hacked_view
||
{}
)
.
then
(
function
()
{
return
storage_location
.
putAttachment
({
"
_id
"
:
(
property_dict
.
file
||
...
...
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