home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 May / PCWorld_2003-05_cd.bin / Komunik / phoenix / chrome / comm.jar / content / cookie / pref-popups.xul < prev   
Extensible Markup Language  |  2002-09-18  |  4KB  |  117 lines

  1. <?xml version="1.0"?> 
  2.  
  3. <!-- ***** BEGIN LICENSE BLOCK *****
  4.    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.    -
  6.    - The contents of this file are subject to the Mozilla Public License Version
  7.    - 1.1 (the "License"); you may not use this file except in compliance with
  8.    - the License. You may obtain a copy of the License at
  9.    - http://www.mozilla.org/MPL/
  10.    -
  11.    - Software distributed under the License is distributed on an "AS IS" basis,
  12.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.    - for the specific language governing rights and limitations under the
  14.    - License.
  15.    -
  16.    - The Original Code is mozilla.org code.
  17.    -
  18.    - The Initial Developer of the Original Code is
  19.    - Netscape Communications Corporation.
  20.    - Portions created by the Initial Developer are Copyright (C) 2002
  21.    - the Initial Developer. All Rights Reserved.
  22.    -
  23.    - Contributor(s):
  24.    -
  25.    - Alternatively, the contents of this file may be used under the terms of
  26.    - either the GNU General Public License Version 2 or later (the "GPL"), or
  27.    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.    - in which case the provisions of the GPL or the LGPL are applicable instead
  29.    - of those above. If you wish to allow use of your version of this file only
  30.    - under the terms of either the GPL or the LGPL, and not to allow others to
  31.    - use your version of this file under the terms of the MPL, indicate your
  32.    - decision by deleting the provisions above and replace them with the notice
  33.    - and other provisions required by the LGPL or the GPL. If you do not delete
  34.    - the provisions above, a recipient may use your version of this file under
  35.    - the terms of any one of the MPL, the GPL or the LGPL.
  36.    -
  37.    - ***** END LICENSE BLOCK ***** -->
  38.  
  39. <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
  40.  
  41. <!DOCTYPE page [
  42. <!ENTITY % prefPopupsDTD SYSTEM "chrome://cookie/locale/pref-popups.dtd" >
  43. %prefPopupsDTD;
  44. ]>
  45.  
  46. <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  47.       id="popupsPanel"
  48.       onload="init()"
  49.       headertitle="&title;">
  50.           
  51. <script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
  52.  
  53. <script type="application/x-javascript">
  54. <![CDATA[
  55.   var _elementIDs = ["popupPolicy","popupCustom"];
  56.   var domCbox = null;
  57.   var policyButton;
  58.   var customCbox;
  59.   var manageButton;
  60.  
  61.   function init() {
  62.     parent.initPanel('chrome://cookie/content/pref-popups.xul');
  63.     policyButton = document.getElementById("popupPolicy");
  64.     customCbox = document.getElementById("popupCustom");
  65.     manageButton = document.getElementById("popupView");
  66.     setButtons(true);
  67.   }
  68.   function setButtons(all) {
  69.     if (all)
  70.       customCbox.disabled = policyButton.value == 2;
  71.     manageButton.disabled = policyButton.value == 2 || !customCbox.checked;
  72.   }
  73.   function selectPolicy() {
  74.     if (!domCbox) {
  75.       // any selection clears the competing DOM pref
  76.       domCbox = document.getElementById("popupDomShadow");
  77.       _elementIDs.push("popupDomShadow");
  78.       domCbox.checked = false;
  79.     }
  80.     setButtons(true);
  81.   }
  82.   function selectCustom() {
  83.     setButtons(false);
  84.   }
  85. ]]>
  86. </script>
  87.  
  88. <groupbox id="popupsArea">
  89.   <caption label="&popupBlocking.label;"/>
  90.  
  91.   <description>&popupDetails;</description>
  92.  
  93.   <radiogroup id="popupPolicy" prefstring="privacy.popups.policy">
  94.     <radio value="1" label="&popupAllow.label;"
  95.             accesskey="&popupAllow.accesskey;"
  96.             oncommand="selectPolicy()"/>
  97.       <checkbox id="popupCustom" label="&popupCustom.label;"
  98.                 style="margin-left:2em"
  99.                 prefstring="privacy.popups.usecustom"
  100.                 oncommand="selectCustom(this)"/>
  101.     <radio value="2" label="&popupReject.label;"
  102.             accesskey="&popupReject.accesskey;"
  103.             oncommand="selectPolicy()"/>
  104.   </radiogroup>
  105.  
  106.   <checkbox id="popupDomShadow" hidden="true"
  107.             prefstring="dom.disable_open_during_load"/>
  108.  
  109.   <hbox pack="end">
  110.     <button id="popupView" label="&popupView.label;"
  111.             accesskey="&popupView.accesskey;" oncommand="viewPopups();"/>
  112.   </hbox>
  113.  
  114. </groupbox>
  115.  
  116. </page>
  117.