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
eb88c798
Commit
eb88c798
authored
Jan 16, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hack: fixed pagination and search for hateoasstorage listbox
parent
08d8f99b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
js/erp5_loader.js
js/erp5_loader.js
+22
-6
No files found.
js/erp5_loader.js
View file @
eb88c798
...
...
@@ -31,13 +31,14 @@
* @param {object} response Object object passed on to next element
**/
"
subscription_details
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
pass
=
reply
.
pass
;
var
config
,
property
,
query
,
fetch
,
href
,
pass
=
reply
.
pass
;
if
(
storage
)
{
// access storage
return
storage
.
items
.
get
({
"
_id
"
:
reply
.
pass
.
value
})
fetch
=
reply
.
pass
.
value
||
reply
.
pass
.
state
.
query
.
force
;
return
storage
.
items
.
get
({
"
_id
"
:
fetch
})
.
then
(
function
(
answer
)
{
console
.
log
(
util
.
parse
(
answer
).
data
)
query
=
util
.
parse
(
answer
).
data
.
_links
.
slapos_jump
.
_query
;
if
(
pass
.
config
.
initial_query
===
undefined
)
{
...
...
@@ -45,6 +46,7 @@
}
pass
.
config
.
initial_query
.
query
=
query
;
pass
.
config
.
initial_query
.
skip_type
=
true
;
pass
.
preserve_lookup
=
reply
.
pass
.
value
;
// set a flag to now run allDocs
pass
.
force_allDocs
=
true
;
...
...
@@ -4993,6 +4995,11 @@
config
.
state
.
selected
=
[];
}
// HACK: overwrite query
if
(
config
.
state
.
preserve_lookup
)
{
config
.
state
.
query
.
force
=
config
.
state
.
preserve_lookup
;
}
// update gadget
app
.
setContent
(
{
"
generate
"
:
"
gadget
"
,
"
reference
"
:
config
.
id
,
"
href
"
:
config
.
state
.
href
},
...
...
@@ -5855,7 +5862,7 @@
* @return {object} response object/promise
*/
app
.
fetchDataQuery
=
function
(
reply
)
{
var
parsed
,
pass
=
reply
.
pass
;
var
parsed
,
pass
=
reply
.
pass
,
key
,
value
;
if
(
pass
.
skip
===
undefined
&&
(
pass
.
no_auth
||
(
pass
.
auth
&&
pass
.
active_login
)))
{
...
...
@@ -5882,11 +5889,20 @@
pass
.
field_list
=
storage
.
makeSelectList
(
pass
.
config
.
scheme
);
}
}
// HACK:
if
(
pass
.
force_allDocs
)
{
if
(
pass
.
preserve_lookup
)
{
pass
.
state
.
preserve_lookup
=
pass
.
preserve_lookup
;
}
}
else
{
key
=
pass
.
config
.
property_dict
.
initial_query_url_identifier
;
value
=
pass
.
value
;
}
pass
.
state
.
query
=
app
.
generateQueryObject
(
pass
.
config
.
initial_query
,
pass
.
type
,
pass
.
force_allDocs
?
null
:
pass
.
config
.
property_dict
.
initial_query_url_identifier
,
pass
.
force_allDocs
?
null
:
pass
.
value
,
key
,
value
,
pass
.
field_list
);
}
...
...
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