home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 December / PCWorld_2005-12_cd.bin / komunikace / netscape / nsb-install-8-0.exe / chrome / browser.jar / content / browser / trustPartners.xul < prev    next >
Extensible Markup Language  |  2005-09-26  |  3KB  |  84 lines

  1. <?xml version="1.0"?>
  2.  
  3. <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
  4. <?xml-stylesheet href="chrome://global/skin/dialog.css" type="text/css"?>
  5.  
  6. <!DOCTYPE dialog [
  7.   <!ENTITY % turboDialogDTD SYSTEM "chrome://browser/locale/turboDialog.dtd" >
  8.   %turboDialogDTD;
  9.   <!ENTITY % dialogOverlayDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
  10.   %dialogOverlayDTD;
  11.   <!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
  12.   %brandDTD;
  13. ]>
  14.  
  15. <dialog id="trustPartnersDialog" buttons="accept" buttonpack="end"
  16.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  17.         title="Netscape Trust Partners"
  18.         onload="populatePartnersList; prunePartnersList();">
  19.   <script type="application/x-javascript">
  20.     <![CDATA[
  21.       function prunePartnersList() { 
  22.        var partnersList = window.arguments[0];
  23.        for (var i = 0; i < partnersList.length; i++)
  24.        {
  25.            dump ("Displaying trust partner of " + partnersList[i] + "\n");
  26.            var partnerid = partnersList[i].replace(/[\W\.\,]/g, "").toLowerCase();
  27.            dump ("ID is going to be " + partnerid + "\n");
  28.            document.getElementById(partnerid + '-listitem').removeAttribute('hidden');       
  29.        }
  30.       }
  31.       
  32.       function populatePartnersList() {
  33.           var profileDir = Components.classes["@mozilla.org/file/directory_service;1"].
  34.                     getService(Components.interfaces.nsIProperties).
  35.                     get("XCurProcD", Components.interfaces.nsIFile);                    
  36.                 profileDir.append("defaults");
  37.                 profileDir.append("sitecontrols");
  38.                 profileDir.append("providers.txt");
  39.                 /*
  40.                 var ios = Components.classes["@mozilla.org/network/io-service;1"]
  41.                 .getService(Components.interfaces.nsIIOService);
  42.                 var fileURI = ios.newFileURI(profileDir);
  43.                 */
  44.                 var fis = Components.classes["@mozilla.org/network/file-input-stream;1"]
  45.                                 .createInstance(Components.interfaces.nsIFileInputStream);
  46.                 fis.init(profileDir, this.PR_RDONLY, 0, 0);
  47.                 
  48.                 fis.QueryInterface(Components.interfaces.nsILineInputStream);
  49.  
  50.                 // read lines into array
  51.                 var line = {}, lines = [], hasmore;
  52.                 do {
  53.                   hasmore = fis.readLine(line);
  54.                   lines.push(line.value); 
  55.                 } while(hasmore);
  56.                 
  57.                 fis.close();
  58.                 
  59.                 for (var i = 0; i < lines.length; i++)
  60.                 {
  61.                     var partner = lines[i].split("|");
  62.                     dump ("Trying to add " + partner[1] + " to the list.\n" );
  63.                     var newitem = document.getElementById('partnerList').appendItem(partner[1]);
  64.                     newitem.id = partner[1].replace(/[\W\.\,]/g, "").toLowerCase() + "-listitem";
  65.                 }
  66.                 
  67.       }
  68.     ]]>
  69.   </script>
  70.  
  71.   <vbox flex="1">
  72.     <hbox align="start" valign="top">
  73.       <label value="This site has been verified/flagged by the following partners:"/>
  74.     </hbox>
  75.     <listbox id="partnerList">
  76.             <listitem id="aolvault-listitem" label="AOL Vault" hidden="true"/>
  77.         <listitem id="truste-listitem" label="TRUSTe" hidden="true"/>
  78.         <listitem id="antispygroup-listitem" label="AntiSpy Group" hidden="true"/>
  79.         <listitem id="blackboxsecurity-listitem" label="Black Box Security" hidden="true"/>
  80.         <listitem id="securemeinc-listitem" label="SecureMe, Inc." hidden="true"/>
  81.     </listbox>
  82.   </vbox>
  83. </dialog>
  84.