mirror of https://github.com/apache/archiva.git
display a spinner when something happend instead of no user informations
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1425077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cfeda8df92
commit
f4af9f8529
|
@ -401,7 +401,10 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
||||||
}
|
}
|
||||||
|
|
||||||
disableKnowContentConsumer=function(adminRepositoryConsumer){
|
disableKnowContentConsumer=function(adminRepositoryConsumer){
|
||||||
|
$.log("disableKnowContentConsumer");
|
||||||
clearUserMessages();
|
clearUserMessages();
|
||||||
|
var userMessages=$("#user-messages" )
|
||||||
|
userMessages.html(mediumSpinnerImg());
|
||||||
var url="restServices/archivaServices/archivaAdministrationService/disabledKnownContentConsumer/"
|
var url="restServices/archivaServices/archivaAdministrationService/disabledKnownContentConsumer/"
|
||||||
url+=encodeURIComponent(adminRepositoryConsumer.id());
|
url+=encodeURIComponent(adminRepositoryConsumer.id());
|
||||||
$.ajax(url, {
|
$.ajax(url, {
|
||||||
|
@ -410,12 +413,15 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
||||||
success: function(data){
|
success: function(data){
|
||||||
adminRepositoryConsumer.enabled(false);
|
adminRepositoryConsumer.enabled(false);
|
||||||
displaySuccessMessage( $.i18n.prop("repository-scanning.consumers.know.disabled",adminRepositoryConsumer.id()));
|
displaySuccessMessage( $.i18n.prop("repository-scanning.consumers.know.disabled",adminRepositoryConsumer.id()));
|
||||||
|
removeMediumSpinnerImg(userMessages);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
enableKnowContentConsumer=function(adminRepositoryConsumer){
|
enableKnowContentConsumer=function(adminRepositoryConsumer){
|
||||||
clearUserMessages();
|
clearUserMessages();
|
||||||
|
var userMessages=$("#user-messages" )
|
||||||
|
userMessages.html(mediumSpinnerImg());
|
||||||
var url="restServices/archivaServices/archivaAdministrationService/enabledKnownContentConsumer/"
|
var url="restServices/archivaServices/archivaAdministrationService/enabledKnownContentConsumer/"
|
||||||
url+=encodeURIComponent(adminRepositoryConsumer.id());
|
url+=encodeURIComponent(adminRepositoryConsumer.id());
|
||||||
$.ajax(url, {
|
$.ajax(url, {
|
||||||
|
@ -424,6 +430,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
||||||
success: function(data){
|
success: function(data){
|
||||||
adminRepositoryConsumer.enabled(true);
|
adminRepositoryConsumer.enabled(true);
|
||||||
displaySuccessMessage( $.i18n.prop("repository-scanning.consumers.know.enabled",adminRepositoryConsumer.id()));
|
displaySuccessMessage( $.i18n.prop("repository-scanning.consumers.know.enabled",adminRepositoryConsumer.id()));
|
||||||
|
removeMediumSpinnerImg(userMessages);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,13 +224,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
{{if knownAdminRepositoryConsumer.enabled()==true}}
|
{{if knownAdminRepositoryConsumer.enabled()==true}}
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data-bind="click: function(){ disableKnowContentConsumer(knownAdminRepositoryConsumer) }">
|
<a class="cursor-hand" data-bind="click: function(){ disableKnowContentConsumer(knownAdminRepositoryConsumer) }">
|
||||||
<img src="images/weather-clear-22-22.png"/>
|
<img src="images/weather-clear-22-22.png"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data-bind="click: function(){ enableKnowContentConsumer(knownAdminRepositoryConsumer) }">
|
<a class="cursor-hand" data-bind="click: function(){ enableKnowContentConsumer(knownAdminRepositoryConsumer) }">
|
||||||
<img src="images/dialog-error-22-22.png"/>
|
<img src="images/dialog-error-22-22.png"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue