rem: var isContainerFlag = RDFC.IsContainer(Bookmarks, RDF.GetResource(BookmarkURL)); 
add: var isContainerFlag = RDFC.IsContainer(Bookmarks, RDF.GetResource(bookmark_url)); 
context: function Init(){  // Initialize the properties panel by copying the values from the  // RDF graph into the fields on screen.  for (var i = 0; i < Fields.length; ++i) {    var field = document.getElementById(Fields[i]);    var value = Bookmarks.GetTarget(RDF.GetResource(BookmarkURL),                                    RDF.GetResource(Properties[i]),                                    true);    if (value) value = value.QueryInterface(Components.interfaces.nsIRDFLiteral);    if (value) value = value.Value;    dump("field '" + Fields[i] + "' <== '" + value + "'\n");    if (value) field.value = value;  }  // check bookmark schedule    var value = Bookmarks.GetTarget(RDF.GetResource(BookmarkURL),                                    RDF.GetResource("http://home.netscape.com/WEB-rdf#Schedule"),                                    true);    if (value) value = value.QueryInterface(Components.interfaces.nsIRDFLiteral);    if (value) value = value.Value;    if ((value) && (value != ""))    {	var sep;		// get day range	if ((sep = value.indexOf("|")) > 0)	{		var days = value.substr(0, sep);		value = value.substr(sep+1, value.length-1);		var dayNode = document.getElementById("dayRange");		for (var x=0; x < dayNode.options.length; x++)		{			if (dayNode.options[x].value == days)			{				dayNode.selectedIndex = x;				break;			}		}	}	// get hour range	if ((sep = value.indexOf("|")) > 0)	{		var hours = value.substr(0, sep);		value = value.substr(sep+1, value.length-1);		var startHour = "";		var endHour = "";		var dashSep = hours.indexOf("-");		if (dashSep > 0)		{			startHour = hours.substr(0, dashSep);			endHour = hours.substr(dashSep + 1, hours.length-1);		}		// set start hour		var startHourNode = document.getElementById("startHourRange");		for (var x=0; x < startHourNode.options.length; x++)		{			if (startHourNode.options[x].value == startHour)			{				startHourNode.selectedIndex = x;				break;			}		}		// set end hour		var endHourNode = document.getElementById("endHourRange");		for (var x=0; x < endHourNode.options.length; x++)		{			if (endHourNode.options[x].value == endHour)			{				endHourNode.selectedIndex = x;				break;			}		}	}		// get duration	if ((sep = value.indexOf("|")) > 0)	{		var duration = value.substr(0, sep);		value = value.substr(sep+1, value.length-1);		var durationNode = document.getElementById("duration");		durationNode.value = duration;	}	// get notification method    	if (value.indexOf("icon") >= 0)    	{    		document.getElementById("bookmarkIcon").setAttribute("checked", "1");    		document.getElementById("bookmarkIcon").checked = true;    	}    	if (value.indexOf("sound") >= 0)    	{    		document.getElementById("playSound").setAttribute("checked", "1");    		document.getElementById("playSound").checked = true;    	}    	if (value.indexOf("alert") >= 0)    	{    		document.getElementById("showAlert").setAttribute("checked", "1");    		document.getElementById("showAlert").checked = true;    	}    	if (value.indexOf("open") >= 0)    	{    		document.getElementById("openWindow").setAttribute("checked", "1");    		document.getElementById("openWindow").checked = true;    	}    }    // if its a container, disable some things  var isContainerFlag = RDFC.IsContainer(Bookmarks, RDF.GetResource(BookmarkURL));  if (!isContainerFlag)  {  	// XXX To do: the "RDFC.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.    dump("disabling url field for folder\n");    document.getElementById("url").disabled = true;    // If it is a folder, it has no Shortcut URL.    dump("disabling shortcut url field for folder\n");    document.getElementById("shortcut").disabled = true;	// If it is a folder, no scheduling!	var scheduleSepNode = document.getElementById("scheduleSeparator");	if (scheduleSepNode)	{		var parentNode = scheduleSepNode.parentNode;		parentNode.removeChild(scheduleSepNode);	}	var scheduleNode = document.getElementById("scheduleInfo");	if (scheduleNode)	{		var parentNode = scheduleNode.parentNode;		parentNode.removeChild(scheduleNode);	}  }  window.sizeToContent();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/0d4c328c9d45a14e4159eafc3767692317f5f336/bm-props.js/clean/suite/common/bookmarks/bm-props.js