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