Commit c20413e3 authored by Tino Goratsch's avatar Tino Goratsch

slightly modernize the javascript files

parent ebacac00
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(($) => {
$('input[name="active"]').on('click change', function () { $('input[name="active"]').on('click change', function () {
$('#publication-period-wrapper').toggle(this.value === '1'); $('#publication-period-wrapper').toggle(this.value === '1');
}).filter(':checked').click(); }).filter(':checked').click();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $recaptchaWrapper = $('#recaptcha-wrapper'), const $recaptchaWrapper = $('#recaptcha-wrapper'),
serviceIds = [ serviceIds = [
'captcha.extension.recaptcha_captcha_extension' 'captcha.extension.recaptcha_captcha_extension'
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
/* global onloadCallback:true */ /* global onloadCallback:true */
onloadCallback = function () { onloadCallback = () => {
jQuery('.recaptcha-placeholder').each(function () { jQuery('.recaptcha-placeholder').each(function () {
if (jQuery(this).children().length === 0) { if (jQuery(this).children().length === 0) {
const widgetId = grecaptcha.render(this.id, { const widgetId = grecaptcha.render(this.id, {
...@@ -17,11 +17,11 @@ onloadCallback = function () { ...@@ -17,11 +17,11 @@ onloadCallback = function () {
}); });
}; };
jQuery(document).on('acp3.captcha.recaptcha', function () { jQuery(document).on('acp3.captcha.recaptcha', () => {
onloadCallback(); onloadCallback();
}); });
jQuery(document).on('acp3.ajaxFrom.submit.fail', function (event, ajaxForm) { jQuery(document).on('acp3.ajaxFrom.submit.fail', (event, ajaxForm) => {
const $reCaptchaPlaceholder = jQuery(ajaxForm.element).find('.recaptcha-placeholder'); const $reCaptchaPlaceholder = jQuery(ajaxForm.element).find('.recaptcha-placeholder');
if ($reCaptchaPlaceholder && $reCaptchaPlaceholder.length > 0) { if ($reCaptchaPlaceholder && $reCaptchaPlaceholder.length > 0) {
......
...@@ -67,11 +67,11 @@ jQuery.fn.insertEmoticon = function (textareaId) { ...@@ -67,11 +67,11 @@ jQuery.fn.insertEmoticon = function (textareaId) {
}); });
// Aktuelle Cursorposition speichern // Aktuelle Cursorposition speichern
textarea.blur(function () { textarea.blur(() => {
caretPosition = textarea.getCaretPosition(); caretPosition = textarea.getCaretPosition();
}); });
}; };
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('.icons a').insertEmoticon($('.icons').data('emoticons-input')); $('.icons a').insertEmoticon($('.icons').data('emoticons-input'));
}); });
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('input[name="active"]').on('click change', function () { $('input[name="active"]').on('click change', function () {
$('#publication-period-wrapper').toggle(this.value === '1'); $('#publication-period-wrapper').toggle(this.value === '1');
}).filter(':checked').click(); }).filter(':checked').click();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licensing details. * See the LICENSE file at the top-level module directory for licensing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('input[name="active"]').on('click change', function () { $('input[name="active"]').on('click change', function () {
$('#publication-period-wrapper').toggle(this.value === '1'); $('#publication-period-wrapper').toggle(this.value === '1');
}).filter(':checked').click(); }).filter(':checked').click();
......
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('input[name="overlay"]') $('input[name="overlay"]')
.on('change click', function () { .on('change click', function () {
$('#comments-container').toggle(this.value == 0); $('#comments-container').toggle(Number(this.value) === 0);
}) })
.filter(':checked').trigger('click'); .filter(':checked').trigger('click');
}); });
"use strict";jQuery(document).ready(function(a){a("input[name=\"overlay\"]").on("change click",function(){a("#comments-container").toggle(0==this.value)}).filter(":checked").trigger("click")}); "use strict";jQuery(document).ready(function(a){a("input[name=\"overlay\"]").on("change click",function(){a("#comments-container").toggle(0===+this.value)}).filter(":checked").trigger("click")});
\ No newline at end of file \ No newline at end of file
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#notify').on('change', function () { $('#notify').on('change', function () {
$('#notify-email') $('#notify-email')
.closest('.form-group').toggle(this.value != 0); .closest('.form-group').toggle(Number(this.value) !== 0);
}).children('option:selected').trigger('change'); }).children('option:selected').trigger('change');
}); });
"use strict";jQuery(document).ready(function(a){a("#notify").on("change",function(){a("#notify-email").closest(".form-group").toggle(0!=this.value)}).children("option:selected").trigger("change")}); "use strict";jQuery(document).ready(function(a){a("#notify").on("change",function(){a("#notify-email").closest(".form-group").toggle(0!==+this.value)}).children("option:selected").trigger("change")});
\ No newline at end of file \ No newline at end of file
"use strict";/*
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/jQuery(document).ready(function(a){a("#modal-create [data-ajax-form=\"true\"]").formSubmit()});
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licensing details. * See the LICENSE file at the top-level module directory for licensing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#modal-create').on('show.bs.modal', function (event) { $('#modal-create').on('show.bs.modal', function (event) {
const $target = $(event.relatedTarget); const $target = $(event.relatedTarget);
const $modal = $(this); const $modal = $(this);
......
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $module = $('#module-container'), const $module = $('#module-container'),
$link = $('#link-container'), $link = $('#link-container'),
$hints = $link.find('.help-block'), $hints = $link.find('.help-block'),
...@@ -8,9 +8,10 @@ jQuery(document).ready(function ($) { ...@@ -8,9 +8,10 @@ jQuery(document).ready(function ($) {
// Wenn Menüpunkt nicht angezeigt werden soll, Linkziel verstecken // Wenn Menüpunkt nicht angezeigt werden soll, Linkziel verstecken
$('input[name="display"]').change(function () { $('input[name="display"]').change(function () {
$target.toggle(this.value == 1); const value = Number(this.value);
$target.toggle(value === 1);
if (this.value == 0) { if (value === 0) {
// Force the link target to open on the same page programmatically, // Force the link target to open on the same page programmatically,
// as the user can not select it for them self // as the user can not select it for them self
$('#target').val(1); $('#target').val(1);
......
"use strict";jQuery(document).ready(function(a){var b=a("#module-container"),c=a("#link-container"),d=c.find(".help-block"),e=a("#articles-container"),f=a("#target-container"),g=/^articles\/index\/details\/id_(\d+)\/$/;// Wenn Menüpunkt nicht angezeigt werden soll, Linkziel verstecken "use strict";jQuery(document).ready(function(a){var b=a("#module-container"),c=a("#link-container"),d=c.find(".help-block"),e=a("#articles-container"),f=a("#target-container"),g=/^articles\/index\/details\/id_(\d+)\/$/;// Wenn Menüpunkt nicht angezeigt werden soll, Linkziel verstecken
a("input[name=\"display\"]").change(function(){f.toggle(1==this.value),0==this.value&&a("#target").val(1)});var h=a("#mode"),i=h.val();// Seitentyp a("input[name=\"display\"]").change(function(){var b=+this.value;f.toggle(1==b),0==b&&a("#target").val(1)});var h=a("#mode"),i=h.val();// Seitentyp
h.change(function(){var f=parseInt(this.value);if(1!==f)2===f?(b.hide(),d.show(),c.show(),e.hide()):3===f?(b.hide(),d.hide(),c.show(),e.hide()):4===f?(b.hide(),d.hide(),c.hide(),e.show()):(b.hide(),d.hide(),c.hide(),e.hide());else// Modul im Dropdown-Menü selektieren, falls zuvor als Modus eine dynamische Seite aktiv war h.change(function(){var f=parseInt(this.value);if(1!==f)2===f?(b.hide(),d.show(),c.show(),e.hide()):3===f?(b.hide(),d.hide(),c.show(),e.hide()):4===f?(b.hide(),d.hide(),c.hide(),e.show()):(b.hide(),d.hide(),c.hide(),e.hide());else// Modul im Dropdown-Menü selektieren, falls zuvor als Modus eine dynamische Seite aktiv war
if(b.show(),d.hide(),c.hide(),e.hide(),2===i){var h=a("#uri"),j=h.val().match(/^([a-z\d_-]+)\/([a-z\d_-]+\/)+$/);!h.val().match(g)&&null!=j[1]&&0<a("#module").find("option[value=\""+j[1]+"\"]").length&&a("#link-module").val(j[1])}i=f}).change(),a("#uri").blur(function(){var b=a(this).val().match(g);null!==b[1]&&0<a("#articles").find("option[value=\""+b[1]+"\"]").length&&(a("#mode").val(4).change(),a("#link-articles").val(b[1]))})}); if(b.show(),d.hide(),c.hide(),e.hide(),2===i){var h=a("#uri"),j=h.val().match(/^([a-z\d_-]+)\/([a-z\d_-]+\/)+$/);!h.val().match(g)&&null!=j[1]&&0<a("#module").find("option[value=\""+j[1]+"\"]").length&&a("#link-module").val(j[1])}i=f}).change(),a("#uri").blur(function(){var b=a(this).val().match(g);null!==b[1]&&0<a("#articles").find("option[value=\""+b[1]+"\"]").length&&(a("#mode").val(4).change(),a("#link-articles").val(b[1]))})});
\ No newline at end of file
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $parentId = $('#parent-id'), const $parentId = $('#parent-id'),
$blockId = $('#block-id'), $blockId = $('#block-id'),
defaultBlockIndex = $blockId.find('option:selected').index() || 0; defaultBlockIndex = $blockId.find('option:selected').index() || 0;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(($) => {
$('input[name="active"]').on('click change', function () { $('input[name="active"]').on('click change', function () {
$('#publication-period-wrapper').toggle(this.value === '1'); $('#publication-period-wrapper').toggle(this.value === '1');
}).filter(':checked').click(); }).filter(':checked').click();
......
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('input[name="readmore"]').on('click change', function () { $('input[name="readmore"]').on('click change', function () {
$('#readmore-container').toggle(this.value === '1'); $('#readmore-container').toggle(this.value === '1');
}).filter(':checked').click(); }).filter(':checked').click();
......
"use strict";jQuery(document).ready(function(a){var b=a("#resources-table");b.find("tbody tr:not(.sub-table-header)").hide(),b.find(".sub-table-header").click(function(){a(this).nextUntil("tr.sub-table-header").toggle();var c=b.find("tbody tr:has(:checkbox):visible").length,d=0<c&&c===b.find("tbody tr.selected:visible").length;a("#mark-all").prop("checked",d)})});
\ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(($) => {
$('#search-advanced-toggle').click(function() { $('#search-advanced-toggle').click(() => {
$('#search-advanced-wrapper').toggleClass('d-none'); $('#search-advanced-wrapper').toggleClass('d-none');
}); });
}); });
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$(':radio[name="sitemap_is_enabled"]').on('click change', function () { $(':radio[name="sitemap_is_enabled"]').on('click change', function () {
$('#seo-sitemap-wrapper').toggle(parseInt(this.value) === 1); $('#seo-sitemap-wrapper').toggle(parseInt(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
}; };
})(jQuery); })(jQuery);
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#seo-alias-suggestion').suggestAlias({ $('#seo-alias-suggestion').suggestAlias({
prefix: $('[data-seo-slug-prefix]').data('seo-slug-prefix'), prefix: $('[data-seo-slug-prefix]').data('seo-slug-prefix'),
slugBaseElement: $('[data-seo-slug-base="true"]'), slugBaseElement: $('[data-seo-slug-base="true"]'),
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#services').on('change', function () { $('#services').on('change', function () {
$('#fb-credentials-wrapper').toggle($(this).val() && $(this).val().indexOf('facebook') !== -1); $('#fb-credentials-wrapper').toggle($(this).val() && $(this).val().indexOf('facebook') !== -1);
}).triggerHandler('change'); }).triggerHandler('change');
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#rating-wrapper') $('#rating-wrapper')
.on('change', ':radio', function () { .on('change', ':radio', function () {
$('.rating__average').remove(); $('.rating__average').remove();
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(($) => {
$(':radio[name="share_active"]').on('click change', function() { $(':radio[name="share_active"]').on('click change', function () {
$('#share-services-wrapper').toggle(parseInt(this.value) === 1); $('#share-services-wrapper').toggle(parseInt(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
$(':radio[name="share_customize_services"]').on('click change', function() { $(':radio[name="share_customize_services"]').on('click change', function () {
$('#share-custom-services-wrapper').toggle(parseInt(this.value) === 1); $('#share-custom-services-wrapper').toggle(parseInt(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
}); });
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$(':radio[name="site_subtitle_mode"]').on('click change', function () { $(':radio[name="site_subtitle_mode"]').on('click change', function () {
$('#site-subtitle-homepage-home-container').toggle(this.value != 3); $('#site-subtitle-homepage-home-container').toggle(Number(this.value) !== 3);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
$(':radio[name="cookie_consent_is_enabled"]').on('click change', function () { $(':radio[name="cookie_consent_is_enabled"]').on('click change', function () {
$('#cookie-consent-container').toggle(this.value == 1); $('#cookie-consent-container').toggle(Number(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
$(':radio[name="maintenance_mode"]').on('click change', function () { $(':radio[name="maintenance_mode"]').on('click change', function () {
$('#maintenance-message-container').toggle(this.value == 1); $('#maintenance-message-container').toggle(Number(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
$(':radio[name="mailer_smtp_auth"]').on('click change', function () { $(':radio[name="mailer_smtp_auth"]').on('click change', function () {
$('#mailer-smtp-2').toggle(this.value == 1); $('#mailer-smtp-2').toggle(Number(this.value) === 1);
}).filter(':checked').triggerHandler('click'); }).filter(':checked').triggerHandler('click');
$('#mailer-type').on('change', function () { $('#mailer-type').on('change', function () {
......
"use strict";jQuery(document).ready(function(a){a(":radio[name=\"site_subtitle_mode\"]").on("click change",function(){a("#site-subtitle-homepage-home-container").toggle(3!=this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"cookie_consent_is_enabled\"]").on("click change",function(){a("#cookie-consent-container").toggle(1==this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"maintenance_mode\"]").on("click change",function(){a("#maintenance-message-container").toggle(1==this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"mailer_smtp_auth\"]").on("click change",function(){a("#mailer-smtp-2").toggle(1==this.value)}).filter(":checked").triggerHandler("click"),a("#mailer-type").on("change",function(){"smtp"===a(this).val()?(a("#mailer-smtp-1").show(),a("input[name=\"mailer_smtp_auth\"]:checked").trigger("click")):a("#mailer-smtp-1, #mailer-smtp-2").hide()}).trigger("change")}); "use strict";jQuery(document).ready(function(a){a(":radio[name=\"site_subtitle_mode\"]").on("click change",function(){a("#site-subtitle-homepage-home-container").toggle(3!==+this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"cookie_consent_is_enabled\"]").on("click change",function(){a("#cookie-consent-container").toggle(1===+this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"maintenance_mode\"]").on("click change",function(){a("#maintenance-message-container").toggle(1===+this.value)}).filter(":checked").triggerHandler("click"),a(":radio[name=\"mailer_smtp_auth\"]").on("click change",function(){a("#mailer-smtp-2").toggle(1===+this.value)}).filter(":checked").triggerHandler("click"),a("#mailer-type").on("change",function(){"smtp"===a(this).val()?(a("#mailer-smtp-1").show(),a("input[name=\"mailer_smtp_auth\"]:checked").trigger("click")):a("#mailer-smtp-1, #mailer-smtp-2").hide()}).trigger("change")});
\ No newline at end of file \ No newline at end of file
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function($) { jQuery(document).ready(($) => {
$('[data-add-tab-identifier]').each(function() { $('[data-add-tab-identifier]').each(function () {
const tabIdentifier = $(this).data('add-tab-identifier'), const tabIdentifier = $(this).data('add-tab-identifier'),
$element = $(tabIdentifier), $element = $(tabIdentifier),
$tabContent = $element.closest('.tab-content'), $tabContent = $element.closest('.tab-content'),
$tabs = $tabContent.prev('.nav-tabs'), $tabs = $tabContent.prev('.nav-tabs'),
tabTitle = $(this).data('add-tab-title'), tabTitle = $(this).data('add-tab-title'),
newTabItem = '<li class="nav-item"><a href="' + tabIdentifier + '" class="nav-link" data-toggle="tab">' + tabTitle + '</a></li>'; newTabItem = `<li class="nav-item"><a href="${tabIdentifier}" class="nav-link" data-toggle="tab">${tabTitle}</a></li>`;
$tabs.append(newTabItem); $tabs.append(newTabItem);
}); });
......
"use strict";/* "use strict";/*
* Copyright (c) by the ACP3 Developers. * Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/jQuery(document).ready(function(a){a("[data-add-tab-identifier]").each(function(){var b=a(this).data("add-tab-identifier"),c=a(b),d=c.closest(".tab-content"),e=d.prev(".nav-tabs"),f=a(this).data("add-tab-title");e.append("<li class=\"nav-item\"><a href=\""+b+"\" class=\"nav-link\" data-toggle=\"tab\">"+f+"</a></li>")})}); */jQuery(document).ready(function(a){a("[data-add-tab-identifier]").each(function(){var b=a(this).data("add-tab-identifier"),c=a(b),d=c.closest(".tab-content"),e=d.prev(".nav-tabs"),f=a(this).data("add-tab-title"),g="<li class=\"nav-item\"><a href=\"".concat(b,"\" class=\"nav-link\" data-toggle=\"tab\">").concat(f,"</a></li>");e.append(g)})});
\ No newline at end of file \ No newline at end of file
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
}; };
})(jQuery, window, document); })(jQuery, window, document);
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('[data-ajax-form="true"]').formSubmit(); $('[data-ajax-form="true"]').formSubmit();
$(document).on('draw.dt', function (e) { $(document).on('draw.dt', function (e) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $cookieNotice = $('#cookie-consent'), const $cookieNotice = $('#cookie-consent'),
cookieName = 'ACCEPT_COOKIES'; cookieName = 'ACCEPT_COOKIES';
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* See the LICENCE file at the top-level module directory for licencing details. * See the LICENCE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('[data-datatable-init]').each(function() { $('[data-datatable-init]').each(function () {
const $this = $(this), const $this = $(this),
json = $this.data('datatable-init'); json = $this.data('datatable-init');
......
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $datepickerRange = $('[data-datepicker-range]'), const $datepickerRange = $('[data-datepicker-range]'),
$datepicker = $('[data-datepicker]'); $datepicker = $('[data-datepicker]');
...@@ -19,7 +19,7 @@ jQuery(document).ready(function ($) { ...@@ -19,7 +19,7 @@ jQuery(document).ready(function ($) {
if ($datepickerRange.length > 0) { if ($datepickerRange.length > 0) {
$datepickerRange.each(function () { $datepickerRange.each(function () {
const datepickers = $datepickerRange.data('datepicker-range'); const datepickers = $(this).data('datepicker-range');
const $datepickerStart = $(datepickers[0].element), const $datepickerStart = $(datepickers[0].element),
$datepickerEnd = $(datepickers[1].element); $datepickerEnd = $(datepickers[1].element);
......
"use strict";jQuery(document).ready(function(a){var b=a("[data-datepicker-range]"),c=a("[data-datepicker]");a.fn.datetimepicker.Constructor.Default=a.extend({},a.fn.datetimepicker.Constructor.Default,{icons:{time:"fas fa-clock",date:"fas fa-calendar",up:"fas fa-arrow-up",down:"fas fa-arrow-down",previous:"fas fa-chevron-left",next:"fas fa-chevron-right",today:"fas fa-calendar-check-o",clear:"fas fa-trash",close:"fas fa-times"},format:"YYYY-MM-DD HH:mm"}),0<b.length&&b.each(function(){var c=b.data("datepicker-range"),d=a(c[0].element),f=a(c[1].element);d.datetimepicker(c[0]),f.datetimepicker(c[1]),d.on("change.datetimepicker",function(a){f.datetimepicker("minDate",a.date)}),f.on("change.datetimepicker",function(a){d.datetimepicker("maxDate",a.date)})}),0<c.length&&c.each(function(){a(this).datetimepicker(a(this).data("datepicker"))})}); "use strict";jQuery(document).ready(function(a){var b=a("[data-datepicker-range]"),c=a("[data-datepicker]");a.fn.datetimepicker.Constructor.Default=a.extend({},a.fn.datetimepicker.Constructor.Default,{icons:{time:"fas fa-clock",date:"fas fa-calendar",up:"fas fa-arrow-up",down:"fas fa-arrow-down",previous:"fas fa-chevron-left",next:"fas fa-chevron-right",today:"fas fa-calendar-check-o",clear:"fas fa-trash",close:"fas fa-times"},format:"YYYY-MM-DD HH:mm"}),0<b.length&&b.each(function(){var b=a(this).data("datepicker-range"),c=a(b[0].element),d=a(b[1].element);c.datetimepicker(b[0]),d.datetimepicker(b[1]),c.on("change.datetimepicker",function(a){d.datetimepicker("minDate",a.date)}),d.on("change.datetimepicker",function(a){c.datetimepicker("maxDate",a.date)})}),0<c.length&&c.each(function(){a(this).datetimepicker(a(this).data("datepicker"))})});
\ No newline at end of file \ No newline at end of file
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $window = $(window); const $window = $(window);
$window.on('hashchange', function () { $window.on('hashchange', function () {
......
...@@ -140,7 +140,7 @@ jQuery.fn.deleteMarkedResults = function (options) { ...@@ -140,7 +140,7 @@ jQuery.fn.deleteMarkedResults = function (options) {
return $this; return $this;
}; };
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $massActionCheckboxes = $('[data-mark-all-id]'); const $massActionCheckboxes = $('[data-mark-all-id]');
$massActionCheckboxes.each((index, element) => { $massActionCheckboxes.each((index, element) => {
......
/* global wysiwygCallback */ /* global wysiwygCallback */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
$('#page-break-form').find('.modal-footer button.btn-primary').click(function (e) { $('#page-break-form').find('.modal-footer button.btn-primary').click(function (e) {
e.preventDefault(); e.preventDefault();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (c) by the ACP3 Developers. * Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const ajaxUrl = $('#config-form').data('available-databases-url'), const ajaxUrl = $('#config-form').data('available-databases-url'),
$dbName = $('#db-name'), $dbName = $('#db-name'),
$formFields = $('#db-host, #db-user, #db-password'); $formFields = $('#db-host, #db-user, #db-password');
......
...@@ -170,8 +170,8 @@ ...@@ -170,8 +170,8 @@
</div> </div>
</form> </form>
{javascripts} {javascripts}
<script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/ajax-form.js"></script> <script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/partials/ajax-form.min.js"></script>
<script defer src="{$INSTALLER_ROOT_DIR}Installer/Modules/Install/Resources/Assets/js/available_databases.js"></script> <script defer src="{$INSTALLER_ROOT_DIR}Installer/Modules/Install/Resources/Assets/js/available_databases.min.js"></script>
{/javascripts} {/javascripts}
{/if} {/if}
{/block} {/block}
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
</div> </div>
</form> </form>
{javascripts} {javascripts}
<script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/ajax-form.js"></script> <script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/partials/ajax-form.min.js"></script>
{/javascripts} {/javascripts}
{/block} {/block}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details. * See the LICENSE file at the top-level module directory for licencing details.
*/ */
jQuery(document).ready(function ($) { jQuery(document).ready(($) => {
const $doc = $(document), const $doc = $(document),
$languages = $('#languages'); $languages = $('#languages');
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</div> </div>
<script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/jquery.min.js"></script> <script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/jquery.min.js"></script>
<script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/bootstrap.min.js"></script> <script defer src="{$ROOT_DIR}ACP3/Modules/ACP3/System/Resources/Assets/js/bootstrap.min.js"></script>
<script defer src="{$DESIGN_PATH}Assets/js/language-switcher.js"></script> <script defer src="{$DESIGN_PATH}Assets/js/language-switcher.min.js"></script>
<!-- JAVASCRIPTS --> <!-- JAVASCRIPTS -->
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment