Manage errors (#1689)
This commit is contained in:
parent
1cf78550b4
commit
106e20bbc5
|
@ -15,7 +15,7 @@ FavApps = (star) ->
|
|||
dataType: 'json'
|
||||
success: (resp) ->
|
||||
if resp.error
|
||||
console.log 'Error'
|
||||
console.log 'Max number reached'
|
||||
switchStar star, 0
|
||||
else if resp.result
|
||||
console.log 'App. registered'
|
||||
|
|
|
@ -20,7 +20,7 @@ LemonLDAP::NG Favorite Applications script
|
|||
dataType: 'json',
|
||||
success: function(resp) {
|
||||
if (resp.error) {
|
||||
console.log('Error');
|
||||
console.log('Max number reached');
|
||||
return switchStar(star, 0);
|
||||
} else if (resp.result) {
|
||||
console.log('App. registered');
|
||||
|
|
|
@ -1 +1 @@
|
|||
(function(){var FavApps,switchStar;FavApps=function(star){return $.ajax({type:"POST",url:portal+"favapps",data:{app:star.attr("appuri"),logo:star.attr("logo"),desc:star.attr("desc"),title:star.attr("title")},dataType:"json",success:function(resp){if(resp.error){console.log("Error");return switchStar(star,0)}else if(resp.result){console.log("App. registered");return switchStar(star,1)}else{console.log("App. unregistered");return switchStar(star,0)}}})};switchStar=function(star,status){return star.attr("src",window.staticPrefix+"common/icons/star"+status+".png")};$(document).ready(function(){return $("body").on("click",".star",function(){return FavApps($(this))})})}).call(this);
|
||||
(function(){var FavApps,switchStar;FavApps=function(star){return $.ajax({type:"POST",url:portal+"favapps",data:{app:star.attr("appuri"),logo:star.attr("logo"),desc:star.attr("desc"),title:star.attr("title")},dataType:"json",success:function(resp){if(resp.error){console.log("Max number reached");return switchStar(star,0)}else if(resp.result){console.log("App. registered");return switchStar(star,1)}else{console.log("App. unregistered");return switchStar(star,0)}}})};switchStar=function(star,status){return star.attr("src",window.staticPrefix+"common/icons/star"+status+".png")};$(document).ready(function(){return $("body").on("click",".star",function(){return FavApps($(this))})})}).call(this);
|
||||
|
|
Loading…
Reference in New Issue