assets/bowline.js in bowline-0.6.0 vs assets/bowline.js in bowline-0.6.1

- old
+ new

@@ -151,10 +151,11 @@ this.elements.items("add", item); } } BowlineBound.fn.update = function(id, item){ + if(!item.id) item.id = id; if(this.singleton){ this.elements.item(item); } else { this.findElement(id).item(item); } @@ -229,12 +230,10 @@ id: id, }; Bowline.log("New message:", msg); - Bowline.log(JSON.stringify(msg)) - if(Bowline.enabled) _app.call(JSON.stringify(msg)); }, // Usage: instanceInvoke(klass, id, method, *args) @@ -319,11 +318,10 @@ Bowline.bounds[klass].create(id, item); }, updated: function(klass, id, item){ if(!Bowline.bounds[klass]) return; - if(!item.id) item.id = id; Bowline.bounds[klass].update(id, item); }, removed: function(klass, id){ if(!Bowline.bounds[klass]) return; @@ -390,10 +388,19 @@ $.fn.bowlineUnbind = function(){ var args = $.makeArray(arguments); args.unshift(this); Bowline.unbind.apply(Bowline, args); - } + }; + + $.fn.bowlineSerialize = function(){ + var array = $(this).serializeArray(); + var object = {}; + $.each(array, function(){ + object[this.name] = this.value; + }); + return object; + }; })(jQuery); jQuery(function($){ Bowline.loaded(); }) \ No newline at end of file