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
Родитель 54c5964c6a
Коммит 659cd25964
4 изменённых файлов: 20 добавлений и 2 удалений

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

@ -326,7 +326,8 @@
<richlistitem id="addons-local" class="section-header" align="center"> <richlistitem id="addons-local" class="section-header" align="center">
<label value="&addonsLocal.label;" flex="1"/> <label value="&addonsLocal.label;" flex="1"/>
<spacer 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>
<richlistitem id="addons-repo" class="section-header"> <richlistitem id="addons-repo" class="section-header">
<label value="&addonsRepo.label;" flex="1"/> <label value="&addonsRepo.label;" flex="1"/>

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

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

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

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

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

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