aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/admin_multi_view/controller.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-12-06 20:52:44 +0000
committerrvelices <rv-github@modusoptimus.com>2010-12-06 20:52:44 +0000
commit1cbbe10bfd88f12f62b9cfc15e2ccd46d5e37b27 (patch)
tree0c376ec8354a7abb710c0f111fbcc42e6f6e137d /plugins/admin_multi_view/controller.php
parent1e6cae89c30296045b21c39502c1a20a9538dad7 (diff)
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
Diffstat (limited to 'plugins/admin_multi_view/controller.php')
-rw-r--r--plugins/admin_multi_view/controller.php24
1 files changed, 23 insertions, 1 deletions
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 )
@@ -194,6 +205,17 @@ if (!$conf['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.='<a href="'.$my_url.'?template_combine_files=0">Don\'t combine js&amp;css</a>';
+ else
+ $template_combine_files_html.='<a href="'.$my_url.'?template_combine_files=1">Combine js&amp;css</a>';
+}
+
+// +-----------------------------------------------------------------------+
// | no history |
$no_history_html='';
if ( !pwg_get_session_var( 'multiview_no_history', 0 ) )
@@ -224,7 +246,7 @@ if (window.opener==null) {
<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr>
</table>
-<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $no_history_html) ); ?>
+<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $template_combine_files_html, $no_history_html) ); ?>
<script type="text/javascript">
<?php