Request new features or modifications


Post by dhettinger »

I have a request for the event editor. If you set the scheduler to be read only (readOnly: true) could you disable the date fields in the event editor window?
onSchedulerRender : function() {
		this.render(Ext.getBody());
		
		this.startDateField.readOnly = this.schedulerView.isReadOnly();
		this.startTimeField.readOnly = this.schedulerView.isReadOnly();
		this.durationField.readOnly = this.schedulerView.isReadOnly();

		if (this.hideOnBlur) {
			// Hide when clicking outside panel
			this.mon(Ext.getDoc(), 'mousedown', this.onMouseDown, this);
		}
	},
By putting this in the render function if I switch my gantt to non-readonly this window will update. I know I should be able to override the config for those fields but it makes more sense for it to work out of the box this way.

If it's too costly to put this in the render function i'm fine with it not updating automatically if the gantt readonly flag is switched.

Thanks!

Post by mats »

Fixed in master branch, will show up in next release. Thanks for the suggestion :)

Post by dhettinger »

Thanks for making the change, one other request sorry it's after the fact. IS it possible for you to also hide the save/delete buttons too? I was trying to disable them myself but the delete button kept coming back on show.

Before in show line 11699 of EventEditor:
if (this.deleteButton) {
	this.deleteButton.setVisible(this.eventStore.indexOf(eventRecord) >= 0);
}
After:
if (this.schedulerView.isReadOnly()) {
	if (this.deleteButton) this.deleteButton.setVisible(false);
	if (this.saveButton) this.saveButton.setVisible(false);
}
// Only show delete button if the event belongs to a store
else if (this.deleteButton) {
	this.deleteButton.setVisible(this.eventStore.indexOf(eventRecord) >= 0);
}
If so this would be a big help, thanks!

Post by mats »

Already fixed, try in nightlies.

Post by dhettinger »

Oh awesome, thanks a bunch.

Post Reply