archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1224735 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback: redback-tmpl.js roles.js templates/roles-tmpl.html
Date Mon, 26 Dec 2011 15:06:42 GMT
Author: olamy
Date: Mon Dec 26 15:06:41 2011
New Revision: 1224735

URL: http://svn.apache.org/viewvc?rev=1224735&view=rev
Log:
display roles in a table

Added:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
  (with props)
Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback-tmpl.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback-tmpl.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback-tmpl.js?rev=1224735&r1=1224734&r2=1224735&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback-tmpl.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback-tmpl.js
Mon Dec 26 15:06:41 2011
@@ -18,8 +18,8 @@
  */
 require(["text!redback/templates/user-edit.html", "text!redback/templates/user-grids.html",
"text!redback/templates/login.html"
           , "text!redback/templates/register-form.html","text!redback/templates/password-change-form.html"
-          ,"text!redback/templates/user-edit-form.html"],
-    function(usercreate, usergrids, login,register,passwordchange,useredit) {
+          ,"text!redback/templates/user-edit-form.html","text!redback/templates/roles-tmpl.html"],
+    function(usercreate, usergrids, login,register,passwordchange,useredit,roles_tmpl) {
 
 
       $.tmpl( login, $.i18n.map ).appendTo("#html-fragments");
@@ -29,5 +29,7 @@ require(["text!redback/templates/user-ed
       // template loading
       $("#html-fragments").append(usercreate);
       $("#html-fragments").append(usergrids);
+      $("#html-fragments").append(roles_tmpl);
+
     }
 );
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js?rev=1224735&r1=1224734&r2=1224735&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js
Mon Dec 26 15:06:41 2011
@@ -24,6 +24,8 @@ $(function() {
   }
 
   displayRolesGrid = function(){
+    $("#user-messages").html("");
+    $("#main-content").html("");
     $.ajax("restServices/redbackServices/roleManagementService/allRoles",
       {
        type: "GET",
@@ -33,6 +35,8 @@ $(function() {
          var roles = $.map(data.role, function(item) {
              return mapRole(item);
          });
+         $("#main-content").html($("#rolesGrid").tmpl(data));
+
        }
       }
     );

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html?rev=1224735&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
(added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
Mon Dec 26 15:06:41 2011
@@ -0,0 +1,18 @@
+<script id="rolesGrid"  type="text/x-jquery-tmpl">
+  <table class="bordered-table zebra-striped" id="rolesTable">
+    <thead>
+      <tr>
+        <td>${$.i18n.prop('roles.name')}</td>
+        <td>${$.i18n.prop('roles.description')}</td>
+      </tr>
+    </thead>
+    <tbody>
+      {{each role}}
+        <tr>
+          <td>${$value.name}</td>
+          <td>${$value.description}</td>
+        </tr>
+      {{/each}}
+    </tbody>
+  </table>
+</script>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message