From: Aleksander Ɓukasz Date: Tue, 18 Feb 2014 10:50:00 +0000 (+0100) Subject: smartxml: Document.transaction now returns value from a callback X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/e5cc79a40d78c1832617d19186ca87ee9877ebfa smartxml: Document.transaction now returns value from a callback --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 203bdb2..1e7fc21 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -582,9 +582,11 @@ $.extend(Document.prototype, Backbone.Events, { }, transaction: function(callback, context) { + var toret; this.startTransaction(); - callback.call(context); + toret = callback.call(context); this.endTransaction(); + return toret; }, getNodeByPath: function(path) {