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
5e2312ba
Commit
5e2312ba
authored
Mar 07, 2022
by
Romain Courteaud
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: keep loader visible for a minimal amount of time
parent
080eb748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
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
+15
-16
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 @
5e2312ba
...
@@ -111,17 +111,17 @@
...
@@ -111,17 +111,17 @@
return
route
(
gadget
,
'
panel
'
,
'
render
'
,
[
gadget
.
props
.
panel_argument_list
]);
return
route
(
gadget
,
'
panel
'
,
'
render
'
,
[
gadget
.
props
.
panel_argument_list
]);
}
}
function
refreshHeaderAndPanel
(
gadget
,
refresh
)
{
function
refreshHeaderAndPanel
(
gadget
,
refresh
,
loading_delay_promise
)
{
var
promise
;
if
(
refresh
)
{
promise
=
route
(
gadget
,
"
header
"
,
'
render
'
,
[
gadget
.
props
.
header_argument_list
]);
}
else
{
promise
=
updateHeader
(
gadget
);
}
return
RSVP
.
all
([
return
RSVP
.
all
([
promise
,
updatePanel
(
gadget
),
updatePanel
(
gadget
)
new
RSVP
.
Queue
(
loading_delay_promise
)
.
push
(
function
()
{
if
(
refresh
)
{
return
route
(
gadget
,
"
header
"
,
'
render
'
,
[
gadget
.
props
.
header_argument_list
]);
}
return
updateHeader
(
gadget
);
})
]);
]);
}
}
...
@@ -735,7 +735,8 @@
...
@@ -735,7 +735,8 @@
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
.
onStateChange
(
function
onStateChange
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
route_result
=
gadget
.
state
,
route_result
=
gadget
.
state
,
promise_list
;
promise_list
,
slow_loading_promise
;
if
(
modification_dict
.
hasOwnProperty
(
'
error_text
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
error_text
'
))
{
return
gadget
.
dropGadget
(
MAIN_SCOPE
)
return
gadget
.
dropGadget
(
MAIN_SCOPE
)
...
@@ -813,6 +814,7 @@
...
@@ -813,6 +814,7 @@
initHeaderOptions
(
gadget
);
initHeaderOptions
(
gadget
);
initPanelOptions
(
gadget
);
initPanelOptions
(
gadget
);
if
(
!
modification_dict
.
hasOwnProperty
(
'
first_bootstrap
'
))
{
if
(
!
modification_dict
.
hasOwnProperty
(
'
first_bootstrap
'
))
{
slow_loading_promise
=
RSVP
.
delay
(
50
);
promise_list
.
push
(
route
(
gadget
,
'
header
'
,
'
notifyLoading
'
));
promise_list
.
push
(
route
(
gadget
,
'
header
'
,
'
notifyLoading
'
));
}
}
}
}
...
@@ -837,11 +839,8 @@
...
@@ -837,11 +839,8 @@
}
}
content_container
.
appendChild
(
main_gadget
.
element
);
content_container
.
appendChild
(
main_gadget
.
element
);
element
.
appendChild
(
content_container
);
element
.
appendChild
(
content_container
);
return
refreshHeaderAndPanel
(
gadget
);
// XXX Drop notification
// return header_gadget.notifyLoaded();
}
}
return
refreshHeaderAndPanel
(
gadget
,
false
,
slow_loading_promise
);
}));
}));
}
else
if
(
modification_dict
.
hasOwnProperty
(
'
render_timestamp
'
))
{
}
else
if
(
modification_dict
.
hasOwnProperty
(
'
render_timestamp
'
))
{
// Same subgadget
// Same subgadget
...
@@ -850,7 +849,7 @@
...
@@ -850,7 +849,7 @@
return
page_gadget
.
render
(
gadget
.
state
.
options
);
return
page_gadget
.
render
(
gadget
.
state
.
options
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
refreshHeaderAndPanel
(
gadget
);
return
refreshHeaderAndPanel
(
gadget
,
false
,
slow_loading_promise
);
}));
}));
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
5e2312ba
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
99
3.37256.4522.58726
</string>
</value>
<value>
<string>
99
9.1512.55448.47445
</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
26860658.98
</float>
<float>
16
47877106.56
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
Romain Courteaud
@romain
mentioned in commit
nexedi/erp5@689e242c
·
Mar 21, 2022
mentioned in commit
nexedi/erp5@689e242c
mentioned in commit nexedi/erp5@689e242c19d67592bf35fd49230e71b2673adea5
Toggle commit list
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