Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html5] Hathor administrator template #10634

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions administrator/templates/hathor/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
|| $lang->load('tpl_hathor', JPATH_ADMINISTRATOR . '/templates/hathor/language');

$app = JFactory::getApplication();
$doc = JFactory::getDocument();

// Output as HTML5
$this->setHtml5(true);

// jQuery needed by template.js
JHtml::_('jquery.framework');
Expand All @@ -25,10 +27,10 @@
JHtml::_('bootstrap.loadCss', false, $this->direction);

// Load system style CSS
$doc->addStyleSheet($this->baseurl . '/templates/system/css/system.css');
$this->addStyleSheet($this->baseurl . '/templates/system/css/system.css');

// Loadtemplate CSS
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');

// Load additional CSS styles for colors
if (!$this->params->get('colourChoice'))
Expand All @@ -40,39 +42,39 @@
$colour = htmlspecialchars($this->params->get('colourChoice'));
}

$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';

if (is_file($file))
{
$doc->addStyleSheet($file);
$this->addStyleSheet($file);
}

// Load additional CSS styles for rtl sites
if ($this->direction == 'rtl')
{
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
}

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag().'.css';

if (JFile::exists($file))
{
$doc->addStyleSheet($file);
$this->addStyleSheet($file);
}

// Load additional CSS styles for bold Text
if ($this->params->get('boldText'))
{
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
}

// Load template javascript
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/template.js', 'text/javascript');
$this->addScriptVersion($this->baseurl . '/templates/' . $this->template . '/js/template.js');

// Logo file
if ($this->params->get('logoFile'))
Expand All @@ -85,14 +87,11 @@
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<!--[if lt IE 9]>
<script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script>
<![endif]-->
<jdoc:include type="head" />
<!--[if lt IE 9]><script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script><![endif]-->
</head>
<body class="contentpane">
<jdoc:include type="message" />
Expand Down
47 changes: 20 additions & 27 deletions administrator/templates/hathor/cpanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
defined('_JEXEC') or die;

$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$lang = JFactory::getLanguage();
$input = $app->input;
$user = JFactory::getUser();

// Output as HTML5
$this->setHtml5(true);

// Load optional RTL Bootstrap CSS
JHtml::_('bootstrap.loadCss', false, $this->direction);

// Load system style CSS
$doc->addStyleSheet($this->baseurl . '/templates/system/css/system.css');
$this->addStyleSheet($this->baseurl . '/templates/system/css/system.css');

// Loadtemplate CSS
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Load template CSS
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');

// Load additional CSS styles for colors
if (!$this->params->get('colourChoice'))
Expand All @@ -34,39 +34,39 @@
$colour = htmlspecialchars($this->params->get('colourChoice'));
}

$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';

if (is_file($file))
{
$doc->addStyleSheet($file);
$this->addStyleSheet($file);
}

// Load additional CSS styles for rtl sites
if ($this->direction == 'rtl')
{
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
}

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';

if (JFile::exists($file))
{
$doc->addStyleSheet($file);
$this->addStyleSheet($file);
}

// Load additional CSS styles for bold Text
if ($this->params->get('boldText'))
{
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
$this->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
}

// Load template javascript
$doc->addScript($this->baseurl . '/templates/' . $this->template . '/js/template.js', 'text/javascript');
$this->addScriptVersion($this->baseurl . '/templates/' . $this->template . '/js/template.js');

// Logo file
if ($this->params->get('logoFile'))
Expand All @@ -79,20 +79,13 @@
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<!-- Load additional CSS styles for Internet Explorer -->
<!--[if IE 8]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lt IE 9]>
<script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script>
<![endif]-->
<jdoc:include type="head" />
<!--[if IE 8]><link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie8.css" rel="stylesheet" /><![endif]-->
<!--[if IE 7]><link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie7.css" rel="stylesheet" /><![endif]-->
<!--[if lt IE 9]><script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script><![endif]-->
</head>
<body id="minwidth" class="cpanel-page">
<div id="containerwrap">
Expand Down Expand Up @@ -153,7 +146,7 @@
<p class="copyright">
<?php
// Fix wrong display of Joomla!® in RTL language
if (JFactory::getLanguage()->isRtl())
if ($lang->isRtl())
{
$joomla = '<a href="https://www.joomla.org" target="_blank">Joomla!</a><sup>&#174;&#x200E;</sup>';
}
Expand Down
14 changes: 7 additions & 7 deletions administrator/templates/hathor/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@

$app = JFactory::getApplication();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<title><?php echo $this->title; ?> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/error.css" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/error.css" rel="stylesheet" />
<?php if ($app->get('debug_lang', '0') == '1' || $app->get('debug', '0') == '1') : ?>
<!-- Load additional CSS styles for debug mode-->
<link rel="stylesheet" href="<?php echo JUri::root(); ?>/media/cms/css/debug.css" type="text/css" />
<link href="<?php echo JUri::root(true); ?>/media/cms/css/debug.css" rel="stylesheet" />
<?php endif; ?>
<!-- Load additional CSS styles for rtl sites -->
<?php if ($this->direction == 'rtl') : ?>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/template_rtl.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/template_rtl.css" rel="stylesheet" />
<?php endif; ?>

<!--[if lt IE 9]><script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script><![endif]-->
</head>
<body class="errors">
<div>
Expand Down
79 changes: 36 additions & 43 deletions administrator/templates/hathor/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

defined('_JEXEC') or die;

$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$lang = JFactory::getLanguage();
$input = $app->input;
$user = JFactory::getUser();
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();

// Output as HTML5
$this->setHtml5(true);

// jQuery needed by template.js
JHtml::_('jquery.framework');
Expand All @@ -22,10 +22,10 @@
JHtml::_('bootstrap.loadCss', false, $this->direction);

// Load system style CSS
$doc->addStyleSheetVersion($this->baseurl . '/templates/system/css/system.css');
$this->addStyleSheetVersion($this->baseurl . '/templates/system/css/system.css');

// Loadtemplate CSS
$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Load template CSS
$this->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/template.css');

// Load additional CSS styles for colors
if (!$this->params->get('colourChoice'))
Expand All @@ -37,39 +37,39 @@
$colour = htmlspecialchars($this->params->get('colourChoice'));
}

$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');
$this->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css');

// Load additional CSS styles for rtl sites
if ($this->direction == 'rtl')
{
$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
$this->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/template_rtl.css');
$this->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '_rtl.css');
}

// Load additional CSS styles for bold Text
if ($this->params->get('boldText'))
{
$doc->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
$this->addStyleSheetVersion($this->baseurl . '/templates/' . $this->template . '/css/boldtext.css');
}

// Load specific language related CSS
$languageCss = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';

if (file_exists($languageCss) && filesize($languageCss) > 0)
{
$doc->addStyleSheetVersion($languageCss);
$this->addStyleSheetVersion($languageCss);
}

// Load custom.css
$customCss = 'templates/' . $this->template . '/css/custom.css';

if (file_exists($customCss) && filesize($customCss) > 0)
{
$doc->addStyleSheetVersion($customCss);
$this->addStyleSheetVersion($customCss);
}

// Load template javascript
$doc->addScriptVersion($this->baseurl . '/templates/' . $this->template . '/js/template.js');
$this->addScriptVersion($this->baseurl . '/templates/' . $this->template . '/js/template.js');

// Logo file
if ($this->params->get('logoFile'))
Expand All @@ -81,23 +81,28 @@
$logo = $this->baseurl . '/templates/' . $this->template . '/images/logo.png';
}

$this->addScriptDeclaration("
(function($){
$(document).ready(function () {
// Patches to fix some wrong render of chosen fields
$('.chzn-container, .chzn-drop, .chzn-choices .search-field input').each(function (index) {
$(this).css({
'width': 'auto'
});
});
});
})(jQuery);
");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<jdoc:include type="head" />
<!-- Load additional CSS styles for Internet Explorer -->
<!--[if IE 8]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lt IE 9]>
<script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script>
<![endif]-->
</head>
<!--[if IE 8]><link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie8.css" rel="stylesheet" /><![endif]-->
<!--[if IE 7]><link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie7.css" rel="stylesheet" /><![endif]-->
<!--[if lt IE 9]><script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script><![endif]-->
</head>
<body id="minwidth-body">
<div id="containerwrap" data-basepath="<?php echo JURI::root(true); ?>">
<!-- Header Logo -->
Expand Down Expand Up @@ -162,7 +167,7 @@
<p class="copyright">
<?php
// Fix wrong display of Joomla!® in RTL language
if (JFactory::getLanguage()->isRtl())
if ($lang->isRtl())
{
$joomla = '<a href="https://www.joomla.org" target="_blank">Joomla!</a><sup>&#174;&#x200E;</sup>';
}
Expand All @@ -174,17 +179,5 @@
?>
</p>
</div>
<script type="text/javascript">
(function($){
$(document).ready(function () {
// Patches to fix some wrong render of chosen fields
$('.chzn-container, .chzn-drop, .chzn-choices .search-field input').each(function (index) {
$(this).css({
'width': 'auto'
});
});
});
})(jQuery);
</script>
</body>
</html>
</html>
Loading