diff --git a/application/admin/controllers/NewsController.php b/application/admin/controllers/NewsController.php index fc37725f..6957c649 100644 --- a/application/admin/controllers/NewsController.php +++ b/application/admin/controllers/NewsController.php @@ -386,7 +386,7 @@ class Admin_NewsController extends Zend_Controller_Action if(empty($title)) $msg[]="标题不能为空"; if(mb_strlen($title)>200) $msg[]="标题长度不能超过200个字符"; if(mb_strlen($keyword)>200) $msg[] = "关键词长度不能超过200个字符,现在输入了".strlen($keyword)."个字符"; - if(mb_strlen($description)>400) $msg[] = "内容描述不能超过200个字符,现在输入了".strlen($description)."个字符"; + if(mb_strlen($description)>1000) $msg[] = "内容描述不能超过1000个字符,现在输入了".strlen($description)."个字符"; if(empty($body)) $msg[]="请填写内容"; if(empty($typeid)) $msg[]="请选择栏目"; if(!is_array($typeid) || count($typeid)<1) diff --git a/application/admin/views/scripts/news/newsadd.phtml b/application/admin/views/scripts/news/newsadd.phtml index d1073930..95c5564c 100644 --- a/application/admin/views/scripts/news/newsadd.phtml +++ b/application/admin/views/scripts/news/newsadd.phtml @@ -198,18 +198,18 @@ function addon(){ }); } $('#description').val(''); - var limitNum = 200; - var pattern = '还可以输入' + limitNum + '字'; + var limitNum = 1000; + var pattern = '还可以输入' + limitNum + '个字符'; $('#enablelen').html(pattern); $('#description').keyup( function() { var remain = getByteLen($(this).val()); if (remain > limitNum) { var result = remain -limitNum; - pattern = '字数超过限制,请适当删除部分内容(超出了'+result+'字)'; + pattern = '字数超过限制,请适当删除部分内容(超出了'+result+'个字符)'; }else{ var result = limitNum - remain; - pattern = '还可以输入' + result + '字'; + pattern = '还可以输入' + result + '个字符'; } $('#enablelen').html(pattern); } diff --git a/application/admin/views/scripts/news/newsedit.phtml b/application/admin/views/scripts/news/newsedit.phtml index 131a9cc9..7fda5305 100644 --- a/application/admin/views/scripts/news/newsedit.phtml +++ b/application/admin/views/scripts/news/newsedit.phtml @@ -228,18 +228,18 @@ function addon(){ } }); } -var limitNum = 200; -var pattern = '还可以输入' + (limitNum-getByteLen($('#description').val())) + '字'; +var limitNum = 1000; +var pattern = '还可以输入' + (limitNum-getByteLen($('#description').val())) + '个字符'; $('#enablelen').html(pattern); $('#description').keyup( function() { var remain = getByteLen($(this).val()); if (remain > limitNum) { var result = remain -limitNum; - pattern = '字数超过限制,请适当删除部分内容(超出了'+result+'字)'; + pattern = '字数超过限制,请适当删除部分内容(超出了'+result+'个字符)'; }else{ var result = limitNum - remain; - pattern = '还可以输入' + result + '字'; + pattern = '还可以输入' + result + '个字符'; } $('#enablelen').html(pattern); }