/* * Ext JS Library 2.2 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ // Sample desktop configuration var vbytru; var instructionSite; MyDesktop = new Ext.app.App({ init :function(){ Ext.QuickTips.init(); }, getModules : function(){ return [ //new MyDesktop.SiteUserModule(), new MyDesktop.PaymentModule(), new MyDesktop.StaticData(), //new MyDesktop.SizeModule(), //new MyDesktop.DopModule(), new MyDesktop.MaterialModule(), //new MyDesktop.CatalogModule(), //new MyDesktop.MailModule(), //new MyDesktop.OrdersModule(), new MyDesktop.UsersModule() //new MyDesktop.BogusModule() ]; }, // config for the start menu getStartConfig : function(){ return { title: 'LIK-EDU', iconCls: 'user', width:300, toolItems: [ //{ // text:'Настройки', // iconCls:'Настройки', // scope:this, // width:300 // } // , //'-' //, { text:'Выход', iconCls:'Выход', scope:this, handler : exitFunction } ] }; } }); exitFunction=function() { document.location='./modules/logout.php'; } MyDesktop.GridWindow = Ext.extend(Ext.app.Module, { id:'win-instruction', init : function(){ this.launcher = { text: 'Интструкция', iconCls:'icon-grid', frameW:"./instruction/", handler : createWindow, scope: this } } }); // for example purposes var windowIndex = 0; MyDesktop.BogusModule = Ext.extend(Ext.app.Module, { init : function(){ this.launcher = { text: 'Материалы', iconCls:'попус', handler: function() { return false; }, scope: this, windowId:windowIndex, menu: { items:[ { text: 'разделы', iconCls:'bogus', handler : this.createWindow, frameW:"./content/section/", scope: this, windowId: windowIndex }, { text: 'категории', iconCls:'bogus', handler : this.createWindow, frameW:"./content/categories/", scope: this, windowId: windowIndex }, { text: 'все материалы', iconCls:'bogus', handler : this.createWindow, frameW:"./content/", scope: this, windowId: windowIndex } ] } } }, createWindow : function(src){ var desktop = this.app.getDesktop(); var win = desktop.getWindow('окно'+src.windowId); if(!win){ win = desktop.createWindow({ id: 'окно'+src.frameW, title:src.text, width:'100%', height: (document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight)-30, html : '