removing security specific commands.
Adding protocol icon support to xul. git-svn-id: svn://10.0.0.236/trunk@43458 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
9fd5d55a83
commit
c0cec0bc9c
@ -20,7 +20,6 @@
|
||||
var prefwindow = null;
|
||||
var appCoreName = "";
|
||||
var defaultStatus = "default status text";
|
||||
var debugSecurity = false; // Set this true to enable Security chrome testing.
|
||||
var explicitURL = false;
|
||||
|
||||
function UpdateHistory(event)
|
||||
@ -849,42 +848,28 @@ function OpenSearch(tabName)
|
||||
dump("Can't find status broadcaster!\n");
|
||||
}
|
||||
}
|
||||
|
||||
function onSecurity() {
|
||||
var security = document.getElementById("Browser:Security");
|
||||
var indicator = document.getElementById("security-box");
|
||||
var icon = document.getElementById("security-button");
|
||||
|
||||
function onProtocolClick()
|
||||
{
|
||||
//TODO: need to hookup to page info
|
||||
var status = document.getElementById("Browser:Status");
|
||||
if ( status ) {
|
||||
//var msg = "Hey, don't touch me there!";
|
||||
//status.setAttribute("value",msg);
|
||||
}
|
||||
}
|
||||
function onProtocolChange()
|
||||
{
|
||||
var protocolIcon = document.getElementById("Browser:ProtocolIcon");
|
||||
var uri = protocolIcon.getAttribute("uri");
|
||||
var icon = document.getElementById("protocol-icon");
|
||||
|
||||
if ( security.getAttribute("secure") == "true" ) {
|
||||
indicator.setAttribute("class","secure");
|
||||
icon.setAttribute("class","secure");
|
||||
} else {
|
||||
indicator.setAttribute("class","insecure");
|
||||
icon.setAttribute("class","insecure");
|
||||
}
|
||||
icon.setAttribute("src",uri);
|
||||
}
|
||||
|
||||
function securityOn() {
|
||||
// Set debugSecurity (at top of file) to turn this code on.
|
||||
if ( !debugSecurity ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "false" ) {
|
||||
security.setAttribute("secure","true");
|
||||
}
|
||||
}
|
||||
function securityOff() {
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "true" ) {
|
||||
security.setAttribute("secure","false");
|
||||
}
|
||||
}
|
||||
function doTests() {
|
||||
// Turn security on.
|
||||
securityOn();
|
||||
}
|
||||
|
||||
var startTime = 0;
|
||||
function onProgress() {
|
||||
var throbber = document.getElementById("Browser:Throbber");
|
||||
|
||||
@ -112,7 +112,7 @@ Contributor(s): ______________________________________. -->
|
||||
<broadcaster id="canPrint"/>
|
||||
<broadcaster id="Browser:LoadingProgress"/>
|
||||
<broadcaster id="Browser:Status"/>
|
||||
<broadcaster id="Browser:Security" secure="false"/>
|
||||
<broadcaster id="Browser:ProtocolIcon" uri=""/>
|
||||
<broadcaster id="Browser:Throbber" busy="false"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
|
||||
@ -537,7 +537,7 @@ Contributor(s): ______________________________________. -->
|
||||
|
||||
<titledbutton value="¬ifCom.label;" onclick="doTests()"/>
|
||||
|
||||
<box id="security-box" class="insecure" align="horizontal" flex="100%">
|
||||
<box id="state-box" align="horizontal" flex="100%">
|
||||
<box align="vertical" style="width:100px">
|
||||
<spring flex="100%"/>
|
||||
<progressmeter id="statusbar-icon" mode="normal" align="horizontal" value="0" onclick="dumpProgress()">
|
||||
@ -554,9 +554,9 @@ Contributor(s): ______________________________________. -->
|
||||
<spring flex="100%"/>
|
||||
|
||||
<titledbutton align="left" value="&buildId.label;" style="font-family:sans-serif;font-size:2.5mm;"/>
|
||||
|
||||
<titledbutton id="security-button" class="insecure" value="&security-button.label;" align="left">
|
||||
<observes element="Browser:Security" attribute="secure" onchange="onSecurity()"/>
|
||||
|
||||
<titledbutton id="protocol-icon" uri="..." src="" align="left" onclick="onProtocolClick()">
|
||||
<observes element="Browser:ProtocolIcon" attribute="uri" onchange="onProtocolChange()"/>
|
||||
</titledbutton>
|
||||
|
||||
</box>
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
var prefwindow = null;
|
||||
var appCoreName = "";
|
||||
var defaultStatus = "default status text";
|
||||
var debugSecurity = false; // Set this true to enable Security chrome testing.
|
||||
var explicitURL = false;
|
||||
|
||||
function UpdateHistory(event)
|
||||
@ -849,42 +848,28 @@ function OpenSearch(tabName)
|
||||
dump("Can't find status broadcaster!\n");
|
||||
}
|
||||
}
|
||||
|
||||
function onSecurity() {
|
||||
var security = document.getElementById("Browser:Security");
|
||||
var indicator = document.getElementById("security-box");
|
||||
var icon = document.getElementById("security-button");
|
||||
|
||||
function onProtocolClick()
|
||||
{
|
||||
//TODO: need to hookup to page info
|
||||
var status = document.getElementById("Browser:Status");
|
||||
if ( status ) {
|
||||
//var msg = "Hey, don't touch me there!";
|
||||
//status.setAttribute("value",msg);
|
||||
}
|
||||
}
|
||||
function onProtocolChange()
|
||||
{
|
||||
var protocolIcon = document.getElementById("Browser:ProtocolIcon");
|
||||
var uri = protocolIcon.getAttribute("uri");
|
||||
var icon = document.getElementById("protocol-icon");
|
||||
|
||||
if ( security.getAttribute("secure") == "true" ) {
|
||||
indicator.setAttribute("class","secure");
|
||||
icon.setAttribute("class","secure");
|
||||
} else {
|
||||
indicator.setAttribute("class","insecure");
|
||||
icon.setAttribute("class","insecure");
|
||||
}
|
||||
icon.setAttribute("src",uri);
|
||||
}
|
||||
|
||||
function securityOn() {
|
||||
// Set debugSecurity (at top of file) to turn this code on.
|
||||
if ( !debugSecurity ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "false" ) {
|
||||
security.setAttribute("secure","true");
|
||||
}
|
||||
}
|
||||
function securityOff() {
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "true" ) {
|
||||
security.setAttribute("secure","false");
|
||||
}
|
||||
}
|
||||
function doTests() {
|
||||
// Turn security on.
|
||||
securityOn();
|
||||
}
|
||||
|
||||
var startTime = 0;
|
||||
function onProgress() {
|
||||
var throbber = document.getElementById("Browser:Throbber");
|
||||
|
||||
@ -112,7 +112,7 @@ Contributor(s): ______________________________________. -->
|
||||
<broadcaster id="canPrint"/>
|
||||
<broadcaster id="Browser:LoadingProgress"/>
|
||||
<broadcaster id="Browser:Status"/>
|
||||
<broadcaster id="Browser:Security" secure="false"/>
|
||||
<broadcaster id="Browser:ProtocolIcon" uri=""/>
|
||||
<broadcaster id="Browser:Throbber" busy="false"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
|
||||
@ -537,7 +537,7 @@ Contributor(s): ______________________________________. -->
|
||||
|
||||
<titledbutton value="¬ifCom.label;" onclick="doTests()"/>
|
||||
|
||||
<box id="security-box" class="insecure" align="horizontal" flex="100%">
|
||||
<box id="state-box" align="horizontal" flex="100%">
|
||||
<box align="vertical" style="width:100px">
|
||||
<spring flex="100%"/>
|
||||
<progressmeter id="statusbar-icon" mode="normal" align="horizontal" value="0" onclick="dumpProgress()">
|
||||
@ -554,9 +554,9 @@ Contributor(s): ______________________________________. -->
|
||||
<spring flex="100%"/>
|
||||
|
||||
<titledbutton align="left" value="&buildId.label;" style="font-family:sans-serif;font-size:2.5mm;"/>
|
||||
|
||||
<titledbutton id="security-button" class="insecure" value="&security-button.label;" align="left">
|
||||
<observes element="Browser:Security" attribute="secure" onchange="onSecurity()"/>
|
||||
|
||||
<titledbutton id="protocol-icon" uri="..." src="" align="left" onclick="onProtocolClick()">
|
||||
<observes element="Browser:ProtocolIcon" attribute="uri" onchange="onProtocolChange()"/>
|
||||
</titledbutton>
|
||||
|
||||
</box>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user