<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @ui/dashboards/default/scripts.html.twig */
class __TwigTemplate_a85876e443d18dc02ca692ee0cf6e27e extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui/dashboards/default/scripts.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui/dashboards/default/scripts.html.twig"));
// line 1
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("html5shiv::/dist/html5shiv.js"), null, null, "ie");
echo "
";
// line 2
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("respond::/dest/respond.js"), null, null, "ie");
echo "
";
// line 4
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("sugar::/release/sugar.min.js"), null, null, "head");
echo "
";
// line 5
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("headjs::/dist/1.0.0/head.min.js"), null, null, "head");
echo "
";
// line 6
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery2::/dist/jquery.min.js"), null, null, "head");
echo "
";
// line 7
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-migrate::/dist/jquery-migrate.min.js"), null, null, "head");
echo "
";
// line 8
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-ui::/jquery-ui.min.js"), null, null, "head");
echo "
";
// line 9
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("bootstrap::/dist/js/bootstrap.min.js"), null, null, "head");
echo "
";
// line 10
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-cookie", "jquery.cookie.min.js"), null, null, "bottom");
echo "
";
// line 12
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("breakpoints::/breakpoints.js"), null, null, "bottom");
echo "
";
// line 13
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-scrollbar::/jquery.scrollbar.min.js"), null, null, "bottom");
echo "
";
// line 14
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-slimscroll::/jquery.slimscroll.min.js"), null, null, "bottom");
echo "
";
// line 15
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("bootstrap-colorpicker::/dist/js/bootstrap-colorpicker.min.js"), null, null, "bottom");
echo "
";
// line 16
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("moment::/min/moment.min.js"), null, null, "bottom");
echo "
";
// line 17
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("bootstrap-slider::/dist/bootstrap-slider.min.js"), null, null, "bottom");
echo "
";
// line 18
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("chosen::/chosen.jquery.min.js"), null, null, "bottom");
echo "
";
// line 19
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-maskedinput::/dist/jquery.maskedinput.min.js"), null, null, "bottom");
echo "
";
// line 20
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-tageditor::/jquery.tag-editor.min.js"), null, null, "bottom");
echo "
";
// line 21
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("mixitup::/build/jquery.mixitup.min.js"), null, null, "bottom");
echo "
";
// line 22
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("knockout::/dist/knockout.js"), null, null, "bottom");
echo "
";
// line 23
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("chart-js::/dist/chart.min.js"), null, null, "bottom");
echo "
";
// line 24
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("palette-js::/palette.js"), null, null, "bottom");
echo "
";
// line 25
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-boilerplate::/dist/jquery.boilerplate.min.js"), null, null, "bottom");
echo "
";
// line 26
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("ace::/src-min-noconflict/ace.js"), null, null, "bottom");
echo "
";
// line 27
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("js-yaml::/dist/js-yaml.min.js"), null, null, "bottom");
echo "
";
// line 28
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("jquery-infinitescroll::/dist/infinite-scroll.pkgd.min.js"), null, null, "bottom");
echo "
";
// line 29
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("ckeditor::/ckeditor.js"), null, null, "bottom");
echo "
";
// line 30
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("uri-js::/src/URI.min.js"), null, null, "bottom");
echo "
";
// line 31
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript("/bundles/cmscore/plugins/modal.js", null, null, "bottom");
echo "
";
// line 32
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("match-height::/dist/jquery.matchHeight-min.js"), null, null, "bottom");
echo "
";
// line 33
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("clipboardjs::/dist/clipboard.js"), null, null, "bottom");
echo "
";
// line 34
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("anchorme::/dist-browser/anchorme.min.js"), null, null, "bottom");
echo "
";
// line 35
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript("/bundles/cmscore/searches.js", null, null, "bottom");
echo "
";
// line 36
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript("/bundles/cmscore/dashboard/bulk.js", null, null, "bottom");
echo "
";
// line 39
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("cropper::/dist/cropper.min.js"));
echo "
";
// line 40
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedStyle($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("cropper::/dist/cropper.min.css"));
echo "
";
// line 41
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript("/bundles/cmsfile/cropper.js", null, null, "bottom");
echo "
";
// line 44
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("toastr::/toastr.min.js"), null, null, "bottom");
echo "
";
// line 45
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedStyle($this->extensions['Cms\AssetsBundle\Service\AssetsTwigExtension']->assett("toastr::/toastr.min.css"));
echo "
";
// line 46
ob_start();
// line 47
echo " <script>
(function (window, document, \$, undefined) {
\$(function () {
toastr.options = {
closeButton: false,
debug: false,
newestOnTop: true,
progressBar: false,
positionClass: 'toast-top-right',
preventDuplicates: false,
onclick: null,
showDuration: '250',
hideDuration: '250',
timeOut: '1500',
extendedTimeOut: '500',
showEasing: 'swing',
hideEasing: 'linear',
showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
});
})(window, document, jQuery);
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 71
echo "
";
// line 73
ob_start();
// line 74
echo " <script>
function htmlEscape(str) {
return String(str)
.replace(/&/g, '&')
.replace(/\"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>');
}
\$.fn.serializeObject = function() {
var o = {}, a = this.serializeArray();
\$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 99
echo "
";
// line 100
ob_start();
// line 101
echo " <script>
(function (window, document, \$, undefined) {
// hide modal content when hidden
\$('body').on('hidden.bs.modal', '[data-campussuite-modal-autoempty]', function (e) {
var \$target = \$(e.target),
\$content = \$target.find('div.modal-content').first();
\$content.empty();
});
// image loader plugin
window.csimgloader = function(elem, count) {
// init count
if (count === undefined) {
count = 1;
}
// should be an img element
var \$elem = \$(elem);
// grab the src of the image
var src = \$elem.attr('src');
// set new html for loading purposes
var \$parent = \$elem.parent();
\$parent.html('<img alt=\"\" src=\"/bundles/cmscore/loading.gif\" />');
// set a callback that runs in a few seconds to try and reload the image
setTimeout((function(parent, src, count) {
return function() {
if (count > 12) {
return;
}
count++;
var \$parent = \$(parent);
if (\$.contains(document.documentElement, \$parent[0])) {
\$parent.html('<img alt=\"\" src=\"' + src + '\" onerror=\"(function(elem){jQuery(function() {window.csimgloader(elem, ' + count + ');});})(this);\" />');
}
};
})(\$parent[0], src, count), 5000);
}
})(window, document, jQuery);
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 146
echo "
";
// line 147
ob_start();
// line 148
echo " <script>
CKEDITOR.dtd.\$removeEmpty['em'] = false;
CKEDITOR.on('dialogDefinition', function(e) {
var dialog = e.data;
var dialogName = dialog.name;
var dialogDefinition = dialog.definition;
if (dialogName === 'link') {
var infoTab = dialogDefinition.getContents('info');
var urlOptions = infoTab.get('urlOptions');
urlOptions.children.push({
type: 'button',
id: 'browseSite',
label: 'Browse Files',
title: 'Browse Files',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'url'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/files/modal',
params: {
mode: (typeof CKEDITOR_MODAL_OVERRIDE !== 'undefined') ? CKEDITOR_MODAL_OVERRIDE : 'url',
container: cs.container,
value: urlField.getValue()
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
urlOptions.children.push({
type: 'button',
id: 'browseContent',
label: 'Browse Content',
title: 'Browse Content',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'url'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/modules/modal',
params: {
containerId: cs.container
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
}
if (dialogName === 'image') {
var tb = dialogDefinition.getContents('info');
var thing = tb.elements[0].children[0];
thing.children.push({
type: 'button',
id: 'browseSite',
label: 'Browse Files',
title: 'Browse Files',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'txtUrl'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/files/modal',
params: {
mode: (typeof CKEDITOR_MODAL_OVERRIDE !== 'undefined') ? CKEDITOR_MODAL_OVERRIDE : 'url',
container: cs.container,
value: urlField.getValue()
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
}
});
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 229
echo "
";
// line 230
echo $this->extensions['Cms\CoreBundle\Service\Twig\ContextExtension']->embedScript("/bundles/cmscore/AjaxSelect.js", null, null, "bottom");
echo "
<script type=\"text/javascript\">
window.CAMPUSSUITE = {
environment: '";
// line 234
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 234, $this->source); })()), "environment", [], "any", false, false, false, 234), "html", null, true);
echo "',
tenant: {
id: ";
// line 236
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 236, $this->source); })()), "tenant", [], "any", false, false, false, 236), "id", [], "any", false, false, false, 236), "html", null, true);
echo ",
uid: '";
// line 237
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 237, $this->source); })()), "tenant", [], "any", false, false, false, 237), "uid", [], "any", false, false, false, 237), "toString", [], "method", false, false, false, 237), "html", null, true);
echo "',
slug: '";
// line 238
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 238, $this->source); })()), "tenant", [], "any", false, false, false, 238), "slug", [], "any", false, false, false, 238), "html", null, true);
echo "'
},
container: ";
// line 240
(( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 240, $this->source); })()), "department", [], "any", false, false, false, 240))) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cms"]) || array_key_exists("cms", $context) ? $context["cms"] : (function () { throw new RuntimeError('Variable "cms" does not exist.', 240, $this->source); })()), "department", [], "any", false, false, false, 240), "id", [], "any", false, false, false, 240), "html", null, true))) : (print ("null")));
echo "
};
</script>
";
// line 244
ob_start();
// line 245
echo " <script>
// Break point entry
\$(function() {
var \$window = \$(window),
\$console = \$('#cs-console');
\$window
.bind('enterBreakpoint321', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-md')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-sm sb-collapse');
})
.bind('enterBreakpoint481', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-md')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-sm sb-collapse');
})
.bind('enterBreakpoint821', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-sm')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-md sb-collapse');
})
.bind('enterBreakpoint1065', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-sm sb-collapse')
.removeClass('cs-console-md sb-collapse')
.addClass('cs-console-lg sb-expand');
});
\$window.setBreakpoints({
distinct: true,
breakpoints: [
// needing to set breakpoints at one pixel above where they should
// this better matches current css media queries
// these events need triggered once the viewport extends beyond the designated \"real\" sizes, hence the extra pixel
321,// 320
481,// 480
821,// 820
1065// 1064
]
});
});
// Console Sidebar Toggle
\$(function() {
var \$toggle = \$('.cs-console-sb-toggle'),
\$console = \$('#cs-console');
\$toggle.click(function () {
if (\$console.hasClass('sb-collapse')) {
\$console
.removeClass('sb-collapse')
.addClass('sb-expand');
} else {
\$console
.removeClass('sb-expand')
.addClass('sb-collapse');
}
});
});
// Console Sidebar Hover
\$(function() {
var \$sidebar = \$('#cs-console-sidebar'),
\$console = \$('#cs-console');
\$sidebar.hover(
function () {
//if ( ! \$console.hasClass('cs-console-sm')) {
if (\$console.hasClass('cs-console-md')) {
\$console
.addClass('sb-expand')
.removeClass('sb-collapse');
}
},
function () {
if (\$console.hasClass('cs-console-md')) {
\$console
.addClass('sb-collapse')
.removeClass('sb-expand');
}
}
);
});
// Console Sidebar Nav Toggle
\$(function() {
\$('ul.editor__side-nav').on('click', 'a', function(e) {
var \$link = \$(e.currentTarget),
\$topmenu = \$link.closest('ul'),
\$topitem = \$link.closest('li');
// remove the active state from all current items
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('li')
.not(\$topitem)
.removeClass('active');
// activate the current items
\$topitem.addClass('active');
});
\$('ul.cs-console-sb-menu').on('click', 'a', function(e) {
var \$link = \$(e.currentTarget),
\$topmenu = \$link.closest('ul'),
\$submenu = null,
\$topitem = null,
\$subitem = null;
// fix the menus
if (\$topmenu.hasClass('cs-sub-menu')) {
\$submenu = \$topmenu;
\$topmenu = \$submenu.closest('ul');
}
// if there is a submenu above, then there are two items to consider
if (\$submenu !== null) {
\$subitem = \$link.closest('li');
\$topitem = \$subitem.closest('li');
} else {
\$topitem = \$link.closest('li');
}
// now, there might be a submenu related that we need to show
// if nothing returns, clear out the variable
\$submenu = \$topitem.children('ul.cs-sub-menu');
if (\$submenu.length === 0) {
\$submenu = null;
}
// remove the active state from all current items
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('li')
.not(\$topitem)
.not(\$subitem)
.removeClass('active');
// slide up all open submenus
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('ul.cs-sub-menu')
.not(\$submenu)
.slideUp(200);
// activate the current items
\$topitem.addClass('active');
if (\$subitem !== null) {
\$subitem.addClass('active');
}
// if we have a submenu, open it
// items with submenus should not have other actions, prevent default then
if (\$submenu !== null) {
\$submenu.slideDown(200);
e.preventDefault();
}
});
});
// Console Sidebar Slimscroll
\$(function() {
var resizeListener;
var pause = 500;
\$('.sb-scroll').slimScroll({
height: 'auto',
size: '10px'
});
\$(window).resize(function(){
clearTimeout(resizeListener);
resizeListener = setTimeout(
function() {
\$('.sb-scroll').slimScroll({
height: 'auto'
});
},
pause
);
});
});
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 442
echo "
";
// line 443
ob_start();
// line 444
echo " <script>
\$('[data-topbar=\"popover-bottom\"]').popover({
html: true,
placement: 'bottom',
sanitize: false,
content: function () {
return \$(this).siblings('.dropdown-content').html();
}
});
// Close popovers
\$('body').on('click', function (e) {
\$('[data-topbar=\"popover-bottom\"]').each(function () {
if (!\$(this).is(e.target) && \$(this).has(e.target).length === 0 && \$('.popover').has(e.target).length === 0) {
\$(this).popover('hide');
}
});
});
// tooltips: https://getbootstrap.com/docs/3.3/javascript/#tooltips-examples
\$(function () {
const elements = \$('[data-toggle=\"tooltip\"]');
for (let i=0; i < elements.length; i++) {
const element = \$(elements[i]);
const isTriggeredByClick = ('click' === element.data('trigger'));
element.tooltip({
container: 'body',
placement: element.data('placement') ?? 'right',
trigger: isTriggeredByClick ? 'manual' : 'hover',
html: true,
template: '<div class=\"tooltip tooltip-custom\" role=\"tooltip\"><div class=\"tooltip-arrow tooltip-arrow-custom\"></div><div class=\"tooltip-inner tooltip-inner-custom\"></div></div>',
});
if (isTriggeredByClick) {
element.on('click', function (event) {
event.preventDefault();
event.stopPropagation();
\$(this).tooltip('show');
});
}
element.on('show.bs.tooltip', function () {
const displayedTitle = \$(this).data('originalTitle');
const tooltipElements = \$('[data-toggle=\"tooltip\"]');
for (let i=0; i < tooltipElements.length; i++) {
if (displayedTitle !== \$(tooltipElements[i]).data('originalTitle')) {
\$(tooltipElements[i]).tooltip('hide');
}
}
});
}
\$('body').on('click', function () {
\$('[data-toggle=\"tooltip\"]').tooltip('hide');
});
});
</script>
";
$context['renderer']->currentScene()->getAssetsOrganizer()->getScripts()->add(new Cms\AssetsBundle\Model\Structure\ScriptStructure\InlineScriptStructure(trim(preg_replace(array('/^<script>/', '/<\/script>$/'), '', trim(ob_get_clean()))), "text/javascript"), null, "bottom");
// line 504
echo "
";
// line 505
$this->loadTemplate("@ui/dashboards/default/scripts/google-analytics.html.twig", "@ui/dashboards/default/scripts.html.twig", 505)->display(twig_array_merge($context, ['_args' => []]));
// line 506
$this->loadTemplate("@ui/dashboards/default/scripts/zendesk.html.twig", "@ui/dashboards/default/scripts.html.twig", 506)->display(twig_array_merge($context, ['_args' => []]));
// line 507
$this->loadTemplate("@ui/dashboards/default/scripts/churnzero.html.twig", "@ui/dashboards/default/scripts.html.twig", 507)->display(twig_array_merge($context, ['_args' => []]));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@ui/dashboards/default/scripts.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 713 => 507, 711 => 506, 709 => 505, 706 => 504, 644 => 444, 642 => 443, 639 => 442, 440 => 245, 438 => 244, 431 => 240, 426 => 238, 422 => 237, 418 => 236, 413 => 234, 406 => 230, 403 => 229, 320 => 148, 318 => 147, 315 => 146, 268 => 101, 266 => 100, 263 => 99, 236 => 74, 234 => 73, 231 => 71, 205 => 47, 203 => 46, 199 => 45, 195 => 44, 190 => 41, 186 => 40, 182 => 39, 177 => 36, 173 => 35, 169 => 34, 165 => 33, 161 => 32, 157 => 31, 153 => 30, 149 => 29, 145 => 28, 141 => 27, 137 => 26, 133 => 25, 129 => 24, 125 => 23, 121 => 22, 117 => 21, 113 => 20, 109 => 19, 105 => 18, 101 => 17, 97 => 16, 93 => 15, 89 => 14, 85 => 13, 81 => 12, 76 => 10, 72 => 9, 68 => 8, 64 => 7, 60 => 6, 56 => 5, 52 => 4, 47 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{{ embed_script(assett('html5shiv::/dist/html5shiv.js'), null, null, 'ie') }}
{{ embed_script(assett('respond::/dest/respond.js'), null, null, 'ie') }}
{{ embed_script(assett('sugar::/release/sugar.min.js'), null, null, 'head') }}
{{ embed_script(assett('headjs::/dist/1.0.0/head.min.js'), null, null, 'head') }}
{{ embed_script(assett('jquery2::/dist/jquery.min.js'), null, null, 'head') }}
{{ embed_script(assett('jquery-migrate::/dist/jquery-migrate.min.js'), null, null, 'head') }}
{{ embed_script(assett('jquery-ui::/jquery-ui.min.js'), null, null, 'head') }}
{{ embed_script(assett('bootstrap::/dist/js/bootstrap.min.js'), null, null, 'head') }}
{{ embed_script(assett('jquery-cookie', 'jquery.cookie.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('breakpoints::/breakpoints.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-scrollbar::/jquery.scrollbar.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-slimscroll::/jquery.slimscroll.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('bootstrap-colorpicker::/dist/js/bootstrap-colorpicker.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('moment::/min/moment.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('bootstrap-slider::/dist/bootstrap-slider.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('chosen::/chosen.jquery.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-maskedinput::/dist/jquery.maskedinput.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-tageditor::/jquery.tag-editor.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('mixitup::/build/jquery.mixitup.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('knockout::/dist/knockout.js'), null, null, 'bottom') }}
{{ embed_script(assett('chart-js::/dist/chart.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('palette-js::/palette.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-boilerplate::/dist/jquery.boilerplate.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('ace::/src-min-noconflict/ace.js'), null, null, 'bottom') }}
{{ embed_script(assett('js-yaml::/dist/js-yaml.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('jquery-infinitescroll::/dist/infinite-scroll.pkgd.min.js'), null, null, 'bottom') }}
{{ embed_script(assett('ckeditor::/ckeditor.js'), null, null, 'bottom') }}
{{ embed_script(assett('uri-js::/src/URI.min.js'), null, null, 'bottom') }}
{{ embed_script('/bundles/cmscore/plugins/modal.js', null, null, 'bottom') }}
{{ embed_script(assett('match-height::/dist/jquery.matchHeight-min.js'), null, null, 'bottom') }}
{{ embed_script(assett('clipboardjs::/dist/clipboard.js'), null, null, 'bottom') }}
{{ embed_script(assett('anchorme::/dist-browser/anchorme.min.js'), null, null, 'bottom') }}
{{ embed_script('/bundles/cmscore/searches.js', null, null, 'bottom') }}
{{ embed_script('/bundles/cmscore/dashboard/bulk.js', null, null, 'bottom') }}
{# HACK: cropper #}
{{ embed_script(assett('cropper::/dist/cropper.min.js')) }}
{{ embed_style(assett('cropper::/dist/cropper.min.css')) }}
{{ embed_script('/bundles/cmsfile/cropper.js', null, null, 'bottom') }}
{# HACK: toastr #}
{{ embed_script(assett('toastr::/toastr.min.js'), null, null, 'bottom') }}
{{ embed_style(assett('toastr::/toastr.min.css')) }}
{% inline_script %}
<script>
(function (window, document, \$, undefined) {
\$(function () {
toastr.options = {
closeButton: false,
debug: false,
newestOnTop: true,
progressBar: false,
positionClass: 'toast-top-right',
preventDuplicates: false,
onclick: null,
showDuration: '250',
hideDuration: '250',
timeOut: '1500',
extendedTimeOut: '500',
showEasing: 'swing',
hideEasing: 'linear',
showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
});
})(window, document, jQuery);
</script>
{% endinline %}
{# pulled from page editor stuff #}
{% inline_script %}
<script>
function htmlEscape(str) {
return String(str)
.replace(/&/g, '&')
.replace(/\"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>');
}
\$.fn.serializeObject = function() {
var o = {}, a = this.serializeArray();
\$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
</script>
{% endinline %}
{% inline_script %}
<script>
(function (window, document, \$, undefined) {
// hide modal content when hidden
\$('body').on('hidden.bs.modal', '[data-campussuite-modal-autoempty]', function (e) {
var \$target = \$(e.target),
\$content = \$target.find('div.modal-content').first();
\$content.empty();
});
// image loader plugin
window.csimgloader = function(elem, count) {
// init count
if (count === undefined) {
count = 1;
}
// should be an img element
var \$elem = \$(elem);
// grab the src of the image
var src = \$elem.attr('src');
// set new html for loading purposes
var \$parent = \$elem.parent();
\$parent.html('<img alt=\"\" src=\"/bundles/cmscore/loading.gif\" />');
// set a callback that runs in a few seconds to try and reload the image
setTimeout((function(parent, src, count) {
return function() {
if (count > 12) {
return;
}
count++;
var \$parent = \$(parent);
if (\$.contains(document.documentElement, \$parent[0])) {
\$parent.html('<img alt=\"\" src=\"' + src + '\" onerror=\"(function(elem){jQuery(function() {window.csimgloader(elem, ' + count + ');});})(this);\" />');
}
};
})(\$parent[0], src, count), 5000);
}
})(window, document, jQuery);
</script>
{% endinline %}
{% inline_script %}
<script>
CKEDITOR.dtd.\$removeEmpty['em'] = false;
CKEDITOR.on('dialogDefinition', function(e) {
var dialog = e.data;
var dialogName = dialog.name;
var dialogDefinition = dialog.definition;
if (dialogName === 'link') {
var infoTab = dialogDefinition.getContents('info');
var urlOptions = infoTab.get('urlOptions');
urlOptions.children.push({
type: 'button',
id: 'browseSite',
label: 'Browse Files',
title: 'Browse Files',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'url'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/files/modal',
params: {
mode: (typeof CKEDITOR_MODAL_OVERRIDE !== 'undefined') ? CKEDITOR_MODAL_OVERRIDE : 'url',
container: cs.container,
value: urlField.getValue()
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
urlOptions.children.push({
type: 'button',
id: 'browseContent',
label: 'Browse Content',
title: 'Browse Content',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'url'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/modules/modal',
params: {
containerId: cs.container
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
}
if (dialogName === 'image') {
var tb = dialogDefinition.getContents('info');
var thing = tb.elements[0].children[0];
thing.children.push({
type: 'button',
id: 'browseSite',
label: 'Browse Files',
title: 'Browse Files',
onClick: function() {
var urlField = this.getDialog().getContentElement('info', 'txtUrl'),
cs = window.top.CAMPUSSUITE;
CampussuiteModals.open({
url: '/_dashboard/files/modal',
params: {
mode: (typeof CKEDITOR_MODAL_OVERRIDE !== 'undefined') ? CKEDITOR_MODAL_OVERRIDE : 'url',
container: cs.container,
value: urlField.getValue()
},
callback: function(selection) {
urlField.setValue(selection);
},
styles: 'modal-dialog--media'
});
}
});
}
});
</script>
{% endinline %}
{{ embed_script('/bundles/cmscore/AjaxSelect.js', null, null, 'bottom') }}
<script type=\"text/javascript\">
window.CAMPUSSUITE = {
environment: '{{ cms.environment }}',
tenant: {
id: {{ cms.tenant.id }},
uid: '{{ cms.tenant.uid.toString() }}',
slug: '{{ cms.tenant.slug }}'
},
container: {{ (cms.department is not empty) ? cms.department.id : 'null' }}
};
</script>
{% inline_script %}
<script>
// Break point entry
\$(function() {
var \$window = \$(window),
\$console = \$('#cs-console');
\$window
.bind('enterBreakpoint321', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-md')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-sm sb-collapse');
})
.bind('enterBreakpoint481', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-md')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-sm sb-collapse');
})
.bind('enterBreakpoint821', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-sm')
.removeClass('cs-console-lg sb-expand')
.addClass('cs-console-md sb-collapse');
})
.bind('enterBreakpoint1065', function () {
if (\$console.hasClass('sb-disable-autoload')) {
return;
}
\$console
.removeClass('cs-console-sm sb-collapse')
.removeClass('cs-console-md sb-collapse')
.addClass('cs-console-lg sb-expand');
});
\$window.setBreakpoints({
distinct: true,
breakpoints: [
// needing to set breakpoints at one pixel above where they should
// this better matches current css media queries
// these events need triggered once the viewport extends beyond the designated \"real\" sizes, hence the extra pixel
321,// 320
481,// 480
821,// 820
1065// 1064
]
});
});
// Console Sidebar Toggle
\$(function() {
var \$toggle = \$('.cs-console-sb-toggle'),
\$console = \$('#cs-console');
\$toggle.click(function () {
if (\$console.hasClass('sb-collapse')) {
\$console
.removeClass('sb-collapse')
.addClass('sb-expand');
} else {
\$console
.removeClass('sb-expand')
.addClass('sb-collapse');
}
});
});
// Console Sidebar Hover
\$(function() {
var \$sidebar = \$('#cs-console-sidebar'),
\$console = \$('#cs-console');
\$sidebar.hover(
function () {
//if ( ! \$console.hasClass('cs-console-sm')) {
if (\$console.hasClass('cs-console-md')) {
\$console
.addClass('sb-expand')
.removeClass('sb-collapse');
}
},
function () {
if (\$console.hasClass('cs-console-md')) {
\$console
.addClass('sb-collapse')
.removeClass('sb-expand');
}
}
);
});
// Console Sidebar Nav Toggle
\$(function() {
\$('ul.editor__side-nav').on('click', 'a', function(e) {
var \$link = \$(e.currentTarget),
\$topmenu = \$link.closest('ul'),
\$topitem = \$link.closest('li');
// remove the active state from all current items
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('li')
.not(\$topitem)
.removeClass('active');
// activate the current items
\$topitem.addClass('active');
});
\$('ul.cs-console-sb-menu').on('click', 'a', function(e) {
var \$link = \$(e.currentTarget),
\$topmenu = \$link.closest('ul'),
\$submenu = null,
\$topitem = null,
\$subitem = null;
// fix the menus
if (\$topmenu.hasClass('cs-sub-menu')) {
\$submenu = \$topmenu;
\$topmenu = \$submenu.closest('ul');
}
// if there is a submenu above, then there are two items to consider
if (\$submenu !== null) {
\$subitem = \$link.closest('li');
\$topitem = \$subitem.closest('li');
} else {
\$topitem = \$link.closest('li');
}
// now, there might be a submenu related that we need to show
// if nothing returns, clear out the variable
\$submenu = \$topitem.children('ul.cs-sub-menu');
if (\$submenu.length === 0) {
\$submenu = null;
}
// remove the active state from all current items
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('li')
.not(\$topitem)
.not(\$subitem)
.removeClass('active');
// slide up all open submenus
// skip the currently selected item to prevent odd behavior
\$topmenu
.find('ul.cs-sub-menu')
.not(\$submenu)
.slideUp(200);
// activate the current items
\$topitem.addClass('active');
if (\$subitem !== null) {
\$subitem.addClass('active');
}
// if we have a submenu, open it
// items with submenus should not have other actions, prevent default then
if (\$submenu !== null) {
\$submenu.slideDown(200);
e.preventDefault();
}
});
});
// Console Sidebar Slimscroll
\$(function() {
var resizeListener;
var pause = 500;
\$('.sb-scroll').slimScroll({
height: 'auto',
size: '10px'
});
\$(window).resize(function(){
clearTimeout(resizeListener);
resizeListener = setTimeout(
function() {
\$('.sb-scroll').slimScroll({
height: 'auto'
});
},
pause
);
});
});
</script>
{% endinline %}
{% inline_script %}
<script>
\$('[data-topbar=\"popover-bottom\"]').popover({
html: true,
placement: 'bottom',
sanitize: false,
content: function () {
return \$(this).siblings('.dropdown-content').html();
}
});
// Close popovers
\$('body').on('click', function (e) {
\$('[data-topbar=\"popover-bottom\"]').each(function () {
if (!\$(this).is(e.target) && \$(this).has(e.target).length === 0 && \$('.popover').has(e.target).length === 0) {
\$(this).popover('hide');
}
});
});
// tooltips: https://getbootstrap.com/docs/3.3/javascript/#tooltips-examples
\$(function () {
const elements = \$('[data-toggle=\"tooltip\"]');
for (let i=0; i < elements.length; i++) {
const element = \$(elements[i]);
const isTriggeredByClick = ('click' === element.data('trigger'));
element.tooltip({
container: 'body',
placement: element.data('placement') ?? 'right',
trigger: isTriggeredByClick ? 'manual' : 'hover',
html: true,
template: '<div class=\"tooltip tooltip-custom\" role=\"tooltip\"><div class=\"tooltip-arrow tooltip-arrow-custom\"></div><div class=\"tooltip-inner tooltip-inner-custom\"></div></div>',
});
if (isTriggeredByClick) {
element.on('click', function (event) {
event.preventDefault();
event.stopPropagation();
\$(this).tooltip('show');
});
}
element.on('show.bs.tooltip', function () {
const displayedTitle = \$(this).data('originalTitle');
const tooltipElements = \$('[data-toggle=\"tooltip\"]');
for (let i=0; i < tooltipElements.length; i++) {
if (displayedTitle !== \$(tooltipElements[i]).data('originalTitle')) {
\$(tooltipElements[i]).tooltip('hide');
}
}
});
}
\$('body').on('click', function () {
\$('[data-toggle=\"tooltip\"]').tooltip('hide');
});
});
</script>
{% endinline %}
{% include '@ui/dashboards/default/scripts/google-analytics.html.twig' %}
{% include '@ui/dashboards/default/scripts/zendesk.html.twig' %}
{% include '@ui/dashboards/default/scripts/churnzero.html.twig' %}
", "@ui/dashboards/default/scripts.html.twig", "/var/www/campussuite/ui/twig/dashboards/default/scripts.html.twig");
}
}