mirror of https://github.com/apache/archiva.git
fix i18n loading for templates loading on start
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1376855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0842752179
commit
8ffeff592c
|
@ -51,8 +51,8 @@ $.ajax({
|
|||
urlArgs: ""+appendJsNoCacheUrl(),
|
||||
shim: {
|
||||
'sammy':['jquery','jquery.tmpl'],
|
||||
'archiva.main':['jquery','jquery.ui','sammy','jquery.tmpl'],
|
||||
'utils':['jquery','jquery.tmpl'],
|
||||
'archiva.main':['jquery','jquery.ui','sammy','jquery.tmpl','utils','i18n'],
|
||||
'utils':['jquery','jquery.tmpl','i18n'],
|
||||
'archiva.templates': ['jquery','jquery.tmpl','utils'],
|
||||
'redback.templates': ['jquery','jquery.tmpl','utils']
|
||||
},
|
||||
|
@ -97,9 +97,9 @@ $.ajax({
|
|||
}
|
||||
});
|
||||
|
||||
requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils',"archiva.main",'domReady!'], function (domReady) {
|
||||
loadi18n(function () {
|
||||
$.ajax({
|
||||
requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main'], function () {
|
||||
loadi18n(function () {
|
||||
$.ajax({
|
||||
url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
|
||||
dataType: 'json',
|
||||
success:function(data){
|
||||
|
@ -107,14 +107,14 @@ $.ajax({
|
|||
window.archivaJavascriptLog=data.javascriptLog;
|
||||
window.archivaRuntimeInfo=data;
|
||||
|
||||
require(['sammy','jquery','jquery.tmpl','archiva.main','utils','domReady!'],function () {
|
||||
require(['sammy','jquery','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
|
||||
startArchivaApplication();
|
||||
$("#loadingDiv").hide();
|
||||
drawQuickSearchAutocomplete();
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
|
@ -16,23 +16,24 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
require(['jquery',"jquery.tmpl","utils","text!templates/archiva/menu.html",
|
||||
require(['jquery',"jquery.tmpl",'i18n',"utils","text!templates/archiva/menu.html",
|
||||
"text!templates/archiva/generics.html",
|
||||
"text!templates/archiva/modal.html",
|
||||
"text!templates/archiva/repositories.html",
|
||||
"text!templates/archiva/search.html",
|
||||
"text!templates/archiva/general-admin.html"],
|
||||
function(jquery,jqueryTmpl,utils,menu,generics,modal,repositories,
|
||||
function(jquery,jqueryTmpl,i18n,utils,menu,generics,modal,repositories,
|
||||
search,general_admin) {
|
||||
|
||||
var htmlFragment=$("#html-fragments");
|
||||
// template loading
|
||||
htmlFragment.append(menu);
|
||||
htmlFragment.append(generics);
|
||||
$.tmpl( modal ).appendTo(htmlFragment);
|
||||
htmlFragment.append(repositories);
|
||||
htmlFragment.append(search);
|
||||
htmlFragment.append(general_admin);
|
||||
$.log("main-tmpl.js loaded");
|
||||
loadArchivaTemplate=function(){
|
||||
var htmlFragment=$("#html-fragments");
|
||||
// template loading
|
||||
htmlFragment.append(menu);
|
||||
htmlFragment.append(generics);
|
||||
$.tmpl( modal ).appendTo(htmlFragment);
|
||||
htmlFragment.append(repositories);
|
||||
htmlFragment.append(search);
|
||||
htmlFragment.append(general_admin);
|
||||
$.log("main-tmpl.js loaded");
|
||||
}
|
||||
}
|
||||
);
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
define("archiva.main",["jquery","jquery.ui","sammy","jquery.tmpl","jquery.cookie","bootstrap","archiva.search",
|
||||
define("archiva.main",["jquery","jquery.ui","sammy","jquery.tmpl",'i18n',"jquery.cookie","bootstrap","archiva.search",
|
||||
"jquery.validate","jquery.json","knockout","redback.templates","archiva.templates",
|
||||
"redback.roles","redback","archiva.general-admin","archiva.repositories",
|
||||
"archiva.network-proxies","archiva.proxy-connectors","archiva.repository-groups","archiva.artifacts-management"],
|
||||
|
@ -581,6 +581,8 @@ function(jquery,ui,sammy,tmpl) {
|
|||
startArchivaApplication=function(){
|
||||
|
||||
$.log("startArchivaApplication");
|
||||
loadRedbackTemplate();
|
||||
loadArchivaTemplate();
|
||||
$('#topbar-menu-container').html($("#topbar_menu_tmpl" ).tmpl());
|
||||
$('#sidebar-content').html($("#main_menu_tmpl").tmpl());
|
||||
|
||||
|
|
|
@ -16,15 +16,20 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
require(['jquery',"jquery.tmpl","utils","text!templates/redback/user-edit.html",
|
||||
require(['jquery',"jquery.tmpl",'i18n',"utils","text!templates/redback/user-edit.html",
|
||||
"text!templates/redback/login.html"],
|
||||
function(jquery,jqueryTmpl,utils,useredit, login) {
|
||||
function(jquery,jqueryTmpl,i18n,utils,useredit, login) {
|
||||
|
||||
var htmlFragment=$("#html-fragments");
|
||||
loadRedbackTemplate=function(){
|
||||
|
||||
// template loading
|
||||
htmlFragment.append(useredit);
|
||||
$.tmpl(login).appendTo("#html-fragments");
|
||||
$.log("redback-tmpl.js loaded");
|
||||
var htmlFragment=$("#html-fragments");
|
||||
|
||||
// template loading
|
||||
htmlFragment.append(useredit);
|
||||
//$.tmpl(useredit).appendTo("#html-fragments");
|
||||
$.tmpl(login).appendTo("#html-fragments");
|
||||
//htmlFragment.append(login);
|
||||
$.log("redback-tmpl.js loaded");
|
||||
}
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue