From: Olivier Lamy Date: Mon, 2 Jan 2012 13:59:46 +0000 (+0000) Subject: move grid pager template to a generic place and use only this one X-Git-Tag: archiva-1.4-M3~1654 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d54eacedb2bc81d2ed734576787a9457761ae372;p=archiva.git move grid pager template to a generic place and use only this one git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1226421 13f79535-47bb-0310-9956-ffa450edef68 --- 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 9295369d3..a7dbda3cf 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,14 +17,15 @@ * under the License. */ require(["text!archiva/templates/menu.html","text!archiva/templates/topbar.html","text!archiva/templates/message.html", - "text!archiva/templates/modal.html"], - function(menu,topbar,message,modal) { + "text!archiva/templates/modal.html","text!archiva/templates/grids-generics.html"], + function(menu,topbar,message,modal,grids_generics) { // template loading $.tmpl( menu, $.i18n.map ).appendTo("#html-fragments"); $.tmpl( topbar, $.i18n.map ).appendTo("#html-fragments"); $.tmpl( modal, $.i18n.map ).appendTo("#html-fragments"); $("#html-fragments").append(message); + $("#html-fragments").append(grids_generics); $.log("main-tmpl.js menu loaded"); } ); \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/grids-generics.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/grids-generics.html new file mode 100644 index 000000000..9aeb887ce --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/grids-generics.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js index f0a97566b..a86f7d8b6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js @@ -50,7 +50,7 @@ // Allow the default templates to be overridden var gridTemplateName = allBindings.simpleGridTemplate || "ko_usersGrid_grid", - pageLinksTemplateName = allBindings.simpleGridPagerTemplate || "ko_usersGrid_pageLinks"; + pageLinksTemplateName = allBindings.simpleGridPagerTemplate || "ko_simpleGrid_pageLinks"; // Render the main grid var gridContainer = element.appendChild(document.createElement("DIV")); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html index b5d2ce7b7..8ec37303f 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html @@ -14,7 +14,7 @@
+ data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_rolesGrid',pageLinksId:'rolesPagination'">
@@ -156,16 +156,4 @@ - + diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html index 5a1abb79b..448789e3a 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html @@ -71,21 +71,6 @@ - - -