| 1 |
/* ========= INFORMATION ============================ |
| 2 |
- author: Dmytro Lobov |
| 3 |
- url: https://wow-estore.com |
| 4 |
- email: givememoney1982@gmail.com |
| 5 |
==================================================== */ |
| 6 |
|
| 7 |
'use strict'; |
| 8 |
|
| 9 |
jQuery(document).ready(function($) { |
| 10 |
language(); |
| 11 |
usersroles(); |
| 12 |
showchange(); |
| 13 |
}); |
| 14 |
|
| 15 |
function showchange(){ |
| 16 |
var show = jQuery('[name="param[show]"]').val(); |
| 17 |
if (show == 'posts' || show == 'pages' || show == 'expost' || show == 'expage'|| show == 'taxonomy'){ |
| 18 |
jQuery('#wow_id_post').css('display', ''); |
| 19 |
jQuery('#wow-shortcode').css('display', 'none'); |
| 20 |
} |
| 21 |
else if (show == 'shortecode'){ |
| 22 |
jQuery('#wow-shortcode').css('display', ''); |
| 23 |
jQuery('#wow_id_post').css('display', 'none'); |
| 24 |
} |
| 25 |
else { |
| 26 |
jQuery('#wow-shortcode').css('display', 'none'); |
| 27 |
jQuery('#wow_id_post').css('display', 'none'); |
| 28 |
} |
| 29 |
if (show == 'taxonomy'){ |
| 30 |
jQuery('#wow_taxonomy').css('display', ''); |
| 31 |
} |
| 32 |
else{ |
| 33 |
jQuery('#wow_taxonomy').css('display', 'none'); |
| 34 |
} |
| 35 |
} |
| 36 |
function language(){ |
| 37 |
if (jQuery('#wow_depending_language').is(':checked')){ |
| 38 |
jQuery('#wow_language').css('display', ''); |
| 39 |
} |
| 40 |
else { |
| 41 |
jQuery('#wow_language').css('display', 'none'); |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
function usersroles(){ |
| 46 |
var users = jQuery('input[name="param[item_user]"]:checked').val(); |
| 47 |
if (users == 2){ |
| 48 |
jQuery('#wow_users_roles').css('display', ''); |
| 49 |
} |
| 50 |
else{ |
| 51 |
jQuery('#wow_users_roles').css('display', 'none'); |
| 52 |
} |
| 53 |
|
| 54 |
} |
| 55 |
|
| 56 |
function itemadd(menu){ |
| 57 |
|
| 58 |
var item = '<div class="wow-container include-file"> <div class="wow-element"> Type of file:<br/> <select name="param[include][]"> <option>css</option> <option>js</option> </select> </div> <div class="wow-element"> URL to file:<br/> <input type="text" value="" name="param[include_file][]" > </div> </div>'; |
| 59 |
jQuery(item).appendTo("#include_file"); |
| 60 |
|
| 61 |
} |
| 62 |
function itemremove(menu){ |
| 63 |
jQuery("div.include-file").last().remove(); |
| 64 |
} |