Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/js/core/XFInstance.js.xml
- ===================================================================
- --- src/js/core/XFInstance.js.xml (revision 396)
- +++ src/js/core/XFInstance.js.xml (working copy)
- @@ -115,11 +115,12 @@
- <cm:wiki>
- * '''setDoc''' method : sets a document for this instance</cm:wiki>
- <![CDATA[
- -XFInstance.prototype.setDoc = function(doc, isReset) {
- +XFInstance.prototype.setDoc = function(doc, isReset, isPreserveOld) {
- this.doc = typeof doc == "string"? XDocument.parse(doc) : doc;
- this.doc.model = this.model;
- this.doc.instance = this;
- - this.store(isReset);
- + if (!isPreserveOld)
- + this.store(isReset);
- };
- ]]>
- Index: src/js/core/XFSubmission.js.xml
- ===================================================================
- --- src/js/core/XFSubmission.js.xml (revision 397)
- +++ src/js/core/XFSubmission.js.xml (working copy)
- @@ -184,7 +184,7 @@
- if (subm.replace == "instance") {
- var inst = instance == null? (node ? node.ownerDocument.instance : subm.model.getInstance()) : $(instance).xfElement;
- - inst.setDoc(req.responseText);
- + inst.setDoc(req.responseText, false, true);
- xforms.addChange(subm.model);
- XMLEvents.dispatch(subm.model, "xforms-rebuild");
- xforms.refresh();
- Index: build/xsltforms.js
- ===================================================================
- --- build/xsltforms.js (revision 396)
- +++ build/xsltforms.js (working copy)
- @@ -1715,11 +1715,12 @@
- -XFInstance.prototype.setDoc = function(doc, isReset) {
- +XFInstance.prototype.setDoc = function(doc, isReset, isPreserveOld) {
- this.doc = typeof doc == "string"? XDocument.parse(doc) : doc;
- this.doc.model = this.model;
- this.doc.instance = this;
- - this.store(isReset);
- + if (!isPreserveOld)
- + this.store(isReset);
- };
- @@ -2076,7 +2077,7 @@
- if (subm.replace == "instance") {
- var inst = instance == null? (node ? node.ownerDocument.instance : subm.model.getInstance()) : $(instance).xfElement;
- - inst.setDoc(req.responseText);
- + inst.setDoc(req.responseText, false, true);
- XMLEvents.dispatch(subm.model, "xforms-rebuild");
- xforms.refresh();
- }
Advertisement
Add Comment
Please, Sign In to add comment