| 1 |
|
| 2 |
jQuery(document).ready(function($) { |
| 3 |
|
| 4 |
language(); |
| 5 |
usersroles(); |
| 6 |
showchange(); |
| 7 |
|
| 8 |
}); |
| 9 |
function showchange(){ |
| 10 |
var show = jQuery('[name="param[show]"]').val(); |
| 11 |
if (show == 'posts' || show == 'pages' || show == 'expost' || show == 'expage'|| show == 'taxonomy'){ |
| 12 |
jQuery('#id_post').css('display', ''); |
| 13 |
jQuery('#shortcode').css('display', 'none'); |
| 14 |
} |
| 15 |
else if (show == 'shortecode'){ |
| 16 |
jQuery('#shortcode').css('display', ''); |
| 17 |
jQuery('#id_post').css('display', 'none'); |
| 18 |
} |
| 19 |
else { |
| 20 |
jQuery('#shortcode').css('display', 'none'); |
| 21 |
jQuery('#id_post').css('display', 'none'); |
| 22 |
} |
| 23 |
if (show == 'taxonomy'){ |
| 24 |
jQuery('#taxonomy').css('display', ''); |
| 25 |
} |
| 26 |
else{ |
| 27 |
jQuery('#taxonomy').css('display', 'none'); |
| 28 |
} |
| 29 |
} |
| 30 |
function language(){ |
| 31 |
if (jQuery('[name="param[depending_language]"]').is(':checked')){ |
| 32 |
jQuery('#language').css('display', ''); |
| 33 |
} |
| 34 |
else { |
| 35 |
jQuery('#language').css('display', 'none'); |
| 36 |
} |
| 37 |
} |
| 38 |
|
| 39 |
function usersroles(){ |
| 40 |
var users = jQuery('input[name="param[item_user]"]:checked').val(); |
| 41 |
if (users == 2){ |
| 42 |
jQuery('#users_roles').css('display', ''); |
| 43 |
} |
| 44 |
else{ |
| 45 |
jQuery('#users_roles').css('display', 'none'); |
| 46 |
} |
| 47 |
|
| 48 |
} |
| 49 |
|
| 50 |
function itemadd(menu){ |
| 51 |
|
| 52 |
var item = '<div class="wow-admin-col include-file"> <div class="wow-admin-col-3"> Type of file:<br/> <select name="param[include][]"> <option>css</option> <option>js</option> </select> </div> <div class="wow-admin-col-6"> URL to file:<br/> <input type="text" value="" name="param[include_file][]" > </div> </div>'; |
| 53 |
jQuery(item).appendTo("#include_file"); |
| 54 |
|
| 55 |
} |
| 56 |
function itemremove(menu){ |
| 57 |
jQuery("div.include-file").last().remove(); |
| 58 |
} |