Server IP : 85.193.89.191 / Your IP : 18.221.107.62 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bitrix/www/bitrix/js/scale/ |
Upload File : |
/** * Class BX.Scale.Collection * Prototype for collections class */ ;(function(window) { if (BX.Scale.Collection) return; /** * Class BX.Scale.Collection{paramsList} * @constructor */ BX.Scale.Collection = function (objClass, paramsList) { this.objectClass = objClass; this.objectsList = {}; if(paramsList) for(var objectId in paramsList) this.addObject(objectId, paramsList[objectId]); }; BX.Scale.Collection.prototype.addObject = function(objectId, objectParams) { this.objectsList[objectId] = new this.objectClass(objectId, objectParams); return this.objectsList[objectId]; }; BX.Scale.Collection.prototype.getObject = function(objectId) { var result = false; if(this.objectsList[objectId] !== undefined) result = this.objectsList[objectId]; return result; }; BX.Scale.Collection.prototype.deleteObject = function(objectId) { delete this.objectsList[objectId]; }; BX.Scale.Collection.prototype.getObjectsIds = function() { var result = []; for(var objectId in this.objectsList) result.push(objectId); return result; }; BX.Scale.Collection.prototype.getObjectsList = function() { var result = {}; for(var objectId in this.objectsList) result[objectId] = this.objectsList[objectId]; return result; }; })(window);