aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp-js
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-10-26 12:58:16 +0000
committerOlivier Lamy <olamy@apache.org>2012-10-26 12:58:16 +0000
commit25ebb715bf552ae4f54043fb0b5085fbd6914f3b (patch)
treebae3fe0265c5f410a616220ebd1eec745cb6c87d /archiva-modules/archiva-web/archiva-webapp-js
parentf10a08cc8cf54fa1821788f2bd19d79ba6e91d09 (diff)
downloadarchiva-25ebb715bf552ae4f54043fb0b5085fbd6914f3b.tar.gz
archiva-25ebb715bf552ae4f54043fb0b5085fbd6914f3b.zip
[MRM-1705] Feature to add custom parameters and/or headers when requesting an external repositories.
implements ui to delete extraParameters. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1402493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-js')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js10
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html2
2 files changed, 11 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
index 29f4b4b6d..4d605a8e9 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
@@ -888,6 +888,16 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
self.remoteRepository.modified(true);
}
+ deleteExtraParameter=function(key){
+ for(var i=0;i<self.remoteRepository.extraParametersEntries().length;i++){
+ var entry=self.remoteRepository.extraParametersEntries()[i];
+ if (entry.key==key){
+ self.remoteRepository.extraParametersEntries.remove(entry);
+ self.remoteRepository.modified(true);
+ }
+ }
+ }
+
}
RemoteRepositoriesViewModel=function(){
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
index 65f7b3c2f..03cc72a9d 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
@@ -198,7 +198,7 @@
<tr>
<td data-bind="text: key"></td>
<td data-bind="text: value"></td>
- <td><a href="#" data-bind="click: function(){ $parent.deleteExtraParameter(key)}">${$.i18n.prop('delete')}</a></td>
+ <td><a href="#" data-bind="click: function(){ deleteExtraParameter(key)}">${$.i18n.prop('delete')}</a></td>
</tr>
</tbody>
</table>