rem: if (isContainerFlag) { 
add: var isSeparator = BookmarksUtils.resolveType(resource) == "BookmarkSeparator";  if (isContainerFlag || isSeparator) { 
context: function Init(){  var x;  var resource = RDF.GetResource(gBookmarkURL);  // Initialize the properties panel by copying the values from the  // RDF graph into the fields on screen.  for (var i = 0; i < gFields.length; ++i) {    var field = document.getElementById(gFields[i]);    var value = Bookmarks.GetTarget(resource, RDF.GetResource(gProperties[i]), true);    if (value)      value = value.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;    if (value) //make sure were aren't stuffing null into any fields      field.value = value;  }  var propsWindow = document.getElementById("bmPropsWindow");  var nameNode = document.getElementById("name");  var title = propsWindow.getAttribute("title");  title = title.replace(/\*\*bm_title\*\*/gi, nameNode.value);  propsWindow.setAttribute("title", title);  // check bookmark schedule  var scheduleArc = RDF.GetResource("http://home.netscape.com/WEB-rdf#Schedule");  value = Bookmarks.GetTarget(resource, scheduleArc, true);  if (value) {    value = value.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;    if (value) {      var values = value.split("|");      if (values.length == 4) {        // get day range        var days = values[0];        var dayNode = document.getElementById("dayRange");        var dayItems = dayNode.childNodes[0].childNodes;        for (x=0; x < dayItems.length; ++x) {          if (dayItems[x].getAttribute("value") == days) {            dayNode.selectedItem = dayItems[x];            break;          }        }        // get hour range        var hours = values[1].split("-");        var startHour = "";        var endHour = "";        if (hours.length == 2) {          startHour = hours[0];          endHour = hours[1];        }        // set start hour        var startHourNode = document.getElementById("startHourRange");        var startHourItems = startHourNode.childNodes[0].childNodes;        for (x=0; x < startHourItems.length; ++x) {          if (startHourItems[x].getAttribute("value") == startHour) {            startHourNode.selectedItem = startHourItems[x];            break;          }        }        // set end hour        var endHourNode = document.getElementById("endHourRange");        var endHourItems = endHourNode.childNodes[0].childNodes;        for (x=0; x < endHourItems.length; ++x) {          if (endHourItems[x].getAttribute("value") == endHour) {            endHourNode.selectedItem = endHourItems[x];            break;          }        }        // get duration        var duration = values[2];        var durationNode = document.getElementById("duration");        durationNode.value = duration;        // get notification method        var method = values[3];        if (method.indexOf("icon") >= 0)          document.getElementById("bookmarkIcon").checked = true;        if (method.indexOf("sound") >= 0)          document.getElementById("playSound").checked = true;        if (method.indexOf("alert") >= 0)          document.getElementById("showAlert").checked = true;        if (method.indexOf("open") >= 0)          document.getElementById("openWindow").checked = true;      }    }  }  // if its a container, disable some things  var isContainerFlag = RDFCU.IsContainer(Bookmarks, RDF.GetResource(gBookmarkURL));  if (!isContainerFlag) {    // XXX To do: the "RDFCU.IsContainer" call above only works for RDF sequences;    //            if its not a RDF sequence, we should to more checking to see if    //            the item in question is really a container of not.  A good example    //            of this is the "File System" container.  }  if (isContainerFlag) {    // If it is a folder, it has no URL or Keyword    document.getElementById("locationrow").setAttribute("hidden", "true");    document.getElementById("shortcutrow").setAttribute("hidden", "true");  }  if (gBookmarkURL.substr(0, 7).toLowerCase() != "http://" &&      gBookmarkURL.substr(0, 8).toLowerCase() != "https://") {    // only allow scheduling of http/https URLs    document.getElementById("ScheduleTab").setAttribute("hidden", "true");    document.getElementById("NotifyTab").setAttribute("hidden", "true");  }  sizeToContent();    // Set up the enabled of controls on the scheduling panels  dayRangeChange(document.getElementById("dayRange"));  // set initial focus  nameNode.focus();  nameNode.select();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/afc69e43ce5b826f63d563842369da64ecc5b106/bm-props.js/clean/xpfe/components/bookmarks/resources/bm-props.js