今天任务:
修改几个页面的 "更多"
==============================
http://localhost:8001/Project/IntegratedQuery/_StationRelevantOrderTable
订单信息: "工程名称"
http://localhost:8001/Project/IntegratedQuery/_OrderInfoTable?sno=&stationname=&area=&province=&ordercity=
订单信息 -- 订单信息 "变电站" "装箱行名称"
http://localhost:8001/Project/IntegratedQuery/_OrderDetailInfo
订单信息中的 发运信息 "装箱行名称"
http://localhost:8001/Project/IntegratedQuery/_OrderShipmentInfo
订单信息 -- 订单更改 "更改内容"
http://localhost:8001/Project/IntegratedQuery/_OrderChange
还没修改完. 明天继续.
===================================
1. dotdotdot 即使是空值,也会增加 "更多" 功能..
修改 jquery.dotdotdot.js
/*
* jQuery dotdotdot 1.8.1
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Plugin website:
* dotdotdot.frebsite.nl
*
* Licensed under the MIT license.
* http://en.wikipedia.org/wiki/MIT_License
*/
(function( $, undef )
{
if ( $.fn.dotdotdot )
{
return;
}
$.fn.dotdotdot = function( o )
{
if ( this.length == 0 )
{
$.fn.dotdotdot.debug( 'No element found for "' + this.selector + '".' );
return this;
}
if ( this.length > 1 )
{
return this.each(
function()
{
var txt = $(this)[0].innerHTML.split("<")[0].replace(/[\r\n]/g, "").trim();
if(txt.length>10)
{
$(this).dotdotdot(o);
}
else {
$(this).find("a").remove();
}
}
);
}
jquery.dotdotdot.js 还有几个BUG,待以后修复.
这个问题折腾死我了. .搞了一下午.本来不想修改源码的,在外面处理,发现根本不行..只能修改源码.
2. 修改 昨天的功能..table弹出层.
今天发现,如果横滚动条滚动了,弹出的div,定位还是靠 table的左边.所以今天又加上了 滚动条的横滚距离.
Snippet
function showPullDownListRow(e) {
var td = $(e.target);
var dd = $(e.target).parents(".content-bottom-IntegratedQuery"); //找到 可以滚动的div
var tr = $($(e.target).parents()[0]);
var firstChild = tr.find("div")[0];
var next = firstChild;
if (!next) return;
if (next.style.display != "block") {
next.style.display = "block";
IsShowPullDownDIV = true;
tr.unbind("onmouseover", showPullDownListRow);
$(next).css("left", (tr.position().left + dd[0].scrollLeft));
$(next).css("top", (tr.position().top + tr.height() - 0.5));//-0.5 是为了鼠标移动到tr外边缘时,不至于立即触发hidePullDownListRow.
}
}
效果如下: