home *** CD-ROM | disk | FTP | other *** search
/ .net 1998 August / netCD48.iso / mac / net / SoftCen / ie5 / IE5 / IE_S4.CAB / IE_4.CAB / BROWSEUI.DLL / 2110 / ORGFAV.DLG
Text File  |  1998-06-03  |  11KB  |  281 lines

  1. <HTML id=dlgOrganizeFavorites STYLE="font-family: ms sans serif; font-size: 10pt; width: 41.2em; height: 31.0em">
  2. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  3. <head>
  4.  
  5. <style>
  6.     .title {color: BUTTONSHADOW; font-family: Verdana; font-size: 16pt;}
  7.     .button {color: BUTTONTEXT; font-size: 8pt; font-family: sans-serif; background-color: BUTTONFACE; cursor: hand; border-bottom: solid 1px BUTTONSHADOW;border-top: solid 1px BUTTONSHADOW;border-left: solid 1px BUTTONSHADOW;border-right: solid 1px BUTTONSHADOW;}
  8.     .hover {color: white; font-size: 8pt;font-family: Verdana ; background-color: #003399; cursor: hand}
  9.     .buttondown {color: white; font-size: 8pt;font-family: Verdana ; background-color: black; cursor: hand}
  10.     .info {font-size: 8pt; font-family: Verdana;}
  11.     .text {font:8pt/11pt Verdana; }
  12.     .buffer {}
  13.     .None {}
  14.     .btext {color: BUTTONTEXT; cursor: hand}
  15.     UL {margin-left:14pt; margin-top:0}
  16.     LI {line-height:10pt}
  17.     A  {text-decoration: none; color: white; cursor: hand}
  18. </style>
  19.  
  20. <TITLE>
  21. Organize Favorites
  22. </TITLE>
  23.  
  24. <script>
  25. window.onerror = HandleError;
  26.  
  27. var g_strUrl;        //the currently selected url
  28. var g_rgUrlsToSynch = new Array(0); //list of urls to synch on close, urls are used as indices
  29.  
  30.  
  31. //+-------------------------------------------------------------------
  32. //
  33. //  Synopsis:   Turns off error messages in dialogs
  34. //
  35. //  Arguments:  none
  36. //
  37. //  returns:    true (tells browser not to handle message)
  38. //
  39. //--------------------------------------------------------------------
  40. function HandleError(message, url, line)
  41. {
  42.     var L_Dialog_ErrorMessage = "An error has occured in this dialog.";
  43.     var L_ErrorNumber_Text = "Error: ";
  44.  
  45.     var str = L_Dialog_ErrorMessage + "\n\n" 
  46.         + L_ErrorNumber_Text + line + "\n"
  47.         + message;
  48.  
  49.     alert (str);
  50.     window.close();
  51.  
  52.     return true;
  53. }
  54.  
  55. function BodyOnKeyPress(nCode)
  56. {
  57.     if (nCode == 27)    //ESC
  58.     {
  59.         window.close();
  60.         return;
  61.     }
  62.     if (nCode == 116)   //F5
  63.     {
  64.         //eat it
  65.         event.returnValue = false;
  66.     }
  67. //    alert(nCode);
  68. }
  69.  
  70. function ConfirmSort()
  71. {
  72.     var L_ConfirmResetSortOrder_Message = "This will return all of your favorites to alphabetical order.\n\nAre you sure you want to do this?"; //displayed in ok/cancel dialog when pressing the Sort... button
  73.  
  74.     if (confirm(L_ConfirmResetSortOrder_Message))
  75.         nsc.ResetSort();
  76. }
  77.  
  78. function OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)
  79. {
  80.     var L_MakeAvailableOffline_Text = "Make available <U>o</U>ffline"; //Make available offline
  81.     var L_MakeAvailableOfflineAccesskey_Text = "o"; //this must be the single character that is underlined above
  82.     g_strUrl = strUrl;
  83.     if (strName.length > 30)
  84.         strName = strName.substring(0, 29) + "...";
  85.  
  86.     //if it's not a folder
  87.     if (cVisits != -1)
  88.     {
  89.         var strOffline = "";
  90.         
  91.         if (strUrl.substring(0,4) == "http")
  92.         {
  93.             strOffline = "<input type=checkbox ACCESSKEY=" + L_MakeAvailableOfflineAccesskey_Text + " id=chkOffline "
  94.             if (fAvailableOffline != 0)
  95.                 strOffline += "CHECKED"
  96.             strOffline += " onclick='ToggleOffline(this)'><LABEL FOR=chkOffline TABINDEX=-1>" + L_MakeAvailableOffline_Text + "</LABEL><BR>"
  97.         }
  98.  
  99.         if (strUrl.length > 30)
  100.             strUrl = strUrl.substring(0, 29) + "...";
  101.  
  102.         var L_TimesVisited_Text = "times visited: "; //number of times the favorite has been visited
  103.         var L_LastVisited_Text = "last visited: "; //date the favorite was last visited
  104.  
  105.         textProperties.innerHTML = "<B>" + strName + "</B><BR>" + strUrl +  "<BR>" + L_TimesVisited_Text + cVisits + "<BR>" + L_LastVisited_Text + strDate + "<BR>" + strOffline;
  106.         }
  107.     else
  108.     {
  109.         var L_FavoritesFolder_Text = "Favorites Folder"; //Favorites folder
  110.         var L_ModifiedColon_Text = "Modified:"; //Last modified date of directory, followed by a colon
  111.     
  112.         textProperties.innerHTML = "<B>" + strName + "</B><BR>" + L_FavoritesFolder_Text + "<BR><BR>" +
  113.                                    "<B>" + L_ModifiedColon_Text + "</B><BR>" + strDate;
  114.     }
  115. }
  116.  
  117. function EnableButtons()
  118. {
  119.     if (!nsc.FOfflinePackInstalled)
  120.     {
  121.         tdSynchronize.style.backgroundColor = "gray";
  122.     }
  123. }
  124.  
  125. function Synchronize()
  126. {
  127.     if (nsc.FOfflinePackInstalled)
  128.         nsc.Synchronize();
  129. }
  130.  
  131. function ToggleOffline(chkOffline)
  132. {
  133.     if (chkOffline.checked)
  134.     {
  135.         //if it fails to create a subscription, clear the check box
  136.         if (!nsc.CreateSubscriptionForSelection())
  137.             chkOffline.checked = false;
  138.         else 
  139.             g_rgUrlsToSynch[g_strUrl] = true;
  140.     }
  141.     else
  142.     {
  143.         if (!nsc.DeleteSubscriptionForSelection())
  144.             chkOffline.checked = true;
  145.         else 
  146.             delete g_rgUrlsToSynch[g_strUrl];
  147.     }
  148. }
  149.  
  150. function BuildSynchList()
  151. {
  152.     window.returnValue = "";
  153.     for (strUrl in g_rgUrlsToSynch)
  154.     {
  155.         window.returnValue += strUrl + "\0";
  156.     }
  157. }
  158.  
  159. </script>
  160.  
  161. <script for=nsc event="FavoritesSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)">
  162.     OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline);
  163. </script>
  164.  
  165. </HEAD>
  166. <body style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0" text=BUTTONTEXT scroll="no" onkeydown="BodyOnKeyPress(event.keyCode)" onkeypress="BodyOnKeyPress(event.keyCode)" onload="EnableButtons()" onunload="BuildSynchList()">
  167. <table border=0 width=545 height=43>
  168.     <TR id=topbuffer height=3 >
  169.         <TD>
  170.         </TD>
  171.         <TD>
  172.         </TD>
  173.         <TD>
  174.         </TD>
  175.     </TR>
  176.     <TR id=titlerow height=40>
  177.         <TD width=4>
  178.         </TD>
  179.         <TD valign=top id=tdTitleOrgFavs>
  180.             <span id=spanTitleOrgFavs class=TITLE>  Organize Favorites</span>
  181.             <HR>
  182.         </TD>
  183.         <TD width=4>
  184.         </TD>
  185.     </TR>
  186. </table>
  187.  
  188. <table border=0 width=210 height=284 cols=3>
  189.     <TR id=mainrow>
  190.         <TD width=10>
  191.         </TD>
  192.         <TD valign=top id=infotext class=info width=215>
  193.             To create a new folder, click on the Create Folder button. To delete or move an item, select the item and then click on the delete or move button.
  194.             <BR><BR>
  195.             <table cols=2 border="0" width=200>
  196.                 <tr height=20>
  197.                     <Td width=100 CLASS=BUTTON id=tdNewFolder align=center onclick="nsc.NewFolder(); event.returnValue = false" ondragstart="event.returnValue = false">
  198.                         <A ACCESSKEY=c class=btext HREF=""><U>C</U>reate Folder</a>
  199.                     </td>
  200.                     <td width=100 CLASS=BUTTON id=tdMoveUp    align=center onclick="nsc.MoveSelectionUp(); event.returnValue = false" ondragstart="event.returnValue = false">
  201.                         <A ACCESSKEY=u class=btext HREF="">Move <U>U</U>p</a>
  202.                     </td>
  203.                 </tr>
  204.                 <tr height=20>
  205.                     <td width=100 CLASS=BUTTON id=tdDelete    align=center onclick="nsc.InvokeContextMenuCommand('delete'); event.returnValue = false" ondragstart="event.returnValue = false">
  206.                         <A ACCESSKEY=d class=btext HREF=""><U>D</U>elete</a>
  207.                     </td>
  208.                     <td width=100 CLASS=BUTTON id=tdMoveDown  align=center onclick="nsc.MoveSelectionDown(); event.returnValue = false" ondragstart="event.returnValue = false">
  209.                         <A ACCESSKEY=w class=btext HREF="">Move Do<U>w</U>n</a>
  210.                     </td>
  211.                 </tr>
  212.                 <tr height=20>
  213.                     <td width=100 CLASS=BUTTON id=tdRename    align=center onclick="nsc.InvokeContextMenuCommand('rename'); event.returnValue = false" ondragstart="event.returnValue = false">
  214.                         <A ACCESSKEY=r class=btext HREF=""><U>R</U>ename</a>
  215.                     </td>
  216.                     <td width=100 CLASS=BUTTON id=tdMoveTo    align=center onclick="nsc.MoveSelectionTo(); event.returnValue = false" ondragstart="event.returnValue = false">
  217.                         <A ACCESSKEY=m class=btext HREF=""><U>M</U>ove to Folder...</a>
  218.                     </td>
  219.                 </tr>
  220.             </table>
  221.             <BR><BR>
  222.             <DIV id=textProperties style="margin-left:5; width: 200px; height: 100px; overflow: hidden"> 
  223.                 <BR>
  224.                 When you click on a favorite, you will see it's details here.
  225.             </DIV>
  226.         </TD>
  227.         <TD width=4>
  228.         </TD>
  229.     </TR>
  230. </table>
  231.  
  232. <table border=0 height=284 width=290 cols=2 STYLE="position:absolute; left:235; top:50">
  233.     <TR>
  234.         <TD width=4>
  235.         </TD>
  236.         <TD width=286>
  237.             <object name=nsc CLASSID='clsid:55136805-B2DE-11D1-B9F2-00A0C98BC547' onkeypress="BodyOnKeyPress(event.keyCode)" HEIGHT=100% WIDTH=100%></OBJECT>
  238.         </TD>
  239.     </TR>
  240. </table>
  241.  
  242. <table border=0 height=40 width=545 cols=3>
  243.     <TR>
  244.         <TD width=4>
  245.         </TD>
  246.         <TD>
  247.             <hr>
  248.             <table border=0>
  249.                 <tr height=20>
  250.                     <td width=70 CLASS=BUTTON id=tdProperties  align=center onclick="nsc.InvokeContextMenuCommand('properties'); event.returnValue = false" ondragstart="event.returnValue = false">
  251.                         <A ACCESSKEY=p class=btext HREF=""><U>P</U>roperties</a>
  252.                     </td>
  253.                     <Td width=70 CLASS=BUTTON id=tdSort        align=center onclick="ConfirmSort(); event.returnValue = false" ondragstart="event.returnValue = false">
  254.                         <A ACCESSKEY=s class=btext HREF=""><U>S</U>ort</a>
  255.                     </td>
  256.                     <Td width=70 CLASS=BUTTON id=tdSynchronize align=center onclick="Synchronize(); event.returnValue = false" ondragstart="event.returnValue = false">
  257.                         <A ACCESSKEY=y class=btext HREF="">S<U>y</U>nchronize</a>
  258.                     </td>
  259.                     <Td width=70 CLASS=BUTTON id=tdImport      align=center onclick="nsc.Import(); event.returnValue = false" ondragstart="event.returnValue = false">
  260.                         <A ACCESSKEY=i class=btext HREF=""><U>I</U>mport</a>
  261.                     </td>
  262.                     <Td width=70 CLASS=BUTTON id=tdExport      align=center onclick="nsc.Export(); event.returnValue = false" ondragstart="event.returnValue = false">
  263.                         <A ACCESSKEY=x class=btext HREF="">E<U>x</U>port</a>
  264.                     </td>
  265.                     <Td width=70 align=center>
  266.                     </td>
  267.                     <Td width=70 CLASS=BUTTON id=tdDone        align=center onclick="window.close(); event.returnValue = false" ondragstart="event.returnValue = false">
  268.                         <A ACCESSKEY=l class=btext HREF="">C<U>l</U>ose</a>
  269.                     </td>
  270.                 </tr>
  271.             </table>
  272.         </TD>
  273.         <TD width=4>
  274.         </TD>
  275.     </TR>
  276. </table>
  277.  
  278. </BODY>
  279. </HTML>
  280.  
  281.