rem: if (events) { 
add: if (events && (selectedProperties == null || selectedProperties.length == 0)) { 
context: function addAdvancedPropertiesForCalendar(properties, containerId, selectedProperties, events) {	var container = $(containerId);	if (container == null) {		return false;	}		container.empty();		if (properties == null || properties.length == 0) {		if (events) {			container.setText(CALENDAR_NO_EVENTS_TEXT);		}		else {			container.setText(CALENDAR_NO_LEDGERS_TEXT);		}		return false;	}		for (var i = 0; i < properties.length; i++) {		var propertyContainer = new Element('div');		propertyContainer.injectInside(container);				var checkBox = new Element('input');		checkBox.setProperty('type', 'checkbox');		checkBox.setProperty('value', properties[i].id);		checkBox.addEvent('click', function() {			var value = this.value;			if (value == null) {				return false;			}						var key = CALENDAR_LEDGER_ADVANCED_PROPERTY_NAME;			if (events) {				key = CALENDAR_EVENT_ADVANCED_PROPERTY_NAME;			}						var fontWeightValue = 'normal';			var ids = groups_chooser_helper.getAdvancedProperty(key);			if (this.checked) {				// Add property				addElementValueForAdvancedProperty(ids, key, value);								fontWeightValue = 'bold';			}			else {				//	Remove property				removeElementValueForAdvancedProperty(ids, key, value);			}						var spanElement = $(this).getNext();			spanElement.setStyle('font-weight', fontWeightValue);		});				var isSelected = existsElementInArray(selectedProperties, properties[i].id);		if (events) {			isSelected = true;		}				if (isSelected) {			var key = CALENDAR_LEDGER_ADVANCED_PROPERTY_NAME;			if (events) {				key = CALENDAR_EVENT_ADVANCED_PROPERTY_NAME;			}			var ids = groups_chooser_helper.getAdvancedProperty(key);			addElementValueForAdvancedProperty(ids, key, properties[i].id);						checkBox.checked = true;		}		checkBox.injectInside(propertyContainer);				var propertyNameSpan = new Element('span');		propertyNameSpan.addClass('calendarViewerEventOrLedgerPropertyNameStyleClass');		propertyNameSpan.appendText(properties[i].value);		var fontWeightValue = 'normal';		if (isSelected) {			fontWeightValue = 'bold';		}		propertyNameSpan.setStyle('font-weight', fontWeightValue);		propertyNameSpan.injectInside(propertyContainer);	}}
meta: 8390	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8390/648473cd57caef2329d156db43609e7d1ac1bd14/CalendarViewerHelper.js/buggy/resources/javascript/CalendarViewerHelper.js