home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / komunikace / kmeleon / K-Meleon1.1.3en-US.exe / chrome / embed.jar / kmprefs / content / pref-privacy.xul < prev    next >
Extensible Markup Language  |  2007-04-23  |  5KB  |  125 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet type="text/css" href="chrome://global/skin/"?>
  3. <?xul-overlay href="chrome://kmprefs/content/kmprefs/ovrl-history.xul"?>
  4. <?xul-overlay href="chrome://kmprefs/content/kmprefs/ovrl-javascript.xul"?>
  5. <?xul-overlay href="chrome://kmprefs/content/kmprefs/ovrl-referrer.xul"?>
  6. <!DOCTYPE page SYSTEM "chrome://kmprefs/locale/pref-privacy.dtd">
  7. <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
  8. id="prefPrivacy" onload="init()">
  9.  
  10. <stringbundle id="pref_bundle" src="chrome://kmprefs/locale/pref.properties"/>
  11.  
  12. <script type="application/x-javascript" src="chrome://kmprefs/content/pref.js"/>
  13. <script type="application/x-javascript">
  14. <![CDATA[
  15. function init() {
  16.     initCheckbox("signon.rememberSignons"); setInterval("initCheckbox('signon.rememberSignons')",100);
  17.     Cookies.init(); setInterval("Cookies.init()",100);
  18.     History.init();
  19.     Referrer.init();
  20. }
  21.  
  22. var Cookies = {
  23.  
  24. init: function() {
  25.     initCheckbox("network.cookie.alwaysAcceptSessionCookies");
  26.     initTextbox("network.cookie.lifetime.days",false);
  27.     initRadiogroup("network.cookie.cookieBehavior");
  28.     initRadiogroup("network.cookie.lifetimePolicy");
  29.     this.initAcceptance();
  30. },
  31. initAcceptance: function() {
  32.     if("@mozilla.org/cookie-consent;1" in Components.classes)
  33.         document.getElementById("p3p").removeAttribute("hidden");
  34.     var elem = document.getElementById("network.cookie.cookieBehavior");
  35.     document.getElementById("network.cookie.lifetimePolicy").disabled = (elem.value==2);
  36.     document.getElementById("network.cookie.lifetime.days").nextSibling.disabled = (elem.value==2);
  37.     document.getElementById("cookieP3P").disabled = (elem.value!=3);
  38.     this.initLifetime();
  39. },
  40. initLifetime: function() {
  41.     var elem = document.getElementById("network.cookie.lifetimePolicy");
  42.     document.getElementById("network.cookie.alwaysAcceptSessionCookies").disabled = (elem.value!=1);
  43.     document.getElementById("network.cookie.lifetime.days").disabled = (elem.value!=3);
  44. },
  45. toggleAcceptance: function() {
  46.     toggleRadiogroup("network.cookie.cookieBehavior");
  47.     this.initAcceptance();
  48. },
  49. toggleLifetime: function() {
  50.     toggleRadiogroup("network.cookie.lifetimePolicy");
  51.     this.initLifetime();
  52.     if(document.getElementById("network.cookie.lifetimePolicy").value==3) document.getElementById("network.cookie.lifetime.days").focus();
  53. }
  54.  
  55. };
  56. ]]>
  57. </script>
  58.  
  59. <vbox flex="1" style="overflow:auto">
  60.   <dialogheader title="&privacy.header;"/>
  61.   <separator class="thin"/>
  62.   <tabcontrol flex="1">
  63.     <tabbox flex="1">
  64.       <tabs>
  65.         <tab label="&general;"/>
  66.         <tab label="&history.label;"/>
  67.         <tab label="&privacy.paranoia;"/>
  68.       </tabs>
  69.       <tabpanels flex="1">
  70.         <tabpanel flex="1" orient="vertical" style="overflow:auto">
  71. <!-- General -->
  72. <separator class="thin"/>
  73. <checkbox oncommand="toggleCheckbox(this.id)" id="signon.rememberSignons" label="&privacy.signons;" disabled="true"/>
  74. <description>&privacy.protect;</description>
  75. <separator class="thick"/>
  76. <hbox>
  77.   <groupbox flex="1">
  78.     <caption label="&cookies.accept;"/>
  79.     <radiogroup oncommand="Cookies.toggleAcceptance()" id="network.cookie.cookieBehavior">
  80.       <radio disabled="true" value="2" label="&cookies.accept.never;"/>
  81.       <radio disabled="true" value="0" label="&cookies.accept.always;"/>
  82.       <radio disabled="true" value="1" label="&cookies.accept.noForeign;"/>
  83.       <vbox id="p3p" hidden="true">
  84.         <radio disabled="true" value="3" label="&cookies.accept.p3p;"/>
  85.         <hbox>
  86.           <button id="cookieP3P" label="&cookies.view.p3p;" oncommand="window.openDialog('chrome://communicator/content/permissions/cookieP3P.xul','_blank','modal,centerscreen')" style="margin-left:2.25em"/>
  87.         </hbox>
  88.       </vbox>
  89.     </radiogroup>
  90.   </groupbox>
  91.   <groupbox flex="1">
  92.     <caption label="&cookies.keep;"/>
  93.     <radiogroup oncommand="Cookies.toggleLifetime()" id="network.cookie.lifetimePolicy">
  94.       <radio value="0" label="&cookies.keep.normally;"/>
  95.       <radio value="2" label="&cookies.keep.session;"/>
  96.       <hbox align="center">
  97.         <radio value="3" label="&cookies.keep.daysBefore;"/>
  98.         <textbox id="network.cookie.lifetime.days" size="4" class="uri-element" oninput="setIntPref(this.id,this.value)"/>
  99.         <label value="&cookies.keep.daysAfter;"/>
  100.       </hbox>
  101.       <radio value="1" label="&cookies.keep.ask;"/>
  102.       <checkbox oncommand="toggleCheckbox(this.id)" id="network.cookie.alwaysAcceptSessionCookies" label="&cookies.keep.ask.notForSession;" style="margin-left:2em"/>
  103.     </radiogroup>
  104.   </groupbox>
  105. </hbox>
  106. <!-- General -->
  107.     </tabpanel>
  108.         <tabpanel flex="1" orient="vertical" style="overflow:auto">
  109. <!-- History -->
  110. <separator class="thin"/>
  111. <vbox id="history"/>
  112. <!-- History -->
  113.     </tabpanel>
  114.         <tabpanel flex="1" orient="vertical" style="overflow:auto">
  115. <!-- Paranoia -->
  116. <separator class="thin"/>
  117. <groupbox id="referrer"/>
  118. <!-- Paranoia -->
  119.     </tabpanel>
  120.       </tabpanels>
  121.     </tabbox>
  122.   </tabcontrol>
  123. </vbox>
  124.  
  125. </page>