ensure we correctly load tmpl before extend it

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1375924 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-08-22 07:56:39 +00:00
parent 504b92cd1f
commit 13d23c7718
3 changed files with 13 additions and 11 deletions

View File

@ -33,7 +33,6 @@
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/sammy.0.7.1.js"></script> <script type="text/javascript" src="js/sammy.0.7.1.js"></script>
<script type="text/javascript" src="js/require.2.0.2.js"></script> <script type="text/javascript" src="js/require.2.0.2.js"></script>
<title>Apache Archiva</title> <title>Apache Archiva</title>
@ -148,7 +147,7 @@
} }
}); });
require(['jquery','i18n','sammy','startup','utils','domReady!'], function (domReady) { require(['jquery','jquery.tmpl','i18n','sammy','startup','utils','domReady!'], function (domReady) {
loadi18n(function () { loadi18n(function () {
$.ajax({ $.ajax({
url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(), url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),

View File

@ -568,5 +568,16 @@ function() {
} }
//-----------------------------------------
// extends jquery tmpl to support var def
//-----------------------------------------
$.extend($.tmpl.tag, {
"var": {
open: "var $1;"
}
});
}); });

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
define("utils",["jquery","i18n","jquery.tmpl"], function() { define("utils",["jquery","jquery.tmpl","i18n"], function() {
loadi18n=function(loadCallback){ loadi18n=function(loadCallback){
$.log("loadi18n"); $.log("loadi18n");
@ -426,14 +426,6 @@ define("utils",["jquery","i18n","jquery.tmpl"], function() {
return this.substring(idx); return this.substring(idx);
} }
//-----------------------------------------
// extends jquery tmpl to support var def
//-----------------------------------------
$.extend($.tmpl.tag, {
"var": {
open: "var $1;"
}
});
}); });