Bug 1226238 - (Part 2) Remove reader view footer. r=Gijs

MozReview-Commit-ID: B474joTtVwa
This commit is contained in:
Margaret Leibovic 2016-02-22 10:16:24 -05:00
parent 83855b42fb
commit 7c39667fa9
5 changed files with 1 additions and 54 deletions

View File

@ -241,8 +241,7 @@
/* desktop-only controls */
.close-button,
.list-button,
.footer {
.list-button {
display: none;
}

View File

@ -76,9 +76,6 @@ var AboutReader = function(mm, win, articlePromise) {
if (Services.prefs.getBoolPref("browser.readinglist.enabled")) {
this._setupButton("toggle-button", this._onReaderToggle.bind(this, "button"), "aboutReader.toolbar.addToReadingList");
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
this._setupButton("remove-button", this._onReaderToggle.bind(this, "footer"),
"aboutReader.footer.deleteThisArticle", "aboutReader.footer.deleteThisArticle");
this._doc.getElementById("reader-footer").setAttribute('readinglist-enabled', "true");
}
} catch (e) {
// Pref doesn't exist.
@ -314,7 +311,6 @@ AboutReader.prototype = {
button.classList.remove("on");
button.setAttribute("title", gStrings.GetStringFromName("aboutReader.toolbar.addToReadingList"));
}
this._updateFooter();
},
_requestReadingListStatus: function() {
@ -482,16 +478,6 @@ AboutReader.prototype = {
}, true);
},
_updateFooter: function() {
let footer = this._doc.getElementById("reader-footer");
if (!this._article || this._isReadingListItem == 0 ||
footer.getAttribute("readinglist-enabled") != "true") {
footer.style.display = "none";
return;
}
footer.style.display = null;
},
_handleDeviceLight: function(newLux) {
// Desired size of the this._luxValues array.
let luxValuesSize = 10;
@ -630,7 +616,6 @@ AboutReader.prototype = {
if (!visible) {
this._mm.sendAsyncMessage("Reader:ToolbarHidden");
}
this._updateFooter();
},
_toggleToolbarVisibility: function() {

View File

@ -35,13 +35,6 @@
</style>
<div id="reader-message"></div>
</div>
<div id="reader-footer" class="footer">
<style scoped>
@import url("chrome://global/skin/aboutReaderControls.css");
</style>
<button id="remove-button" class="button remove-button"/>
</div>
</div>
<ul id="reader-toolbar" class="toolbar">

View File

@ -28,8 +28,6 @@ aboutReader.toolbar.removeFromReadingList=Remove from Reading List
aboutReader.toolbar.openReadingList=Open Reading List
aboutReader.toolbar.closeReadingList=Close Reading List
aboutReader.footer.deleteThisArticle=Delete this article
# These are used for the Reader View toolbar button and the menuitem within the
# View menu.
readerView.enter=Enter Reader View

View File

@ -300,31 +300,6 @@
background-position: center;
}
.footer {
height: 64px;
background-color: #ebebeb;
position: absolute;
left: 0;
width: 100%;
text-align: center;
padding: 12px 0;
box-sizing: border-box;
box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.35) inset;
}
.remove-button {
background-image: url("chrome://global/skin/reader/RM-Delete-24x24.svg");
margin: 0 auto;
border: 1px solid #c1c1c1;
background-position: 10px 7px;
padding-left: 42px;
padding-right: 10px;
border-radius: 2px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
font-size: 18px;
}
/*======= Toolbar icons =======*/
.close-button {
@ -378,7 +353,4 @@
.toolbar {
display: none !important;
}
.footer {
display: none !important;
}
}