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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
erp5
Commits
2f1bb079
Commit
2f1bb079
authored
Mar 02, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: fix maximize button cancellation
parent
3a0133cf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
212 additions
and
177 deletions
+212
-177
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
+1
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
+163
-151
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
+13
-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
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_editor_gadget_zuite/testMaximize.zpt
...al_tests/renderjs_ui_editor_gadget_zuite/testMaximize.zpt
+32
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+1
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
View file @
2f1bb079
...
@@ -378,10 +378,7 @@
...
@@ -378,10 +378,7 @@
promise_list
.
push
(
null
);
promise_list
.
push
(
null
);
}
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
RSVP
.
all
(
promise_list
))
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
j
;
var
j
;
for
(
j
=
0
;
j
<
result_list
.
length
;
j
+=
1
)
{
for
(
j
=
0
;
j
<
result_list
.
length
;
j
+=
1
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
View file @
2f1bb079
...
@@ -154,11 +154,13 @@
...
@@ -154,11 +154,13 @@
</record>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -202,16 +204,20 @@
...
@@ -202,16 +204,20 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -234,7 +240,7 @@
...
@@ -234,7 +240,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
971.18983.58402.648
</string>
</value>
<value>
<string>
982.16970.11028.17066
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +258,7 @@
...
@@ -252,7 +258,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1540898451.07
</float>
<float>
1583167358.84
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -261,16 +267,20 @@
...
@@ -261,16 +267,20 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -318,7 +328,9 @@
...
@@ -318,7 +328,9 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</ZopeData>
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
2f1bb079
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
// Gadget has not yet been correctly initialized
// Gadget has not yet been correctly initialized
throw
error
;
throw
error
;
}
}
if
(
error_response
&&
error_response
.
text
)
{
if
(
error_response
&&
error_response
.
text
)
{
return
error_response
.
text
().
then
(
return
error_response
.
text
().
then
(
function
(
request_error_text
)
{
function
(
request_error_text
)
{
return
gadget
.
changeState
({
return
gadget
.
changeState
({
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
function
triggerMaximize
(
gadget
,
maximize
)
{
function
triggerMaximize
(
gadget
,
maximize
)
{
if
(
gadget
.
props
.
deferred_minimize
!==
undefined
)
{
if
(
gadget
.
props
.
deferred_minimize
!==
undefined
)
{
gadget
.
props
.
deferred_minimize
.
resolve
();
gadget
.
props
.
deferred_minimize
.
cancel
();
gadget
.
props
.
deferred_minimize
=
undefined
;
gadget
.
props
.
deferred_minimize
=
undefined
;
}
}
hideDesktopPanel
(
gadget
,
maximize
);
hideDesktopPanel
(
gadget
,
maximize
);
...
@@ -253,13 +253,16 @@
...
@@ -253,13 +253,16 @@
action
:
"
maximize
"
action
:
"
maximize
"
}])
}])
.
push
(
function
()
{
.
push
(
function
()
{
gadget
.
props
.
deferred_minimize
=
RSVP
.
defer
();
gadget
.
props
.
deferred_minimize
=
new
RSVP
.
Promise
(
return
gadget
.
props
.
deferred_minimize
.
promise
;
function
()
{
return
;
},
})
function
()
{
.
push
(
undefined
,
function
(
error
)
{
// Wait for cancellation
if
(
error
instanceof
RSVP
.
CancellationError
)
{
// return triggerMaximize(gadget, false);
return
triggerMaximize
(
gadget
,
false
);
hideDesktopPanel
(
gadget
,
false
);
return
route
(
gadget
,
'
header
'
,
'
setButtonTitle
'
,
[{}]);
}
}
);
return
gadget
.
props
.
deferred_minimize
;
});
});
}
}
return
route
(
gadget
,
'
header
'
,
'
setButtonTitle
'
,
[{}]);
return
route
(
gadget
,
'
header
'
,
'
setButtonTitle
'
,
[{}]);
...
@@ -771,7 +774,7 @@
...
@@ -771,7 +774,7 @@
element
.
appendChild
(
container
);
element
.
appendChild
(
container
);
// make an iframe to display error page from XMLHttpRequest.
// make an iframe to display error page from XMLHttpRequest.
if
(
gadget
.
state
.
request_error_text
)
{
if
(
gadget
.
state
.
request_error_text
)
{
iframe
=
document
.
createElement
(
'
iframe
'
);
iframe
=
document
.
createElement
(
'
iframe
'
);
container
.
appendChild
(
iframe
);
container
.
appendChild
(
iframe
);
iframe
.
srcdoc
=
gadget
.
state
.
request_error_text
;
iframe
.
srcdoc
=
gadget
.
state
.
request_error_text
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
2f1bb079
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
1.63449.54271.9625
</string>
</value>
<value>
<string>
98
2.16935.24089.33911
</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>
158
2196761.8
</float>
<float>
158
3166534.25
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_editor_gadget_zuite/testMaximize.zpt
View file @
2f1bb079
...
@@ -29,7 +29,9 @@
...
@@ -29,7 +29,9 @@
</tal:block>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<!-- Wait for Maximize button -->
<tr>
<td
colspan=
"3"
><b>
Maximize
</b></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
...
@@ -40,10 +42,18 @@
...
@@ -40,10 +42,18 @@
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check full screen
</b></td>
</tr>
<!-- Wait For full screen -->
<!-- Wait For full screen -->
<tr>
<tr>
<td>
waitFor
ElementPresent
</td>
<td>
assert
ElementPresent
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -59,6 +69,9 @@
...
@@ -59,6 +69,9 @@
</tr>
</tr>
<!-- minimize with header button -->
<!-- minimize with header button -->
<tr>
<td
colspan=
"3"
><b>
Minimize with header button
</b></td>
</tr>
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//div[@data-gadget-scope='header']//button[@name='maximize' and @type='submit']
</td>
<td>
//div[@data-gadget-scope='header']//button[@name='maximize' and @type='submit']
</td>
...
@@ -66,6 +79,9 @@
...
@@ -66,6 +79,9 @@
</tr>
</tr>
<!-- Check is minimize -->
<!-- Check is minimize -->
<tr>
<td
colspan=
"3"
><b>
Check not full screen
</b></td>
</tr>
<tr>
<tr>
<td>
waitForElementNotPresent
</td>
<td>
waitForElementNotPresent
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
...
@@ -83,6 +99,9 @@
...
@@ -83,6 +99,9 @@
</tr>
</tr>
<!-- Re maximize -->
<!-- Re maximize -->
<tr>
<td
colspan=
"3"
><b>
Maximize
</b></td>
</tr>
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='Maximize' and @type='button']
</td>
...
@@ -90,6 +109,9 @@
...
@@ -90,6 +109,9 @@
</tr>
</tr>
<!-- Wait For full screen -->
<!-- Wait For full screen -->
<tr>
<td
colspan=
"3"
><b>
Check full screen
</b></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
...
@@ -108,16 +130,17 @@
...
@@ -108,16 +130,17 @@
<!-- make some change in url -->
<!-- make some change in url -->
<tr>
<tr>
<td>
open
</td>
<td
colspan=
"3"
><b>
Minimize with url change
</b></td>
<td>
${base_url}/web_site_module/renderjs_runner/
</td>
<td></td>
</tr>
</tr>
<tal:block
tal:define=
"click_configuration python: {'text': 'Search'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<!-- Check is minimize -->
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td
colspan=
"3"
><b>
Check not full screen
</b></td>
<td>
//div[@role='main']
</td>
<td></td>
</tr>
</tr>
<!-- Check is minimize -->
<tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
assertElementNotPresent
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
<td>
//div[@data-role='page' and @class='desktop-panel-hidden']
</td>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
2f1bb079
...
@@ -38,7 +38,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
...
@@ -38,7 +38,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
this
.
element
.
classList
.
toggle
(
'
editor-maximize
'
);
this
.
element
.
classList
.
toggle
(
'
editor-maximize
'
);
}
}
return
this
.
triggerMaximize
.
apply
(
this
,
param_list
)
return
this
.
triggerMaximize
.
apply
(
this
,
param_list
)
.
push
(
function
()
{
.
push
(
undefined
,
function
()
{
if
(
gadget
.
element
.
classList
.
contains
(
'
editor-maximize
'
))
{
if
(
gadget
.
element
.
classList
.
contains
(
'
editor-maximize
'
))
{
gadget
.
element
.
classList
.
remove
(
'
editor-maximize
'
);
gadget
.
element
.
classList
.
remove
(
'
editor-maximize
'
);
}
}
...
...
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