// reference local blank image Ext.BLANK_IMAGE_URL = 'common/lib/ext-3.4.0/resources/images/default/s.gif'; // create namespace Ext.namespace('it.elman.pel.wui'); // create application it.elman.pel.wui = function() { // private variables // private functions // public space return { HIGHLIGHT_COLOR: "red", wui_name: "PELAGUS Web Interface", eastPanel: null, mainviewport: null, AIS_TIMEOUT: null, updateLock: function() { //it.elman.pel.wui.elmTrace.log("updateLock(): not logged in, doing nothing..."); } , pageLoaded: function () { document.getElementById('loading-msg').innerHTML = 'Loading UI Components...'; setTimeout(function(){ document.getElementById('loading_percentage').style.width = '30%'; }, 250); setTimeout(function(){ document.getElementById('loading_percentage').style.width = '50%'; }, 500); setTimeout(function(){ document.getElementById('loading_percentage').style.width = '70%'; }, 750); setTimeout(function(){ document.getElementById('loading_percentage').style.width = '100%'; }, 1000); setTimeout(function(){ Ext.get('loading-mask').fadeOut({remove:true}); setTimeout(function(){ Ext.get('loading').fadeOut({remove:true}); }, 1000); }, 1250); }, DEVICE_CLASS_A_ID: 1, DEVICE_CLASS_B_ID: 2, DEVICE_BS_ID: 3, DEVICE_SAR_ID: 4, DEVICE_ATON_ID: 5, DEVICE_CRYPTO_ID: 6, //DEVICE_CLASS_A_DRT_ID: 7, DEVICE_NRT_ID: 8, // public methods init: function() { //initVars(); it.elman.pel.wui.elman_ac_menu.loggedIn = false; it.elman.pel.wui.elman_ac_menu.root_path = /pelagus/; it.elman.pel.wui.elman_ac_menu.afterload = this.pageLoaded; //it.elman.pel.wui.elman_ac_menu.loadFile = "common/menu/get_acmenu.php"; //it.elman.pel.wui.elman_ac_menu.loadFile = "common/menu/menu.xml"; it.elman.pel.wui.elman_ac_menu.homePage = "default.php"; it.elman.pel.wui.elman_ac_menu.loginPage = "ac/auth/login.htm"; // comment to hide the login button it.elman.pel.wui.elman_ac_menu.logoutPage = "ac/auth/logout.htm.php"; it.elman.pel.wui.elman_ac_menu.help = "help/SystemUserManual_AISMediterraneanServer.pdf"; it.elman.pel.wui.timeout_function = null; var vet_url_file = location.href.split("/"); vet_url_file[vet_url_file.length-1] = ""; it.elman.pel.wui.updateLock(); //setInterval('it.elman.pel.wui.updateLock()', 30000); // DMO: If the login is active a new thread is created it.elman.pel.wui.elman_ac_menu.init(); var northPanel = new Ext.BoxComponent({ region:'north', el:'north', height: 155, border: false, margins: '0 0 0 0' }); var elmanWin; var southPanel = new Ext.Panel({ region:'south', el:'south', border: false, layout:'fit', margins: '0 0 0 0', collapsible: false, frame: false, height: 30, //bodyStyle: 'padding:10px;', bbar: new Ext.Toolbar({ //CGR: visualizza info e logo sulla statusbar id: 'pelagus_statusbar', cls: 'x-panel-header', items: [ //' ', '->', '-','  Service provided by ELMAN Srl ' //mod ame 10/2/2015 /* , '-', 'Powered by', ' ', { icon: "common/images/logo_elman_trasparente.gif", text: '                ', url: "http://www.elmansrl.it/" , handler: function () { if (!elmanWin || elmanWin.closed) { elmanWin = window.open('http://www.elmansrl.it/','ElmanWin','left=20,top=20,width=750,height=576,toolbar=1,resizable=0'); } else if (elmanWin) { elmanWin.close(); } } } */ ] }) }); var westPanel = new Ext.Panel({ region:'west', id:'west-panel', //CGR: � l' ID di questo Panel (sovrascrive il DIV ID HTML del DOM) contentEl:'west', //CGR: � il DIV ID HTML dove andr� ad inserire questo Panel width: 150, //minSize: 175, //maxSize: 400, //autoScroll:true, collapsible: false, disabled: false, margins:'0 0 0 5', bodyCfg : { style: {'height':'auto'} }, border: false, frame: false, layout:'fit', layoutConfig:{ animate:true }, defaults: { //bodyStyle:'padding:20px' } }); this.eastPanel = new Ext.Panel({ //CGR: � la definizione generale del pannello dei dettali (usato soprattutto in proxies.js) region:'east', id:'east-panel', title:'Details', contentEl:'east', split:true, width: 0, minSize: 200, maxSize: 400, collapsible: true, //collapse: true, disabled: true, margins:'0 5 5 0', border: true, frame: true, layout:'fit', iconCls: 'help', layoutConfig:{ animate:true }, items: [ new Ext.BoxComponent({ id: 'html_eastPanel', autoEl: { tag: 'div', style: 'padding-bottom:5px', html: '' } }) ] }); var centerPanel = new Ext.Panel({ id:'center-panel', region:'center', contentEl:'center', layout:'fit', width: 'auto', height: 'auto', /* defaults: { // defaults are applied to items, not the container style: 'height:auto' }, bodyStyle : 'height:auto', */ bodyCfg : { style: {'height':'auto'} }, autoScroll:true, frame: false, border: false, margins:'0 0 5 5' /*, items:{ xtype:'panel', contentEl:'center-iframe', //contentEl:'center', //title: 'Users List', layout:'fit', border: false, autoScroll:true }*/ }); this.mainviewport = new Ext.Viewport({ id: 'mainviewport', layout:'border', //style: 'background:#FFFFFF', items:[ northPanel, //westPanel, this.eastPanel, centerPanel, southPanel ] }); this.mainviewport.doLayout(); centerPanel.load({ url: "home.php", scripts: true, text: "Loading..." }); //var params = Ext.urlDecode(window.location.search.substring(1)); //if ((params != '') && (params.exp == "Y")) { // it.elman.pel.wui.elman_ac_menu.loadPage("ac/auth/login.htm", "forload", "_self") //} } // end of init }; }(); // end of app Ext.onReady(it.elman.pel.wui.init, it.elman.pel.wui); // end of file