context: function deleteCerts(){  getSelectedCerts();  var numcerts = selected_certs.length;  if (!numcerts)    return;  var params = Components.classes[nsDialogParamBlock].createInstance(nsIDialogParamBlock);    var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");  var selTab = document.getElementById('certMgrTabbox').selectedItem;  var selTabID = selTab.getAttribute('id');  var t;  params.SetNumberStrings(numcerts+1);  if (selTabID == 'mine_tab')   {    params.SetString(0, selTabID);  }   else if (selTabID == "websites_tab")   {    params.SetString(0, selTabID);  }   else if (selTabID == "ca_tab")   {    params.SetString(0, selTabID);  }  else if (selTabID == "others_tab")   {    params.SetString(0, selTabID);  }  else if (selTabID == "orphan_tab")   {    params.SetString(0, selTabID);  }  else  {    return;  }  params.SetInt(0,numcerts);  for (t=0; t<numcerts; t++)   {    var cert = selected_certs[t];    params.SetString(t+1, cert.dbKey);    }    // The dialog will modify the params.  // Every param item where the corresponding cert could get deleted,  // will still contain the db key.  // Certs which could not get deleted, will have their corrensponding  // param string erased.  window.openDialog('chrome://pippki/content/deletecert.xul', "",                    'chrome,centerscreen,modal', params);   if (params.GetInt(1) == 1) {    // user closed dialog with OK    var treeView = null;    var loadParam = null;    selTab = document.getElementById('certMgrTabbox').selectedItem;    selTabID = selTab.getAttribute('id');    if (selTabID == 'mine_tab') {      treeView = userTreeView;      loadParam = nsIX509Cert.USER_CERT;    } else if (selTabID == "others_tab") {      treeView = emailTreeView;      loadParam = nsIX509Cert.EMAIL_CERT;    } else if (selTabID == "websites_tab") {      treeView = serverTreeView;      loadParam = nsIX509Cert.SERVER_CERT;    } else if (selTabID == "ca_tab") {      treeView = caTreeView;      loadParam = nsIX509Cert.CA_CERT;    } else if (selTabID == "orphan_tab") {      treeView = orphanTreeView;      loadParam = nsIX509Cert.UNKNOWN_CERT;    }    for (t=numcerts-1; t>=0; t--)    {      var s = params.GetString(t+1);      if (s.length) {        // This cert was deleted.        treeView.removeCert(selected_cert_index[t]);      }    }    treeView.selection.clearSelection();  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/fa8ca2458f6f0c320cb3cfc6ccc15fdce16b40f2/certManager.js/clean/security/manager/pki/resources/content/certManager.js