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
5e4279f6
Commit
5e4279f6
authored
Apr 29, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: moved enhanceWithin() to place I don't like
parent
8b6eec7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
js/erp5_loader.js
js/erp5_loader.js
+6
-5
No files found.
js/erp5_loader.js
View file @
5e4279f6
...
@@ -5409,7 +5409,6 @@
...
@@ -5409,7 +5409,6 @@
//TODO: merge with pagebindings, so all jQuery is at one place!
//TODO: merge with pagebindings, so all jQuery is at one place!
app
.
setGlobalBindings
=
function
()
{
app
.
setGlobalBindings
=
function
()
{
$
(
document
)
$
(
document
)
.
enhanceWithin
()
// generate dynamic pages
// generate dynamic pages
.
on
(
"
pagebeforechange
"
,
function
(
e
,
data
)
{
.
on
(
"
pagebeforechange
"
,
function
(
e
,
data
)
{
...
@@ -5479,6 +5478,8 @@
...
@@ -5479,6 +5478,8 @@
factory
.
util
.
generateDynamicContents
(
app
.
parseAction
(
e
));
factory
.
util
.
generateDynamicContents
(
app
.
parseAction
(
e
));
});
});
$
(
document
).
enhanceWithin
();
// remove focus from active elements on key-tab switches
// remove focus from active elements on key-tab switches
window
.
onblur
=
function
()
{
window
.
onblur
=
function
()
{
document
.
activeElement
.
blur
();
document
.
activeElement
.
blur
();
...
@@ -6832,10 +6833,6 @@
...
@@ -6832,10 +6833,6 @@
wrapper
.
fragment
.
appendChild
(
wrapper
.
placeholder
);
wrapper
.
fragment
.
appendChild
(
wrapper
.
placeholder
);
}
}
// // we should have some wrapper to call enhanceWithin on
// // TODO: only call on whatever we append!
// $(document).enhanceWithin();
// return fragment
// return fragment
return
RSVP
.
resolve
(
wrapper
.
fragment
||
undefined
);
return
RSVP
.
resolve
(
wrapper
.
fragment
||
undefined
);
})
})
...
@@ -7397,6 +7394,10 @@
...
@@ -7397,6 +7394,10 @@
.
then
(
app
.
init
.
config
)
.
then
(
app
.
init
.
config
)
.
then
(
app
.
setGlobalBindings
)
.
then
(
app
.
setGlobalBindings
)
.
then
(
app
.
parsePage
)
.
then
(
app
.
parsePage
)
.
then
(
function
()
{
// need one call here to initialize whats on the first page
$
(
document
).
enhanceWithin
();
})
.
fail
(
app
.
util
.
error
);
.
fail
(
app
.
util
.
error
);
});
});
...
...
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