make errormessages modular and better
This commit is contained in:
parent
88f21c5892
commit
f8018f8dfe
3 changed files with 15 additions and 16 deletions
|
@ -851,7 +851,8 @@ function doActivityItemAction(ident, verb, un) {
|
|||
$('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child').addClass('fa-share');
|
||||
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$.jGrowl(aActSrvErr[verb], {sticky: false, theme: 'info', life: 5000});
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$.jGrowl(aActErr[verb] + '<br>(' + aErrType['srvErr'] + ')', {sticky: false, theme: 'info', life: 5000});
|
||||
}
|
||||
})
|
||||
.error(function(data){
|
||||
|
@ -860,7 +861,7 @@ function doActivityItemAction(ident, verb, un) {
|
|||
$('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child').addClass('fa-share');
|
||||
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$.jGrowl(aActNetErr[verb], {sticky: false, theme: 'info', life: 5000});
|
||||
$.jGrowl(aActErr[verb] + '<br>(' + aErrType['netErr'] + ')', {sticky: false, theme: 'info', life: 5000});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ They are loaded into the html <head> so that js functions can use them *}}
|
|||
'blockAuthor' : "{{$blockAuthor|escape:'javascript' nofilter}}",
|
||||
'ignoreAuthor' : "{{$ignoreAuthor|escape:'javascript' nofilter}}",
|
||||
};
|
||||
var aActNetErr = {
|
||||
'like' : "{{$likeNetError}}",
|
||||
'dislike' : "{{$dislikeNetError}}",
|
||||
'announce' : "{{$annonNetError}}",
|
||||
var aActErr = {
|
||||
'like' : "{{$likeError}}",
|
||||
'dislike' : "{{$dislikeError}}",
|
||||
'announce' : "{{$announceError}}",
|
||||
};
|
||||
var aActSrvErr = {
|
||||
'like' : "{{$likeSrvError}}",
|
||||
'dislike' : "{{$dislikeSrvError}}",
|
||||
'announce' : "{{$annonSrvError}}",
|
||||
var aErrType = {
|
||||
'srvErr' : "{{$srvError}}",
|
||||
'netErr' : "{{$netError}}",
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue