Changeset 8962 for extensions/AMenuManager/admin
- Timestamp:
- Jan 28, 2011, 5:10:45 PM (14 years ago)
- Location:
- extensions/AMenuManager/admin
- Files:
-
- 8 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMenuManager/admin/amm_admin.tpl
r5421 r8962 1 1 <h2 style="float:right;top:-24px;position:relative;height:auto;font-size:12px;font-weight:normal;">{$plugin.AMM_VERSION}</h2> 2 2 3 <div style="position:relative;top:-24px;clear:right;">4 {if isset($page _nfo)}5 <p>{$page _nfo}</p>3 <div class='helps'> 4 {if isset($pageNfo)} 5 <p>{$pageNfo}</p> 6 6 {/if} 7 </div> 8 9 <div id='iBDProcessing' style="display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:#000000;opacity:0.75;z-index:800;"> 10 <img src="plugins/GrumPluginClasses/icons/processing.gif" style="margin-top:20%;"> 11 </div> 12 13 <div id='iConfigState' style='display:none;'> 7 14 </div> 8 15 -
extensions/AMenuManager/admin/amm_linksconfig.tpl
r3681 r8962 1 1 {literal} 2 2 <script type="text/javascript"> 3 var ulc; 3 4 4 //global var ; need to not have to initialize them every time a value is changed 5 var objlang; 6 var objnames = new Array('iamm_links_title'); 7 var objinput = new Array(); //input text from form => objinput[name] 8 var objhidden = new Array(); //input hidden from form => objhidden[name][lang] 9 10 function init() 11 { 12 objlang = document.getElementById('islang'); 13 for(i=0;i<objnames.length;i++) 5 $(window).load( 6 function () 14 7 { 15 objinput[i] = document.getElementById(objnames[i]); 16 objhidden[i] = new Array(); 17 for(j=0;j<objlang.options.length;j++) 18 { 19 objhidden[i][j] = document.getElementById(objnames[i]+'_'+objlang.options[j].value); 20 } 8 ulc=new userLinksConfig( 9 {}, {}, 10 '{/literal}{$token}{literal}', 11 { 12 'showIcons':'{/literal}{$datas.config.showIcons}{literal}', 13 'userLang':'{/literal}{$datas.selectedLang}{literal}', 14 'titles': 15 { 16 {/literal} 17 {foreach from=$datas.config.titles name=items key=langCode item=title} 18 "{$langCode}":"{$title}"{if !$smarty.foreach.items.last},{/if} 19 {/foreach} 20 {literal} 21 }, 22 'langs':[ 23 {/literal} 24 {foreach from=$datas.config.titles name=items key=langCode item=title} 25 "{$langCode}"{if !$smarty.foreach.items.last},{/if} 26 {/foreach} 27 {literal} 28 ] 29 } 30 ); 21 31 } 22 } 23 24 function change_lang() 25 { 26 for(i=0;i<objnames.length;i++) 27 { 28 objinput[i].value = objhidden[i][objlang.options.selectedIndex].value; 29 } 30 } 31 32 function apply_changes(input_id) 33 { 34 var obj=document.getElementById(input_id); 35 objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value; 36 } 37 38 function do_translation() 39 { 40 var inputid = document.getElementById('iamm_links_title'); 41 var tolang = objlang.options[objlang.options.selectedIndex].value.substr(0,2); 42 43 google_translate(inputid.value, '{/literal}{$datas.fromlang}{literal}', tolang, inputid, 'value', apply_changes, inputid.id); 44 } 45 46 32 ); 47 33 </script> 48 34 {/literal} 49 35 36 <form method="post" action="" class="general"> 50 37 51 52 <h3><span style="font-weight:normal"><a href="{$datas.lnk_list}" title="{'g002_configlinks'|@translate}">{'g002_linkslist'|@translate} </span></a> / {'g002_configlinks'|@translate}53 </h3>54 55 56 <form method="post" action="" class="general">57 38 <fieldset> 58 39 <legend>{'g002_setting_block_menu'|@translate}</legend> 59 60 {if isset($datas.language_list) and count($datas.language_list)}61 {foreach from=$datas.language_list key=name item=language_row}62 <input type="hidden" name="famm_links_title_{$language_row.LANG}"63 id="iamm_links_title_{$language_row.LANG}" value="{$language_row.MENUBARTIT}">64 {/foreach}65 {/if}66 40 67 41 <table class="formtable"> … … 69 43 <td>{'g002_setting_block_title'|@translate}</td> 70 44 <td> 71 <input type="text" id="iamm_links_title" value="" maxlength="50" onkeyup="apply_changes('iamm_links_title');" onblur="apply_changes('iamm_links_title');"/> 72 <select onchange="change_lang();" id="islang"> 73 {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected} 74 </select><br> 45 <div id="iamm_links_title"></div> 46 <div id="islang"> 47 [ 48 {foreach from=$datas.langs key=langCode item=langLabel name=items} 49 {ldelim}"value":"{$langCode}","cols":["{$langLabel}"]{rdelim}{if !$smarty.foreach.items.last},{/if} 50 {/foreach} 51 ] 52 </div> 75 53 </td> 76 54 </tr> … … 78 56 <td></td> 79 57 <td style="font-size:80%;"> 80 <a style="cursor:pointer;" onclick=" do_translation()">{'g002_translate'|@translate}</a>58 <a style="cursor:pointer;" onclick="$('#iamm_links_title').inputText('doTranslation');">{'g002_translate'|@translate}</a> 81 59 </td> 82 60 </tr> 83 61 84 62 </table> 85 86 87 63 </fieldset> 88 64 … … 93 69 <td>{'g002_setting_link_show_icon'|@translate}</td> 94 70 <td> 95 <select name="famm_links_show_icons" id="iamm_links_show_icons"> 96 {html_options values=$datas.yesno_values output=$datas.yesno_labels selected=$datas.show_icons_selected} 97 </select> 71 <div id='iamm_links_show_icons'> 72 <label><input type="radio" value="y"> {'g002_yesno_y'|@translate}<br></label> 73 <label><input type="radio" value="n"> {'g002_yesno_n'|@translate}</label> 74 </div> 98 75 </td> 99 76 </tr> … … 102 79 103 80 <p> 104 <input type=" submit" name="famm_submit_apply" id="iamm_submit_apply" value="{'g002_apply'|@translate}">81 <input type="button" id="iamm_submit_apply" value="{'g002_apply'|@translate}" onclick="ulc.submit();"> 105 82 </p> 106 107 <input type="hidden" name="famm_modeedit" value="config">108 83 109 84 </form> 110 85 111 <script type="text/javascript">112 init();113 change_lang();114 </script> -
extensions/AMenuManager/admin/amm_randompicconfig.tpl
r5545 r8962 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}2 {known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"}3 4 1 {literal} 5 2 <style> 6 3 .ui-slider { 7 width:3 50px;4 width:360px; 8 5 height:10px; 9 6 border-width:1px; … … 22 19 } 23 20 </style> 21 24 22 <script type="text/javascript"> 23 var rpc; 25 24 26 //global var ; need to not have to initialize them every time a value is changed 27 var objlang; 28 var objnames = new Array('iamm_randompicture_title'); 29 var objinput = new Array(); //input text from form => objinput[name] 30 var objhidden = new Array(); //input hidden from form => objhidden[name][lang] 31 32 function init() 33 { 34 objlang = document.getElementById('islang'); 35 for(i=0;i<objnames.length;i++) 25 $(window).load( 26 function () 36 27 { 37 objinput[i] = document.getElementById(objnames[i]); 38 objhidden[i] = new Array(); 39 for(j=0;j<objlang.options.length;j++) 40 { 41 objhidden[i][j] = document.getElementById(objnames[i]+'_'+objlang.options[j].value); 42 } 28 rpc=new randomPictConfig( 29 {}, 30 { 31 g002_setting_randompic_periodicchange_deactivated:"{/literal}{'g002_setting_randompic_periodicchange_deactivated'|@translate}{literal}", 32 g002_setting_randompic_height_auto:"{/literal}{'g002_setting_randompic_height_auto'|@translate}{literal}" 33 }, 34 '{/literal}{$token}{literal}', 35 { 36 'selectMode':"{/literal}{$datas.config.selectMode}{literal}", 37 'selectCat':{/literal}{$datas.config.selectCat}{literal}, 38 'infosName':"{/literal}{$datas.config.infosName}{literal}", 39 'infosComment':"{/literal}{$datas.config.infosComment}{literal}", 40 'freqDelay':"{/literal}{$datas.config.freqDelay}{literal}", 41 'blockHeight':"{/literal}{$datas.config.blockHeight}{literal}", 42 'blockTitles': 43 { 44 {/literal} 45 {foreach from=$datas.config.blockTitles name=items key=langCode item=title} 46 "{$langCode}":"{$title}"{if !$smarty.foreach.items.last},{/if} 47 {/foreach} 48 {literal} 49 }, 50 'userLang':'{/literal}{$datas.selectedLang}{literal}', 51 'langs':[ 52 {/literal} 53 {foreach from=$datas.config.blockTitles name=items key=langCode item=title} 54 "{$langCode}"{if !$smarty.foreach.items.last},{/if} 55 {/foreach} 56 {literal} 57 ] 58 } 59 ); 43 60 } 44 45 formatDelay({/literal}{$datas.periodic_change}{literal}); 46 $("#iamm_rp_pc_slider").slider( 47 { 48 min:0, 49 max:60000, 50 steps:120, 51 value:{/literal}{$datas.periodic_change}{literal}, 52 slide: function(event, ui) { formatDelay(ui.value); } 53 }); 54 $("#iamm_rp_pc_slider a").addClass('gcBgInput'); 55 56 formatHeight({/literal}{$datas.height}{literal}); 57 $("#iamm_rp_height_slider").slider( 58 { 59 min:99, 60 max:300, 61 steps:201, 62 value:affectHeight({/literal}{$datas.height}{literal}), 63 slide: function(event, ui) { formatHeight(ui.value); } 64 }); 65 $("#iamm_rp_height_slider a").addClass('gcBgInput'); 66 } 67 68 function formatDelay(delay) 69 { 70 $("#iamm_randompicture_periodicchange").val(delay); 71 if(delay==0) 72 { 73 $("#iamm_rp_pc_display").html("{/literal}{'g002_setting_randompic_periodicchange_deactivated'|@translate}{literal}"); 74 } 75 else 76 { 77 $("#iamm_rp_pc_display").html((delay/1000).toFixed(2)+"s"); 78 } 79 } 80 81 function formatHeight(height) 82 { 83 (height==99)?vheight=0:vheight=height; 84 85 $("#iamm_randompicture_height").val(vheight); 86 if(vheight==0) 87 { 88 $("#iamm_rp_height_display").html("{/literal}{'g002_setting_randompic_height_auto'|@translate}{literal}"); 89 } 90 else 91 { 92 $("#iamm_rp_height_display").html(vheight+"px"); 93 } 94 } 95 96 function affectHeight(height) 97 { 98 if(height==0) 99 {return(0);}else{return(height);} 100 } 101 102 function change_lang() 103 { 104 for(i=0;i<objnames.length;i++) 105 { 106 objinput[i].value = objhidden[i][objlang.options.selectedIndex].value; 107 } 108 } 109 110 function apply_changes(input_id) 111 { 112 var obj=document.getElementById(input_id); 113 objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value; 114 } 115 116 function do_translation() 117 { 118 var inputid = document.getElementById('iamm_randompicture_title'); 119 var tolang = objlang.options[objlang.options.selectedIndex].value.substr(0,2); 120 121 google_translate(inputid.value, '{/literal}{$datas.fromlang}{literal}', tolang, inputid, 'value', apply_changes, inputid.id); 122 123 } 124 61 ); 125 62 126 63 </script> 127 64 {/literal} 128 65 66 <div id='iBDProcessing' style="display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:#000000;opacity:0.75;z-index:800;"> 67 <img src="plugins/GrumPluginClasses/icons/processing.gif" style="margin-top:20%;"> 68 </div> 129 69 130 131 <h3>{'g002_configrandompic'|@translate}</h3> 132 70 <div id='iConfigState' style='display:none;'> 71 </div> 133 72 134 73 <form method="post" action="" class="general"> … … 136 75 <legend>{'g002_setting_block_menu'|@translate}</legend> 137 76 138 {if isset($datas.language_list) and count($datas.language_list)}139 {foreach from=$datas.language_list key=name item=language_row}140 <input type="hidden" name="famm_randompicture_title_{$language_row.LANG}"141 id="iamm_randompicture_title_{$language_row.LANG}" value="{$language_row.MENUBARTIT}">142 {/foreach}143 {/if}144 145 77 <table class="formtable"> 146 78 <tr> 147 79 <td>{'g002_setting_block_title'|@translate}</td> 148 80 <td colspan="2"> 149 <input type="text" id="iamm_randompicture_title" value="" maxlength="50" onkeyup="apply_changes('iamm_randompicture_title');" onblur="apply_changes('iamm_randompicture_title');"/> 150 <select onchange="change_lang();" id="islang"> 151 {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected} 152 </select><br> 81 <div id="iamm_randompicture_title"></div> 82 83 <div id="islang"> 84 [ 85 {foreach from=$datas.langs key=langCode item=langLabel name=items} 86 {ldelim}"value":"{$langCode}","cols":["{$langLabel}"]{rdelim}{if !$smarty.foreach.items.last},{/if} 87 {/foreach} 88 ] 89 </div> 153 90 </td> 154 91 </tr> 92 155 93 <tr> 156 94 <td></td> 157 95 <td style="font-size:80%;" colspan="2"> 158 <a style="cursor:pointer;" onclick=" do_translation()">{'g002_translate'|@translate}</a>96 <a style="cursor:pointer;" onclick="$('#iamm_randompicture_title').inputText('doTranslation');">{'g002_translate'|@translate}</a> 159 97 </td> 160 98 </tr> … … 163 101 <td>{'g002_setting_randompic_height'|@translate}</td> 164 102 <td> 165 <input type="hidden" name="famm_randompicture_height" id="iamm_randompicture_height" value="{$datas.height}">166 103 <div id="iamm_rp_height_slider" class="gcBgInput gcBorderInput"></div> 167 104 </td> … … 178 115 <fieldset> 179 116 <legend>{'g002_setting_randompic_aboutpicture'|@translate}</legend> 180 <table class="form class">117 <table class="formtable"> 181 118 <tr> 182 119 <td>{'g002_setting_randompic_showname'|@translate}</td> 183 120 <td> 184 <select name="famm_randompicture_showname" id="iamm_randompicture_showname"> 185 {html_options values=$datas.show_values output=$datas.show_labels selected=$datas.showname_selected} 186 </select> 121 <div id="iamm_randompicture_showname"> 122 [ 123 {ldelim}"value":"n","cols":["{'g002_show_n'|@translate}"]{rdelim}, 124 {ldelim}"value":"o","cols":["{'g002_show_o'|@translate}"]{rdelim}, 125 {ldelim}"value":"u","cols":["{'g002_show_u'|@translate}"]{rdelim} 126 ] 127 </div> 187 128 </td> 188 129 </tr> … … 191 132 <td>{'g002_setting_randompic_showcomment'|@translate}</td> 192 133 <td> 193 <select name="famm_randompicture_showcomment" id="iamm_randompicture_showcomment"> 194 {html_options values=$datas.show_values output=$datas.show_labels selected=$datas.showcomment_selected} 195 </select> 134 <div id="iamm_randompicture_showcomment"> 135 [ 136 {ldelim}"value":"n","cols":["{'g002_show_n'|@translate}"]{rdelim}, 137 {ldelim}"value":"o","cols":["{'g002_show_o'|@translate}"]{rdelim}, 138 {ldelim}"value":"u","cols":["{'g002_show_u'|@translate}"]{rdelim} 139 ] 140 </div> 196 141 </td> 197 142 </tr> … … 203 148 <fieldset> 204 149 <legend>{'g002_setting_randompic_periodicchange'|@translate}</legend> 205 <table class="form class">150 <table class="formtable"> 206 151 <tr> 207 152 <td>{'g002_setting_randompic_periodicchange_delay'|@translate}</td> 208 153 <td> 209 <input type="hidden" name="famm_randompicture_periodicchange" id="iamm_randompicture_periodicchange" value="{$datas.periodic_change}">210 154 <div id="iamm_rp_pc_slider" class="gcBgInput gcBorderInput"></div> 211 155 </td> … … 214 158 </td> 215 159 </tr> 160 </table> 161 </fieldset> 216 162 217 163 164 <fieldset> 165 <legend>{'g002_selectedpict'|@translate}</legend> 166 <table class="formtable"> 167 <tr> 168 <td> 169 <div id='iamm_randompicture_selectedMode'> 170 <label><input type="radio" value="a"> {'g002_selected_all_gallery'|@translate}<br></label> 171 <label><input type="radio" value="f"> {'g002_selected_favorites_wm'|@translate}<br></label> 172 <label><input type="radio" value="c"> {'g002_selected_categories'|@translate}<br></label> 173 <div id='iamm_randompicture_selectedCat'></div> 174 </div> 175 </td> 176 </tr> 218 177 </table> 219 178 </fieldset> 220 179 221 180 <p> 222 <input type=" submit" name="famm_submit_apply" id="iamm_submit_apply" value="{'g002_apply'|@translate}">181 <input type="button" id="iamm_submit_apply" value="{'g002_apply'|@translate}" onclick="rpc.submit();"> 223 182 </p> 224 183 225 <input type="hidden" name="famm_modeedit" value="config">226 184 227 185 </form> 228 229 <script type="text/javascript">230 init();231 change_lang();232 </script> -
extensions/AMenuManager/admin/plugin_admin.php
r5545 r8962 3 3 Plugin : Advanced Menu Manager 4 4 Author : Grum 5 email : grum@ grum.dnsalias.com5 email : grum@piwigo.org 6 6 website : http://photos.grum.dnsalias.com 7 7 PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
Note: See TracChangeset
for help on using the changeset viewer.