mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 403151 - In the bookmarks organizer preview pane change "more" from a button to a progressive disclosure control, r=mak77 ui-r=faaborg
This commit is contained in:
parent
784ceca3d8
commit
dee3706661
@ -594,14 +594,10 @@ var PlacesOrganizer = {
|
||||
*/
|
||||
var infoBox = document.getElementById("infoBox");
|
||||
var infoBoxExpander = document.getElementById("infoBoxExpander");
|
||||
#ifdef XP_WIN
|
||||
var infoBoxExpanderLabel = document.getElementById("infoBoxExpanderLabel");
|
||||
#endif
|
||||
var infoBoxExpanderWrapper = document.getElementById("infoBoxExpanderWrapper");
|
||||
|
||||
if (!aNode) {
|
||||
infoBoxExpander.hidden = true;
|
||||
#ifdef XP_WIN
|
||||
infoBoxExpanderLabel.hidden = true;
|
||||
#endif
|
||||
infoBoxExpanderWrapper.hidden = true;
|
||||
return;
|
||||
}
|
||||
if (aNode.itemId != -1 &&
|
||||
@ -611,19 +607,13 @@ var PlacesOrganizer = {
|
||||
if (infoBox.getAttribute("minimal") == "true")
|
||||
infoBox.setAttribute("wasminimal", "true");
|
||||
infoBox.removeAttribute("minimal");
|
||||
infoBoxExpander.hidden = true;
|
||||
#ifdef XP_WIN
|
||||
infoBoxExpanderLabel.hidden = true;
|
||||
#endif
|
||||
infoBoxExpanderWrapper.hidden = true;
|
||||
}
|
||||
else {
|
||||
if (infoBox.getAttribute("wasminimal") == "true")
|
||||
infoBox.setAttribute("minimal", "true");
|
||||
infoBox.removeAttribute("wasminimal");
|
||||
infoBoxExpander.hidden = false;
|
||||
#ifdef XP_WIN
|
||||
infoBoxExpanderLabel.hidden = false;
|
||||
#endif
|
||||
infoBoxExpanderWrapper.hidden = false;
|
||||
}
|
||||
},
|
||||
|
||||
@ -766,30 +756,19 @@ var PlacesOrganizer = {
|
||||
toggleAdditionalInfoFields: function PO_toggleAdditionalInfoFields() {
|
||||
var infoBox = document.getElementById("infoBox");
|
||||
var infoBoxExpander = document.getElementById("infoBoxExpander");
|
||||
#ifdef XP_WIN
|
||||
var infoBoxExpanderLabel = document.getElementById("infoBoxExpanderLabel");
|
||||
#endif
|
||||
|
||||
if (infoBox.getAttribute("minimal") == "true") {
|
||||
infoBox.removeAttribute("minimal");
|
||||
#ifdef XP_WIN
|
||||
infoBoxExpanderLabel.value = infoBoxExpanderLabel.getAttribute("lesslabel");
|
||||
infoBoxExpanderLabel.setAttribute("accesskey", infoBoxExpanderLabel.getAttribute("lessaccesskey"));
|
||||
infoBoxExpander.className = "expander-up";
|
||||
#else
|
||||
infoBoxExpander.label = infoBoxExpander.getAttribute("lesslabel");
|
||||
infoBoxExpander.accessKey = infoBoxExpander.getAttribute("lessaccesskey");
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
infoBox.setAttribute("minimal", "true");
|
||||
#ifdef XP_WIN
|
||||
infoBoxExpanderLabel.value = infoBoxExpanderLabel.getAttribute("morelabel");
|
||||
infoBoxExpanderLabel.setAttribute("accesskey", infoBoxExpanderLabel.getAttribute("moreaccesskey"));
|
||||
infoBoxExpander.className = "expander-down";
|
||||
#else
|
||||
infoBoxExpander.label = infoBoxExpander.getAttribute("morelabel");
|
||||
infoBoxExpander.accessKey = infoBoxExpander.getAttribute("moreaccesskey");
|
||||
#endif
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -508,12 +508,16 @@
|
||||
<vbox id="infoBox" minimal="true">
|
||||
<vbox id="editBookmarkPanelContent"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox>
|
||||
#ifdef XP_WIN
|
||||
<hbox id="infoBoxExpanderWrapper" align="center">
|
||||
|
||||
<button type="image" id="infoBoxExpander"
|
||||
class="expander-down"
|
||||
lessaccesskey="&detailsPane.less.accesskey;"
|
||||
moreaccesskey="&detailsPane.more.accesskey;"
|
||||
accesskey="&detailsPane.more.accesskey;"
|
||||
oncommand="PlacesOrganizer.toggleAdditionalInfoFields();"
|
||||
observes="paneElementsBroadcaster"/>
|
||||
|
||||
<label id="infoBoxExpanderLabel"
|
||||
lesslabel="&detailsPane.less.label;"
|
||||
lessaccesskey="&detailsPane.less.accesskey;"
|
||||
@ -522,17 +526,7 @@
|
||||
value="&detailsPane.more.label;"
|
||||
accesskey="&detailsPane.more.accesskey;"
|
||||
control="infoBoxExpander"/>
|
||||
#else
|
||||
<button type="image" id="infoBoxExpander"
|
||||
lesslabel="&detailsPane.less.label;"
|
||||
lessaccesskey="&detailsPane.less.accesskey;"
|
||||
morelabel="&detailsPane.more.label;"
|
||||
moreaccesskey="&detailsPane.more.accesskey;"
|
||||
label="&detailsPane.more.label;"
|
||||
accesskey="&detailsPane.more.accesskey;"
|
||||
oncommand="PlacesOrganizer.toggleAdditionalInfoFields();"
|
||||
observes="paneElementsBroadcaster"/>
|
||||
#endif
|
||||
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
@ -182,13 +182,12 @@
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/**** expanders ****/
|
||||
.expander-up,
|
||||
.expander-down {
|
||||
min-width: 0;
|
||||
}
|
||||
%endif
|
||||
|
||||
#infoBoxExpanderLabel {
|
||||
-moz-padding-start: 2px;
|
||||
}
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
@ -614,6 +614,10 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
#infoBoxExpanderLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#infoBox[minimal="true"] #infoBoxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
|
||||
}
|
||||
|
@ -218,29 +218,7 @@
|
||||
}
|
||||
%endif
|
||||
|
||||
/**** expanders ****/
|
||||
|
||||
.expander-up,
|
||||
.expander-down {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.expander-up > hbox,
|
||||
.expander-down > hbox {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.expander-up {
|
||||
list-style-image: url("chrome://global/skin/icons/collapse.png");
|
||||
}
|
||||
|
||||
.expander-down {
|
||||
list-style-image: url("chrome://global/skin/icons/expand.png");
|
||||
}
|
||||
|
||||
#infoBoxExpanderLabel {
|
||||
margin: 0;
|
||||
padding: 5px 0;
|
||||
-moz-padding-start: 2px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user