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
3fb4020d
Commit
3fb4020d
authored
Jul 29, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search: added pagebeforeshow method call when loading same page again
parent
e8d8d423
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
modules/ui/items/items.js
modules/ui/items/items.js
+25
-9
modules/ui/searchbar/searchbar.js
modules/ui/searchbar/searchbar.js
+0
-1
No files found.
modules/ui/items/items.js
View file @
3fb4020d
...
...
@@ -17,16 +17,25 @@ define([
var
matchesSelector
=
elem
.
matches
||
elem
.
webkitMatchesSelector
||
elem
.
mozMatchesSelector
||
elem
.
msMatchesSelector
;
while
(
elem
)
{
if
(
matchesSelector
.
bind
(
elem
)(
selector
))
{
return
elem
;
}
else
{
elem
=
elem
.
parentNode
;
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
;
}
return
false
;
};
// generate items to display
...
...
@@ -125,7 +134,14 @@ define([
spec
.
source
=
source
;
spec
.
callback_mockup
=
callback_mockup
;
priv
.
generateItems
(
spec
);
if
(
!
spec
.
page
.
getAttribute
(
"
items_tag
"
))
{
spec
.
page
.
setAttribute
(
"
items_tag
"
,
"
true
"
);
$
(
document
).
on
(
"
pagebeforeshow.items
"
,
spec
.
pageId
,
function
(
e
)
{
priv
.
generateItems
(
spec
);
});
// and run intial
priv
.
generateItems
(
spec
);
}
};
that
.
callback
=
function
(
self
)
{
...
...
modules/ui/searchbar/searchbar.js
View file @
3fb4020d
...
...
@@ -12,7 +12,6 @@ define([
value
,
runSearch
;
runSearch
=
function
(
value
)
{
console
.
log
(
"
running search with value =
"
+
value
);
$
.
mobile
.
changePage
(
"
products.html
"
,
{
"
transition
"
:
"
slide
"
,
"
allowSamePageTransition
"
:
true
,
...
...
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