第三周第二天

今天任務(wù):

修改幾個(gè)頁(yè)面的 "更多"

==============================

http://localhost:8001/Project/IntegratedQuery/_StationRelevantOrderTable

訂單信息: "工程名稱"
http://localhost:8001/Project/IntegratedQuery/_OrderInfoTable?sno=&stationname=&area=&province=&ordercity=

訂單信息 -- 訂單信息 "變電站" "裝箱行名稱"
http://localhost:8001/Project/IntegratedQuery/_OrderDetailInfo

訂單信息中的 發(fā)運(yùn)信息 "裝箱行名稱"
http://localhost:8001/Project/IntegratedQuery/_OrderShipmentInfo

訂單信息 -- 訂單更改 "更改內(nèi)容"
http://localhost:8001/Project/IntegratedQuery/_OrderChange

還沒(méi)修改完. 明天繼續(xù).

===================================

1. dotdotdot 即使是空值,也會(huì)增加 "更多" 功能..

修改 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();
                    }
                    
 }
 );
 }
紅色方框內(nèi)為修改內(nèi)容

jquery.dotdotdot.js 還有幾個(gè)BUG,待以后修復(fù).

這個(gè)問(wèn)題折騰死我了. .搞了一下午.本來(lái)不想修改源碼的,在外面處理,發(fā)現(xiàn)根本不行..只能修改源碼.

2. 修改 昨天的功能..table彈出層.

今天發(fā)現(xiàn),如果橫滾動(dòng)條滾動(dòng)了,彈出的div,定位還是靠 table的左邊.所以今天又加上了 滾動(dòng)條的橫滾距離.

Snippet

function showPullDownListRow(e) {
    var td = $(e.target);
    var dd = $(e.target).parents(".content-bottom-IntegratedQuery"); //找到 可以滾動(dòng)的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 是為了鼠標(biāo)移動(dòng)到tr外邊緣時(shí),不至于立即觸發(fā)hidePullDownListRow.
        }
 
}

效果如下:

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容