Remove tags support from code.

This commit is contained in:
RainLoop Team 2014-10-03 23:09:13 +04:00
parent 0a95b79eb2
commit 36bdce3084
15 changed files with 11 additions and 640 deletions

View file

@ -20,7 +20,6 @@
this.idContact = 0;
this.display = '';
this.properties = [];
this.tags = '';
this.readOnly = false;
this.focused = ko.observable(false);
@ -71,7 +70,6 @@
this.idContact = Utils.pInt(oItem['IdContact']);
this.display = Utils.pString(oItem['Display']);
this.readOnly = !!oItem['ReadOnly'];
this.tags = '';
if (Utils.isNonEmptyArray(oItem['Properties']))
{
@ -83,11 +81,6 @@
}, this);
}
if (Utils.isNonEmptyArray(oItem['Tags']))
{
this.tags = oItem['Tags'].join(',');
}
bResult = true;
}

View file

@ -1,58 +0,0 @@
(function () {
'use strict';
var
ko = require('ko'),
Utils = require('Common/Utils')
;
/**
* @constructor
*/
function ContactTagModel()
{
this.idContactTag = 0;
this.name = ko.observable('');
this.readOnly = false;
}
ContactTagModel.prototype.parse = function (oItem)
{
var bResult = false;
if (oItem && 'Object/Tag' === oItem['@Object'])
{
this.idContact = Utils.pInt(oItem['IdContactTag']);
this.name(Utils.pString(oItem['Name']));
this.readOnly = !!oItem['ReadOnly'];
bResult = true;
}
return bResult;
};
/**
* @param {string} sSearch
* @return {boolean}
*/
ContactTagModel.prototype.filterHelper = function (sSearch)
{
return this.name().toLowerCase().indexOf(sSearch.toLowerCase()) !== -1;
};
/**
* @param {boolean=} bEncodeHtml = false
* @return {string}
*/
ContactTagModel.prototype.toLine = function (bEncodeHtml)
{
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name();
};
module.exports = ContactTagModel;
}());

View file

@ -335,14 +335,6 @@
return true;
};
/**
* @return {string}
*/
EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
module.exports = EmailModel;
}());