Changeset 9274
- Timestamp:
- Feb 18, 2011, 3:55:46 PM (14 years ago)
- Location:
- extensions/AdditionalPages/admin
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdditionalPages/admin/template/add_page.tpl
r9273 r9274 1 { literal}1 {html_head}{literal} 2 2 <script type="text/javascript"> 3 3 function GereChkbox(conteneur, a_faire) { … … 13 13 } 14 14 } 15 16 jQuery().ready( function () { 17 jQuery('#title').focusout(function () { 18 if (jQuery('#permalink').val() == '' && auto_permalink) 19 jQuery.post("plugins/AdditionalPages/admin/ajax.php", { str: this.value }, function(data) { 20 jQuery('#permalink').val(data); 21 auto_permalink = false; 22 }); 23 }); 24 }); 25 26 var auto_permalink = true; 15 27 </script> 16 {/literal} 28 {/literal}{/html_head} 17 29 18 30 <div class="titrePage"> … … 95 107 </tr> 96 108 </table> 97 98 109 </form> -
extensions/AdditionalPages/admin/template/config.tpl
r9273 r9274 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 1 29 <div class="titrePage"> 2 30 <h2>Additional Pages - {'Configuration'|@translate}</h2> … … 40 68 </li> 41 69 42 <li id="menu_name" style="display:none;">70 <li id="menu_name" {if !isset($SHOW_MENU)}style="display:none;{/if}"> 43 71 <span class="property">{'ap_menu_name'|@translate} : 44 72 <select name="lang_desc_select" style="margin-left:30px;"> … … 48 76 </select> 49 77 {foreach from=$language item=lang} 50 <input type="text" size="50" name="menu_lang[{$lang.LANGUAGE_CODE}]" id="menu_lang_{$lang.LANGUAGE_CODE}" value="{$lang.VALUE}" style=" display:none;margin-left:10px;">78 <input type="text" size="50" name="menu_lang[{$lang.LANGUAGE_CODE}]" id="menu_lang_{$lang.LANGUAGE_CODE}" value="{$lang.VALUE}" style="{if $lang.LANGUAGE_CODE != 'default'}display:none; {/if}margin-left:10px;"> 51 79 {/foreach} 52 80 </span> … … 56 84 <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p> 57 85 </form> 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>
Note: See TracChangeset
for help on using the changeset viewer.