mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-08-06 10:24:17 +00:00
21 lines
551 B
JavaScript
21 lines
551 B
JavaScript
jQuery(function(){
|
|
'use strict';
|
|
|
|
jQuery('input.struct_date').datepicker({
|
|
dateFormat: 'yy-mm-dd'
|
|
});
|
|
|
|
/**
|
|
* Duplicate the elements in .newtemplate whenever any input in it changes
|
|
*/
|
|
jQuery('#dw__editform').find('.struct .newtemplate').each(function(){
|
|
var $tplwrapper = jQuery(this);
|
|
var tpl = $tplwrapper.html();
|
|
$tplwrapper.on('change', 'input,textarea,select', function(){
|
|
if(jQuery(this).val() == '') return;
|
|
$tplwrapper.append(tpl);
|
|
});
|
|
});
|
|
|
|
});
|