diff --git a/client/src/collection.js b/client/src/collection.js index d95968cb7c..6dd569e01f 100644 --- a/client/src/collection.js +++ b/client/src/collection.js @@ -148,8 +148,6 @@ define('collection', [], function () { this.defaultOrderBy = this.orderBy; this.data = {}; - - Backbone.Collection.prototype.initialize.call(this); }, _onModelEvent: function(event, model, collection, options) { diff --git a/client/src/collections/tree.js b/client/src/collections/tree.js index bb6e1d7966..f1316a7106 100644 --- a/client/src/collections/tree.js +++ b/client/src/collections/tree.js @@ -32,6 +32,7 @@ define('collections/tree', 'collection', function (Dep) { createSeed: function () { var seed = new this.constructor(); + seed.url = this.url; seed.model = this.model; seed._user = this._user; @@ -89,11 +90,11 @@ define('collections/tree', 'collection', function (Dep) { if (this.parentId) { options.data.parentId = this.parentId; } + options.data.maxDepth = this.maxDepth; return Dep.prototype.fetch.call(this, options); }, }); - }); diff --git a/client/src/model-offline.js b/client/src/model-offline.js index 075092ca75..f0e2d8efdc 100644 --- a/client/src/model-offline.js +++ b/client/src/model-offline.js @@ -40,10 +40,10 @@ define('model-offline', 'model', function (Model) { _key: null, initialize: function (attributes, options) { - options = options || {}; - Model.prototype.initialize.apply(this, arguments); + options = options || {}; + this._key = this.url = this.name; this.cache = options.cache || null; diff --git a/client/src/model.js b/client/src/model.js index 45d9185765..7332ce6fd5 100644 --- a/client/src/model.js +++ b/client/src/model.js @@ -98,8 +98,6 @@ define('model', [], function () { this.defs.fields = this.defs.fields || {}; this.defs.links = this.defs.links || {}; - - Dep.prototype.initialize.call(this); }, /** diff --git a/client/src/models/email.js b/client/src/models/email.js index 0b748060a1..e8ee6df347 100644 --- a/client/src/models/email.js +++ b/client/src/models/email.js @@ -25,10 +25,10 @@ * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('models/email', 'model', function (Dep) { + +define('models/email', 'model', function (Dep) { return Dep.extend({ }); - }); diff --git a/client/src/models/preferences.js b/client/src/models/preferences.js index debb20cee6..59577bba6c 100644 --- a/client/src/models/preferences.js +++ b/client/src/models/preferences.js @@ -25,23 +25,23 @@ * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('models/preferences', 'model', function (Dep) { + +define('models/preferences', 'model', function (Dep) { return Dep.extend({ - name: "Preferences", + name: 'Preferences', settings: null, getDashletOptions: function (id) { var value = this.get('dashletsOptions') || {}; + return value[id] || false; }, isPortal: function () { return this.get('isPortalUser'); - } - + }, }); - }); diff --git a/client/src/models/user.js b/client/src/models/user.js index 8e4ffd5ae0..4a7261677f 100644 --- a/client/src/models/user.js +++ b/client/src/models/user.js @@ -25,7 +25,8 @@ * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('models/user', 'model', function (Dep) { + +define('models/user', 'model', function (Dep) { return Dep.extend({ @@ -53,6 +54,6 @@ Espo.define('models/user', 'model', function (Dep) { isSuperAdmin: function () { return this.get('type') == 'super-admin'; - } + }, }); }); diff --git a/package-lock.json b/package-lock.json index c60173f5ba..c230dad514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "bootstrap": "^3.4.1", "bootstrap-colorpicker": "^2.5.2", "bootstrap-datepicker": "^1.9.0", - "bullbone": "github:yurikuzn/bull#1.0.7", + "bullbone": "github:yurikuzn/bull#1.0.8", "cronstrue": "^1.114.0", "cropper": "^0.7.9", "devbridge-autocomplete": "^1.4.11", @@ -843,8 +843,8 @@ } }, "node_modules/bullbone": { - "version": "1.0.7", - "resolved": "git+ssh://git@github.com/yurikuzn/bull.git#f659d48643798a5128bd3be7216fb68d88b1b745", + "version": "1.0.8", + "resolved": "git+ssh://git@github.com/yurikuzn/bull.git#33c6f5eda17b2a47abb26702be195c38b0c33e23", "license": "MIT" }, "node_modules/caniuse-lite": { @@ -4419,8 +4419,8 @@ "dev": true }, "bullbone": { - "version": "git+ssh://git@github.com/yurikuzn/bull.git#f659d48643798a5128bd3be7216fb68d88b1b745", - "from": "bullbone@github:yurikuzn/bull#1.0.7" + "version": "git+ssh://git@github.com/yurikuzn/bull.git#33c6f5eda17b2a47abb26702be195c38b0c33e23", + "from": "bullbone@github:yurikuzn/bull#1.0.8" }, "caniuse-lite": { "version": "1.0.30001309", diff --git a/package.json b/package.json index 4265f8cd83..d32d5be6bc 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "bootstrap": "^3.4.1", "bootstrap-colorpicker": "^2.5.2", "bootstrap-datepicker": "^1.9.0", - "bullbone": "github:yurikuzn/bull#1.0.7", + "bullbone": "github:yurikuzn/bull#1.0.8", "cronstrue": "^1.114.0", "cropper": "^0.7.9", "devbridge-autocomplete": "^1.4.11",