新增用户管理和vpn服务器ip功能
This commit is contained in:
@@ -36,20 +36,23 @@ $(function(){
|
||||
$("#contentTable").find("td").each(function(i,element){
|
||||
//获取td当前对象的文本,如果长度大于25;
|
||||
if(!$(element).find(".tooltips").length>0){
|
||||
if($(this).text().trim().length>28){
|
||||
//给td设置title属性,并且设置td的完整值.给title属性.
|
||||
var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");
|
||||
//解决火狐title不能自动换行
|
||||
var count = Math.floor(strTitle.length/62);
|
||||
for(var i=1;i<=count;i++){
|
||||
strTitle=strTitle.substring(0,i*62-1)+"\n"+strTitle.substring(i*62-1);
|
||||
}
|
||||
$(this).attr("title",strTitle);
|
||||
//获取td的值,进行截取。赋值给text变量保存.
|
||||
var text=$(this).text().trim().substring(0,25)+"...";
|
||||
//重新为td赋值;
|
||||
$(this).text(text);
|
||||
}
|
||||
var tdclass= $(this).attr("class");//no_substr 不进行截取
|
||||
if(tdclass!='no_substr'){
|
||||
if($(this).text().trim().length>28){
|
||||
//给td设置title属性,并且设置td的完整值.给title属性.
|
||||
var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");
|
||||
//解决火狐title不能自动换行
|
||||
var count = Math.floor(strTitle.length/62);
|
||||
for(var i=1;i<=count;i++){
|
||||
strTitle=strTitle.substring(0,i*62-1)+"\n"+strTitle.substring(i*62-1);
|
||||
}
|
||||
$(this).attr("title",strTitle);
|
||||
//获取td的值,进行截取。赋值给text变量保存.
|
||||
var text=$(this).text().trim().substring(0,25)+"...";
|
||||
//重新为td赋值;
|
||||
$(this).text(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user