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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
ba45e294
Commit
ba45e294
authored
Jan 09, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: disable acquisition in case of dropped sub gadget
parent
5890e325
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
12 deletions
+55
-12
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
+53
-10
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 @
ba45e294
/*globals window, document, RSVP, rJS,
/*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator, Event,
URI, location, XMLHttpRequest, console, navigator, Event,
URL, domsugar*/
URL, domsugar*/
/*jslint indent: 2, maxlen: 80*/
/*jslint indent: 2, maxlen: 80
, unparam: true
*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
,
domsugar
)
{
URL
,
domsugar
)
{
...
@@ -506,8 +506,13 @@
...
@@ -506,8 +506,13 @@
// XXX Those methods may be directly integrated into the header,
// XXX Those methods may be directly integrated into the header,
// as it handles the submit triggering
// as it handles the submit triggering
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
notifySubmitting
(
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
notifySubmitting
(
argument_list
argument_list
,
scope
)
{
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitting
'
),
route
(
this
,
"
header
"
,
'
notifySubmitting
'
),
this
.
deferChangeState
({
this
.
deferChangeState
({
...
@@ -518,8 +523,13 @@
...
@@ -518,8 +523,13 @@
]);
]);
})
})
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
notifySubmitted
(
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
notifySubmitted
(
argument_list
argument_list
,
scope
)
{
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitted
'
),
route
(
this
,
"
header
"
,
'
notifySubmitted
'
),
this
.
deferChangeState
({
this
.
deferChangeState
({
...
@@ -531,8 +541,13 @@
...
@@ -531,8 +541,13 @@
]);
]);
})
})
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
notifyChange
(
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
notifyChange
(
argument_list
argument_list
,
scope
)
{
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
return
RSVP
.
all
([
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifyChange
'
),
route
(
this
,
"
header
"
,
'
notifyChange
'
),
this
.
deferChangeState
({
this
.
deferChangeState
({
...
@@ -606,7 +621,12 @@
...
@@ -606,7 +621,12 @@
return
route
(
this
,
'
router
'
,
'
getCommandUrlForDict
'
,
param_list
);
return
route
(
this
,
'
router
'
,
'
getCommandUrlForDict
'
,
param_list
);
})
})
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
updateHeader
(
param_list
)
{
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
updateHeader
(
param_list
,
scope
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
initHeaderOptions
(
this
);
initHeaderOptions
(
this
);
var
text_list
=
[],
var
text_list
=
[],
key
,
key
,
...
@@ -631,28 +651,46 @@
...
@@ -631,28 +651,46 @@
});
});
})
})
.
allowPublicAcquisition
(
"
updatePanel
"
,
function
updatePanel
(
param_list
)
{
.
allowPublicAcquisition
(
"
updatePanel
"
,
function
updatePanel
(
param_list
,
scope
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
var
gadget
=
this
;
var
gadget
=
this
;
initPanelOptions
(
gadget
);
initPanelOptions
(
gadget
);
gadget
.
props
.
panel_argument_list
=
param_list
[
0
];
gadget
.
props
.
panel_argument_list
=
param_list
[
0
];
})
})
.
allowPublicAcquisition
(
'
refreshHeaderAndPanel
'
,
.
allowPublicAcquisition
(
'
refreshHeaderAndPanel
'
,
function
acquireRefreshHeaderAndPanel
()
{
function
acquireRefreshHeaderAndPanel
(
ignore
,
scope
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
return
refreshHeaderAndPanel
(
this
,
true
);
return
refreshHeaderAndPanel
(
this
,
true
);
})
})
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
hidePanel
(
param_list
)
{
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
hidePanel
(
param_list
)
{
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
})
})
.
allowPublicAcquisition
(
'
triggerPanel
'
,
function
triggerPanel
()
{
.
allowPublicAcquisition
(
'
triggerPanel
'
,
function
triggerPanel
(
ignore
,
scope
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
// Force calling panel toggle
// Force calling panel toggle
return
this
.
deferChangeState
({
return
this
.
deferChangeState
({
panel_visible
:
new
Date
().
getTime
()
panel_visible
:
new
Date
().
getTime
()
});
});
})
})
.
allowPublicAcquisition
(
'
renderEditorPanel
'
,
.
allowPublicAcquisition
(
'
renderEditorPanel
'
,
function
renderEditorPanel
(
param_list
)
{
function
renderEditorPanel
(
param_list
,
scope
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, no need to keep notification
return
;
}
return
this
.
deferChangeState
({
return
this
.
deferChangeState
({
// Force calling editor panel render
// Force calling editor panel render
editor_panel_render_timestamp
:
new
Date
().
getTime
(),
editor_panel_render_timestamp
:
new
Date
().
getTime
(),
...
@@ -703,8 +741,13 @@
...
@@ -703,8 +741,13 @@
});
});
})
})
.
allowPublicAcquisition
(
"
triggerMaximize
"
,
function
maximize
(
.
allowPublicAcquisition
(
"
triggerMaximize
"
,
function
maximize
(
param_list
param_list
,
scope
)
{
)
{
if
(
scope
===
undefined
)
{
// If sub gadget has been dropped, nothing to maximize
return
;
}
return
triggerMaximize
(
this
,
param_list
[
0
]);
return
triggerMaximize
(
this
,
param_list
[
0
]);
})
})
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
ba45e294
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
995.60357.5039.47650
</string>
</value>
<value>
<string>
1005.39881.44610.14899
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
16
39487214.66
</float>
<float>
16
73426576.41
</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