Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are correct in that the class you need to use is <code>Extensible.calendar.form.EventWindow</code>. However, instead of editing that file, you should extend that class and make your own version of it. You can use that file as a guide, and override the <code>getFormItemConfigs</code> function to modify the form as you need it:</p> <pre><code>Ext.define("MyApp.view.EventWindow", { extend: "Extensible.calendar.form.EventWindow", modal: true, enableEditDetails: false, initComponent: function() { this.callParent(); }, getFormItemConfigs: function() { var items = [/*your form items here */]; return items; }, //... other stuff here maybe... }); </code></pre> <p>Then, you can override the <code>Extensible.calendar.view.AbstractCalendar</code> to use the class you just made:</p> <pre><code>Ext.define("MyApp.view.AbstractCalendarOverride", { override: 'Extensible.calendar.view.AbstractCalendar', getEventEditor : function() { this.editWin = this.ownerCalendarPanel.editWin; if(!this.editWin) { //Change this line: this.ownerCalendarPanel.editWin = Ext.create('MyApp.view.EventWindow', { id: 'ext-cal-editwin', calendarStore: this.calendarStore, modal: this.editModal, enableEditDetails: this.enableEditDetails, listeners: { 'eventadd': { fn: function(win, rec, animTarget) { //win.hide(animTarget); win.currentView.onEventAdd(null, rec); }, scope: this }, 'eventupdate': { fn: function(win, rec, animTarget) { //win.hide(animTarget); win.currentView.onEventUpdate(null, rec); }, scope: this }, 'eventdelete': { fn: function(win, rec, animTarget) { //win.hide(animTarget); win.currentView.onEventDelete(null, rec); }, scope: this }, 'editdetails': { fn: function(win, rec, animTarget, view) { // explicitly do not animate the hide when switching to detail // view as it looks weird visually win.animateTarget = null; win.hide(); win.currentView.fireEvent('editdetails', win.currentView, rec); }, scope: this }, 'eventcancel': { fn: function(win, rec, animTarget){ this.dismissEventEditor(null, animTarget); win.currentView.onEventCancel(); }, scope: this } } }); } // allows the window to reference the current scope in its callbacks this.editWin.currentView = this; return this.editWin; } }); </code></pre> <p>This may not give you exactly what you need, but hopefully it puts you on the right track.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload