зеркало из https://github.com/mozilla/pjs.git
Popup work.
This commit is contained in:
Родитель
1d0cf70fcc
Коммит
7af694338d
|
@ -47,14 +47,17 @@ Contributor(s): ______________________________________. -->
|
|||
</html:script>
|
||||
|
||||
<!-- This needs to go into a xul fragment, but since those don't work now, this stays here !-->
|
||||
<popup id="aTooltip" oncreate="return FillInTooltip(document.tooltipElement);">
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
width="200" height="20" style="border: thin solid black">
|
||||
<titledbutton id="replaceMe" align="left" class="borderless" value="" />
|
||||
</window>
|
||||
</popup>
|
||||
|
||||
<popupset>
|
||||
<popup id="aTooltip" oncreate="return FillInTooltip(document.tooltipElement);">
|
||||
style="border: thin solid black;">
|
||||
<titledbutton id="replaceMe" align="left" crop="right" class="borderless" value="" />
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<!-- This is for test purposes. -->
|
||||
<keyset>
|
||||
<key id="openKey" key="x" command="true" onkeypress="BrowserOpenWindow()"/>
|
||||
</keyset>
|
||||
|
||||
<html:script language="javascript">
|
||||
var gBookmarkPopup = null;
|
||||
|
|
|
@ -141,12 +141,10 @@ function fillContextMenu(name)
|
|||
|
||||
// remove the menu node (which tosses all of its kids);
|
||||
// do this in case any old command nodes are hanging around
|
||||
var menuNode = popupNode.childNodes[0];
|
||||
popupNode.removeChild(menuNode);
|
||||
|
||||
// create a new menu node
|
||||
menuNode = document.createElement("menu");
|
||||
popupNode.appendChild(menuNode);
|
||||
for (var i = 0; i < popupNode.childNodes.length; i++)
|
||||
{
|
||||
popupNode.removeChild(popupNode.childNodes[0]);
|
||||
}
|
||||
|
||||
var treeNode = document.getElementById("bookmarksTree");
|
||||
if (!treeNode) return(false);
|
||||
|
@ -242,7 +240,7 @@ function fillContextMenu(name)
|
|||
menuItem.setAttribute("value", cmdName);
|
||||
menuItem.setAttribute("oncommand", "return doContextCmd('" + cmdResource.Value + "');");
|
||||
|
||||
menuNode.appendChild(menuItem);
|
||||
popupNode.appendChild(menuItem);
|
||||
}
|
||||
|
||||
return(true);
|
||||
|
|
|
@ -1240,7 +1240,7 @@ nsWebShellWindow::CreatePopup(nsIDOMElement* aElement, nsIDOMElement* aPopupCont
|
|||
nsString tagName;
|
||||
nsCOMPtr<nsIDOMElement> popupSetElement = do_QueryInterface(popupSet);
|
||||
popupSetElement->GetTagName(tagName);
|
||||
if (tagName != "menupopupset")
|
||||
if (tagName != "popupset")
|
||||
return NS_OK;
|
||||
|
||||
// Now obtain the popup set frame.
|
||||
|
|
|
@ -47,14 +47,17 @@ Contributor(s): ______________________________________. -->
|
|||
</html:script>
|
||||
|
||||
<!-- This needs to go into a xul fragment, but since those don't work now, this stays here !-->
|
||||
<popup id="aTooltip" oncreate="return FillInTooltip(document.tooltipElement);">
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
width="200" height="20" style="border: thin solid black">
|
||||
<titledbutton id="replaceMe" align="left" class="borderless" value="" />
|
||||
</window>
|
||||
</popup>
|
||||
|
||||
<popupset>
|
||||
<popup id="aTooltip" oncreate="return FillInTooltip(document.tooltipElement);">
|
||||
style="border: thin solid black;">
|
||||
<titledbutton id="replaceMe" align="left" crop="right" class="borderless" value="" />
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<!-- This is for test purposes. -->
|
||||
<keyset>
|
||||
<key id="openKey" key="x" command="true" onkeypress="BrowserOpenWindow()"/>
|
||||
</keyset>
|
||||
|
||||
<html:script language="javascript">
|
||||
var gBookmarkPopup = null;
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
popup {
|
||||
display: none;
|
||||
}
|
||||
|
||||
titledbutton#translate-button {
|
||||
list-style-image:url(resource:/res/toolbar/TB_Location.gif);
|
||||
}
|
||||
|
|
|
@ -141,12 +141,10 @@ function fillContextMenu(name)
|
|||
|
||||
// remove the menu node (which tosses all of its kids);
|
||||
// do this in case any old command nodes are hanging around
|
||||
var menuNode = popupNode.childNodes[0];
|
||||
popupNode.removeChild(menuNode);
|
||||
|
||||
// create a new menu node
|
||||
menuNode = document.createElement("menu");
|
||||
popupNode.appendChild(menuNode);
|
||||
for (var i = 0; i < popupNode.childNodes.length; i++)
|
||||
{
|
||||
popupNode.removeChild(popupNode.childNodes[0]);
|
||||
}
|
||||
|
||||
var treeNode = document.getElementById("bookmarksTree");
|
||||
if (!treeNode) return(false);
|
||||
|
@ -242,7 +240,7 @@ function fillContextMenu(name)
|
|||
menuItem.setAttribute("value", cmdName);
|
||||
menuItem.setAttribute("oncommand", "return doContextCmd('" + cmdResource.Value + "');");
|
||||
|
||||
menuNode.appendChild(menuItem);
|
||||
popupNode.appendChild(menuItem);
|
||||
}
|
||||
|
||||
return(true);
|
||||
|
|
|
@ -65,9 +65,11 @@
|
|||
</menu>
|
||||
</menubar>
|
||||
|
||||
<popupset>
|
||||
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
|
||||
<menu />
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<html:div style="width: 100px; height: 100px;" flex="1">
|
||||
<tree id="bookmarksTree" ref="NC:BookmarksRoot" context="contextual"
|
||||
|
|
|
@ -38,10 +38,6 @@ box {
|
|||
font: inherit;
|
||||
}
|
||||
|
||||
popup {
|
||||
display: none;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
@ -318,7 +314,7 @@ menuitem[disabled="true"] {
|
|||
color: #999999;
|
||||
}
|
||||
|
||||
menupopupset {
|
||||
popupset {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
@ -326,10 +322,18 @@ menupopup {
|
|||
display: none;
|
||||
}
|
||||
|
||||
popup {
|
||||
display: none;
|
||||
}
|
||||
|
||||
menupopup[menugenerated="true"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
popup[menugenerated="true"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
menupopup {
|
||||
font: inherit;
|
||||
visibility: hidden;
|
||||
|
@ -338,11 +342,23 @@ menupopup {
|
|||
border: 1px white outset;
|
||||
}
|
||||
|
||||
popup {
|
||||
font: inherit;
|
||||
visibility: hidden;
|
||||
background-color: #CCCCDD;
|
||||
color: inherit;
|
||||
border: 1px white outset;
|
||||
}
|
||||
|
||||
menupopup[menuactive="true"] {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
menupopup menu {
|
||||
popup[menuactive="true"] {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
menupopup > menu {
|
||||
max-width: 400px;
|
||||
min-width: 125px;
|
||||
margin-left: 1px;
|
||||
|
@ -351,7 +367,25 @@ menupopup menu {
|
|||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
menupopup menuitem {
|
||||
popup > menu {
|
||||
max-width: 400px;
|
||||
min-width: 125px;
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
menupopup > menuitem {
|
||||
max-width: 400px;
|
||||
min-width: 125px;
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
popup > menuitem {
|
||||
max-width: 400px;
|
||||
min-width: 125px;
|
||||
margin-left: 1px;
|
||||
|
@ -816,7 +850,6 @@ tabcontrol {
|
|||
|
||||
/* all the debug stuff is here */
|
||||
|
||||
|
||||
/* always debug
|
||||
|
||||
*:-moz-horizontal-box-debug {
|
||||
|
@ -841,6 +874,7 @@ tabcontrol {
|
|||
border: 2px solid blue;
|
||||
border-top-width: 10px;
|
||||
color: white;
|
||||
>>>>>>> 1.56
|
||||
}
|
||||
|
||||
*[debug="true"]:-moz-vertical-box-debug {
|
||||
|
@ -1243,6 +1277,11 @@ menupopup > menuitem {
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
popup > menuitem {
|
||||
border: 1px solid transparent;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
menubar > menu[menuactive="true"] {
|
||||
border: 1px outset white;
|
||||
color:#333366;
|
||||
|
@ -1257,11 +1296,21 @@ menupopup > menu[menuactive="true"] {
|
|||
color: white;
|
||||
}
|
||||
|
||||
popup > menu[menuactive="true"] {
|
||||
background-color: #666699;
|
||||
color: white;
|
||||
}
|
||||
|
||||
menupopup > menuitem[menuactive="true"] {
|
||||
background-color: #666699;
|
||||
color: white;
|
||||
}
|
||||
|
||||
popup > menuitem[menuactive="true"] {
|
||||
background-color: #666699;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.menu-right {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
|
|
Загрузка…
Ссылка в новой задаче