init III
This commit is contained in:
92
Perl OTRS/Kernel/Output/HTML/Templates/Standard/HTMLHead.tt
Normal file
92
Perl OTRS/Kernel/Output/HTML/Templates/Standard/HTMLHead.tt
Normal file
@@ -0,0 +1,92 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
## nofilter(TidyAll::Plugin::OTRS::TT::ScriptUsage)
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html;charset=utf-8" />
|
||||
<meta id="viewport" name="viewport" content="">
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
# set viewport for mobile mode, do not set viewport for DesktopMode
|
||||
<script>
|
||||
(function(doc, win) {
|
||||
var viewport = doc.getElementById('viewport'),
|
||||
isIFrame = (win.top.location.href !== win.location.href),
|
||||
isPopup = (win.name.search(/^OTRSPopup_/) != -1);
|
||||
try {
|
||||
if (((!isIFrame && !isPopup) || (isIFrame && isPopup)) && (!localStorage.getItem("DesktopMode") || parseInt(localStorage.getItem("DesktopMode"), 10) <= 0)) {
|
||||
viewport.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no");
|
||||
}
|
||||
}
|
||||
catch (Exception) {}
|
||||
}(document, window));
|
||||
</script>
|
||||
[% RenderBlockStart("MetaLink") %]
|
||||
<link rel="[% Data.Rel | html %]" type="[% Data.Type | html %]" title="[% Data.Title | html %]" href="[% Data.Href %]" />
|
||||
[% RenderBlockEnd("MetaLink") %]
|
||||
<link rel="shortcut icon" href="[% Config("Frontend::ImagePath") %]icons/product.ico" type="image/ico" />
|
||||
<link rel="apple-touch-icon" href="[% Config("Frontend::ImagePath") %]icons/apple-touch-icon.png" />
|
||||
|
||||
[% RenderBlockStart("CommonCSS") %]
|
||||
<link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]" />
|
||||
[% RenderBlockEnd("CommonCSS") %]
|
||||
|
||||
[% RenderBlockStart("ModuleCSS") %]
|
||||
<link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]" />
|
||||
[% RenderBlockEnd("ModuleCSS") %]
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/ui-theme/jquery-ui.css" />
|
||||
|
||||
[% RenderBlockStart("HeaderLogoCSS") %]
|
||||
<style type="text/css">
|
||||
#Header #Logo {
|
||||
background-image: [% Data.URL | html %];
|
||||
top: [% Data.StyleTop | html %];
|
||||
right: [% Data.StyleRight | html %];
|
||||
width: [% Data.StyleWidth | html %];
|
||||
height: [% Data.StyleHeight | html %];
|
||||
}
|
||||
</style>
|
||||
[% RenderBlockEnd("HeaderLogoCSS") %]
|
||||
|
||||
[% RenderBlockStart("LoginLogoCSS") %]
|
||||
<style type="text/css">
|
||||
#LoginLogo {
|
||||
background-image: [% Data.URL | html %];
|
||||
height: [% Data.StyleHeight | html %];
|
||||
}
|
||||
</style>
|
||||
[% RenderBlockEnd("LoginLogoCSS") %]
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]common/css/font-awesome.min.css" />
|
||||
|
||||
# decide, if responsive CSS must be loaded
|
||||
# resposive CSS will not be loaded in "desktop mode" or if the document is within an iframe (customer overview in ticket phone overlay)
|
||||
<script>
|
||||
(function(doc, win) {
|
||||
var isIFrame = (win.top.location.href !== win.location.href),
|
||||
isPopup = (win.name.search(/^OTRSPopup_/) != -1);
|
||||
try {
|
||||
if (((!isIFrame && !isPopup) || (isIFrame && isPopup)) && (!localStorage.getItem("DesktopMode") || parseInt(localStorage.getItem("DesktopMode"), 10) <= 0)) {
|
||||
var ResponsiveCSS;
|
||||
[% RenderBlockStart("ResponsiveCSS") %]
|
||||
ResponsiveCSS = doc.createElement("link");
|
||||
ResponsiveCSS.setAttribute("rel", "stylesheet");
|
||||
ResponsiveCSS.setAttribute("type", "text/css");
|
||||
ResponsiveCSS.setAttribute("href", "[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]");
|
||||
doc.getElementsByTagName("head")[0].appendChild(ResponsiveCSS);
|
||||
[% RenderBlockEnd("ResponsiveCSS") %]
|
||||
}
|
||||
}
|
||||
catch (Exception) {}
|
||||
}(document, window));
|
||||
</script>
|
||||
|
||||
<title>[% Data.TitleArea | html %][% Config("ProductName") %]</title>
|
||||
|
||||
[% INCLUDE "HTMLHeadBlockEvents.tt" %]
|
||||
|
||||
</head>
|
||||
Reference in New Issue
Block a user