home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / cookie / p3pDialog.xul < prev    next >
Extensible Markup Language  |  2003-06-07  |  4KB  |  118 lines

  1. <?xml version="1.0"?>
  2. <!-- 
  3.    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.    -
  5.    - The contents of this file are subject to the Mozilla Public License Version
  6.    - 1.1 (the "License"); you may not use this file except in compliance with
  7.    - the License. You may obtain a copy of the License at
  8.    - http://www.mozilla.org/MPL/
  9.    -
  10.    - Software distributed under the License is distributed on an "AS IS" basis,
  11.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.    - for the specific language governing rights and limitations under the
  13.    - License.
  14.    -
  15.    - The Original Code is Mozilla.org code.
  16.    -
  17.    - The Initial Developer of the Original Code is
  18.    - Netscape Communications Corp.
  19.    - Portions created by Netscape Communications Corp are Copyright (C) 2001
  20.    - Netscape Communications Corp. All Rights Reserved.
  21.    -
  22.    - Contributor(s):
  23.    -
  24.    - Alternatively, the contents of this file may be used under the terms of
  25.    - either the GNU General Public License Version 2 or later (the "GPL"), or
  26.    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.    - in which case the provisions of the GPL or the LGPL are applicable instead
  28.    - of those above. If you wish to allow use of your version of this file only
  29.    - under the terms of either the GPL or the LGPL, and not to allow others to
  30.    - use your version of this file under the terms of the MPL, indicate your
  31.    - decision by deleting the provisions above and replace them with the notice
  32.    - and other provisions required by the LGPL or the GPL. If you do not delete
  33.    - the provisions above, a recipient may use your version of this file under
  34.    - the terms of any one of the MPL, the GPL or the LGPL.
  35.    -
  36. -->
  37.  
  38. <!-- CHANGE THIS WHEN MOVING FILES -->
  39. <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> 
  40.  
  41. <!-- CHANGE THIS WHEN MOVING FILES -->
  42. <!DOCTYPE dialog SYSTEM "chrome://cookie/locale/p3p.dtd">
  43.  
  44. <dialog id="p3pDialog"
  45.         buttons="accept,cancel,extra1,extra2,help"
  46.         acceptLabel="&p3pDialogOff.label;"
  47.         cancelLabel="&p3pDialogClose.label;"
  48.         extra1Label="&p3pDialogViewCookies.label;"
  49.         extra2Label="&p3pDialogViewLevels.label;"
  50.         class="dialog"
  51.         title="&p3pDialogTitle.label;"
  52.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  53.         orient="vertical"
  54.         onload="init();"
  55.         ondialogaccept="P3POff();"
  56.         ondialogextra1="ViewCookieManager();"
  57.         ondialogextra2="ViewPrivacyLevels();"
  58.         ondialoghelp="return doHelpButton();"
  59.         style="width: 45em;">
  60.  
  61.   <script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
  62.   <script type="application/x-javascript">
  63.   <![CDATA[
  64.  
  65.   function init()
  66.   {
  67.     window.arguments[0].gButtonPressed = "";
  68.  
  69.     // label the buttons
  70.     var dialog = document.documentElement;
  71.     dialog.getButton("accept").label = dialog.getAttribute("acceptLabel");
  72.     dialog.getButton("cancel").label = dialog.getAttribute("cancelLabel");
  73.     dialog.getButton("extra1").label = dialog.getAttribute("extra1Label");
  74.     dialog.getButton("extra2").label = dialog.getAttribute("extra2Label");
  75.  
  76.     // focus on the cancel button
  77.     dialog.getButton("cancel").focus();
  78.   }
  79.  
  80.   function ViewCookieManager() {
  81.     window.arguments[0].gButtonPressed = "cookie";
  82.     window.close();
  83.   }
  84.  
  85.   function ViewPrivacyLevels() {
  86.  
  87.     window.arguments[0].gButtonPressed = "p3p";
  88.     window.close();
  89.   }
  90.  
  91.   function P3POff() {
  92.     var pref = Components.classes['@mozilla.org/preferences-service;1'];
  93.     pref = pref.getService();
  94.     pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
  95.     pref.setIntPref("network.cookie.cookieBehavior", 0);
  96.   }
  97.  
  98.   function doHelpButton()
  99.   {
  100.     openHelp('cookie_notify');
  101.   }
  102.  
  103.   ]]>
  104.   </script>
  105.   <description>&p3pDialogMessage1.label;</description>
  106.   <separator class="thin"/>
  107.  
  108.   <box>
  109.     <spacer flex="1"/>
  110.     <image src="chrome://communicator/skin/cookie/status-cookie.gif"/>
  111.     <spacer flex="1"/>
  112.   </box>
  113.  
  114.   <separator class="thin"/>
  115.   <description>&p3pDialogMessage2.label;</description>
  116.   <separator class="thin"/>
  117. </dialog>
  118.