|
|
//<?php require_once('../../js_asm.php'); ?>
var winW = <?=0+$CUser->Data['width'];?>;var winH = <?=0+$CUser->Data['height'];?>;
var PanelH = winH-90;
function Refresh(){ window.location="/?t="+123;};
function updateUserScreenResolution( x, y ){ Ext.Ajax.request({ url: '/lib/controller/updateUserSettings.php', params: { SAID: <?=$SiteID;?>, UID: <?=$UserID;?>, SID: '<?=$Session;?>', SSS: 15, WID: x, HEI: y }, success: function( response, opts ){ Refresh(); }, failure: function( response, opts ) { Ext.Msg.show({ title:'Request Failure!', msg: 'Ajax Request failed!', buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); } }); };
function CheckWindowSize(delay){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW2 = window.innerWidth; winH2 = window.innerHeight; if ( winH2<700 ) winH2=700; }; if (navigator.appName.indexOf("Microsoft")!=-1) { winW2 = document.body.offsetWidth; winH2 = document.body.offsetHeight; if ( winH2<700 ) winH2=700; }; };
//alert(winW2+':'+winW+' '+winH2+':'+winH);
if ( winW2 != winW || winH2!=winH ){ updateUserScreenResolution( winW2, winH2 ); };};
Ext.onReady(function(){ //Check Screen Size
//alert( winW + 'x' + winH );
CheckWindowSize();
var viewport = new Ext.Viewport({ id: 'main_viewport', layout:'border', items: [{ xtype: 'panel', region: 'north', baseCls: 'x-plain', height: 50, items:[{ xtype: 'panel', id:'top', baseCls: 'x-plain', html: '<p style="padding:10px;color:#556677;font-size:11px;"><img src="/style/img/logo32.png"> R-Goose Security System</p>' }] },{ xtype: 'panel', id:'btns', region:'west', bsaseCls:'x-plain', title: 'R-Goose System', collapsible: true, split:true, width:150, minWidth: 100, maxWidth: 250, layout:'accordion', margins: '5 0 5 5', cmargins:'5 5 5 5', layoutConfig:{ animate:true }, items: [{ title: 'Dashboard', layout: 'vbox', height: 120, pack: 'center', align : 'strech', items:[{ xtype: 'button', width: '100%', id:'go_home', text: 'Go Home', handler: function( b, e ){ loadDashBoard(); } },{ xtype: 'button', width: '100%', id:'go_monitor', text: 'Monitor Events', handler: function( b, e ){ loadTimeLine(); } },{ xtype: 'button', width: '100%', id:'go_out', text: 'Logout', handler: function( b, e ){ window.location = '/login.php?UID=1'; } }] },{ title: 'System Settings', layout: 'vbox', height: 120, pack: 'center', align : 'strech', items:[{ xtype: 'button', width: '100%', id:'sys_edit', text: 'Edit Connections', handler: function( b, e ){ loadSystemEditor(); } },{ xtype: 'button', width: '100%', id:'map_edit', text: 'Edit Locations', handler: function( b, e ){ loadLocationEditor(); } },{ xtype: 'button', width: '100%', id:'logout', text: 'Logout', handler: function( b, e ){ window.location = '/login.php?UID=1'; } }] },{ title: 'Profile Settings', html: '<p>Panel content!</p>' }] },{ xtype: 'panel', region:'center', margins: '5 5 5 0', id: 'main_content', title: 'System Dashboard', items:[{ xtype: 'portal', id: 'main_portal', frame: false, border: false, items:{ html: '<p style="padding:10px;color:#556677;font-size:11px;"><center><img src="/style/img/logo.png"></center></p>' }, listeners:{ drop: function( a ){ updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position ); } } }] }] }); loadDashBoard();});
|