zoukankan      html  css  js  c++  java
  • extjs 树前面的多选框选中状态修改

    在treepanel的事件中添加:

     1                    listeners: {
     2                            
     3 //                            itemdbclick:{                            
     4 //                                fn: function(view, record, item, index, e,obj){
     5 //                                    alert('dbclick');e.stopEvent;
     6 //                                },
     7 //                                scope: this
     8 //                            }
     9 //                            ,
    10 //                             itemclick: {
    11 //                                    fn: function(view, record, item, index, e,obj){
    12 //                                            alert(record.data.id+':'+record.data.text);
    13 //                                            e.stopEvent;
    14 //                                        },
    15 //                                    scope: this
    16 //                            },
    17                             checkchange: {
    18                                 fn: function(node,checked,obj) {
    19 
    20                                       if(checked)
    21                                       {
    22                                           var pNode = node.parentNode;
    23                                           for(;pNode!=null;pNode=pNode.parentNode)
    24                                           {
    25                                             pNode.set('checked',checked);
    26                                           }
    27                                       }
    28 
    29                                       if(node.childNodes.length>0)
    30                                       {
    31                                          node.cascade(function(node){
    32                                             node.set('checked',checked);
    33                                          });
    34                                       }
    35 
    36                                 }
    37                             }
  • 相关阅读:
    css3中的位置移动
    css中伪元素选择器
    css中伪类选择器
    html5之属性选择器
    html5的文本属性
    html5的视频和音频使用
    常用的linux命令
    常见的http状态码
    springboot之安装和启动es
    linux版本的jdk安装
  • 原文地址:https://www.cnblogs.com/baishahe/p/2514984.html
Copyright © 2011-2022 走看看