| | 1 | {html_head} |
| | 2 | <script type="text/javascript"> |
| | 3 | jQuery().ready( function () {ldelim} |
| | 4 | jQuery("#show_menu").click( function() {ldelim} |
| | 5 | if (this.checked) {ldelim} |
| | 6 | jQuery('#menu_name').show(); |
| | 7 | } |
| | 8 | else {ldelim} |
| | 9 | jQuery('#menu_name').hide(); |
| | 10 | } |
| | 11 | }); |
| | 12 | jQuery('select[name="lang_desc_select"]').change(function () {ldelim} |
| | 13 | jQuery('[id^="menu_lang"]').hide(); |
| | 14 | jQuery("#menu_lang_"+this.options[this.selectedIndex].value).show(); |
| | 15 | }); |
| | 16 | jQuery('[id^="menu_lang_"]').keyup(function () {ldelim} |
| | 17 | arr = jQuery(this).attr("id").split("menu_lang_"); |
| | 18 | id = arr[1]; |
| | 19 | opt = jQuery('select[name="lang_desc_select"] option[id="opt_'+id+'"]'); |
| | 20 | if (this.value != '') |
| | 21 | opt.html(opt.html().replace("\u2718", "\u2714")); |
| | 22 | else |
| | 23 | opt.html(opt.html().replace("\u2714", "\u2718")); |
| | 24 | }); |
| | 25 | }); |
| | 26 | </script> |
| | 27 | {/html_head} |
| | 28 | |
| 58 | | |
| 59 | | <script type="text/javascript"> |
| 60 | | var languages = new Array(); |
| 61 | | var filled = new Array; |
| 62 | | {foreach from=$language item=lang} |
| 63 | | languages["{$lang.LANGUAGE_CODE}"] = "{$lang.LANGUAGE_NAME}"; |
| 64 | | if ($('input[id=menu_lang_{$lang.LANGUAGE_CODE}]').val() != '') |
| 65 | | filled.push("{$lang.LANGUAGE_CODE}"); |
| 66 | | {/foreach} |
| 67 | | |
| 68 | | jQuery().ready( function () {ldelim} |
| 69 | | jQuery("#show_menu").click( function() {ldelim} |
| 70 | | if (this.checked) {ldelim} |
| 71 | | jQuery('#menu_name').show(); |
| 72 | | } |
| 73 | | else {ldelim} |
| 74 | | jQuery('#menu_name').hide(); |
| 75 | | } |
| 76 | | }); |
| 77 | | $('select[name="lang_desc_select"]').change(function () {ldelim} |
| 78 | | $('[id^="menu_lang"]').hide(); |
| 79 | | $("#menu_lang_"+this.options[this.selectedIndex].value).show(); |
| 80 | | }); |
| 81 | | $('[id^="menu_lang_"]').keyup(function () {ldelim} |
| 82 | | arr = $(this).attr("id").split("menu_lang_"); |
| 83 | | id = arr[1]; |
| 84 | | opt = $('select[name="lang_desc_select"] option[id="opt_'+id+'"]'); |
| 85 | | if (this.value != '') {ldelim} |
| 86 | | opt.html(opt.html().replace("\u2718", "\u2714")); |
| 87 | | add = true; |
| 88 | | for (i in filled) {ldelim} |
| 89 | | if (filled[i] == id) add = false; |
| 90 | | } |
| 91 | | if (add) {ldelim} |
| 92 | | filled.push(id); |
| 93 | | } |
| 94 | | } |
| 95 | | else {ldelim} |
| 96 | | for (i in filled) {ldelim} |
| 97 | | if (filled[i] == id) filled.splice(i, 1); |
| 98 | | } |
| 99 | | opt.html(opt.html().replace("\u2714", "\u2718")); |
| 100 | | } |
| 101 | | }); |
| 102 | | }); |
| 103 | | |
| 104 | | jQuery('#menu_lang_default').show(); |
| 105 | | if (jQuery("input[name='show_menu']").attr('checked')) {ldelim} |
| 106 | | jQuery('#menu_name').show(); |
| 107 | | } |
| 108 | | </script> |