dojo工具提示对话框

时间:2014-01-27 09:18:33

标签: javascript dojo dojox.grid.datagrid

我有一个网格。在网格列中添加了下拉按钮,然后单击按钮打开工具提示对话框但是工具提示框打开几秒后消失。

我想要点击它显示的按钮,然后取消按钮隐藏。请提示是否有任何想法。 我正在关注enter link description here

1.dialog.jsp

 <table id="eventDialogInstructorTextBox" dojotype="dojox.grid.EnhancedGrid" data-dojo-           props="selectionMode:'none'" style="height: 50px;width:100%;align:top;background:white;margin-left:2%">
                                <thead>
                                <tr>
                                    <th field="id" width="85%" hidden="true">instKey</th>
                                    <th field="name" width="90%">instData</th>
                                    <th field=" " formatter="commentImg" width="10%"></th>
                                </tr>
                                </thead>
                        </table>

2.dialog.js

    function commentImg(){
    var dialog = new dijit.TooltipDialog({
        content:
            '<label for="name">Name:</label> <input data-dojo-type="dijit.form.TextBox" id="name" name="name"><br>' +
            '<label for="hobby">Hobby:</label> <input data-dojo-type="dijit.form.TextBox" id="hobby" name="hobby"><br>' +
            '<button data-dojo-type="dijit.form.Button" type="submit">Save</button>'
    });

    var button = new dijit.form.DropDownButton({
        label: "",
        dropDown: dialog,
     //   iconClass: commentButtonIcon
    });
  return button;
}

1 个答案:

答案 0 :(得分:0)

  1. 尝试在tooltipDialog

  2. 上设置closable : false
  3. 使用对话框。工具提示对话框在mouseleave上关闭

相关问题