我使用extensible-1.5.1和我运行应用程序
extensible-1.5.1/examples/calendar/TestApp/test-app.html
我尝试Event通过textfield在此表单中添加一个新的自定义窗口窗口.这是表单默认值

但我找不到要编辑的文件.
我认为extensible-1.5.1\src\calendar\form\EventWindow.js.但当我删除src文件夹然后项目仍在工作,没有任何改变?
怎么做谢谢
编辑
我发现在extensible-all-debug.js文件中.但那个文件真的很复杂
如何配置才能使用数据extensible-1.5.1\src\就像calendar在ExtJS的例子
你是正确的,你需要使用的类是Extensible.calendar.form.EventWindow.但是,您应该扩展该类并创建自己的版本,而不是编辑该文件.您可以将该文件用作指南,并覆盖该getFormItemConfigs函数以根据需要修改表单:
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...
});
Run Code Online (Sandbox Code Playgroud)
然后,您可以覆盖Extensible.calendar.view.AbstractCalendar以使用您刚刚创建的类:
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;
}
});
Run Code Online (Sandbox Code Playgroud)
这可能无法满足您的需求,但希望它能让您走上正轨.
| 归档时间: |
|
| 查看次数: |
815 次 |
| 最近记录: |