You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
'use strict';
|
|
|
|
|
|
define('admin/settings/general', ['admin/settings'], function () {
|
|
const Module = {};
|
|
|
|
Module.init = function () {
|
|
$('button[data-action="removeLogo"]').on('click', function () {
|
|
$('input[data-field="brand:logo"]').val('');
|
|
});
|
|
$('button[data-action="removeFavicon"]').on('click', function () {
|
|
$('input[data-field="brand:favicon"]').val('');
|
|
});
|
|
$('button[data-action="removeTouchIcon"]').on('click', function () {
|
|
$('input[data-field="brand:touchIcon"]').val('');
|
|
});
|
|
$('button[data-action="removeMaskableIcon"]').on('click', function () {
|
|
$('input[data-field="brand:maskableIcon"]').val('');
|
|
});
|
|
$('button[data-action="removeOgImage"]').on('click', function () {
|
|
$('input[data-field="og:image"]').val('');
|
|
});
|
|
|
|
$('[data-field="homePageRoute"]').on('change', toggleCustomRoute);
|
|
|
|
toggleCustomRoute();
|
|
};
|
|
|
|
function toggleCustomRoute() {
|
|
if ($('[data-field="homePageRoute"]').val() === 'custom') {
|
|
$('#homePageCustom').show();
|
|
} else {
|
|
$('#homePageCustom').hide();
|
|
}
|
|
}
|
|
|
|
return Module;
|
|
});
|