archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1243439 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback: roles.js templates/roles-tmpl.html
Date Mon, 13 Feb 2012 08:57:56 GMT
Author: olamy
Date: Mon Feb 13 08:57:55 2012
New Revision: 1243439

URL: http://svn.apache.org/viewvc?rev=1243439&view=rev
Log:
roles screen add a column to save modified roles

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html

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=1243439&r1=1243438&r2=1243439&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 Feb 13 08:57:55 2012
@@ -179,6 +179,17 @@ $(function() {
       }
     }
 
+    updateRole=function(modifiedRole){
+      if (modifiedRole.modified()){
+        modifiedRole.updateDescription();
+        modifiedRole.modified(false);
+      }
+      if (modifiedRole.usersModified()){
+        modifiedRole.updateUsers();
+        modifiedRole.usersModified(false);
+      }
+    }
+
   }
 
   displayRolesGrid = function(){

Modified: 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=1243439&r1=1243438&r2=1243439&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html
Mon Feb 13 08:57:55 2012
@@ -190,6 +190,7 @@
           <th>${ columnDefinition.headerText }</th>
         {{/each}}
         <th>${$.i18n.prop('edit')}</th>
+        <th>${$.i18n.prop('save')}</th>
       </tr>
   </thead>
   <tbody>
@@ -204,6 +205,11 @@
               <td>
                 <a id="edit-role-${row.name()}" href="#" data-bind="click: function(){
editRole(row) }">${$.i18n.prop('edit')}</a>
               </td>
+              <td>
+                {{if row.modified()}}
+                  <a href="#" class="btn" data-bind="click: function(){ updateRole(row)
}">${$.i18n.prop('save')}</a>
+                {{/if}}
+              </td>
           </tr>
       {{/each}}
   </tbody>



Mime
View raw message