fix js warning

This commit is contained in:
Jean-Christian Denis 2023-04-24 23:29:08 +02:00
parent 4a191db4eb
commit 5ca7695494
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -1,23 +1,15 @@
/* -- BEGIN LICENSE BLOCK ---------------------------------- /*global $, dotclear, datePicker */
* 'use strict';
* This file is part of postExpired, a plugin for Dotclear 2.
*
* Copyright (c) 2009-2013 Jean-Christian Denis and contributors
* contact@jcdenis.fr http://jcd.lv
*
* Licensed under the GPL version 2.0 license.
* A copy of this license is available in LICENSE file or at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* -- END LICENSE BLOCK ------------------------------------*/
$(function(){ $(() => {
if (typeof datePicker === 'function') {
var post_pe_field=document.getElementById('post_expired_date'); var post_pe_field=document.getElementById('post_expired_date');
if(post_pe_field!=undefined){ if(post_pe_field!=undefined){
var post_pe_dtPick=new datePicker(post_pe_field); var post_pe_dtPick=new datePicker(post_pe_field);
post_pe_dtPick.img_top='1.5em'; post_pe_dtPick.img_top='1.5em';
post_pe_dtPick.draw(); post_pe_dtPick.draw();
} }
}
$('#post_expired h4').toggleWithLegend( $('#post_expired h4').toggleWithLegend(
$('#post_expired').children().not('h4'), $('#post_expired').children().not('h4'),
{cookie:'dcx_postexpired_admin_form_sidebar',legend_click:true} {cookie:'dcx_postexpired_admin_form_sidebar',legend_click:true}