diff --git a/tests/TestModel.js b/tests/TestModel.js index 1c46f89..f92d55f 100644 --- a/tests/TestModel.js +++ b/tests/TestModel.js @@ -118,7 +118,6 @@ function testModel() dm1.id === null && dm1.id_key === "" && dm1.name_key === "" && - dm1.types === null && dm1.mode === gDBMode && dm1.db_search === false && dm1.db_search_term === "" && diff --git a/view/anyModel.js b/view/anyModel.js index 883195b..86cdbff 100644 --- a/view/anyModel.js +++ b/view/anyModel.js @@ -56,8 +56,6 @@ * Default: "[type]_id" if type is set, "" otherwise. * @param {String} options.name_key The model's base name key, e.g. "user_name". * Default: "[type]_name" if type is set, "" otherwise. - * @param {Object} options.types The types the model might interact (link) with, e.g - * ["event","document"]. * Default: null. * @param {String} options.mode Indicates whether db* operations should be performed by * a locally defined method ("local") or call a database @@ -163,14 +161,6 @@ var anyModel = function (options) */ this.name_key = this.name_key ? this.name_key : this.type ? this.type+"_name" : ""; - /** - * The model's types. - * - * @type {Array} - * @default null - */ - this.types = null; - /** * The model's mode, e.g. `"local"` or `remote"`. * @@ -363,7 +353,6 @@ anyModel.prototype._dataInitDefault = function () { this.data = null; this.id = null; - this.types = null; this.mode = typeof gMode !== 'undefined' ? gMode : "local"; this.db_connection = null; this.table_factory = null; @@ -401,7 +390,6 @@ anyModel.prototype._dataInitDefault = function () * @param {String} options.id Item id, if the top level data represents an item, e.g. "42". Optional. * @param {String} options.id_key Id key, e.g. "user_id". Optional. Default: "[type]_id". * @param {String} options.name_key Name key, e.g. "user_name". Optional. Default: "[type]_name". - * @param {Object} options.types The types the model might interact (link) with. Optional. * @param {String} options.mode "local" or "remote". Optional. * @param {Object} options.db_connection The database connection. Only valid in `"local"` mode. Optional. * @param {Object} options.table_factory The table factory class. Only valid in `"local"` mode. Optional. @@ -451,7 +439,6 @@ anyModel.prototype.dataInit = function (options) if (options.name_key) { this.name_key = options.name_key; } else if (!this.name_key && this.type) { this.name_key = this.type+"_name"; } - if (options.types) { this.types = options.types; } if (options.mode) { this.mode = options.mode; } if (options.db_connection) { this.db_connection = options.db_connection; } if (options.table_factory) { this.table_factory = options.table_factory; } diff --git a/view/anyView.js b/view/anyView.js index 1c2aca7..3890188 100644 --- a/view/anyView.js +++ b/view/anyView.js @@ -1933,7 +1933,6 @@ $.any.anyView.prototype.initTableDataCell = function (td_id,type,kind,data,id,id edit: edit, filter: filter, filter_id: filter_id, - types: this.model.types, options: this.options, }; // Bind a method that is called while clicking on the text link, file view or file name (in non-edit mode) @@ -2393,7 +2392,7 @@ $.any.anyView.prototype.refreshAddLinkButton = function (opt) { if (!opt || !this.options) return null; - if (!this.model.types || !this.options.linkIcons) + if (!this.options.linkIcons) return; let parent = opt.parent; @@ -2623,7 +2622,6 @@ $.any.anyView.prototype.getCreateModelOptions = function(data,id,type) db_fields: this.model.db_fields, db_last_term: this.model.db_last_term, permission: this.model.permission, - types: this.model.types, }; }; // getCreateModelOptions diff --git a/view/anyvista.js b/view/anyvista.js index a2366ec..4650100 100644 --- a/view/anyvista.js +++ b/view/anyvista.js @@ -1034,7 +1034,6 @@ serverdata = serverdata.JSON_CODE; var model = new taskModel({ data: serverdata ? serverdata.data : null, permission: serverdata ? serverdata.permission : null, - types: serverdata ? serverdata.types : null, mode: "remote", }); var data_id = "";