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
Laurent S
erp5
Commits
f2dedaed
Commit
f2dedaed
authored
Feb 02, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Display the contextual menu also on mobile
parent
3f364b10
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
32 deletions
+9
-32
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
...hTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
+3
-30
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
...s/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
+2
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
...templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
+2
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
View file @
f2dedaed
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
gadget_klass
gadget_klass
.
setState
({
.
setState
({
visible
:
false
,
visible
:
false
desktop
:
false
})
})
//////////////////////////////////////////////
//////////////////////////////////////////////
// acquired method
// acquired method
...
@@ -146,7 +145,6 @@
...
@@ -146,7 +145,6 @@
.
push
(
function
()
{
.
push
(
function
()
{
context
.
element
.
querySelector
(
"
div
"
).
appendChild
(
tmp_element
);
context
.
element
.
querySelector
(
"
div
"
).
appendChild
(
tmp_element
);
return
context
.
listenResize
();
});
});
}
}
...
@@ -206,11 +204,10 @@
...
@@ -206,11 +204,10 @@
}
}
if
((
this
.
state
.
global
===
true
)
&&
if
((
this
.
state
.
global
===
true
)
&&
(
modification_dict
.
hasOwnProperty
(
"
desktop
"
)
||
(
modification_dict
.
hasOwnProperty
(
"
editable
"
)
||
modification_dict
.
hasOwnProperty
(
"
editable
"
)
||
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
if
(
!
(
this
.
state
.
desktop
&&
(
this
.
state
.
view_list
!==
undefined
))
)
{
if
(
this
.
state
.
view_list
===
undefined
)
{
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
gadget
.
element
.
querySelector
(
"
dl
"
).
textContent
=
''
;
gadget
.
element
.
querySelector
(
"
dl
"
).
textContent
=
''
;
...
@@ -289,30 +286,6 @@
...
@@ -289,30 +286,6 @@
}
}
},
false
,
false
)
},
false
,
false
)
.
declareJob
(
'
listenResize
'
,
function
()
{
// resize should be only trigger after the render method
// as displaying the panel rely on external gadget (for translation for example)
var
result
,
event
,
context
=
this
;
function
extractSizeAndDispatch
()
{
if
(
window
.
matchMedia
(
"
(min-width: 85em)
"
).
matches
)
{
return
context
.
changeState
({
desktop
:
true
});
}
return
context
.
changeState
({
desktop
:
false
});
}
result
=
loopEventListener
(
window
,
'
resize
'
,
false
,
extractSizeAndDispatch
);
event
=
document
.
createEvent
(
"
Event
"
);
event
.
initEvent
(
'
resize
'
,
true
,
true
);
window
.
dispatchEvent
(
event
);
return
result
;
})
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
,
scope
)
{
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
,
scope
)
{
if
(
scope
===
'
erp5_checkbox
'
)
{
if
(
scope
===
'
erp5_checkbox
'
)
{
var
context
=
this
;
var
context
=
this
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
View file @
f2dedaed
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.45640.391.48230
</string>
</value>
<value>
<string>
96
5.14666.28011.17715
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
151
6295067.02
</float>
<float>
151
7565753.1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
View file @
f2dedaed
...
@@ -34,10 +34,12 @@ Check that user gets notified if there is an error on a hidden field.
...
@@ -34,10 +34,12 @@ Check that user gets notified if there is an error on a hidden field.
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForElementPresent
</td>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<td>
//a[@data-i18n="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<tr><td>
click
</td>
<tr><td>
click
</td>
<td>
//a[@data-i18n="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<td>
//a[@data-i18n="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForElementPresent
</td>
<tr><td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
click
</td>
<tr><td>
click
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableCrashOnSaveAction.zpt
View file @
f2dedaed
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<td>
//a[text()='Views']
</td>
<td>
//a[text()='Views']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='View Crash on Save']
</td>
<td>
//a[@data-i18n='View Crash on Save']
</td>
...
@@ -35,6 +36,7 @@
...
@@ -35,6 +36,7 @@
<td>
//a[@data-i18n='View Crash on Save']
</td>
<td>
//a[@data-i18n='View Crash on Save']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<!-- Wait for gadget to be loaded -->
<!-- Wait for gadget to be loaded -->
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
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