some simplifications on how we hide the unrequested buttons

This commit is contained in:
chanial%noos.fr 2003-11-15 07:31:01 +00:00
Родитель 27f406b51d
Коммит 1f627bcb07
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -129,7 +129,7 @@
<constructor>
<![CDATA[
this._configureButtons(this.getAttribute("buttons"));
this._configureButtons(this.buttons);
// listen for when window is closed via native close buttons
window.addEventListener("close", this._closeHandler, false);
@ -228,12 +228,8 @@
shown[list[i].replace(/ /g, "")] = true;
// hide/show the buttons we want
for (dlgtype in shown) {
if (shown[dlgtype])
buttons[dlgtype].hidden = false;
else
buttons[dlgtype].hidden = true;
}
for (dlgtype in buttons)
buttons[dlgtype].hidden = !shown[dlgtype];
}
]]>
</body>