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

xhtml_style: set the "changed" flag when gadget notifies changes

This way the "you have unsaved changes" pops up also when navigating
away after changing gadget content.
parent 6802cec6
......@@ -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>
......
......@@ -74,6 +74,8 @@
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition('notifyChange',
function () {
// This flag is used for erp5.js's onBeforeUnload warning for unsaved changes.
window.changed = true;
return;
})
......
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