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
987a942b
Commit
987a942b
authored
Jul 29, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
items/fix: updated CSS, refactor bindings for refresh
parent
87e2b117
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
31 deletions
+8
-31
modules/ui/items/items.css
modules/ui/items/items.css
+1
-0
modules/ui/items/items.js
modules/ui/items/items.js
+7
-31
No files found.
modules/ui/items/items.css
View file @
987a942b
...
...
@@ -21,6 +21,7 @@
}
.items_listview
li
,
.items_listview
li
a
{
display
:
inline-block
;
border-width
:
0px
!important
;
}
.items_listview
li
,
...
...
modules/ui/items/items.js
View file @
987a942b
...
...
@@ -12,32 +12,6 @@ define([
// like pointers or a default fallback. This is what we are doing currently.
// Leave it like that!
// Javascript closest()
priv
.
closest
=
function
(
elem
,
selector
)
{
var
matchesSelector
=
elem
.
matches
||
elem
.
webkitMatchesSelector
||
elem
.
mozMatchesSelector
||
elem
.
msMatchesSelector
,
oldbrowserReturn
;
if
(
matchesSelector
)
{
while
(
elem
)
{
if
(
matchesSelector
.
bind
(
elem
)(
selector
))
{
return
elem
;
}
else
{
elem
=
elem
.
parentNode
;
}
}
return
false
;
}
else
{
oldbrowserReturn
=
$
(
elem
).
closest
(
selector
);
if
(
oldBrowserReturn
.
length
>
0
)
{
return
oldBrowserReturn
;
}
return
false
;
}
};
// generate items to display
priv
.
generateItems
=
function
(
params
)
{
var
markup
,
spec
,
...
...
@@ -129,15 +103,17 @@ define([
// TODO: this is for page event bindings. Once JQM content replaces
// page, remove this and make the gadget the content section to
// be updated.
spec
.
page
=
priv
.
closest
(
spec
.
gadget
.
dom
.
get
(
0
),
"
div[data-role='page']
"
);
spec
.
page
=
App
.
util
.
closest
(
spec
.
gadget
.
dom
.
get
(
0
),
"
div[data-role='page']
"
);
spec
.
pageId
=
"
#
"
+
spec
.
page
.
id
;
spec
.
source
=
source
;
spec
.
callback_mockup
=
callback_mockup
;
if
(
!
spec
.
page
.
getAttribute
(
"
items_tag
"
))
{
spec
.
page
.
setAttribute
(
"
items_tag
"
,
"
true
"
);
$
(
document
).
on
(
"
pagebeforeshow.items
"
,
spec
.
pageId
,
function
(
e
)
{
if
(
!
spec
.
page
.
getAttribute
(
"
events_items
"
))
{
spec
.
page
.
setAttribute
(
"
events_items
"
,
true
);
$
(
document
).
on
(
"
pagebeforeshow.items
"
,
spec
.
pageId
,
function
(
e
,
data
)
{
if
(
$
.
mobile
.
firstPage
.
attr
(
'
id
'
)
!==
spec
.
pageId
.
replace
(
"
#
"
,
""
))
{
priv
.
generateItems
(
spec
);
}
});
// and run intial
priv
.
generateItems
(
spec
);
...
...
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