home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2001 July / VPR0107A.BIN / SHDOCLC.DLL / HTML / ORGFAV.DLG < prev    next >
Text File  |  2000-06-19  |  12KB  |  395 lines

  1.  
  2. <HTML id=dlgOrganizeFavorites STYLE="font-family: MS UI Gothic; font-size: 9pt; width: 41.2em; height: 31.0em">
  3. <meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
  4. <head>
  5.  
  6. <style>
  7.     .button {color: BUTTONTEXT; font-size: 9pt}
  8.     .info {font-size: 9pt; 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. お気に入りの整理
  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 = "このダイアログでエラーが発生しました。";
  79.     var L_ErrorNumber_Text = "エラー : ";
  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 = "お気に入りのフォルダ"; 
  166.     var L_ModifiedColon_Text = "更新日時 :"; 
  167.     
  168.     
  169.     if (cVisits != -1)
  170.     {
  171.         var strOffline = "";
  172.         
  173.         var L_MakeAvailableOffline_Text = "オフラインで使用する(<U>O</U>)"; 
  174.         var L_MakeAvailableOfflineAccesskey_Text = "o"; 
  175.         var L_Properties_Text = "プロパティ(<U>P</U>)"; 
  176.         var L_PropertiesAccesskey_Text = "p"; 
  177.  
  178.         if (g_fSubscriptionsEnabled && (strUrl.substring(0,4) == "http") )
  179.         {
  180.             strOffline = "<input type=checkbox align=";
  181.                         if(document.dir == "rtl")
  182.                         {
  183.                             strOffline +="right";
  184.                         }
  185.                         else
  186.                         {
  187.                             strOffline +="left";
  188.                         }
  189.                         strOffline +=" TABINDEX=5 ACCESSKEY=" + L_MakeAvailableOfflineAccesskey_Text + " id=chkOffline "
  190.             if (fAvailableOffline != 0)
  191.                 strOffline += "CHECKED"
  192.             strOffline += " onclick='ToggleOffline(this)' helpid=50486 helpfile='iexplore.hlp'><LABEL FOR=chkOffline TABINDEX=-1>" + L_MakeAvailableOffline_Text + "</LABEL>";
  193.             strOffline += "<BR><BR><BUTTON id=btnProperties TABINDEX=6 style='visibility: "
  194.             if (fAvailableOffline != 0)
  195.                 strOffline += "visible"
  196.             else
  197.                 strOffline += "hidden"
  198.  
  199.             strOffline += "' class=button ACCESSKEY=" + L_PropertiesAccesskey_Text + " onclick='Properties()' helpid=50489 helpfile='iexplore.hlp'>" + L_Properties_Text + "</BUTTON><BR>";
  200.         }
  201.  
  202.         var L_TimesVisited_Text = "表示回数 : "; 
  203.         var L_LastVisited_Text = "最終表示日時 : "; 
  204.         var L_LastVisitedNeedsLineBreak_Text = ""; 
  205.  
  206.         
  207.         var strTemp = strName + "\n" + strUrl;
  208.         var re = /'/g;
  209.         strTemp = strTemp.replace(re, "´");
  210.  
  211.  
  212.         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;
  213.  
  214.  
  215.  
  216.     }
  217.     else
  218.     {
  219.         textProperties.innerHTML = "<B>" + strNameShort + "</B><BR>" + L_FavoritesFolder_Text + "<BR><BR>" +
  220.                                    "<B>" + L_ModifiedColon_Text + "</B><BR>" + strDate;
  221.     }
  222.  
  223.     
  224.     tdProperties.noWrap=true;
  225.     textProperties.noWrap=true;
  226. }
  227.  
  228. function EnableButtons()
  229. {
  230.  
  231.     g_fSubscriptionsEnabled = nsc.SubscriptionsEnabled;
  232.  
  233.  
  234.  
  235.  
  236.     var pszInitialDir = window.dialogArguments;
  237.  
  238.     if (pszInitialDir && (pszInitialDir.length > 0))
  239.     {
  240.         nsc.SetRoot(pszInitialDir);
  241.     }
  242.  
  243.     tdNsc.blur();
  244.     tdNewFolder.focus();
  245. }
  246.  
  247. function ToggleOffline(chkOffline)
  248. {
  249.  
  250.     if (chkOffline.checked)
  251.     {
  252.         
  253.         if (!nsc.CreateSubscriptionForSelection())
  254.             chkOffline.checked = false;
  255.         else 
  256.         {
  257.             g_rgUrlsToSynch[g_strUrl] = true;
  258.         }
  259.     }
  260.     else
  261.     {
  262.         if (!nsc.DeleteSubscriptionForSelection())
  263.             chkOffline.checked = true;
  264.         else 
  265.             delete g_rgUrlsToSynch[g_strUrl];
  266.     }
  267.     btnProperties.style.visibility = (chkOffline.checked ? "visible" : "hidden");
  268.  
  269. }
  270.  
  271. function BuildSynchList()
  272. {
  273.     window.returnValue = "";
  274.  
  275.     for (strUrl in g_rgUrlsToSynch)
  276.     {
  277.         window.returnValue += strUrl + "\0";
  278.     }
  279.  
  280. }
  281.  
  282. function Properties()
  283. {
  284.     nsc.InvokeContextMenuCommand("properties");
  285. }
  286.  
  287. function OnResize()
  288. {
  289.     
  290.     document.recalc(true);
  291. }
  292.  
  293. function TdNscWidth()
  294. {
  295.     return Math.max(0, document.body.offsetWidth - tableButtons.offsetWidth - (tableMain.border * 3) - (2 * parseInt(tdNsc.style.borderWidth)) - 6); 
  296. }
  297.  
  298. function TdPropertiesHeight()
  299. {
  300.     return Math.max(0, document.body.offsetHeight - (tableMain.border * 2) - tdProperties.offsetTop - tdDone.offsetHeight - 8);
  301. }
  302. </script>
  303.  
  304. </HEAD>
  305.  
  306.  
  307. <body style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; background: threedface; align: center" 
  308.       scroll="no" onkeydown="BodyOnKeyPress(event.keyCode)" onkeypress="BodyOnKeyPress(event.keyCode)" onload="EnableButtons()" onunload="BuildSynchList()" onresize="OnResize()">
  309.  
  310.  
  311.  
  312. <table id=tableMain cols=3 border=10 bordercolor=THREEDFACE>
  313.     <TR id=mainrow>
  314.         <TD valign=top id=infotext class=info>
  315.             新しいフォルダを作成するには、[フォルダの作成] ボタンをクリックしてください。項目の名前を変更または削除するには、項目を選択してから [名前の変更] ボタン、または [削除] ボタンをクリックしてください。
  316.         </TD>
  317.         <TD id=tdColSpacing width=0>
  318.         </TD>
  319.         <TD id=tdNscHolder rowspan=3 height=100%>
  320.             <TABLE cols=1 width=100% height=100%>
  321.                 <TD id=tdNsc style="height:100%; border:2px inset WINDOW;">
  322.                     <object id=nsc TABINDEX=10 title="お気に入りの一覧" accesskey="t"
  323.                         style="background:window; HEIGHT=100%; WIDTH=100%" 
  324.                         CLASSID='clsid:55136805-B2DE-11D1-B9F2-00A0C98BC547' 
  325.                         onkeypress="BodyOnKeyPress(event.keyCode)" 
  326.                         helpid=50490 
  327.                         helpfile="iexplore.hlp">
  328.                     </OBJECT>
  329.                 </TD>
  330.             </TABLE>
  331.         </TD>
  332.     </TR>
  333.     <TR id=rowButtons>
  334.         <TD>
  335.             <table id=tableButtons cols=2 width=200>
  336.                 <tr height=20>
  337.                     <TD align=center width=50%>
  338.                         <BUTTON id=tdNewFolder TABINDEX=1 style="width: 9em;" ACCESSKEY=c class=button onclick="nsc.NewFolder(); event.returnValue = false" helpid=50484 helpfile="iexplore.hlp">
  339.                             フォルダの作成(<U>C</U>)
  340.                         </BUTTON>
  341.                     </TD>
  342.                     <TD align=center width=50%>
  343.                         <BUTTON id=tdRename    TABINDEX=2 style="width: 9em;" ACCESSKEY=r class=button onclick="nsc.InvokeContextMenuCommand('rename'); event.returnValue = false" helpid=50007 helpfile="iexplore.hlp">
  344.                             名前の変更(<U>R</U>)
  345.                         </BUTTON>
  346.                     </TD>
  347.                 </tr>
  348.                 <tr height=20>
  349.                     <td width=50% align=center>
  350.                         <BUTTON id=tdMoveTo    TABINDEX=3 style="width: 9em;" ACCESSKEY=m class=button onclick="nsc.MoveSelectionTo(); event.returnValue = false" helpid=50006 helpfile="iexplore.hlp">
  351.                             フォルダへ移動(<U>M</U>)...
  352.                         </BUTTON>
  353.                     </td>
  354.                     <td width=50% align=center>
  355.                         <BUTTON id=tdDelete    TABINDEX=4 style="width: 9em;" ACCESSKEY=d class=button onclick="nsc.InvokeContextMenuCommand('delete'); event.returnValue = false" helpid=50008 helpfile="iexplore.hlp">
  356.                             削除(<U>D</U>)
  357.                         </BUTTON>
  358.                     </td>
  359.                 </tr>
  360.             </table>
  361.         </TD>
  362.     </TR>
  363.     <TR id=rowProperties vAlign=top style="padding-left:1px; padding-right:0px">
  364.         <TD id=tdProperties style="border-width:2px; margin-left:5px; margin-top:5px; margin-right:5px;" vAlign=top>
  365.             <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;">
  366.                 お気に入りの項目のプロパティを表示したり、項目をオフラインで使用するには、そのお気に入りの項目を選択してください。
  367.             </DIV>
  368.         </TD>
  369.     </TR>
  370.     <TR id=rowCloseButton>
  371.         <TD id= cellCloseButton colspan=3 align=right>
  372.             <BUTTON id=tdDone TABINDEX=11 style="width: 9em;" ACCESSKEY=l class=button onclick="window.close();" helpid=50010 helpfile="iexplore.hlp">
  373.                 閉じる(<U>L</U>)
  374.             </BUTTON>
  375.         </TD>
  376.     </TR>
  377. </table>
  378.  
  379.  
  380. <SPAN id=spanMeasure style="visibility:hidden;" class=info></SPAN>
  381.  
  382. <script defer for=nsc event="FavoritesSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline)">
  383.     OnSelectionChange(cItems, hItem, strName, strUrl, cVisits, strDate, fAvailableOffline);
  384. </script>
  385.  
  386. <script defer>
  387.  
  388.     tdNscHolder.style.setExpression("width", "TdNscWidth()");
  389.     rowProperties.style.setExpression("height", "TdPropertiesHeight()"); 
  390. </script>
  391.  
  392.  
  393. </BODY>
  394. </HTML>
  395.