I am trying to display excellent fullcalendar in an extjs window loaded in response to a button click.
I can get the calendar displayed in the window as follows:
// .. grid config ..
// element Bar Turb: [{Text: 'Calendar', Tooltip: 'View Holiday Calendar', Disabled: False, IconCLS: 'icon-yr', // create icon: work () {var win; // Create a holiday calendar window on the first click and then reuse it again on click if (! Win) {win = new Ext.Window ({layout: 'fit', width: 750, height: 750, close action: ' Hide ', plain: false, // left: 150, // heading: 10, item: [// set the div id in default.ctp when jquery fullcalendar is displayed.Calendar], button: [{text : 'Close', handler: function () {win.hide ()}}}]}} win.show ();}}}] etc etc grid and my In the default .ctp view:
& lt;! - which is called jquery fullcalendar with Event Grid Tbar Button - & Gt; & lt;! - I think - 'item' property set on 'calendar' div on Ext.window - & gt; & lt; div id = "hello-win" class = "x-hidden" & gt; ; & Lt; div class = "x-window-header" & gt; annual holiday calendar & lt; / div & gt; & lt ;! - Placeholder for full calendari - & gt; & lt; div id = "calendar "& Gt; & gt; Script Type = 'Text / JavaScript' & gt; $ (document) .ready (function () {$ ('# calendar'). Full calendar ({}); & Lt; / Script & gt; & Lt; / Div & gt; & Lt; / Div & gt; I'm sure this is not the right way to do this because the calendar only shows sometimes and if I add some options to full calendars initialization then it will not be displayed at all.
Any help on this will be highly appreciated.
I will take a different view. Instead of following the following ...
items: [// set to calendar id in default.ctp ... calendar], ... I will create an empty DIV Extra JS window (for example, using AutoL) and then presenting the jQuery full calendar in the window's divis. I like this approach for several reasons: sometimes developers destroy windows after every use, this window makes me more sense to build the property calendar) near the building of the window, only when I Let me know when the user cares about it ...
I hope it helps. / P>
Comments
Post a Comment