|
1 | 1 | <?php |
2 | 2 | /** |
3 | | - * @package Joomla.Administrator |
4 | | - * @subpackage Templates.isis |
5 | | - * |
6 | | - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. |
7 | | - * @license GNU General Public License version 2 or later; see LICENSE.txt |
| 3 | + * @package Astroid Framework |
| 4 | + * @author JoomDev https://www.joomdev.com |
| 5 | + * @copyright Copyright (C) 2009 - 2019 JoomDev. |
| 6 | + * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later |
8 | 7 | */ |
9 | 8 | defined('_JEXEC') or die; |
10 | 9 |
|
|
27 | 26 | $option = $jinput->get('option', '', 'STR'); |
28 | 27 | $function = $jinput->get('function', '', 'STR'); |
29 | 28 | $layout = $jinput->get('layout', '', 'STR'); |
30 | | -if($option == 'com_media' || $function == 'jSelectArticle' || $layout == 'modal' || $layout == 'pagebreak') { |
31 | | - // Add template js |
| 29 | + |
| 30 | +$view = $jinput->get('view','','STR'); |
| 31 | +$tmpl = $jinput->get('tmpl','','STR'); |
| 32 | +$e_name = $jinput->get('e_name','','STR'); |
| 33 | +$editor = $jinput->get('editor','','STR'); |
| 34 | + |
| 35 | +$addtemplatejs = false; |
| 36 | + |
| 37 | +//Editor Module button |
| 38 | +if($view == 'modules' && $layout =='modal' && $option =='com_modules' && $editor == 'jform_articletext'){ |
| 39 | + $addtemplatejs = true; |
| 40 | +} |
| 41 | +//Editor Menu button |
| 42 | +if($view == 'items' && $layout =='modal' && $option =='com_menus' && $editor=='jform_articletext'){ |
| 43 | + $addtemplatejs = true; |
| 44 | +} |
| 45 | +//Editor Contact button |
| 46 | +if($view == 'contacts' && $layout =='modal' && $option =='com_contact'){ |
| 47 | + $addtemplatejs = true; |
| 48 | +} |
| 49 | +//Editor Article button |
| 50 | +if($view == 'articles' && $layout =='modal' && $option=='com_content' && $editor=='jform_articletext'){ |
| 51 | + $addtemplatejs = true; |
| 52 | +} |
| 53 | +//Editor Image button |
| 54 | +if($option == 'com_media' && $tmpl =='component'){ |
| 55 | + $addtemplatejs = true; |
| 56 | +} |
| 57 | +//Editor Page break button |
| 58 | +if($view == 'article' && $option == 'com_content' && $layout == 'pagebreak' && $e_name=='jform_articletext'){ |
| 59 | + $addtemplatejs = true; |
| 60 | +} |
| 61 | + |
| 62 | +if($addtemplatejs){ |
32 | 63 | JHtml::_('script', 'isis.js', array('version' => 'auto', 'relative' => true)); |
33 | | - JHtml::_('stylesheet', 'isis/isis.css', array('version' => 'auto', 'relative' => true)); |
| 64 | + JHtml::_('stylesheet', 'isis/isis.css', array('version' => 'auto', 'relative' => true)); |
34 | 65 | } |
| 66 | + |
35 | 67 | // Add html5 shiv |
36 | 68 | JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); |
37 | 69 |
|
|
0 commit comments