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
ae3b5f5e
Commit
ae3b5f5e
authored
Jan 14, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to autogenerating ids needed internally. no more id in JSON API
parent
c38b72b1
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
37 additions
and
86 deletions
+37
-86
data/.computer_new.json.kate-swp
data/.computer_new.json.kate-swp
+0
-0
data/computer_new.json
data/computer_new.json
+0
-1
data/computer_overview.json
data/computer_overview.json
+0
-1
data/computer_status.json
data/computer_status.json
+0
-1
data/computer_view.json
data/computer_view.json
+0
-1
data/invoice_overview.json
data/invoice_overview.json
+0
-1
data/invoices.json
data/invoices.json
+0
-1
data/network_assigned_computers.json
data/network_assigned_computers.json
+0
-1
data/network_new.json
data/network_new.json
+0
-1
data/network_overview.json
data/network_overview.json
+0
-1
data/network_status.json
data/network_status.json
+0
-1
data/networks.json
data/networks.json
+0
-4
data/person.json
data/person.json
+0
-3
data/person_view.json
data/person_view.json
+0
-1
data/release_install.json
data/release_install.json
+1
-2
data/release_overview.json
data/release_overview.json
+0
-1
data/servers.json
data/servers.json
+0
-5
data/service_connection.json
data/service_connection.json
+0
-1
data/service_instance_status.json
data/service_instance_status.json
+0
-1
data/service_overview.json
data/service_overview.json
+0
-1
data/service_statusbox.json
data/service_statusbox.json
+0
-1
data/services.json
data/services.json
+0
-7
data/software.json
data/software.json
+0
-4
data/software_install.json
data/software_install.json
+0
-1
data/software_overview.json
data/software_overview.json
+0
-1
data/software_status.json
data/software_status.json
+0
-1
data/storages.json
data/storages.json
+0
-1
js/erp5_loader.js
js/erp5_loader.js
+36
-41
No files found.
data/.computer_new.json.kate-swp
0 → 100644
View file @
ae3b5f5e
File added
data/computer_new.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"computer_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_new"
,
"property_dict"
:
{
"dynamic_children"
:
[
0
],
"requires_authentication"
:
true
,
...
...
data/computer_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
1
],
...
...
data/computer_status.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_status"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
0
],
...
...
data/computer_view.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_sample"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
0
],
...
...
data/invoice_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"invoice_overview"
,
"property_dict"
:
{
"no_items"
:
{
"message"
:
"No invoices found"
,
...
...
data/invoices.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"invoice_overview"
,
"href"
:
"invoice_overview"
}
]
...
...
data/network_assigned_computers.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"computer_overview"
,
"property_dict"
:
{
"no_items"
:
{
"message"
:
"No servers associated with this network."
,
...
...
data/network_new.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"network_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_new"
,
"property_dict"
:
{
"dynamic_children"
:
[
0
],
"requires_authentication"
:
true
,
...
...
data/network_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_overview"
,
"property_dict"
:
{
"dynamic_children"
:
[
1
],
"requires_authentication"
:
true
,
...
...
data/network_status.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"network_view"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
0
],
...
...
data/networks.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"network_overview"
,
"href"
:
"network_overview"
}
],
...
...
@@ -22,7 +21,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"network_new"
,
"href"
:
"network_new"
}
]
...
...
@@ -38,13 +36,11 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"network_status"
,
"href"
:
"network_status"
},
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"network_assigned_computers"
,
"href"
:
"network_assigned_computers"
}
]
...
...
data/person.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"person_view"
,
"href"
:
"person_view"
}
],
...
...
@@ -22,7 +21,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"person_view"
,
"href"
:
"person_view"
}
]
...
...
@@ -39,7 +37,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"person_view"
,
"href"
:
"person_view"
}
]
...
...
data/person_view.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"user_sample"
,
"property_dict"
:
{
"no_items"
:
{
"message"
:
"No person found"
,
...
...
data/release_install.json
View file @
ae3b5f5e
...
...
@@ -5,10 +5,9 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"install_release"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
1
],
"dynamic_children"
:
[
0
],
"requires_authentication"
:
true
,
"depends_on"
:
"login_state"
,
"submit_to"
:
"#services::__id__"
...
...
data/release_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"release_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"reference_id"
,
"dynamic_children"
:
[
0
],
...
...
data/servers.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"computer_overview"
,
"href"
:
"computer_overview"
}
],
...
...
@@ -22,7 +21,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"computer_new"
,
"href"
:
"computer_new"
}
]
...
...
@@ -38,13 +36,11 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"computer_status"
,
"href"
:
"computer_status"
},
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"software_status"
,
"href"
:
"software_status"
}
]
...
...
@@ -60,7 +56,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"computer_view"
,
"href"
:
"computer_view"
}
],
...
...
data/service_connection.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_connection"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
1
],
...
...
data/service_instance_status.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_instance_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
0
],
...
...
data/service_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
16
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_overview"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"reference_computer"
,
"dynamic_children"
:
[
1
],
...
...
data/service_statusbox.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"service_fieldlist"
,
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"service_statusbox"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"_id"
,
"dynamic_children"
:
[
1
],
...
...
data/services.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"service_overview"
,
"href"
:
"service_overview"
}
]
...
...
@@ -30,19 +29,16 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"service_instance_status"
,
"href"
:
"service_instance_status"
},
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"service_connection"
,
"href"
:
"service_connection"
},
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"service_statusbox"
,
"href"
:
"service_statusbox"
}
],
...
...
@@ -50,7 +46,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listgrid"
,
"id"
:
"software_overview"
,
"href"
:
"software_overview"
}
]
...
...
@@ -66,7 +61,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"release_overview"
,
"href"
:
"release_overview"
}
]
...
...
@@ -82,7 +76,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"fieldlist"
,
"id"
:
"release_install"
,
"href"
:
"release_install"
}
]
...
...
data/software.json
View file @
ae3b5f5e
...
...
@@ -14,7 +14,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listgrid"
,
"id"
:
"software_overview"
,
"href"
:
"software_overview"
}
],
...
...
@@ -22,7 +21,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listgrid"
,
"id"
:
"software_overview"
,
"href"
:
"software_overview"
}
]
...
...
@@ -38,7 +36,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"release_overview"
,
"href"
:
"release_overview"
}
]
...
...
@@ -55,7 +52,6 @@
{
"generate"
:
"gadget"
,
"type"
:
"listbox"
,
"id"
:
"release_install"
,
"href"
:
"release_install"
}
]
...
...
data/software_install.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"software_overview"
,
"property_dict"
:
{
"link"
:
true
,
"link_identifier"
:
"id"
,
...
...
data/software_overview.json
View file @
ae3b5f5e
...
...
@@ -5,7 +5,6 @@
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
8
]},
"form"
:
true
,
"view"
:
"FOO"
,
"id"
:
"software_overview"
,
"property_dict"
:
{
"link"
:
true
,
"link_identifier"
:
"id"
,
...
...
data/software_status.json
View file @
ae3b5f5e
...
...
@@ -4,7 +4,6 @@
"portal_type_fields"
:
"service_fieldlist"
,
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[
0
,
1
]},
"form"
:
true
,
"id"
:
"service_overview"
,
"view"
:
"FOO"
,
"property_dict"
:
{
"initial_query_url_identifier"
:
"reference_computer"
,
...
...
data/storages.json
View file @
ae3b5f5e
...
...
@@ -3,7 +3,6 @@
"type"
:
"setStorage"
,
"property_dict"
:
{
"force_field_definitions"
:
true
,
"skip_total_records"
:
true
,
"storage_type"
:
"JIO"
,
"modernizr"
:
[
"blobconstructor"
,
"filereader"
]
},
...
...
js/erp5_loader.js
View file @
ae3b5f5e
...
...
@@ -260,8 +260,8 @@
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
id
,
"
href
"
:
id
,
"
reference
"
:
gadget
.
id
,
"
href
"
:
gadget
.
state
.
href
,
"
type
"
:
gadget
.
state
.
method
},
{
...
...
@@ -1285,6 +1285,7 @@
if
(
update
)
{
target
=
document
.
createDocumentFragment
();
}
else
{
spec
.
set_id
=
"
form_
"
+
util
.
uuid
();
target
=
factory
.
util
.
wrapInForm
(
spec
);
}
...
...
@@ -1314,7 +1315,7 @@
element
=
spec
.
children
[
i
];
// reference gadget
element
.
reference
=
spec
.
id
;
element
.
reference
=
spec
.
set_
id
;
// set flag for dynamic elements
if
(
props
.
dynamic_children
)
{
...
...
@@ -1389,6 +1390,7 @@
};
props
=
spec
.
property_dict
;
spec
.
set_id
=
"
form_
"
+
util
.
uuid
();
// set update of gadget flag
if
(
props
.
depends_on
)
{
...
...
@@ -1477,7 +1479,7 @@
element
=
spec
.
children
[
i
];
// set flag for referencing gadget
element
.
reference
=
spec
.
id
;
element
.
reference
=
spec
.
set_
id
;
// set flag to label elements that should contain dynamic data
if
(
props
.
dynamic_children
)
{
...
...
@@ -1601,7 +1603,6 @@
element
.
reset
=
reset_state
;
element
.
form
=
spec
.
form
;
element
.
fields
=
field_dict
;
element
.
reference
=
spec
.
id
;
element
.
scheme
=
spec
.
scheme
;
}
target
.
appendChild
(
app
.
setContent
(
element
));
...
...
@@ -1754,6 +1755,7 @@
"
logic
"
:
{
"
text
"
:
"
Last
"
}
});
}
return
config
;
};
...
...
@@ -1982,15 +1984,12 @@
*/
factory
.
util
.
wrapInForm
=
function
(
spec
)
{
if
(
spec
.
form
)
{
if
(
spec
.
reference
===
undefined
&&
spec
.
id
===
undefined
)
{
util
.
error
(
"
wrapInForm: Missing form id.
"
);
}
return
factory
.
element
(
"
form
"
,
{
"
method
"
:
"
POST
"
,
"
action
"
:
"
#
"
,
"
id
"
:
spec
.
reference
||
spec
.
id
,
"
id
"
:
spec
.
set_id
||
"
form_
"
+
util
.
uuid
()
,
"
className
"
:
(
spec
.
class_list
||
""
)
},
{
"
data-ajax
"
:
false
,
"
autocomplete
"
:
"
off
"
},
...
...
@@ -2432,10 +2431,10 @@
factory
.
form
=
function
(
spec
)
{
var
i
,
j
,
k
,
segment
,
element
,
container
,
area
,
field
,
overrides
,
position
,
doc
,
config
,
value
,
stamp
,
sauce
,
encode
,
secure
,
safety_box
,
fragment
,
wrap
,
item_id
,
input_config
,
form_id
;
safety_box
,
fragment
,
wrap
,
item_id
,
input_config
;
spec
.
set_id
=
"
form_
"
+
util
.
uuid
();
fragment
=
factory
.
util
.
wrapInForm
(
spec
);
form_id
=
spec
.
reference
;
secure
=
spec
.
property_dict
.
secure
;
item_id
=
spec
.
data
?
(
spec
.
data
.
_id
||
undefined
)
:
undefined
;
...
...
@@ -2444,7 +2443,7 @@
// set optional captcha config
if
(
captcha
)
{
keys
.
id
=
form
_id
+
"
_captcha
"
;
keys
.
id
=
spec
.
set
_id
+
"
_captcha
"
;
keys
[
"
data-key
"
]
=
spec
.
property_dict
.
public_key
;
}
...
...
@@ -2497,7 +2496,7 @@
{
"
type
"
:
"
hidden
"
,
"
value
"
:
spec
.
property_dict
.
secret_hash
,
"
id
"
:
form
_id
+
"
_not_a_secret
"
"
id
"
:
spec
.
set
_id
+
"
_not_a_secret
"
},
{
"
data-created
"
:
stamp
...
...
@@ -2560,7 +2559,7 @@
// map config to what we need
input_config
=
map
.
utils
.
mapFormField
(
form
_id
,
spec
.
set
_id
,
config
,
overrides
,
value
...
...
@@ -2618,7 +2617,7 @@
// pass reference
element
=
spec
.
children
[
k
];
if
(
spec
.
form
)
{
element
.
reference
=
form
_id
;
element
.
reference
=
spec
.
set
_id
;
element
.
item_identifier
=
item_id
;
}
...
...
@@ -4528,7 +4527,7 @@
// update gadget
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
generate
"
:
"
gadget
"
,
"
reference
"
:
config
.
id
,
"
href
"
:
config
.
state
.
href
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
...
...
@@ -4685,7 +4684,7 @@
// wait 500ms on multi-state sorting (table), single state trigger directly
app
.
timer
=
window
.
setTimeout
(
function
()
{
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
generate
"
:
"
gadget
"
,
"
reference
"
:
config
.
id
,
"
href
"
:
config
.
state
.
href
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
...
...
@@ -4841,7 +4840,7 @@
// update gadget
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
id
"
:
config
.
id
,
"
href
"
:
config
.
id
},
{
"
generate
"
:
"
gadget
"
,
"
reference
"
:
config
.
id
,
"
href
"
:
config
.
state
.
href
},
{
"
fragment_list
"
:
config
.
state
.
fragment_list
,
"
layout_level
"
:
config
.
state
.
layout_level
},
false
)
...
...
@@ -5603,7 +5602,6 @@
pass
=
reply
.
pass
;
constructor
=
map
.
gadgets
[
pass
.
constructor
];
if
(
constructor
===
undefined
)
{
return
util
.
error
(
"
generateGadgetContent: Missing constructor
"
);
}
...
...
@@ -5642,12 +5640,10 @@
if
(
pass
.
create
===
false
&&
pass
.
purge
===
null
)
{
selector
=
pass
.
state
.
gadget
;
}
else
{
// NOTE: in case of update, element will be the section to update
// not the gadget/fragment, so we need to find the gadget
// TODO: in case of update? find data-update?
// NOTE: in case of forms, we find the form!
// NOTE: in case of fragments, we punt to the firstElementChild...
selector
=
element
.
querySelector
(
"
#
"
+
pass
.
id
)
||
document
.
getElementById
(
pass
.
config
.
form
)
||
selector
=
element
.
querySelector
(
"
form
"
)
||
(
element
.
tagName
===
undefined
?
element
.
firstElementChild
:
element
);
pass
.
state
.
gadget
=
selector
;
...
...
@@ -5745,18 +5741,12 @@
* @return {object} response object/promise
*/
app
.
fetchDataTotal
=
function
(
reply
)
{
var
pass
=
reply
.
pass
,
reference
,
last
;
var
pass
=
reply
.
pass
,
last
;
if
(
pass
.
skip
===
undefined
)
{
// create or update state object
if
(
pass
.
create
===
false
)
{
// TODO: horrible, define a pass API!!!!
reference
=
document
.
getElementById
(
pass
.
id
);
if
(
reference
===
null
)
{
reference
=
document
.
getElementById
(
pass
.
config
.
id
);
}
pass
.
state
=
reference
.
state
;
pass
.
state
=
document
.
getElementById
(
pass
.
reference
).
state
;
pass
.
constructor
=
pass
.
state
.
method
;
pass
.
store_limit
=
pass
.
state
.
query
.
limit
;
pass
.
state
.
query
.
limit
=
[];
...
...
@@ -5766,7 +5756,7 @@
"
method
"
:
pass
.
constructor
,
"
fragment_list
"
:
pass
.
fragment_list
,
"
layout_level
"
:
pass
.
layout_level
,
"
id
"
:
pass
.
id
,
"
href
"
:
pass
.
href
,
"
mode
"
:
pass
.
mode
,
// TODO: integrate views properly into pageIndex!
"
view
"
:
pass
.
config
.
view
...
...
@@ -6101,13 +6091,14 @@
* @return {object} promise/HTML element
*/
// TODO: make this always return a promise. Requires to refactor listview!
// TODO:
only pass around what we need. pass.
CONFIG is too much!
// TODO:
shrink stuff being passed CONTENT_DICT/
CONFIG is too much!
app
.
setContent
=
function
(
content_dict
,
url_dict
,
create
,
purge
)
{
var
pass
,
spec
;
spec
=
url_dict
||
{};
// 404 land here
// 404
// TODO: remove!
if
(
content_dict
===
undefined
)
{
util
.
error
(
"
setContent: Page not found
"
);
util
.
loader
(
""
,
"
status_dict.not_found
"
,
"
ban-circle
"
);
...
...
@@ -6119,24 +6110,28 @@
return
factory
[
content_dict
.
type
](
content_dict
,
spec
,
create
);
case
"
gadget
"
:
// no portal_type, no dynamic data
// static data
if
(
content_dict
.
portal_type_source
===
undefined
&&
content_dict
.
href
===
undefined
)
{
// TODO: use same API as below!
pass
=
{
"
skip
"
:
true
,
"
content_dict
"
:
content_dict
,
"
url_dict
"
:
spec
};
// dynamic data
}
else
{
// this run needs query and dynamic data
pass
=
{
"
purge
"
:
purge
||
null
,
"
mode
"
:
spec
.
mode
||
undefined
,
"
create
"
:
create
,
"
layout_level
"
:
spec
.
layout_level
||
null
,
"
fragment_list
"
:
spec
.
fragment_list
,
"
id
"
:
content_dict
.
id
// TODO: this should be a link!
"
href
"
:
content_dict
.
href
,
"
reference
"
:
content_dict
.
reference
||
null
};
}
...
...
@@ -6148,9 +6143,9 @@
// and go
return
app
.
fetchConfiguration
({
"
storage
"
:
app
.
default_dict
.
storage_dict
.
settings
,
"
file
"
:
pass
.
id
?
app
.
default_dict
.
storage_dict
.
gadgets
:
"
file
"
:
pass
.
href
?
app
.
default_dict
.
storage_dict
.
gadgets
:
app
.
default_dict
.
storage_dict
.
settings
,
"
attachment
"
:
pass
.
id
||
app
.
default_dict
.
storage_dict
.
configuration
,
"
attachment
"
:
pass
.
href
||
app
.
default_dict
.
storage_dict
.
configuration
,
"
pass
"
:
pass
})
.
then
(
app
.
parseConfiguration
)
...
...
@@ -6246,7 +6241,7 @@
pass
=
parcel
.
pass
;
query
=
parcel
.
query
;
skip
=
query
&&
query
.
limit
.
length
===
0
&&
storage
.
skip_total
;
skip
=
query
&&
query
.
limit
&&
query
.
limit
.
length
===
0
&&
storage
.
skip_total
;
// return here, if skipping total query
...
...
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