home *** CD-ROM | disk | FTP | other *** search
/ DOKAN 21 / DOKAN21.iso / Ie501 / IENT_S2.CAB / IENT_2.CAB / SHDOCLC.DLL / HTML / ORGFAV.DLG < prev    next >
Text File  |  1999-11-29  |  10KB  |  380 lines

  1.  
  2. <HTML id=dlgOrganizeFavorites STYLE="font-family: MS Shell Dlg; font-size: 8pt; width: 50em; height: 31.0em">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <head>
  5.  
  6. <style>
  7.     .button {color: BUTTONTEXT; font-size: 8pt}
  8.     .info {font-size: 8pt; color: WINDOWTEXT}
  9.     .btext {color: BUTTONTEXT}
  10.     LI {line-height:10pt}
  11.     A  {text-decoration: none; color: WINDOWTEXT}
  12. </style>
  13.  
  14. <TITLE id=txtTitleOrgFavsDialog>
  15. Organizar Favoritos
  16. </TITLE>
  17.  
  18. <script>
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. window.onerror = HandleError;
  29.  
  30. var g_strUrl;        
  31. var g_rgUrlsToSynch = new Array(0); 
  32. var g_fSubscriptionsEnabled;
  33. var g_dxEllipses = 0;
  34. var g_dxEllipsesBold = 0;
  35. var L_Ellipses_Text = "..."; 
  36.  
  37. function callHelp(elm)
  38. {
  39.     if (null != elm.helpid)
  40.     {
  41.         window.showHelp(elm.helpfile, "" + parseInt(elm.helpid), "popup");
  42.     }
  43.     else
  44.     {
  45.         if ("BODY" != elm.tagName)
  46.         {
  47.             callHelp(elm.parentElement);
  48.         }
  49.     }
  50. }
  51. document.onhelp = new Function("callHelp(window.event.srcElement)");
  52.  
  53.  
  54. function documentMouseUp()
  55. {
  56.     
  57.  
  58.     if (window.event.button == 2)
  59.     {
  60.         callHelp(window.event.srcElement);
  61.     }
  62. }   
  63.  
  64. document.onmouseup = new Function("documentMouseUp()");
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. function HandleError(message, url, line)
  76. {
  77.  
  78.     var L_Dialog_ErrorMessage = "Error en este dißlogo.";
  79.     var L_ErrorNumber_Text = "Error:";
  80.  
  81.     var str = L_Dialog_ErrorMessage + "\n\n" 
  82.         + L_ErrorNumber_Text + line + "\n"
  83.         + message;
  84.  
  85.     alert (str);
  86.     window.close();
  87.  
  88.     return true;
  89. }
  90.  
  91. function BodyOnKeyPress(nCode)
  92. {
  93.     if (nCode == 27)    
  94.     {
  95.         window.close();
  96.         return;
  97.     }
  98. }
  99.  
  100. function MeasureText(strText, fBold, widthMaximum)
  101. {
  102.     
  103.     
  104.     
  105.     
  106.  
  107.     if (spanMeasure.offsetWidth < widthMaximum)
  108.         return strText;
  109.     
  110.     var dxEllipses = (fBold ? g_dxEllipsesBold : g_dxEllipses);
  111.     var iCutoff = strText.length * (widthMaximum / (spanMeasure.offsetWidth + dxEllipses));
  112.     
  113.     if (fBold)
  114.     {
  115.         spanMeasure.innerHTML = "<B>" + strText.substring(0, iCutoff - 1) + L_Ellipses_Text + "</B>"
  116.         iCutoff += 3;
  117.     }
  118.     else
  119.         spanMeasure.innerHTML = strText.substring(0, iCutoff - 1) + L_Ellipses_Text; 
  120.  
  121.     for (cExtraCutoff = 1; (spanMeasure.offsetWidth > widthMaximum) && (cExtraCutoff < 30); cExtraCutoff++)
  122.     {
  123.         spanMeasure.innerHTML = spanMeasure.innerHTML.substring(0, iCutoff-cExtraCutoff) + L_Ellipses_Text + (fBold ? "</B>" : "");
  124.     }
  125.  
  126.     return spanMeasure.innerHTML;
  127. }
  128.  
  129. function OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)
  130. {
  131.     
  132.     if (cItems == -1)
  133.     {
  134.         BodyOnKeyPress(27);
  135.         return;
  136.     }
  137.  
  138.     
  139.     if (cItems == 0)
  140.     {
  141.         textProperties.innerHTML = "";
  142.         return;
  143.     }
  144.  
  145.     g_strUrl = strUrl;
  146.  
  147.     if (g_dxEllipses == 0)
  148.     {
  149.         spanMeasure.innerHTML = L_Ellipses_Text;
  150.         g_dxEllipses = spanMeasure.offsetWidth;
  151.         spanMeasure.innerHTML = "<B>" + L_Ellipses_Text + "</B>";
  152.         g_dxEllipsesBold = spanMeasure.offsetWidth;
  153.     }
  154.  
  155.     spanMeasure.innerHTML = "<B>" + strName + "</B>";
  156.     strNameShort = MeasureText(spanMeasure.innerText, true, textProperties.offsetWidth - 4);
  157.  
  158.     spanMeasure.innerHTML = strUrl;
  159.     strUrlShort = MeasureText(spanMeasure.innerText, false, textProperties.offsetWidth - 4);
  160.  
  161.     
  162.     spanMeasure.innerHTML = "";
  163.  
  164.     
  165.     var L_FavoritesFolder_Text = "Carpeta Favoritos"; 
  166.     var L_ModifiedColon_Text = "Modificado:"; 
  167.     
  168.     
  169.     if (cVisits != -1)
  170.     {
  171.         var strOffline = "";
  172.         
  173.         var L_MakeAvailableOffline_Text = "<U>D</U>isponible sin conexi≤n "; 
  174.         var L_MakeAvailableOfflineAccesskey_Text = "d"; 
  175.         var L_Properties_Text = "<U>P</U>ropiedades"; 
  176.         var L_PropertiesAccesskey_Text = "c"; 
  177.  
  178.         if (g_fSubscriptionsEnabled && (strUrl.substring(0,4) == "http") )
  179.         {
  180.             strOffline = "<input type=checkbox align=left TABINDEX=5 ACCESSKEY=" + L_MakeAvailableOfflineAccesskey_Text + " id=chkOffline "
  181.             if (fAvailableOffline != 0)
  182.                 strOffline += "CHECKED"
  183.             strOffline += " onclick='ToggleOffline(this)' helpid=50486 helpfile='iexplore.hlp'><LABEL FOR=chkOffline TABINDEX=-1>" + L_MakeAvailableOffline_Text + "</LABEL>";
  184.             strOffline += "<BR><BR><BUTTON id=btnProperties TABINDEX=6 style='visibility: "
  185.             if (fAvailableOffline != 0)
  186.                 strOffline += "visible"
  187.             else
  188.                 strOffline += "hidden"
  189.  
  190.             strOffline += "' class=button ACCESSKEY=" + L_PropertiesAccesskey_Text + " onclick='Properties()' helpid=50489 helpfile='iexplore.hlp'>" + L_Properties_Text + "</BUTTON><BR>";
  191.         }
  192.  
  193.         var L_TimesVisited_Text = "Visitas: "; 
  194.         var L_LastVisited_Text = "┌ltima visita:"; 
  195.         var L_LastVisitedNeedsLineBreak_Text = ""; 
  196.  
  197.         
  198.         var strTemp = strName + "\n" + strUrl;
  199.         var re = /'/g;
  200.         strTemp = strTemp.replace(re, "┤");
  201.  
  202.  
  203.         textProperties.innerHTML = "<A TITLE='" + strTemp +"'><B>" + strNameShort + "</B><BR>" + strUrlShort +  "</A><BR>" + L_TimesVisited_Text + cVisits + "<BR>" + L_LastVisited_Text + L_LastVisitedNeedsLineBreak_Text + strDate + "<BR>" + strOffline;
  204.  
  205.  
  206.  
  207.     }
  208.     else
  209.     {
  210.         textProperties.innerHTML = "<B>" + strNameShort + "</B><BR>" + L_FavoritesFolder_Text + "<BR><BR>" +
  211.                                    "<B>" + L_ModifiedColon_Text + "</B><BR>" + strDate;
  212.     }
  213.  
  214.     
  215.     tdProperties.noWrap=true;
  216.     textProperties.noWrap=true;
  217. }
  218.  
  219. function EnableButtons()
  220. {
  221.  
  222.     g_fSubscriptionsEnabled = nsc.FOfflinePackInstalled;
  223.  
  224.  
  225.  
  226.  
  227.     var pszInitialDir = window.dialogArguments;
  228.  
  229.     if (pszInitialDir && (pszInitialDir.length > 0))
  230.     {
  231.         nsc.SetRoot(pszInitialDir);
  232.     }
  233.  
  234.     tdNsc.blur();
  235.     tdNewFolder.focus();
  236. }
  237.  
  238. function ToggleOffline(chkOffline)
  239. {
  240.  
  241.     if (chkOffline.checked)
  242.     {
  243.         
  244.         if (!nsc.CreateSubscriptionForSelection())
  245.             chkOffline.checked = false;
  246.         else 
  247.         {
  248.             g_rgUrlsToSynch[g_strUrl] = true;
  249.         }
  250.     }
  251.     else
  252.     {
  253.         if (!nsc.DeleteSubscriptionForSelection())
  254.             chkOffline.checked = true;
  255.         else 
  256.             delete g_rgUrlsToSynch[g_strUrl];
  257.     }
  258.     btnProperties.style.visibility = (chkOffline.checked ? "visible" : "hidden");
  259.  
  260. }
  261.  
  262. function BuildSynchList()
  263. {
  264.     window.returnValue = "";
  265.  
  266.     for (strUrl in g_rgUrlsToSynch)
  267.     {
  268.         window.returnValue += strUrl + "\0";
  269.     }
  270.  
  271. }
  272.  
  273. function Properties()
  274. {
  275.     nsc.InvokeContextMenuCommand("properties");
  276. }
  277.  
  278. function OnResize()
  279. {
  280.     
  281.     document.recalc(true);
  282. }
  283.  
  284. function TdNscWidth()
  285. {
  286.     return Math.max(0, document.body.offsetWidth - tableButtons.offsetWidth - (tableMain.border * 3) - (2 * parseInt(tdNsc.style.borderWidth)) - 6); 
  287. }
  288.  
  289. function TdPropertiesHeight()
  290. {
  291.     return Math.max(0, document.body.offsetHeight - (tableMain.border * 2) - tdProperties.offsetTop - tdDone.offsetHeight - 8);
  292. }
  293. </script>
  294.  
  295. </HEAD>
  296.  
  297.  
  298. <body style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; background: threedface; align: center" 
  299.       scroll="no" onkeydown="BodyOnKeyPress(event.keyCode)" onkeypress="BodyOnKeyPress(event.keyCode)" onload="EnableButtons()" onunload="BuildSynchList()" onresize="OnResize()">
  300.  
  301.  
  302.  
  303. <table id=tableMain cols=3 border=10 bordercolor=THREEDFACE>
  304.     <TR id=mainrow>
  305.         <TD valign=top id=infotext class=info>
  306.             Haga clic en el bot≤n Crear carpeta para crear una nueva carpeta. Para cambiar el nombre o eliminar un elemento, seleccione el elemento y a continuaci≤n haga clic en Cambiar nombre o Eliminar.
  307.         </TD>
  308.         <TD id=tdColSpacing width=0>
  309.         </TD>
  310.         <TD id=tdNscHolder rowspan=3>
  311.             <TABLE cols=1 width=100% height=100%>
  312.                 <TD id=tdNsc style="border:2px inset WINDOW;">
  313.                     <object id=nsc TABINDEX=10 title="Lista de favoritos" accesskey="s" CLASSID='clsid:55136805-B2DE-11D1-B9F2-00A0C98BC547' onkeypress="BodyOnKeyPress(event.keyCode)" HEIGHT=100% WIDTH=100% helpid=50490 helpfile="iexplore.hlp"></OBJECT>
  314.                 </TD>
  315.             </TABLE>
  316.         </TD>
  317.     </TR>
  318.     <TR id=rowButtons>
  319.         <TD>
  320.             <table id=tableButtons cols=2 width=200>
  321.                 <tr height=20>
  322.                     <TD align=center width=50%>
  323.                         <BUTTON id=tdNewFolder TABINDEX=1 style="width: 12em;" ACCESSKEY=c class=button onclick="nsc.NewFolder(); event.returnValue = false" helpid=50484 helpfile="iexplore.hlp">
  324.                             <U>C</U>rear carpeta
  325.                         </BUTTON>
  326.                     </TD>
  327.                     <TD align=center width=50%>
  328.                         <BUTTON id=tdRename    TABINDEX=2 style="width: 12em;" ACCESSKEY=a class=button onclick="nsc.InvokeContextMenuCommand('rename'); event.returnValue = false" helpid=50007 helpfile="iexplore.hlp">
  329.                             C<U>a</U>mbiar nombre
  330.                         </BUTTON>
  331.                     </TD>
  332.                 </tr>
  333.                 <tr height=20>
  334.                     <td width=50% align=center>
  335.                         <BUTTON id=tdMoveTo    TABINDEX=3 style="width: 12em;" ACCESSKEY=m class=button onclick="nsc.MoveSelectionTo(); event.returnValue = false" helpid=50006 helpfile="iexplore.hlp">
  336.                             <U>M</U>over a carpeta...
  337.                         </BUTTON>
  338.                     </td>
  339.                     <td width=50% align=center>
  340.                         <BUTTON id=tdDelete    TABINDEX=4 style="width: 12em;" ACCESSKEY=l class=button onclick="nsc.InvokeContextMenuCommand('delete'); event.returnValue = false" helpid=50008 helpfile="iexplore.hlp">
  341.                             E<U>l</U>iminar
  342.                         </BUTTON>
  343.                     </td>
  344.                 </tr>
  345.             </table>
  346.         </TD>
  347.     </TR>
  348.     <TR id=rowProperties vAlign=top style="padding-left:1px;">
  349.         <TD id=tdProperties style="border-width:2px; margin-left:5px; margin-top:5px; margin-right:5px;" vAlign=top>
  350.             <DIV id=textProperties class=info style="border-width:2px; border-style:groove; border-color:window; width:100%; height:expression(Math.max(0, tdProperties.offsetHeight - (2 * parseInt(tdProperties.style.borderWidth)))); overflow:hidden; nowrap:true; position:absolute;">
  351.                 Seleccione un Favorito para ver sus propiedades o para que estΘ disponible para leerlo sin conexi≤n.
  352.             </DIV>
  353.         </TD>
  354.     </TR>
  355.     <TR id=rowCloseButton>
  356.         <TD colspan=3 align=right>
  357.             <BUTTON id=tdDone TABINDEX=11 style="width: 9em;" ACCESSKEY=e class=button onclick="window.close();" helpid=50010 helpfile="iexplore.hlp">
  358.                 C<U>e</U>rrar
  359.             </BUTTON>
  360.         </TD>
  361.     </TR>
  362. </table>
  363.  
  364.  
  365. <SPAN id=spanMeasure style="visibility:hidden;" class=info></SPAN>
  366.  
  367. <script defer for=nsc event="FavoritesSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)">
  368.     OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline);
  369. </script>
  370.  
  371. <script defer>
  372.  
  373.     tdNscHolder.style.setExpression("width", "TdNscWidth()");
  374.     rowProperties.style.setExpression("height", "TdPropertiesHeight()"); 
  375. </script>
  376.  
  377.  
  378. </BODY>
  379. </HTML>
  380.