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
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
Gabriel Monnerat
erp5
Commits
0714c4bc
Commit
0714c4bc
authored
Sep 05, 2019
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Use absolute wallpaper image URL to support firefox.
parent
bf9df74f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+27
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
0714c4bc
...
...
@@ -11,7 +11,11 @@
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
'
script[data-renderjs-configuration="application_title"]
'
).
textContent
});
}),
index
,
styleSheet
,
wallpaper_url
,
a_element
;
function
renderMainGadget
(
gadget
,
url
,
options
)
{
var
page_gadget
;
...
...
@@ -825,5 +829,27 @@
return
displayError
(
this
,
new
Error
(
"
Unexpected form submit
"
));
});
//
// For Firefox, Wallpaper URL must be absolute one.
//
if
(
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
firefox
'
)
>
-
1
)
{
for
(
index
=
0
;
index
<
document
.
styleSheets
.
length
;
index
+=
1
)
{
styleSheet
=
document
.
styleSheets
[
index
];
if
(
styleSheet
.
href
.
startsWith
(
'
data:text/css;
'
))
{
wallpaper_url
=
styleSheet
.
cssRules
[
0
].
style
.
backgroundImage
.
slice
(
4
,
-
1
).
replace
(
/
[
"'
]
/g
,
''
);
a_element
=
document
.
createElement
(
'
a
'
);
a_element
.
href
=
wallpaper_url
;
styleSheet
.
cssRules
[
0
].
style
.
backgroundImage
=
'
url("
'
+
a_element
.
href
+
'
")
'
;
break
;
}
}
index
=
null
;
styleSheet
=
null
;
wallpaper_url
=
null
;
a_element
=
null
;
}
}(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
0714c4bc
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
5.29292.10042.3754
</string>
</value>
<value>
<string>
97
8.15396.60577.50107
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15
56870187.8
</float>
<float>
15
67690058.72
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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