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
0e3f1f2f
Commit
0e3f1f2f
authored
Apr 18, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: add data-widget/map to HTML output as hint on updates
parent
562301c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
js/erp5_loader.js
js/erp5_loader.js
+20
-15
No files found.
js/erp5_loader.js
View file @
0e3f1f2f
...
...
@@ -1827,6 +1827,7 @@
*/
// TODO: add collapsible support if needed
// TODO: dividers? will not be in spec, so can only be listview option!
// TODO: find better way to set mapper/widget
factory
.
widget
.
listview
=
function
(
spec
)
{
var
fragment
,
has_filter
,
generator
;
...
...
@@ -1937,18 +1938,22 @@
(
spec
.
inset
?
"
ui-listview-inset ui-corner-all ui-shadow
"
:
""
)
},
"
attributes
"
:
{
"
data-role
"
:
"
listview
"
,
"
data-enhanced
"
:
true
},
"
attributes
"
:
{
"
data-role
"
:
"
listview
"
,
"
data-enhanced
"
:
true
,
// NOTE: on updates, we need wrapper with generator and mapper???
"
data-widget
"
:
"
listview
"
},
"
logic
"
:
{
"
id
"
:
spec
.
id
||
null
,
"
data-update
"
:
spec
.
dynamic
?
true
:
null
,
// NOTE: on updates, we need wrapper with generator...
"
data-widget
"
:
"
listview
"
,
"
data-reference
"
:
spec
.
reference
||
null
,
"
data-filter
"
:
spec
.
filter
||
null
,
"
data-input
"
:
spec
.
input
||
null
,
"
data-filter-theme
"
:
spec
.
filter_theme
||
null
,
"
data-filter-placeholder
"
:
spec
.
placeholder
||
null
,
"
data-divider-theme
"
:
spec
.
divider_theme
||
null
"
data-divider-theme
"
:
spec
.
divider_theme
||
null
,
"
data-map
"
:
spec
.
map_children
||
null
}
}));
}
...
...
@@ -2297,7 +2302,8 @@
"
attributes
"
:
{
"
data-update
"
:
"
true
"
,
"
data-widget
"
:
"
table
"
}
},
"
logic
"
:
{
"
data-map
"
:
spec
.
map_children
||
null
}
}));
break
;
}
...
...
@@ -4639,10 +4645,8 @@
{
"
portal_type_source
"
:
config
.
state
.
type
,
"
portal_type_title
"
:
config
.
state
.
title
,
"
property_dict
"
:
util
.
mergeObject
({
"
dynamic
"
:
true
,
"
map_children
"
:
config
.
state
.
dyno_dict
.
map_children
},
"
property_dict
"
:
util
.
mergeObject
(
{
"
dynamic
"
:
true
},
config
.
state
.
dyno_dict
),
"
scheme
"
:
config
.
state
.
scheme
},
...
...
@@ -4893,10 +4897,8 @@
{
"
portal_type_source
"
:
config
.
state
.
type
,
"
portal_type_title
"
:
config
.
state
.
title
,
"
property_dict
"
:
util
.
mergeObject
({
"
dynamic
"
:
true
,
"
map_children
"
:
config
.
state
.
dyno_dict
.
map_children
},
"
property_dict
"
:
util
.
mergeObject
(
{
"
dynamic
"
:
true
},
config
.
state
.
dyno_dict
),
"
scheme
"
:
config
.
state
.
scheme
},
...
...
@@ -6313,12 +6315,14 @@
}
}
}
else
{
// TODO: can this be done without storing on and querying DOM???
widget
=
pass
.
state
.
gadget
.
querySelector
(
"
[data-update]
"
)
.
getAttribute
(
"
data-widget
"
);
wrapper
.
property_dict
.
map_children
=
widget
.
getAttribute
(
"
data-map
"
);
wrapper
=
util
.
mergeObject
(
factory
.
widget
[
widget
](
wrapper
.
property_dict
),
factory
.
widget
[
widget
.
getAttribute
(
"
data-widget
"
)
](
wrapper
.
property_dict
),
wrapper
);
// add scheme and field_dict to list
kids
=
util
.
inherit
(
pointer_results
.
data
.
rows
,
...
...
@@ -6437,6 +6441,7 @@
for
(
k
=
0
,
l
=
response_list
.
length
;
k
<
l
;
k
+=
1
)
{
response
=
response_list
[
k
];
done_target
=
undefined
;
if
(
response
)
{
// generate target for and append response
// NOTE: wrapper.spec is used for header only.
...
...
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