You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/09/11 23:30:47 UTC
svn commit: r1383622 - in
/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js:
archiva/repositories.js templates/archiva/repositories.html
Author: olamy
Date: Tue Sep 11 21:30:46 2012
New Revision: 1383622
URL: http://svn.apache.org/viewvc?rev=1383622&view=rev
Log:
[MRM-648] Add description field to the different types of repositories and proxies
implements UI part.
Modified:
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js?rev=1383622&r1=1383621&r2=1383622&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js Tue Sep 11 21:30:46 2012
@@ -33,7 +33,7 @@ define("archiva.repositories",["jquery",
];
ManagedRepository=function(id,name,layout,indexDirectory,location,snapshots,releases,blockRedeployments,cronExpression,
- scanned,daysOlder,retentionCount,deleteReleasedSnapshots,stageRepoNeeded){
+ scanned,daysOlder,retentionCount,deleteReleasedSnapshots,stageRepoNeeded,description){
var self=this;
@@ -95,7 +95,9 @@ define("archiva.repositories",["jquery",
this.blockRedeployments=ko.observable(blockRedeployments?blockRedeployments:false);
this.blockRedeployments.subscribe(function(newValue){self.modified(true)});
-
+ //private String name;
+ this.description=ko.observable(description);
+ this.description.subscribe(function(newValue){self.modified(true)});
this.getTypeLabel=function(){
for(var i=0;i<window.managedRepositoryTypes.length;i++){
@@ -156,7 +158,7 @@ define("archiva.repositories",["jquery",
,data.releases,
data.blockRedeployments,data.cronExpression,
data.scanned,data.daysOlder,data.retentionCount,data.deleteReleasedSnapshots,
- data.stageRepoNeeded);
+ data.stageRepoNeeded,data.description);
}
mapArchivaRepositoryStatistics=function(data){
@@ -900,7 +902,7 @@ define("archiva.repositories",["jquery",
});
var mainContent = $("#main-content");
ko.applyBindings(managedRepositoriesViewModel,mainContent.find("#managed-repositories-view").get(0));
-
+ activatePopoverDoc();
mainContent.find("#managed-repositories-pills #managed-repositories-view-a").tab('show');
removeMediumSpinnerImg("#main-content #managed-repositories-content");
activateManagedRepositoriesGridTab();
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html?rev=1383622&r1=1383621&r2=1383622&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html Tue Sep 11 21:30:46 2012
@@ -90,6 +90,7 @@
<th>${$.i18n.prop('edit')}</th>
<th>${$.i18n.prop('delete')}</th>
<th>${$.i18n.prop('modified')}</th>
+ <th>${$.i18n.prop('description')}</th>
<th>${$.i18n.prop('managedrepository.pomsnippet')}</th>
<th title="${$.i18n.prop('managedrepository.stats')}">${$.i18n.prop('managedrepository.stats.grid.header')}</th>
<th title="${$.i18n.prop('managedrepository.scan.directories')}">${$.i18n.prop('managedrepository.scan.directories.grid.header')}</th>
@@ -144,6 +145,14 @@
{{else}}
<td></td>
{{/if}}
+ <td>
+ {{if row.description()}}
+ <a class="btn btn-warning btn-mini popover-doc" id="managedrepo-description-help"
+ data-content="${row.description()}" data-title="${$.i18n.prop('description')}">
+ <i class="icon-question-sign icon-white"></i>
+ </a>
+ {{/if}}
+ </td>
<td><a href="#" data-bind="click: function(){ showPomSnippet(row) }">${$.i18n.prop('managedrepository.pomsnippet')}</a></td>
<td id="managedrepository-stats-${row.id()}">
<img src="images/utilities-system-monitor-22-22.png" data-original-title="${$.i18n.prop('managedrepository.stats')}"
@@ -226,6 +235,14 @@
<input type="text" id="retentionCount" name="retentionCount" size="5" data-bind="value: managedRepository.retentionCount"/>
</div>
</div>
+
+ <div class="control-group">
+ <label class="control-label" for="daysOlder">${$.i18n.prop('description')}</label>
+ <div class="controls">
+ <textarea rows="3" id="description" name="description" data-bind="value: managedRepository.description"></textarea>
+ </div>
+ </div>
+
<div class="control-group">
<label class="control-label" for="releases">${$.i18n.prop('releases')}</label>
<div class="controls">