Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
Bug 1500165 - Include gear on each page of about:addons r=jaws
Browse files Browse the repository at this point in the history
  • Loading branch information
mstriemer committed Nov 2, 2018
1 parent 900872c commit 044ecb2
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 85 deletions.
3 changes: 2 additions & 1 deletion toolkit/mozapps/extensions/content/extensions.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ row[unsupported="true"] {
}

.list-view-notice {
margin-inline-start: 32px;
margin-inline-start: 28px;
margin-bottom: 16px;
}

.list-view-notice > .message-bar {
Expand Down
18 changes: 10 additions & 8 deletions toolkit/mozapps/extensions/content/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,16 @@ var gViewController = {
this.currentViewObj.node.setAttribute("loading", "true");
this.currentViewObj.node.focus();

let headingName = document.getElementById("heading-name");
try {
headingName.textContent = gStrings.ext.GetStringFromName(`listHeading.${view.param}`);
setSearchLabel(view.param);
} catch (e) {
// In tests we sometimes render this view with a type we don't support, that's fine.
headingName.textContent = "";
}


if (aViewId == aPreviousView)
this.currentViewObj.refresh(view.param, ++this.currentViewRequest, aState);
else
Expand Down Expand Up @@ -2399,14 +2409,6 @@ var gListView = {
this.node.setAttribute("type", aType);
this.showEmptyNotice(false);

try {
document.getElementById("list-view-heading-name")
.textContent = gStrings.ext.GetStringFromName(`listHeading.${aType}`);
setSearchLabel(aType);
} catch (e) {
// In tests we sometimes render this view with a type we don't support, that's fine.
}

this._listBox.textContent = "";

if (aType == "plugin") {
Expand Down
118 changes: 59 additions & 59 deletions toolkit/mozapps/extensions/content/extensions.xul
Original file line number Diff line number Diff line change
Expand Up @@ -218,68 +218,68 @@
</hbox>
</hbox>

<deck id="headered-views-content" flex="1" selectedIndex="0">
<!-- list view -->
<vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
<hbox id="list-view-heading">
<hbox class="list-view-heading-inner">
<label id="list-view-heading-name" class="header-name" flex="1"/>
<hbox id="heading">
<hbox class="heading-inner" align="start">
<label id="heading-name" class="header-name" flex="1"/>

<hbox id="updates-container" align="center">
<image class="spinner"/>
<label id="updates-noneFound" hidden="true"
value="&updates.noneFound.label;"/>
<button id="updates-manualUpdatesFound-btn" class="button-link"
hidden="true" label="&updates.manualUpdatesFound.label;"
command="cmd_goToAvailableUpdates"/>
<label id="updates-progress" hidden="true"
value="&updates.updating.label;"/>
<label id="updates-installed" hidden="true"
value="&updates.installed.label;"/>
<label id="updates-downloaded" hidden="true"
value="&updates.downloaded.label;"/>
<button id="updates-restart-btn" class="button-link" hidden="true"
label="&updates.restart.label;"
command="cmd_restartApp"/>
</hbox>

<toolbarbutton id="header-utils-btn" type="menu"
data-l10n-id="tools-menu">
<menupopup id="utils-menu">
<menuitem id="utils-updateNow"
label="&updates.checkForUpdates.label;"
accesskey="&updates.checkForUpdates.accesskey;"
command="cmd_findAllUpdates"/>
<menuitem id="utils-viewUpdates"
label="&updates.viewUpdates.label;"
accesskey="&updates.viewUpdates.accesskey;"
command="cmd_goToRecentUpdates"/>
<menuseparator id="utils-installFromFile-separator"/>
<menuitem id="utils-installFromFile"
data-l10n-id="install-addon-from-file"
command="cmd_installFromFile"/>
<menuitem id="utils-debugAddons"
data-l10n-id="debug-addons"
command="cmd_debugAddons"/>
<menuseparator/>
<menuitem id="utils-autoUpdateDefault"
label="&updates.updateAddonsAutomatically.label;"
accesskey="&updates.updateAddonsAutomatically.accesskey;"
type="checkbox" autocheck="false"
command="cmd_toggleAutoUpdateDefault"/>
<menuitem id="utils-resetAddonUpdatesToAutomatic"
label="&updates.resetUpdatesToAutomatic.label;"
accesskey="&updates.resetUpdatesToAutomatic.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
<menuitem id="utils-resetAddonUpdatesToManual"
label="&updates.resetUpdatesToManual.label;"
accesskey="&updates.resetUpdatesToManual.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
</menupopup>
</toolbarbutton>
</hbox>
<hbox id="updates-container" align="center">
<image class="spinner"/>
<label id="updates-noneFound" hidden="true"
value="&updates.noneFound.label;"/>
<button id="updates-manualUpdatesFound-btn" class="button-link"
hidden="true" label="&updates.manualUpdatesFound.label;"
command="cmd_goToAvailableUpdates"/>
<label id="updates-progress" hidden="true"
value="&updates.updating.label;"/>
<label id="updates-installed" hidden="true"
value="&updates.installed.label;"/>
<label id="updates-downloaded" hidden="true"
value="&updates.downloaded.label;"/>
<button id="updates-restart-btn" class="button-link" hidden="true"
label="&updates.restart.label;"
command="cmd_restartApp"/>
</hbox>

<toolbarbutton id="header-utils-btn" type="menu"
data-l10n-id="tools-menu">
<menupopup id="utils-menu">
<menuitem id="utils-updateNow"
label="&updates.checkForUpdates.label;"
accesskey="&updates.checkForUpdates.accesskey;"
command="cmd_findAllUpdates"/>
<menuitem id="utils-viewUpdates"
label="&updates.viewUpdates.label;"
accesskey="&updates.viewUpdates.accesskey;"
command="cmd_goToRecentUpdates"/>
<menuseparator id="utils-installFromFile-separator"/>
<menuitem id="utils-installFromFile"
data-l10n-id="install-addon-from-file"
command="cmd_installFromFile"/>
<menuitem id="utils-debugAddons"
data-l10n-id="debug-addons"
command="cmd_debugAddons"/>
<menuseparator/>
<menuitem id="utils-autoUpdateDefault"
label="&updates.updateAddonsAutomatically.label;"
accesskey="&updates.updateAddonsAutomatically.accesskey;"
type="checkbox" autocheck="false"
command="cmd_toggleAutoUpdateDefault"/>
<menuitem id="utils-resetAddonUpdatesToAutomatic"
label="&updates.resetUpdatesToAutomatic.label;"
accesskey="&updates.resetUpdatesToAutomatic.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
<menuitem id="utils-resetAddonUpdatesToManual"
label="&updates.resetUpdatesToManual.label;"
accesskey="&updates.resetUpdatesToManual.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
</menupopup>
</toolbarbutton>
</hbox>
</hbox>

<deck id="headered-views-content" flex="1" selectedIndex="0">
<!-- list view -->
<vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
<!-- info UI for add-ons that have been disabled for being unsigned -->
<vbox id="disabled-unsigned-addons-info" hidden="true">
<label id="disabled-unsigned-addons-heading" data-l10n-id="disabled-unsigned-heading"/>
Expand Down
30 changes: 13 additions & 17 deletions toolkit/themes/shared/extensions/extensions.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,6 @@ button.warning {
}
}

.list-view-heading-inner {
width: 664px;
}

#header-utils-btn {
-moz-appearance: none;
border: 1px solid var(--in-content-box-border-color);
Expand All @@ -263,6 +259,7 @@ button.warning {
padding-left: 10px;
/* This button is too tall, adding margin-bottom shrinks it. */
margin-bottom: 2px;
margin-inline-end: 0;
}

#header-utils-btn:hover {
Expand All @@ -279,9 +276,13 @@ button.warning {
display: none;
}

#list-view-heading {
margin-top: 24px;
#heading {
margin-top: 26px;
margin-bottom: 16px;
}

.heading-inner {
width: 664px;
margin-inline-start: 28px;
}

Expand Down Expand Up @@ -328,11 +329,6 @@ button.warning {
background-color: transparent;
}

richlistbox.list > richlistitem.addon {
color: var(--in-content-text-color);
background-origin: border-box;
}

.icon {
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
max-width: 24px;
Expand Down Expand Up @@ -548,10 +544,7 @@ richlistbox.list > richlistitem.addon {

.list:focus > .addon[selected] {
box-shadow: var(--card-shadow-focus);
}

.list > .addon {
margin: 8px;
color: var(--in-content-text-color);
}

#addon-list .addon[active="false"] > .content-container > .content-inner-container {
Expand Down Expand Up @@ -585,7 +578,7 @@ richlistbox.list > richlistitem.addon {
/*** detail view ***/

#detail-view > .scrollbox-innerbox {
margin: 32px;
margin: 8px 28px;
}

#detail-view .loading {
Expand Down Expand Up @@ -678,14 +671,17 @@ richlistbox.list > richlistitem.addon {
}

.addon.card {
background-origin: border-box;
color: var(--in-content-text-color);
margin: 8px 4px;
max-width: 664px;
/* The .addon-control element on the end has 4px of margin, remove it
* from the padding to stay balanced. */
padding-inline-end: 12px;
}

.addon-detail.card:hover {
box-shadow: none;
box-shadow: var(--card-shadow);
}

.addon.card > .card-heading-image {
Expand Down

0 comments on commit 044ecb2

Please sign in to comment.