home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #11 / K-CD-11-2002.ISO / Explorer6 / SV / IEMIL_3.CAB / SHDOCLC.DLL / HTML / ORGFAV.DLG < prev    next >
Encoding:
Text File  |  2001-09-05  |  11.4 KB  |  396 lines

  1.  
  2. <HTML id=dlgOrganizeFavorites STYLE="font-family: MS Shell Dlg; font-size: 8pt; width: 41.2em; height: 31.0em">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
  5. <head>
  6.  
  7. <style>
  8.     .button {color: BUTTONTEXT; font-size: 8pt}
  9.     .info {font-size: 8pt; color: WINDOWTEXT}
  10.     .btext {color: BUTTONTEXT}
  11.     LI {line-height:10pt}
  12.     A  {text-decoration: none; color: WINDOWTEXT}
  13. </style>
  14.  
  15. <TITLE id=txtTitleOrgFavsDialog>
  16. Ordna Favoriter
  17. </TITLE>
  18.  
  19. <script>
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. window.onerror = HandleError;
  30.  
  31. var g_strUrl;        
  32. var g_rgUrlsToSynch = new Array(0); 
  33. var g_fSubscriptionsEnabled;
  34. var g_dxEllipses = 0;
  35. var g_dxEllipsesBold = 0;
  36. var L_Ellipses_Text = "..."; 
  37.  
  38. function callHelp(elm)
  39. {
  40.     if (null != elm.helpid)
  41.     {
  42.         window.showHelp(elm.helpfile, "" + parseInt(elm.helpid), "popup");
  43.     }
  44.     else
  45.     {
  46.         if ("BODY" != elm.tagName)
  47.         {
  48.             callHelp(elm.parentElement);
  49.         }
  50.     }
  51. }
  52. document.onhelp = new Function("callHelp(window.event.srcElement)");
  53.  
  54.  
  55. function documentMouseUp()
  56. {
  57.     
  58.  
  59.     if (window.event.button == 2)
  60.     {
  61.         callHelp(window.event.srcElement);
  62.     }
  63. }   
  64.  
  65. document.onmouseup = new Function("documentMouseUp()");
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. function HandleError(message, url, line)
  77. {
  78.  
  79.     var L_Dialog_ErrorMessage = "Ett fel har uppstσtt i den hΣr dialogrutan.";
  80.     var L_ErrorNumber_Text = "Fel: ";
  81.  
  82.     var str = L_Dialog_ErrorMessage + "\n\n" 
  83.         + L_ErrorNumber_Text + line + "\n"
  84.         + message;
  85.  
  86.     alert (str);
  87.     window.close();
  88.  
  89.     return true;
  90. }
  91.  
  92. function BodyOnKeyPress(nCode)
  93. {
  94.     if (nCode == 27)    
  95.     {
  96.         window.close();
  97.         return;
  98.     }
  99. }
  100.  
  101. function MeasureText(strText, fBold, widthMaximum)
  102. {
  103.     
  104.     
  105.     
  106.     
  107.  
  108.     if (spanMeasure.offsetWidth < widthMaximum)
  109.         return strText;
  110.     
  111.     var dxEllipses = (fBold ? g_dxEllipsesBold : g_dxEllipses);
  112.     var iCutoff = strText.length * (widthMaximum / (spanMeasure.offsetWidth + dxEllipses));
  113.     
  114.     if (fBold)
  115.     {
  116.         spanMeasure.innerHTML = "<B>" + strText.substring(0, iCutoff - 1) + L_Ellipses_Text + "</B>"
  117.         iCutoff += 3;
  118.     }
  119.     else
  120.         spanMeasure.innerHTML = strText.substring(0, iCutoff - 1) + L_Ellipses_Text; 
  121.  
  122.     for (cExtraCutoff = 1; (spanMeasure.offsetWidth > widthMaximum) && (cExtraCutoff < 30); cExtraCutoff++)
  123.     {
  124.         spanMeasure.innerHTML = spanMeasure.innerHTML.substring(0, iCutoff-cExtraCutoff) + L_Ellipses_Text + (fBold ? "</B>" : "");
  125.     }
  126.  
  127.     return spanMeasure.innerHTML;
  128. }
  129.  
  130. function OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)
  131. {
  132.     
  133.     if (cItems == -1)
  134.     {
  135.         BodyOnKeyPress(27);
  136.         return;
  137.     }
  138.  
  139.     
  140.     if (cItems == 0)
  141.     {
  142.         textProperties.innerHTML = "";
  143.         return;
  144.     }
  145.  
  146.     g_strUrl = strUrl;
  147.  
  148.     if (g_dxEllipses == 0)
  149.     {
  150.         spanMeasure.innerHTML = L_Ellipses_Text;
  151.         g_dxEllipses = spanMeasure.offsetWidth;
  152.         spanMeasure.innerHTML = "<B>" + L_Ellipses_Text + "</B>";
  153.         g_dxEllipsesBold = spanMeasure.offsetWidth;
  154.     }
  155.  
  156.     spanMeasure.innerHTML = "<B>" + strName + "</B>";
  157.     strNameShort = MeasureText(spanMeasure.innerText, true, textProperties.offsetWidth - 4);
  158.  
  159.     spanMeasure.innerHTML = strUrl;
  160.     strUrlShort = MeasureText(spanMeasure.innerText, false, textProperties.offsetWidth - 4);
  161.  
  162.     
  163.     spanMeasure.innerHTML = "";
  164.  
  165.     
  166.     var L_FavoritesFolder_Text = "Mappen Favoriter"; 
  167.     var L_ModifiedColon_Text = "─ndrad:"; 
  168.     
  169.     
  170.     if (cVisits != -1)
  171.     {
  172.         var strOffline = "";
  173.         
  174.         var L_MakeAvailableOffline_Text = "G÷r tillgΣnglig <U>o</U>ffline"; 
  175.         var L_MakeAvailableOfflineAccesskey_Text = "o"; 
  176.         var L_Properties_Text = "<U>E</U>genskaper"; 
  177.         var L_PropertiesAccesskey_Text = "e"; 
  178.  
  179.         if (g_fSubscriptionsEnabled && (strUrl.substring(0,4) == "http") )
  180.         {
  181.             strOffline = "<input type=checkbox align=";
  182.                         if(document.dir == "rtl")
  183.                         {
  184.                             strOffline +="right";
  185.                         }
  186.                         else
  187.                         {
  188.                             strOffline +="left";
  189.                         }
  190.                         strOffline +=" TABINDEX=5 ACCESSKEY=" + L_MakeAvailableOfflineAccesskey_Text + " id=chkOffline "
  191.             if (fAvailableOffline != 0)
  192.                 strOffline += "CHECKED"
  193.             strOffline += " onclick='ToggleOffline(this)' helpid=50486 helpfile='iexplore.hlp'><LABEL FOR=chkOffline TABINDEX=-1>" + L_MakeAvailableOffline_Text + "</LABEL>";
  194.             strOffline += "<BR><BR><BUTTON id=btnProperties TABINDEX=6 style='visibility: "
  195.             if (fAvailableOffline != 0)
  196.                 strOffline += "visible"
  197.             else
  198.                 strOffline += "hidden"
  199.  
  200.             strOffline += "' class=button ACCESSKEY=" + L_PropertiesAccesskey_Text + " onclick='Properties()' helpid=50489 helpfile='iexplore.hlp'>" + L_Properties_Text + "</BUTTON><BR>";
  201.         }
  202.  
  203.         var L_TimesVisited_Text = "Antal bes÷k: "; 
  204.         var L_LastVisited_Text = "Senast bes÷kt: "; 
  205.         var L_LastVisitedNeedsLineBreak_Text = ""; 
  206.  
  207.         
  208.         var strTemp = strName + "\n" + strUrl;
  209.         var re = /'/g;
  210.         strTemp = strTemp.replace(re, "┤");
  211.  
  212.  
  213.         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;
  214.  
  215.  
  216.  
  217.     }
  218.     else
  219.     {
  220.         textProperties.innerHTML = "<B>" + strNameShort + "</B><BR>" + L_FavoritesFolder_Text + "<BR><BR>" +
  221.                                    "<B>" + L_ModifiedColon_Text + "</B><BR>" + strDate;
  222.     }
  223.  
  224.     
  225.     tdProperties.noWrap=true;
  226.     textProperties.noWrap=true;
  227. }
  228.  
  229. function EnableButtons()
  230. {
  231.  
  232.     g_fSubscriptionsEnabled = nsc.SubscriptionsEnabled;
  233.  
  234.  
  235.  
  236.  
  237.     var pszInitialDir = window.dialogArguments;
  238.  
  239.     if (pszInitialDir && (pszInitialDir.length > 0))
  240.     {
  241.         nsc.SetRoot(pszInitialDir);
  242.     }
  243.  
  244.     tdNsc.blur();
  245.     tdNewFolder.focus();
  246. }
  247.  
  248. function ToggleOffline(chkOffline)
  249. {
  250.  
  251.     if (chkOffline.checked)
  252.     {
  253.         
  254.         if (!nsc.CreateSubscriptionForSelection())
  255.             chkOffline.checked = false;
  256.         else 
  257.         {
  258.             g_rgUrlsToSynch[g_strUrl] = true;
  259.         }
  260.     }
  261.     else
  262.     {
  263.         if (!nsc.DeleteSubscriptionForSelection())
  264.             chkOffline.checked = true;
  265.         else 
  266.             delete g_rgUrlsToSynch[g_strUrl];
  267.     }
  268.     btnProperties.style.visibility = (chkOffline.checked ? "visible" : "hidden");
  269.  
  270. }
  271.  
  272. function BuildSynchList()
  273. {
  274.     window.returnValue = "";
  275.  
  276.     for (strUrl in g_rgUrlsToSynch)
  277.     {
  278.         window.returnValue += strUrl + "\0";
  279.     }
  280.  
  281. }
  282.  
  283. function Properties()
  284. {
  285.     nsc.InvokeContextMenuCommand("properties");
  286. }
  287.  
  288. function OnResize()
  289. {
  290.     
  291.     document.recalc(true);
  292. }
  293.  
  294. function TdNscWidth()
  295. {
  296.     return Math.max(0, document.body.offsetWidth - tableButtons.offsetWidth - (tableMain.border * 3) - (2 * parseInt(tdNsc.style.borderWidth)) - 6); 
  297. }
  298.  
  299. function TdPropertiesHeight()
  300. {
  301.     return Math.max(0, document.body.offsetHeight - (tableMain.border * 2) - tdProperties.offsetTop - tdDone.offsetHeight - 8);
  302. }
  303. </script>
  304.  
  305. </HEAD>
  306.  
  307.  
  308. <body style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; background: threedface; align: center" 
  309.       scroll="no" onkeydown="BodyOnKeyPress(event.keyCode)" onkeypress="BodyOnKeyPress(event.keyCode)" onload="EnableButtons()" onunload="BuildSynchList()" onresize="OnResize()">
  310.  
  311.  
  312.  
  313. <table id=tableMain cols=3 border=10 bordercolor=THREEDFACE>
  314.     <TR id=mainrow>
  315.         <TD valign=top id=infotext class=info>
  316.             Klicka pσ Ny mapp om du vill skapa en ny mapp. Om du vill ta bort eller byta namn pσ ett objekt markerar du objektet och klickar pσ Ta bort eller Byt namn.
  317.         </TD>
  318.         <TD id=tdColSpacing width=0>
  319.         </TD>
  320.         <TD id=tdNscHolder rowspan=3 height=100%>
  321.             <TABLE cols=1 width=100% height=100%>
  322.                 <TD id=tdNsc style="height:100%; border:2px inset WINDOW;">
  323.                     <object id=nsc TABINDEX=10 title="Listan Favoriter" accesskey="t"
  324.                         style="background:window; HEIGHT=100%; WIDTH=100%" 
  325.                         CLASSID='clsid:55136805-B2DE-11D1-B9F2-00A0C98BC547' 
  326.                         onkeypress="BodyOnKeyPress(event.keyCode)" 
  327.                         helpid=50490 
  328.                         helpfile="iexplore.hlp">
  329.                     </OBJECT>
  330.                 </TD>
  331.             </TABLE>
  332.         </TD>
  333.     </TR>
  334.     <TR id=rowButtons>
  335.         <TD>
  336.             <table id=tableButtons cols=2 width=200>
  337.                 <tr height=20>
  338.                     <TD align=center width=50%>
  339.                         <BUTTON id=tdNewFolder TABINDEX=1 style="width: 9em;" ACCESSKEY=k class=button onclick="nsc.NewFolder(); event.returnValue = false" helpid=50484 helpfile="iexplore.hlp">
  340.                             S<U>k</U>apa mapp
  341.                         </BUTTON>
  342.                     </TD>
  343.                     <TD align=center width=50%>
  344.                         <BUTTON id=tdRename    TABINDEX=2 style="width: 9em;" ACCESSKEY=B class=button onclick="nsc.InvokeContextMenuCommand('rename'); event.returnValue = false" helpid=50007 helpfile="iexplore.hlp">
  345.                             <U>B</U>yt namn
  346.                         </BUTTON>
  347.                     </TD>
  348.                 </tr>
  349.                 <tr height=20>
  350.                     <td width=50% align=center>
  351.                         <BUTTON id=tdMoveTo    TABINDEX=3 style="width: 9em;" ACCESSKEY=F class=button onclick="nsc.MoveSelectionTo(); event.returnValue = false" helpid=50006 helpfile="iexplore.hlp">
  352.                             <U>F</U>lytta till mapp...
  353.                         </BUTTON>
  354.                     </td>
  355.                     <td width=50% align=center>
  356.                         <BUTTON id=tdDelete    TABINDEX=4 style="width: 9em;" ACCESSKEY=t class=button onclick="nsc.InvokeContextMenuCommand('delete'); event.returnValue = false" helpid=50008 helpfile="iexplore.hlp">
  357.                             <U>T</U>a bort
  358.                         </BUTTON>
  359.                     </td>
  360.                 </tr>
  361.             </table>
  362.         </TD>
  363.     </TR>
  364.     <TR id=rowProperties vAlign=top style="padding-left:1px; padding-right:0px">
  365.         <TD id=tdProperties style="border-width:2px; margin-left:5px; margin-top:5px; margin-right:5px;" vAlign=top>
  366.             <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;">
  367.                 Markera en favorit om du vill visa dess egenskaper eller g÷ra den tillgΣnglig f÷r visning offline.
  368.             </DIV>
  369.         </TD>
  370.     </TR>
  371.     <TR id=rowCloseButton>
  372.         <TD id= cellCloseButton colspan=3 align=right>
  373.             <BUTTON id=tdDone TABINDEX=11 style="width: 9em;" ACCESSKEY=s class=button onclick="window.close();" helpid=50010 helpfile="iexplore.hlp">
  374.                 <U>S</U>tΣng
  375.             </BUTTON>
  376.         </TD>
  377.     </TR>
  378. </table>
  379.  
  380.  
  381. <SPAN id=spanMeasure style="visibility:hidden;" class=info></SPAN>
  382.  
  383. <script defer for=nsc event="FavoritesSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)">
  384.     OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline);
  385. </script>
  386.  
  387. <script defer>
  388.  
  389.     tdNscHolder.style.setExpression("width", "TdNscWidth()");
  390.     rowProperties.style.setExpression("height", "TdPropertiesHeight()"); 
  391. </script>
  392.  
  393.  
  394. </BODY>
  395. </HTML>
  396.