smartxml: Document.transaction now returns value from a callback
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 18 Feb 2014 10:50:00 +0000 (11:50 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 18 Feb 2014 10:50:00 +0000 (11:50 +0100)
src/smartxml/smartxml.js

index 203bdb2..1e7fc21 100644 (file)
@@ -582,9 +582,11 @@ $.extend(Document.prototype, Backbone.Events, {
     },
 
     transaction: function(callback, context) {
     },
 
     transaction: function(callback, context) {
+        var toret;
         this.startTransaction();
         this.startTransaction();
-        callback.call(context);
+        toret = callback.call(context);
         this.endTransaction();
         this.endTransaction();
+        return toret;
     },
 
     getNodeByPath: function(path) {
     },
 
     getNodeByPath: function(path) {