From 34780335153fc876b4c059d01eaf4aa0fc594957 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 13 Aug 2019 12:07:16 +0200 Subject: [PATCH] fixes #1057 use a popin instead of popup to display admin page help. The "old way" still works with the popuphelp() javascript function. --- admin/popuphelp.php | 6 ++++++ admin/themes/default/template/admin.tpl | 7 +++++-- admin/themes/default/template/batch_manager_global.tpl | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/admin/popuphelp.php b/admin/popuphelp.php index 83ac55074..a4dd88a02 100644 --- a/admin/popuphelp.php +++ b/admin/popuphelp.php @@ -61,6 +61,12 @@ $template->assign( 'HELP_CONTENT' => $help_content )); +if (isset($_GET['output']) and 'content_only' == $_GET['output']) +{ + echo $help_content; + exit(); +} + // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index 759f2b984..a6058da19 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -143,9 +143,12 @@ jQuery(document).ready(function() { {$TABSHEET} {/if} {if isset($U_HELP)} - {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} + {include file='include/colorbox.inc.tpl'} +{footer_script} + jQuery('.help-popin').colorbox({ width:"500px" }); +{/footer_script} {/if} diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index bbc9c7e28..0ab1708fd 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -1,5 +1,5 @@ {include file='include/datepicker.inc.tpl' load_mode='async'} -{include file='include/colorbox.inc.tpl' load_mode='async'} +{include file='include/colorbox.inc.tpl' load_mode='footer'} {include file='include/add_album.inc.tpl' load_mode='async'} {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} @@ -28,6 +28,8 @@ var lang = { jQuery(document).ready(function() { + jQuery('.help-popin').colorbox({ width:"500px" }); + {* *} var tagsCache = new TagsCache({ serverKey: '{$CACHE_KEYS.tags}', @@ -456,7 +458,7 @@ var sliders = { {'Search'|@translate} {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} - + {if (isset($no_search_results))}
{'No results for'|@translate} :