From cd119e4fae567ed72b87f852df2ee4ae18cc714c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 31 Oct 2013 23:36:57 +0100 Subject: [PATCH] Moved to spine 1.2.2. --- app/assets/javascripts/app/lib/spine/ajax.js | 101 +++-- app/assets/javascripts/app/lib/spine/ajax.map | 2 +- app/assets/javascripts/app/lib/spine/list.js | 6 +- app/assets/javascripts/app/lib/spine/list.map | 2 +- app/assets/javascripts/app/lib/spine/local.js | 16 +- .../javascripts/app/lib/spine/local.map | 2 +- .../javascripts/app/lib/spine/manager.js | 23 +- .../javascripts/app/lib/spine/manager.map | 2 +- .../javascripts/app/lib/spine/relation.js | 11 +- .../javascripts/app/lib/spine/relation.map | 2 +- app/assets/javascripts/app/lib/spine/route.js | 30 +- .../javascripts/app/lib/spine/route.map | 2 +- app/assets/javascripts/app/lib/spine/spine.js | 379 ++++++++---------- .../javascripts/app/lib/spine/spine.map | 2 +- 14 files changed, 287 insertions(+), 293 deletions(-) diff --git a/app/assets/javascripts/app/lib/spine/ajax.js b/app/assets/javascripts/app/lib/spine/ajax.js index ea30304c7..5926b1284 100755 --- a/app/assets/javascripts/app/lib/spine/ajax.js +++ b/app/assets/javascripts/app/lib/spine/ajax.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var $, Ajax, Base, Collection, Extend, Include, Model, Queue, Singleton, Spine, __slice = [].slice, @@ -18,12 +18,20 @@ getURL: function(object) { return (typeof object.url === "function" ? object.url() : void 0) || object.url; }, + getCollectionURL: function(object) { + if (object) { + if (typeof object.url === "function") { + return this.generateURL(object); + } else { + return object.url; + } + } + }, getScope: function(object) { return (typeof object.scope === "function" ? object.scope() : void 0) || object.scope; }, generateURL: function() { var args, collection, object, path, scope; - object = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; if (object.className) { collection = object.className.toLowerCase() + 's'; @@ -50,7 +58,6 @@ enabled: true, disable: function(callback) { var e; - if (this.enabled) { this.enabled = false; try { @@ -94,9 +101,8 @@ return $.ajax(this.ajaxSettings(params, defaults)); }; - Base.prototype.ajaxQueue = function(params, defaults) { + Base.prototype.ajaxQueue = function(params, defaults, record) { var deferred, jqXHR, promise, request, settings; - jqXHR = null; deferred = $.Deferred(); promise = deferred.promise(); @@ -105,11 +111,22 @@ } settings = this.ajaxSettings(params, defaults); request = function(next) { + var _ref; + if ((record != null ? record.id : void 0) != null) { + if (settings.url == null) { + settings.url = Ajax.getURL(record); + } + if ((_ref = settings.data) != null) { + _ref.id = record.id; + } + } + if (typeof settings.data !== 'string' && settings.processData !== true) { + settings.data = JSON.stringify(settings.data); + } return jqXHR = $.ajax(settings).done(deferred.resolve).fail(deferred.reject).then(next, next); }; promise.abort = function(statusText) { var index; - if (jqXHR) { return jqXHR.abort(statusText); } @@ -141,29 +158,33 @@ this.recordsResponse = __bind(this.recordsResponse, this); } - Collection.prototype.find = function(id, params) { + Collection.prototype.find = function(id, params, options) { var record; - + if (options == null) { + options = {}; + } record = new this.model({ id: id }); return this.ajaxQueue(params, { type: 'GET', - url: Ajax.getURL(record) + url: options.url || Ajax.getURL(record) }).done(this.recordsResponse).fail(this.failResponse); }; - Collection.prototype.all = function(params) { + Collection.prototype.all = function(params, options) { + if (options == null) { + options = {}; + } return this.ajaxQueue(params, { type: 'GET', - url: Ajax.getURL(this.model) + url: options.url || Ajax.getURL(this.model) }).done(this.recordsResponse).fail(this.failResponse); }; Collection.prototype.fetch = function(params, options) { var id, _this = this; - if (params == null) { params = {}; } @@ -172,11 +193,11 @@ } if (id = params.id) { delete params.id; - return this.find(id, params).done(function(record) { + return this.find(id, params, options).done(function(record) { return _this.model.refresh(record, options); }); } else { - return this.all(params).done(function(records) { + return this.all(params, options).done(function(records) { return _this.model.refresh(records, options); }); } @@ -205,57 +226,62 @@ } Singleton.prototype.reload = function(params, options) { + if (options == null) { + options = {}; + } return this.ajaxQueue(params, { type: 'GET', - url: Ajax.getURL(this.record) - }).done(this.recordResponse(options)).fail(this.failResponse(options)); + url: options.url + }, this.record).done(this.recordResponse(options)).fail(this.failResponse(options)); }; Singleton.prototype.create = function(params, options) { + if (options == null) { + options = {}; + } return this.ajaxQueue(params, { type: 'POST', contentType: 'application/json', - data: JSON.stringify(this.record), - url: Ajax.getURL(this.model) + data: this.record.toJSON(), + url: options.url || Ajax.getCollectionURL(this.record) }).done(this.recordResponse(options)).fail(this.failResponse(options)); }; Singleton.prototype.update = function(params, options) { + if (options == null) { + options = {}; + } return this.ajaxQueue(params, { type: 'PUT', contentType: 'application/json', - data: JSON.stringify(this.record), - url: Ajax.getURL(this.record) - }).done(this.recordResponse(options)).fail(this.failResponse(options)); + data: this.record.toJSON(), + url: options.url + }, this.record).done(this.recordResponse(options)).fail(this.failResponse(options)); }; Singleton.prototype.destroy = function(params, options) { + if (options == null) { + options = {}; + } return this.ajaxQueue(params, { type: 'DELETE', - url: Ajax.getURL(this.record) - }).done(this.recordResponse(options)).fail(this.failResponse(options)); + url: options.url + }, this.record).done(this.recordResponse(options)).fail(this.failResponse(options)); }; Singleton.prototype.recordResponse = function(options) { var _this = this; - if (options == null) { options = {}; } return function(data, status, xhr) { var _ref, _ref1; - - if (Spine.isBlank(data) || _this.record.destroyed) { - data = false; - } else { - data = _this.model.fromJSON(data); - } Ajax.disable(function() { - if (data) { + if (!(Spine.isBlank(data) || _this.record.destroyed)) { if (data.id && _this.record.id !== data.id) { _this.record.changeID(data.id); } - return _this.record.updateAttributes(data.attributes()); + return _this.record.refresh(data); } }); _this.record.trigger('ajaxSuccess', data, status, xhr); @@ -268,13 +294,11 @@ Singleton.prototype.failResponse = function(options) { var _this = this; - if (options == null) { options = {}; } return function(xhr, statusText, error) { var _ref, _ref1; - _this.record.trigger('ajaxError', xhr, statusText, error); if ((_ref = options.error) != null) { _ref.apply(_this.record); @@ -295,7 +319,6 @@ }, url: function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; args.unshift(encodeURIComponent(this.id)); return Ajax.generateURL.apply(Ajax, [this].concat(__slice.call(args))); @@ -308,7 +331,6 @@ }, url: function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return Ajax.generateURL.apply(Ajax, [this].concat(__slice.call(args))); } @@ -323,7 +345,6 @@ }, ajaxFetch: function() { var _ref; - return (_ref = this.ajax()).fetch.apply(_ref, arguments); }, ajaxChange: function(record, type, options) { @@ -346,6 +367,12 @@ Ajax.defaults = Base.prototype.defaults; + Ajax.Base = Base; + + Ajax.Singleton = Singleton; + + Ajax.Collection = Collection; + Spine.Ajax = Ajax; if (typeof module !== "undefined" && module !== null) { diff --git a/app/assets/javascripts/app/lib/spine/ajax.map b/app/assets/javascripts/app/lib/spine/ajax.map index 68d7f576b..eccd61cf8 100755 --- a/app/assets/javascripts/app/lib/spine/ajax.map +++ b/app/assets/javascripts/app/lib/spine/ajax.map @@ -6,5 +6,5 @@ "src/ajax.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,KAAA,oEAAA;KAAA;;;oSAAA;;CAAA,CAAA,CAAS,CAAC,CAAV,EAAmB;;CAAnB,CACA,CAAS,EAAK;;CADd,CAEA,CAAS,EAAT;;CAFA,CAGA,CAAS,EAAT;;CAHA,CAKA,CACE,CADF;CACE,CAAQ,CAAA,CAAR,EAAA,GAAS;CACA,EAAP,CAAiB,EAAX;CADR,IAAQ;CAAR,CAGU,CAAA,CAAV,EAAU,EAAV,CAAW;CACF,EAAP,CAAmB,EAAb;CAJR,IAGU;CAHV,CAMa,CAAA,CAAb,KAAa,EAAb;CACE,SAAA,2BAAA;;CAAA,CADoB,IAAR,iDACZ;CAAA,GAAG,EAAH,GAAA;CACE,EAAa,GAAM,EAAnB,CAA6B,CAA7B,CAAa;CAAb,EACQ,CAAI,CAAZ,CAAQ,EAAR;MAFF,EAAA;AAIK,CAAH,EAAG,CAAA,CAAiC,CAAjC,EAAH,GAA4B;CAC1B,EAAa,GAAM,IAAnB,CAA+B;MADjC,IAAA;CAGE,EAAa,GAAM,GAAsB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IAAU;CArPZ,GAAA;;CAAA,CA0PA,CAAkB,CAAd,IAAJ,CAAwB;;CA1PxB,CA2PA,CAAkB,CAAd;;CA3PJ,CA4PA,CAAkB,CAAd,KAAJ;;CA5PA,CA6PA,CAAkB,CAAd,MAAJ;;CA7PA,CA8PA,CAAkB,CAAlB,CAAK;;;CACG,EAAU,CAAlB,EAAM,CAAN;IA/PA;CAAA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/list.js b/app/assets/javascripts/app/lib/spine/list.js index 8512a822a..3e7f821b9 100755 --- a/app/assets/javascripts/app/lib/spine/list.js +++ b/app/assets/javascripts/app/lib/spine/list.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var $, Spine, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -19,7 +19,8 @@ List.prototype.selectFirst = false; function List() { - this.change = __bind(this.change, this); List.__super__.constructor.apply(this, arguments); + this.change = __bind(this.change, this); + List.__super__.constructor.apply(this, arguments); this.bind('change', this.change); } @@ -56,7 +57,6 @@ List.prototype.click = function(e) { var item; - item = this.items[$(e.currentTarget).index()]; this.trigger('change', item); return true; diff --git a/app/assets/javascripts/app/lib/spine/list.map b/app/assets/javascripts/app/lib/spine/list.map index 2c2faba33..44f03b886 100755 --- a/app/assets/javascripts/app/lib/spine/list.map +++ b/app/assets/javascripts/app/lib/spine/list.map @@ -6,5 +6,5 @@ "src/list.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,KAAA,EAAA;KAAA;;oSAAA;;CAAA,CAAA,CAAS,CAAC,CAAV,EAAmB;;CAAnB,CACA,CAAS,EAAK;;CADd,CAGM,GAAK;CACT;;CAAA,EACE,GADF;CACE,CAAe,IAAf,CAAA,MAAA;CADF,KAAA;;CAAA,EAGa,EAHb,MAGA;;CAEa,EAAA,CAAA,UAAA;CACX,KAAA,GAAA,8BAAA;CAAA,CACgB,EAAf,EAAD,EAAA;CAPF,IAKa;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AS;CACP,EAAW,CAAV,EAAD,CAAA;AAEO,CAAP,GAAA,EAAA,CAAA;CACE,GAAC,IAAD,GAAA;CACA,aAAA;QAJF;CAAA,GAMC,EAAD,EAAA,GAAA;CACA,EAAE,CAAC,CAAqB,EAAN,CAAhB,KAAF;CApBF,IAYQ;;CAZR,EAsBQ,EAAA,CAAR,GAAS;CACP,GAAkB,CAAlB,CAAA;CAAA,EAAS,CAAR,CAAD,GAAA;QAAA;CAAA,GACC,CAAK,CAAN,EAAM;CADN,GAEC,EAAD,CAAA;CACA,GAAG,EAAH,KAAA;AACS,CAAP,GAAA,EAAA,EAAA,CAAO;CACJ,GAAA,CAAD,GAAA,SAAA;UAFJ;QAJM;CAtBR,IAsBQ;;CAtBR,EA8BU,KAAV,CAAW;CACR,CAAE,CAAH,CAAC,IAAD,KAAA;CA/BF,IA8BU;;CA9BV,EAiCO,EAAP,IAAQ;CACN,GAAA,MAAA;CAAA,EAAO,CAAP,CAAc,CAAd,OAAc;CAAd,CACmB,EAAlB,EAAD,CAAA,CAAA;CAFK,YAGL;CApCF,IAiCO;;CAjCP;;CADuB,IAAK;;;CAuCtB,EAAU,CAAlB,CAAuB,CAAjB,CAAN;IA1CA;CAAA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/local.js b/app/assets/javascripts/app/lib/spine/local.js index e9cd63877..3ae68d976 100755 --- a/app/assets/javascripts/app/lib/spine/local.js +++ b/app/assets/javascripts/app/lib/spine/local.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var Spine; @@ -11,17 +11,19 @@ }, saveLocal: function() { var result; - result = JSON.stringify(this); return localStorage[this.className] = result; }, - loadLocal: function() { + loadLocal: function(options) { var result; - + if (options == null) { + options = {}; + } + if (!options.hasOwnProperty('clear')) { + options.clear = true; + } result = localStorage[this.className]; - return this.refresh(result || [], { - clear: true - }); + return this.refresh(result || [], options); } }; diff --git a/app/assets/javascripts/app/lib/spine/local.map b/app/assets/javascripts/app/lib/spine/local.map index e5c6d2758..538c8dd13 100755 --- a/app/assets/javascripts/app/lib/spine/local.map +++ b/app/assets/javascripts/app/lib/spine/local.map @@ -6,5 +6,5 @@ "src/local.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,IAAA,CAAA;;CAAA,CAAA,CAAQ,CAAC,CAAT,EAAkB;;CAAlB,CAEA,CACE,EADG;CACH,CAAU,CAAA,CAAV,IAAA,CAAU;CACR,GAAC,EAAD,GAAA;CACC,GAAA,CAAD,IAAA,IAAA;CAFF,IAAU;CAAV,CAIW,CAAA,CAAX,KAAA;CACE,KAAA,IAAA;;CAAA,EAAS,CAAI,EAAb,GAAS;CACI,EAAc,CAAb,KAAD,GAAA,CAAb;CANF,IAIW;CAJX,CAQW,CAAA,CAAX,KAAA;CACE,KAAA,IAAA;;CAAA,EAAS,CAAc,EAAvB,GAAsB,GAAA;CACrB,CAAD,EAAC,EAAQ,CAAT,MAAA;CAAuB,CAAO,EAAP,CAAA,GAAA;CAFd,OAET;CAVF,IAQW;CAXb,GAAA;;;CAeQ,EAAU,CAAlB,CAAuB,CAAjB,CAAN;IAfA;CAAA" + "mappings": ";AAAA;CAAA,IAAA,CAAA;;CAAA,CAAA,CAAQ,CAAC,CAAT,EAAkB;;CAAlB,CAEA,CACE,EADG;CACH,CAAU,CAAA,CAAV,IAAA,CAAU;CACR,GAAC,EAAD,GAAA;CACC,GAAA,CAAD,IAAA,IAAA;CAFF,IAAU;CAAV,CAIW,CAAA,CAAX,KAAA;CACE,KAAA,IAAA;CAAA,EAAS,CAAI,EAAb,GAAS;CACI,EAAc,CAAb,KAAD,GAAA,CAAb;CANF,IAIW;CAJX,CAQW,CAAA,CAAX,GAAW,EAAX;CACE,KAAA,IAAA;;GADoB,KAAV;QACV;AAA4B,CAA5B,GAAA,EAAA,CAAmC,OAAP;CAA5B,EAAgB,CAAhB,CAAA,EAAO,CAAP;QAAA;CAAA,EACS,CAAc,EAAvB,GAAsB,GAAA;CACrB,CAAD,EAAC,EAAQ,CAAT,MAAA;CAXF,IAQW;CAXb,GAAA;;;CAgBQ,EAAU,CAAlB,CAAuB,CAAjB,CAAN;IAhBA;CAAA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/manager.js b/app/assets/javascripts/app/lib/spine/manager.js index d1cf0dee4..9ce90e97f 100755 --- a/app/assets/javascripts/app/lib/spine/manager.js +++ b/app/assets/javascripts/app/lib/spine/manager.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var $, Spine, __hasProp = {}.hasOwnProperty, @@ -22,7 +22,6 @@ Manager.prototype.add = function() { var cont, controllers, _i, _len, _results; - controllers = 1 <= arguments.length ? __slice.call(arguments, 0) : []; _results = []; for (_i = 0, _len = controllers.length; _i < _len; _i++) { @@ -34,10 +33,8 @@ Manager.prototype.addOne = function(controller) { var _this = this; - controller.bind('active', function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return _this.trigger.apply(_this, ['change', controller].concat(__slice.call(args))); }); @@ -52,20 +49,18 @@ }; Manager.prototype.change = function() { - var args, cont, current, _i, _len, _ref, _results; - + var args, cont, current, _i, _len, _ref; current = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; _ref = this.controllers; - _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cont = _ref[_i]; - if (cont === current) { - _results.push(cont.activate.apply(cont, args)); - } else { - _results.push(cont.deactivate.apply(cont, args)); + if (cont !== current) { + cont.deactivate.apply(cont, args); } } - return _results; + if (current) { + return current.activate.apply(current, args); + } }; return Manager; @@ -75,7 +70,6 @@ Spine.Controller.include({ active: function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; if (typeof args[0] === 'function') { this.bind('active', args[0]); @@ -110,7 +104,6 @@ function Stack() { var key, value, _fn, _ref, _ref1, _this = this; - Stack.__super__.constructor.apply(this, arguments); this.manager = new Spine.Manager; _ref = this.controllers; @@ -127,13 +120,11 @@ _ref1 = this.routes; _fn = function(key, value) { var callback; - if (typeof value === 'function') { callback = value; } callback || (callback = function() { var _ref2; - return (_ref2 = _this[value]).active.apply(_ref2, arguments); }); return _this.route(key, callback); diff --git a/app/assets/javascripts/app/lib/spine/manager.map b/app/assets/javascripts/app/lib/spine/manager.map index 2ef71d8ff..6a10eb252 100755 --- a/app/assets/javascripts/app/lib/spine/manager.map +++ b/app/assets/javascripts/app/lib/spine/manager.map @@ -6,5 +6,5 @@ "src/manager.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,KAAA,EAAA;KAAA;;uBAAA;;CAAA,CAAA,CAAS,CAAC,CAAV,EAAmB;;CAAnB,CACA,CAAS,EAAK;;CADd,CAGM,GAAK;CACT;;CAAA,GAAA,CAAc,CAAd,CAAC;;CAEY,EAAA,CAAA,aAAA;CACX,CAAA,CAAe,CAAd,EAAD,KAAA;CAAA,CACgB,EAAf,EAAD,EAAA;CADA,EAEA,CAAC,EAAD,GAAA,IAAK;CALP,IAEa;;CAFb,EAOA,MAAK;CACH,SAAA,2BAAA;;CAAA,KADI,iDACJ;AAAA,CAAA;YAAA,sCAAA;gCAAA;CAAA,GAAC,EAAD;CAAA;uBADG;CAPL,IAOK;;CAPL,EAUQ,GAAR,GAAS,CAAD;CACN,SAAA,EAAA;;CAAA,CAA0B,CAAA,CAA1B,EAAA,EAAA,CAA0B,CAAhB;CACR,GAAA,QAAA;;CAAA,OADyB,+CACzB;CAAC,CAAkB,EAAY,CAA9B,EAAD,CAAS,CAAsB,CAAA,GAAA,CAAtB,CAAT;CADF,MAA0B;CAA1B,CAE2B,CAAA,CAA3B,EAAA,GAAA,CAAU;CACP,CAAqD,GAArD,CAAD,CAAoB,GAAA,CAAR,IAAZ;CADF,MAA2B;CAG1B,GAAA,MAAD,CAAY,EAAZ;CAhBF,IAUQ;;CAVR,EAkBY,MAAA,CAAZ;CACG,CAAkB,EAAlB,CAAyB,EAA1B,CAAS,CAAiB,IAA1B;CAnB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AAA;CACX,SAAA,kBAAA;SAAA,GAAA;CAAA,KAAA,GAAA,+BAAA;AAEW,CAFX,EAEW,CAAV,CAAmB,CAApB,CAAA;CAEA;CAAA,UAAA;2BAAA;CACE,GAAwE,IAAxE,SAAA;CAAA,EAAL,CAAkB,CAAP,WAAA,8BAAA;UAAN;CAAA,EACE,CAAA,CAAW,GAAb;CAAmB,CAAO,EAAP,CAAA,KAAA;CADnB,SACa;CADb,EAEA,CAAC,IAAD;CAHF,MAJA;CASA;CAAA,CACW,CAAN,EAAA,IAAC;CACF,OAAA,IAAA;AAAoB,CAApB,GAAoB,CAAA,CAAA,EAApB,EAAA;CAAA,EAAW,EAAX,GAAA,EAAA;UAAA;CAAA,EACa,KAAb,CAAa;CAAG,IAAA,SAAA;CAAE,IAAA,CAAF,GAAA,KAAgB,GAAhB;CADhB,QACa;CACZ,CAAW,CAAZ,EAAC,GAAD,OAAA;CAJJ,MACK;CADL,UAAA,CAAA;4BAAA;CACE,CAAS;CADX,MATA;CAeA,GAAwB,EAAxB,GAAyB;CAAzB,GAAE,EAAF,EAAA,CAAG;QAhBQ;CALb,IAKa;;CALb,EAuBA,MAAM,CAAD;CACH,EAAA,CAAC,EAAD,CAAQ,GAAR;CACC,GAAA,EAAD,IAAA,GAAA;CAzBF,IAuBK;;CAvBL;;CADwB,IAAK;;;CA4BvB,EAAU,CAAlB,CAAuB,CAAjB,CAAN;IAjFA;;;CAkFQ,EAAgB,CAAxB,CAAA,CAAM,CAAS;IAlFf;CAAA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/relation.js b/app/assets/javascripts/app/lib/spine/relation.js index 922dc3dad..0afb8d4f1 100755 --- a/app/assets/javascripts/app/lib/spine/relation.js +++ b/app/assets/javascripts/app/lib/spine/relation.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var Collection, Instance, Singleton, Spine, association, isArray, require, singularize, underscore, __hasProp = {}.hasOwnProperty, @@ -17,7 +17,6 @@ function Collection(options) { var key, value; - if (options == null) { options = {}; } @@ -29,7 +28,6 @@ Collection.prototype.all = function() { var _this = this; - return this.model.select(function(rec) { return _this.associated(rec); }); @@ -41,7 +39,6 @@ Collection.prototype.last = function() { var values; - values = this.all(); return values[values.length - 1]; }; @@ -53,7 +50,6 @@ Collection.prototype.find = function(id) { var records, _this = this; - records = this.select(function(rec) { return ("" + rec.id) === ("" + id); }); @@ -65,7 +61,6 @@ Collection.prototype.findAllByAttribute = function(name, value) { var _this = this; - return this.model.select(function(rec) { return _this.associated(rec) && rec[name] === value; }); @@ -77,7 +72,6 @@ Collection.prototype.select = function(cb) { var _this = this; - return this.model.select(function(rec) { return _this.associated(rec) && cb(rec); }); @@ -85,7 +79,6 @@ Collection.prototype.refresh = function(values) { var i, match, record, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - if (values == null) { return this; } @@ -141,7 +134,6 @@ function Instance(options) { var key, value; - if (options == null) { options = {}; } @@ -182,7 +174,6 @@ function Singleton(options) { var key, value; - if (options == null) { options = {}; } diff --git a/app/assets/javascripts/app/lib/spine/relation.map b/app/assets/javascripts/app/lib/spine/relation.map index 7a5a7df85..adc49d975 100755 --- a/app/assets/javascripts/app/lib/spine/relation.map +++ b/app/assets/javascripts/app/lib/spine/relation.map @@ -6,5 +6,5 @@ "src/relation.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,KAAA,wFAAA;KAAA;oSAAA;;CAAA,CAAA,CAAU,CAAC,CAAX,EAAoB;;CAApB,CACA,CAAU,EAAK,EAAf;;CADA,CAEA,CAAU,CAAC,CAAY,EAAvB,EAAwB;CAAe,GAAL,CAAA,MAAA;CAAZ,EAAC;;CAFvB,CAIM;CACJ;;CAAa,EAAA,CAAA,GAAA,aAAC;CACZ,SAAA;;;GADsB,KAAV;QACZ;AAAA,CAAA,UAAA,GAAA;8BAAA;CACE,EAAE,CAAA,CAAF,GAAA;CADF,MADW;CAAb,IAAa;;CAAb,EAIA,MAAK;C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AAA,EACY,CAAX,CAAW,CAAZ,GAAI;CACU,CAAM,EAAlB,CAAA,CAAA,EAAA,GAAA,IAAA;CAFF,MACY;CAGX,GAAA,MAAU,GAAX;CAVF,IAKW;CALX,CAYQ,CAAA,CAAR,CAAQ,CAAR,GAAS;;CACG,CAAF,CAAA,CAAc,IAAtB,CAAU,CAAA;QAAV;CACC,EAAW,CAAX,CAAW,IAAR,IAAJ;CACc,CAAM,EAAlB,CAAA,CAAA,GAAA,EAAA,IAAA;CAHI,MAEM;CAdd,IAYQ;CAhIV,GAmHA;;CAnHA,CAqIA,CAAmB,EAAd,KAAL;;CArIA,CAsIA,CAAkB,EAAb,IAAL;;CAtIA,CAuIA,CAAiB,EAAZ,GAAL;CAvIA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/route.js b/app/assets/javascripts/app/lib/spine/route.js index b562d7bf1..4f2a81bb0 100755 --- a/app/assets/javascripts/app/lib/spine/route.js +++ b/app/assets/javascripts/app/lib/spine/route.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 (function() { var $, Spine, escapeRegExp, hashStrip, namedParam, splatParam, __hasProp = {}.hasOwnProperty, @@ -32,12 +32,12 @@ trigger: true, history: false, shim: false, - replace: false + replace: false, + redirect: false }; Route.add = function(path, callback) { var key, value, _results; - if (typeof path === 'object' && !(path instanceof RegExp)) { _results = []; for (key in path) { @@ -81,8 +81,7 @@ }; Route.navigate = function() { - var args, lastArg, options, path; - + var args, lastArg, options, path, route; args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; options = {}; lastArg = args[args.length - 1]; @@ -99,11 +98,20 @@ this.path = path; this.trigger('navigate', this.path); if (options.trigger) { - this.matchRoute(this.path, options); + route = this.matchRoute(this.path, options); } if (options.shim) { return; } + if (!route) { + if (typeof options.redirect === 'function') { + return options.redirect.apply(this, [this.path, options]); + } else { + if (options.redirect === true) { + this.redirect(this.path); + } + } + } if (this.history && options.replace) { return history.replaceState({}, document.title, this.path); } else if (this.history) { @@ -115,7 +123,6 @@ Route.getPath = function() { var path; - if (this.history) { path = window.location.pathname; if (path.substr(0, 1) !== '/') { @@ -134,7 +141,6 @@ Route.change = function() { var path; - path = this.getPath(); if (path === this.path) { return; @@ -145,7 +151,6 @@ Route.matchRoute = function(path, options) { var route, _i, _len, _ref1; - _ref1 = this.routes; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { route = _ref1[_i]; @@ -157,9 +162,12 @@ } }; + Route.redirect = function(path) { + return window.location = path; + }; + function Route(path, callback) { var match; - this.path = path; this.callback = callback; this.names = []; @@ -181,7 +189,6 @@ Route.prototype.match = function(path, options) { var i, match, param, params, _i, _len; - if (options == null) { options = {}; } @@ -212,7 +219,6 @@ }, routes: function(routes) { var key, value, _results; - _results = []; for (key in routes) { value = routes[key]; diff --git a/app/assets/javascripts/app/lib/spine/route.map b/app/assets/javascripts/app/lib/spine/route.map index 1a135d154..27453dd8e 100755 --- a/app/assets/javascripts/app/lib/spine/route.map +++ b/app/assets/javascripts/app/lib/spine/route.map @@ -6,5 +6,5 @@ "src/route.coffee" ], "names": [], - "mappings": ";AAAA;CAAA,KAAA,mDAAA;KAAA;;uBAAA;;CAAA,CAAA,CAAQ,CAAC,CAAT,EAAkB;;CAAlB,CACA,CAAQ,EAAK;;CADb,CAGA,CAAe,EAHf,IAGA;;CAHA,CAIA,CAAe,OAAf,GAJA;;CAAA,CAKA,CAAe,OAAf,IALA;;CAAA,CAMA,CAAe,SAAf,aANA;;CAAA,CAQM,GAAK;CACT,GAAA,IAAA;;CAAA;;CAAA,GAAA,CAAC,CAAD;;CAAA,EAEiB,CAAjB,CAAC,SAAD,qDAFA;;CAAA,CAAA,CAIS,CAAT,CAAC,CAAD;;CAJA,EAOE,CADF,CAAC,EAAD;CACE,CAAS,EAAT,EAAA,CAAA;CAAA,CACS,GADT,CACA,CAAA;CADA,CAEM,EAAN,CAFA,CAEA;CAFA,CAGS,GAHT,CAGA,CAAA;CAVF,K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,CAAN;IA9JA;CAAA" } \ No newline at end of file diff --git a/app/assets/javascripts/app/lib/spine/spine.js b/app/assets/javascripts/app/lib/spine/spine.js index e94a4cb83..2bc6a54ed 100755 --- a/app/assets/javascripts/app/lib/spine/spine.js +++ b/app/assets/javascripts/app/lib/spine/spine.js @@ -1,4 +1,10 @@ -// Generated by CoffeeScript 1.6.2 +// Generated by CoffeeScript 1.6.3 +/* +Spine.js MVC library +Released under the MIT License +*/ + + (function() { var $, Controller, Events, Log, Model, Module, Spine, createObject, isArray, isBlank, makeArray, moduleKeywords, __slice = [].slice, @@ -10,7 +16,6 @@ Events = { bind: function(ev, callback) { var calls, evs, name, _i, _len; - evs = ev.split(' '); calls = this.hasOwnProperty('_callbacks') && this._callbacks || (this._callbacks = {}); for (_i = 0, _len = evs.length; _i < _len; _i++) { @@ -22,7 +27,6 @@ }, one: function(ev, callback) { var handler; - return this.bind(ev, handler = function() { this.unbind(ev, handler); return callback.apply(this, arguments); @@ -30,7 +34,6 @@ }, trigger: function() { var args, callback, ev, list, _i, _len, _ref; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; ev = args.shift(); list = this.hasOwnProperty('_callbacks') && ((_ref = this._callbacks) != null ? _ref[ev] : void 0); @@ -48,30 +51,44 @@ listenTo: function(obj, ev, callback) { obj.bind(ev, callback); this.listeningTo || (this.listeningTo = []); - this.listeningTo.push(obj); + this.listeningTo.push({ + obj: obj, + ev: ev, + callback: callback + }); return this; }, listenToOnce: function(obj, ev, callback) { - var listeningToOnce; - + var handler, listeningToOnce; listeningToOnce = this.listeningToOnce || (this.listeningToOnce = []); - listeningToOnce.push(obj); - obj.one(ev, function() { - var idx; - - idx = listeningToOnce.indexOf(obj); + obj.bind(ev, handler = function() { + var i, idx, lt, _i, _len; + idx = -1; + for (i = _i = 0, _len = listeningToOnce.length; _i < _len; i = ++_i) { + lt = listeningToOnce[i]; + if (lt.obj === obj) { + if (lt.ev === ev && lt.callback === callback) { + idx = i; + } + } + } + obj.unbind(ev, handler); if (idx !== -1) { listeningToOnce.splice(idx, 1); } return callback.apply(this, arguments); }); + listeningToOnce.push({ + obj: obj, + ev: ev, + callback: callback, + handler: handler + }); return this; }, - stopListening: function(obj, ev, callback) { - var idx, listeningTo, retain, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results; - + stopListening: function(obj, events, callback) { + var ev, evts, i, idx, listeningTo, lt, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results; if (arguments.length === 0) { - retain = []; _ref = [this.listeningTo, this.listeningToOnce]; for (_i = 0, _len = _ref.length; _i < _len; _i++) { listeningTo = _ref[_i]; @@ -79,23 +96,13 @@ continue; } for (_j = 0, _len1 = listeningTo.length; _j < _len1; _j++) { - obj = listeningTo[_j]; - if (!(!(__indexOf.call(retain, obj) >= 0))) { - continue; - } - obj.unbind(); - retain.push(obj); + lt = listeningTo[_j]; + lt.obj.unbind(lt.ev, lt.handler || lt.callback); } } this.listeningTo = void 0; return this.listeningToOnce = void 0; } else if (obj) { - if (ev) { - obj.unbind(ev, callback); - } - if (!ev) { - obj.unbind(); - } _ref1 = [this.listeningTo, this.listeningToOnce]; _results = []; for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) { @@ -103,19 +110,48 @@ if (!listeningTo) { continue; } - idx = listeningTo.indexOf(obj); - if (idx !== -1) { - _results.push(listeningTo.splice(idx, 1)); - } else { - _results.push(void 0); - } + events = events ? events.split(' ') : [void 0]; + _results.push((function() { + var _l, _len3, _results1; + _results1 = []; + for (_l = 0, _len3 = events.length; _l < _len3; _l++) { + ev = events[_l]; + _results1.push((function() { + var _m, _ref2, _results2; + _results2 = []; + for (idx = _m = _ref2 = listeningTo.length - 1; _ref2 <= 0 ? _m <= 0 : _m >= 0; idx = _ref2 <= 0 ? ++_m : --_m) { + lt = listeningTo[idx]; + if ((!ev) || (ev === lt.ev)) { + lt.obj.unbind(lt.ev, lt.handler || lt.callback); + if (idx !== -1) { + _results2.push(listeningTo.splice(idx, 1)); + } else { + _results2.push(void 0); + } + } else if (ev) { + evts = lt.ev.split(' '); + if (~(i = evts.indexOf(ev))) { + evts.splice(i, 1); + lt.ev = $.trim(evts.join(' ')); + _results2.push(lt.obj.unbind(ev, lt.handler || lt.callback)); + } else { + _results2.push(void 0); + } + } else { + _results2.push(void 0); + } + } + return _results2; + })()); + } + return _results1; + })()); } return _results; } }, unbind: function(ev, callback) { var cb, evs, i, list, name, _i, _j, _len, _len1, _ref; - if (arguments.length === 0) { this._callbacks = {}; return this; @@ -158,7 +194,6 @@ logPrefix: '(App)', log: function() { var args; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; if (!this.trace) { return; @@ -180,7 +215,6 @@ Module = (function() { Module.include = function(obj) { var key, value, _ref; - if (!obj) { throw new Error('include(obj) requires obj'); } @@ -198,7 +232,6 @@ Module.extend = function(obj) { var key, value, _ref; - if (!obj) { throw new Error('extend(obj) requires obj'); } @@ -216,7 +249,6 @@ Module.proxy = function(func) { var _this = this; - return function() { return func.apply(_this, arguments); }; @@ -224,7 +256,6 @@ Module.prototype.proxy = function(func) { var _this = this; - return function() { return func.apply(_this, arguments); }; @@ -249,13 +280,10 @@ Model.irecords = {}; - Model.crecords = {}; - Model.attributes = []; Model.configure = function() { var attributes, name; - name = arguments[0], attributes = 2 <= arguments.length ? __slice.call(arguments, 1) : []; this.className = name; this.deleteAll(); @@ -274,7 +302,6 @@ Model.find = function(id) { var record; - record = this.exists(id); if (!record) { throw new Error("\"" + this.className + "\" model could not find a record for the ID \"" + id + "\""); @@ -283,14 +310,22 @@ }; Model.exists = function(id) { - var _ref, _ref1; + var _ref; + return (_ref = this.irecords[id]) != null ? _ref.clone() : void 0; + }; - return (_ref = (_ref1 = this.irecords[id]) != null ? _ref1 : this.crecords[id]) != null ? _ref.clone() : void 0; + Model.addRecord = function(record) { + if (record.id && this.irecords[record.id]) { + this.irecords[record.id].remove(); + } + record.id || (record.id = record.cid); + this.records.push(record); + this.irecords[record.id] = record; + return this.irecords[record.cid] = record; }; Model.refresh = function(values, options) { var record, records, result, _i, _len; - if (options == null) { options = {}; } @@ -303,24 +338,16 @@ } for (_i = 0, _len = records.length; _i < _len; _i++) { record = records[_i]; - if (record.id && this.irecords[record.id]) { - this.records[this.records.indexOf(this.irecords[record.id])] = record; - } else { - record.id || (record.id = record.cid); - this.records.push(record); - } - this.irecords[record.id] = record; - this.crecords[record.cid] = record; + this.addRecord(record); } this.sort(); result = this.cloneArray(records); - this.trigger('refresh', this.cloneArray(records)); + this.trigger('refresh', result, options); return result; }; Model.select = function(callback) { var record, _i, _len, _ref, _results; - _ref = this.records; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -334,7 +361,6 @@ Model.findByAttribute = function(name, value) { var record, _i, _len, _ref; - _ref = this.records; for (_i = 0, _len = _ref.length; _i < _len; _i++) { record = _ref[_i]; @@ -353,7 +379,6 @@ Model.each = function(callback) { var record, _i, _len, _ref, _results; - _ref = this.records; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -367,16 +392,32 @@ return this.cloneArray(this.records); }; - Model.first = function() { - var _ref; - - return (_ref = this.records[0]) != null ? _ref.clone() : void 0; + Model.slice = function(begin, end) { + if (begin == null) { + begin = 0; + } + return this.cloneArray(this.records.slice(begin, end)); }; - Model.last = function() { + Model.first = function(end) { var _ref; + if (end == null) { + end = 1; + } + if (end > 1) { + return this.cloneArray(this.records.slice(0, end)); + } else { + return (_ref = this.records[0]) != null ? _ref.clone() : void 0; + } + }; - return (_ref = this.records[this.records.length - 1]) != null ? _ref.clone() : void 0; + Model.last = function(begin) { + var _ref; + if (typeof begin === 'number') { + return this.cloneArray(this.records.slice(-begin)); + } else { + return (_ref = this.records[this.records.length - 1]) != null ? _ref.clone() : void 0; + } }; Model.count = function() { @@ -385,13 +426,11 @@ Model.deleteAll = function() { this.records = []; - this.irecords = {}; - return this.crecords = {}; + return this.irecords = {}; }; Model.destroyAll = function(options) { var record, _i, _len, _ref, _results; - _ref = this.records; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -407,7 +446,6 @@ Model.create = function(atts, options) { var record; - record = new this(atts); return record.save(options); }; @@ -438,7 +476,6 @@ Model.fromJSON = function(objects) { var value, _i, _len, _results; - if (!objects) { return; } @@ -459,7 +496,6 @@ Model.fromForm = function() { var _ref; - return (_ref = new this).fromForm.apply(_ref, arguments); }; @@ -467,12 +503,11 @@ if (this.comparator) { this.records.sort(this.comparator); } - return this.records; + return this; }; Model.cloneArray = function(array) { var value, _i, _len, _results; - _results = []; for (_i = 0, _len = array.length; _i < _len; _i++) { value = array[_i]; @@ -485,7 +520,6 @@ Model.uid = function(prefix) { var uid; - if (prefix == null) { prefix = ''; } @@ -501,7 +535,7 @@ if (atts) { this.load(atts); } - this.cid = this.constructor.uid('c-'); + this.cid = (atts != null ? atts.cid : void 0) || this.constructor.uid('c-'); } Model.prototype.isNew = function() { @@ -516,7 +550,6 @@ Model.prototype.load = function(atts) { var key, value; - if (atts.id) { this.id = atts.id; } @@ -533,7 +566,6 @@ Model.prototype.attributes = function() { var key, result, _i, _len, _ref; - result = {}; _ref = this.constructor.attributes; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -553,12 +585,11 @@ }; Model.prototype.eql = function(rec) { - return !!(rec && rec.constructor === this.constructor && (rec.cid === this.cid) || (rec.id && rec.id === this.id)); + return !!(rec && rec.constructor === this.constructor && ((rec.cid === this.cid) || (rec.id && rec.id === this.id))); }; Model.prototype.save = function(options) { var error, record; - if (options == null) { options = {}; } @@ -578,7 +609,6 @@ Model.prototype.stripCloneAttrs = function() { var key, value; - if (this.hasOwnProperty('cid')) { return; } @@ -594,7 +624,6 @@ Model.prototype.updateAttribute = function(name, value, options) { var atts; - atts = {}; atts[name] = value; return this.updateAttributes(atts, options); @@ -607,21 +636,20 @@ Model.prototype.changeID = function(id) { var records; - + if (id === this.id) { + return; + } records = this.constructor.irecords; records[id] = records[this.id]; - delete records[this.id]; + if (this.cid !== this.id) { + delete records[this.id]; + } this.id = id; return this.save(); }; - Model.prototype.destroy = function(options) { + Model.prototype.remove = function() { var i, record, records, _i, _len; - - if (options == null) { - options = {}; - } - this.trigger('beforeDestroy', options); records = this.constructor.records.slice(0); for (i = _i = 0, _len = records.length; _i < _len; i = ++_i) { record = records[i]; @@ -633,7 +661,15 @@ } this.constructor.records = records; delete this.constructor.irecords[this.id]; - delete this.constructor.crecords[this.cid]; + return delete this.constructor.irecords[this.cid]; + }; + + Model.prototype.destroy = function(options) { + if (options == null) { + options = {}; + } + this.trigger('beforeDestroy', options); + this.remove(); this.destroyed = true; this.trigger('destroy', options); this.trigger('change', 'destroy', options); @@ -645,15 +681,17 @@ }; Model.prototype.dup = function(newRecord) { - var result; - - result = new this.constructor(this.attributes()); - if (newRecord === false) { - result.cid = this.cid; - } else { - delete result.id; + var atts; + if (newRecord == null) { + newRecord = true; } - return result; + atts = this.attributes(); + if (newRecord) { + delete atts.id; + } else { + atts.cid = this.cid; + } + return new this.constructor(atts); }; Model.prototype.clone = function() { @@ -662,7 +700,6 @@ Model.prototype.reload = function() { var original; - if (this.isNew()) { return this; } @@ -671,6 +708,14 @@ return original; }; + Model.prototype.refresh = function(data) { + var root; + root = this.constructor.irecords[this.id]; + root.load(data); + this.trigger('refresh'); + return this; + }; + Model.prototype.toJSON = function() { return this.attributes(); }; @@ -680,13 +725,26 @@ }; Model.prototype.fromForm = function(form) { - var key, result, _i, _len, _ref; - + var checkbox, key, name, result, _i, _j, _k, _len, _len1, _len2, _name, _ref, _ref1, _ref2; result = {}; - _ref = $(form).serializeArray(); + _ref = $(form).find('[type=checkbox]:not([value])'); for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - result[key.name] = key.value; + checkbox = _ref[_i]; + result[checkbox.name] = $(checkbox).prop('checked'); + } + _ref1 = $(form).find('[type=checkbox][name$="[]"]'); + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + checkbox = _ref1[_j]; + name = checkbox.name.replace(/\[\]$/, ''); + result[name] || (result[name] = []); + if ($(checkbox).prop('checked')) { + result[name].push(checkbox.value); + } + } + _ref2 = $(form).serializeArray(); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + key = _ref2[_k]; + result[_name = key.name] || (result[_name] = key.value); } return this.load(result); }; @@ -697,7 +755,6 @@ Model.prototype.update = function(options) { var clone, records; - this.trigger('beforeUpdate', options); records = this.constructor.irecords; records[this.id].load(this.attributes()); @@ -710,15 +767,10 @@ Model.prototype.create = function(options) { var clone, record; - this.trigger('beforeCreate', options); - if (!this.id) { - this.id = this.cid; - } + this.id || (this.id = this.cid); record = this.dup(false); - this.constructor.records.push(record); - this.constructor.irecords[this.id] = record; - this.constructor.crecords[this.cid] = record; + this.constructor.addRecord(record); this.constructor.sort(); clone = record.clone(); clone.trigger('create', options); @@ -729,7 +781,6 @@ Model.prototype.bind = function(events, callback) { var binder, singleEvent, _fn, _i, _len, _ref, _this = this; - this.constructor.bind(events, binder = function(record) { if (record && _this.eql(record)) { return callback.apply(_this, arguments); @@ -738,7 +789,6 @@ _ref = events.split(' '); _fn = function(singleEvent) { var unbinder; - return _this.constructor.bind("unbind", unbinder = function(record, event, cb) { if (record && _this.eql(record)) { if (event && event !== singleEvent) { @@ -762,7 +812,6 @@ Model.prototype.one = function(events, callback) { var handler, _this = this; - return this.bind(events, handler = function() { _this.unbind(events, handler); return callback.apply(_this, arguments); @@ -771,89 +820,25 @@ Model.prototype.trigger = function() { var args, _ref; - args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; args.splice(1, 0, this); return (_ref = this.constructor).trigger.apply(_ref, args); }; - Model.prototype.listenTo = function(obj, events, callback) { - obj.bind(events, callback); - this.listeningTo || (this.listeningTo = []); - return this.listeningTo.push(obj); + Model.prototype.listenTo = function() { + return Events.listenTo.apply(this, arguments); }; - Model.prototype.listenToOnce = function(obj, events, callback) { - var handler, listeningToOnce, - _this = this; - - listeningToOnce = this.listeningToOnce || (this.listeningToOnce = []); - listeningToOnce.push(obj); - return obj.bind(events, handler = function() { - var idx; - - idx = listeningToOnce.indexOf(obj); - if (idx !== -1) { - listeningToOnce.splice(idx, 1); - } - obj.unbind(events, handler); - return callback.apply(obj, arguments); - }); + Model.prototype.listenToOnce = function() { + return Events.listenToOnce.apply(this, arguments); }; - Model.prototype.stopListening = function(obj, events, callback) { - var idx, listeningTo, retain, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; - - if (arguments.length === 0) { - retain = []; - _ref = [this.listeningTo, this.listeningToOnce]; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - listeningTo = _ref[_i]; - if (!listeningTo) { - continue; - } - _ref1 = this.listeningTo; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - obj = _ref1[_j]; - if (!(!(__indexOf.call(retain, obj) >= 0))) { - continue; - } - obj.unbind(); - retain.push(obj); - } - } - this.listeningTo = void 0; - this.listeningToOnce = void 0; - return; - } - if (obj) { - if (!events) { - obj.unbind(); - } - if (events) { - obj.unbind(events, callback); - } - _ref2 = [this.listeningTo, this.listeningToOnce]; - _results = []; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - listeningTo = _ref2[_k]; - if (!listeningTo) { - continue; - } - idx = listeningTo.indexOf(obj); - if (idx !== -1) { - _results.push(listeningTo.splice(idx, 1)); - } else { - _results.push(void 0); - } - } - return _results; - } + Model.prototype.stopListening = function() { + return Events.stopListening.apply(this, arguments); }; Model.prototype.unbind = function(events, callback) { var event, _i, _len, _ref, _results; - if (arguments.length === 0) { return this.trigger('unbind'); } else if (events) { @@ -889,7 +874,6 @@ function Controller(options) { this.release = __bind(this.release, this); var context, key, parent_prototype, value, _ref; - this.options = options; _ref = this.options; for (key in _ref) { @@ -946,7 +930,6 @@ Controller.prototype.delegateEvents = function(events) { var eventName, key, match, method, selector, _results, _this = this; - _results = []; for (key in events) { method = events[key]; @@ -974,7 +957,7 @@ if (selector === '') { _results.push(this.el.bind(eventName, method)); } else { - _results.push(this.el.delegate(selector, eventName, method)); + _results.push(this.el.on(eventName, selector, method)); } } return _results; @@ -982,7 +965,6 @@ Controller.prototype.refreshElements = function() { var key, value, _ref, _results; - _ref = this.elements; _results = []; for (key in _ref) { @@ -1004,11 +986,9 @@ Controller.prototype.append = function() { var e, elements, _ref; - elements = 1 <= arguments.length ? __slice.call(arguments, 0) : []; elements = (function() { var _i, _len, _results; - _results = []; for (_i = 0, _len = elements.length; _i < _len; _i++) { e = elements[_i]; @@ -1029,11 +1009,9 @@ Controller.prototype.prepend = function() { var e, elements, _ref; - elements = 1 <= arguments.length ? __slice.call(arguments, 0) : []; elements = (function() { var _i, _len, _results; - _results = []; for (_i = 0, _len = elements.length; _i < _len; _i++) { e = elements[_i]; @@ -1047,9 +1025,12 @@ }; Controller.prototype.replace = function(element) { - var previous, _ref; - - _ref = [this.el, $(element.el || element)], previous = _ref[0], this.el = _ref[1]; + var previous, _ref, _ref1; + element = element.el || element; + if (typeof element === "string") { + element = $.trim(element); + } + _ref1 = [this.el, $(((_ref = $.parseHTML(element)) != null ? _ref[0] : void 0) || element)], previous = _ref1[0], this.el = _ref1[1]; previous.replaceWith(this.el); this.delegateEvents(this.events); this.refreshElements(); @@ -1066,7 +1047,6 @@ createObject = Object.create || function(o) { var Func; - Func = function() {}; Func.prototype = o; return new Func(); @@ -1078,7 +1058,6 @@ isBlank = function(value) { var key; - if (!value) { return true; } @@ -1098,7 +1077,7 @@ module.exports = Spine; } - Spine.version = '1.1.0'; + Spine.version = '1.2.2'; Spine.isArray = isArray; @@ -1120,7 +1099,6 @@ Module.create = Module.sub = Controller.create = Controller.sub = Model.sub = function(instances, statics) { var Result, _ref; - Result = (function(_super) { __extends(Result, _super); @@ -1146,7 +1124,6 @@ Model.setup = function(name, attributes) { var Instance, _ref; - if (attributes == null) { attributes = []; } diff --git a/app/assets/javascripts/app/lib/spine/spine.map b/app/assets/javascripts/app/lib/spine/spine.map index c0382d939..b65cb7cb4 100755 --- a/app/assets/javascripts/app/lib/spine/spine.map +++ b/app/assets/javascripts/app/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