Move javascript path and extension hardcodes out of controllers
Move javascript path and extension hardcodes out of controllers

--- a/include/controller/Controller_Blob.class.php
+++ b/include/controller/Controller_Blob.class.php
@@ -188,7 +188,7 @@
 			return;
 		}
 
-		$this->tpl->assign('extrascripts', array('js/blame.js'));
+		$this->tpl->assign('extrascripts', array('blame'));
 
 		if (GitPHP_Config::GetInstance()->GetValue('geshi', true)) {
 			include_once(GitPHP_Util::AddSlash(GitPHP_Config::GetInstance()->GetValue('geshiroot', 'lib/geshi/')) . "geshi.php");

--- a/include/controller/Controller_ProjectList.class.php
+++ b/include/controller/Controller_ProjectList.class.php
@@ -161,7 +161,7 @@
 
 		if ((empty($this->params['opml']) || ($this->params['opml'] !== true)) &&
 		    (empty($this->params['txt']) || ($this->params['txt'] !== true))) {
-			$this->tpl->assign('extrascripts', array('js/projectsearch.js'));
+			$this->tpl->assign('extrascripts', array('projectsearch'));
 		}
 	}
 

--- a/include/controller/Controller_Tree.class.php
+++ b/include/controller/Controller_Tree.class.php
@@ -142,7 +142,7 @@
 		}
 		$this->tpl->assign('tree', $tree);
 
-		$this->tpl->assign('extrascripts', array('js/tree.js'));
+		$this->tpl->assign('extrascripts', array('tree'));
 	}
 
 }

--- a/templates/header.tpl
+++ b/templates/header.tpl
@@ -42,7 +42,7 @@
     <script type="text/javascript" src="js/tooltips.js"></script>
     <script type="text/javascript" src="js/lang.js"></script>
     {foreach from=$extrascripts item=script}
-    <script type="text/javascript" src="{$script}"></script>
+    <script type="text/javascript" src="js/{$script}.js"></script>
     {/foreach}
     {/if}
     {$smarty.capture.header}

comments