iteye_16591 2010-03-17 17:25
浏览 345
已采纳

我想用EXT把菜单的双击展开和收缩,改为单击就能展开和收缩

我想用EXT把菜单的双击展开和收缩,改为单击就能展开和收缩,是怎么改啊???






return "{id:'menu_"+menu.getMenuId()+"'"
      +",text:'"+menu.getMenuName()+"'"
      +( ("0".equals(menu.getOpenMethod()))
    ?(",listeners:{'click':function openwin(node,event){event.stopEvent();"
    +" var w=screen.width - 9;"
    +" var h=screen.height - 55;"
    +" if(w>1200){"
    +" w = 1024 - 9;"
    +"   h = 768 - 55;"
    +" };"
    +" window.open(\""
    + ((menu.getPageLink().startsWith("/"))
       ?ServletActionContext.getRequest().getContextPath() + menu.getPageLink()
       :menu.getPageLink()
       )
    + "\","
    + "\"csms_mainframe\",\"status=no,left=0,top=0,width=\"+w+\",height=\"+h+\",fullscreen=no,scrollbars=no,location=no,directories=no,menubar=no,resizable=yes,titlebar=no\") ;"
    +" }}"
    ) //
    :(
       ("1".equals(menu.getOpenMethod()))
       ?(",listeners:{'click':function(node,event){event.stopEvent();gotoUrl(node,'"+menu.getPageLink()+"','"+menu.getFrameName()+"');}}")
      ",listeners:{'click':function(node, event)  { "
    +" event.stopEvent();"
    +" var w=document.body.clientWidth;"
    +" var h=document.body.clientHeight;"
    +" if(w < 801){"
    +" w = 750;"
    +"   h = 550;"
    +" };"
         +" showWindowIframe(\""+menu.getMenuName()+"\",\""
    + ((menu.getPageLink().startsWith("/"))
    ?ServletActionContext.getRequest().getContextPath() + menu.getPageLink()
:menu.getPageLink()
   )+"\",w/2,h/2); "
    +"}}"
         )
          )
       )  
      +" ###LEAF_STR###"
      +" ###CHILDREN_STR###"
      +"},";

问题补充
前段时间已经弄出来了,不过还是感谢啊!!!

  • 写回答

2条回答 默认 最新

  • iteye_18496 2010-03-17 17:25
    关注

    菜单节点的参数可以配置,
    在新建每个节点的时候 也就是是Ext.tree.TreeNode的时候,给它加上参数singleClickExpand ,设置为true就可以了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器