Bug 1597964 - Restructure all <xul:dialog> usages such that they are not the top level element in chat/. r=mkmelin
This commit is contained in:
Родитель
1cfb4acfcf
Коммит
f1aa0b1c4e
|
@ -70,7 +70,7 @@ var otrAddFinger = {
|
|||
this.fingerError.hidden = true;
|
||||
}
|
||||
|
||||
document.documentElement.getButton("accept").disabled =
|
||||
document.getElementById("otrAddFingerDialog").getButton("accept").disabled =
|
||||
input.value && !input.validity.valid;
|
||||
|
||||
this.keyCount.value = `${hex.length}/40`;
|
||||
|
|
|
@ -6,59 +6,60 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
|
||||
<?xml-stylesheet href="chrome://chat/skin/otrFingerprintDialog.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog>
|
||||
<!DOCTYPE window>
|
||||
|
||||
<dialog id="otrAddFingerDialog"
|
||||
data-l10n-id="otr-add-finger"
|
||||
<window data-l10n-id="otr-add-finger"
|
||||
windowtype="OTR:AddFinger"
|
||||
onload="otrAddFinger.onload()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
buttons="accept,cancel"
|
||||
buttondisabledaccept="true">
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<dialog id="otrAddFingerDialog"
|
||||
buttons="accept,cancel"
|
||||
buttondisabledaccept="true">
|
||||
|
||||
<keyset id="mailKeys">
|
||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
<keyset id="mailKeys">
|
||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/add-finger.ftl"/>
|
||||
</linkset>
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/add-finger.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<script src="chrome://chat/content/otr-add-fingerprint.js"/>
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<vbox class="dialog-container" flex="1">
|
||||
<hbox align="center" pack="center" class="header-container">
|
||||
<vbox>
|
||||
<image class="header-icon icon-login"/>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<description id="otrDescription"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox class="form-control" align="center">
|
||||
<label data-l10n-id="otr-add-finger-fingerprint"
|
||||
class="label-box"
|
||||
control="fingerprint"/>
|
||||
<hbox class="input-control" align="center" flex="1">
|
||||
<html:input id="fingerprint" type="text"
|
||||
data-l10n-id="otr-add-finger-input"
|
||||
class="input-field"
|
||||
oninput="otrAddFinger.oninput(this);"
|
||||
onblur="otrAddFinger.onblur(this);"
|
||||
pattern="[ 0-9a-fA-F]*"
|
||||
minlength="44"
|
||||
maxlength="44"/>
|
||||
<script src="chrome://chat/content/otr-add-fingerprint.js"/>
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<vbox class="dialog-container" flex="1">
|
||||
<hbox align="center" pack="center" class="header-container">
|
||||
<vbox>
|
||||
<image class="header-icon icon-login"/>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<description id="otrDescription"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<image id="fingerWarning" class="form-icon icon-warning" hidden="true"/>
|
||||
</hbox>
|
||||
<vbox class="input-helper-container" flex="1" align="end">
|
||||
<label id="fingerError"
|
||||
data-l10n-id="otr-add-finger-tooltip-error"
|
||||
class="msg-error"
|
||||
hidden="true"/>
|
||||
<label id="keyCount" class="input-helper" value="0/40"/>
|
||||
<hbox class="form-control" align="center">
|
||||
<label data-l10n-id="otr-add-finger-fingerprint"
|
||||
class="label-box"
|
||||
control="fingerprint"/>
|
||||
<hbox class="input-control" align="center" flex="1">
|
||||
<html:input id="fingerprint" type="text"
|
||||
data-l10n-id="otr-add-finger-input"
|
||||
class="input-field"
|
||||
oninput="otrAddFinger.oninput(this);"
|
||||
onblur="otrAddFinger.onblur(this);"
|
||||
pattern="[ 0-9a-fA-F]*"
|
||||
minlength="44"
|
||||
maxlength="44"/>
|
||||
</hbox>
|
||||
<image id="fingerWarning" class="form-icon icon-warning" hidden="true"/>
|
||||
</hbox>
|
||||
<vbox class="input-helper-container" flex="1" align="end">
|
||||
<label id="fingerError"
|
||||
data-l10n-id="otr-add-finger-tooltip-error"
|
||||
class="msg-error"
|
||||
hidden="true"/>
|
||||
<label id="keyCount" class="input-helper" value="0/40"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
</dialog>
|
||||
</window>
|
||||
|
|
|
@ -173,7 +173,9 @@ var otrAuth = {
|
|||
},
|
||||
|
||||
oninput(e) {
|
||||
document.documentElement.getButton("accept").disabled = !e.value;
|
||||
document
|
||||
.getElementById("otrAuthDialog")
|
||||
.getButton("accept").disabled = !e.value;
|
||||
},
|
||||
|
||||
how() {
|
||||
|
|
|
@ -6,89 +6,89 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
|
||||
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/input-fields.css"?>
|
||||
|
||||
<!DOCTYPE dialog>
|
||||
<dialog
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
id="otrAuthDialog"
|
||||
data-l10n-id="otr-auth"
|
||||
data-l10n-attrs="buttonlabelaccept"
|
||||
windowtype="OTR:Auth"
|
||||
onload="otrAuth.onload()"
|
||||
buttons="accept,cancel,help"
|
||||
buttondisabledaccept="true">
|
||||
<!DOCTYPE winodw>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
data-l10n-id="otr-auth"
|
||||
data-l10n-attrs="buttonlabelaccept"
|
||||
windowtype="OTR:Auth"
|
||||
onload="otrAuth.onload()">
|
||||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/auth.ftl"/>
|
||||
</linkset>
|
||||
<dialog id="otrAuthDialog"
|
||||
buttons="accept,cancel,help"
|
||||
buttondisabledaccept="true">
|
||||
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<script src="chrome://chat/content/otr-auth.js"/>
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/auth.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<groupbox id="how" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-how"/></label>
|
||||
<menulist id="howOption" oncommand="otrAuth.how();">
|
||||
<menupopup>
|
||||
<menuitem data-l10n-id="auth-questionAndAnswer-label" value="questionAndAnswer"/>
|
||||
<menuitem data-l10n-id="auth-sharedSecret-label" value="sharedSecret"/>
|
||||
<menuitem data-l10n-id="auth-manualVerification-label" value="manualVerification"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</groupbox>
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<script src="chrome://chat/content/otr-auth.js"/>
|
||||
|
||||
<groupbox id="questionAndAnswer" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-questionAndAnswer"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-qaInstruction"></description>
|
||||
<label data-l10n-id="auth-question" control="question" flex="1"/>
|
||||
<html:input id="question" type="text" class="input-inline"
|
||||
aria-labelledby="auth-question"/>
|
||||
<label data-l10n-id="auth-answer" control="answer" flex="1"/>
|
||||
<html:input id="answer" type="text" class="input-inline"
|
||||
aria-labelledby="auth-answer"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="sharedSecret" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-sharedSecret"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-secretInstruction"></description>
|
||||
<label data-l10n-id="auth-secret" control="secret" flex="1"/>
|
||||
<html:input id="secret" type="text" class="input-inline"
|
||||
aria-labelledby="auth-secret"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="manualVerification" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-manualVerification"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-manualInstruction"></description>
|
||||
|
||||
<label id="yourFPLabel"/>
|
||||
<html:input id="yourFPValue" type="text" class="input-inline"
|
||||
readonly="readonly"
|
||||
aria-labelledby="yourFPLabel"/>
|
||||
<label id="theirFPLabel"/>
|
||||
<html:input id="theirFPValue" type="text" class="input-inline"
|
||||
readonly="readonly"
|
||||
aria-labelledby="theirFPLabel"/>
|
||||
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="auth-verified"/>
|
||||
<menulist id="verifiedOption">
|
||||
<groupbox id="how" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-how"/></label>
|
||||
<menulist id="howOption" oncommand="otrAuth.how();">
|
||||
<menupopup>
|
||||
<menuitem data-l10n-id="auth-yes" value="yes"/>
|
||||
<menuitem data-l10n-id="auth-no" value="no"/>
|
||||
<menuitem data-l10n-id="auth-questionAndAnswer-label" value="questionAndAnswer"/>
|
||||
<menuitem data-l10n-id="auth-sharedSecret-label" value="sharedSecret"/>
|
||||
<menuitem data-l10n-id="auth-manualVerification-label" value="manualVerification"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="ask" hidden="true">
|
||||
<label id="receivedQuestionLabel" data-l10n-id="auth-questionReceived"/>
|
||||
<description id="receivedQuestion" style="width: 300px; white-space: pre-wrap;"/>
|
||||
<label id="responseLabel" control="response" flex="1"/>
|
||||
<html:input id="response" type="text" class="input-inline"
|
||||
aria-labelledby="responseLabel"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
<groupbox id="questionAndAnswer" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-questionAndAnswer"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-qaInstruction"></description>
|
||||
<label data-l10n-id="auth-question" control="question" flex="1"/>
|
||||
<html:input id="question" type="text" class="input-inline"
|
||||
aria-labelledby="auth-question"/>
|
||||
<label data-l10n-id="auth-answer" control="answer" flex="1"/>
|
||||
<html:input id="answer" type="text" class="input-inline"
|
||||
aria-labelledby="auth-answer"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
|
||||
</dialog>
|
||||
<groupbox id="sharedSecret" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-sharedSecret"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-secretInstruction"></description>
|
||||
<label data-l10n-id="auth-secret" control="secret" flex="1"/>
|
||||
<html:input id="secret" type="text" class="input-inline"
|
||||
aria-labelledby="auth-secret"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="manualVerification" hidden="true">
|
||||
<label><html:h4 data-l10n-id="auth-manualVerification"/></label>
|
||||
<description style="width: 300px; white-space: pre-wrap;" data-l10n-id="auth-manualInstruction"></description>
|
||||
|
||||
<label id="yourFPLabel"/>
|
||||
<html:input id="yourFPValue" type="text" class="input-inline"
|
||||
readonly="readonly"
|
||||
aria-labelledby="yourFPLabel"/>
|
||||
<label id="theirFPLabel"/>
|
||||
<html:input id="theirFPValue" type="text" class="input-inline"
|
||||
readonly="readonly"
|
||||
aria-labelledby="theirFPLabel"/>
|
||||
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="auth-verified"/>
|
||||
<menulist id="verifiedOption">
|
||||
<menupopup>
|
||||
<menuitem data-l10n-id="auth-yes" value="yes"/>
|
||||
<menuitem data-l10n-id="auth-no" value="no"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="ask" hidden="true">
|
||||
<label id="receivedQuestionLabel" data-l10n-id="auth-questionReceived"/>
|
||||
<description id="receivedQuestion" style="width: 300px; white-space: pre-wrap;"/>
|
||||
<label id="responseLabel" control="response" flex="1"/>
|
||||
<html:input id="response" type="text" class="input-inline"
|
||||
aria-labelledby="responseLabel"
|
||||
oninput="otrAuth.oninput(this)"/>
|
||||
</groupbox>
|
||||
<dialog>
|
||||
</window>
|
||||
|
|
|
@ -5,50 +5,51 @@
|
|||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
|
||||
|
||||
<!DOCTYPE dialog>
|
||||
<!DOCTYPE window>
|
||||
|
||||
<dialog
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
id="otr-fingerwindow"
|
||||
data-l10n-id="otr-finger"
|
||||
data-l10n-attrs="buttonlabelaccept"
|
||||
onload="otrFinger.onload()"
|
||||
buttons="accept">
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
data-l10n-id="otr-finger"
|
||||
data-l10n-attrs="buttonlabelaccept"
|
||||
onload="otrFinger.onload()">
|
||||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/finger.ftl"/>
|
||||
</linkset>
|
||||
<dialog id="otr-fingerwindow"
|
||||
buttons="accept">
|
||||
|
||||
<script src="chrome://chat/content/otr-finger.js"/>
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/finger.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<label data-l10n-id="finger-intro" />
|
||||
<separator class="thin"/>
|
||||
<vbox id="fingerprints" class="contentPane" flex="1">
|
||||
<tree id="fingerTree"
|
||||
flex="1"
|
||||
width="800"
|
||||
style="height: 20em;"
|
||||
onselect="otrFinger.select()">
|
||||
<treecols>
|
||||
<treecol id="screenname" data-l10n-id="finger-screenName" flex="20" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="fingerprint" data-l10n-id="finger-fingerprint" flex="120" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="verified" data-l10n-id="finger-verified" flex="10" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
<treechildren/>
|
||||
</tree>
|
||||
<script src="chrome://chat/content/otr-finger.js"/>
|
||||
|
||||
<label data-l10n-id="finger-intro" />
|
||||
<separator class="thin"/>
|
||||
<hbox>
|
||||
<button id="remove"
|
||||
data-l10n-id="finger-remove"
|
||||
disabled="true"
|
||||
oncommand="otrFinger.remove()"/>
|
||||
<button id="remove-all"
|
||||
data-l10n-id="finger-remove-all"
|
||||
oncommand="otrFinger.removeAll()"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
<vbox id="fingerprints" class="contentPane" flex="1">
|
||||
<tree id="fingerTree"
|
||||
flex="1"
|
||||
width="800"
|
||||
style="height: 20em;"
|
||||
onselect="otrFinger.select()">
|
||||
<treecols>
|
||||
<treecol id="screenname" data-l10n-id="finger-screenName" flex="20" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="fingerprint" data-l10n-id="finger-fingerprint" flex="120" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="verified" data-l10n-id="finger-verified" flex="10" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
<treechildren/>
|
||||
</tree>
|
||||
<separator class="thin"/>
|
||||
<hbox>
|
||||
<button id="remove"
|
||||
data-l10n-id="finger-remove"
|
||||
disabled="true"
|
||||
oncommand="otrFinger.remove()"/>
|
||||
<button id="remove-all"
|
||||
data-l10n-id="finger-remove-all"
|
||||
oncommand="otrFinger.removeAll()"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
</window>
|
||||
|
|
Загрузка…
Ссылка в новой задаче