PluginProbe ʕ •ᴥ•ʔ
WP Create Multiple Posts & Pages / trunk
WP Create Multiple Posts & Pages vtrunk
trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
wp-create-multiple-posts-pages / assets / js / script.js
wp-create-multiple-posts-pages / assets / js Last commit date
bootstrap.min.js 8 years ago linedtextarea.js 8 years ago popper.min.js 8 years ago script.js 8 years ago select2.min.js 8 years ago
script.js
33 lines
1 jQuery(document).ready(function($) {
2
3 $(".new_line_number").linedtextarea({
4 selectedLine: 1
5 });
6
7 $("#wpcmp_new_post_category").select2();
8
9 $("#wpcmp_new_post_type").change(function(event) {
10 if ($(this).val() !== 'post') {
11 $("#wpcmp_new_post_category").prop('disabled', 'disabled');
12 }else{
13 $("#wpcmp_new_post_category").removeAttr('disabled');
14 }
15 });
16
17 $("#wpcmp_posts_titles").keyup(function(event) {
18 if ($(this).val() == '') {
19 $("#wpcmp_new_post_type").prop('disabled', 'disabled');
20 $("#wpcmp_new_post_status").prop('disabled', 'disabled');
21 $("#wpcmp_new_post_author").prop('disabled', 'disabled');
22 $("#wpcmp_new_post_category").prop('disabled', 'disabled');
23 $("#wpcmp_submit_for_create_posts").prop('disabled', 'disabled');
24 }else{
25 $("#wpcmp_new_post_type").removeAttr('disabled');
26 $("#wpcmp_new_post_status").removeAttr('disabled');
27 $("#wpcmp_new_post_author").removeAttr('disabled');
28 $("#wpcmp_new_post_category").removeAttr('disabled');
29 $("#wpcmp_submit_for_create_posts").removeAttr('disabled');
30 }
31 });
32
33 });