ZwiiCMS/core/module/theme/view/fontAdd/fontAdd.js.php

45 lines
1.4 KiB
PHP
Raw Normal View History

2022-02-10 09:10:21 +01:00
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/**
* Option par défaut du sélecteur de mode
*/
$(document).ready(function(){
$('input[name=fontAddFontImported]').prop('checked', true);
2022-03-11 11:12:16 +01:00
$('input[name=fontAddFontUrl]').prop('checked', false);
2022-03-11 15:56:06 +01:00
$('#containerFontAddFile').hide();
2022-02-10 09:10:21 +01:00
});
/**
* Mode téléchargement en ligne de la fonte ou installation locale
*/
$("input[name=fontAddFontImported]").on("click", function() {
if( $('input[name=fontAddFontImported]').is(':checked') ){
$('input[name=fontAddFontFile]').prop('checked', false);
} else {
$('input[name=fontAddFontFile]').prop('checked', true);
}
2022-03-11 11:12:16 +01:00
$('#containerFontAddFile').hide();
$('#containerFontAddUrl').show();
2022-02-10 09:10:21 +01:00
});
$("input[name=fontAddFontFile]").on("click", function() {
if( $('input[name=fontAddFontFile]').is(':checked') ){
$('input[name=fontAddFontImported]').prop('checked', false);
} else {
$('input[name=fontAddFontImported]').prop('checked', true);
}
2022-03-11 11:12:16 +01:00
$('#containerFontAddFile').show();
$('#containerFontAddUrl').hide();
2022-02-10 09:10:21 +01:00
});