]> source.dussan.org Git - archiva.git/commitdiff
button must be visible but disabled if nothing to save
authorOlivier Lamy <olamy@apache.org>
Mon, 22 Apr 2013 12:45:50 +0000 (12:45 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 22 Apr 2013 12:45:50 +0000 (12:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1470480 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html

index 013b1c85fbfc22bf9058f76bfeb9789ea954edd7..d8e65c49c25d433ff5305a1cc7584e5d5ca8296b 100644 (file)
         </a>
       </td>
       <td>
-        {{if repositoryGroup.modified()}}
-        <a href="#" class="btn btn-warning" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">
+        <a href="#" class="btn btn-warning" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)},css: { disabled: repositoryGroup.modified()==false }">
           ${$.i18n.prop('save')}
         </a>
-        {{/if}}
       </td>
     </tr>
     {{/each}}
       </form>
     </div>
 
-    {{if repositoryGroup.modified()}}
+
     <div class="span3">
       <a href="#" class="btn btn-warning" data-loading-text="${$.i18n.prop('common.loading')}"
-         id="repository-group-save" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">${$.i18n.prop('save')}</a>
+         id="repository-group-save" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)},css: { disabled: repositoryGroup.modified()==false }">${$.i18n.prop('save')}</a>
     </div>
     <br/>
-    {{/if}}
+
   </div>
 </script>