Bug 516500: Update buttons in addons panel throw an error if there are no addons previously installed [r=gavin.sharp r=mark.finkle]

This commit is contained in:
Vivien Nicolas 2009-09-21 16:10:54 -04:00
parent b9294d9df4
commit 2bc75aa178
4 changed files with 20 additions and 2 deletions

View File

@ -326,7 +326,8 @@
<richlistitem id="addons-local" class="section-header" align="center">
<label value="&addonsLocal.label;" flex="1"/>
<spacer flex="1"/>
<button class="button-dark" label="&addonsUpdate.label;" oncommand="ExtensionsView.updateAll();"/>
<button id="addons-update-all" class="button-dark" label="&addonsUpdate.label;"
oncommand="ExtensionsView.updateAll();"/>
</richlistitem>
<richlistitem id="addons-repo" class="section-header">
<label value="&addonsRepo.label;" flex="1"/>

View File

@ -296,6 +296,7 @@ var ExtensionsView = {
if (items.length == 0) {
let strings = document.getElementById("bundle_browser");
this.displaySectionMessage("local", strings.getString("addonsLocalNone.label"), null, true);
document.getElementById("addons-update-all").disabled = true;
}
for (let i = 0; i < items.length; i++) {
@ -524,7 +525,7 @@ var ExtensionsView = {
let end = this._repoItem;
while (start != end) {
if (start.getAttribute("updateable") != "false")
if (start.getAttribute("updateable") == "true")
items.push(this._extmgr.getItemForID(start.getAttribute("addonID")));
start = start.nextSibling;
}

View File

@ -359,6 +359,14 @@ toolbarbutton.page-button {
}
}
#addons-update-all {
color: #000 !important;
}
#addons-update-all[disabled="true"] {
color: #aaa !important;
}
.addon-rating[rating] {
width: 78px;
height: 18px;

View File

@ -184,6 +184,14 @@ toolbarbutton.page-button {
}
}
#addons-update-all {
color: #000 !important;
}
#addons-update-all[disabled="true"] {
color: #aaa !important;
}
/* console panel UI ------------------------------------------------------ */
@media (orientation: landscape) {
#console-filter-warnings,