[*] BO : HelpAccess helper

This commit is contained in:
fBrignoli
2012-01-05 10:54:42 +00:00
parent 9665de9831
commit e18463d510
12 changed files with 179 additions and 132 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
<title>{$meta_title} - PrestaShop&trade;</title>
{if $display_header}
<script type="text/javascript">
var class_name = '{$class_name}';
var help_class_name = '{$controller_name}';
var iso_user = '{$iso_user}';
var country_iso_code = '{$country_iso_code}';
var _PS_VERSION_ = '{$smarty.const._PS_VERSION_}';
@@ -0,0 +1,15 @@
<li class="help-context-{$label|escape:'htmlall':'UTF-8'}" style="display:none">
<a id="desc-{$label|escape:'htmlall':'UTF-8'}-help"
class="toolbar_btn"
href="#"
onclick="showHelp('{$help_base_url|escape:'htmlall':'UTF-8'}',
'{$label|escape:'htmlall':'UTF-8'}',
'{$iso_lang|escape:'htmlall':'UTF-8'}',
'{$version|escape:'htmlall':'UTF-8'}',
'{$doc_version|escape:'htmlall':'UTF-8'}',
'{$country|escape:'htmlall':'UTF-8'}');"
title="{$tooltip|escape:'htmlall':'UTF-8'}">
<span class="process-icon-help"></span>
<div>{l s='Help'}</div>
</a>
</li>
+13 -9
View File
@@ -23,7 +23,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{block name=toolbarBox}
<ul class="cc_button">
{foreach from=$toolbar_btn item=btn key=k}
@@ -34,17 +33,22 @@
</a>
</li>
{/foreach}
{if isset($ps_help_context) && $ps_help_context}
<li class="help-context" style="display:none">
<a id="desc-{$table}-help" class="toolbar_btn" href="#" title="{l s='Help'}">
<span class="process-icon-help"></span>
<div>{l s='Help'}</div>
</a>
</li>
{/if}
</ul>
<script language="javascript">
if (helpboxes > 0)
{
$(document).ready(function (){
button = getHelpButton(help_class_name);
if (button != '')
{
$('ul.cc_button').append(button);
$('.help-context-'+help_class_name).fadeIn("fast").show();
}
});
}
$(function() {
//get reference on save link
btn_save = $('span[class~="process-icon-save"]').parent();