diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/AMenuManager/admin/amm_linksconfig.tpl | 25 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_personalisedlist.tpl | 50 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl | 22 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl | 155 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_randompicconfig.tpl | 132 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_sections.tpl | 58 | ||||
-rw-r--r-- | plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl | 17 |
7 files changed, 454 insertions, 5 deletions
diff --git a/plugins/AMenuManager/admin/amm_linksconfig.tpl b/plugins/AMenuManager/admin/amm_linksconfig.tpl index 55ee8b6a0..25e6d75cc 100644 --- a/plugins/AMenuManager/admin/amm_linksconfig.tpl +++ b/plugins/AMenuManager/admin/amm_linksconfig.tpl @@ -35,6 +35,15 @@ objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value; } + function do_translation() + { + var inputid = document.getElementById('iamm_links_title'); + var tolang = objlang.options[objlang.options.selectedIndex].value.substr(0,2); + + google_translate(inputid.value, '{/literal}{$datas.fromlang}{literal}', tolang, inputid, 'value', apply_changes, inputid.id); + } + + </script> {/literal} @@ -46,7 +55,7 @@ <form method="post" action="" class="general"> <fieldset> - <legend>{'g002_setting_link_block_menu'|@translate}</legend> + <legend>{'g002_setting_block_menu'|@translate}</legend> {if isset($datas.language_list) and count($datas.language_list)} {foreach from=$datas.language_list key=name item=language_row} @@ -57,7 +66,7 @@ <table class="formtable"> <tr> - <td>{'g002_setting_link_block_active'|@translate}</td> + <td>{'g002_setting_block_active'|@translate}</td> <td> <select name="famm_links_active" id="iamm_links_active"> {html_options values=$datas.yesno_values output=$datas.yesno_labels selected=$datas.active_selected} @@ -66,12 +75,18 @@ </tr> <tr> - <td>{'g002_setting_link_block_title'|@translate}</td> + <td>{'g002_setting_block_title'|@translate}</td> <td> - <input type="text" id="iamm_links_title" value="" maxlength="50" onkeyup="apply_changes('iamm_links_title');" /> + <input type="text" id="iamm_links_title" value="" maxlength="50" onkeyup="apply_changes('iamm_links_title');" onblur="apply_changes('iamm_links_title');"/> <select onchange="change_lang();" id="islang"> {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected} - </select> + </select><br> + </td> + </tr> + <tr> + <td></td> + <td style="font-size:80%;"> + <a style="cursor:pointer;" onclick="do_translation()">{'g002_translate'|@translate}</a> </td> </tr> diff --git a/plugins/AMenuManager/admin/amm_personalisedlist.tpl b/plugins/AMenuManager/admin/amm_personalisedlist.tpl new file mode 100644 index 000000000..d7595e036 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_personalisedlist.tpl @@ -0,0 +1,50 @@ +{literal} +<script type="text/javascript"> + + function load_list(do_action, item) + { + /* + do_action + 'list' : just load list + 'delete' : delete the item in list + */ + var doc = document.getElementById("isections"); + + action_todo=''; + if(do_action=='delete') + { + if(confirm('{/literal}{'g002_confirm_delete_link'|@translate}{literal}')) + { + action_todo='personalised_delete&fItem='+item; + } + } + else + { + action_todo='personalised_list'; + } + + if(action_todo!='') + { + http_request=create_httpobject('get', '', '{/literal}{$datas.AMM_AJAX_URL_LIST}{literal}'+action_todo, false); + http_request.send(null); + doc.innerHTML=http_request.responseText; + } + } + +</script> +{/literal} + + +<h3>{'g002_personalisedlist'|@translate}</h3> + +[{$datas.nbsections}]<br/> +<a href="{$datas.lnk_create}" title="{'g002_addsection'|@translate}">{'g002_addsection'|@translate}</a> + +<br/> + +<div id="isections"></div> + + +<script type="text/javascript"> + load_list('list', 0); +</script>
\ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl b/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl new file mode 100644 index 000000000..fd785e359 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl @@ -0,0 +1,22 @@ + +{if isset($datas.sections) and count($datas.sections)} + <table class="table2 littlefont"> + <tr class="throw"> + <th>{'g002_setting_personalised_nfo'|@translate}</th> + <th>{'g002_title'|@translate}</th> + <th>{'g002_visible'|@translate}</th> + <th colspan=2> </th> + </tr> + + {foreach from=$datas.sections key=name item=section} + <tr> + <td>{$section.nfo}</td> + <td>{$section.title}</td> + <td style="text-align:center;">{$section.visible}</td> + <td width="15px"><a href="{$section.edit}"><img src='{$themeconf.icon_dir}/category_edit.png'/></a></td> + <td width="15px"><a style="cursor:pointer;" onclick="load_list('delete', {$section.ID})"><img src='{$themeconf.icon_dir}/delete.png'/></a></td> + </tr> + {/foreach} + + </table> +{/if} diff --git a/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl b/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl new file mode 100644 index 000000000..ddccc6b23 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl @@ -0,0 +1,155 @@ +{literal} +<script type="text/javascript"> + + //global var ; need to not have to initialize them every time a value is changed + var objlang; + var objnames = new Array('iamm_personalised_title', 'iamm_personalised_content'); + var objinput = new Array(); //input text from form => objinput[name] + var objhidden = new Array(); //input hidden from form => objhidden[name][lang] + + function init() + { + objlang = document.getElementById('islang'); + for(i=0;i<objnames.length;i++) + { + objinput[i] = document.getElementById(objnames[i]); + objhidden[i] = new Array(); + for(j=0;j<objlang.options.length;j++) + { + objhidden[i][j] = document.getElementById(objnames[i]+'_'+objlang.options[j].value); + } + } + } + + function change_lang() + { + for(i=0;i<objnames.length;i++) + { + objinput[i].value = objhidden[i][objlang.options.selectedIndex].value; + } + } + + function apply_changes(input_id) + { + var obj=document.getElementById(input_id); + objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value; + } + + function do_translation() + { + var inputid = document.getElementById('iamm_personalised_title'); + var tolang = objlang.options[objlang.options.selectedIndex].value.substr(0,2); + + google_translate(inputid.value, '{/literal}{$datas.fromlang}{literal}', tolang, inputid, 'value', apply_changes, inputid.id); + } + +</script> +{/literal} + + +{if isset($datas.modeedit)} + + <h3> + {if $datas.modeedit=='create'} + {'g002_createofpersonalised'|@translate} + {else} + {'g002_editofpersonalised'|@translate} + {/if} + / <span style="font-weight:normal"><a href="{$datas.personalised_list}">{'g002_personalisedlist'|@translate}</a></span></h3> + </h3> + + +<form method="post" action="" class="general"> + <fieldset> + <legend>{'g002_setting_personalised_properties'|@translate}</legend> + + <table class="formtable"> + <tr> + <td>{'g002_setting_block_active'|@translate}</td> + <td> + <select name="famm_personalised_visible" id="iamm_personalised_visible"> + {html_options values=$datas.yesno_values output=$datas.yesno_labels selected=$datas.visible_selected} + </select> + </td> + </tr> + + <tr> + <td>{'g002_setting_personalised_nfo'|@translate}</td> + <td> + <input type="text" name="famm_personalised_nfo" id="iamm_personalised_nfo" value="{$datas.nfo}" maxlength="25"/> + </td> + </tr> + + </table> + + </fieldset> + + <fieldset> + <legend>{'g002_setting_block_menu'|@translate}</legend> + + {if isset($datas.language_list) and count($datas.language_list)} + {foreach from=$datas.language_list key=name item=language_row} + <input type="hidden" name="famm_personalised_title_{$language_row.LANG}" + id="iamm_personalised_title_{$language_row.LANG}" value="{$language_row.MENUBARTIT}"> + <input type="hidden" name="famm_personalised_content_{$language_row.LANG}" + id="iamm_personalised_content_{$language_row.LANG}" value="{$language_row.MENUBARCONTENT}"> + {/foreach} + {/if} + + <table class="formtable"> + + <tr> + <td>{'g002_setting_block_langchoice'|@translate}</td> + <td> + <select onchange="change_lang();" id="islang"> + {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected} + </select><br> + </td> + </tr> + + <tr> + <td colspan=2><hr/></td> + </tr> + + <tr> + <td>{'g002_setting_block_title'|@translate}</td> + <td> + <input type="text" id="iamm_personalised_title" value="" maxlength="50" onkeyup="apply_changes('iamm_personalised_title');" onblur="apply_changes('iamm_personalised_title');"/> + </td> + </tr> + <tr> + <td></td> + <td style="font-size:80%;"> + <a style="cursor:pointer;" onclick="do_translation()">{'g002_translate'|@translate}</a> + </td> + </tr> + + <tr> + <td>{'g002_setting_personalised_content'|@translate}</td> + <td> + <textarea id="iamm_personalised_content" cols=80 rows=25 onkeyup="apply_changes('iamm_personalised_content');" /></textarea> + </td> + </tr> + + + </table> + + </fieldset> + + + <p> + <input type="submit" name="famm_submit_apply" id="iamm_submit_apply" value="{'g002_apply'|@translate}" > + </p> + + <input type="hidden" name="famm_modeedit" value="{$datas.modeedit}"> + <input type="hidden" name="famm_id" value="{$datas.id}"> + +</form> + + +<script type="text/javascript"> + init(); + change_lang(); +</script> + +{/if}
\ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_randompicconfig.tpl b/plugins/AMenuManager/admin/amm_randompicconfig.tpl new file mode 100644 index 000000000..df70311f0 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_randompicconfig.tpl @@ -0,0 +1,132 @@ +{literal} +<script type="text/javascript"> + + //global var ; need to not have to initialize them every time a value is changed + var objlang; + var objnames = new Array('iamm_randompicture_title'); + var objinput = new Array(); //input text from form => objinput[name] + var objhidden = new Array(); //input hidden from form => objhidden[name][lang] + + function init() + { + objlang = document.getElementById('islang'); + for(i=0;i<objnames.length;i++) + { + objinput[i] = document.getElementById(objnames[i]); + objhidden[i] = new Array(); + for(j=0;j<objlang.options.length;j++) + { + objhidden[i][j] = document.getElementById(objnames[i]+'_'+objlang.options[j].value); + } + } + } + + function change_lang() + { + for(i=0;i<objnames.length;i++) + { + objinput[i].value = objhidden[i][objlang.options.selectedIndex].value; + } + } + + function apply_changes(input_id) + { + var obj=document.getElementById(input_id); + objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value; + } + + function do_translation() + { + var inputid = document.getElementById('iamm_randompicture_title'); + var tolang = objlang.options[objlang.options.selectedIndex].value.substr(0,2); + + google_translate(inputid.value, '{/literal}{$datas.fromlang}{literal}', tolang, inputid, 'value', apply_changes, inputid.id); + + } + + +</script> +{/literal} + + + +<h3>{'g002_configrandompic'|@translate}</h3> + + +<form method="post" action="" class="general"> + <fieldset> + <legend>{'g002_setting_block_menu'|@translate}</legend> + + {if isset($datas.language_list) and count($datas.language_list)} + {foreach from=$datas.language_list key=name item=language_row} + <input type="hidden" name="famm_randompicture_title_{$language_row.LANG}" + id="iamm_randompicture_title_{$language_row.LANG}" value="{$language_row.MENUBARTIT}"> + {/foreach} + {/if} + + <table class="formtable"> + <tr> + <td>{'g002_setting_block_active'|@translate}</td> + <td> + <select name="famm_randompicture_active" id="iamm_randompicture_active"> + {html_options values=$datas.yesno_values output=$datas.yesno_labels selected=$datas.active_selected} + </select> + </td> + </tr> + + <tr> + <td>{'g002_setting_block_title'|@translate}</td> + <td> + <input type="text" id="iamm_randompicture_title" value="" maxlength="50" onkeyup="apply_changes('iamm_randompicture_title');" onblur="apply_changes('iamm_randompicture_title');"/> + <select onchange="change_lang();" id="islang"> + {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected} + </select><br> + </td> + </tr> + <tr> + <td></td> + <td style="font-size:80%;"> + <a style="cursor:pointer;" onclick="do_translation()">{'g002_translate'|@translate}</a> + </td> + </tr> + + </table> + + </fieldset> + + <fieldset> + <legend>{'g002_setting_randompic_aboutpicture'|@translate}</legend> + <table class="formclass"> + <tr> + <td>{'g002_setting_randompic_showname'|@translate}</td> + <td> + <select name="famm_randompicture_showname" id="iamm_randompicture_showname"> + {html_options values=$datas.show_values output=$datas.show_labels selected=$datas.showname_selected} + </select> + </td> + </tr> + + <tr> + <td>{'g002_setting_randompic_showcomment'|@translate}</td> + <td> + <select name="famm_randompicture_showcomment" id="iamm_randompicture_showcomment"> + {html_options values=$datas.show_values output=$datas.show_labels selected=$datas.showcomment_selected} + </select> + </td> + </tr> + + </table> + </fieldset> + + <p> + <input type="submit" name="famm_submit_apply" id="iamm_submit_apply" value="{'g002_apply'|@translate}" > + </p> + + <input type="hidden" name="famm_modeedit" value="config"> + +</form> + +<script type="text/javascript"> + init(); + change_lang(); +</script>
\ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_sections.tpl b/plugins/AMenuManager/admin/amm_sections.tpl new file mode 100644 index 000000000..da132a622 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_sections.tpl @@ -0,0 +1,58 @@ +{literal} +<script type="text/javascript"> + + function load_list(do_action, item, position) + { + /* + do_action + 'list' : just load list + 'permut' : permut items in list + 'delete' : delete the item in list + */ + var doc = document.getElementById("isections"); + + action_todo=''; + if(do_action=='position') + { + action_todo='sections_position&fItem='+item+'&fPosition='+position; + } + else if(do_action=='showhide') + { + action_todo='sections_showhide&fItem='+item; + } + else + { + action_todo='sections_list'; + } + + if(action_todo!='') + { + http_request=create_httpobject('get', '', '{/literal}{$datas.AMM_AJAX_URL_LIST}{literal}'+action_todo, false); + http_request.send(null); + doc.innerHTML=http_request.responseText; + } + } + +</script> +{/literal} + + +<h3> +{foreach from=$datas.LIST item=data} + {$data.separator} + {if $data.link!=''} + <span style="font-weight:normal"><a href="{$data.link}" title="{$data.label|@translate}"> + {/if} + {$data.label|@translate} + {if $data.link!=''} + </a></span> + {/if} +{/foreach} +</h3> + +<div id="isections"></div> + + +<script type="text/javascript"> + load_list('list', 0, 0); +</script>
\ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl b/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl new file mode 100644 index 000000000..dcaf625f6 --- /dev/null +++ b/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl @@ -0,0 +1,17 @@ + +{if isset($datas.LIST) and count($datas.LIST)} + <table class="table2 littlefont"> + <tr class="throw"> + <th>{'g002_labelmenu'|@translate}</th> + <th>{'g002_visible'|@translate}</th> + </tr> + + {foreach from=$datas.LIST key=name item=data} + <tr> + <td>{$data.LABEL|@translate}</td> + <td style="text-align:center;"><a style="cursor:pointer;" onclick="load_list('showhide', '{$data.ID}', '')">{$data.VISIBLE|@translate}</a></td> + </tr> + {/foreach} + + </table> +{/if} |