增加配置新增时描述的文字长显示128,配置列表的过长文字截取
This commit is contained in:
@@ -1,4 +1,25 @@
|
||||
$(function(){
|
||||
//增加描述新增时的文字长度限制
|
||||
$("form input[name='cfgDesc']").attr("maxlength","128")
|
||||
//截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb
|
||||
$("#contentTable").not(".logTb").find("td").each(function(i){
|
||||
//获取td当前对象的文本,如果长度大于25;
|
||||
if($(this).text().trim().length>28){
|
||||
//给td设置title属性,并且设置td的完整值.给title属性.
|
||||
var strTitle = $(this).text().trim();
|
||||
//解决火狐title不能自动换行
|
||||
var count = Math.floor(strTitle.length/64);
|
||||
for(var i=1;i<=count;i++){
|
||||
strTitle=strTitle.substring(0,i*64-1)+"\n"+strTitle.substring(i*64-1);
|
||||
}
|
||||
$(this).attr("title",strTitle);
|
||||
//获取td的值,进行截取。赋值给text变量保存.
|
||||
var text=$(this).text().substring(0,25)+"...";
|
||||
//重新为td赋值;
|
||||
$(this).text(text);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name$='isCaseSenstive']").on("change",function(){
|
||||
setIsHexBin(this);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user