Commit 4b114fc3 authored by Jérome Perrin's avatar Jérome Perrin

Updates for xhtml style and gadgets

backport nexedi/erp5!880

First revert a first attempt that was incorrect and then backport a7ffbc92 which is related and make the rest apply cleanly

/reviewed-on https://lab.nexedi.com/nexedi/erp5-capago/merge_requests/41
parents 30f990b6 0747876a
......@@ -61,6 +61,12 @@
</tr>
<!-- the flag used in erp5.js to warn unsaved changes is initially not set -->
<tr>
<td>assertEval</td>
<td>selenium.browserbot.currentWindow.changed</td>
<td>false</td>
</tr>
<tr>
<td>type</td>
......@@ -68,6 +74,12 @@
<td>123</td>
</tr>
<!-- the flag used in erp5.js to warn unsaved changes is set after gadget is changed -->
<tr>
<td>waitForEval</td>
<td>selenium.browserbot.currentWindow.changed</td>
<td>true</td>
</tr>
<tr>
......
......@@ -752,6 +752,10 @@ span.search button .image {
background-image: url('images/exec16.png');
}
.bottom_actions {
margin-bottom: 1em;
}
.document .actions {
position: relative;
float: left;
......
......@@ -69,17 +69,36 @@
return displayFieldError(argument_list[0]);
})
.allowPublicAcquisition('translateHtml', function dummyTranslateHtml (html) {
// gadget translation does not work in erp5_xhtml_style, but at least
// gadgets can be used.
return html;
/////////////////////////////////////////////////////////////////
// Support some methods used in ERP5JS
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition('notifyChange',
function () {
// This flag is used for erp5.js's onBeforeUnload warning for unsaved changes.
window.changed = true;
return;
})
.allowPublicAcquisition('translate', function dummyTranslate (html) {
// gadget translation does not work in erp5_xhtml_style, but at least
// gadgets can be used.
return html;
.allowPublicAcquisition('notifyValid',
function () {
return;
})
.allowPublicAcquisition('notifySubmit', function () {
return this.element.querySelector('form').querySelector('[type="submit"]').click();
})
// Comply to interface_translation.html, but without actually translating.
.allowPublicAcquisition('translate', function (argument_list) {
return argument_list[0];
})
.allowPublicAcquisition('getTranslationList', function (argument_list) {
return argument_list[0];
})
.allowPublicAcquisition('translateHtml', function (argument_list) {
return argument_list[0];
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment