Commit a074f93d authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил свойство видимости в PopUpSelector

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55364 954022d7-b5bf-4e40-9824-e11837661b57
parent 13bc0db1
......@@ -17,6 +17,8 @@
this.selectorStyle = null;
this.selectorList = null;
this.isVisible = false;
this._init();
return this;
}
......@@ -34,7 +36,10 @@
PopUpSelector.prototype.show = function (isFormula, arrItems, cellRect) {
this._clearList();
this.setPosition(cellRect);
this.selectorStyle.display = "block";
if (!this.isVisible) {
this.selectorStyle.display = "block";
this.isVisible = true;
}
var item;
for (var i = 0; i < arrItems.length; ++i) {
......@@ -82,13 +87,19 @@
// TODO: В Mozilla избавиться от селекта текста при dblclick
};
PopUpSelector.prototype.hide = function () {
this.selectorStyle.display = "none";
if (this.isVisible) {
this.selectorStyle.display = "none";
this.isVisible = false;
}
this._clearList();
};
PopUpSelector.prototype.setPosition = function (cellRect) {
this.selectorStyle["left"] = (cellRect.asc_getX() + 10) + "px";
this.selectorStyle["top"] = (cellRect.asc_getY() + cellRect.asc_getHeight()) + "px";
};
PopUpSelector.prototype.getVisible = function () {
return this.isVisible;
};
PopUpSelector.prototype._clearList = function () {
this.selectorList.innerHTML = "";
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment