mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Hnadle error in Lightbox API
This commit is contained in:
@@ -183,12 +183,10 @@ function set_release(el)
|
||||
$('.loader', el).css({
|
||||
visibility:'hidden'
|
||||
});
|
||||
if(data.error)
|
||||
if(data.datas)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
alert(data.datas);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -708,6 +706,8 @@ function set_agreement(event, el, sselcont_id, boolean_value)
|
||||
agreement : boolean_value
|
||||
},
|
||||
success: function(datas){
|
||||
if(!datas.error)
|
||||
{
|
||||
if(boolean_value == '1')
|
||||
{
|
||||
$('.agree_'+sselcont_id+'').removeClass('not_decided');
|
||||
@@ -725,6 +725,11 @@ function set_agreement(event, el, sselcont_id, boolean_value)
|
||||
{
|
||||
if(confirm(datas.releasable))
|
||||
$('#basket_options .confirm_report').trigger('click');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(datas.datas);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@@ -217,12 +217,10 @@ function set_release(el)
|
||||
$('.loader', el).css({
|
||||
visibility:'hidden'
|
||||
});
|
||||
if(data.error)
|
||||
if(data.datas)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
alert(data.datas);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -759,6 +757,8 @@ function set_agreement(event, el, sselcont_id, boolean_value)
|
||||
agreement : boolean_value
|
||||
},
|
||||
success: function(datas){
|
||||
if(!datas.error)
|
||||
{
|
||||
if(boolean_value == '1')
|
||||
{
|
||||
$('.agree_'+sselcont_id+'').removeClass('not_decided');
|
||||
@@ -777,6 +777,11 @@ function set_agreement(event, el, sselcont_id, boolean_value)
|
||||
if(confirm(datas.releasable))
|
||||
$('#basket_options .confirm_report').trigger('click');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(datas.datas);
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
@@ -24,6 +24,8 @@ $(document).ready(function(){
|
||||
$.mobile.pageLoading(true);
|
||||
},
|
||||
success: function(datas){
|
||||
if(!datas.error)
|
||||
{
|
||||
if(agreement == '1')
|
||||
$('.valid_choice_'+sselcont_id).removeClass('disagree').addClass('agree');
|
||||
else
|
||||
@@ -34,6 +36,11 @@ $(document).ready(function(){
|
||||
alert(datas.datas);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(datas.datas);
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user