home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: iw-AddConfid.js (Javascript file for iw-AddConfid.HTM)
- //
- // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- // MessageBox() Flags
- var MB_OK = 0x00000000;
- var MB_OKCANCEL = 0x00000001;
- var MB_ABORTRETRYIGNORE = 0x00000002;
- var MB_YESNOCANCEL = 0x00000003;
- var MB_YESNO = 0x00000004;
- var MB_RETRYCANCEL = 0x00000005;
-
- var MB_ICONHAND = 0x00000010;
- var MB_ICONQUESTION = 0x00000020;
- var MB_ICONEXCLAMATION = 0x00000030;
- var MB_ICONASTERISK = 0x00000040;
-
- var MB_USERICON = 0x00000080;
- var MB_ICONWARNING = MB_ICONEXCLAMATION;
- var MB_ICONERROR = MB_ICONHAND;
-
- var MB_ICONINFORMATION = MB_ICONASTERISK;
- var MB_ICONSTOP = MB_ICONHAND;
-
- var IDOK = 1;
- var IDCANCEL = 2;
- var IDABORT = 3;
- var IDRETRY = 4;
- var IDIGNORE = 5;
- var IDYES = 6;
- var IDNO = 7;
-
- var bModify = false;
- var bReloadList = false;
-
- function fnInit()
- {
- DescSelect.focus();
-
- if(window.dialogArguments[0] == StrID("ModifyConfid"))
- bModify = true;
-
- if(bModify == true)
- {
- NISSubTitle.innerText = StrID("ModifyConfid");
- TxtName.value = window.dialogArguments[1];
- DescSelect.options[DescSelect.selectedIndex].text = window.dialogArguments[2];
- TxtInformation.value = window.dialogArguments[3];
- document.title = StrID("ModifyConfid");
- }
- }
-
-
-
- function GrabData()
- {
-
- var textArray = new Array(4);
- textArray[0]=TxtName.value;
- textArray[1]=DescSelect.options[DescSelect.selectedIndex].text
- textArray[2]=TxtInformation.value;
-
- if(bReloadList == true)
- textArray[3]=StrID("Reload");
- returnValue = textArray;
-
- }
-
- function ClickOK()
- {
- var bValid = true;
- if (ConfigInfo.bValidData(!bModify, TxtName.value, DescSelect.options[DescSelect.selectedIndex].text, TxtInformation.value) == false)
- return;
- else if (ConfigInfo.CheckDupeData(TxtInformation.value) && !bModify)
- {
- // We found dupe entry , prompt, and return
- webWind.MsgBox(StrID("ConfidDupeItem"), StrID("ConfidDupeTitle"), MB_OK | MB_ICONEXCLAMATION);
- return;
- }
- else if (ConfigInfo.CheckDupeName(TxtName.value))
- {
- bReloadList = true;
- GrabData();
- window.navigate("res://closeme.xyz");
- }
- else
- {
- GrabData();
- window.navigate("res://closeme.xyz");
- }
- }
-
- function ClickCancel()
- {
- returnValue = null;
- window.navigate("res://closeme.xyz");
- }
-
- function OnKeyDownHandler()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_ESCAPE = 27;
-
- if (window.event.keyCode == VK_ESCAPE)
- {
- // Escape key.. We want to exit out of the wizard..
- window.navigate("res://closeme.xyz");
-
- }
-
- }