From: Olivier Lamy Date: Wed, 22 Aug 2012 07:56:39 +0000 (+0000) Subject: ensure we correctly load tmpl before extend it X-Git-Tag: archiva-1.4-M3~396 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=13d23c77182e6c0dc86927c97dc3f5ecb2795631;p=archiva.git 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 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index e68b7fc64..92184483f 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -33,7 +33,6 @@ - Apache Archiva @@ -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 () { $.ajax({ url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(), diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js index fc8ccb9eb..240acdfe1 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js @@ -568,5 +568,16 @@ function() { } + //----------------------------------------- + // extends jquery tmpl to support var def + //----------------------------------------- + + $.extend($.tmpl.tag, { + "var": { + open: "var $1;" + } + }); + + }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index 9fb10cc86..8502354f0 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -17,7 +17,7 @@ * under the License. */ -define("utils",["jquery","i18n","jquery.tmpl"], function() { +define("utils",["jquery","jquery.tmpl","i18n"], function() { loadi18n=function(loadCallback){ $.log("loadi18n"); @@ -426,14 +426,6 @@ define("utils",["jquery","i18n","jquery.tmpl"], function() { return this.substring(idx); } - //----------------------------------------- - // extends jquery tmpl to support var def - //----------------------------------------- - $.extend($.tmpl.tag, { - "var": { - open: "var $1;" - } - }); }); \ No newline at end of file