dist/tao.js in tao_on_rails-0.4.4 vs dist/tao.js in tao_on_rails-0.5.0

- old
+ new

@@ -27744,25 +27744,25 @@ ref.call(this); } return this; }; - TaoModule.get = function(propertyName, getMethod) { - return Object.defineProperty(this.prototype, propertyName, { + TaoModule.get = function(attributeName, getMethod) { + return Object.defineProperty(this.prototype, attributeName, { get: getMethod, configurable: true }); }; - TaoModule.set = function(propertyName, setMethod) { - return Object.defineProperty(this.prototype, propertyName, { + TaoModule.set = function(attributeName, setMethod) { + return Object.defineProperty(this.prototype, attributeName, { set: setMethod, configurable: true }); }; - TaoModule.property = function() { + TaoModule.attribute = function() { var i, names, options; names = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), options = arguments[i++]; if (options == null) { options = {}; } @@ -27772,18 +27772,18 @@ } return names.forEach((function(_this) { return function(name) { _this.get(name, function() { var ref; - return (ref = this._properties[name]) != null ? ref : options["default"]; + return (ref = this._attributes[name]) != null ? ref : options["default"]; }); return _this.set(name, function(val) { var name1; - if (this._properties[name] === val) { + if (this._attributes[name] === val) { return; } - this._properties[name] = val; + this._attributes[name] = val; return typeof this[name1 = "_" + name + "Changed"] === "function" ? this[name1]() : void 0; }); }; })(this)); }; @@ -27791,11 +27791,11 @@ function TaoModule(options) { var key, val; if (options == null) { options = {}; } - this._properties = {}; + this._attributes = {}; if (typeof options === 'object') { for (key in options) { val = options[key]; this[key] = val; } @@ -27872,11 +27872,13 @@ return $(this).removeClass('disabled'); }); }; TaoApplication.prototype._initI18n = function() { - return typeof I18n !== "undefined" && I18n !== null ? I18n.locale = this.locale : void 0; + if (I18n && this.locale) { + return I18n.locale = this.locale; + } }; TaoApplication.prototype._initIcons = function($page) { var $icons; $icons = $page.siblings('#tao-icons'); @@ -27928,16 +27930,16 @@ var ref; return _this.trigger('before-page-render', [$((ref = e.originalEvent) != null ? ref.data.newBody : void 0)]); }; })(this)).on('turbolinks:render', (function(_this) { return function(e) { - return _this.trigger('page-render', [$('body > .page')]); + return _this.trigger('page-render', [$('body > .tao-page')]); }; })(this)).on('turbolinks:load', (function(_this) { return function(e) { var $page; - $page = $('body > .page'); + $page = $('body > .tao-page'); if (!($page.length > 0)) { return; } _this._initIcons($page); _this._initPage($page); @@ -30928,25 +30930,25 @@ ref.call(this); } return this; }; - _Class.get = function(propertyName, getMethod) { - return Object.defineProperty(this.prototype, propertyName, { + _Class.get = function(attributeName, getMethod) { + return Object.defineProperty(this.prototype, attributeName, { get: getMethod, configurable: true }); }; - _Class.set = function(propertyName, setMethod) { - return Object.defineProperty(this.prototype, propertyName, { + _Class.set = function(attributeName, setMethod) { + return Object.defineProperty(this.prototype, attributeName, { set: setMethod, configurable: true }); }; - _Class.property = function() { + _Class.attribute = function() { var i, names, options; names = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), options = arguments[i++]; if (options == null) { options = {}; } @@ -31027,29 +31029,29 @@ }; _Class.prototype.on = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = $(this)).on.apply(ref, args); + return (ref = this.jq).on.apply(ref, args); }; _Class.prototype.off = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = $(this)).off.apply(ref, args); + return (ref = this.jq).off.apply(ref, args); }; _Class.prototype.trigger = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = $(this)).triggerHandler.apply(ref, args); + return (ref = this.jq).triggerHandler.apply(ref, args); }; _Class.prototype.one = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = $(this)).one.apply(ref, args); + return (ref = this.jq).one.apply(ref, args); }; _Class.prototype._init = function() {}; _Class.prototype._connect = function() {}; @@ -31078,10 +31080,10 @@ function TaoPage() { return TaoPage.__super__.constructor.apply(this, arguments); } - TaoPage.property('layout'); + TaoPage.attribute('layout'); TaoPage.prototype.prepareCache = function() { return $(this).find('.tao-component').each((function(_this) { return function(i, el) { if (typeof el.prepareCache === "function") {