EasyUI Forum
October 18, 2025, 04:57:06 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / Re: linkbutton 的问题 on: August 24, 2011, 06:14:30 PM
When you set up the 'click' handler, you can add some code to check if the linkbutton is disabled. The code looks like this:
Code:
$('#xxx').click(function(){
  if ($(this).linkbutton('options').disabled == false){
    // do your action
  }
});
我对 linkbutton做了修改,可直接屏蔽click事件:
Code:

    function setDisabled(target, disabled) {

        var state = $.data(target, "linkbutton");
        if (disabled) {
            state.options.disabled = true;
            var href = $(target).attr("href");
            if (href) {
                state.href = href;
                $(target).attr("href", "javascript:void(0)");
            }
            if (target.onclick) {
                state.onclick = target.onclick;
                target.onclick = null;
            }
            //事件处理
        var events = $(target).data("events");
        if(events){
            var clicks = events.click;//暂时只处理click事件
            state.events = state.events||[];
            $.extend(state.events, clicks);
            $(target).unbind("click");
        }
           
            $(target).addClass("l-btn-disabled");
        } else {
            state.options.disabled = false;
            if (state.href) {
                $(target).attr("href", state.href);
            }
            if (state.onclick) {
                target.onclick = state.onclick;
            }
            if (state.events) {
            for ( var i=0;i<state.events.length;i++){
            $(target).bind(state.events[i].type,state.events[i].handler);
                }
            }
            $(target).removeClass("l-btn-disabled");
        }
    };   



2  General Category / Bug Report / Re: linkbutton 的问题 on: August 17, 2011, 05:54:22 PM
楼主,顶上去,我也遇到同样的问题了。怎么弄都不好使,环境是 1.2.4 ,Firfox
3  General Category / Bug Report / Panel 最大化问题 on: July 24, 2011, 08:30:33 PM
Panel最大化它大小是由父容器决定,这就有个问题:如果父容器里只有一个Panel(没有其它元素或标签),Panel最大化,恰好正常。如果父容器中有其它元素,测Panel最大化时,它会向下移而使父容器出现滚动条!

建议:panel最大化时,直接和window inline一样,直接从父容器的顶点开始!

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!