Commit 8829e4b4 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] form_dialog: do not update navigation history if action...

[erp5_web_renderjs_ui] form_dialog: do not update navigation history if action redirect to the same document
parent 863b2641
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Tue, 12 Apr 2016 15:30:00 GMT\n # generated on Tue, 12 Apr 2016 16:30:00 GMT\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -357,7 +357,7 @@ NETWORK:\n ...@@ -357,7 +357,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.30300.60307.22732</string> </value> <value> <string>950.30301.41545.13926</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -375,7 +375,7 @@ NETWORK:\n ...@@ -375,7 +375,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460470897.98</float> <float>1460476136.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
}) })
.push(function (evt) { .push(function (evt) {
var location = evt.target.getResponseHeader("X-Location"), var location = evt.target.getResponseHeader("X-Location"),
jio_key,
list = []; list = [];
list.push(form_gadget.notifySubmitted()); list.push(form_gadget.notifySubmitted());
...@@ -174,7 +175,13 @@ ...@@ -174,7 +175,13 @@
// No redirection, stay on the same document // No redirection, stay on the same document
list.push(form_gadget.redirect({command: 'change', options: {view: "view", page: undefined}})); list.push(form_gadget.redirect({command: 'change', options: {view: "view", page: undefined}}));
} else { } else {
list.push(form_gadget.redirect({command: 'push_history', options: {jio_key: new URI(location).segment(2), editable: form_gadget.props.editable}})); jio_key = new URI(location).segment(2);
if (form_gadget.props.id === jio_key) {
// Do not update navigation history if dialog redirect to the same document
list.push(form_gadget.redirect({command: 'change', options: {jio_key: jio_key, editable: form_gadget.props.editable}}));
} else {
list.push(form_gadget.redirect({command: 'push_history', options: {jio_key: jio_key, editable: form_gadget.props.editable}}));
}
} }
} }
return RSVP.all(list); return RSVP.all(list);
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.28774.6948.60706</string> </value> <value> <string>950.30388.38115.23432</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>1460380958.69</float> <float>1460476265.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
(function (self, caches, fetch) { (function (self, caches, fetch) {
"use strict"; "use strict";
var CACHE_NAME = 'Tue, 12 Apr 2016 15:30:00 GMT', var CACHE_NAME = 'Tue, 12 Apr 2016 16:30:00 GMT',
// Files required to make this app work offline // Files required to make this app work offline
REQUIRED_FILES = [ REQUIRED_FILES = [
'./', './',
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.28811.3104.65297</string> </value> <value> <string>950.30301.34631.25378</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>1460470891.69</float> <float>1460476321.58</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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