From 0319d5c17615a1a1ec9dd65ba687fb4b721d76b3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sat, 24 Mar 2012 18:22:59 +0000 Subject: [PATCH] merge topbar template in menu templates files git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1304878 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/main-tmpl.js | 6 +- .../src/main/webapp/js/archiva/main.js | 4 +- .../webapp/js/archiva/templates/menu.html | 50 +++++++++++++++ .../webapp/js/archiva/templates/topbar.html | 63 ------------------- 4 files changed, 54 insertions(+), 69 deletions(-) delete mode 100644 archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js index f365c8fec..ed58c9d1b 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js @@ -17,7 +17,6 @@ * under the License. */ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(), - "text!js/archiva/templates/topbar.html"+appendTemplateUrl(), "text!js/archiva/templates/message.html"+appendTemplateUrl(), "text!js/archiva/templates/modal.html"+appendTemplateUrl(), "text!js/archiva/templates/grids-generics.html"+appendTemplateUrl(), @@ -27,13 +26,12 @@ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(), "text!js/archiva/templates/repository-groups.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, + function(menu,message,modal,grids_generics,repositories,network_proxies,proxies_connectors, repository_groups,search,general_admin) { var htmlFragment=$("#html-fragments"); // template loading - $.tmpl( menu ).appendTo(htmlFragment); - $.tmpl( topbar ).appendTo(htmlFragment); + htmlFragment.append(menu); htmlFragment.append(message); $.tmpl( modal ).appendTo(htmlFragment); htmlFragment.append(grids_generics); 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 ac7e7cb4d..7bbd51d3f 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 @@ -286,8 +286,8 @@ $(function() { startArchivaApplication=function(){ $.log("startArchivaApplication"); - $('#topbar-menu-container').html($("#topbar-menu")); - $('#sidebar-content').html($("#main-menu")); + $('#topbar-menu-container').html($("#topbar_menu_tmpl" ).tmpl());//$("#topbar-menu")); + $('#sidebar-content').html( $("#main_menu_tmpl").tmpl()); hideElementWithKarma(); checkSecurityLinks(); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html index cf1c79a50..c5070bb6b 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html @@ -16,6 +16,7 @@ ~ specific language governing permissions and limitations ~ under the License. --> + + + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html deleted file mode 100644 index 4b531777b..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html +++ /dev/null @@ -1,63 +0,0 @@ - -
- -
\ No newline at end of file -- 2.39.5