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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
d87ac1fd
Commit
d87ac1fd
authored
Sep 05, 2019
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Firefox wallpaper URL changer must be implemented as a declareService.
parent
0714c4bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
31 deletions
+34
-31
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
+32
-29
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 @
d87ac1fd
/*globals window, document, RSVP, rJS,
/*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator, Event*/
URI, location, XMLHttpRequest, console, navigator, Event,
URL*/
/*jslint indent: 2, maxlen: 80*/
/*jslint indent: 2, maxlen: 80*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
)
{
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
)
{
"
use strict
"
;
"
use strict
"
;
var
MAIN_SCOPE
=
"
m
"
,
var
MAIN_SCOPE
=
"
m
"
,
...
@@ -11,11 +13,7 @@
...
@@ -11,11 +13,7 @@
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
'
script[data-renderjs-configuration="application_title"]
'
'
script[data-renderjs-configuration="application_title"]
'
).
textContent
).
textContent
}),
});
index
,
styleSheet
,
wallpaper_url
,
a_element
;
function
renderMainGadget
(
gadget
,
url
,
options
)
{
function
renderMainGadget
(
gadget
,
url
,
options
)
{
var
page_gadget
;
var
page_gadget
;
...
@@ -827,29 +825,34 @@
...
@@ -827,29 +825,34 @@
.
onEvent
(
'
submit
'
,
function
submit
()
{
.
onEvent
(
'
submit
'
,
function
submit
()
{
return
displayError
(
this
,
new
Error
(
"
Unexpected form submit
"
));
return
displayError
(
this
,
new
Error
(
"
Unexpected form submit
"
));
})
;
})
//
///////////////////////////////////////////////////////////////
//
// For Firefox, Wallpaper URL must be absolute one.
// For Firefox, Wallpaper URL must be absolute one.
//
/////////////////////////////////////////////////////////////////
.
declareService
(
function
()
{
var
index
,
styleSheet
,
wallpaper_url
,
wallpaper_absolute_url
;
if
(
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
firefox
'
)
>
-
1
)
{
if
(
navigator
.
userAgent
.
toLowerCase
().
indexOf
(
'
firefox
'
)
>
-
1
)
{
for
(
index
=
0
;
index
<
document
.
styleSheets
.
length
;
index
+=
1
)
{
for
(
index
=
0
;
index
<
document
.
styleSheets
.
length
;
index
+=
1
)
{
styleSheet
=
document
.
styleSheets
[
index
];
styleSheet
=
document
.
styleSheets
[
index
];
if
(
styleSheet
.
href
.
startsWith
(
'
data:text/css;
'
))
{
if
(
styleSheet
.
href
.
startsWith
(
'
data:text/css;
'
))
{
wallpaper_url
=
styleSheet
.
cssRules
[
0
].
style
wallpaper_url
=
styleSheet
.
cssRules
[
0
].
style
.
backgroundImage
.
slice
(
4
,
-
1
).
replace
(
/
[
"'
]
/g
,
''
);
.
backgroundImage
.
slice
(
4
,
-
1
).
replace
(
/
[
"'
]
/g
,
''
);
a_element
=
document
.
createElement
(
'
a
'
);
wallpaper_absolute_url
=
new
URL
(
a_element
.
href
=
wallpaper_url
;
wallpaper_url
,
window
.
location
.
toString
()
);
styleSheet
.
cssRules
[
0
].
style
.
backgroundImage
=
styleSheet
.
cssRules
[
0
].
style
.
backgroundImage
=
'
url("
'
+
a_element
.
href
+
'
")
'
;
'
url("
'
+
wallpaper_absolute_url
.
href
+
'
")
'
;
break
;
break
;
}
}
}
}
index
=
null
;
index
=
null
;
styleSheet
=
null
;
styleSheet
=
null
;
wallpaper_url
=
null
;
wallpaper_url
=
null
;
a_element
=
null
;
wallpaper_absolute_url
=
null
;
}
}
});
}(
window
,
document
,
RSVP
,
rJS
,
}(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
));
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
d87ac1fd
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
978.15
396.60577.50107
</string>
</value>
<value>
<string>
978.15
454.53878.14950
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
156769
0058.72
</float>
<float>
156769
3410.93
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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