diff --git a/admin-dev/themes/default/css/admin.css b/admin-dev/themes/default/css/admin.css index fa7cfdd3c..b28bc3ba2 100644 --- a/admin-dev/themes/default/css/admin.css +++ b/admin-dev/themes/default/css/admin.css @@ -204,6 +204,7 @@ a.module_toggle_all{color: #268CCD;} .toolbarBox .process-icon-partialRefund{ background-image: url('../img/process-icon-partial-refund.png');} .toolbarBox .process-icon-standardRefund{ background-image: url('../img/process-icon-standard-refund.png');} .toolbarBox .process-icon-help{ background-image: url('../img/process-icon-help.png');} +.toolbarBox .process-icon-help-new{ background-image: url('../img/process-icon-help-new.png');} div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1;} @@ -433,4 +434,5 @@ ul.listForm li {padding-bottom:3px;} #footer {height:40px; font-size:12px;clear:both;font-size:0.9em;color:#666666} #footer .footerLeft { float:left; margin-left:10px;} #footer .footerRight {float:right; margin-right:10px;} -#footer .footer_link, #footer .footer_link:hover { color:#268CCD;} \ No newline at end of file +#footer .footer_link, #footer .footer_link:hover { color:#268CCD;} + diff --git a/admin-dev/themes/default/img/process-icon-help-new.png b/admin-dev/themes/default/img/process-icon-help-new.png new file mode 100644 index 000000000..d17f18ff0 Binary files /dev/null and b/admin-dev/themes/default/img/process-icon-help-new.png differ diff --git a/admin-dev/themes/default/template/helper/help_access/button.tpl b/admin-dev/themes/default/template/helper/help_access/button.tpl index 830e0101f..9c7da2cf6 100644 --- a/admin-dev/themes/default/template/helper/help_access/button.tpl +++ b/admin-dev/themes/default/template/helper/help_access/button.tpl @@ -9,7 +9,7 @@ '{$doc_version|escape:'htmlall':'UTF-8'}', '{$country|escape:'htmlall':'UTF-8'}');" title="{$tooltip|escape:'htmlall':'UTF-8'}"> - +
{l s='Help'}
diff --git a/classes/helper/HelperHelpAccess.php b/classes/helper/HelperHelpAccess.php index b1ddbd060..bdc53035f 100644 --- a/classes/helper/HelperHelpAccess.php +++ b/classes/helper/HelperHelpAccess.php @@ -58,6 +58,12 @@ class HelperHelpAccess extends Helper if (array_key_exists('version', $info) && $info['version'] != '') { + $last_version = HelpAccess::getVersion($this->label); + + $tpl_vars['button_class'] = 'process-icon-help'; + if ($last_version < $info['version']) + $tpl_vars['button_class'] = 'process-icon-help-new'; + $tpl_vars['label'] = $this->label; $tpl_vars['iso_lang'] = $this->iso_lang; $tpl_vars['country'] = $this->country; diff --git a/js/admin.js b/js/admin.js index 70e7f73cd..f1ca31a0b 100644 --- a/js/admin.js +++ b/js/admin.js @@ -879,23 +879,8 @@ function submitAddcmsAndPreview() $('#cms').submit(); } -function showHelp(url, label, iso_lang, ps_version, doc_version, country) -{ - trackClickOnHelp(label, doc_version); - $('#help-'+label).attr('src','../img/admin/help2.png'); - window.open(url +'/'+iso_lang+'/doc/'+label+'?version='+ps_version+'&country='+country+'#', '_blank', 'scrollbars=yes,menubar=no,toolbar=no,location=no,width=517,height=600'); - return false; -} -function trackClickOnHelp(label, doc_version) -{ - $.ajax({ - url: 'ajax.php', - data: 'submitTrackClickOnHelp&label='+ label +'&version='+doc_version - }); -} - function checkMultishopDefaultValue(obj, key) { if ($(obj).attr('checked') || $('#'+key).hasClass('isInvisible')) @@ -1072,4 +1057,5 @@ function showAjaxOverlay() { $('#ajax_running').slideDown('fast'); clearTimeout(ajax_running_timeout); -} \ No newline at end of file +} + diff --git a/js/helpAccess.js b/js/helpAccess.js index 0f6ec3561..62666e3af 100644 --- a/js/helpAccess.js +++ b/js/helpAccess.js @@ -29,4 +29,21 @@ function displayHelpButton(label, iso_user, country_iso_code, _PS_VERSION_){ } } }); +} + +function showHelp(url, label, iso_lang, ps_version, doc_version, country) +{ + trackClickOnHelp(label, doc_version); + $('.help-context-'+label+' span').removeClass().addClass('process-icon-help'); + window.open(url +'/'+iso_lang+'/doc/'+label+'?version='+ps_version+'&country='+country+'#', '_blank', 'scrollbars=yes,menubar=no,toolbar=no,location=no,width=517,height=600'); + return false; +} + + +function trackClickOnHelp(label, doc_version) +{ + $.ajax({ + url: 'ajax.php', + data: 'submitTrackClickOnHelp&label='+ label +'&version='+doc_version + }); } \ No newline at end of file