mirror of https://github.com/apache/archiva.git
fix groupId deletion message
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381248 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7e28f6b4cd
commit
4b3d3b015e
|
@ -270,6 +270,7 @@ artifact.delete.confirm.title=Artifact deletion
|
|||
artifact.delete.confirm.save=Are you sure to delete this artifact ?
|
||||
groupId.delete.confirm.title=GroupId deletion
|
||||
groupId.delete.confirm.save=Are you sure to delete groupId: {0} ?
|
||||
groupdId.deleted=groupId {0} deleted.
|
||||
groupId.delete.missing.repoId= You must select a repository to delete a groupId.
|
||||
browse.artifact.version=Version
|
||||
browse.artifact.pom.snippet=POM Snippet
|
||||
|
|
|
@ -86,6 +86,8 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
|
|||
}
|
||||
|
||||
deleteGroupId=function(groupId){
|
||||
var previousHash=getUrlHash();
|
||||
$.log("previousHash:"+previousHash);
|
||||
var repoId=getSelectedBrowsingRepository();
|
||||
if(!repoId){
|
||||
displayErrorMessage($.i18n.prop('groupId.delete.missing.repoId'));
|
||||
|
@ -97,8 +99,8 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
|
|||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
|
||||
|
||||
window.sammyArchivaApplication.setLocation(previousHash);
|
||||
displaySuccessMessage( $.i18n.prop("groupdId.deleted", groupId));
|
||||
},
|
||||
error:function(data){
|
||||
displayRestError(data,"user-messages");
|
||||
|
@ -110,7 +112,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
|
|||
}, $.i18n.prop('ok'),
|
||||
$.i18n.prop('cancel'),
|
||||
$.i18n.prop('groupId.delete.confirm.title'),
|
||||
$.i18n.prop('groupId.delete.confirm.save'));
|
||||
$.i18n.prop('groupId.delete.confirm.save',groupId));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,11 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
|
|||
$(textId).focus();
|
||||
}
|
||||
|
||||
getUrlHash=function(){
|
||||
var matches = window.location.toString().match(/^[^#]*(#.+)$/);
|
||||
return matches ? matches[1] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* clear #main-content and call clearUserMessages
|
||||
*/
|
||||
|
|
|
@ -50,9 +50,16 @@
|
|||
{{/if}}
|
||||
{{each(i,browseResultEntry) browseResultEntries}}
|
||||
{{if browseResultEntry.project}}
|
||||
<li class="browse-list-project" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">
|
||||
<a href="#">${displayEntry(browseResultEntry.name)}</a>
|
||||
{{if deleteKarma}}
|
||||
<li class="browse-list-project">
|
||||
<img src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
|
||||
<a href="#" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="browse-list-project">
|
||||
<a href="#" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{if deleteKarma}}
|
||||
<li class="browse-list">
|
||||
|
|
Loading…
Reference in New Issue