display error detial in version submit
This commit is contained in:
parent
5ed06ccc78
commit
c197c946a4
|
@ -68,6 +68,17 @@
|
|||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
|
||||
function errorContentHtml(err){
|
||||
var html = "";
|
||||
if(err && err.error)
|
||||
html += "<h4>" + err.error + "</h4>";
|
||||
if(err && err.detail)
|
||||
html += "<p>" + err.detail + "</p>";
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function action(ac,id){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
|
@ -77,7 +88,7 @@ function action(ac,id){
|
|||
if (typeof(data)=='object')
|
||||
{
|
||||
if(typeof(data.error)!='undefined')
|
||||
{$.colorbox({'innerWidth':'50%','html':data.error});}
|
||||
{$.colorbox({'innerWidth':'50%','html': errorContentHtml(data)});}
|
||||
if(typeof(data.deleted)!='undefined')
|
||||
{$('#list_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||
if(typeof(data.commited)!='undefined')
|
||||
|
|
Loading…
Reference in New Issue