Skip to content

Commit

Permalink
bug:2268 combine_script - sometimes precedent scripts were not being …
Browse files Browse the repository at this point in the history
…loaded before ...

in admin, the accordion is loaded in the header (admin pages have the same header combined script, but usually different bottom scripts)

git-svn-id: http://piwigo.org/svn/trunk@10503 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Apr 19, 2011
1 parent 9b0677e commit 13f099f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin/themes/default/template/admin.tpl
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,4 @@
{combine_script id='jquery.ui.accordion' load='header'}{*we load in the header because the accordion is on every admin page and usually all admin pages use the same header combined script but not the same footer script*}
{footer_script require='jquery.ui.accordion'} {footer_script require='jquery.ui.accordion'}
jQuery(document).ready(function(){ldelim} jQuery(document).ready(function(){ldelim}
jQuery('#menubar').accordion({ldelim} jQuery('#menubar').accordion({ldelim}
Expand Down
4 changes: 2 additions & 2 deletions include/template.class.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1101,8 +1101,8 @@ private static function check_load_dep($scripts)
foreach( $scripts as $id => $script) foreach( $scripts as $id => $script)
{ {
$load = $script->load_mode; $load = $script->load_mode;
if ($load==0) /*if ($load==0)
continue; continue;*/
foreach( $script->precedents as $precedent) foreach( $script->precedents as $precedent)
{ {
if ( !isset($scripts[$precedent] ) ) if ( !isset($scripts[$precedent] ) )
Expand Down

0 comments on commit 13f099f

Please sign in to comment.