зеркало из https://github.com/mozilla/pjs.git
Convert CZ's away flatbutton into a real menu button b=273507 r=silver a=shaver
This commit is contained in:
Родитель
059e6cfa40
Коммит
7693a0ba82
|
@ -135,11 +135,8 @@
|
|||
<splitter id="input-splitter" orient="vertical" collapse="after"
|
||||
collapsed="true"/>
|
||||
|
||||
<hbox id="input-widgets">
|
||||
<flatbutton id="nickname-button" onclick="onNicknamePopup();" align="center">
|
||||
<label id="server-nick" value=""/>
|
||||
<image class="flatbutton-dropmarker"/>
|
||||
</flatbutton>
|
||||
<toolbar id="input-widgets">
|
||||
<toolbarbutton id="server-nick" type="menu"/>
|
||||
<hbox id="multiline-box" flex="1" collapsed="true">
|
||||
<textbox id="multiline-input" multiline="true" flex="1" height="100px"
|
||||
class="multiline-input-widget" onfocus="onInputFocus();"/>
|
||||
|
@ -159,7 +156,7 @@
|
|||
oncommand="dispatch('pref multiline true');"
|
||||
tooltiptext="&multiline-expand.tooltip;"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<overlaytarget id="statusbar-overlay-target"/>
|
||||
|
||||
|
|
|
@ -317,33 +317,6 @@ function onTooltip(event)
|
|||
return false;
|
||||
}
|
||||
|
||||
var _nicknamePopupHandlersInstalled = false;
|
||||
function onNicknamePopup(e)
|
||||
{
|
||||
function onNicknamePopupOpening(e)
|
||||
{
|
||||
button.setAttribute("open", "true");
|
||||
};
|
||||
|
||||
function onNicknamePopupClosing(e)
|
||||
{
|
||||
button.removeAttribute("open");
|
||||
};
|
||||
|
||||
var button = document.getElementById("nickname-button");
|
||||
var popup = document.getElementById("context:nickname");
|
||||
if (!_nicknamePopupHandlersInstalled)
|
||||
{
|
||||
popup.addEventListener("popupshowing", onNicknamePopupOpening, false);
|
||||
popup.addEventListener("popuphiding", onNicknamePopupClosing, false);
|
||||
_nicknamePopupHandlersInstalled = true;
|
||||
}
|
||||
if (button.getAttribute("open") == "true")
|
||||
popup.hidePopup();
|
||||
else
|
||||
popup.showPopup(button, -1, -1, "popup", "bottomleft", "topleft");
|
||||
}
|
||||
|
||||
function onInputKeyPress (e)
|
||||
{
|
||||
if (client.prefs["outgoing.colorCodes"])
|
||||
|
|
|
@ -388,7 +388,9 @@ function initMenus()
|
|||
var netAwayIsDef = "(cx.network.prefs['away'] == '" + MSG_AWAY_DEFAULT +
|
||||
"') and " + netAway;
|
||||
|
||||
client.menuSpecs["context:nickname"] = {
|
||||
client.menuSpecs["mainmenu:nickname"] = {
|
||||
label: "",
|
||||
domID: "server-nick",
|
||||
getContext: getDefaultContext,
|
||||
items:
|
||||
[
|
||||
|
|
|
@ -2124,7 +2124,7 @@ function updateTitle (obj)
|
|||
}
|
||||
|
||||
document.title = tstring;
|
||||
client.statusBar["server-nick"].setAttribute("value", nick);
|
||||
client.statusBar["server-nick"].setAttribute("label", nick);
|
||||
}
|
||||
|
||||
function multilineInputMode (state)
|
||||
|
|
|
@ -58,6 +58,11 @@ window {
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
#input-widgets {
|
||||
border: none;
|
||||
-moz-binding: none;
|
||||
}
|
||||
|
||||
#input-widget,
|
||||
#input-widget-multiline {
|
||||
border: thin silver inset;
|
||||
|
@ -118,31 +123,6 @@ window {
|
|||
border: thin silver inset;
|
||||
}
|
||||
|
||||
flatbutton {
|
||||
margin: 2px;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
flatbutton:hover {
|
||||
border-top: 1px solid ThreeDHighlight;
|
||||
border-right: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDShadow;
|
||||
border-left: 1px solid ThreeDHighlight;
|
||||
}
|
||||
|
||||
flatbutton:active, flatbutton[open="true"] {
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
flatbutton > .flatbutton-dropmarker {
|
||||
background: url(images/arrow-down.png);
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
treecol {
|
||||
border: none;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче