From 1cbbe10bfd88f12f62b9cfc15e2ccd46d5e37b27 Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 6 Dec 2010 20:52:44 +0000 Subject: combined script now really merges files added option $conf['template_combine_files'] by default true to enable/disable file combining git-svn-id: http://piwigo.org/svn/trunk@8012 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/admin_multi_view/controller.php | 24 +++++++++++++++++++++++- plugins/admin_multi_view/is_admin.inc.php | 4 +++- 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'plugins/admin_multi_view') diff --git a/plugins/admin_multi_view/controller.php b/plugins/admin_multi_view/controller.php index 88b22f2e2..d2cd612c2 100644 --- a/plugins/admin_multi_view/controller.php +++ b/plugins/admin_multi_view/controller.php @@ -11,6 +11,7 @@ if (!is_admin() or !function_exists('multiview_user_init') ) pwg_unset_session_var( 'multiview_show_queries' ); pwg_unset_session_var( 'multiview_debug_l10n' ); pwg_unset_session_var( 'multiview_debug_template' ); + pwg_unset_session_var( 'multiview_template_combine_files' ); pwg_unset_session_var( 'multiview_no_history' ); ?> @@ -85,6 +86,16 @@ if ( isset($_GET['debug_template']) ) $refresh_main = true; } +if ( isset($_GET['template_combine_files']) ) +{ + if ( $_GET['template_combine_files']==0 ) + pwg_set_session_var( 'multiview_template_combine_files', 0 ); + else + pwg_unset_session_var( 'multiview_template_combine_files' ); + $refresh_main = true; +} + + if ( isset($_GET['no_history']) ) { if ( $_GET['no_history']>0 ) @@ -193,6 +204,17 @@ if (!$conf['debug_template']) $debug_template_html.='Revert debug template'; } +// +-----------------------------------------------------------------------+ +// | template combine files | +$template_combine_files_html=''; +if ($conf['template_combine_files']) +{ + if ( pwg_get_session_var( 'multiview_template_combine_files', 1 ) ) + $template_combine_files_html.='Don\'t combine js&css'; + else + $template_combine_files_html.='Combine js&css'; +} + // +-----------------------------------------------------------------------+ // | no history | $no_history_html=''; @@ -224,7 +246,7 @@ if (window.opener==null) { Lang -\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $no_history_html) ); ?> +\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $template_combine_files_html, $no_history_html) ); ?>