scrollto time and initial hidden ressource

Ask for help related to our Calendar 2.x version
Post Reply
User avatar
brigot
Posts: 15
Joined: Mon Mar 28, 2011 4:40 pm

scrollto time and initial hidden ressource

Post by brigot »

Hi,

My company having acquired the license for the calendar, I've gotten into it and I already like... but I do have a few questions:

1. how to scroll in day or week mode on a given time ? basically to center the view on the current time ( if all day cant be show ).
2. how to show or hide resources at initialization ? I have 20 resources, but 10 are secondary and therefore the user does not see them by default to lighten the visualization.

and slightly less important issues:

3. in french, the label 'all day' in day/week mode is put on 2 lines, how to enlarge in height this zone ?
4. is there a way to display a "resourceTimeRanges" as on the scheduler ?

Thanks :)

User avatar
saki
Core Developer
Core Developer
Posts: 812
Joined: Thu Mar 30, 2017 9:32 am

Re: scrollto time and initial hidden ressource

Post by saki »

  1. scrollToDate or scrollToDateCentered should do the job. Mind please that you have to call these methods on the view, not on the main calendar panel
  2. you could use a filter on the resource store
  3. probably some css adjustments but we would need to see it
  4. it's not very clear what you need. Do you have a sketch or screenshot?

User avatar
brigot
Posts: 15
Joined: Mon Mar 28, 2011 4:40 pm

Re: scrollto time and initial hidden ressource

Post by brigot »

thanks for your answer

1: ok, I thought there was a generic way not depending on which mode I was on.

2 : yes and no, in fact, if I use a filter, it hides the resources, but this is not what I want, I would like the same behavior as if the user had clicked on the checkbox, so still available but not displayed in calendar, but stay in my 'calendarresourcefilter'

4 : in this example
https://www.bryntum.com/examples/scheduler-for-extjs/kitchensink/#examples/resourcezones
the objective is to show the disponibility for this day with a background color

User avatar
saki
Core Developer
Core Developer
Posts: 812
Joined: Thu Mar 30, 2017 9:32 am

Re: scrollto time and initial hidden ressource

Post by saki »

2. In this case you can hide the unwanted resources by a conditionally added css class that would make them invisible. A simple custom renderer could also consume the class returned in data and add it conditionally if a flag in data would be set.

User avatar
brigot
Posts: 15
Joined: Mon Mar 28, 2011 4:40 pm

Re: scrollto time and initial hidden ressource

Post by brigot »

thanks for help, i have found an other solution for the point 2, call when ready :

Code: Select all

		var checked_selection = {};
		this.resource_store.each(function(rec)
		{
			checked_selection[ rec.get('id') ] = !rec.get('hidden');			
		});	
		Ext.getCmp(this.resourcefilter_id).setValue(checked_selection);

for 4, that's not possible yet, right?


i have an other question :)
i have do this on my calendar panel :

Code: Select all

,eventRenderer : function (event, resource, metaData) 
{
	//console.info('eventRenderer', event, resource, metaData );	
	return '<span data-qtip="'+event.get('tooltip')+'" >'+event.get('title')+'</span>';
}

but with this solution, my tip is show only on the text title. How can i attach it on his dom parent ? ( div with cal-event class )

Thanks :)

User avatar
brigot
Posts: 15
Joined: Mon Mar 28, 2011 4:40 pm

Re: scrollto time and initial hidden ressource

Post by brigot »

hi again,

So there are no solutions for the tooltip on the block event and not on the title ( with eventRenderer or something else ) ?

Or for the background of the cell to display the availabilities ( question 4 ) ?

User avatar
mats
Core Developer
Core Developer
Posts: 16563
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: scrollto time and initial hidden ressource

Post by mats »

To show a tooltip for an event please use Tooltip class and set 'delegate' CSS config to '.cal-event'. Docs: https://docs.sencha.com/extjs/6.7.0/classic/Ext.tip.ToolTip.html
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

Post Reply