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
36b712ff
Commit
36b712ff
authored
Apr 18, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: updated dynamic value setting (still can't inherit through tree)
parent
4779f26f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
js/erp5_loader.js
js/erp5_loader.js
+18
-8
No files found.
js/erp5_loader.js
View file @
36b712ff
...
...
@@ -77,6 +77,7 @@
case
"
type
"
:
case
"
rel
"
:
case
"
alt
"
:
case
"
src
"
:
case
"
readonly
"
:
case
"
size
"
:
case
"
colspan
"
:
...
...
@@ -6620,7 +6621,7 @@
return
RSVP
.
all
(
promise_list
)
.
then
(
function
(
response_list
)
{
var
j
,
k
,
res_len
,
response
,
param_len
,
out_param
;
var
j
,
k
,
res_len
,
response
,
param_len
,
out_param
,
val
;
// TODO: CUSTOM CODE, wrap in callback and make generic handler
for
(
j
=
0
,
res_len
=
response_list
.
length
;
j
<
res_len
;
j
+=
1
)
{
...
...
@@ -6628,7 +6629,9 @@
for
(
k
=
0
,
param_len
=
param_list
.
length
;
k
<
param_len
;
k
+=
1
)
{
out_param
=
param_list
[
k
];
if
(
response
.
field
===
out_param
[
1
])
{
element
.
logic
[
out_param
[
0
]]
=
response
.
value
;
val
=
out_param
[
0
];
element
.
logic
[
val
]
=
element
.
logic
[
val
]
||
""
;
element
.
logic
[
val
]
+=
response
.
value
;
}
}
}
...
...
@@ -6645,20 +6648,22 @@
* @returns {object} kid
*/
app
.
util
.
setParam
=
function
(
kid
,
wrapper
)
{
var
i
,
len
,
param_list
,
param
,
href
,
loc
,
s
ep
;
var
i
,
len
,
param_list
,
param
,
href
,
loc
,
s
plitter
,
val
;
param_list
=
kid
.
logic
.
setParam
;
for
(
i
=
0
,
len
=
param_list
.
length
;
i
<
len
;
i
+=
1
)
{
param
=
param_list
[
i
];
switch
(
param
[
1
])
{
// NOTE: hacked for oauth redirect url TODO: remove, not generic!
// NOTE: hacked for oauth redirect url
// TODO: remove, not generic!
// TODO: find way to include encoding when setting a href
case
"
location
"
:
href
=
kid
.
direct
.
href
;
s
ep
=
href
.
indexOf
(
"
?
"
)
>
0
?
"
&
"
:
"
?
"
;
s
plitter
=
href
.
indexOf
(
"
?
"
)
>
0
?
"
&
"
:
"
?
"
;
loc
=
window
.
location
;
kid
.
direct
.
href
+=
s
ep
+
window
.
encodeURIComponent
(
param
[
0
])
+
"
=
"
+
window
.
encodeURIComponent
(
kid
.
direct
.
href
+=
s
plitter
+
window
.
encodeURIComponent
(
param
[
0
])
+
"
=
"
+
window
.
encodeURIComponent
(
loc
.
origin
+
loc
.
pathname
+
loc
.
hash
.
split
(
"
?
"
)[
0
]
);
break
;
...
...
@@ -6668,7 +6673,12 @@
if
(
param
[
1
].
split
(
"
subordinate_
"
).
length
>
1
)
{
kid
.
needs_subordination
=
true
;
}
else
{
kid
.
logic
[
param
[
0
]]
=
wrapper
.
property_dict
.
data
.
doc
[
param
[
1
]];
val
=
param
[
0
];
kid
.
logic
[
val
]
=
kid
.
logic
[
val
]
||
""
;
kid
.
logic
[
val
]
+=
wrapper
.
property_dict
.
data
.
doc
[
param
[
1
]];
if
(
val
===
"
href
"
)
{
kid
.
logic
[
val
]
=
window
.
encodeURIComponent
(
kid
.
logic
[
val
]);
}
delete
kid
.
logic
.
setParam
[
i
];
}
}
...
...
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