jQWidgets Forums

jQuery UI Widgets Forums Navigation NavigationBar, ToolBar, NavBar jqxToolBar disableTool not working

This topic contains 2 replies, has 2 voices, and was last updated by  Nadezhda 10 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • jqxToolBar disableTool not working #69816

    jqwidgetsdev
    Participant

    Hello.

    What is the correct way to disable a tool within its constructor?

    I do not seem to be able to get disableTool working.
    Any suggestion?

              $("#jqxToolBar").jqxToolBar({ width: "100%", height: 35, tools: 'button',
                    initTools: function (type, index, tool, menuToolIninitialization) {
                        if (type == "button") {
                            var icon = $("<div class='jqx-editor-toolbar-icon jqx-editor-toolbar-icon-" + theme + " buttonIcon'></div>");
                            }
    
                        switch (index) {
                            case 0:
                                tool.text("Delete");
    
                                $("#jqxToolBar").jqxToolBar("disableTool", 0, true);   <============== does not do anything
                               break;
                            }
                        }
                     });

    Thank you.

    jqxToolBar disableTool not working #69842

    Nadezhda
    Participant

    Hello jqwidgetsdev,

    Thank you for your feedback. We reproduced the reported issue and will fix it as soon as possible.

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    jqxToolBar disableTool not working #70109

    Nadezhda
    Participant

    Updated: Please, find the following example:

    $("#jqxToolBar").jqxToolBar({ width: "100%", height: 35, tools: 'button',
        initTools: function (type, index, tool, menuToolIninitialization) {
            if (type == "button") {
                var icon = $("<div class='jqx-editor-toolbar-icon jqx-editor-toolbar-icon-" + theme + " buttonIcon'></div>");
            }
    
            switch (index) {
                case 0:
                    tool.text("Delete");
                    break;
            }

    The ‘disableTool’ method will work correctly if the following line $("#jqxToolBar").jqxToolBar("disableTool", 1, true); is used out of ‘initTools’.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.