Browse Source

move admin.ls to the loader function
#1392

Signed-off-by: Suki <[email protected]>

Suki 10 years ago
parent
commit
6a0fbe4780
2 changed files with 3 additions and 1 deletions
  1. 3 0
      Sources/Admin.php
  2. 0 1
      Themes/default/Admin.template.php

+ 3 - 0
Sources/Admin.php

@@ -561,6 +561,9 @@ function AdminHome()
 		'http://www.simplemachines.org/redirect/smf_support',
 		'http://www.simplemachines.org/redirect/customize_support'
 	);
+
+	if ($context['admin_area'] == 'admin')
+		loadJavascriptFile('admin.js', array('default_theme' => true, 'defer' => false), 'smf_scripts');
 }
 
 /**

+ 0 - 1
Themes/default/Admin.template.php

@@ -112,7 +112,6 @@ function template_admin()
 
 	// This sets the announcements and current versions themselves ;).
 	echo '
-					<script src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
 					<script><!-- // --><![CDATA[
 						var oAdminIndex = new smf_AdminIndex({
 							sSelf: \'oAdminCenter\',