-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the new media manager for browsers that do support ECMAScript 5 (#…
…68) * Code style * Move legacy component to subfolder * Adjust the component paths for the legacy app * Code style * Fix ie check * Make the condition more readable * Code style * Fix ECMAscript version * Create the new media manager base controller * Code style * Implement pr feedback * Remove line indent
- Loading branch information
1 parent
7bb10c1
commit 7cf6fa1
Showing
37 changed files
with
135 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_media | ||
* | ||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
/** | ||
* Media Manager Component Controller | ||
* | ||
* @since 1.5 | ||
*/ | ||
class MediaController extends JControllerLegacy | ||
{ | ||
/** | ||
* Method to display a view. | ||
* | ||
* @param boolean $cachable If true, the view output will be cached | ||
* @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. | ||
* | ||
* @return JController This object to support chaining. | ||
* | ||
* @since 1.5 | ||
*/ | ||
public function display($cachable = false, $urlparams = false) | ||
{ | ||
JPluginHelper::importPlugin('content'); | ||
|
||
$vType = JFactory::getDocument()->getType(); | ||
$vName = $this->input->get('view', 'media'); | ||
|
||
switch ($vName) | ||
{ | ||
case 'images': | ||
$vLayout = $this->input->get('layout', 'default', 'string'); | ||
$mName = 'manager'; | ||
|
||
break; | ||
|
||
case 'imagesList': | ||
$mName = 'list'; | ||
$vLayout = $this->input->get('layout', 'default', 'string'); | ||
|
||
break; | ||
|
||
case 'mediaList': | ||
$app = JFactory::getApplication(); | ||
$mName = 'list'; | ||
$vLayout = $app->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); | ||
|
||
break; | ||
|
||
case 'media': | ||
default: | ||
$vName = 'media'; | ||
$vLayout = $this->input->get('layout', 'default', 'string'); | ||
$mName = 'manager'; | ||
|
||
break; | ||
} | ||
|
||
// Get/Create the view | ||
$view = $this->getView($vName, $vType, '', array('base_path' => JPATH_COMPONENT_ADMINISTRATOR . '/legacy')); | ||
|
||
// Get/Create the model | ||
if ($model = $this->getModel($mName)) | ||
{ | ||
// Push the model into the view (as default) | ||
$view->setModel($model, true); | ||
} | ||
|
||
// Set the layout | ||
$view->setLayout($vLayout); | ||
|
||
// Display the view | ||
$view->display(); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Validate FTP credentials | ||
* | ||
* @return void | ||
* | ||
* @since 1.5 | ||
*/ | ||
public function ftpValidate() | ||
{ | ||
// Set FTP credentials, if given | ||
JClientHelper::setCredentialsFromRequest('ftp'); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters