Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<HTML XMLNS:helpcenter> <HEAD>
<!--
Copyright (c) 2000 Microsoft Corporation -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252"> <META HTTP-EQUIV=PICS-Label CONTENT='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))'> <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
<OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
<LINK ID=Stylesheet_Ref0 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css> <LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
<STYLE>
.Context-Button { padding : 2pt; cursor : hand; text-overflow : ellipsis; width : 100%; }
.Space-Button { margin-left : 10px; }
</STYLE>
</HEAD>
<BODY id=noloc0 tabindex=-1 class="sys-lhp-bgcolor" style="margin: 11px" scroll=no onselectstart="onSelectStart();">
<TABLE border=0 cellPadding=0 cellSpacing=0 WIDTH=100% HEIGHT=100% style="table-layout: fixed"> <TR WIDTH=100%> <TD> <DIV id=noloc1 style='width: 100%; text-overflow: ellipsis; overflow: hidden; border : 1pt solid' class='sys-font-body sys-toppane-color-border sys-toppane-header-color sys-toppane-header-bgcolor'> <DIV ID=tree_Title style='padding: 0.5em 11px'> <A class='sys-link-header sys-font-body-bold' tabIndex=1 href="hcp://system/blurbs/favorites.htm" target="HelpCtrContents">Favorites</A> </DIV> </DIV> </TD> </TR> <TR> <TD HEIGHT=100%> <DIV ID=tree_Children class='sys-font-body sys-toppane-color-border sys-toppane-bgcolor' style='width: 100%; height: 100%; overflow: auto; border-left : 1pt solid; border-bottom : 1pt solid; border-right : 1pt solid; padding: 11px'> </DIV> </TD> </TR> <TR style="padding-top: 11px"> <TD id=noloc2 align="right" WIDTH=100%>
<TABLE border=0 cellPadding=0 cellSpacing=0 WIDTH=100% style="table-layout: fixed"> <TR WIDTH=100%> <TD> <BUTTON id=idRename class="Context-Button Space-Button sys-font-body" accesskey="e" onClick="onClick_Rename();" DISABLED title="Rename the favorite item.">R<U>e</U>name</BUTTON> </TD> <TD> <BUTTON id=idRemove class="Context-Button Space-Button sys-font-body" accesskey="R" onClick="onClick_Remove();" DISABLED title="Removes the favorite item."><U>R</U>emove</BUTTON> </TD> </TR> </TABLE>
</TD> </TR> </TABLE>
</BODY>
<SCRIPT>
// // localizable variables/filenames // var L_Rename_Text = "Rename..."; var L_Delete_Text = "Delete";
var g_Favorites = null; var g_SelectedDIV = null; var g_SelectedObj = null;
function favorites_AbortEdit() { if(g_SelectedDIV) { RevertEditing( g_SelectedDIV ); } }
function favorites_ContextSwitch() { var ctx = pchealth.HelpSession.CurrentContext;
if(ctx.ContextName == "FAVORITES") { DisplayList(); } }
function favorites_TravelDone() { if(g_Favorites == null) { DisplayList(); } }
function onSelectStart() { if(event.srcElement.onblur) return; // It's the element being edited.
event.cancelBubble = true; event.returnValue = false; }
function onClick_Rename( now ) { if(!now) { window.setTimeout( "onClick_Rename( true )", 100 ); return; }
if(g_SelectedDIV) { PrepareForEdit( g_SelectedDIV ); } }
function onClick_Remove() { if(g_SelectedObj) { g_Favorites.Delete( g_SelectedObj );
g_SelectedObj = null; }
DisplayList(); }
function onClick_KeyPress() { if(event.keyCode == 27) { RevertEditing( this ); }
if(event.keyCode == 13) { if(CommitEditing( this ) == false) { if(this != g_SelectedDIV) { this.onclick(); } else { onClick_Display(); } } } }
function onClick_ContextMenu() { event.cancelBubble = true; event.returnValue = false;
var cm = pchealth.CreateObject_ContextMenu();
cm.AddItem ( L_Rename_Text , 1, window.top.MF_ENABLED ); cm.AddSeparator( ); cm.AddItem ( L_Delete_Text , 2, window.top.MF_ENABLED );
var res = cm.Display(); switch(res) { case "1": onClick_Select( this ); onClick_Rename(); break;
case "2": onClick_Select( this ); onClick_Remove(); break; } }
function onClick_Select( obj ) { if(!obj) obj = this;
event.cancelBubble = true; event.returnValue = false;
// Save the newly selected element. g_SelectedDIV = obj; g_SelectedObj = obj.payload;
SetButtonsState();
}
function onClick_Display() {
favorites_AbortEdit();
g_SelectedDIV = this; g_SelectedObj = this.payload;
SetButtonsState();
window.setTimeout( onClick_Display_Delayed, 100 ); } function onClick_Display_Delayed() { if(g_SelectedObj) { pchealth.UI_Contents.content.Navigate( g_SelectedObj.URL, null, null, null, null ); } }
////////////////////
function SetButtonsState( state ) { if(state == null) { state = (g_SelectedObj == null); }
idRename.disabled = state; idRemove.disabled = state; }
function PrepareForEdit( obj ) { var a = obj.payload_text;
a.state_caller = obj; a.contentEditable = true; a.onblur = CommitEditing;
var rng = document.body.createTextRange(); rng.moveToElementText( a ); rng.select();
SetButtonsState( true ); }
function RevertEditing( obj ) { if(!obj) obj = this.state_caller;
var a = obj.payload_text;
a.onblur = null; a.contentEditable = false; a.innerText = obj.payload.Title;
SetButtonsState(); }
function CommitEditing( obj ) { if(!obj) obj = this.state_caller;
var a = obj.payload_text; var res = false;
if(a.isContentEditable) { event.cancelBubble = true; event.returnValue = false;
a.contentEditable = false; a.onblur = null;
PersistRenamedTitle( obj );
res = true; }
SetButtonsState();
return res; }
function PersistRenamedTitle( obj ) { var a = obj.payload_text;
if(obj.payload.Title != a.innerText) { g_Favorites.Rename( a.innerText, obj.payload ); } }
////////////////////
function DisplayList() { var html = ""; var e; var i;
g_Favorites = pchealth.UserSettings.Favorites; g_SelectedRow = null; g_SelectedObj = null;
SetButtonsState( true );
// enumerate all results for(e = new Enumerator( g_Favorites ); !e.atEnd(); e.moveNext()) { // get the item and save it into array var obj = e.item();
html += "<A class='sys-link-normal' tabindex=2 href=#>" + pchealth.TextHelpers.HTMLEscape( obj.Title ) + "</A><DIV> </DIV>"; }
tree_Children.innerHTML = html;
i = 0; for(e = new Enumerator( g_Favorites ); !e.atEnd(); e.moveNext()) { // get the item and save it into array var obj = e.item(); var obj2 = tree_Children.children(i);i=i+2;
obj2.payload = obj; obj2.payload_text = obj2; obj2.onclick = onClick_Display; obj2.onkeypress = onClick_KeyPress; obj2.oncontextmenu = onClick_ContextMenu; } }
</SCRIPT>
<helpcenter:events id=idEvents onBeforeNavigate="favorites_AbortEdit();" onBeforeTransition="favorites_AbortEdit();" onBeforeContextSwitch="favorites_AbortEdit();" onContextSwitch="favorites_ContextSwitch();" onTravelDone="favorites_TravelDone();" onFavoritesUpdate="DisplayList();" />
<helpcenter:state id=idState identity="Favorites" />
</HTML>
|