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
1cdd1784
Commit
1cdd1784
authored
Apr 11, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: cleanup, corrections
parent
c9f69fe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
js/erp5_loader.js
js/erp5_loader.js
+16
-8
No files found.
js/erp5_loader.js
View file @
1cdd1784
...
...
@@ -96,7 +96,6 @@
element
.
appendChild
(
factory
.
element
({
"
type
"
:
"
img
"
,
"
direct
"
:
{
"
src
"
:
pic
.
href
},
"
attributes
"
:
{},
"
logic
"
:
{
"
data-i18n
"
:
pic
.
alt_i18n
?
(
"
[alt]
"
+
pic
.
alt_i18n
)
:
null
,
"
alt
"
:
pic
.
alt
||
""
...
...
@@ -179,7 +178,7 @@
theme
,
icon_string
,
input_type
,
need_text_node
,
container_class_list
,
label_class_list
,
index
,
disabled
,
active
,
text
,
addLabel
,
readonly
,
mask_set
,
mask
,
star
,
hidden_field
,
icon
,
no_validate
,
has_opts
,
push_label
;
push_label
,
no_text
;
// exit early with a span tag
// TODO: make this with label et al
...
...
@@ -204,10 +203,12 @@
"
ui-hidden-accessible
"
:
""
)
},
"
attributes
"
:
{
"
for
"
:
config
.
direct
.
id
||
util
.
uuid
(),
"
data-i18n
"
:
config
.
logic
.
label_i18n
||
""
"
for
"
:
config
.
direct
.
id
||
util
.
uuid
()
},
"
logic
"
:
{
"
text
"
:
config
.
logic
.
label
||
""
}
"
logic
"
:
{
"
text
"
:
config
.
logic
.
label
||
""
,
"
data-i18n
"
:
config
.
logic
.
label_i18n
||
null
}
});
};
...
...
@@ -320,12 +321,14 @@
// messages. But can't be determined here if this element is in
// a group
no_validate
=
true
;
no_text
=
spec
.
attributes
[
"
data-iconpos
"
];
container_class_list
=
"
ui-
"
+
spec
.
attributes
.
type
;
label_inside
=
true
;
push_label
=
(
has_opts
&&
has_opts
.
length
>
0
);
label_class_list
=
"
ui-btn ui-corner-all ui-btn-inherit
"
+
"
ui-icon-radio-off
"
/* + active */
+
"
ui-radio-
"
+
active
+
index
+
disabled
+
readonly
;
active
+
index
+
disabled
+
readonly
+
(
no_text
?
"
ui-btn-icon-
"
+
no_text
:
""
);
spec
.
attributes
[
"
data-cacheval
"
]
=
true
;
delete
spec
.
logic
.
options
;
break
;
...
...
@@ -334,9 +337,11 @@
icon_string
=
factory
.
util
.
classes
(
spec
,
"
checkbox
"
);
container_class_list
=
"
ui-
"
+
spec
.
attributes
.
type
;
label_inside
=
true
;
no_text
=
spec
.
attributes
[
"
data-iconpos
"
];
push_label
=
(
has_opts
&&
has_opts
.
length
>
0
);
label_class_list
=
"
ui-btn ui-corner-all ui-btn-inherit
"
+
icon_string
+
"
ui-checkbox-
"
+
active
+
index
+
disabled
+
readonly
;
icon_string
+
"
ui-checkbox-
"
+
active
+
index
+
disabled
+
readonly
+
(
no_text
?
"
ui-btn-icon-
"
+
no_text
:
""
);
spec
.
attributes
[
"
data-cacheval
"
]
=
false
;
delete
spec
.
logic
.
options
;
break
;
...
...
@@ -603,6 +608,7 @@
/* ********************************************************************** */
/* JQM Collapsible-Set */
/* ********************************************************************** */
// TODO: BROKEN!
/**
* Generate a collapsible set
* Full spec (property_dict) example (with defaults):
...
...
@@ -1285,7 +1291,7 @@
}
container
=
document
.
createDocumentFragment
();
slot
=
spec
.
slot
||
undefined
;
slot
=
spec
.
slot
;
switch
(
spec
.
wrap
)
{
case
"
fragment
"
:
...
...
@@ -3549,6 +3555,7 @@
// TODO: action_menu input + form?
// TODO: merge with list mapping
// TODO: how to handle translations of record texts?
// TODO: merge link building with listItem (allow custom core)
map
.
tableItem
=
function
(
item
,
wrapper
,
i
)
{
var
j
,
k
,
l
,
segment
,
map_section
,
section
,
row
,
cell
,
fragment
,
base
,
quirk_dict
,
record
,
record_id
,
core
,
crop
,
re
;
...
...
@@ -6508,6 +6515,7 @@
quirk_dict
.
length
=
kids
.
length
;
is_id
=
(
quirk_dict
.
data
||
{}).
_id
||
quirk_dict
.
item_identifier
;
// TODO: MAKE OPTIONAL UTIL-ajax-for-each... ask Tristan
for
(
i
=
0
;
i
<
kids
.
length
;
i
+=
1
)
{
kid
=
kids
[
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