mirror of https://github.com/apache/archiva.git
add a method to display info messages and use it when call scanRepo
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233616 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
28a7a9cee8
commit
38b64bd49d
|
@ -267,10 +267,11 @@ $(function() {
|
|||
$.ajax(url,
|
||||
{
|
||||
type: "GET",
|
||||
beforeSend:function(){
|
||||
displayInfoMessage($.i18n.prop("managedrepository.scan.started"));
|
||||
},
|
||||
success: function(data) {
|
||||
self.managedRepositories.remove(managedRepository);
|
||||
displaySuccessMessage($.i18n.prop("managedrepository.scanned",managedRepository.name()));
|
||||
|
||||
},
|
||||
error: function(data) {
|
||||
var res = $.parseJSON(data.responseText);
|
||||
|
|
|
@ -34,4 +34,10 @@
|
|||
<p>${message}</p>
|
||||
</div>
|
||||
</script>
|
||||
<script id='alert-message-info' type='text/x-jquery-tmpl'>
|
||||
<div class="alert-message fade in info" data-alert="alert">
|
||||
<a class="close" href="#" id='alert-message-info-close-a'>×</a>
|
||||
<p>${message}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -73,6 +73,12 @@ displayWarningMessage=function(text,idToAppend){
|
|||
$(textId).focus();
|
||||
}
|
||||
|
||||
displayInfoMessage=function(text,idToAppend){
|
||||
var textId = idToAppend ? $("#"+idToAppend) : $("#user-messages");
|
||||
$.tmpl($("#alert-message-info").html(), { "message" : text }).appendTo( textId );
|
||||
$(textId).focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* clear #main-content and call clearUserMessages
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue