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
ff92ee42
Commit
ff92ee42
authored
Apr 14, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge: fixed conflicts
parent
41462f79
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
56 deletions
+32
-56
data/home.json
data/home.json
+2
-2
data/ui_panel_categories.json
data/ui_panel_categories.json
+0
-42
data/ui_panel_sort.json
data/ui_panel_sort.json
+3
-3
js/erp5_loader.js
js/erp5_loader.js
+27
-9
No files found.
data/home.json
View file @
ff92ee42
...
...
@@ -25,8 +25,8 @@
"initial_query"
:
{
"query"
:
"reference: 'product_group'"
,
"include_docs"
:
true
,
"select_list"
:
[
"title"
,
"title_i18n"
,
"_id"
]},
"property_dict"
:
{
"link"
:
true
,
"link_identifier"
:
"
_id
"
,
"link_core"
:
"product_module::
filter
="
"link_identifier"
:
"
title
"
,
"link_core"
:
"product_module::
group
="
},
"scheme"
:
[
{
...
...
data/ui_panel_categories.json
deleted
100644 → 0
View file @
41462f79
{
"property_dict"
:
{},
"children"
:[{
"generate"
:
"widget"
,
"type"
:
"header"
,
"property_dict"
:
{
"id"
:
"search-header"
,
"theme"
:
"slapos-black"
,
"add_content"
:
0
,
"section_list"
:[
"last"
],
"title"
:
"Categories"
,
"title_i18n"
:
"global_dict.categories"
},
"children"
:[{
"type"
:
"a"
,
"direct"
:
{
"href"
:
"#"
,
"className"
:
"ui-panel-close ui-icon-remove ui-btn ui-btn-icon-notext ui-shadow ui-corner-all"
},
"attributes"
:
{
"data-enhanced"
:
true
,
"data-rel"
:
"close"
},
"logic"
:
{
"text"
:
"Close"
}
}]
},
{
"generate"
:
"widget"
,
"type"
:
"listview"
,
"property_dict"
:
{
"theme"
:
"slapos-white"
,
"map_children"
:
"listItem"
},
"children"
:
[
{
"type"
:
"item"
,
"href"
:
"#products/apparel"
,
"center"
:
{
"text"
:
[{
"type"
:
"h1"
,
"text"
:
"Apparel"
,
"text_i18n"
:
"global_dict.apparel"
}]},
"right"
:
{
"check"
:
true
}},
{
"type"
:
"item"
,
"href"
:
"#products/accessories"
,
"center"
:
{
"text"
:
[{
"type"
:
"h1"
,
"text"
:
"Accessories"
,
"text_i18n"
:
"global_dict.accessories"
}]},
"right"
:
{
"check"
:
true
}},
{
"type"
:
"item"
,
"href"
:
"#products/shoes"
,
"center"
:
{
"text"
:
[{
"type"
:
"h1"
,
"text"
:
"Shoes"
,
"text_i18n"
:
"global_dict.shoes"
}]},
"right"
:
{
"check"
:
true
}},
{
"type"
:
"item"
,
"href"
:
"#products/sales"
,
"center"
:
{
"text"
:
[{
"type"
:
"h1"
,
"text"
:
"Sales"
,
"text_i18n"
:
"global_dict.sales"
}]},
"right"
:
{
"check"
:
true
}},
{
"type"
:
"item"
,
"href"
:
"#products/new"
,
"center"
:
{
"text"
:[{
"type"
:
"h1"
,
"text"
:
"New Items"
,
"text_i18n"
:
"global_dict.new"
}]},
"right"
:
{
"check"
:
true
}}
]
}
]
}
\ No newline at end of file
data/ui_panel_sort.json
View file @
ff92ee42
...
...
@@ -31,9 +31,9 @@
"map_children"
:
"listItem"
},
"children"
:
[
{
"type"
:
"item"
,
"href"
:
"#product
s/sort/latest
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Newest Items"
,
"text_i18n"
:
"global_dict.latest"
}]},
{
"type"
:
"item"
,
"href"
:
"#product
s/sort/price_lowest
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Lowest Price"
,
"text_i18n"
:
"global_dict.lowest"
}]},
{
"type"
:
"item"
,
"href"
:
"#product
s/sort/price_highest
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Highest Price"
,
"text_i18n"
:
"global_dict.highest"
}]}
{
"type"
:
"item"
,
"href"
:
"#product
_module::sort=date_created,descending
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Newest Items"
,
"text_i18n"
:
"global_dict.latest"
}]},
{
"type"
:
"item"
,
"href"
:
"#product
_module::sort=price,descending
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Lowest Price"
,
"text_i18n"
:
"global_dict.lowest"
}]},
{
"type"
:
"item"
,
"href"
:
"#product
_module::sort=price,ascending
"
,
"center"
:
[{
"type"
:
"h1"
,
"text"
:
"Highest Price"
,
"text_i18n"
:
"global_dict.highest"
}]}
]
}
]
...
...
js/erp5_loader.js
View file @
ff92ee42
...
...
@@ -4762,6 +4762,7 @@
}
if
((
start
>
total
&&
total
!==
undefined
)
||
start
<
0
)
{
console
.
log
(
"
DONE
"
)
return
;
}
...
...
@@ -4772,10 +4773,14 @@
if
(
config
.
state
.
selected
)
{
config
.
state
.
selected
=
[];
}
console
.
log
(
"
fertig
"
)
console
.
log
(
"
let's set content
"
)
console
.
log
(
config
)
// update gadget
app
.
content
.
set
(
{},
{
"
portal_type_source
"
:
config
.
state
.
type
},
{
"
reference
"
:
config
.
id
,
"
href
"
:
config
.
state
.
href
,
...
...
@@ -5003,7 +5008,6 @@
"
gadget
"
:
document
.
getElementById
(
id
)
};
has_form
=
response
.
gadget
.
getElementsByTagName
(
"
form
"
);
console
.
log
(
e
);
return
util
.
mergeObject
(
{
"
form
"
:
has_form
?
has_form
[
0
]
:
undefined
,
...
...
@@ -5850,7 +5854,7 @@
// TODO: find better way to determine "value"
app
.
content
.
total
=
function
(
reply
)
{
var
pass
=
reply
.
pass
,
last
;
console
.
log
(
"
total=?
"
)
if
(
!
pass
.
skip
)
{
//pass.data_dict.field_dict = util.parse(reply.response);
...
...
@@ -5927,7 +5931,8 @@
**/
app
.
content
.
query
=
function
(
reply
)
{
var
pass
=
reply
.
pass
;
console
.
log
(
"
query?
"
)
console
.
log
(
pass
)
if
(
!
pass
.
skip
)
{
// set total rows
...
...
@@ -5994,6 +5999,8 @@
encoded
,
wrapper
,
active
,
selector
,
update_target
,
target
,
grant_child
,
quirk_dict
,
generator
,
pointer_results
,
data_total_rows
;
console
.
log
(
"
REACHED MAKE
"
)
console
.
log
(
reply
.
pass
)
pass
=
reply
.
pass
;
pass
.
config_dict
=
pass
.
config_dict
||
{};
type
=
pass
.
content_dict
.
type
;
...
...
@@ -6167,6 +6174,8 @@
}
}
console
.
log
(
pointer_results
)
console
.
log
(
kids
)
// loop over children
if
(
kids
.
length
)
{
...
...
@@ -6276,7 +6285,9 @@
return
RSVP
.
all
(
promise_list
)
.
then
(
function
(
response_list
)
{
var
k
,
l
,
done_target
,
wrapper_selector
,
response
,
content
;
var
k
,
l
,
target
,
wrapper_selector
,
response
,
content
;
console
.
log
(
"
DONE
"
)
console
.
log
(
promise_list
)
for
(
k
=
0
,
l
=
response_list
.
length
;
k
<
l
;
k
+=
1
)
{
response
=
response_list
[
k
];
...
...
@@ -6499,18 +6510,25 @@
* @return {string} href
*/
app
.
util
.
generateLink
=
function
(
spec
,
id
)
{
var
level
,
core
;
var
level
,
core
,
separator
;
// external link
if
(
spec
.
source
)
{
return
spec
.
source
;
}
// link current segment parameter vs segment
if
(
spec
.
link_core
.
split
(
"
::
"
).
length
>
1
)
{
separator
=
""
;
}
else
{
separator
=
"
/
"
;
}
level
=
spec
.
layout_level
||
0
;
core
=
spec
.
link_core
||
(
spec
.
fragment_list
?
spec
.
fragment_list
.
slice
(
0
,
level
+
1
).
join
(
"
/
"
)
:
""
);
return
(
"
#
"
+
core
+
"
/
"
+
window
.
encodeURIComponent
(
id
)
);
return
(
"
#
"
+
core
+
separator
+
window
.
encodeURIComponent
(
id
));
};
/**
...
...
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