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
23808364
Commit
23808364
authored
Apr 24, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: fix reloading content of existing gadget on backlink to #home
parent
bb1bd1cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
js/erp5_loader.js
js/erp5_loader.js
+15
-3
No files found.
js/erp5_loader.js
View file @
23808364
...
...
@@ -5274,6 +5274,7 @@
skipper
,
base_page
;
if
(
data
)
{
// update page title on backwards transition to the first page (still
// is in DOM, so no new page created, so no title update...)
// TODO: not bulletproof i18n handling... we expect i18n to be defined
...
...
@@ -5284,11 +5285,12 @@
base_page
.
getAttribute
(
"
data-url
"
))
{
app
.
setPageTitle
(
"
global_dict.home
"
);
// NOTE: only once!
if
(
base_page
.
getAttribute
(
"
data-set
"
)
===
null
)
{
// NOTE: this will allow going back, but only if we are not
// coming from root
if
(
!
app
.
deeplink_flag
)
{
skipper
=
true
;
app
.
deeplink_flag
=
true
;
}
base_page
.
setAttribute
(
"
data-set
"
,
"
true
"
);
}
}
...
...
@@ -5299,17 +5301,27 @@
}
else
{
raw_url
=
data
.
toPage
;
}
}
else
{
raw_url
=
window
.
location
.
href
;
}
if
(
typeof
raw_url
===
"
string
"
)
{
// decode
if
(
data
&&
data
.
options
.
reverse
)
{
raw_url
=
window
.
decodeURIComponent
(
raw_url
);
}
config
=
app
.
util
.
parseLink
(
raw_url
);
// NOTE: if we start from home we must prevent reloading home
// because it will be kept in the DOM
if
(
!
config
.
deeplink
)
{
// we start from home, so we must not allow going back
// and reloading
app
.
deeplink_flag
=
true
;
}
if
(
e
)
{
page
=
util
.
getPage
(
raw_url
.
split
(
"
#
"
).
pop
());
base
=
page
?
page
.
getAttribute
(
"
data-external-page
"
)
:
null
;
...
...
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