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 | }); |