rem:   var isNew = window.calendarItem.isMutable; if (!isNew) {  var newItem = saveItem(); var oldItem = window.calendarItem.clone();  newItem.deleteProperty("DTSTAMP"); oldItem.deleteProperty("DTSTAMP");    setElementValue("item-description", oldItem.getProperty("DESCRIPTION")); setItemProperty(oldItem, "DESCRIPTION", getElementValue("item-description"));  var a = newItem.icalString; var b = oldItem.icalString;  if(newItem.icalString == oldItem.icalString) return true; 
add: var result = onCommandCancel(); if(result == true) { dispose(); 
context: function onCancel(){  // assume that new items need to be asked whether or  // not the newly created item wants to be saved.  var isNew = window.calendarItem.isMutable;  if (!isNew) {      var newItem = saveItem();    var oldItem = window.calendarItem.clone();    newItem.deleteProperty("DTSTAMP");    oldItem.deleteProperty("DTSTAMP");    // we need to guide the description text through the text-field since    // newlines are getting converted which would indicate changes to the text.    setElementValue("item-description", oldItem.getProperty("DESCRIPTION"));    setItemProperty(oldItem, "DESCRIPTION", getElementValue("item-description"));        var a = newItem.icalString;    var b = oldItem.icalString;        if(newItem.icalString == oldItem.icalString)      return true;  }    // TODO: retrieve strings from dtd', etc.  var promptService =            Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                     .getService(Components.interfaces.nsIPromptService);  var promptTitle = "Save Event";  var promptMessage = "Do you want to save changes?";  var buttonLabel1 = "Yes";  var buttonLabel2 = "No";    var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +              promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1 +              promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;    var choice = promptService.confirmEx(null, promptTitle, promptMessage, flags,                                       buttonLabel1,null , buttonLabel2, null, {});  switch(choice) {      case 0:        onCommandSave();        return true;      case 2:        return true;      default:        return false;  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/8a8fb1e50f1a74dbb1713b031761c84e92fa5b69/sun-calendar-event-dialog.js/buggy/calendar/prototypes/wcap/sun-calendar-event-dialog.js