$.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);
<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>
$(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
*/