Skip to content

Commit

Permalink
Merge from openinbrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
tipichris committed Oct 27, 2011
2 parents 28952d4 + e1a333d commit f308be3
Show file tree
Hide file tree
Showing 12 changed files with 350 additions and 208 deletions.
29 changes: 23 additions & 6 deletions content/options.js
Expand Up @@ -56,9 +56,26 @@ function setCustomOptViz() {
ami_elements[idx].disabled = true;
}
}
// if (document.getElementById("proto_menu").value == 'custom') {
// document.getElementById("tbdialout-options-customoptions").collapsed = false;
// } else {
// document.getElementById("tbdialout-options-customoptions").collapsed = true;
// }
}
setCustomAuthViz();
}

function setCustomAuthViz () {
if (document.getElementById("proto_menu").value == 'custom') {
var custom_auth_elements = new Array();
custom_auth_elements.push(document.getElementById("customuser_text"));
custom_auth_elements.push(document.getElementById("custompass_text"));
var loadhidden = document.getElementById("custominbackground_cb").checked;
var idx;
for (idx in custom_auth_elements) {
if (loadhidden) {
custom_auth_elements[idx].disabled = false;
} else {
custom_auth_elements[idx].disabled = true;
}
}
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch("extensions.tbdialout.");
prefs.setBoolPref("custominbackground", loadhidden);
}
}
15 changes: 12 additions & 3 deletions content/options.xul
Expand Up @@ -49,14 +49,16 @@
<preference id="customurl_pref" name="extensions.tbdialout.customurl" type="string"/>
<preference id="customuser_pref" name="extensions.tbdialout.customuser" type="string"/>
<preference id="custompass_pref" name="extensions.tbdialout.custompass" type="string"/>
<preference id="custominbackground_pref" name="extensions.tbdialout.custominbackground" type="bool" />
<preference id="amichannel_pref" name="extensions.tbdialout.ami.channel" type="string"/>
<preference id="amicontext_pref" name="extensions.tbdialout.ami.context" type="string"/>
<preference id="amihost_pref" name="extensions.tbdialout.ami.host" type="string"/>
<preference id="amiport_pref" name="extensions.tbdialout.ami.port" type="int"/>
<preference id="amiuser_pref" name="extensions.tbdialout.ami.user" type="string"/>
<preference id="amisecret_pref" name="extensions.tbdialout.ami.secret" type="string"/>
<preference id="amicallerid_pref" name="extensions.tbdialout.ami.callerid" type="string"/>
</preferences>

<commandset><command id="custominbackground_change" oncommand="setCustomAuthViz()"/></commandset>
<grid flex="1">

<columns>
Expand Down Expand Up @@ -114,6 +116,10 @@
<label class="tbdocustomoptions" control="custompass_text" value="&tbdocustompass_text.label;:" accesskey="&tbdocustompass_text.accesskey;"/>
<textbox class="tbdocustomoptions" id="custompass_text" preference="custompass_pref" size="15" type="password" />
</row>
<row align="center">
<!-- <label class="tbdocustomoptions" control="customexternalapp_cb" value="&tbdocustomexternalapp_cb.label;:" accesskey="&tbdocustomexternalapp_cb.accesskey;"/> -->
<checkbox class="tbdocustomoptions" id="custominbackground_cb" preference="custominbackground_pref" label="&tbdocustominbackground_cb.label;" accesskey="&tbdocustominbackground_cb.accesskey;" command="custominbackground_change" />
</row>
</rows>
</grid>
</groupbox>
Expand Down Expand Up @@ -152,11 +158,14 @@
<label class="tbdoamioptions" control="amicontext_text" value="&tbdoamicontext_text.label;:" accesskey="&tbdoamicontext_text.accesskey;"/>
<textbox class="tbdoamioptions" id="amicontext_text" preference="amicontext_pref" size="15" />
</row>

<row align="center">
<label class="tbdoamioptions" control="amicallerid_text" value="&tbdoamicallerid_text.label;:" accesskey="&tbdoamicallerid_text.accesskey;"/>
<textbox class="tbdoamioptions" id="amicallerid_text" preference="amicallerid_pref" size="15" />
</row>
</rows>
</grid>
</groupbox>

<label class="text-link" href="http://www.oak-wood.co.uk/tbdialout" value="&tbdconfighelp_text.label;" />
</prefpane>
<script src="options.js"/>
</prefwindow>

0 comments on commit f308be3

Please sign in to comment.