81 var DeleteWiz = DeleteWiz || {};
83 if (typeof Debug ==
'undefined')
84 console.log(
'ERROR: Debug is undefined! Must include Debug.js before DeleteWiz_ConfigurationGUI.js');
85 else if (typeof Globals ==
'undefined')
86 console.log(
'ERROR: Globals is undefined! Must include Globals.js before DeleteWiz_ConfigurationGUI.js');
96 DeleteWiz.createWiz =
function(doneHandler) {
99 var _TABLE_BOOL_TYPE_TRUE_COLOR =
"rgb(201, 255, 201)";
100 var _TABLE_BOOL_TYPE_FALSE_COLOR =
"rgb(255, 178, 178)";
106 var _doneHandler = doneHandler;
107 var _aRecordWasDeleted =
false;
109 var _RECORD_TYPE_CONTEXT =
"Context";
110 var _RECORD_TYPE_APP =
"Supervisor";
111 var _validRecordTypes = [_RECORD_TYPE_CONTEXT,_RECORD_TYPE_APP];
115 function localParameterCheck()
118 var i=_validRecordTypes.length-1;
120 if(_validRecordTypes[i] == _recordAlias)
break;
123 var str =
"Invalid Record Alias '" + _recordAlias +
"' was specified. " +
124 "The only valid record aliases are as follows: ";
126 for(i=_validRecordTypes.length-1;i>=0;--i)
127 str +=
"<br>\t_validRecordTypes[i]";
128 Debug.log(str,Debug.HIGH_PRIORITY);
137 var _furthestStep = -1;
138 var _lastNextStep = -1;
144 var _STEP_OUT_OF_SEQUENCE = 1000;
151 _STEP_ALSO_DESCENDANTS = 101,
152 _STEP_CHANGE_GROUP = 1000,
153 _STEP_GET_RECORD_NAME = 100,
154 _STEP_SAVE_MODIFIED = 500,
155 _STEP_WHICH_RECORD_TYPE = 20;
161 Debug.log(
"DeleteWiz.wiz constructed");
162 DeleteWiz.wiz =
this;
164 var windowTooltip=
"Welcome to the Delete Wizard GUI. Here you can delete hierarchical records for " +
165 "your <i>otsdaq</i> system. \n\n" +
166 "The Delete Wizard is presented as a step-by-step process that will walk you through deleting a record and its children.\n\n" +
168 "Briefly, here is a description of the steps: " +
169 "\n\t- 'What is the name of your record?'" +
170 "\n\t- 'How deep into the hierachy do you want to delete?'";
171 DesktopContent.tooltip(
"Delete Wizard Introduction",
173 DesktopContent.setWindowTooltip(windowTooltip);
174 xdaqContextTooltip();
175 xdaqApplicationTooltip();
177 showPrompt(_STEP_WHICH_RECORD_TYPE);
189 function xdaqContextTooltip()
191 DesktopContent.tooltip(
"XDAQ Contexts",
192 "The lowest level parent for all records, in the <i>otsdaq</i> configuration tree, is a XDAQ Context. " +
193 "What is a XDAQ Context? Why do I need a XDAQ Context? Do I want a new one for my " + _recordAlias +
" or not?" +
195 "XDAQ Contexts are the fundamental executable program building blocks of <i>otsdaq</i>. " +
196 "A XDAQ Context runs a group of XDAQ Applications inside of it. If one of those XDAQ Applications crashes, " +
197 "then only the parent XDAQ Context will crash. This is one reason organizing your <i>otsdaq</i> entities into separate XDAQ Contexts makes sense." +
199 "Two other useful features of XDAQ Contexts are that they can easily be turned on and off (enabled and disabled through the configuration editors), and " +
200 "they can easily be distributed to other nodes (computers) in your DAQ system when your system scales up."
205 function xdaqApplicationTooltip()
207 DesktopContent.tooltip(
"XDAQ Applications",
208 "The second level parent for all records, in the <i>otsdaq</i> configuration tree, is a XDAQ Application. " +
209 "What is a XDAQ Application? Why do I need a XDAQ Application? Do I want a new one for my " + _recordAlias +
" or not?" +
211 "XDAQ Applications are server processes that can be controlled by <i>otsdaq</i> through network messages. " +
212 "Ther can be one or many XDAQ Applciation in a XDAQ Context. If one of those XDAQ Applications crashes, " +
213 "then all of the other XDAQ Applications in the parent XDAQ Context will crash. This is one reason organizing your <i>otsdaq</i> entities into separate XDAQ Contexts makes sense." +
215 "Two other useful features of XDAQ Applications are that they can respond to web requests and state machine transitions."
223 function initDeleteWizard()
226 _modifiedTables = [];
233 var el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
236 el.parentNode.removeChild(el);
237 el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
243 ConfigurationAPI.getAliasesAndGroups(
246 _systemGroups = retObj;
247 console.log(
"_systemGroups",_systemGroups);
248 console.log(
"ConfigurationAPI._activeGroups",ConfigurationAPI._activeGroups);
252 ConfigurationAPI.getSubsetRecords(
253 getRecordConfiguration(),
257 _subsetUIDs = records;
258 Debug.log(
"records found = " + records.length);
259 console.log(records);
261 showPrompt(_STEP_GET_RECORD_NAME);
273 function showPrompt(stepIndex,paramObj)
276 if(!stepIndex) stepIndex = 0;
278 if(stepIndex > _furthestStep &&
279 _furthestStep < _STEP_OUT_OF_SEQUENCE)
280 _furthestStep = stepIndex;
282 Debug.log(
"showPrompt " + stepIndex);
283 Debug.log(
"_furthestStep " + _furthestStep);
286 if(!_paramObjMap) _paramObjMap = {};
290 _paramObjMap[stepIndex] = paramObj;
291 else if(_paramObjMap[stepIndex])
292 paramObj = _paramObjMap[stepIndex];
296 _paramObjMap[stepIndex] = {};
297 paramObj = _paramObjMap[stepIndex];
300 console.log(
"_paramObjMap",_paramObjMap);
301 console.log(
"paramObj",paramObj);
303 var el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
308 el.parentNode.removeChild(el);
309 el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
318 var stepString =
"stepIndex-" + stepIndex +
"-";
320 var showPrevButton =
true;
321 var showNextButton =
true;
322 var prevStepIndex = stepIndex-1;
323 if(prevStepIndex > _lastNextStep)
324 prevStepIndex = _lastNextStep;
325 _lastNextStep = stepIndex;
327 var nextStepIndex = stepIndex+1;
328 var prevButtonText =
"Go Back";
329 var nextButtonText =
"Next Step";
334 recordName = _paramObjMap[_STEP_GET_RECORD_NAME][
"recordName"];
341 function localAddContent()
347 case _STEP_SAVE_MODIFIED:
349 Debug.log(
"_STEP_SAVE_MODIFIED ");
351 nextButtonText =
"Done!";
354 str +=
"Things are getting real! Are you sure you want to proceed?<br><br>" +
355 "To finalize your deletions, please click 'Done!'";
359 Debug.log(
"All deletions, so far, were made temporarily. For them to persist, " +
360 "you must follow the prompt and click the 'Done!' button.",
361 Debug.INFO_PRIORITY);
365 case _STEP_ALSO_DESCENDANTS:
367 localAlsoDescendantContent();
368 function localAlsoDescendantContent()
370 showNextButton =
false;
373 Debug.log(
"_STEP_ALSO_DESCENDANTS " + recordName);
378 var children = paramObj[
"rootChildren"];
381 str +=
"Do you want to delete all the descendants along with the parent " + _recordAlias +
" named '" +
382 recordName +
",' or only the chosen " + _recordAlias +
" record named '" +
387 str +=
"<b>For reference, here are the first-level children of the chosen " + _recordAlias +
389 recordName +
"':</b><br>";
391 str += htmlOpen(
"select",
393 "id" : stepString +
"rootChildren",
396 for(var i=0;i<children.length;++i)
398 str += htmlOpen(
"option",
401 ConfigurationAPI.getTreeRecordName(children[i]) ,
406 str += htmlClearDiv();
407 str += htmlOpen(
"input",
409 "id": stepString +
"deleteDescendants",
411 "value":
"Delete " + _recordAlias +
" and ALL Descendants",
412 "title":
"Delete all children of the chosen " + _recordAlias +
" named '" +
413 recordName +
".'"
419 str +=
"There were no Supervisor children found for the parent " + _recordAlias +
" named '" +
420 recordName +
"' - do you want to delete the " + _recordAlias +
" named '" +
424 str += htmlClearDiv();
426 str += htmlOpen(
"input",
428 "style":
"margin:20px;",
429 "id": stepString +
"deleteOnlyRoot",
431 "value":
"Delete Only the " + _recordAlias,
432 "title":
"Delete only the chosen " + _recordAlias +
" named '" +
433 recordName +
".'"
445 case _STEP_CHANGE_GROUP:
448 showNextButton =
false;
449 nextStepIndex = _STEP_GET_RECORD_NAME;
450 prevStepIndex = _STEP_GET_RECORD_NAME;
452 str +=
"Choose a '" + paramObj[
"groupType"] +
453 "' group to activate (either a System Alias or specific group):";
455 str += htmlClearDiv();
458 str +=
"<table style='margin-bottom: 10px;'>";
459 if(_systemGroups.aliases[paramObj[
"groupType"]].length)
461 str +=
"<tr><td><b>System Aliases:</b></td><td>";
463 str += htmlOpen(
"select",
465 "id" : stepString +
"aliases",
468 for(var i=0;i<_systemGroups.aliases[paramObj[
"groupType"]].length;++i)
470 str += htmlOpen(
"option",
473 _systemGroups.aliases[paramObj[
"groupType"]]
477 str += htmlOpen(
"input",
479 "id": stepString +
"activateAlias",
481 "value":
"Activate Alias",
482 "title":
"Activate chosen System Alias and return to creating your new " + _recordAlias +
"."
489 str +=
"<tr><td colspan='2'>No system aliases of type Context found.</td></tr>";
491 var groupNames = Object.keys(_systemGroups.groups[paramObj[
"groupType"]]);
492 if(groupNames.length)
494 str +=
"<tr><td><b>Group Names:</b></td><td>";
496 str += htmlOpen(
"select",
498 "id" : stepString +
"groupNames",
501 for(var i=0;i<groupNames.length;++i)
503 str += htmlOpen(
"option",
506 groupNames[i] ,
true );
514 str +=
"<tr><td colspan='2'>No groups of type Context found.</td></tr>";
516 if(groupNames.length)
518 str +=
"<tr><td><b>Group Keys:</b></td><td>";
520 str += htmlOpen(
"select",
522 "id" : stepString +
"groupKeys",
525 for(var i=0;i<_systemGroups.groups[paramObj[
"groupType"]]
526 [groupNames[0]].keys.length;++i)
528 str += htmlOpen(
"option",
531 _systemGroups.groups[paramObj[
"groupType"]]
532 [groupNames[0]].keys[i] ,
true );
535 str += htmlOpen(
"input",
537 "id": stepString +
"activateGroup",
539 "value":
"Activate Group",
540 "title":
"Activate chosen Group and Key pair and return to creating your new " + _recordAlias +
"."
551 case _STEP_GET_RECORD_NAME:
554 Debug.log(
"_STEP_GET_RECORD_NAME " + _recordAlias);
556 _modifiedTables = [];
558 prevStepIndex = _STEP_WHICH_RECORD_TYPE;
562 str += htmlOpen(
"div",
564 "style" :
"font-weight:bold; margin: 6px 0 20px 0;"
567 (
"Would you like to delete another " + _recordAlias +
"?"):
568 (
"Welcome to the " + _recordAlias +
" deletion Wizard!")) ,
570 str += htmlClearDiv();
574 str +=
"Choose the " + _recordAlias +
" record name to be deleted: ";
575 str += htmlClearDiv();
577 str += htmlOpen(
"select",
579 "id" : stepString +
"recordName",
580 "style" :
"margin-bottom: 16px;"
584 for(var i=0;i<_subsetUIDs.length;++i)
587 (paramObj[
"recordName"] &&
588 paramObj[
"recordName"]==_subsetUIDs[i]?
"selected":
"") +
590 str += _subsetUIDs[i];
598 str += htmlClearDiv();
599 str +=
"Note you are currently editing these active groups:";
601 str +=
"<table style='margin-bottom: 10px;'>";
602 str +=
"<tr><td><b>Active Context:</b></td><td>";
603 str += ConfigurationAPI._activeGroups.Context.groupName +
" (" + ConfigurationAPI._activeGroups.Context.groupKey +
")";
606 str += htmlOpen(
"div",
608 "id": stepString +
"editContext",
609 "class": ConfigurationAPI._POP_UP_DIALOG_ID +
"-editIcon",
610 "style":
"float:right; display:block; margin: -3px 0 0 10px;",
611 "title":
"Click to activate a different Context group.",
616 str +=
"<tr><td><b>Active Configuration:</b></td><td>";
617 str += _systemGroups.activeGroups.Configuration.groupName +
" (" + _systemGroups.activeGroups.Configuration.groupKey +
")";
619 str += htmlOpen(
"div",
621 "id": stepString +
"editConfig",
622 "class": ConfigurationAPI._POP_UP_DIALOG_ID +
"-editIcon",
623 "style":
"float:right; display:block; margin: -3px 0 0 10px;",
624 "title":
"Click to activate a different Configuration group.",
634 case _STEP_WHICH_RECORD_TYPE:
636 Debug.log(
"_STEP_WHICH_RECORD_TYPE ");
638 nextStepIndex = _STEP_GET_RECORD_NAME;
639 prevButtonText =
"Close Wizard";
643 str += htmlOpen(
"div",
645 "style" :
"font-weight:bold; margin: 6px 0 20px 0;"
647 "Welcome to the record deletion Wizard!" ,
649 str += htmlClearDiv();
653 str += htmlClearDiv();
654 str +=
"Below is a dropdown of record types that this Wizard can help you delete. " +
655 " Choose one and proceed through the steps to delete the chosen record and its children:";
656 str += htmlClearDiv();
657 str += htmlOpen(
"select",
659 "id" : stepString +
"recordTypes",
660 "style" :
"margin-bottom: 16px;"
663 for(var i=0;i<_validRecordTypes.length;++i)
665 str += htmlOpen(
"option",
667 },_validRecordTypes[i] ,
true );
673 Debug.log(
"Should never happen - bad stepIndex (" + stepIndex +
674 ")!",Debug.HIGH_PRIORITY);
682 if(stepIndex && showPrevButton)
683 ctrlStr += htmlOpen(
"input",
685 "class":
"prevButton " + stepString +
"prevButton",
687 "value": prevButtonText,
688 "title":
"Return to the previous step in the " + _recordAlias +
" creation wizard."
692 ctrlStr += htmlOpen(
"input",
694 "class":
"nextButton " + stepString +
"nextButton",
696 "value": nextButtonText,
697 "title":
"Proceed to the next step in the " + _recordAlias +
" creation wizard."
703 el = document.createElement(
"div");
704 el.setAttribute(
"id", ConfigurationAPI._POP_UP_DIALOG_ID);
706 ConfigurationAPI.setPopUpPosition(el,w ,h );
708 el.innerHTML = ctrlStr + htmlClearDiv() + str + htmlClearDiv() + ctrlStr;
709 document.body.appendChild(el);
717 function localAddHandlers()
719 var newParamObj = {};
728 case _STEP_ALSO_DESCENDANTS:
730 localAlsoDescendantsHandlers();
733 function localAlsoDescendantsHandlers()
738 document.getElementById(stepString +
"deleteOnlyRoot").onclick =
741 localDeleteRootRecord();
745 var deleteDescendantsButton = document.getElementById(stepString +
"deleteDescendants");
746 if(!deleteDescendantsButton)
return;
748 deleteDescendantsButton.onclick =
751 Debug.log(
"deleteDescendants " + recordName);
761 if(_recordAlias == _RECORD_TYPE_CONTEXT)
762 localRecurseDeleteChildren(_paramObjMap[_STEP_ALSO_DESCENDANTS][
"rootChildren"],
763 "XDAQApplicationConfiguration",0);
764 else if(_recordAlias == _RECORD_TYPE_APP)
765 localRecurseDeleteChildren([_paramObjMap[_STEP_ALSO_DESCENDANTS][
"root"]],
766 "XDAQApplicationConfiguration",0);
770 function localRecurseDeleteChildren(children, table, depth)
772 if(table ==
"NO_LINK")
return;
774 console.log(depth,table,children);
780 for(var i=0;i<children.length;++i)
784 name = ConfigurationAPI.getTreeRecordName(children[i]);
788 Debug.log(
"Name extraction failed. Assuming disconnected link: " + e);
789 console.log(deleteMap);
793 if(!deleteMap[table]) deleteMap[table] = [];
796 if(deleteMap[table].indexOf(name) >= 0)
continue;
798 deleteMap[table].push(name);
799 console.log(deleteMap);
802 childLinks = ConfigurationAPI.getTreeRecordLinks(children[i]);
804 for(var j=0;j<childLinks.length;++j)
805 localRecurseDeleteChildren(
806 ConfigurationAPI.getTreeLinkChildren(childLinks[j]),
807 ConfigurationAPI.getTreeLinkTable(childLinks[j]),
812 console.log(deleteMap);
815 var requestCount = 0;
818 _modifiedTables = [];
819 for(var table in deleteMap)
821 Debug.log(
"table " + table);
823 if(_recordAlias == _RECORD_TYPE_CONTEXT)
825 if( table ==
"XDAQContextTable")
828 else if(table ==
"XDAQContextTable" ||
829 table ==
"XDAQApplicationConfiguration")
835 ConfigurationAPI.deleteSubsetRecords(
839 function(modifiedTables,err,table,deletionCount)
842 Debug.log(
"modifiedTables length " + modifiedTables.length);
846 Debug.log(
"There was an error while deleting " + deletionCount +
847 " records from table '" +
849 Debug.HIGH_PRIORITY);
855 recordCount += deletionCount;
858 if(modifiedTables && modifiedTables[0])
859 _modifiedTables.push(modifiedTables[0]);
862 Debug.log(deletionCount +
" records in table '" +
863 table +
" were successfully removed!", Debug.INFO_PRIORITY);
865 if(requestCount == 0)
867 Debug.log(
"Descendant Summary: " + recordCount +
" records from " +
868 tableCount +
" tables were successfully removed!",
869 Debug.INFO_PRIORITY);
870 localDeleteRootRecord();
880 localDeleteRootRecord();
889 case _STEP_GET_RECORD_NAME:
895 document.getElementById(stepString +
"editConfig").onclick =
898 newParamObj[
"groupType"] =
"Configuration";
900 paramObj[
"recordName"] = document.getElementById(stepString +
"recordName").value.trim();
901 showPrompt(_STEP_CHANGE_GROUP,newParamObj);
904 document.getElementById(stepString +
"editContext").onclick =
907 newParamObj[
"groupType"] =
"Context";
909 paramObj[
"recordName"] = document.getElementById(stepString +
"recordName").value.trim();
910 showPrompt(_STEP_CHANGE_GROUP,newParamObj);
916 case _STEP_CHANGE_GROUP:
921 document.getElementById(stepString +
"activateAlias").onclick =
925 var alias = document.getElementById(stepString +
"aliases").value;
926 Debug.log(
"activateAlias " + alias);
931 _systemGroups.aliases[paramObj[
"groupType"]].length;++i)
932 if(_systemGroups.aliases[paramObj[
"groupType"]][i].alias ==
935 aliasObj = _systemGroups.aliases[paramObj[
"groupType"]][i];
939 Debug.log(
"activateAlias group " + aliasObj.name +
942 ConfigurationAPI.activateGroup(aliasObj.name, aliasObj.key,
947 Debug.log(
"The System Alias '" + alias +
948 "' (" + aliasObj.name +
" (" +
949 aliasObj.key +
")) was successfully activated!", Debug.INFO_PRIORITY);
956 document.getElementById(stepString +
"groupNames").onchange =
960 Debug.log(
"Filling dropdown with keys for " + this.value);
962 for(var i=0;i<_systemGroups.groups[paramObj[
"groupType"]]
963 [this.value].keys.length;++i)
965 str += htmlOpen(
"option",
968 _systemGroups.groups[paramObj[
"groupType"]]
969 [this.value].keys[i] ,
true );
971 document.getElementById(stepString +
"groupKeys").innerHTML =
976 document.getElementById(stepString +
"activateGroup").onclick =
980 var name = document.getElementById(stepString +
"groupNames").value;
981 var key = document.getElementById(stepString +
"groupKeys").value;
983 Debug.log(
"activateGroup " + name +
986 ConfigurationAPI.activateGroup(name, key,
991 Debug.log(
"The Group '" + name +
" (" +
992 key +
") was successfully activated!", Debug.INFO_PRIORITY);
1014 function localDeleteRootRecord()
1016 Debug.log(
"localDeleteRootRecord " + recordName);
1021 ConfigurationAPI.deleteSubsetRecords(
1022 getRecordConfiguration(),
1025 function(modifiedTables,err)
1027 Debug.log(
"modifiedTables length " + modifiedTables.length);
1028 if(!modifiedTables.length)
1031 Debug.log(
"There was an error while removing the " + _recordAlias +
1033 recordName +
".' " + err,
1034 Debug.HIGH_PRIORITY);
1037 _modifiedTables = modifiedTables;
1040 Debug.log(
"The " + _recordAlias +
" named '" +
1041 recordName +
"' was successfully removed!",
1042 Debug.INFO_PRIORITY);
1044 showPrompt(_STEP_SAVE_MODIFIED);
1065 document.getElementsByClassName(stepString +
"nextButton")[0].onclick =
1066 localNextButtonHandler;
1067 document.getElementsByClassName(stepString +
"nextButton")[1].onclick =
1068 localNextButtonHandler;
1070 function localNextButtonHandler()
1076 case _STEP_SAVE_MODIFIED:
1079 localScopeSetRecordSaveModifiedDoIt();
1082 function localScopeSetRecordSaveModifiedDoIt()
1084 Debug.log(
"localScopeSetRecordSaveModifiedDoIt");
1087 ConfigurationAPI.saveModifiedTables(_modifiedTables,
1088 function(savedTables, savedGroups, savedAliases)
1090 if(!savedTables.length)
1092 Debug.log(
"There was an error while deleting the records.",
1093 Debug.HIGH_PRIORITY);
1097 Debug.log(
"The deletions were successfully completed!", Debug.INFO_PRIORITY);
1103 _modifiedTables = [];
1105 _aRecordWasDeleted =
true;
1119 case _STEP_GET_RECORD_NAME:
1122 recordName = document.getElementById(stepString +
"recordName").value.trim();
1123 paramObj[
"recordName"] = recordName;
1127 ConfigurationAPI.getTree(
1128 getRecordConfiguration() +
"/" + recordName,
1136 if(!_paramObjMap[_STEP_ALSO_DESCENDANTS]) _paramObjMap[_STEP_ALSO_DESCENDANTS] = {};
1138 var links = ConfigurationAPI.getTreeRecordLinks(tree);
1140 _paramObjMap[_STEP_ALSO_DESCENDANTS][
"root"] = tree;
1141 _paramObjMap[_STEP_ALSO_DESCENDANTS][
"rootChildren"] = [];
1144 for(var i=0;i<links.length;++i)
1145 _paramObjMap[_STEP_ALSO_DESCENDANTS][
"rootChildren"] =
1146 _paramObjMap[_STEP_ALSO_DESCENDANTS][
"rootChildren"].concat(
1147 ConfigurationAPI.getTreeLinkChildren(links[i]));
1149 showPrompt(_STEP_ALSO_DESCENDANTS);
1156 case _STEP_WHICH_RECORD_TYPE:
1159 if(scopeWhichRecordTypeNext())
1162 function scopeWhichRecordTypeNext()
1164 var newRecordAlias = document.getElementById(stepString +
"recordTypes").value.trim();
1166 var needToInit = (_recordAlias != newRecordAlias);
1168 _recordAlias = newRecordAlias;
1169 Debug.log(
"_recordAlias chosen as " + _recordAlias);
1171 if(needToInit) initDeleteWizard();
1178 showPrompt(nextStepIndex,newParamObj);
1181 catch(e){ Debug.log(
"Caught ERROR: " + e.stack);}
1185 document.getElementsByClassName(stepString +
"prevButton")[0].onclick =
1186 localPrevButtonHandler;
1187 document.getElementsByClassName(stepString +
"prevButton")[1].onclick =
1188 localPrevButtonHandler;
1190 function localPrevButtonHandler()
1195 case _STEP_WHICH_RECORD_TYPE:
1200 _modifiedTables = [];
1206 var el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
1209 el.parentNode.removeChild(el);
1210 el = document.getElementById(ConfigurationAPI._POP_UP_DIALOG_ID);
1213 if(_doneHandler) _doneHandler(_aRecordWasDeleted);
1218 showPrompt(prevStepIndex);
1221 catch(e){ Debug.log(
"Caught ERROR: " + e.stack);}
1230 function getRecordConfiguration()
1233 if(_recordAlias == _RECORD_TYPE_CONTEXT)
1234 retVal =
"XDAQContextTable";
1235 else if(_recordAlias == _RECORD_TYPE_APP)
1236 retVal =
"XDAQApplicationConfiguration";
1247 function getRecordFilter()
1250 if(_recordAlias == _RECORD_TYPE_CONTEXT)
1252 else if(_recordAlias == _RECORD_TYPE_APP)
1262 function htmlOpen(tag,attObj,innerHTML,closeTag)
1265 var attKeys = Object.keys(attObj);
1266 str +=
"<" + tag +
" ";
1267 for(var i=0;i<attKeys.length;++i)
1268 str +=
" " + attKeys[i] +
"='" +
1269 attObj[attKeys[i]] +
"' ";
1271 if(innerHTML) str += innerHTML;
1273 str +=
"</" + tag +
">";
1279 function htmlClearDiv()
1281 return "<div id='clearDiv'></div>";