修改错误处理文字显示

This commit is contained in:
yanxd 2014-04-09 11:15:34 +08:00
parent 1b6cdeac05
commit 383d62a353
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class Project < ActiveRecord::Base
validates_presence_of :name, :identifier
validates_uniqueness_of :identifier
validates_associated :repository, :wiki
validates_length_of :description, :maximum => 255
validates_length_of :description, :maximum => 1000
validates_length_of :name, :maximum => 255
validates_length_of :homepage, :maximum => 255
validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH

View File

@ -51,7 +51,7 @@ function showSubH(/* ... */){
}
}
function deal_error (argument) {
$('#OpenWindow-content').html('<span class=\"font_color_orange\" > ' + argument.status + argument.statusText + ' <\/span>\n');
$('#OpenWindow-content').html('<span class=\"font_color_orange\" > Network Error:<br/>http_status:' + argument.status + '<br/>statusText:' + argument.statusText + ' <\/span>\n');
}
$.post(post_url,{}, deal_post).error(deal_error);
}