Bug 640216 - Hide navigation arrows of the form assistant if there is previous/next are both disabled [r=mfinkle,a=approval2.0+]

This commit is contained in:
Vivien Nicolas 2011-03-09 20:58:07 +01:00
Родитель 99bbbe478f
Коммит 72f172ccfa
2 изменённых файлов: 11 добавлений и 3 удалений

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

@ -636,6 +636,13 @@ var FormHelperUI = {
// Update the next/previous commands
this._cmdPrevious.setAttribute("disabled", !aHasPrevious);
this._cmdNext.setAttribute("disabled", !aHasNext);
// If both next and previous are disabled don't bother showing arrows
if (!aHasNext && !aHasPrevious)
this._container.setAttribute("disabled", "true");
else
this._container.removeAttribute("disabled");
this._hasSuggestions = false;
this._open = true;
@ -841,6 +848,8 @@ var FormHelperUI = {
this._currentElement = null;
this._container.hide(this);
this._container.removeAttribute("disabled");
// Since the style is overrided when a popup is shown, it needs to be
// resetted here to let the default CSS works
this._container.style.display = "";

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

@ -47,7 +47,7 @@
}
#content-navigator[type="find"],
#content-navigator[type="form"] {
#content-navigator[type="form"]:not([disabled="true"]) {
display: -moz-box;
}
@ -220,14 +220,13 @@
.options-title {
padding: @padding_xxnormal@ @padding_small@ @padding_small@ @padding_small@;
font-size: @font_small@;
text-align: center;
}
.options-title[value=""] {
display: none;
}
.option-command > image {
.option-command image {
width: 30px;
height: 30px;
margin: @margin_tiny@;