зеркало из https://github.com/mozilla/pjs.git
Backing out bug 597178 due to a change of plans. a=backout
This commit is contained in:
Родитель
2e496752c0
Коммит
23afe41928
|
@ -531,6 +531,28 @@ var gViewController = {
|
|||
},
|
||||
|
||||
commands: {
|
||||
cmd_back: {
|
||||
isEnabled: function() {
|
||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.canGoBack;
|
||||
},
|
||||
doCommand: function() {
|
||||
window.history.back();
|
||||
}
|
||||
},
|
||||
|
||||
cmd_forward: {
|
||||
isEnabled: function() {
|
||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.canGoForward;
|
||||
},
|
||||
doCommand: function() {
|
||||
window.history.forward();
|
||||
}
|
||||
},
|
||||
|
||||
cmd_restartApp: {
|
||||
isEnabled: function() true,
|
||||
doCommand: function() {
|
||||
|
|
|
@ -114,6 +114,8 @@
|
|||
<command id="cmd_goToRecentUpdates"/>
|
||||
<command id="cmd_goToAvailableUpdates"/>
|
||||
<command id="cmd_installFromFile"/>
|
||||
<command id="cmd_back"/>
|
||||
<command id="cmd_forward"/>
|
||||
<command id="cmd_enableCheckCompatibility"/>
|
||||
<command id="cmd_enableUpdateSecurity"/>
|
||||
<command id="cmd_toggleAutoUpdateDefault"/>
|
||||
|
@ -139,7 +141,12 @@
|
|||
</commandset>
|
||||
|
||||
<!-- main header -->
|
||||
<hbox id="header" align="center" pack="end">
|
||||
<hbox id="header" align="center">
|
||||
<button id="back-btn" class="nav-button" command="cmd_back"
|
||||
tooltiptext="&cmd.back.tooltip;"/>
|
||||
<button id="forward-btn" class="nav-button" command="cmd_forward"
|
||||
tooltiptext="&cmd.forward.tooltip;"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox id="updates-container" align="center">
|
||||
<image class="spinner"/>
|
||||
<label id="updates-noneFound" hidden="true"
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
*/
|
||||
|
||||
function test() {
|
||||
// XXX
|
||||
ok(true, "Test temporarily disabled due to timeouts\n");
|
||||
return;
|
||||
|
||||
if (!gUseInContentUI)
|
||||
return;
|
||||
|
||||
requestLongerTimeout(2);
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
var gProvider = new MockProvider();
|
||||
|
@ -46,7 +48,9 @@ function is_in_list(aManager, view, canGoBack, canGoForward) {
|
|||
is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
|
||||
is(doc.getElementById("view-port").selectedPanel.id, "list-view", "Should be on the right view");
|
||||
is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
|
||||
is(!doc.getElementById("back-btn").disabled, canGoBack, "Back button should have the right state");
|
||||
is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
|
||||
is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
|
||||
}
|
||||
|
||||
function is_in_search(aManager, query, canGoBack, canGoForward) {
|
||||
|
@ -56,7 +60,9 @@ function is_in_search(aManager, query, canGoBack, canGoForward) {
|
|||
is(doc.getElementById("view-port").selectedPanel.id, "search-view", "Should be on the right view");
|
||||
is(doc.getElementById("header-search").value, query, "Should have used the right query");
|
||||
is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
|
||||
is(!doc.getElementById("back-btn").disabled, canGoBack, "Back button should have the right state");
|
||||
is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
|
||||
is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
|
||||
}
|
||||
|
||||
function is_in_detail(aManager, view, canGoBack, canGoForward) {
|
||||
|
@ -65,7 +71,9 @@ function is_in_detail(aManager, view, canGoBack, canGoForward) {
|
|||
is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
|
||||
is(doc.getElementById("view-port").selectedPanel.id, "detail-view", "Should be on the right view");
|
||||
is(gBrowser.canGoBack, canGoBack, "canGoBack should be correct");
|
||||
is(!doc.getElementById("back-btn").disabled, canGoBack, "Back button should have the right state");
|
||||
is(gBrowser.canGoForward, canGoForward, "canGoForward should be correct");
|
||||
is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
|
||||
}
|
||||
|
||||
// Tests simple forward and back navigation and that the right heading and
|
||||
|
@ -409,7 +417,7 @@ add_test(function() {
|
|||
|
||||
gBrowser.reload();
|
||||
gBrowser.addEventListener("pageshow", function(event) {
|
||||
if (event.target.location != "about:addons")
|
||||
if (event.target.location != "about:addons")
|
||||
return;
|
||||
gBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
|
||||
|
@ -445,7 +453,7 @@ add_test(function() {
|
|||
|
||||
gBrowser.reload();
|
||||
gBrowser.addEventListener("pageshow", function(event) {
|
||||
if (event.target.location != "about:addons")
|
||||
if (event.target.location != "about:addons")
|
||||
return;
|
||||
gBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ add_test(function() {
|
|||
var version = gManagerWindow.document.getElementById("detail-version").value;
|
||||
is(version, item.mAddon.version, "Version in detail view should be correct");
|
||||
|
||||
EventUtils.synthesizeMouse(gManagerWindow.document.getElementById("category-search"),
|
||||
EventUtils.synthesizeMouse(gManagerWindow.document.getElementById("back-btn"),
|
||||
2, 2, { }, gManagerWindow);
|
||||
wait_for_view_load(gManagerWindow, run_next_double_click_test);
|
||||
});
|
||||
|
|
|
@ -46,6 +46,43 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
-moz-appearance: toolbarbutton;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(ltr) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar");
|
||||
}
|
||||
|
||||
#forward-btn:-moz-locale-dir(ltr) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar");
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar");
|
||||
}
|
||||
|
||||
#forward-btn:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar");
|
||||
}
|
||||
|
||||
#back-btn[disabled="true"]:-moz-locale-dir(ltr) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#forward-btn[disabled="true"]:-moz-locale-dir(ltr) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#back-btn[disabled="true"]:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#forward-btn[disabled="true"]:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
/*** global warnings ***/
|
||||
|
||||
.global-warning {
|
||||
|
|
|
@ -49,6 +49,53 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
-moz-appearance: none;
|
||||
min-width: 0;
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
text-shadow: @loweredShadow@;
|
||||
border: 1px solid @toolbarbuttonBorderColor@;
|
||||
box-shadow: @loweredShadow@;
|
||||
background: @toolbarbuttonBackground@;
|
||||
background-origin: border-box;
|
||||
list-style-image: url(chrome://mozapps/skin/extensions/navigation.png);
|
||||
}
|
||||
|
||||
.nav-button .button-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-button[disabled="true"] .button-icon {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(ltr),
|
||||
#forward-btn:-moz-locale-dir(rtl) {
|
||||
border-top-left-radius: @toolbarbuttonCornerRadius@;
|
||||
border-bottom-left-radius: @toolbarbuttonCornerRadius@;
|
||||
border-right: none;
|
||||
-moz-image-region: rect(0, 20px, 20px, 0);
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(rtl),
|
||||
#forward-btn:-moz-locale-dir(ltr) {
|
||||
border-top-right-radius: @toolbarbuttonCornerRadius@;
|
||||
border-bottom-right-radius: @toolbarbuttonCornerRadius@;
|
||||
-moz-image-region: rect(0, 40px, 20px, 20px);
|
||||
}
|
||||
|
||||
.nav-button:hover:active:not([disabled="true"]) {
|
||||
background: @toolbarbuttonPressedBackgroundColor@;
|
||||
text-shadow: @loweredShadow@;
|
||||
box-shadow: @toolbarbuttonPressedInnerShadow@, @loweredShadow@;
|
||||
}
|
||||
|
||||
.nav-button:-moz-window-inactive {
|
||||
border-color: @toolbarbuttonInactiveBorderColor@;
|
||||
background-image: @toolbarbuttonInactiveBackgroundImage@;
|
||||
}
|
||||
|
||||
/*** global warnings ***/
|
||||
|
||||
.global-warning {
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 586 B |
|
@ -27,6 +27,7 @@ toolkit.jar:
|
|||
skin/classic/mozapps/extensions/pause.png (extensions/pause.png)
|
||||
skin/classic/mozapps/extensions/utilities.png (extensions/utilities.png)
|
||||
skin/classic/mozapps/extensions/heart.png (extensions/heart.png)
|
||||
skin/classic/mozapps/extensions/navigation.png (extensions/navigation.png)
|
||||
skin/classic/mozapps/extensions/warning-stripes.png (extensions/warning-stripes.png)
|
||||
skin/classic/mozapps/extensions/about.css (extensions/about.css)
|
||||
* skin/classic/mozapps/extensions/extensions.css (extensions/extensions.css)
|
||||
|
|
|
@ -47,6 +47,26 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
list-style-image: url(chrome://mozapps/skin/extensions/navigation.png);
|
||||
min-width: 0;
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
.nav-button[disabled="true"] .button-icon {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(ltr),
|
||||
#forward-btn:-moz-locale-dir(rtl) {
|
||||
-moz-image-region: rect(0, 18px, 18px, 0);
|
||||
}
|
||||
|
||||
#back-btn:-moz-locale-dir(rtl),
|
||||
#forward-btn:-moz-locale-dir(ltr) {
|
||||
-moz-image-region: rect(0, 36px, 18px, 18px);
|
||||
}
|
||||
|
||||
/*** global warnings ***/
|
||||
|
||||
.global-warning {
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -33,6 +33,7 @@ toolkit.jar:
|
|||
skin/classic/mozapps/extensions/pause.png (extensions/pause.png)
|
||||
skin/classic/mozapps/extensions/utilities.png (extensions/utilities.png)
|
||||
skin/classic/mozapps/extensions/heart.png (extensions/heart.png)
|
||||
skin/classic/mozapps/extensions/navigation.png (extensions/navigation.png)
|
||||
skin/classic/mozapps/extensions/warning-stripes.png (extensions/warning-stripes.png)
|
||||
skin/classic/mozapps/extensions/eula.css (extensions/eula.css)
|
||||
skin/classic/mozapps/handling/handling.css (handling/handling.css)
|
||||
|
@ -100,6 +101,7 @@ toolkit.jar:
|
|||
skin/classic/aero/mozapps/extensions/pause.png (extensions/pause.png)
|
||||
skin/classic/aero/mozapps/extensions/utilities.png (extensions/utilities.png)
|
||||
skin/classic/aero/mozapps/extensions/heart.png (extensions/heart.png)
|
||||
skin/classic/aero/mozapps/extensions/navigation.png (extensions/navigation.png)
|
||||
skin/classic/aero/mozapps/extensions/warning-stripes.png (extensions/warning-stripes.png)
|
||||
skin/classic/aero/mozapps/extensions/eula.css (extensions/eula.css)
|
||||
skin/classic/aero/mozapps/handling/handling.css (handling/handling.css)
|
||||
|
|
Загрузка…
Ссылка в новой задаче