зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug #214721
long xpi filename can push "Cancel" button off screen r=ben
This commit is contained in:
Родитель
5dd1e3c68e
Коммит
828f431d53
|
@ -27,26 +27,27 @@ function addTreeItem(num, aName, aUrl, aCertName)
|
|||
// first column is the package name
|
||||
var item = document.createElement("description");
|
||||
item.setAttribute("value", aName);
|
||||
item.setAttribute("tooltiptext", aUrl);
|
||||
item.setAttribute("tooltiptext", aName);
|
||||
item.setAttribute("class", "confirmName");
|
||||
item.setAttribute("crop", "center");
|
||||
|
||||
// second column is for the cert name
|
||||
var certName = document.createElement("description");
|
||||
if (aCertName == "")
|
||||
certName.setAttribute("value", gBundle.getString("Unsigned") );
|
||||
else
|
||||
certName.setAttribute("value", aCertName);
|
||||
var certNameValue = aCertName ? aCertName : gBundle.getString("Unsigned");
|
||||
certName.setAttribute("value", certNameValue);
|
||||
certName.setAttribute("tooltiptext", certNameValue);
|
||||
certName.setAttribute("crop", "center");
|
||||
|
||||
// third column is the host serving the file
|
||||
var urltext = aUrl.replace(/^([^:]*:\/*[^\/]+).*/, "$1");
|
||||
var url = document.createElement('description');
|
||||
var url = document.createElement("description");
|
||||
url.setAttribute("value", aUrl);
|
||||
url.setAttribute("tooltiptext", aUrl);
|
||||
url.setAttribute("class", "confirmURL");
|
||||
url.setAttribute("crop", "end");
|
||||
url.setAttribute("crop", "center");
|
||||
|
||||
// create row and add it to the grid
|
||||
var row = document.createElement("row");
|
||||
var row = document.createElement("row");
|
||||
row.appendChild(item);
|
||||
row.appendChild(certName);
|
||||
row.appendChild(url);
|
||||
|
@ -54,18 +55,15 @@ function addTreeItem(num, aName, aUrl, aCertName)
|
|||
document.getElementById("xpirows").appendChild(row);
|
||||
}
|
||||
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
var row = 0;
|
||||
var moduleName, URL, certName, numberOfDialogTreeElements;
|
||||
|
||||
doSetOKCancel(onOk, onCancel);
|
||||
|
||||
gBundle = document.getElementById("xpinstallBundle");
|
||||
gParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);
|
||||
|
||||
gParam.SetInt(0, 1 ); /* Set the default return to Cancel */
|
||||
gParam.SetInt(0, 1); /* Set the default return to Cancel */
|
||||
|
||||
numberOfDialogTreeElements = gParam.GetInt(1);
|
||||
|
||||
|
@ -77,15 +75,6 @@ function onLoad()
|
|||
|
||||
addTreeItem(row++, moduleName, URL, certName);
|
||||
}
|
||||
|
||||
var okText = gBundle.getString("OK");
|
||||
var okButton = document.getElementById("ok")
|
||||
okButton.label = okText;
|
||||
okButton.setAttribute("default",false);
|
||||
|
||||
var cancelButton = document.getElementById("cancel")
|
||||
cancelButton.focus();
|
||||
cancelButton.setAttribute("default",true);
|
||||
}
|
||||
|
||||
function onOk()
|
||||
|
@ -94,7 +83,7 @@ function onOk()
|
|||
if (gParam)
|
||||
gParam.SetInt(0, 0 );
|
||||
|
||||
window.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
function onCancel()
|
||||
|
@ -103,6 +92,6 @@ function onCancel()
|
|||
if (gParam)
|
||||
gParam.SetInt(0, 1 );
|
||||
|
||||
window.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,16 +25,16 @@ Contributor(s):
|
|||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/xpinstall/xpinstall.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/xpinstall/institems.dtd">
|
||||
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/xpinstall/institems.dtd">
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="onLoad()"
|
||||
title="&dialog.title;"
|
||||
id="confirmDlg"
|
||||
class="dialog"
|
||||
style="width: 50em"
|
||||
>
|
||||
style="width: 60em"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return onOk();"
|
||||
ondialogcancel="return onCancel();">
|
||||
|
||||
<script src="chrome://communicator/content/xpinstall/institems.js"/>
|
||||
<stringbundle id="xpinstallBundle" src="chrome://communicator/locale/xpinstall/xpinstall.properties"/>
|
||||
|
@ -53,8 +53,8 @@ Contributor(s):
|
|||
|
||||
<grid id="confirmGrid" flex="1">
|
||||
<columns>
|
||||
<column id="xpiColumn"/>
|
||||
<column id="certColumn"/>
|
||||
<column id="xpiColumn" flex="1"/>
|
||||
<column id="certColumn" flex="1"/>
|
||||
<column id="urlColumn" flex="1"/>
|
||||
</columns>
|
||||
<rows id="xpirows">
|
||||
|
@ -68,5 +68,4 @@ Contributor(s):
|
|||
</description>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox id="okCancelButtonsRight"/>
|
||||
</window>
|
||||
</dialog>
|
||||
|
|
Загрузка…
Ссылка в новой задаче