aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-08-22 07:56:39 +0000
committerOlivier Lamy <olamy@apache.org>2012-08-22 07:56:39 +0000
commit13d23c77182e6c0dc86927c97dc3f5ecb2795631 (patch)
tree152c26fbcb88fac03534938bfecac88ba67e65a6 /archiva-modules
parent504b92cd1f5972e925050c484bcd9b4d196f5725 (diff)
downloadarchiva-13d23c77182e6c0dc86927c97dc3f5ecb2795631.tar.gz
archiva-13d23c77182e6c0dc86927c97dc3f5ecb2795631.zip
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
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html3
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js11
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js10
3 files changed, 13 insertions, 11 deletions
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 @@
<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/require.2.0.2.js"></script>
<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 () {
$.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