今天任務:
修改幾個頁面的 "更多"
==============================
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.
}
}
效果如下: