Beispiel #1
0
 function display($tpl = null)
 {
     // Display menu
     if (!JRequest::getVar("ajax") && JRequest::getVar('tmpl') != 'component' && JRequest::getVar('viewmenu', 1) != 0) {
         $file = JPATH_COMPONENT_ADMINISTRATOR . "/views/default/tmpl/menu_header.php";
         if (@file_exists($file)) {
             require_once $file;
         }
     }
     switch ($this->getLayout()) {
         case 'form':
             $this->edit();
             break;
         case 'config':
             $this->config();
             break;
         case 'response':
             $this->response();
             break;
         default:
             $this->displayList();
             break;
     }
     parent::display($tpl);
     // Display footer
     if (!JRequest::getVar("ajax") && JRequest::getVar('tmpl') != 'component' && JRequest::getVar('viewmenu', 1) != 0) {
         $file = JPATH_COMPONENT_ADMINISTRATOR . "/views/default/tmpl/menu_footer.php";
         if (@file_exists($file)) {
             require_once $file;
         }
     }
 }
Beispiel #2
0
 function display($tpl = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $config = JComponentHelper::getParams(JACOMPONENT);
     $lang = JFactory::getLanguage();
     //$style = $app->getUserStateFromRequest('media.list.layout', 'layout', 'details', 'word');
     $style = "details";
     JHtml::_('behavior.framework', true);
     $assets = JURI::root() . 'administrator/components/com_jaextmanager/assets/';
     $document = JFactory::getDocument();
     if (jaIsJoomla3x()) {
         $document->setBuffer($this->loadTemplate('navigation'), 'modules', 'top');
         JHtml::_('script', $assets . 'repo_manager_3/' . 'repomanager.js', false, true);
         JHtml::_('stylesheet', $assets . 'repo_manager_3/' . 'repomanager.css', false, true);
     } else {
         $document->setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
         JHtml::_('script', $assets . 'repo_manager/' . 'repomanager.js', false, true);
         JHtml::_('stylesheet', $assets . 'repo_manager/' . 'repomanager.css', false, true);
     }
     JHtml::_('behavior.modal', 'a.modal');
     $document->addScriptDeclaration("\n\t\twindow.addEvent('domready', function() {\n\t\t\tdocument.preview = SqueezeBox;\n\t\t});");
     JHtml::_('script', 'system/mootree.js', true, true, false, false);
     JHtml::_('stylesheet', 'system/mootree.css', array(), true);
     if ($lang->isRTL()) {
         JHtml::_('stylesheet', 'media/mootree_rtl.css', array(), true);
     }
     if ($config->get('enable_flash', 0)) {
         JHtml::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ MediaManager.refreshFrame(); }'));
     }
     if (DS == '\\') {
         $base = str_replace(DS, "\\\\", JA_WORKING_DATA_FOLDER);
     } else {
         $base = JA_WORKING_DATA_FOLDER;
     }
     $js = "\n\t\t\tvar basepath = '" . $base . "';\n\t\t\tvar viewstyle = '" . $style . "';\n\t\t";
     $document->addScriptDeclaration($js);
     /*
      * Display form for FTP credentials?
      * Don't set them here, as there are other functions called before this one if there is any file write operation
      */
     jimport('joomla.client.helper');
     $ftp = !JClientHelper::hasCredentials('ftp');
     $session = JFactory::getSession();
     $state = $this->get('state');
     $folderTree = $this->get('folderTree');
     $this->assignRef('session', $session);
     $this->assignRef('config', $config);
     $this->assignRef('state', $state);
     $this->assign('require_ftp', $ftp);
     $this->assign('folders_id', ' id="media-tree"');
     $this->assign('folders', $folderTree);
     // Set the toolbar
     $this->addToolbar();
     parent::display($tpl);
     echo JHtml::_('behavior.keepalive');
 }
Beispiel #3
0
 function display($tpl = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication('administrator');
     // Do not allow cache
     JResponse::allowCache(false);
     //$style = $app->getUserStateFromRequest('media.list.layout', 'layout', 'details', 'word');
     $style = "details";
     JHtml::_('behavior.framework', true);
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jaextmanager/assets/repo_manager/repolist-' . $style . '.css');
     $document->addScriptDeclaration("\r\n\t\twindow.addEvent('domready', function() {\r\n\t\t\twindow.top.document.updateUploader && window.top.document.updateUploader();\r\n\t\t\t\$\$('a.img-preview').each(function(el) {\r\n\t\t\t\tel.addEvent('click', function(e) {\r\n\t\t\t\t\tnew Event(e).stop();\r\n\t\t\t\t\twindow.top.document.preview.fromElement(el);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});");
     $images = $this->get('images');
     $documents = $this->get('documents');
     $folders = $this->get('folders');
     $state = $this->get('state');
     $this->assign('baseURL', JURI::root());
     $this->assignRef('images', $images);
     $this->assignRef('documents', $documents);
     $this->assignRef('folders', $folders);
     $this->assignRef('state', $state);
     parent::display($tpl);
 }
Beispiel #4
0
 function displayViewRemoteSource($tpl = null)
 {
     $model = $this->getModel('default');
     $source = $model->getRemoteSourceCode();
     if ($source !== false) {
         $source = htmlentities($source);
         $this->assignRef('source', $source);
         parent::display($tpl);
     } else {
         //JError::raiseWarning(100, JText::_("CAN_NOT_OPEN_THIS_FILE"));
         $product = $model->_getProduct();
         $message = JText::sprintf("YOUR_ACCOUNT_SEEM_DOES_NOT_HAVE_ENOUGH_PERMISSION_TO_TAKE_THIS_ACTION_PLEASE_CONTACT_FOR_MORE_INFORMATION_OR_USE_ANOTHER_ACCOUNT", $product->ws_name);
         $this->displayLoginBox($product, $message);
     }
 }