Ignore:
Timestamp:
Dec 6, 2010, 9:52:44 PM (13 years ago)
Author:
rvelices
Message:

combined script now really merges files
added option $conftemplate_combine_files by default true to enable/disable file combining

Location:
trunk/plugins/admin_multi_view
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/admin_multi_view/controller.php

    r6358 r8012  
    1212  pwg_unset_session_var( 'multiview_debug_l10n' );
    1313  pwg_unset_session_var( 'multiview_debug_template' );
     14        pwg_unset_session_var( 'multiview_template_combine_files' );
    1415  pwg_unset_session_var( 'multiview_no_history' );
    1516?>
     
    8586  $refresh_main = true;
    8687}
     88
     89if ( isset($_GET['template_combine_files']) )
     90{
     91  if ( $_GET['template_combine_files']==0 )
     92    pwg_set_session_var( 'multiview_template_combine_files', 0 );
     93  else
     94    pwg_unset_session_var( 'multiview_template_combine_files' );
     95  $refresh_main = true;
     96}
     97
    8798
    8899if ( isset($_GET['no_history']) )
     
    195206
    196207// +-----------------------------------------------------------------------+
     208// | template combine files                                                |
     209$template_combine_files_html='';
     210if ($conf['template_combine_files'])
     211{
     212  if ( pwg_get_session_var( 'multiview_template_combine_files', 1 ) )
     213    $template_combine_files_html.='<a href="'.$my_url.'?template_combine_files=0">Don\'t combine js&amp;css</a>';
     214  else
     215    $template_combine_files_html.='<a href="'.$my_url.'?template_combine_files=1">Combine js&amp;css</a>';
     216}
     217
     218// +-----------------------------------------------------------------------+
    197219// | no history                                                            |
    198220$no_history_html='';
     
    225247<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr>
    226248</table>
    227 <?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $no_history_html) ); ?>
     249<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $template_combine_files_html, $no_history_html) ); ?>
    228250
    229251<script type="text/javascript">
  • trunk/plugins/admin_multi_view/is_admin.inc.php

    r5128 r8012  
    2626  if (pwg_get_session_var( 'multiview_debug_template', 0 ))
    2727    $conf['debug_template'] = true;
    28   if (pwg_get_session_var( 'multiview_no_history', 0 ))
     28  if (!pwg_get_session_var( 'multiview_template_combine_files', 1 ))
     29    $conf['template_combine_files'] = false;
     30                if (pwg_get_session_var( 'multiview_no_history', 0 ))
    2931  {
    3032    add_event_handler( 'pwg_log_allowed', create_function( '', 'return false;' ) );
Note: See TracChangeset for help on using the changeset viewer.