Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
0ea4f6ff
Commit
0ea4f6ff
authored
Nov 26, 2021
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: Fix dropbox redirect in bootloader
parent
eed03565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.js
...lateItem/web_page_module/gadget_officejs_bootloader_js.js
+13
-5
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.js
View file @
0ea4f6ff
...
@@ -72,7 +72,8 @@ var repair = false;
...
@@ -72,7 +72,8 @@ var repair = false;
.
ready
(
function
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
var
i
,
var
i
,
element_list
=
element_list
=
gadget
.
element
.
querySelectorAll
(
'
[data-install-configuration]
'
);
gadget
.
element
.
querySelectorAll
(
'
[data-install-configuration]
'
),
hash_properties
;
gadget
.
props
=
{};
gadget
.
props
=
{};
for
(
i
=
0
;
i
<
element_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
element_list
.
length
;
i
+=
1
)
{
...
@@ -83,12 +84,19 @@ var repair = false;
...
@@ -83,12 +84,19 @@ var repair = false;
gadget
.
props
.
redirect_url
=
new
URL
(
window
.
location
);
gadget
.
props
.
redirect_url
=
new
URL
(
window
.
location
);
gadget
.
props
.
redirect_url
.
pathname
+=
gadget
.
props
.
version_url
;
gadget
.
props
.
redirect_url
.
pathname
+=
gadget
.
props
.
version_url
;
if
(
gadget
.
props
.
redirect_url
.
hash
)
{
if
(
gadget
.
props
.
redirect_url
.
hash
)
{
if
(
gadget
.
props
.
redirect_url
.
hash
.
startsWith
(
'
#access_token
'
))
{
hash_properties
=
gadget
.
props
.
redirect_url
.
hash
.
substr
(
1
).
split
(
'
&
'
).
reduce
(
function
(
res
,
item
)
{
var
parts
=
item
.
split
(
'
=
'
);
res
[
parts
[
0
]]
=
parts
[
1
];
return
res
;
},
{});
if
(
hash_properties
.
hasOwnProperty
(
'
access_token
'
))
{
// This is a bad hack to support dropbox.
// This is a bad hack to support dropbox.
gadget
.
props
.
redirect_url
.
hash
=
gadget
.
props
.
redirect_url
.
hash
=
gadget
.
props
.
redirect_url
.
hash
.
replace
(
gadget
.
props
.
redirect_url
.
hash
.
replace
(
"
#
"
,
"
#/?
"
).
replace
(
'
#
access_token
'
,
'
access_token
'
,
'
#/?
page=ojs_dropbox_configurator&access_token
'
'
page=ojs_dropbox_configurator&access_token
'
);
);
}
else
if
(
gadget
.
props
.
redirect_url
.
hash
}
else
if
(
gadget
.
props
.
redirect_url
.
hash
.
startsWith
(
'
#page=settings_configurator
'
))
{
.
startsWith
(
'
#page=settings_configurator
'
))
{
...
...
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