addScript(JURI::base().'components/com_vxc/assets/js/attachevent.js'); $document->addScript(JURI::base().'includes/js/joomla.javascript.js'); $js=" function OnPluginClose() { SqueezeBox.close(); } function VXLCloseEvent() { var loader=null; if (window.frames['modal'] && window.frames['modal'].gLoader); loader = window.frames['modal'].gLoader; if (loader) loader.SendToPlugin('PLUGIN_CLOSE',null,''); } var width,height; function UpdateSize() { if (!SqueezeBox.isOpen) return; var curw,curh,str; curw=document.body.parentNode.offsetWidth; curh=document.body.parentNode.offsetHeight; if (curw<1) curw=1; if (curh<1) curh=1; if (curw!=width || curh!=height) { SqueezeBox.resize(SqueezeBox.options.size, true); } width=curw; height=curh; } function OnLoad() { UpdateSize(); setInterval('UpdateSize()',500); } AttachEvent(window, 'onload', function() { OnLoad(); }); "; $css = " a.linkorders:hover { color: #00FF00; } a.linkorders:active { text-decoration:none; color: #00FF00;} a.linkorders:link { text-decoration:none;color:inherit; } a.linkorders:visited { text-decoration:none; } "; $this->loadHelper('vxcloadcsshelper'); $cssHelper = new VxcLoadCssHelper(); $cssHelper->loadCss(); if (JRequest::getVar('layout')!='tracking') { $document->addScriptDeclaration($js); $document->addStyleDeclaration($css); JHTML::_('behavior.modal','a.modal',null); JHTML::_('behavior.modal','a.linkorders',null); $modelMillingQueue =& $this->getModel('millqueue'); $millingqueue =& $modelMillingQueue->getQueue(); $this->assignRef('millingqueue', $millingqueue); $this->loadHelper('admintabshelper'); $tabs = new AdminTabsHelper(); $menu = $tabs->render(); $modelOrderStates =& $this->getModel('orderstates'); $orderStates =& $modelOrderStates->getData(); $modelOrders =& $this->getModel('orders'); $orders =& $modelOrders->getData(); $pagination =& $modelOrders->getPagination(); $lists = & $modelOrders->getList(); $modelOrderAttribute =& $this->getModel('orderattribute'); $customers =& $modelOrders->getCustomers(); $customerId = JRequest::getVar('customerId'); $customersOptions = array(); $customersOptions[] = JHTML::_('select.option','',''); foreach($customers as $customer) { if ($customer->id == $customerId) $lists['searchcustomerreference'] =$customer->fullname; $customersOptions[] = JHTML::_('select.option',$customer->id,$customer->fullname); } $modelUser =& $this->getModel('user'); $isFranchiseManager = $modelUser->checkPrivilege('Franchise manager'); $isGroupManager = $modelUser->checkPrivilege('Group manager'); $canManageFranchiseOrders = $modelUser->checkPrivilege('Can manage franchise orders'); $canManufacture = $modelUser->checkPrivilege('Can manufacture'); $hideManufacturingDetails = LegacyHelper::getPHPGlobalVar('hideManufacturingDetails'); $canViewGroupOrders = $modelUser->canViewGroupOrders(); $this->assignRef('canUseExperimentalCAD',$modelUser->checkPrivilege('Can use experimental CAD')); $this->assignRef('canViewGroupOrders', $canViewGroupOrders); $this->assignRef('hideManufacturingDetails', $hideManufacturingDetails); $this->assignRef('canManufacture', $canManufacture); $this->assignRef('isFranchiseManager', $isFranchiseManager); $this->assignRef('canManageFranchiseOrders', $canManageFranchiseOrders); $this->assignRef('isGroupManager', $isGroupManager); $this->assignRef('orderStates', $orderStates); $this->assignRef('orders', $orders); $this->assignRef('pagination', $pagination); $this->assignRef('lists', $lists); $this->assignRef('customerId', $customerId); $this->assignRef('menu', $menu); $this->assignRef('att',$modelOrderAttribute); } else { $modelBatch =& $this->getModel('batch'); $modelBatch->SetId(JRequest::getVar('batchId')); $batch =& $modelBatch->getData(); $this->assignRef('batch',$batch); } parent::display($tpl); }// function }// class ?>