-
Notifications
You must be signed in to change notification settings - Fork 1
/
component.php
90 lines (78 loc) · 3.03 KB
/
component.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
// Output as HTML5
$this->setHtml5(true);
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add filter polyfill for IE8
JHtml::_('behavior.polyfill', array('filter'), 'lte IE 9');
// The Below CSS & JS is only required for Front end editor editor-xtd popups.
// This is is because the popups reply on older version of Bootstrap (which doesn't exist in Astroid).
$jinput = $app->input;
$option = $jinput->get('option', '', 'STR');
$function = $jinput->get('function', '', 'STR');
$layout = $jinput->get('layout', '', 'STR');
$view = $jinput->get('view','','STR');
$tmpl = $jinput->get('tmpl','','STR');
$e_name = $jinput->get('e_name','','STR');
$editor = $jinput->get('editor','','STR');
$addtemplatejs = false;
//Editor Module button
if($view == 'modules' && $layout =='modal' && $option =='com_modules' && $editor == 'jform_articletext'){
$addtemplatejs = true;
}
//Editor Menu button
if($view == 'items' && $layout =='modal' && $option =='com_menus' && $editor=='jform_articletext'){
$addtemplatejs = true;
}
//Editor Contact button
if($view == 'contacts' && $layout =='modal' && $option =='com_contact'){
$addtemplatejs = true;
}
//Editor Article button
if($view == 'articles' && $layout =='modal' && $option=='com_content' && $editor=='jform_articletext'){
$addtemplatejs = true;
}
//Editor Image button
if($option == 'com_media' && $tmpl =='component'){
$addtemplatejs = true;
}
//Editor Page break button
if($view == 'article' && $option == 'com_content' && $layout == 'pagebreak' && $e_name=='jform_articletext'){
$addtemplatejs = true;
}
//Content History
if($view == 'history' && $option == 'com_contenthistory' && $layout == 'modal'){
$addtemplatejs = true;
}
if($addtemplatejs){
JHtml::_('script', juri::root().'media/jui/js/bootstrap.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'isis.js', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'isis/isis.css', array('version' => 'auto', 'relative' => true));
}
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Load optional RTL Bootstrap CSS
JHtml::_('bootstrap.loadCss', false, $this->direction);
// Load specific language related CSS
JHtml::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
</head>
<body class="contentpane component">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>