Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12965
Modified Files:
ESC.js GenericAuth.js TRAY.js certinfo.xul config.xul esc.css
esc.xul esc_browser.xul settings.xul
Log Message:
Update to Latest.
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1.1.1 -r 1.2 ESC.js
Index: ESC.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ESC.js 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ ESC.js 13 Sep 2006 17:56:49 -0000 1.2
@@ -20,21 +20,42 @@
var gStringBundle = null;
var netkey;
-var gHidden = null;
-
var keyUITable = new Array();
var keyTypeTable = new Array();
var curChildWindow = null;
-var gUsesTree = 0;
+var gEnrollmentPage = 0;
+var gAdminPage = 0;
+var gUsesListBox = 0;
+var gFactoryMode = 0;
+var gHiddenPage = 0;
+var gHiddenPageDone = 0;
+var gExternalUI = 0;
+
+var gDiagnosticsCopyString=null;
loadStringBundle();
+//ESC constants
+
+const KEY_ISSUER_URL = "keyIssuerUrl";
+const KEY_ISSUER = "keyIssuer";
+const TPS_URL = "Operation";
+const TPS_UI = "UI";
+const SERVICES_TAG = "Services";
+const ISSUER_TAG = "IssuerName";
+const SERVICE_INFO_TAG = "ServiceInfo";
+
+//Window names
+
+const ENROLL_WINDOW = "esc.xul";
+const ADMIN_WINDOW = "settings.xul";
+const HIDDEN_WINDOW = "hiddenWindow.xul";
+
function getUIForKey(aKeyID)
{
return keyUITable[aKeyID];
-
}
function getTypeForKey(aKeyID)
@@ -60,7 +81,7 @@
if(!iid.equals(Components.interfaces.rhIKeyNotify) &&
!iid.equals(Components.interfaces.nsISupports))
{
- alert(getBundleString("errorJsNotifyInterface"));
+ MyAlert(getBundleString("errorJsNotifyInterface"));
throw Components.results.NS_ERROR_NO_INTERFACE;
}
return this;
@@ -77,7 +98,7 @@
gNotify = new jsNotify;
netkey.rhCoolKeySetNotifyCallback(gNotify);
} catch(e) {
- alert(getBundleString("errorUniversalXPConnect") + e);
+ MyAlert(getBundleString("errorUniversalXPConnect") + e);
}
//
@@ -86,13 +107,14 @@
function cleanup()
{
- TrayRemoveWindow();
+ TrayRemoveWindow(null);
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
netkey.rhCoolKeyUnSetNotifyCallback(gNotify);
} catch(e) {
- alert(getBundleString("errorUniversalXPConnect") + e);
+ MyAlert(getBundleString("errorUniversalXPConnect") + e);
}
+
}
var gScreenName = "";
@@ -181,7 +203,7 @@
} catch(e) {
- alert(getBundleString("errorConfigValue") + e);
+ MyAlert(getBundleString("errorConfigValue") + e);
}
if(tps_uri)
@@ -193,6 +215,102 @@
}
+function DoPhoneHome(keyType,keyID)
+{
+ var callback = function (aResult) {
+
+ if(aResult == true)
+ {
+ UpdateRowWithPhoneHomeData(keyType,keyID);
+ }
+ else
+ {
+ launchCONFIG(keyType,keyID);
+ }
+ }
+
+ if(IsPhoneHomeCached(keyID))
+ {
+ return true;
+ }
+
+ var home = DoCoolKeyGetIssuerUrl(keyType,keyID);
+
+ var homeRes = false;
+
+ if(home)
+ {
+ homeRes = phoneHome(home,keyID,callback);
+ }
+
+ if(!homeRes)
+ {
+ launchCONFIG(keyType,keyID);
+ }
+
+ return homeRes;
+}
+//Test Phone Home url in config UI
+
+function DoPhoneHomeTest()
+{
+ // Test out user supplied phone home url
+
+ var name = this.name;
+
+ var callback = function (aResult) {
+
+ if(aResult == true)
+ {
+ MyAlert(getBundleString("tpsConfigSuccess"));
+ }
+ else
+ {
+ MyAlert(getBundleString("tpsConfigError"));
+ }
+ }
+
+ var url = document.getElementById("phonehomeuri");
+
+ if(!url)
+ {
+ MyAlert(getBundleString("noTpsConfigUrl"));
+ return;
+
+ }
+
+ if(!url.value)
+ {
+ MyAlert(getBundleString("noTpsConfigUrl"));
+ return;
+ }
+
+ MyAlert(getBundleString("tpsConfigTest") + " " + url.value);
+
+ if(name)
+ {
+ phoneHome(url.value,name,callback);
+ }
+ else
+ {
+ MyAlert(getBundleString("tpsConfigError"));
+ }
+
+}
+
+function DoPhoneHomeConfigClose()
+{
+
+ var name = this.name;
+
+ if(window.opener && name)
+ {
+ window.opener.UpdateRowWithPhoneHomeData(1,name);
+ }
+
+ window.close();
+}
+
//Test the tps uri connection
[...3381 lines suppressed...]
+ return false;
+ }
+ var root = response.getElementsByTagName("ServiceInfo");
+
+ if(!root)
+ {
+ if(resultCB)
+ resultCB(false);
+ return false;
+ }
+
+ var issuer = response.getElementsByTagName("IssuerName").item(0);
+
+ if(!issuer)
+ {
+ if(resultCB)
+ resultCB(false);
+ return false;
+ }
+
+ var theIssuer = issuer.lastChild.data;
+
+ if(theIssuer)
+ {
+ var issuer_config_value = ConfigValueWithKeyID(aKeyID,KEY_ISSUER);
+ if(issuer_config_value)
+ {
+ DoCoolKeySetConfigValue(issuer_config_value,theIssuer);
+
+ }
+ }
+
+ var services = response.getElementsByTagName("Services");
+
+ if(!services)
+ {
+ if(resultCB)
+ resultCB(false);
+ return false;
+ }
+
+ var servicesNodes = services[0].childNodes;
+ var len = servicesNodes.length;
+
+ for (var i = 0; i < len; i++)
+ {
+ var oChild = servicesNodes.item(i);
+ var name = oChild.nodeName;
+ var value = oChild.firstChild.data;
+
+ if(name && value)
+ {
+ var cValue = ConfigValueWithKeyID(aKeyID,name);
+
+ if(cValue)
+ {
+ DoCoolKeySetConfigValue(cValue,value);
+ }
+ }
+
+ }
+
+ if(resultCB)
+ {
+ //Manually write out entry for phone home url
+
+ var issuer_config_value = ConfigValueWithKeyID(aKeyID,KEY_ISSUER_URL);
+ var result = DoCoolKeySetConfigValue(issuer_config_value,url);
+ resultCB(true);
+ }
+ return;
}
+ }
- }
+ req.onreadystatechange = callback;
+ req.send(null);
+
+ return true;
+}
+
+function ReadESCLog()
+{
+
+ const logFileName = "esc.log";
+
+ // Get executable directory
+
+ var file = Components.classes["(a)mozilla.org/file/directory_service;1"]
+ .getService(Components.interfaces.nsIProperties)
+ .get("ProfD", Components.interfaces.nsIFile);
+
+ file = file.parent;
+ file.append(logFileName);
+ var istream =
Components.classes["(a)mozilla.org/network/file-input-stream;1"]
+ .createInstance(Components.interfaces.nsIFileInputStream);
+
+ try {
+ istream.init(file, 0x01, 0444, 0);
+ istream.QueryInterface(Components.interfaces.nsILineInputStream);
+
+ } catch (e){
+
+ return null;
+ }
+
+ // read lines into array
+ var line = {}, lines = [], hasmore;
+ do {
+ hasmore = istream.readLine(line);
+
+ var value = line.value;
+
+ var colonIndex = value.indexOf(":");
+
+ value = value.substring(colonIndex + 1);
+
+ lines.push(value);
+ } while(hasmore);
+
+ istream.close();
+
+ return lines;
+
+}
+
+// Get the url form of the balloon tooltip icon
+// Only useful on Linux
+
+function GetESCNotifyIconPath(keyType,keyID)
+{
+ var path = null;
+ var def_image = "/components/icon.png";
+
+ var chrome_path = "/chrome/content/esc/";
+ var image = null;
+
+ var status;
+
+ try {
+ status = GetCoolKeyStatus(keyType, keyID);
+ } catch(e) {
+ status = 0;
+ }
+
+ if(status == 1) // no applet
+ {
+ image = chrome_path + "blank-card.png";
+ }
+ if(status == 2) // uninitialized
+ {
+ image = chrome_path + "initializecard.png";
+ }
+ if(status == 4) // enrolled
+ {
+ image = chrome_path + "enrolled-key.png";
+ }
+
+ if(!image)
+ image = def_image;
+
+ var file = Components.classes["(a)mozilla.org/file/directory_service;1"]
+ .getService(Components.interfaces.nsIProperties)
+ .get("CurProcD", Components.interfaces.nsIFile);
+
+ if(file)
+ file = file.parent;
+
+ if(file.path)
+ path = "file://" + file.path + image;
+
+ return path;
+}
+
+// New Alert Functions based on nsIPromptService
+
+function MyAlert(message)
+{
+ if(message)
+ DoMyAlert(message,getBundleString("escTitle"));
+}
+
+function DoMyAlert(message,title)
+{
+
+ if(!message || !title)
+ return; try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ var prompts =
Components.classes["(a)mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
+
+ prompts.alert(window,title,message);
+
+ } catch(e) {
+
+
+ alert("Problem with nsIPromptService " + e);
+ }
}
Index: GenericAuth.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/GenericAuth.js,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- GenericAuth.js 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ GenericAuth.js 13 Sep 2006 17:56:49 -0000 1.2
@@ -430,6 +430,18 @@
return text_node;
}
+function AddSpacer()
+{
+ var tSpacer = document.createElement("spacer");
+
+ if(!tSpacer)
+ return null;
+
+
+ return tSpacer;
+
+}
+
function AddButton(id,label)
{
@@ -586,9 +598,15 @@
if(last_row)
{
+ AddSpacerToNode(last_row,"1","min-height: 20px");
+ AddSpacerToNode(last_row,"1","min-height: 20px");
var button = AddButton("","Submit");
- button.setAttribute("oncommand" , "FormSubmit();");
- last_row.appendChild(button);
+ if(button)
+ button.setAttribute("oncommand" , "FormSubmit();");
+
+
+ if(button)
+ last_row.appendChild(button);
}
}
Index: TRAY.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/TRAY.js,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- TRAY.js 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ TRAY.js 13 Sep 2006 17:56:49 -0000 1.2
@@ -23,9 +23,40 @@
var gBaseWindow = 0;
+var gWindNotify = null;
+
loadStringBundle();
+//
+// Tray event Notify callback
+//
+function jsWindNotify() {}
+
+jsWindNotify.prototype = {
+
+ rhTrayWindEventNotify: function(aEvent,aEventData,aKeyData,aData1,aData2)
+ {
+ //alert("rhTrayWindEventNotify!!!! event " + aEvent);
+
+ NotifyESCOfTrayEvent(aEvent,aEventData,aKeyData,aData1,aData2);
+ },
+
+ QueryInterface: function(iid)
+ {
+ //alert("iid: " + iid);
+ if(!iid.equals(Components.interfaces.rhITrayWindNotify) &&
+ !iid.equals(Components.interfaces.nsISupports))
+ {
+ MyAlert(getBundleString("errorJsNotifyInterface"));
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ }
+ return this;
+ }
+};
+
+
+
//Initialize tray XPCOM object
// GECKO ONLY initialization
@@ -39,10 +70,20 @@
gBaseWindow = getBaseWindow();
+ if(gTray)
+ {
+ gWindNotify = new jsWindNotify;
+ if(gWindNotify)
+ gTray.setwindnotifycallback(gWindNotify);
+
+ //alert("setting tray notify callback " + gWindNotify);
+ }
+
} catch(e) {
-}
+ MyAlert("e " + e);
+}
TrayAddWindow();
@@ -92,7 +133,7 @@
}
catch (ex)
{
- alert(getBundleString("errorTrayIsInitialized"));
+ MyAlert(getBundleString("errorTrayIsInitialized"));
rv = null;
/* ignore no-interface exception */
}
@@ -115,7 +156,7 @@
gTray.showall();
} catch(e) {
- alert(getBundleString("errorShowAllWindows") + e);
+ MyAlert(getBundleString("errorShowAllWindows") + e);
return;
}
@@ -135,7 +176,7 @@
gTray.hideall();
} catch(e) {
- alert(getStringBundle("errorHideAllWindows") + e);
+ MyAlert(getStringBundle("errorHideAllWindows") + e);
return;
}
@@ -156,7 +197,7 @@
gTray.show(gBaseWindow);
} catch(e) {
- alert(getBundleString("errorShowWindow"));
+ MyAlert(getBundleString("errorShowWindow"));
return;
}
@@ -176,30 +217,50 @@
gTray.hide(gBaseWindow);
} catch(e) {
- alert(getBundleString("errorHideWindow"));
+ MyAlert(getBundleString("errorHideWindow"));
return;
}
}
-function TrayRemoveWindow()
+function TrayRemoveWindowNotify()
{
- if(gTray && gBaseWindow)
+ if(gTray && gBaseWindow && gWindNotify)
{
-
try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+ gTray.unsetwindnotifycallback(gWindNotify);
+
+
+ } catch(e) {
+ return;
+ }
+
+
+ }
+}
+
+function TrayRemoveWindow(doPreserveNotifyCallback)
+{
+ if(gTray && gBaseWindow)
+ {
+ try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
gTray.remove(gBaseWindow);
} catch(e) {
- alert(getBundleString("errorRemoveWindow") + e);
+ MyAlert(getBundleString("errorRemoveWindow") + e);
return;
}
+ if(gWindNotify && !doPreserveNotifyCallback)
+ gTray.unsetwindnotifycallback(gWindNotify);
}
}
@@ -226,38 +287,88 @@
}
+}
+function TraySendNotificationMessage(aTitle,aMessage,aSeverity,aTimeout,aIcon)
+{
+ if(!gHiddenPage)
+ return;
+
+ if(gTray && gBaseWindow)
+ {
+ try {
-}
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
-function TraySendNotificationMessage(aMessage)
-{
+ gTray.sendnotification(aTitle,aMessage,aSeverity,aTimeout,aIcon);
- if(gTray && gBaseWindow)
+ } catch(e) {
+ alert(getBundleString("errorTrayNotification") + e);
+ return;
+ }
+
+ }
+
+}
+
+
+function TrayHideNotificationIcon()
{
+ if(!gHiddenPage)
+ return;
- try {
+ if(gTray && gBaseWindow)
+ {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
+ try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
- gTray.sendnotification(aMessage);
+ gTray.hideicon();
} catch(e) {
- alert(getBundleString("errorTrayNotification") + e);
return;
}
+ }
}
+function TrayLoadedOK()
+{
+ var result = 0;
+ if(gTray)
+ result = 1;
+ return result;
+}
+
+function TrayShowNotificationIcon()
+{
+ if(!gHiddenPage)
+ return;
+
+ if(gTray && gBaseWindow)
+ {
+
+ try {
+
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
+ gTray.settooltipmsg(getBundleString("escTitle"));
+ gTray.showicon();
+
+ } catch(e) {
+ return;
+ }
+
+ }
}
+
//String bundling related functions
function loadStringBundle()
@@ -267,7 +378,6 @@
function getBundleString(string_id)
{
-
var str = null;
if(!string_id || !gStringBundle)
@@ -276,6 +386,5 @@
str = gStringBundle.getString(string_id);
return str;
-
}
Index: certinfo.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/certinfo.xul,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- certinfo.xul 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ certinfo.xul 13 Sep 2006 17:56:49 -0000 1.2
@@ -20,7 +20,7 @@
<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
<window
class="escwindow"
- id="esc-cert-window"
+ id="esc-window"
onload="ShowCertInfo();"
onunload="cleanup();"
title="&certInfoTitle;"
Index: config.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/config.xul,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- config.xul 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ config.xul 13 Sep 2006 17:56:49 -0000 1.2
@@ -20,9 +20,9 @@
<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
<window
class="escwindow"
- id="esc-config-window"
+ id="esc-window"
title="&escTitle;"
- onload="InitializeConfigUI()"
+ onload="InitializePhoneHomeConfigUI();"
width ="600"
height= "350"
onunload="cleanup();"
@@ -30,33 +30,21 @@
<stringbundle id="esc_strings"
src="chrome://esc/locale/esc.properties"/>
<script src="TRAY.js"/>
<script src="ESC.js"/>
- <toolbox flex="0">
- <toolbar id="esc-menubar">
- <menu id="nav-menu" label="&navigationMenu;">
- <menupopup id="file-popup">
- <menuitem label="&enrollmentMenuItem;"
oncommand="loadESC();"/>
- <menuitem label="&settingsMenuItem;"
oncommand="loadSETTINGS();"/>
- </menupopup>
- </menu>
- </toolbar>
- </toolbox>
-
- <groupbox>
-<hbox >
+<hbox class="logoBox" >
<image id="logoImage"/>
- <spacer flex="1"/>
+ <spacer class="horSpacerVeryShort"/>
<label class = "headLabelText" value="&configTitle;"/>
<spacer flex="1"/>
</hbox>
-</groupbox>
<vbox flex="1" >
-
- <groupbox >
+ <description class="messageText">
+ &tpsConfigDesc;
+ </description>
+ <groupbox class="outerGroupBox" >
<caption label="&editConfigValues;"/>
<spacer flex="1" style="min-height: 10px" />
<grid id ="ConfigTable" >
<columns>
-
<column />
<column flex = "1" />
<column flex = "1" />
@@ -64,24 +52,16 @@
<rows id="ConfigTableRows">
<row pack="center">
<label class="titleText" value="&tpsURIHeader;"
/>
- <textbox size="70" class="configTextBox"
id="tpsuri" value="" />
- <button id="testtpsurl" label="&doTest;"
oncommand="testTPSURI(null);"/>
+ <textbox size="70" class="configTextBox"
id="phonehomeuri" value="" />
+ <button class="mediumButon" id="testtpsurl"
label="&doTest;" oncommand="DoPhoneHomeTest();"/>
</row>
-
- <row pack="center">
- <label class="titleText" value =
"&escEnrollURIHeader;" />
- <textbox size="70" class="configTextBox"
id="tpsenrolluri" value="" />
- <button id="testenrollurl" label="&doTest;"
oncommand="testEnrollURI();"/>
- </row>
-
- <row>
- <button id="commitconfig" label= "&updateValues;"
oncommand="commitConfigValues();"/>
- </row>
-
</rows>
-
</grid>
+ <hbox>
+ <spacer flex ="1"/>
+ <button label="&escOK;"
oncommand="DoPhoneHomeConfigClose();" />
+ </hbox>
<spacer flex="1" style="min-height: 20px" />
</groupbox>
Index: esc.css
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.css,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- esc.css 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ esc.css 13 Sep 2006 17:56:49 -0000 1.2
@@ -15,11 +15,27 @@
* All rights reserved.
* END COPYRIGHT BLOCK **/
+p {
+
+ font-style: italic;
+}
+
+.invisibleWindow {
+
+ visibility: hidden ;
+
+}
.escwindow {
background: #ffffff url(bg.jpg) repeat-x;
font-family: arial;
font-size: 17pt;
+ padding: 10px;
+}
+
+#smallKeyImage {
+
+ list-style-image: url(esc-client-24.png);
}
#logoImage {
@@ -27,13 +43,80 @@
list-style-image: url(logo.gif);
}
+#cylonImage {
+
+ list-style-image: url(progress.7.gif);
+}
+
+#blankKeyImage {
+
+ list-style-image: url(blank-card.png);
+}
+
+#uninitializedKeyImage {
+ list-style-image: url(initializecard.png);
+}
+
+#enrolledKeyImage {
+
+ list-style-image: url(enrolled-key.png);
+}
+
+#passwordNone {
+ list-style-image: url(1-none.png);
+}
+
* {
font-family: "Arial";
font-size: 8pt;
}
+
+.logoBox {
+ margin: 5px;
+ padding: 5px;
+
+}
+
+.outerBoxMedium {
+
+ padding: 5px;
+
+}
+.outerGroupBox {
+ padding: 7px;
+}
+
+.messageText {
+ font-size: 9pt;
+ text-align: justify;
+
+}
+
+.captionText {
+ font-size: 11pt;
+}
+
+.boldMessageText {
+ font-size: 1.3em;
+ font-weight: bold;
+ text-align: justify;
+
+}
+
+.largeLabelText {
+ font-size: 20pt;
+ font-weight:bold;
+}
+
+.mediumLabelText {
+ font-size: 12pt;
+ font-weight:bold;
+ text-align: center;
+}
+
.headLabelText {
- font-size: 13pt;
+ font-size: 17pt;
font-weight:bold;
text-align: center;
}
@@ -44,6 +127,12 @@
font-weight: bold;
}
+.largeLabelText {
+
+ font-size: 13pt;
+ font-weight:bold;
+}
+
.rowLabelTextUninit {
font-size: 8pt;
@@ -54,25 +143,45 @@
}
.rowLabelText {
-
font-size: 8pt;
- font-weight: bold;
-
+ font-weight: normal;
}
.headerText {
- font-family: "Arial";
font-size: 12pt;
font-weight: bold;
}
+.buttonText {
+ font-size: 10pt;
+}
+
.verticalSpacer {
- min-height: 20px;
+ min-height: 2.0em;
}
+.progressMeter {
+ margin: 4px;
+ width: 12px;
+}
+
+.verticalSpacerShort {
+ min-height: 1em;
+}
+
+
+.horSpacerShort {
+
+ min-width: 2em;
+}
+
+.horSpacerVeryShort {
+ min-width: 1em;
+}
+
.authTitleText {
text-align: left;
@@ -101,7 +210,7 @@
.linkText {
font-family: "Arial";
- font-size: 8pt;
+ font-size: 1.2em;
}
#BindingTable {
@@ -120,6 +229,10 @@
font-size: 7pt;
}
+tr [COOLKeyPresent="yes"]{
+ background-color: rgb(255, 0, 0);
+}
+
.cylon {
font-size: 4pt;
position: relative;
@@ -131,15 +244,12 @@
width: 200px;
height: 20px;
- align: center;
}
.cylonEye {
-
- align: center;
font-weight: bold;
- font-size: 9pt;
+ font-size: 4pt;
}
#statusMsg {
@@ -148,7 +258,7 @@
.ProgressMeter {
position: relative;
- padding: 0px;
+ padding: 1px;
border: 1px solid rgb(60, 60, 60);
background-color: #ffffff;
text-align: center;
@@ -172,42 +282,11 @@
}
-.KeyTableHeader {
- color: rgb(0,0, 0);
- background-color: #ffffff;
- text-align: left;
-}
-#KeyTable td {
- background-color: #ffffff;
- padding-left: 3px;
- padding-right: 3px;
-};
-
-.TableDescriptionPanel {
- background-color: #ffffff);
- margin-right: 5px;
- margin-left: 5px;
- margin-bottom: 0px;
- margin-bottom: 5px;
- padding: 5px;
-}
-
-.PurchasePanel {
- width: 100%;
- text-align: center;
- padding-top: 5px;
- padding-bottom: 5px;
-}
-
-.NeedQuestionText {
- font-size: 16pt;
- font-weight: bold;
-}
-
.COOLHeaderText {
font-family: "Arial";
- font-size: 20pt;
+ font-size: 17pt;
font-weight: bold;
+ vertical-align: middle;
}
.ContentTable {
@@ -230,24 +309,38 @@
.PageHeader {
width: 100%;
border-bottom: solid black 1px;
- vertical-align: center;
+ vertical-align: middle;
background-color: #ffffff;
}
-.Bordered {
+.BorderedIFrame {
- border: grey solid 7px;
+ width: 600px;
+ height: 725px;
+ border: black solid 4px;
}
.SelectedRow {
- background-color: grey;
+ color: white;
+ background-color: #0033CC;
}
.UnSelectedRow {
+ color: black;
background-color: #ffffff;
}
+
+.mediumButton {
+ width: 100px;
+}
+
+.mediumWideBox {
+
+ min-width: 20em;
+
+}
Index: esc.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc.xul,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- esc.xul 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ esc.xul 13 Sep 2006 17:56:49 -0000 1.2
@@ -22,104 +22,143 @@
class="escwindow"
id="esc-window"
title="&escTitle;"
- onload="InitializeBindingTable()"
- width ="500"
+ onload="InitializeEnrollment()"
+ width ="600"
height= "350"
onunload="cleanup()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul...
-<stringbundle id="esc_strings"
src="chrome://esc/locale/esc.properties"/>
-<script src= "TRAY.js"/>
-<script src="ESC.js"/>
- <toolbar id="enroll-esc-menubar">
- <menu id="enroll-nav-menu" label="&navigationMenu;">
- <menupopup id="enroll-file-popup">
- <menuitem label="&settingsMenuItem;"
oncommand="loadSETTINGS();"/>
- <menuitem label="&configMenuItem;"
oncommand="loadCONFIG();"/>
- </menupopup>
- </menu>
- </toolbar>
- <vbox flex ="1" >
-
- <groupbox>
-<hbox >
- <image id="logoImage"/>
- <spacer flex="1"/>
- <label class = "headLabelText" value="&escTitle;"/>
- <spacer flex="1"/>
-</hbox>
-</groupbox>
-
-
- <!-- <spacer flex="1" /> -->
-
- <groupbox flex = "1" >
-
- <caption label = "&keysCaption;" />
- <grid id ="BindingTable" >
- <columns>
-
- <column flex = "1" />
- <column flex = "1" />
- <column flex = "1"/>
- <column flex = "1"/>
- <column flex = "1" />
- </columns>
- <rows id="BindingTableRows">
- <row pack="center">
-
- <label class="titleText" value="&keyIssuer;" />
- <spacer flex= "1" class = "horSpacerShort" />
- <label class="titleText" value="&keyIssuedTo;" />
- <spacer flex = "1" class="horSpacerShort"/>
- <label class="titleText" value="&keyStatus;"/>
- <spacer flex = "1" class="horSpacerShort"/>
- <label class="titleText" value="&keyProgress;"/>
-
- </row>
-
- <spacer flex = "1" class="verticalSpacer" />
- <row id="NoKeysRow">
-
- <label class="rowLabelTextUninit" id="NoKeysLabel" value
= "&noKeysPresent;" hidden="false"/>
-
- </row>
-
- </rows>
-
- </grid>
-
-<!-- <spacer flex="1" style="min-height: 20px" /> -->
-
- <hbox id="cylon1" class="cylonHBox" >
- <label class="titleText" id="operationtext"
value=""/>
- <label id="eye1" hidden="true" value="...."
class="cylonEye"> </label>
+ <stringbundle id="esc_strings"
src="chrome://esc/locale/esc.properties"/>
+ <script src= "TRAY.js"/>
+ <script src="ESC.js"/>
+ <tabbox id="tablist" hidden="true">
+ <tabs>
+ <tab label="Settings" oncommand="loadSETTINGS();"/>
+ <tab label="Configuration" oncommand="loadCONFIG();"/>
+ </tabs>
+ </tabbox>
+ <vbox flex ="1" >
+ <hbox class="logoBox" >
+ <image id="logoImage"/>
+ <spacer class = "horSpacerVeryShort"/>
+ <vbox>
+ <spacer flex="1"/>
+ <label class = "headLabelText"
value="&unenrolledDetected;" id="unenrolled-key-heading"/>
+
+ <label class = "headLabelText"
value="&noKeyDetected;" id="no-key-heading"
hidden="true"/>
+
+ <label class = "headLabelText"
value="&pleaseEnroll;" id="enrolling-key-heading"
hidden="false"/>
+
+ <spacer flex="1"/>
+ </vbox>
+ </hbox>
+ <groupbox flex="1" class="outerGroupBox" >
+ <description class="messageText"
id="detected-key-message" >
+ &detectedMessage;
+ </description>
+ <description class="messageText" id="enroll-key-message"
hidden="true">
+ &enrollMessage;
+ </description>
+ <vbox id="no_key_box" hidden="true">
+ <description class="boldMessageText">
+ &noKey;
+ </description>
+ <spacer flex="1" class="verticalSpacer"/>
+ <description class="messageText" >
+ &insertKey;
+ </description>
+ <spacer flex="2"/>
+ </vbox>
+ <vbox id="yes_key_box">
+ <spacer flex="1" class="verticalSpacer"/>
+ <description class="messageText">
+ &readyToProceed;
+ </description>
+
+ </vbox>
+ <spacer flex = "2"/>
+ <vbox id="key_enrollment_area" hidden="true">
+ <hbox>
+ <spacer flex = "1"/>
+ <groupbox flex = "1">
+ <caption label="&detectedKeyDetailsHeader;"/>
+ <vbox id="key_enrollment_row">
+ <hbox>
+ <spacer flex="1"/>
+ <progressmeter id="progress-id"
hidden="true"/>
+ <spacer flex="1"/>
+ </hbox>
+ <grid >
+ <columns>
+ <column/>
+ <column flex="1" />
+ <column flex = "1" />
+ </columns>
+ <rows>
+ <row>
+ <label value = "&keyIssuer;" />
+ <spacer flex ="1"/>
+ <label id="issuer-id" value
="&unknownIssuer;" />
+ </row>
+ <row>
+ <label value = "&keyStatus;"/>
+ <spacer flex = "1"/>
+ <label id="status-id" value
="&unknown;"/>
+ </row>
+ <row>
+ <label value = "&keyIssuedTo;"/>
+ <spacer flex = "1"/>
+ <label id="issued-to-id" value
="&unknown;"/>
+ </row>
+ </rows>
+ </grid>
+ <spacer flex="1"
class="verticalSpacer"/>
+ <hbox>
+ <spacer flex ="1" />
+ <image id="cylonImage"
hidden="true"/>
+ <spacer flex = "1"/>
+ </hbox>
+ </vbox>
+ </groupbox>
+ <groupbox>
+ <caption label = "&keyEnrollmentHeader;"/>
+ <spacer flex = "1"/>
+ <grid>
+ <columns>
+ <column/>
+ <column flex="1" />
+ </columns>
+ <rows>
+ <row>
+ <label control="pintf"
value="&pleaseEnterPassword;" maxlength="10"/>
+ <textbox id="pintf" type =
"password" onkeypress="EvaluatePasswordQuality();"/>
+ </row>
+ <row>
+ <label control="reenterpintf"
value="&pleaseReEnterPassword;" maxlength="10"/>
+ <textbox id="reenterpintf"
type="password" />
+ </row>
+ </rows>
+ </grid>
+ <vbox>
+ <label value="&passwordQuality;"/>
+ <hbox>
+ <spacer flex = "1"/>
+ <image id="password-image"
src="1-none.png"/>
+ <spacer flex="1"/>
+ </hbox>
+ </vbox>
+ </groupbox>
+ <spacer flex = "1"/>
+ </hbox>
+ </vbox>
+
+ <iframe id="esc-ui" flex="1" class="BorderedIFrame"
hidden="true"/>
+ </groupbox>
+ <hbox id = "enrollment_button_box">
+ <spacer flex = "4"/>
+ <button id="closebtn" label ="&closeNow;"
oncommand="HideEnrollmentPage()"/>
+ <button id="enrollbtn" label = "&enrollKeyNow;"
oncommand="DoShowFullEnrollmentUI();" hidden="true"
disabled="false"/>
+ <spacer class="horSpacerShort"/>
</hbox>
-
- <vbox>
- <groupbox flex = "1" >
- <caption label="&keyInformation;"/>
- <grid >
- <rows>
- <row>
- <label control="pintf" value="&enterKeyPin;"
maxlength="10"/>
- <textbox id="pintf" type = "password"/>
- </row>
- <row>
- <label control="reenterpintf"
value="&reEnterKeyPin;" maxlength="10"/>
- <textbox id="reenterpintf" type="password" />
- </row>
- <row>
- <button id="enrollbtn" label="&doEnroll;"
oncommand="DoEnrollCoolKey();"/>
- <button id="cancelbtn" label="&doCancel;"
oncommand="DoCancelOperation();"/>
- </row>
- </rows>
- </grid>
-
- </groupbox>
- </vbox>
-
- </groupbox>
- </vbox>
-
+</vbox>
</window>
Index: esc_browser.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/esc_browser.xul,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- esc_browser.xul 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ esc_browser.xul 13 Sep 2006 17:56:49 -0000 1.2
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="esc.css" type="text/css"?>
-<!-- ***** BEGIN COPYRIGHT BLOCK *****
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- ***** END COPYRIGHT BLOCK ***** -->
-
-<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
-<window
- class="escwindow"
- id="esc-html-window"
- title="&escTitle;"
- width ="600"
- height= "600"
- onload="loadESCEnrollUI();"
-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul...
-
-
- <script src="ESC.js"/>
- <toolbox flex="0">
- <toolbar id="esc-menubar">
- <menu id="nav-menu" label="&navigationMenu;">
- <menupopup id="file-popup">
- <menuitem label="&settingsMenuItem;"
oncommand="loadSETTINGS();"/>
- <menuitem label="&configMenuItem;"
oncommand="loadCONFIG();"/>
- </menupopup>
- </menu>
- </toolbar>
- </toolbox>
-
-
- <label class = "headLabelText" value="&escTitle;"/>
-
- <grid >
- <rows >
- <row>
- <image id="logoImage"/>
-
- </row>
- </rows>
- </grid>
-
- <iframe id="esc-ui" flex="1" class="Bordered"/>
-
-
-</window>
Index: settings.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/settings.xul,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- settings.xul 12 Jun 2006 23:39:51 -0000 1.1.1.1
+++ settings.xul 13 Sep 2006 17:56:49 -0000 1.2
@@ -20,136 +20,133 @@
<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
<window
class="escwindow"
- id="settings-window"
+ id="esc-window"
title="&escTitle;"
- onload="InitializeBindingTable()"
+ onload="InitializeAdminBindingList()"
onunload="cleanup()"
- width ="600"
- height= "450"
+ width ="720"
+ height= "460"
+ name="admin"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul...
- <stringbundle id="esc_strings"
src="chrome://esc/locale/esc.properties"/>
- <script src="TRAY.js"/>
- <script src="ESC.js"/>
-
- <hbox>
- <toolbar id="esc-settings-smenubar">
- <menu id="settings-nav-menu" label="&navigationMenu;">
- <menupopup id="settings-nav-popup">
- <menuitem label="&enrollmentMenuItem;"
oncommand="loadESC();"/>
- <menuitem label="&configMenuItem;"
oncommand="loadCONFIG();"/>
- </menupopup>
- </menu>
-
- <menu id="op-menu" label="&operationsMenu;">
-
- <menupopup id="op-popup">
- <menuitem id="menu-format-item" label="&doFormat;"
oncommand="DoFormatCoolKey();"/>
- <menuitem id="menu-reset-item" label="&doResetPin;"
oncommand="DoResetSelectedCoolKeyPIN();"/>
- <menuitem id="menu-info-item" label="&keyInfo;"
oncommand="DoShowKeyInfo();"/>
- </menupopup>
- </menu>
- </toolbar>
-
-</hbox>
-
-<groupbox>
-<hbox >
- <image id="logoImage"/>
- <spacer flex="1"/>
- <label class = "headLabelText" value="&settingsTitle;"/>
- <spacer flex="1"/>
-</hbox>
-</groupbox>
- <vbox flex = "1">
- <vbox flex = "4">
-
-<groupbox flex="1" >
-<caption label="&keysCaption;"/>
-
-<grid id ="BindingTable" >
-<columns>
-
- <column flex = "1" />
- <column flex = "1" />
- <column flex = "1" />
- <column flex = "1"/>
- <column flex = "1"/>
-</columns>
-<rows id="BindingTableRows">
- <row pack="center">
-
- <label class="titleText" value="&keyIssuer;" />
- <spacer flex= "1" class = "horSpacerShort" />
- <label class="titleText" value="&keyIssuedTo;" />
- <spacer flex = "1" class="horSpacerShort"/>
- <label class="titleText" value="&keyStatus;"/>
- <spacer flex = "1" class="horSpacerShort"/>
- <label class="titleText" value="&keyProgress;"/>
-
- </row>
-
- <spacer flex = "1" class="verticalSpacer" />
- <row id="NoKeysRow" >
-
- <label class="rowLabelTextUninit" id="NoKeysLabel" value =
"&noKeysPresent;" hidden="false"/>
-
- </row>
-
-</rows>
-
-</grid>
-
-<hbox id="cylon1" class="cylonHBox" >
-
- <label class="titleText" id="operationtext" value=""
/>
- <label id="eye1" mode="determined" value = "..."
hidden="true" class="cylonEye"> </label>
-</hbox>
-
- <groupbox flex = "1" >
- <caption label ="Key Information"/>
- <grid >
- <rows>
- <row>
- <label control="pintf" value="&enterKeyPin;"
maxlength="10"/>
- <textbox id="pintf" type = "password"/>
- </row>
- <row>
- <label control="reenterpintf"
value="&reEnterKeyPin;" maxlength="10"/>
- <textbox id="reenterpintf" type="password" />
- </row>
- </rows>
- </grid>
-
- </groupbox>
-
-</groupbox>
-
-<groupbox >
-<caption label="&keyOperationsCaption;" />
-<vbox flex = "1">
-<label class = "headLabelText" value =
"&chooseKeyOperation;"/>
-<spacer flex = "1" class="verticalSpacer" />
-<hbox >
-
-<spacer flex = "1" />
-
-
-<button id="resetpinbtn" label="&doResetPin;"
oncommand="DoResetSelectedCoolKeyPIN();"/>
-<spacer flex = "1" />
-
-<button id="keyinfobtn" label="&doShowKeyInfo;"
oncommand="DoShowKeyInfo()" />
-<spacer flex = "1" />
-
-
-<button id="cancelbtn" label="&doCancel;"
oncommand="DoCancelOperation();"/>
-<spacer flex = "1" />
-</hbox>
-<spacer flex = "1" class = "verticalSpacer" />
-</vbox>
-
-</groupbox>
-
-</vbox>
-</vbox>
+ <stringbundle id="esc_strings"
src="chrome://esc/locale/esc.properties"/>
+ <script src="TRAY.js"/>
+ <script src="ESC.js"/>
+ <tabbox id="tablist" hidden="true">
+ <tabs>
+ <tab label="Enrollment" oncommand="loadESC();"/>
+ <tab label="Configuration"
oncommand="loadCONFIG();"/>
+ </tabs>
+ </tabbox>
+ <hbox class="logoBox">
+ <image id="logoImage"/>
+ <spacer class = "horSpacerVeryShort"/>
+ <vbox>
+ <spacer flex="1"/>
+ <label class="headLabelText"
value="&administerKeys;"/>
+ <spacer flex="1"/>
+ </vbox>
+ </hbox>
+ <groupbox flex ="1" orient="vertical"
class="outerGroupBox">
+ <vbox id="administer-message-id">
+ <spacer flex="1"/>
+ <description class="messageText">
+ &administerMessage;
+ </description>
+ </vbox>
+ <hbox flex="1">
+ <groupbox flex="1" >
+ <caption label="&pluggedInCards;"
class="captionText"/>
+ <vbox id="admin-no-keys-area">
+ <spacer flex ="1"/>
+ <description class="messageText">
+ &adminNoKeysMessage;
+ </description>
+ <spacer flex = "1"/>
+ </vbox>
+ <listbox id="AdminBindingList" flex="2" >
+ <listcols>
+ <listcol/>
+ <listcol flex="1"/>
+ <listcol flex="1"/>
+ <listcol flex="1"/>
+ <listcol flex="1"/>
+ </listcols>
+ <listhead>
+ <listheader />
+ <listheader flex="1" class="headerText"
label="&keyIssuer;"/>
+ <listheader flex="1" class="headerText"
label="&keyIssuedTo;"/>
+ <listheader flex="1" class="headerText"
label="&keyStatus;"/>
+ <listheader flex="1" class="headerText"
label="&keyProgress;"/>
+ </listhead>
+ </listbox>
+ </groupbox>
+ <groupbox flex="1" class="mediumWideBox"
align="center">
+ <caption class="captionText"
label="&detectedKeyDetailsHeader;"/>
+ <hbox class="outerBoxMedium" align="center">
+ <image id="admin-details-image"
src="blank-cardx2.png"/>
+ <vbox class="outerGroupBox">
+ <label id="admin-key-details-label"
value="&blankKeyLabel;" class ="mediumLabelText"/>
+ </vbox>
+ </hbox>
+
+ <!-- <spacer class="verticleSpacerShort"/> -->
+ <vbox id="password-area-id" hidden="true" >
+ <grid>
+ <columns>
+ <column flex="0"/>
+ </columns>
+ <rows>
+ <row>
+ <label control="pintf"
value="&pleaseEnterPassword;" maxlength="10"/>
+ </row>
+ <row>
+ <textbox id="pintf" type =
"password" />
+ </row>
+ <row>
+ <label control="reenterpintf"
value="&pleaseReEnterPassword;" maxlength="10"/>
+ </row>
+ <row>
+ <textbox id="reenterpintf"
type="password" />
+ </row>
+ <spacer class="verticalSpacer"/>
+ <row>
+ <label value="&passwordQuality;"/>
+ </row>
+ <row>
+ <image id="password-image"
src="1-none.png"/>
+ <spacer flex = "1"/>
+ </row>
+ <row>
+ <spacer class="verticalSpacerShort"/>
+ </row>
+ </rows>
+ </grid>
+ </vbox>
+
+ <vbox class="outerBoxMedium" >
+ <description id="admin-details-message"
class="messageText" hidden="true">
+ &adminDetailsMessage;
+ <spacer class="verticalSpacer"/>
+ </description>
+
+ <button class="buttonText"
id="formatbtn" label="&doFormat;"
oncommand="DoFormatCoolKey()" disabled="true" hidden =
"false"/>
+
+ <button class="buttonText"
id="resetpinbtn" label="&doResetPin;"
oncommand="DoCollectPassword('resetpin');" disabled="true"
hidden="false"/>
+
+ <button class="buttonText"
id="enrollbtn" label="&doEnroll;"
oncommand="DoCollectPassword('enroll');" disabled="true"
hidden="false"/>
+
+ <button class="buttonText"
id="viewcertsbtn" label="&doViewCerts;"
oncommand="launchCertViewer()" disabled="true"
hidden="false"/>
+
+ <button class="buttonText"
id="advancedbtn" label="&advancedInfo;" disabled="true"
hidden="false" oncommand="DoShowAdvancedInfo();"/>
+
+ </vbox>
+ </groupbox>
+ </hbox>
+ <hbox id = "enrollment_button_box" >
+ <spacer flex = "1"/>
+ <button class="buttonText" id="closebtn" label
="&closeAdminLater;" oncommand="HideAdminPage();"/>
+ <spacer class="horSpacerShort"/>
+ </hbox>
+ </groupbox>
</window>