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
1f0ad0ff
Commit
1f0ad0ff
authored
Nov 15, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quote all object keys for Safari
parent
e83d9fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
js/erp5_loader.js
js/erp5_loader.js
+18
-18
No files found.
js/erp5_loader.js
View file @
1f0ad0ff
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
*/
*/
// TODO: figure out a way to translate per gadget!
// TODO: figure out a way to translate per gadget!
// TODO: figure out why pagebeforeshow does not trigger on the first page
// TODO: figure out why pagebeforeshow does not trigger on the first page
translate
:
function
(
obj
,
language
,
init
)
{
"
translate
"
:
function
(
obj
,
language
,
init
)
{
var
class_list
,
var
class_list
,
new_language
,
new_language
,
tag
=
obj
.
element
.
tagName
,
tag
=
obj
.
element
.
tagName
,
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
* @method submit
* @method submit
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
add
:
function
(
obj
)
{
"
add
"
:
function
(
obj
)
{
init
.
add
(
obj
);
init
.
add
(
obj
);
},
},
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
* @method jump
* @method jump
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
browse
:
function
(
obj
)
{
"
browse
"
:
function
(
obj
)
{
util
.
setPopupContentPointer
(
obj
,
"
browse
"
);
util
.
setPopupContentPointer
(
obj
,
"
browse
"
);
},
},
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
* @method tasks
* @method tasks
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
tasks
:
function
(
obj
)
{
"
tasks
"
:
function
(
obj
)
{
util
.
setPopupContentPointer
(
obj
,
"
tasks
"
);
util
.
setPopupContentPointer
(
obj
,
"
tasks
"
);
},
},
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
* @param {object} obj Action Object
* @param {object} obj Action Object
* @param {string} value Value of select
* @param {string} value Value of select
*/
*/
limit
:
function
(
obj
,
value
)
{
"
limit
"
:
function
(
obj
,
value
)
{
init
.
paginate
(
obj
,
"
limit
"
,
value
);
init
.
paginate
(
obj
,
"
limit
"
,
value
);
},
},
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
* @method first
* @method first
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
first
:
function
(
obj
)
{
"
first
"
:
function
(
obj
)
{
init
.
paginate
(
obj
,
"
first
"
);
init
.
paginate
(
obj
,
"
first
"
);
},
},
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
* @method last
* @method last
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
last
:
function
(
obj
)
{
"
last
"
:
function
(
obj
)
{
init
.
paginate
(
obj
,
"
last
"
);
init
.
paginate
(
obj
,
"
last
"
);
},
},
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
* @method prev
* @method prev
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
prev
:
function
(
obj
)
{
"
prev
"
:
function
(
obj
)
{
init
.
paginate
(
obj
,
"
prev
"
);
init
.
paginate
(
obj
,
"
prev
"
);
},
},
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
* @method next
* @method next
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
next
:
function
(
obj
)
{
"
next
"
:
function
(
obj
)
{
init
.
paginate
(
obj
,
"
next
"
);
init
.
paginate
(
obj
,
"
next
"
);
},
},
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
* @method sort
* @method sort
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
sort
:
function
(
obj
)
{
"
sort
"
:
function
(
obj
)
{
// sorting 5-states (none|abc_asc|123_asc|abc_desc|123_desc)
// sorting 5-states (none|abc_asc|123_asc|abc_desc|123_desc)
switch
(
obj
.
element
.
getAttribute
(
"
data-direction
"
))
{
switch
(
obj
.
element
.
getAttribute
(
"
data-direction
"
))
{
case
"
desc_abc
"
:
case
"
desc_abc
"
:
...
@@ -226,7 +226,7 @@
...
@@ -226,7 +226,7 @@
* @method check
* @method check
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
check
:
function
(
obj
)
{
"
check
"
:
function
(
obj
)
{
init
.
check
(
obj
,
undefined
);
init
.
check
(
obj
,
undefined
);
},
},
...
@@ -235,7 +235,7 @@
...
@@ -235,7 +235,7 @@
* @method check_all_visible
* @method check_all_visible
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
check_all_visible
:
function
(
obj
)
{
"
check_all_visible
"
:
function
(
obj
)
{
init
.
check
(
obj
,
false
);
init
.
check
(
obj
,
false
);
},
},
...
@@ -245,7 +245,7 @@
...
@@ -245,7 +245,7 @@
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
// NOTE: checkbox has 3 states (this hijacks indeterminate state!!!)
// NOTE: checkbox has 3 states (this hijacks indeterminate state!!!)
check_all
:
function
(
obj
)
{
"
check_all
"
:
function
(
obj
)
{
var
checkbox
=
obj
.
element
,
var
checkbox
=
obj
.
element
,
label
=
checkbox
.
previousSibling
;
label
=
checkbox
.
previousSibling
;
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
* @method search
* @method search
* @param {object} obj Action Object
* @param {object} obj Action Object
*/
*/
search
:
function
(
obj
)
{
"
search
"
:
function
(
obj
)
{
init
.
search
(
obj
);
init
.
search
(
obj
);
}
}
};
};
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
// category? Lot of queries
// category? Lot of queries
// TODO: add remaining mapping!
// TODO: add remaining mapping!
// TODO: bad because not generic! Try!!!
// TODO: bad because not generic! Try!!!
mapListItems
:
function
(
items
,
replace
)
{
"
mapListItems
"
:
function
(
items
,
replace
)
{
var
property
,
var
property
,
obj
,
obj
,
i
,
i
,
...
@@ -391,7 +391,7 @@
...
@@ -391,7 +391,7 @@
* @param {string} value Value to set this field to
* @param {string} value Value to set this field to
* @returns {object} config Configuration object to pass to factory
* @returns {object} config Configuration object to pass to factory
*/
*/
mapFormField
:
function
(
spec
,
overrides
,
value
)
{
"
mapFormField
"
:
function
(
spec
,
overrides
,
value
)
{
var
validation_list
,
var
validation_list
,
class_list
,
class_list
,
element
,
element
,
...
@@ -522,11 +522,11 @@
...
@@ -522,11 +522,11 @@
"
rows
"
:
prevail
.
widget
.
width
||
spec
.
widget
.
width
||
undefined
,
"
rows
"
:
prevail
.
widget
.
width
||
spec
.
widget
.
width
||
undefined
,
"
cols
"
:
prevail
.
widget
.
height
||
spec
.
widget
.
height
||
undefined
,
"
cols
"
:
prevail
.
widget
.
height
||
spec
.
widget
.
height
||
undefined
,
"
disabled
"
:
(
prevail
.
properties
.
enabled
||
spec
.
properties
.
enabled
)
?
"
disabled
"
:
(
prevail
.
properties
.
enabled
||
spec
.
properties
.
enabled
)
?
undefined
:
true
,
(
undefined
)
:
true
,
"
value
"
:
(
value
||
(
prevail
.
widget
.
default
===
0
?
"
0
"
:
"
value
"
:
(
value
||
(
prevail
.
widget
.
default
===
0
?
"
0
"
:
prevail
.
widget
.
default
)
||
spec
.
widget
.
default
||
undefined
),
prevail
.
widget
.
default
)
||
spec
.
widget
.
default
||
undefined
),
"
readonly
"
:
(
prevail
.
properties
.
editable
===
false
||
"
readonly
"
:
(
prevail
.
properties
.
editable
===
false
||
spec
.
properties
.
editable
===
false
)
?
true
:
undefined
,
spec
.
properties
.
editable
===
false
)
?
(
true
)
:
undefined
,
"
options
"
:
(
prevail
.
widget
.
items
||
spec
.
widget
.
items
)
?
"
options
"
:
(
prevail
.
widget
.
items
||
spec
.
widget
.
items
)
?
([
([
prevail
.
widget
.
items
||
spec
.
widget
.
items
||
null
,
prevail
.
widget
.
items
||
spec
.
widget
.
items
||
null
,
...
...
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