reuse selector cache

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1297635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-03-06 18:30:15 +00:00
parent 3332083d45
commit 12cd17a5d0
2 changed files with 19 additions and 15 deletions

View File

@ -25,21 +25,24 @@ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(),
"text!js/archiva/templates/network-proxies.html?"+appendTemplateUrl(),
"text!js/archiva/templates/proxy-connectors.html?"+appendTemplateUrl(),
"text!js/archiva/templates/repository-groups.html?"+appendTemplateUrl(),
"text!js/archiva/templates/search.html?"+appendTemplateUrl()],
"text!js/archiva/templates/search.html?"+appendTemplateUrl(),
"text!js/archiva/templates/general-admin.html?"+appendTemplateUrl()],
function(menu,topbar,message,modal,grids_generics,repositories,network_proxies,proxies_connectors,
repository_groups,search) {
repository_groups,search,general_admin) {
var htmlFragment=$("#html-fragments");
// template loading
$.tmpl( menu ).appendTo("#html-fragments");
$.tmpl( topbar ).appendTo("#html-fragments");
$("#html-fragments").append(message);
$.tmpl( modal ).appendTo("#html-fragments");
$("#html-fragments").append(grids_generics);
$("#html-fragments").append(repositories);
$("#html-fragments").append(network_proxies);
$("#html-fragments").append(proxies_connectors);
$("#html-fragments").append(repository_groups);
$("#html-fragments").append(search);
$.tmpl( menu ).appendTo(htmlFragment);
$.tmpl( topbar ).appendTo(htmlFragment);
htmlFragment.append(message);
$.tmpl( modal ).appendTo(htmlFragment);
htmlFragment.append(grids_generics);
htmlFragment.append(repositories);
htmlFragment.append(network_proxies);
htmlFragment.append(proxies_connectors);
htmlFragment.append(repository_groups);
htmlFragment.append(search);
htmlFragment.append(general_admin);
$.log("main-tmpl.js loaded");
}
);

View File

@ -25,12 +25,13 @@ require(["text!js/redback/templates/user-edit.html?"+appendTemplateUrl(),
"text!js/redback/templates/roles-tmpl.html?"+appendTemplateUrl()],
function(useredit, usergrids, login,register,passwordchange,usereditform,roles) {
var htmlFragment=$("#html-fragments");
// template loading
$("#html-fragments").append(useredit);
htmlFragment.append(useredit);
$("#html-fragments").append(usergrids);
htmlFragment.append(usergrids);
$.tmpl(login).appendTo("#html-fragments");
@ -40,7 +41,7 @@ require(["text!js/redback/templates/user-edit.html?"+appendTemplateUrl(),
$.tmpl(usereditform).appendTo("#html-fragments");
$("#html-fragments").append(roles);
htmlFragment.append(roles);
$.log("redback-tmpl.js loaded");
}