mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 562366 - revise dialog styling to match new context and site menus [r=mfinkle]
This commit is contained in:
parent
abd56c0b95
commit
e36598229f
@ -5,25 +5,16 @@
|
|||||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<binding id="dialog">
|
<binding id="dialog">
|
||||||
<content>
|
<content orient="vertical" xbl:inherits="orient, closebutton" flex="1">
|
||||||
<xul:stack>
|
<children/>
|
||||||
<xul:box xbl:inherits="orient" class="dialog-dark" align="center">
|
|
||||||
<children/>
|
|
||||||
</xul:box>
|
|
||||||
<xul:image collapsed="true" top="-10" left="0" anonid="close" class="close-button"
|
|
||||||
onclick="document.getBindingParent(this).close()"/>
|
|
||||||
</xul:stack>
|
|
||||||
</content>
|
</content>
|
||||||
|
|
||||||
<implementation implements="nsIDOMEventListener">
|
<implementation implements="nsIDOMEventListener">
|
||||||
<field name="arguments"/>
|
<field name="arguments"/>
|
||||||
<field name="parent"/>
|
<field name="parent"/>
|
||||||
|
<property name="_scrollbox" readonly="true" onget="return this.getElementsByTagName('scrollbox')[0];"/>
|
||||||
|
|
||||||
<constructor><![CDATA[
|
<constructor><![CDATA[
|
||||||
if (!this.hasAttribute("orient"))
|
|
||||||
this.setAttribute("orient", "vertical");
|
|
||||||
if (this.hasAttribute("closebutton") && (this.getAttribute("closebutton") == "true"))
|
|
||||||
document.getAnonymousElementByAttribute(this, "anonid", "close").removeAttribute("collapsed");
|
|
||||||
this._closed = false;
|
this._closed = false;
|
||||||
if (this.hasAttribute("script")) {
|
if (this.hasAttribute("script")) {
|
||||||
try {
|
try {
|
||||||
@ -35,29 +26,55 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.addEventListener("unload", this, true);
|
window.addEventListener("unload", this, true);
|
||||||
|
|
||||||
|
let scrollbox = this._scrollbox;
|
||||||
|
if (scrollbox) {
|
||||||
|
window.addEventListener("resize", this, true);
|
||||||
|
scrollbox.addEventListener("overflow", this, true);
|
||||||
|
}
|
||||||
]]></constructor>
|
]]></constructor>
|
||||||
|
|
||||||
<method name="handleEvent">
|
<method name="handleEvent">
|
||||||
<parameter name="aEvent"/>
|
<parameter name="aEvent"/>
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
if (aEvent.originalTarget == document && aEvent.type == "unload")
|
switch(aEvent.type) {
|
||||||
this._removeDialog();
|
case "unload":
|
||||||
|
if (aEvent.originalTarget == document)
|
||||||
|
this._removeDialog();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "resize":
|
||||||
|
case "overflow":
|
||||||
|
let scrollbox = this._scrollbox;
|
||||||
|
let style = document.defaultView.getComputedStyle(scrollbox, null);
|
||||||
|
let newHeight = Math.ceil(scrollbox.firstChild.getBoundingClientRect().height) +
|
||||||
|
parseInt(style.marginTop) +
|
||||||
|
parseInt(style.marginBottom);
|
||||||
|
scrollbox.style.minHeight = Math.min(window.innerHeight / 2, newHeight) + "px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<method name="close">
|
<method name="close">
|
||||||
<body>
|
<body><![CDATA[
|
||||||
if (this.hasAttribute("onclose")) {
|
if (this.hasAttribute("onclose")) {
|
||||||
var f = new Function(this.getAttribute("onclose"));
|
let func = new Function(this.getAttribute("onclose"));
|
||||||
f.call(this);
|
func.call(this);
|
||||||
}
|
}
|
||||||
this._removeDialog();
|
this._removeDialog();
|
||||||
</body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<method name="_removeDialog">
|
<method name="_removeDialog">
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
window.removeEventListener("unload", this, true);
|
window.removeEventListener("unload", this, true);
|
||||||
|
let scrollbox = this._scrollbox;
|
||||||
|
if (scrollbox) {
|
||||||
|
window.removeEventListener("resize", this, true);
|
||||||
|
scrollbox.removeEventListener("overflow", this, true);
|
||||||
|
}
|
||||||
|
|
||||||
this.parentNode.parentNode.removeChild(this.parentNode);
|
this.parentNode.parentNode.removeChild(this.parentNode);
|
||||||
this._closed = true;
|
this._closed = true;
|
||||||
|
|
||||||
@ -70,15 +87,14 @@
|
|||||||
</method>
|
</method>
|
||||||
|
|
||||||
<method name="waitForClose">
|
<method name="waitForClose">
|
||||||
<body>
|
<body><![CDATA[
|
||||||
let thread = Components.classes["@mozilla.org/thread-manager;1"]
|
let thread = Components.classes["@mozilla.org/thread-manager;1"]
|
||||||
.getService(Components.interfaces.nsIThreadManager)
|
.getService(Components.interfaces.nsIThreadManager)
|
||||||
.currentThread;
|
.currentThread;
|
||||||
while (!this._closed)
|
while (!this._closed)
|
||||||
thread.processNextEvent(true);
|
thread.processNextEvent(true);
|
||||||
</body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
</implementation>
|
</implementation>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
</bindings>
|
</bindings>
|
||||||
|
@ -1,27 +1,40 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE fdialog SYSTEM "chrome://browser/locale/prompt.dtd">
|
|
||||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<!DOCTYPE prompt SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||||
id="prompt-alert-dialog"
|
|
||||||
onload="document.getElementById('prompt-button-ok').focus()"
|
<dialog id="prompt-alert-dialog"
|
||||||
onclose="this.PromptHelper.onCloseAlert(this);"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
script="chrome://browser/content/prompt/prompt.js">
|
onload="document.getElementById('prompt-button-ok').focus()"
|
||||||
|
onclose="this.PromptHelper.onCloseAlert(this);"
|
||||||
|
script="chrome://browser/content/prompt/prompt.js">
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<commandset>
|
<commandset>
|
||||||
<command id="cmd_ok" oncommand="document.getElementById('prompt-alert-dialog').close()"/>
|
<command id="cmd_ok" oncommand="document.getElementById('prompt-alert-dialog').close()"/>
|
||||||
<command id="cmd_cancel" oncommand="document.getElementById('prompt-alert-dialog').close()"/>
|
<command id="cmd_cancel" oncommand="document.getElementById('prompt-alert-dialog').close()"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
<label id="prompt-alert-title" crop="center"/>
|
|
||||||
<scrollbox orient="vertical" class="prompt-message">
|
<vbox class="prompt-header" flex="1">
|
||||||
<description id="prompt-alert-message"/>
|
<hbox>
|
||||||
</scrollbox>
|
<label id="prompt-alert-title" class="prompt-title" crop="center" flex="1"/>
|
||||||
<hbox id="prompt-alert-checkbox-box" collapsed="true" align="center" class="prompt-message">
|
<toolbarbutton class="close-button" command="cmd_cancel"/>
|
||||||
<description id="prompt-alert-checkbox-msg"/>
|
</hbox>
|
||||||
<checkbox class="toggle-dark" id="prompt-alert-checkbox"/>
|
|
||||||
</hbox>
|
<scrollbox orient="vertical" class="prompt-message" flex="1">
|
||||||
<hbox pack="center" class="prompt-buttons">
|
<description id="prompt-alert-message"/>
|
||||||
<button id="prompt-button-ok" class="button-dark" label="&ok.label;" command="cmd_ok"/>
|
</scrollbox>
|
||||||
|
|
||||||
|
<hbox id="prompt-alert-checkbox-box" collapsed="true" align="center" class="prompt-message" flex="1">
|
||||||
|
<label id="prompt-alert-checkbox-label" class="prompt-checkbox-label" crop="center" flex="1"/>
|
||||||
|
<checkbox id="prompt-alert-checkbox" class="toggle-dark"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<hbox class="prompt-buttons">
|
||||||
|
<button id="prompt-button-ok" label="&ok.label;" command="cmd_ok"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -1,28 +1,41 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
|
|
||||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||||
id="prompt-confirm-dialog"
|
|
||||||
onload="document.getElementsByAttribute('command', 'cmd_ok')[0].focus()"
|
<dialog id="prompt-confirm-dialog"
|
||||||
onclose="this.PromptHelper.onCloseConfirm(this)"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
script="chrome://browser/content/prompt/prompt.js">
|
onload="document.getElementsByAttribute('command', 'cmd_ok')[0].focus()"
|
||||||
|
onclose="this.PromptHelper.onCloseConfirm(this)"
|
||||||
|
script="chrome://browser/content/prompt/prompt.js">
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<commandset>
|
<commandset>
|
||||||
<command id="cmd_ok" oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(true)"/>
|
<command id="cmd_ok" oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(true)"/>
|
||||||
<command id="cmd_cancel" oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(false)"/>
|
<command id="cmd_cancel" oncommand="document.getElementById('prompt-confirm-dialog').PromptHelper.closeConfirm(false)"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
<label id="prompt-confirm-title"/>
|
|
||||||
<scrollbox orient="vertical" class="prompt-message">
|
<vbox class="prompt-header" flex="1">
|
||||||
<description id="prompt-confirm-message"/>
|
<hbox>
|
||||||
</scrollbox>
|
<label id="prompt-confirm-title" class="prompt-title" crop="center" flex="1"/>
|
||||||
<hbox id="prompt-confirm-checkbox-box" collapsed="true" align="center" class="prompt-message">
|
<toolbarbutton class="close-button" command="cmd_cancel"/>
|
||||||
<description id="prompt-confirm-checkbox-msg"/>
|
</hbox>
|
||||||
<checkbox class="toggle-dark" id="prompt-confirm-checkbox"/>
|
|
||||||
</hbox>
|
<scrollbox orient="vertical" class="prompt-message" flex="1">
|
||||||
<hbox pack="center" id="prompt-confirm-button-box" class="prompt-buttons">
|
<description id="prompt-confirm-message"/>
|
||||||
<button id="prompt-confirm-button-ok" class="button-dark" label="&ok.label;" command="cmd_ok"/>
|
</scrollbox>
|
||||||
<button class="button-dark" label="&cancel.label;" command="cmd_cancel"/>
|
|
||||||
|
<hbox id="prompt-confirm-checkbox-box" collapsed="true" align="center" class="prompt-message" flex="1">
|
||||||
|
<label id="prompt-confirm-checkbox-label" class="prompt-checkbox-label" crop="center" flex="1"/>
|
||||||
|
<checkbox class="toggle-dark" id="prompt-confirm-checkbox"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<hbox id="prompt-confirm-buttons-box" class="prompt-buttons">
|
||||||
|
<button label="&ok.label;" command="cmd_ok"/>
|
||||||
|
<button label="&cancel.label;" command="cmd_cancel"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -31,79 +31,65 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
var PromptHelper = {
|
const PromptHelper = {
|
||||||
|
closeDialog: function(confirm, id) {
|
||||||
closeDialog : function(confirm, id) {
|
let dialog = document.getElementById(id);
|
||||||
let dialog = document.getElementById(id);
|
if (typeof confirm == "boolean" && dialog.arguments && "defaultButton" in dialog.arguments)
|
||||||
if (typeof confirm == "boolean" && dialog.arguments && "defaultButton" in dialog.arguments)
|
// confirmEx always returns 1 when dismissed with "escape" (bug 345067).
|
||||||
// confirmEx always returns 1 when dismissed with "escape" (bug 345067).
|
dialog.arguments.result = confirm ? dialog.arguments.defaultButton : 1;
|
||||||
dialog.arguments.result = confirm ? dialog.arguments.defaultButton : 1;
|
else
|
||||||
else
|
dialog.arguments.result = confirm;
|
||||||
dialog.arguments.result = confirm;
|
dialog.close();
|
||||||
dialog.close();
|
},
|
||||||
},
|
|
||||||
|
// Alert dialog
|
||||||
//
|
onCloseAlert: function(dialog) {
|
||||||
// alert dialog
|
if (dialog.arguments)
|
||||||
//
|
dialog.arguments.value = document.getElementById("prompt-alert-checkbox").checked;
|
||||||
onCloseAlert: function(dialog) {
|
},
|
||||||
if (dialog.arguments) {
|
|
||||||
dialog.arguments.value = document.getElementById("prompt-alert-checkbox").checked;
|
// Confirm dialog
|
||||||
}
|
closeConfirm: function(confirm) {
|
||||||
},
|
this.closeDialog(confirm, "prompt-confirm-dialog");
|
||||||
|
},
|
||||||
//
|
|
||||||
// confirm dialog
|
onCloseConfirm: function(dialog) {
|
||||||
//
|
if (dialog.arguments && ("checkbox" in dialog.arguments))
|
||||||
closeConfirm : function(confirm) {
|
dialog.arguments.checkbox.value = document.getElementById("prompt-confirm-checkbox").checked;
|
||||||
this.closeDialog(confirm, "prompt-confirm-dialog");
|
},
|
||||||
},
|
|
||||||
|
// Prompt dialog
|
||||||
onCloseConfirm: function(dialog) {
|
closePrompt: function(confirm) {
|
||||||
if (dialog.arguments && ("checkbox" in dialog.arguments)) {
|
this.closeDialog(confirm, "prompt-prompt-dialog");
|
||||||
dialog.arguments.checkbox.value = document.getElementById("prompt-confirm-checkbox").checked;
|
},
|
||||||
}
|
|
||||||
},
|
onClosePrompt: function(dialog) {
|
||||||
|
if (dialog.arguments) {
|
||||||
//
|
dialog.arguments.checkbox.value = document.getElementById("prompt-prompt-checkbox").checked;
|
||||||
// prompt dialog
|
dialog.arguments.value.value = document.getElementById("prompt-prompt-textbox").value;
|
||||||
//
|
|
||||||
closePrompt : function(confirm) {
|
|
||||||
this.closeDialog(confirm, "prompt-prompt-dialog");
|
|
||||||
},
|
|
||||||
|
|
||||||
onClosePrompt: function(dialog) {
|
|
||||||
if (dialog.arguments) {
|
|
||||||
dialog.arguments.checkbox.value = document.getElementById("prompt-prompt-checkbox").checked;
|
|
||||||
dialog.arguments.value.value = document.getElementById("prompt-prompt-textbox").value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
//
|
|
||||||
// user / password dialog
|
|
||||||
//
|
|
||||||
closePassword : function(confirm) {
|
|
||||||
this.closeDialog(confirm, "prompt-password-dialog");
|
|
||||||
},
|
|
||||||
|
|
||||||
onClosePassword: function(dialog) {
|
|
||||||
if (dialog.arguments) {
|
|
||||||
dialog.arguments.checkbox.value = document.getElementById("prompt-password-checkbox").checked;
|
|
||||||
dialog.arguments.user.value = document.getElementById("prompt-password-user").value;
|
|
||||||
dialog.arguments.password.value = document.getElementById("prompt-password-password").value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
//
|
|
||||||
// select dialog
|
|
||||||
//
|
|
||||||
closeSelect: function(confirm) {
|
|
||||||
this.closeDialog(confirm, "prompt-select-dialog");
|
|
||||||
},
|
|
||||||
|
|
||||||
onCloseSelect: function(dialog) {
|
|
||||||
if (dialog.arguments) {
|
|
||||||
dialog.arguments.selection.value = document.getElementById("prompt-select-list").selectedIndex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// User / Password dialog
|
||||||
|
closePassword: function(confirm) {
|
||||||
|
this.closeDialog(confirm, "prompt-password-dialog");
|
||||||
|
},
|
||||||
|
|
||||||
|
onClosePassword: function(dialog) {
|
||||||
|
if (dialog.arguments) {
|
||||||
|
dialog.arguments.checkbox.value = document.getElementById("prompt-password-checkbox").checked;
|
||||||
|
dialog.arguments.user.value = document.getElementById("prompt-password-user").value;
|
||||||
|
dialog.arguments.password.value = document.getElementById("prompt-password-password").value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Select dialog
|
||||||
|
closeSelect: function(confirm) {
|
||||||
|
this.closeDialog(confirm, "prompt-select-dialog");
|
||||||
|
},
|
||||||
|
|
||||||
|
onCloseSelect: function(dialog) {
|
||||||
|
if (dialog.arguments)
|
||||||
|
dialog.arguments.selection.value = document.getElementById("prompt-select-list").selectedIndex;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -1,29 +1,43 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
|
|
||||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<!DOCTYPE prompt SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||||
id="prompt-prompt-dialog"
|
|
||||||
onload="document.getElementById('prompt-prompt-textbox').focus()"
|
<dialog id="prompt-prompt-dialog"
|
||||||
onclose="this.PromptHelper.onClosePrompt(this)"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
script="chrome://browser/content/prompt/prompt.js">
|
onload="document.getElementById('prompt-prompt-textbox').focus()"
|
||||||
|
onclose="this.PromptHelper.onClosePrompt(this)"
|
||||||
|
script="chrome://browser/content/prompt/prompt.js">
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<commandset>
|
<commandset>
|
||||||
<command id="cmd_ok" oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(true)"/>
|
<command id="cmd_ok" oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(true)"/>
|
||||||
<command id="cmd_cancel" oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(false)"/>
|
<command id="cmd_cancel" oncommand="document.getElementById('prompt-prompt-dialog').PromptHelper.closePrompt(false)"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
<label id="prompt-prompt-title"/>
|
|
||||||
<scrollbox orient="vertical" class="prompt-message">
|
<vbox class="prompt-header" flex="1">
|
||||||
<description id="prompt-prompt-message"/>
|
<hbox>
|
||||||
</scrollbox>
|
<label id="prompt-prompt-title" class="prompt-title" crop="center" flex="1"/>
|
||||||
<textbox id="prompt-prompt-textbox"/>
|
<toolbarbutton class="close-button" command="cmd_cancel"/>
|
||||||
<hbox id="prompt-prompt-checkbox-box" collapsed="true" align="center" class="prompt-message">
|
</hbox>
|
||||||
<description id="prompt-prompt-checkbox-msg"/>
|
|
||||||
<checkbox class="toggle-dark" id="prompt-prompt-checkbox"/>
|
<scrollbox orient="vertical" class="prompt-message" flex="1">
|
||||||
</hbox>
|
<description id="prompt-prompt-message"/>
|
||||||
<hbox pack="center" id="prompt-prompt-button-box" class="prompt-buttons">
|
</scrollbox>
|
||||||
<button class="button-dark" label="&ok.label;" command="cmd_ok"/>
|
|
||||||
<button class="button-dark" label="&cancel.label;" command="cmd_cancel"/>
|
<textbox id="prompt-prompt-textbox"/>
|
||||||
|
|
||||||
|
<hbox id="prompt-prompt-checkbox-box" collapsed="true" align="center" class="prompt-message" flex="1">
|
||||||
|
<label id="prompt-prompt-checkbox-label" class="prompt-checkbox-label" crop="center" flex="1"/>
|
||||||
|
<checkbox id="prompt-prompt-checkbox" class="toggle-dark"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<hbox class="prompt-buttons">
|
||||||
|
<button label="&ok.label;" command="cmd_ok"/>
|
||||||
|
<button label="&cancel.label;" command="cmd_cancel"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -1,50 +1,63 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE dialog [
|
|
||||||
<!ENTITY % promptDTD SYSTEM "chrome://browser/locale/prompt.dtd">
|
<!DOCTYPE prompt [
|
||||||
<!ENTITY % commonDialogDTD SYSTEM "chrome://global/locale/commonDialog.dtd">
|
<!ENTITY % promptDTD SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||||
%promptDTD;
|
<!ENTITY % commonDialogDTD SYSTEM "chrome://global/locale/commonDialog.dtd">
|
||||||
%commonDialogDTD;
|
%promptDTD;
|
||||||
|
%commonDialogDTD;
|
||||||
]>
|
]>
|
||||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
id="prompt-password-dialog"
|
<dialog id="prompt-password-dialog"
|
||||||
onload="document.getElementById('prompt-password-user').focus()"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
onclose="this.PromptHelper.onClosePassword(this)"
|
onload="document.getElementById('prompt-password-user').focus()"
|
||||||
script="chrome://browser/content/prompt/prompt.js">
|
onclose="this.PromptHelper.onClosePassword(this)"
|
||||||
|
script="chrome://browser/content/prompt/prompt.js">
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<commandset>
|
<commandset>
|
||||||
<command id="cmd_ok" oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(true)"/>
|
<command id="cmd_ok" oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(true)"/>
|
||||||
<command id="cmd_cancel" oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(false)"/>
|
<command id="cmd_cancel" oncommand="document.getElementById('prompt-password-dialog').PromptHelper.closePassword(false)"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
<label id="prompt-password-title"/>
|
|
||||||
<scrollbox orient="vertical" class="prompt-message">
|
<vbox class="prompt-header" flex="1">
|
||||||
<description id="prompt-password-message"/>
|
<hbox>
|
||||||
</scrollbox>
|
<label id="prompt-password-title" class="prompt-title" crop="center" flex="1"/>
|
||||||
<grid>
|
<toolbarbutton class="close-button" command="cmd_cancel"/>
|
||||||
<columns>
|
</hbox>
|
||||||
<column flex="1"/>
|
|
||||||
<column flex="1"/>
|
<scrollbox orient="vertical" class="prompt-message" flex="1">
|
||||||
</columns>
|
<description id="prompt-password-message"/>
|
||||||
<rows>
|
</scrollbox>
|
||||||
<row align="center">
|
|
||||||
<label value="&editfield0.label;"/>
|
<grid>
|
||||||
<textbox id="prompt-password-user"/>
|
<columns>
|
||||||
</row>
|
<column flex="1"/>
|
||||||
<row align="center">
|
<column flex="1"/>
|
||||||
<label value="&editfield1.label;"/>
|
</columns>
|
||||||
<textbox type="password" id="prompt-password-password"/>
|
<rows>
|
||||||
</row>
|
<row align="center">
|
||||||
</rows>
|
<label value="&editfield0.label;"/>
|
||||||
</grid>
|
<textbox id="prompt-password-user"/>
|
||||||
|
</row>
|
||||||
|
<row align="center">
|
||||||
|
<label value="&editfield1.label;"/>
|
||||||
|
<textbox type="password" id="prompt-password-password"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
<hbox id="prompt-password-checkbox-box" collapsed="true" align="center" class="prompt-message">
|
<hbox id="prompt-password-checkbox-box" collapsed="true" align="center" class="prompt-message" flex="1">
|
||||||
<description id="prompt-password-checkbox-msg"/>
|
<label id="prompt-password-checkbox-label" class="prompt-checkbox-label" crop="center" flex="1"/>
|
||||||
<checkbox class="toggle-dark" id="prompt-password-checkbox"/>
|
<checkbox id="prompt-password-checkbox" class="toggle-dark"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox pack="center" id="prompt-password-button-box" class="prompt-buttons">
|
</vbox>
|
||||||
<button class="button-dark" label="&ok.label;" command="cmd_ok"/>
|
|
||||||
<button class="button-dark" label="&cancel.label;" command="cmd_cancel"/>
|
<hbox class="prompt-buttons">
|
||||||
|
<button label="&ok.label;" command="cmd_ok"/>
|
||||||
|
<button label="&cancel.label;" command="cmd_cancel"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -1,25 +1,38 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE vbox SYSTEM "chrome://browser/locale/prompt.dtd">
|
|
||||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<!DOCTYPE prompt SYSTEM "chrome://browser/locale/prompt.dtd">
|
||||||
id="prompt-select-dialog"
|
|
||||||
onload="document.getElementById('prompt-select-list').focus()"
|
<dialog id="prompt-select-dialog"
|
||||||
onclose="this.PromptHelper.onCloseSelect(this)"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
script="chrome://browser/content/prompt/prompt.js">
|
onload="document.getElementById('prompt-select-list').focus()"
|
||||||
|
onclose="this.PromptHelper.onCloseSelect(this)"
|
||||||
|
script="chrome://browser/content/prompt/prompt.js">
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<key keycode="VK_RETURN" command="cmd_ok"/>
|
<key keycode="VK_RETURN" command="cmd_ok"/>
|
||||||
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
<key keycode="VK_ESCAPE" command="cmd_cancel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<commandset>
|
<commandset>
|
||||||
<command id="cmd_ok" oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(true)"/>
|
<command id="cmd_ok" oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(true)"/>
|
||||||
<command id="cmd_cancel" oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(false)"/>
|
<command id="cmd_cancel" oncommand="document.getElementById('prompt-select-dialog').PromptHelper.closeSelect(false)"/>
|
||||||
</commandset>
|
</commandset>
|
||||||
<label id="prompt-select-title"/>
|
|
||||||
<scrollbox orient="vertical" class="prompt-message">
|
<vbox class="prompt-header" flex="1">
|
||||||
<description id="prompt-select-message"/>
|
<hbox>
|
||||||
</scrollbox>
|
<label id="prompt-select-title" class="prompt-title" crop="center" flex="1"/>
|
||||||
<menulist id="prompt-select-list" class="button-dark"/>
|
<toolbarbutton class="close-button" command="cmd_cancel"/>
|
||||||
<hbox pack="center" id="prompt-prompt-button-box" class="prompt-buttons">
|
</hbox>
|
||||||
<button class="button-dark" label="&ok.label;" command="cmd_ok"/>
|
|
||||||
<button class="button-dark" label="&cancel.label;" command="cmd_cancel"/>
|
<scrollbox orient="vertical" class="prompt-message" flex="1">
|
||||||
|
<description id="prompt-select-message"/>
|
||||||
|
</scrollbox>
|
||||||
|
|
||||||
|
<menulist id="prompt-select-list" class="button-dark"/>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<hbox class="prompt-buttons">
|
||||||
|
<button label="&ok.label;" command="cmd_ok"/>
|
||||||
|
<button label="&cancel.label;" command="cmd_cancel"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -56,32 +56,6 @@ promptService.prototype = {
|
|||||||
return win ? win.document : null;
|
return win ? win.document : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
// add a width style to prevent a element to grow larger
|
|
||||||
// than the screen width
|
|
||||||
sizeElement: function(id, percent) {
|
|
||||||
let elem = this.getDocument().getElementById(id);
|
|
||||||
let screenW = this.getDocument().getElementById("main-window").getBoundingClientRect().width;
|
|
||||||
elem.style.width = screenW * percent / 100 + "px"
|
|
||||||
},
|
|
||||||
|
|
||||||
// size the height of the scrollable message. this assumes the given element
|
|
||||||
// is a child of a scrollbox
|
|
||||||
sizeScrollableMsg: function(id, percent) {
|
|
||||||
let doc = this.getDocument();
|
|
||||||
let screenH = doc.getElementById("main-window").getBoundingClientRect().height;
|
|
||||||
let maxHeight = screenH * percent / 100;
|
|
||||||
|
|
||||||
let elem = doc.getElementById(id);
|
|
||||||
let style = doc.defaultView.getComputedStyle(elem, null);
|
|
||||||
let height = Math.ceil(elem.getBoundingClientRect().height) +
|
|
||||||
parseInt(style.marginTop) +
|
|
||||||
parseInt(style.marginBottom);
|
|
||||||
|
|
||||||
if (height > maxHeight)
|
|
||||||
height = maxHeight;
|
|
||||||
elem.parentNode.style.height = height + "px";
|
|
||||||
},
|
|
||||||
|
|
||||||
openDialog: function(aParent, aSrc, aParams) {
|
openDialog: function(aParent, aSrc, aParams) {
|
||||||
let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
|
let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
|
||||||
let browser = wm.getMostRecentWindow("navigator:browser");
|
let browser = wm.getMostRecentWindow("navigator:browser");
|
||||||
@ -103,8 +77,6 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/alert.xul", null);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/alert.xul", null);
|
||||||
doc.getElementById("prompt-alert-title").value = aTitle;
|
doc.getElementById("prompt-alert-title").value = aTitle;
|
||||||
doc.getElementById("prompt-alert-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-alert-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-alert-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-alert-message", 25);
|
|
||||||
|
|
||||||
dialog.waitForClose();
|
dialog.waitForClose();
|
||||||
},
|
},
|
||||||
@ -119,12 +91,9 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/alert.xul", aCheckState);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/alert.xul", aCheckState);
|
||||||
doc.getElementById("prompt-alert-title").value = aTitle;
|
doc.getElementById("prompt-alert-title").value = aTitle;
|
||||||
doc.getElementById("prompt-alert-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-alert-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-alert-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-alert-message", 25);
|
|
||||||
|
|
||||||
doc.getElementById("prompt-alert-checkbox").checked = aCheckState.value;
|
doc.getElementById("prompt-alert-checkbox").checked = aCheckState.value;
|
||||||
this.setLabelForNode(doc.getElementById("prompt-alert-checkbox-msg"), aCheckMsg);
|
this.setLabelForNode(doc.getElementById("prompt-alert-checkbox-label"), aCheckMsg);
|
||||||
this.sizeElement("prompt-alert-checkbox-msg", 50);
|
|
||||||
doc.getElementById("prompt-alert-checkbox-box").removeAttribute("collapsed");
|
doc.getElementById("prompt-alert-checkbox-box").removeAttribute("collapsed");
|
||||||
|
|
||||||
dialog.waitForClose();
|
dialog.waitForClose();
|
||||||
@ -142,8 +111,6 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
||||||
doc.getElementById("prompt-confirm-title").value = aTitle;
|
doc.getElementById("prompt-confirm-title").value = aTitle;
|
||||||
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-confirm-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-confirm-message", 25);
|
|
||||||
|
|
||||||
dialog.waitForClose();
|
dialog.waitForClose();
|
||||||
return params.result;
|
return params.result;
|
||||||
@ -162,12 +129,9 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
||||||
doc.getElementById("prompt-confirm-title").value = aTitle;
|
doc.getElementById("prompt-confirm-title").value = aTitle;
|
||||||
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-confirm-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-confirm-message", 25);
|
|
||||||
|
|
||||||
doc.getElementById("prompt-confirm-checkbox").checked = aCheckState.value;
|
doc.getElementById("prompt-confirm-checkbox").checked = aCheckState.value;
|
||||||
this.setLabelForNode(doc.getElementById("prompt-confirm-checkbox-msg"), aCheckMsg);
|
this.setLabelForNode(doc.getElementById("prompt-confirm-checkbox-label"), aCheckMsg);
|
||||||
this.sizeElement("prompt-confirm-checkbox-msg", 50);
|
|
||||||
doc.getElementById("prompt-confirm-checkbox-box").removeAttribute("collapsed");
|
doc.getElementById("prompt-confirm-checkbox-box").removeAttribute("collapsed");
|
||||||
|
|
||||||
dialog.waitForClose();
|
dialog.waitForClose();
|
||||||
@ -247,17 +211,14 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/confirm.xul", params);
|
||||||
doc.getElementById("prompt-confirm-title").value = aTitle;
|
doc.getElementById("prompt-confirm-title").value = aTitle;
|
||||||
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-confirm-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-confirm-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-confirm-message", 25);
|
|
||||||
|
|
||||||
doc.getElementById("prompt-confirm-checkbox").checked = aCheckState.value;
|
doc.getElementById("prompt-confirm-checkbox").checked = aCheckState.value;
|
||||||
this.setLabelForNode(doc.getElementById("prompt-confirm-checkbox-msg"), aCheckMsg);
|
this.setLabelForNode(doc.getElementById("prompt-confirm-checkbox-label"), aCheckMsg);
|
||||||
this.sizeElement("prompt-confirm-checkbox-msg", 50);
|
|
||||||
if (aCheckMsg) {
|
if (aCheckMsg) {
|
||||||
doc.getElementById("prompt-confirm-checkbox-box").removeAttribute("collapsed");
|
doc.getElementById("prompt-confirm-checkbox-box").removeAttribute("collapsed");
|
||||||
}
|
}
|
||||||
|
|
||||||
let bbox = doc.getElementById("prompt-confirm-button-box");
|
let bbox = doc.getElementById("prompt-confirm-buttons-box");
|
||||||
while (bbox.lastChild) {
|
while (bbox.lastChild) {
|
||||||
bbox.removeChild(bbox.lastChild);
|
bbox.removeChild(bbox.lastChild);
|
||||||
}
|
}
|
||||||
@ -294,7 +255,6 @@ promptService.prototype = {
|
|||||||
if (bTitle) {
|
if (bTitle) {
|
||||||
let button = doc.createElement("button");
|
let button = doc.createElement("button");
|
||||||
this.setLabelForNode(button, bTitle);
|
this.setLabelForNode(button, bTitle);
|
||||||
button.setAttribute("class", "button-dark");
|
|
||||||
if (i == defaultButton) {
|
if (i == defaultButton) {
|
||||||
button.setAttribute("command", "cmd_ok");
|
button.setAttribute("command", "cmd_ok");
|
||||||
}
|
}
|
||||||
@ -326,12 +286,9 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/prompt.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/prompt.xul", params);
|
||||||
doc.getElementById("prompt-prompt-title").value = aTitle;
|
doc.getElementById("prompt-prompt-title").value = aTitle;
|
||||||
doc.getElementById("prompt-prompt-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-prompt-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-prompt-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-prompt-message", 25);
|
|
||||||
|
|
||||||
doc.getElementById("prompt-prompt-checkbox").checked = aCheckState.value;
|
doc.getElementById("prompt-prompt-checkbox").checked = aCheckState.value;
|
||||||
this.setLabelForNode(doc.getElementById("prompt-prompt-checkbox-msg"), aCheckMsg);
|
this.setLabelForNode(doc.getElementById("prompt-prompt-checkbox-label"), aCheckMsg);
|
||||||
this.sizeElement("prompt-prompt-checkbox-msg", 50);
|
|
||||||
doc.getElementById("prompt-prompt-textbox").value = aValue.value;
|
doc.getElementById("prompt-prompt-textbox").value = aValue.value;
|
||||||
if (aCheckMsg) {
|
if (aCheckMsg) {
|
||||||
doc.getElementById("prompt-prompt-checkbox-box").removeAttribute("collapsed");
|
doc.getElementById("prompt-prompt-checkbox-box").removeAttribute("collapsed");
|
||||||
@ -375,17 +332,13 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/promptPassword.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/promptPassword.xul", params);
|
||||||
doc.getElementById("prompt-password-title").value = aTitle;
|
doc.getElementById("prompt-password-title").value = aTitle;
|
||||||
doc.getElementById("prompt-password-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-password-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-password-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-password-message", 25);
|
|
||||||
doc.getElementById("prompt-password-checkbox").checked = aCheckState.value;
|
doc.getElementById("prompt-password-checkbox").checked = aCheckState.value;
|
||||||
|
|
||||||
doc.getElementById("prompt-password-user").value = aUsername.value;
|
doc.getElementById("prompt-password-user").value = aUsername.value;
|
||||||
doc.getElementById("prompt-password-password").value = aPassword.value;
|
doc.getElementById("prompt-password-password").value = aPassword.value;
|
||||||
if (aCheckMsg) {
|
if (aCheckMsg) {
|
||||||
doc.getElementById("prompt-password-checkbox-box").removeAttribute("collapsed");
|
doc.getElementById("prompt-password-checkbox-box").removeAttribute("collapsed");
|
||||||
this.setLabelForNode(doc.getElementById("prompt-password-checkbox-msg"), aCheckMsg);
|
this.setLabelForNode(doc.getElementById("prompt-password-checkbox-label"), aCheckMsg);
|
||||||
this.sizeElement("prompt-password-checkbox-msg", 50);
|
|
||||||
this.sizeElement("prompt-password-checkbox-box", 50);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.waitForClose();
|
dialog.waitForClose();
|
||||||
@ -501,8 +454,6 @@ promptService.prototype = {
|
|||||||
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/select.xul", params);
|
let dialog = this.openDialog(aParent, "chrome://browser/content/prompt/select.xul", params);
|
||||||
doc.getElementById("prompt-select-title").value = aTitle;
|
doc.getElementById("prompt-select-title").value = aTitle;
|
||||||
doc.getElementById("prompt-select-message").appendChild(doc.createTextNode(aText));
|
doc.getElementById("prompt-select-message").appendChild(doc.createTextNode(aText));
|
||||||
this.sizeElement("prompt-select-message", 80);
|
|
||||||
this.sizeScrollableMsg("prompt-select-message", 25);
|
|
||||||
|
|
||||||
let list = doc.getElementById("prompt-select-list");
|
let list = doc.getElementById("prompt-select-list");
|
||||||
for (let i = 0; i < aCount; i++)
|
for (let i = 0; i < aCount; i++)
|
||||||
|
@ -886,6 +886,7 @@ box[type="documenttab"]:only-child .documenttab-close {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons,
|
||||||
#pageactions-container {
|
#pageactions-container {
|
||||||
background: rgb(210, 210, 210) -moz-linear-gradient(top, rgba(255,255,255,0.4) 0%, rgba(235,235,235,0.4) 90%, rgba(185,185,185,0.4) 100%);
|
background: rgb(210, 210, 210) -moz-linear-gradient(top, rgba(255,255,255,0.4) 0%, rgba(235,235,235,0.4) 90%, rgba(185,185,185,0.4) 100%);
|
||||||
border: none;
|
border: none;
|
||||||
@ -896,31 +897,50 @@ box[type="documenttab"]:only-child .documenttab-close {
|
|||||||
-moz-border-radius-bottomright: 8px;
|
-moz-border-radius-bottomright: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction {
|
pageaction {
|
||||||
border-color: rgb(255,255,255) rgb(215,215,215) rgb(215,215,215) rgb(255,255,255);
|
-moz-border-top-colors: rgb(255, 255, 255);
|
||||||
|
-moz-border-right-colors: rgb(215, 215, 215);
|
||||||
|
-moz-border-bottom-colors: rgb(215, 215, 215);
|
||||||
|
-moz-border-left-colors: rgb(255, 255, 255);
|
||||||
background-color: rgb(235,235,235);
|
background-color: rgb(235,235,235);
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px !important;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
width :100%;
|
width :100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Override buttons style */
|
||||||
|
.prompt-buttons > button {
|
||||||
|
margin: 0;
|
||||||
|
-moz-border-image: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button > .button-box {
|
||||||
|
padding: 0 4px 1px 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 500px) {
|
@media (min-width: 500px) {
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction {
|
pageaction {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:nth-last-child(2):not(:nth-child(even)),
|
||||||
pageaction:nth-last-child(2):not(:nth-child(even)) {
|
pageaction:nth-last-child(2):not(:nth-child(even)) {
|
||||||
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomleft: 8px;
|
-moz-border-radius-bottomleft: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:first-child,
|
||||||
|
.prompt-buttons > button:nth-child(2),
|
||||||
pageaction:first-child,
|
pageaction:first-child,
|
||||||
pageaction:nth-child(2) {
|
pageaction:nth-child(2) {
|
||||||
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%) !important;
|
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child:not(:nth-child(even)),
|
||||||
pageaction:last-child:not(:nth-child(even)) {
|
pageaction:last-child:not(:nth-child(even)) {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomleft: 8px;
|
-moz-border-radius-bottomleft: 8px;
|
||||||
@ -928,6 +948,7 @@ pageaction {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child:not(:nth-child(odd)),
|
||||||
pageaction:last-child:not(:nth-child(odd)) {
|
pageaction:last-child:not(:nth-child(odd)) {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomright: 8px;
|
-moz-border-radius-bottomright: 8px;
|
||||||
@ -935,23 +956,27 @@ pageaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 499px) {
|
@media (max-width: 499px) {
|
||||||
|
.prompt-buttons > button:last-child,
|
||||||
pageaction:last-child {
|
pageaction:last-child {
|
||||||
-moz-border-radius-bottomleft: 8px;
|
-moz-border-radius-bottomleft: 8px;
|
||||||
-moz-border-radius-bottomright: 8px;
|
-moz-border-radius-bottomright: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child,
|
||||||
pageaction:last-child {
|
pageaction:last-child {
|
||||||
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:first-child,
|
||||||
pageaction:first-child {
|
pageaction:first-child {
|
||||||
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%);
|
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:hover:active,
|
||||||
pageaction:hover:active {
|
pageaction:hover:active {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
background-color: #8db8d8;
|
background-color: #8db8d8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
pageaction .pageaction-image {
|
pageaction .pageaction-image {
|
||||||
@ -964,9 +989,10 @@ pageaction:not([image]) .pageaction-image {
|
|||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction .pageaction-title {
|
pageaction .pageaction-title {
|
||||||
font-size: 24px !important;
|
font-size: 24px !important;
|
||||||
color: #414141;
|
color: #414141 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
pageaction .pageaction-desc {
|
pageaction .pageaction-desc {
|
||||||
|
@ -94,31 +94,76 @@ textbox[isempty="true"] {
|
|||||||
.dialog-dark {
|
.dialog-dark {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #36373b;
|
background-color: #36373b;
|
||||||
border: 3px solid #262629;
|
border-width: 4px 3px 4px 3px;
|
||||||
|
border-style: solid;
|
||||||
|
-moz-border-top-colors: black #4a4b4f;
|
||||||
|
-moz-border-left-colors: black #4a4b4f;
|
||||||
|
-moz-border-bottom-colors: black #4a4b4f;
|
||||||
|
-moz-border-right-colors: black #4a4b4f;
|
||||||
-moz-border-radius: 8px 8px 8px 8px;
|
-moz-border-radius: 8px 8px 8px 8px;
|
||||||
padding: 8px;
|
|
||||||
-moz-box-shadow: black 0 2px 2px;
|
-moz-box-shadow: black 0 2px 2px;
|
||||||
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prompt dialogs ---------------------------------------------------------- */
|
/* prompt dialogs ---------------------------------------------------------- */
|
||||||
dialog {
|
.modal-block {
|
||||||
|
padding: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-block dialog {
|
||||||
|
color: #fff;
|
||||||
|
background-color: transparent;
|
||||||
|
-moz-border-radius: 8px;
|
||||||
|
-moz-box-shadow: black 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-header {
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 18px !important;
|
||||||
|
-moz-border-radius: 8px 8px 0 0;
|
||||||
|
background-color: #36373b;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 4px 3px 2px 3px;
|
||||||
|
-moz-border-top-colors: black #4a4b4f;
|
||||||
|
-moz-border-left-colors: black #4a4b4f;
|
||||||
|
-moz-border-bottom-colors: black #4a4b4f;
|
||||||
|
-moz-border-right-colors: black #4a4b4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog hbox > .close-button {
|
||||||
|
min-height: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog[closebutton="true"] hbox > .close-button {
|
||||||
|
display: -moz-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-title {
|
||||||
font-size: 24px !important;
|
font-size: 24px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog .prompt-message {
|
@media (max-width: 499px) {
|
||||||
font-size: 18px !important;
|
.modal-block {
|
||||||
|
padding: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-header {
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-title {
|
||||||
|
font-size: 18px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog > scrollbox.prompt-message {
|
.prompt-message {
|
||||||
margin: 8px 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog > hbox.prompt-message {
|
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog > hbox.prompt-buttons {
|
.prompt-checkbox-label {
|
||||||
margin-top: 8px;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* buttons ----------------------------------------------------------------- */
|
/* buttons ----------------------------------------------------------------- */
|
||||||
|
@ -539,6 +539,7 @@ box[type="documenttab"]:only-child .documenttab-close {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons,
|
||||||
#pageactions-container {
|
#pageactions-container {
|
||||||
background: rgb(210, 210, 210) -moz-linear-gradient(top, rgba(255,255,255,0.4) 0%, rgba(235,235,235,0.4) 90%, rgba(185,185,185,0.4) 100%);
|
background: rgb(210, 210, 210) -moz-linear-gradient(top, rgba(255,255,255,0.4) 0%, rgba(235,235,235,0.4) 90%, rgba(185,185,185,0.4) 100%);
|
||||||
border: none;
|
border: none;
|
||||||
@ -549,31 +550,50 @@ box[type="documenttab"]:only-child .documenttab-close {
|
|||||||
-moz-border-radius-bottomright: 1.1mm;
|
-moz-border-radius-bottomright: 1.1mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction {
|
pageaction {
|
||||||
border-color: rgb(255,255,255) rgb(215,215,215) rgb(215,215,215) rgb(255,255,255);
|
-moz-border-top-colors: rgb(255, 255, 255);
|
||||||
|
-moz-border-right-colors: rgb(215, 215, 215);
|
||||||
|
-moz-border-bottom-colors: rgb(215, 215, 215);
|
||||||
|
-moz-border-left-colors: rgb(255, 255, 255);
|
||||||
background-color: rgb(235,235,235);
|
background-color: rgb(235,235,235);
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px !important;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Override buttons style */
|
||||||
|
.prompt-buttons > button {
|
||||||
|
margin: 0;
|
||||||
|
-moz-border-image: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button > .button-box {
|
||||||
|
padding: 0 4px 1px 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (orientation: landscape) {
|
@media all and (orientation: landscape) {
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction {
|
pageaction {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:nth-last-child(2):not(:nth-child(even)),
|
||||||
pageaction:nth-last-child(2):not(:nth-child(even)) {
|
pageaction:nth-last-child(2):not(:nth-child(even)) {
|
||||||
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomleft: 1.1mm;
|
-moz-border-radius-bottomleft: 1.1mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:first-child,
|
||||||
|
.prompt-buttons > button:nth-child(2),
|
||||||
pageaction:first-child,
|
pageaction:first-child,
|
||||||
pageaction:nth-child(2) {
|
pageaction:nth-child(2) {
|
||||||
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%) !important;
|
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(235,235,235) 90%) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child:not(:nth-child(even)),
|
||||||
pageaction:last-child:not(:nth-child(even)) {
|
pageaction:last-child:not(:nth-child(even)) {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomleft: 1.1mm;
|
-moz-border-radius-bottomleft: 1.1mm;
|
||||||
@ -581,6 +601,7 @@ pageaction {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child:not(:nth-child(odd)),
|
||||||
pageaction:last-child:not(:nth-child(odd)) {
|
pageaction:last-child:not(:nth-child(odd)) {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
-moz-border-radius-bottomright: 1.1mm;
|
-moz-border-radius-bottomright: 1.1mm;
|
||||||
@ -588,23 +609,27 @@ pageaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media all and (orientation: portrait) {
|
@media all and (orientation: portrait) {
|
||||||
|
.prompt-buttons > button:last-child,
|
||||||
pageaction:last-child {
|
pageaction:last-child {
|
||||||
-moz-border-radius-bottomleft: 1.1mm;
|
-moz-border-radius-bottomleft: 1.1mm;
|
||||||
-moz-border-radius-bottomright: 1.1mm;
|
-moz-border-radius-bottomright: 1.1mm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:last-child,
|
||||||
pageaction:last-child {
|
pageaction:last-child {
|
||||||
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
background-image: -moz-linear-gradient(top, rgb(235,235,235) 0%, rgb(215,215,215) 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:first-child,
|
||||||
pageaction:first-child {
|
pageaction:first-child {
|
||||||
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgba(235,235,235) 90%);
|
background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgba(235,235,235) 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button:hover:active,
|
||||||
pageaction:hover:active {
|
pageaction:hover:active {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
background-color: #8db8d8;
|
background-color: #8db8d8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
pageaction .pageaction-image {
|
pageaction .pageaction-image {
|
||||||
@ -617,9 +642,10 @@ pageaction:not([image]) .pageaction-image {
|
|||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-buttons > button,
|
||||||
pageaction .pageaction-title {
|
pageaction .pageaction-title {
|
||||||
font-size: 9pt !important;
|
font-size: 9pt !important;
|
||||||
color: #414141;
|
color: #414141 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
pageaction .pageaction-desc {
|
pageaction .pageaction-desc {
|
||||||
|
@ -66,31 +66,62 @@ textbox[isempty="true"] {
|
|||||||
.dialog-dark {
|
.dialog-dark {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #36373b;
|
background-color: #36373b;
|
||||||
border: 0.3mm solid #262629;
|
border-width: 0.4mm 0.3mm 0.4mm 0.3mm;
|
||||||
|
border-style: solid;
|
||||||
|
-moz-border-top-colors: black #4a4b4f;
|
||||||
|
-moz-border-left-colors: black #4a4b4f;
|
||||||
|
-moz-border-bottom-colors: black #4a4b4f;
|
||||||
|
-moz-border-right-colors: black #4a4b4f;
|
||||||
-moz-border-radius: 1mm 1mm 1mm 1mm;
|
-moz-border-radius: 1mm 1mm 1mm 1mm;
|
||||||
padding: 1mm;
|
|
||||||
-moz-box-shadow: black 0 0.25mm 0.25mm;
|
-moz-box-shadow: black 0 0.25mm 0.25mm;
|
||||||
|
padding: 1mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prompt dialogs ---------------------------------------------------------- */
|
/* prompt dialogs ---------------------------------------------------------- */
|
||||||
dialog {
|
.modal-block {
|
||||||
|
padding: 8mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-block dialog {
|
||||||
|
color: #fff;
|
||||||
|
background-color: transparent;
|
||||||
|
-moz-border-radius: 1mm;
|
||||||
|
-moz-box-shadow: black 0 0.1mm 0.1mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-header {
|
||||||
|
padding: 1mm;
|
||||||
|
font-size: 8pt !important;
|
||||||
|
-moz-border-radius: 1mm 1mm 0 0;
|
||||||
|
background-color: #36373b;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0.4mm 0.3mm 0.2mm 0.3mm;
|
||||||
|
-moz-border-top-colors: black #4a4b4f;
|
||||||
|
-moz-border-left-colors: black #4a4b4f;
|
||||||
|
-moz-border-bottom-colors: black #4a4b4f;
|
||||||
|
-moz-border-right-colors: black #4a4b4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog hbox > .close-button {
|
||||||
|
min-height: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog[closebutton="true"] hbox > .close-button {
|
||||||
|
display: -moz-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt-title {
|
||||||
font-size: 9pt !important;
|
font-size: 9pt !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog .prompt-message {
|
.prompt-message {
|
||||||
font-size: 8pt !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog > scrollbox.prompt-message {
|
|
||||||
margin: 1mm 0 1mm 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog > hbox.prompt-message {
|
|
||||||
margin-top: 1mm;
|
margin-top: 1mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog > hbox.prompt-buttons {
|
.prompt-checkbox-label {
|
||||||
margin-top: 1mm;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* buttons ----------------------------------------------------------------- */
|
/* buttons ----------------------------------------------------------------- */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user