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
11804cdf
Commit
11804cdf
authored
Nov 21, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: wrong object reference and query parameter
parent
ef03d483
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
data/category.json
data/category.json
+1
-1
js/erp5_loader.js
js/erp5_loader.js
+11
-16
No files found.
data/category.json
View file @
11804cdf
...
...
@@ -2,7 +2,7 @@
"portal_type_source"
:
"Application Categories"
,
"portal_type_title"
:
"category"
,
"portal_type_fields"
:
"category_fieldlist"
,
"initial_query"
:
{
"include_doc
ument
s"
:
true
,
"limit"
:[]},
"initial_query"
:
{
"include_docs"
:
true
,
"limit"
:[]},
"form"
:
null
,
"property_dict"
:
{},
"children"
:
[{
...
...
js/erp5_loader.js
View file @
11804cdf
...
...
@@ -3279,15 +3279,15 @@
pointer
,
zero_no_show
,
select_counter
,
no_limit
,
no_items
,
info_field_list
=
element
.
querySelectorAll
(
"
.info
"
),
info
=
""
;
// TODO: .....
crap
// TODO: .....
redo
// on updates, info_field_list may be empty, because only part of the
// gadget is updated. Need to find info_fields by hand
if
(
info_field_list
.
length
===
0
)
{
// switch from NodeList to array
info_field_list
=
[];
selection
=
document
.
querySelectorAll
(
"
.info
"
);
for
(
i
=
0
;
i
<
selection
.
length
;
i
+=
1
)
{
...
...
@@ -3296,7 +3296,6 @@
info_field_list
.
push
(
selection
[
i
]);
}
}
}
for
(
j
=
0
;
j
<
info_field_list
.
length
;
j
+=
1
)
{
...
...
@@ -3304,8 +3303,10 @@
switch
(
info_field
.
getAttribute
(
"
data-info
"
))
{
case
"
records
"
:
if
(
total
!==
undefined
)
{
zero_no_show
=
((
options
.
limit
[
0
]
||
0
===
0
)
&&
total
!==
0
)
?
1
:
(
options
.
limit
[
0
]
||
0
);
min
=
Math
.
min
(
total
,
(
zero_no_show
+
(
options
.
limit
[
1
]
||
0
)));
no_limit
=
options
.
limit
[
0
]
||
0
;
no_items
=
options
.
limit
[
1
]
||
0
;
zero_no_show
=
(
no_limit
===
0
&&
total
!==
0
)
?
1
:
no_limit
;
min
=
Math
.
min
(
total
,
(
no_limit
+
no_items
));
info
=
zero_no_show
+
"
-
"
+
min
+
"
/
"
+
total
+
"
Records
"
;
}
break
;
...
...
@@ -3583,7 +3584,7 @@
init
.
timer
=
window
.
setTimeout
(
function
()
{
// update gadgets
init
.
setPageElements
(
{},
[{
"
children
"
:
[{
"
id
"
:
action_dict
.
id
}]}],
false
{},
[{
"
children
"
:
[{
"
id
"
:
config
.
id
}]}],
false
);
init
.
timer
=
0
;
},
500
);
...
...
@@ -3883,7 +3884,7 @@
// update gadget
init
.
setPageElements
(
{},
[{
"
children
"
:
[{
"
id
"
:
action_dict
.
id
}]}],
false
{},
[{
"
children
"
:
[{
"
id
"
:
config
.
id
}]}],
false
);
}
else
{
util
.
errorHandler
({
...
...
@@ -3916,9 +3917,7 @@
.
then
(
function
(
reply
)
{
if
(
!
page
.
querySelectorAll
(
"
div.ui-content
"
)[
0
]
.
getAttribute
(
"
data-bound
"
))
{
return
init
.
setPageElements
({
"
id
"
:
page
.
id
},
reply
,
undefined
);
return
init
.
setPageElements
({
"
id
"
:
page
.
id
},
reply
,
undefined
);
}
})
.
fail
(
util
.
errorHandler
);
...
...
@@ -4089,11 +4088,7 @@
init
.
fetchPageLayouts
(
"
settings
"
,
destination
)
.
then
(
function
(
reply
)
{
return
init
.
setPageElements
(
config
,
reply
,
create
);
return
init
.
setPageElements
(
config
,
reply
,
create
);
})
.
then
(
init
.
setPageBindings
)
.
fail
(
util
.
errorHandler
);
...
...
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