rem: if (!confirm(promptStr))  return(false); 
add: var yesStr = bundle.GetStringFromName("RemoveCategoryYes"); var flags = ((promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + promptService.BUTTON_POS_1_DEFAULT); if (promptService.confirmEx(window, titleStr, promptStr, flags, yesStr, null, null, null, {value:0}) == 1) return false; 
context: function RemoveCategory(){  // make sure we have at least one category  var categoryPopup = document.getElementById( "categoryPopup" );  if (!categoryPopup) return(false);  if (categoryPopup.childNodes.length < 1)  return(false);  var promptStr = bundle.GetStringFromName("RemoveCategoryPrompt");  if (!confirm(promptStr))  return(false);  var categoryRes = RDF.GetResource("NC:SearchCategoryRoot");  if (!categoryRes) return(false);  var categoryList = document.getElementById( "categoryList" );  if (!categoryList)  return(false);  var idNum = categoryList.selectedIndex;  var id = categoryList.selectedItem.getAttribute("id");  if ((!id) || (id == ""))  return(false);  var idRes = RDF.GetResource(id);  if (!idRes) return(false);  RDFC.Init(catDS, categoryRes);  var nodeIndex = RDFC.IndexOf(idRes);  if (nodeIndex < 1)  return(false);    // how did that happen?  RDFC.RemoveElementAt(nodeIndex, true, idRes);  // try and select another category  if (idNum > 0)  --idNum;  else    idNum = 0;  if (categoryPopup.childNodes.length > 0)  {    categoryList.selectedItem = categoryPopup.childNodes[idNum];    chooseCategory(categoryList.selectedItem);  }  else  {    // last category was deleted, so empty out engine list    var treeNode = document.getElementById("engineList");    if (treeNode)    {      treeNode.setAttribute( "ref", "" );    }  }  return(true);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/3282df3cc22f5a10b74e173e38840e68baae1df7/search-editor.js/clean/suite/common/search/search-editor.js