| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | jQuery(document).ready(function(jQuery) { |
| 2 | 2 | isc_thumbnail_input_checkstate(); |
| 3 | + isc_caption_checkstate(); | |
| 4 | + jQuery('#source-on-image').click(function(){isc_caption_checkstate()}); | |
| 3 | 5 | jQuery('#use_authorname').click(function(){ |
| 4 | 6 | if ('disabled' == jQuery('#byauthor').attr('disabled')) { |
| 5 | 7 | jQuery('#byauthor').removeAttr('disabled'); |
| 6 | 8 | } else { |
| @@ -19,11 +21,20 @@ | ||
| 19 | 21 | }); |
| 20 | 22 | |
| 21 | 23 | function isc_thumbnail_input_checkstate(){ |
| 22 | 24 | if ('custom' == jQuery('#thumbnail-size-select').val()) { |
| 23 | - jQuery('#custom-width').removeAttr('disabled').css('background-color', 'inherit'); | |
| 24 | - jQuery('#custom-height').removeAttr('disabled').css('background-color', 'inherit'); | |
| 25 | + jQuery('#custom-width').removeAttr('disabled').css('background-color', '#fff'); | |
| 26 | + jQuery('#custom-height').removeAttr('disabled').css('background-color', '#fff'); | |
| 25 | 27 | } else { |
| 26 | 28 | jQuery('#custom-width').attr('disabled', 'disabled').css('background-color', '#eee'); |
| 27 | 29 | jQuery('#custom-height').attr('disabled', 'disabled').css('background-color', '#eee'); |
| 30 | + } | |
| 31 | +} | |
| 32 | + | |
| 33 | +function isc_caption_checkstate() { | |
| 34 | + if (false == jQuery('#source-on-image').prop('checked')) { | |
| 35 | + jQuery('#source-pretext').attr('disabled', 'disabled').css('background-color', '#eee'); | |
| 36 | + } else { | |
| 37 | + jQuery('#source-pretext').removeAttr('disabled'); | |
| 38 | + jQuery('#source-pretext').css('background-color', '#fff'); | |
| 28 | 39 | } |
| 29 | 40 | } |