/* Product Name: dhtmlxSuite Version: 4.0.3 Edition: Professional License: content of this file is covered by DHTMLX Commercial or Enterprise license. Usage without proper license is prohibited. To obtain it contact sales@dhtmlx.com Copyright UAB Dinamenta http://www.dhtmlx.com */ function dhtmlXCellObject(idd, css) { this.cell = document.createElement("DIV"); this.cell.className = "dhx_cell"+(css||""); this._idd = idd; this._isCell = true; this.conf = { borders: true, idx: {}, css: css||"", idx_data: { cont: "dhx_cell_cont", pr1: "dhx_cell_progress_bar", pr2: "dhx_cell_progress_img", menu: "dhx_cell_menu", toolbar: "dhx_cell_toolbar", ribbon: "dhx_cell_ribbon", sb: "dhx_cell_statusbar" }, ofs_nodes: { t:{}, b:{} } // attached dataNodes (menu/toolbar/status), can be true, false; // in case of layout - "func" for header } this.dataNodes = {}; // menu/toolbar/status this.views = {}; // cont var p = document.createElement("DIV"); p.className = "dhx_cell_cont"+this.conf.css; this.cell.appendChild(p); p = null; this._updateIdx = function() { for (var a in this.conf.idx) { this.conf.idx[a] = null; delete this.conf.idx[a]; } for (var q=0; q 0) { this.views[name].cellCont.push(cellCont.firstChild); cellCont.removeChild(cellCont.firstChild); } this.dataType = null; this.dataObj = null; // menu/toolbar/status for (var a in this.dataNodes) { for (var b in this.conf.ofs_nodes) { if (typeof(this.conf.ofs_nodes[b][a]) != "undefined") { this.views[name].ofs_nodes[b][a] = this.conf.ofs_nodes[b][a]; this.conf.ofs_nodes[b][a] = null; delete this.conf.ofs_nodes[b][a]; } } this.views[name].dataNodesCont[a] = this.cell.childNodes[this.conf.idx[a]]; this.cell.removeChild(this.cell.childNodes[this.conf.idx[a]]); this.views[name].dataNodes[a] = this.dataNodes[a]; this.dataNodes[a] = null; delete this.dataNodes[a]; this._updateIdx(); } this.callEvent("_onViewSave", [name]); } this._viewRestore = function(name) { if (this.views[name] == null) return; // content this.dataObj = this.views[name].dataObj; this.dataType = this.views[name].dataType; for (var q=0; q