Fixed a typo for Bug 576408 - Implement the downgraded tab triage experience
This commit is contained in:
@@ -58,12 +58,11 @@ let TabView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateContextMenu: function(tab, popup) {
|
updateContextMenu: function(tab, popup) {
|
||||||
while(popup.lastChild && popup.lastChild.id != "context_namedGroup") {
|
while(popup.lastChild && popup.lastChild.id != "context_namedGroups")
|
||||||
popup.removeChild(popup.lastChild);
|
popup.removeChild(popup.lastChild);
|
||||||
}
|
|
||||||
|
|
||||||
let tabViewWindow = document.getElementById("tab-view").contentWindow;
|
let tabViewWindow = document.getElementById("tab-view").contentWindow;
|
||||||
let showEmpty = true;
|
let isEmpty = true;
|
||||||
|
|
||||||
if (tabViewWindow) {
|
if (tabViewWindow) {
|
||||||
let activeGroup = tab.tabItem.parent;
|
let activeGroup = tab.tabItem.parent;
|
||||||
@@ -75,30 +74,20 @@ let TabView = {
|
|||||||
(!activeGroup || activeGroup.id != group.id)) {
|
(!activeGroup || activeGroup.id != group.id)) {
|
||||||
let menuItem = self._createGroupMenuItem(group);
|
let menuItem = self._createGroupMenuItem(group);
|
||||||
popup.appendChild(menuItem);
|
popup.appendChild(menuItem);
|
||||||
showEmpty = false;
|
isEmpty = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (showEmpty) {
|
document.getElementById("context_namedGroups").hidden = isEmpty;
|
||||||
let menuItem = this._createGroupMenuItem(null);
|
|
||||||
popup.appendChild(menuItem);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createGroupMenuItem : function(group) {
|
_createGroupMenuItem : function(group) {
|
||||||
let menuItem = document.createElement("menuitem")
|
let menuItem = document.createElement("menuitem")
|
||||||
menuItem.setAttribute("class", "group");
|
menuItem.setAttribute("class", "group");
|
||||||
|
|
||||||
if (group) {
|
|
||||||
menuItem.setAttribute("label", group.getTitle());
|
menuItem.setAttribute("label", group.getTitle());
|
||||||
menuItem.setAttribute(
|
menuItem.setAttribute(
|
||||||
"oncommand",
|
"oncommand",
|
||||||
"TabView.moveTabTo(TabContextMenu.contextTab,'" + group.id + "')");
|
"TabView.moveTabTo(TabContextMenu.contextTab,'" + group.id + "')");
|
||||||
} else {
|
|
||||||
menuItem.setAttribute(
|
|
||||||
"label", gNavigatorBundle.getString("tabView.noNamedGroup"));
|
|
||||||
menuItem.setAttribute("disabled", "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
return menuItem;
|
return menuItem;
|
||||||
},
|
},
|
||||||
@@ -106,8 +95,7 @@ let TabView = {
|
|||||||
moveTabTo: function(tab, groupId) {
|
moveTabTo: function(tab, groupId) {
|
||||||
let tabViewWindow = document.getElementById("tab-view").contentWindow;
|
let tabViewWindow = document.getElementById("tab-view").contentWindow;
|
||||||
|
|
||||||
if (tabViewWindow) {
|
if (tabViewWindow)
|
||||||
tabViewWindow.Groups.moveTabToGroup(tab, groupId);
|
tabViewWindow.Groups.moveTabToGroup(tab, groupId);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
<menuitem label="&createNewGroup.label;"
|
<menuitem label="&createNewGroup.label;"
|
||||||
accesskey="&createNewGroup.accesskey;"
|
accesskey="&createNewGroup.accesskey;"
|
||||||
oncommand="TabView.moveTabTo(TabContextMenu.contextTab, null);" />
|
oncommand="TabView.moveTabTo(TabContextMenu.contextTab, null);" />
|
||||||
<menuitem id="context_namedGroup" label="&namedGroup.label;"
|
<menuitem id="context_namedGroups" label="&namedGroups.label;"
|
||||||
disabled="true" />
|
disabled="true" />
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<!ENTITY moveTabTo.accesskey "M">
|
<!ENTITY moveTabTo.accesskey "M">
|
||||||
<!ENTITY createNewGroup.label "Create New Group">
|
<!ENTITY createNewGroup.label "Create New Group">
|
||||||
<!ENTITY createNewGroup.accesskey "C">
|
<!ENTITY createNewGroup.accesskey "C">
|
||||||
<!ENTITY namedGroup.label "Named Group">
|
<!ENTITY namedGroups.label "Named Groups">
|
||||||
<!ENTITY reloadTab.label "Reload Tab">
|
<!ENTITY reloadTab.label "Reload Tab">
|
||||||
<!ENTITY reloadTab.accesskey "R">
|
<!ENTITY reloadTab.accesskey "R">
|
||||||
<!ENTITY reloadAllTabs.label "Reload All Tabs">
|
<!ENTITY reloadAllTabs.label "Reload All Tabs">
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ addKeywordTitleAutoFill=Search %S
|
|||||||
|
|
||||||
# TabView
|
# TabView
|
||||||
tabView.title=%S Tab Sets
|
tabView.title=%S Tab Sets
|
||||||
tabView.noNamedGroup=(Empty)
|
|
||||||
|
|
||||||
extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name=Default
|
extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name=Default
|
||||||
extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description=The default theme.
|
extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description=The default theme.
|
||||||
|
|||||||
Reference in New Issue
Block a user