mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-16 03:34:06 +00:00
Bug 228285: make the bookmarks tree more discoverable, by adding a tooltip to the expander.
This commit is contained in:
parent
9e3e934be6
commit
4d0d06496a
@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
var gSelectedFolder;
|
var gSelectedFolder;
|
||||||
var gName;
|
var gName;
|
||||||
|
var gExpander;
|
||||||
var gMenulist;
|
var gMenulist;
|
||||||
var gBookmarksTree;
|
var gBookmarksTree;
|
||||||
var gGroup;
|
var gGroup;
|
||||||
@ -84,6 +85,7 @@ function Startup()
|
|||||||
initBMService();
|
initBMService();
|
||||||
gName = document.getElementById("name");
|
gName = document.getElementById("name");
|
||||||
gGroup = document.getElementById("addgroup");
|
gGroup = document.getElementById("addgroup");
|
||||||
|
gExpander = document.getElementById("expander");
|
||||||
gMenulist = document.getElementById("select-menu");
|
gMenulist = document.getElementById("select-menu");
|
||||||
gBookmarksTree = document.getElementById("folder-tree");
|
gBookmarksTree = document.getElementById("folder-tree");
|
||||||
gName.value = window.arguments[0];
|
gName.value = window.arguments[0];
|
||||||
@ -91,6 +93,9 @@ function Startup()
|
|||||||
gName.focus();
|
gName.focus();
|
||||||
onFieldInput();
|
onFieldInput();
|
||||||
gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id);
|
gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id);
|
||||||
|
gExpander.setAttribute("tooltiptext", gExpander.getAttribute("tooltiptextdown"));
|
||||||
|
dump('down: '+gExpander.getAttribute("tooltiptextdown")+"\n");
|
||||||
|
dump('up: '+gExpander.getAttribute("tooltiptextup")+"\n");
|
||||||
|
|
||||||
// fix no more persisted class attribute in old profiles
|
// fix no more persisted class attribute in old profiles
|
||||||
var localStore = RDF.GetDataSource("rdf:local-store");
|
var localStore = RDF.GetDataSource("rdf:local-store");
|
||||||
@ -103,7 +108,7 @@ function Startup()
|
|||||||
if (rOldValue) {
|
if (rOldValue) {
|
||||||
localStore.Unassert(rElement, rAttribute, rOldValue, true);
|
localStore.Unassert(rElement, rAttribute, rOldValue, true);
|
||||||
localStore.Unassert(rDialog, rPersist, rElement, true);
|
localStore.Unassert(rDialog, rPersist, rElement, true);
|
||||||
document.getElementById("expander").setAttribute("class", "down");
|
gExpander.setAttribute("class", "down");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +210,8 @@ function expandTree()
|
|||||||
{
|
{
|
||||||
setFolderTreeHeight();
|
setFolderTreeHeight();
|
||||||
var willCollapse = !gBookmarksTree.collapsed;
|
var willCollapse = !gBookmarksTree.collapsed;
|
||||||
document.getElementById("expander").setAttribute("class",willCollapse?"down":"up");
|
gExpander.setAttribute("class",willCollapse?"down":"up");
|
||||||
|
gExpander.setAttribute("tooltiptext", gExpander.getAttribute("tooltiptext"+(willCollapse?"down":"up")));
|
||||||
if (willCollapse)
|
if (willCollapse)
|
||||||
document.documentElement.buttons = "accept,cancel";
|
document.documentElement.buttons = "accept,cancel";
|
||||||
else {
|
else {
|
||||||
|
@ -59,7 +59,9 @@
|
|||||||
<row align="center">
|
<row align="center">
|
||||||
<label value="&name.label;" accesskey="&name.accesskey;" control="name"/>
|
<label value="&name.label;" accesskey="&name.accesskey;" control="name"/>
|
||||||
<textbox id="name" oninput="onFieldInput();"/>
|
<textbox id="name" oninput="onFieldInput();"/>
|
||||||
<button id="expander" class="down" oncommand="expandTree();"/>
|
<button id="expander" class="down" oncommand="expandTree();"
|
||||||
|
tooltiptextdown="&expanderdown.tooltip;"
|
||||||
|
tooltiptextup="&expanderup.tooltip;"/>
|
||||||
</row>
|
</row>
|
||||||
<row align="center">
|
<row align="center">
|
||||||
<label id="createinlabel" value="&createin.label;"/>
|
<label id="createinlabel" value="&createin.label;"/>
|
||||||
|
@ -18,9 +18,10 @@
|
|||||||
<!ENTITY button.defaultfolder.accesskey "d">
|
<!ENTITY button.defaultfolder.accesskey "d">
|
||||||
<!ENTITY selectFolder.label "Choose Folder">
|
<!ENTITY selectFolder.label "Choose Folder">
|
||||||
|
|
||||||
|
<!ENTITY expanderdown.tooltip "Show all the bookmarks folders">
|
||||||
|
<!ENTITY expanderup.tooltip "Hide">
|
||||||
<!ENTITY addGroup.label "Bookmark all tabs in a folder">
|
<!ENTITY addGroup.label "Bookmark all tabs in a folder">
|
||||||
<!ENTITY addGroup.accesskey "B">
|
<!ENTITY addGroup.accesskey "B">
|
||||||
<!ENTITY newFolder.label "New Folder">
|
<!ENTITY newFolder.label "New Folder">
|
||||||
<!ENTITY newFolder.accesskey "N">
|
<!ENTITY newFolder.accesskey "N">
|
||||||
<!ENTITY accept.label "Add">
|
<!ENTITY accept.label "Add">
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user