]> source.dussan.org Git - archiva.git/commitdiff
proxy connectors screen bulk save use btn class and add column to save only one
authorOlivier Lamy <olamy@apache.org>
Mon, 13 Feb 2012 08:59:17 +0000 (08:59 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 13 Feb 2012 08:59:17 +0000 (08:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1243443 13f79535-47bb-0310-9956-ffa450edef68

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

index 015555e24781ee70cf9d08035d1ab93833bd387d..3e645aea409d095151441bc2260a286e8b6c1b82 100644 (file)
@@ -297,6 +297,11 @@ $(function() {
                         $.i18n.prop('proxy.connector.bulk.save.confirm',modifiedProxyConnectors.length));
     }
 
+    updateProxyConnector=function(proxyConnector){
+      var viewModel = new ProxyConnectorViewModel(proxyConnector,true,self,false);
+      viewModel.save();
+    }
+
     editProxyConnector=function(proxyConnector){
       var proxyConnectorViewModel=new ProxyConnectorViewModel(proxyConnector,true,self);
       var mainContent = $("#main-content");
index 15a9cbb1533b855c2aa1a3b32e2b827c5bd39d6f..eadc3bec65db659c8048b8de6b5656da197e56b0 100644 (file)
         <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
           ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
         </th>
-        <th>
-            ${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}
-        </th>          
-        <th>
-          ${$.i18n.prop('edit')}
-        </th>
-        <th>
-          ${$.i18n.prop('delete')}
-        </th>
+        <th>${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}</th>
+        <th>${$.i18n.prop('edit')}</th>
+        <th>${$.i18n.prop('delete')}</th>
+        <th>${$.i18n.prop('save')}</th>
       </tr>
     </thead>
     <tbody>
           <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
         </a>
       </td>
+      <td>
+        {{if row.modified()}}
+          <a href="#" class="btn btn-warning" data-bind="click: function(){ updateProxyConnector(row)}">
+              ${$.i18n.prop('save')}
+          </a>
+        {{/if}}
+      </td>
     </tr>
     {{/each}}
     </tbody>
 </script>
 <script id="proxy-connectors-bulk-save-tmpl" type='text/x-jquery-tmpl'>
   {{if bulkSave()}}
-    <button data-bind="click: updateModifiedProxyConnectors" class="btn">${$.i18n.prop('save.all')}</button>
+    <a data-bind="click: updateModifiedProxyConnectors" class="btn btn-danger" href="#">${$.i18n.prop('save.all')}</a>
   {{/if}}
 </script>