keenthemes

keenthemes supports this item

Supported

This author's response time can be up to 1 business day.

5487 comments found.

Hy,

is it possible to open a link in a new tab (target = “_blank”) with the DEFAULT TREE (#tree_1) from the ui_tree.html.

If i add target = “_blank” to a link it still opens the link in the same tab.

Regards Chris

Hi :),

You can handle this with below JS code:

$(”#my_tree”).jstree().bind(“select_node.jstree”, function (e, data) { var href = data.node.a_attr.href; document.location.href = href; });

For more info please check: http://stackoverflow.com/questions/18611317/how-to-get-i-get-leaf-nodes-in-jstree-to-open-their-hyperlink-when-clicked-when

=============

Just a friendly reminder: Seems your support subscription is expired and if you wish to get any further theme support you will need to renew your support subscription. For further check please go to Metronic purchase page http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes.

For more info please check: https://help.market.envato.com/hc/en-us/articles/208191263-What-is-Item-Support- or http://themeforest.net/page/item_support_policy

Thanks.

ok, thank you. But where do i have to add the code. In the theme file for my tree_1 i have this code. Which lines do i have to replace?

var handleSample1 = function () {
}
$('.tree_1').jstree({
    "core" : {
        "themes" : {
            "responsive": false
        }            
    },
    "types" : {
        "default" : {
            "icon" : "fa fa-folder icon-state-warning icon-lg" 
        },
        "file" : {
            "icon" : "fa fa-file icon-state-warning icon-lg" 
        }
    },
    "plugins": ["types"]
});
// handle link clicks in tree nodes(support target="_blank" as well)
$('.tree_1').on('select_node.jstree', function(e,data) { 
    var link = $('#' + data.selected).find('a');
    if (link.attr("href") != "#" && link.attr("href") != "javascript:;" && link.attr("href") != "") {
        if (link.attr("target") == "_blank") {
            link.attr("href").target = "_blank";
        }
        document.location.href = link.attr("href");
});
return false;
}

Hi,

I would suggest you to create a new custom script to initialize your own try by reusing one of the demo tree’s HTML and JS code. Then apply you can apply the above workaround.

You can put below JS code in your own script:

var UITree = function () {

    var handleSample1 = function () {

        $('#tree_1').jstree({
            "core" : {
                "themes" : {
                    "responsive": false
                }            
            },
            "types" : {
                "default" : {
                    "icon" : "fa fa-folder icon-state-warning icon-lg" 
                },
                "file" : {
                    "icon" : "fa fa-file icon-state-warning icon-lg" 
                }
            },
            "plugins": ["types"]
        });

        // handle link clicks in tree nodes(support target="_blank" as well)
        $('#tree_1').on('select_node.jstree', function(e,data) { 
            var link = $('#' + data.selected).find('a');
            if (link.attr("href") != "#" && link.attr("href") != "javascript:;" && link.attr("href") != "") {
                if (link.attr("target") == "_blank") {
                    link.attr("href").target = "_blank";
                }
                document.location.href = link.attr("href");
                return false;
            }
        });
    }

return {
        //main function to initiate the module
        init: function () {

            handleSample1();

        }

    };

}();

jQuery(document).ready(function() {    
       UITree.init();
});

And use below HTML code for your tree:

<div id="tree_1" class="tree-demo">
               <ul>
                  <li>
                     Root node 1
                     <ul>
                        <li data-jstree="{ "selected" : true }">
                           <a href="javascript:;">
                           Initially selected </a>
                        </li>
                        <li data-jstree="{ "icon" : "fa fa-briefcase icon-state-success " }">
                           custom icon URL
                        </li>
                        <li data-jstree="{ "opened" : true }">
                           initially open
                           <ul>
                              <li data-jstree="{ "disabled" : true }">
                                 Disabled Node
                              </li>
                              <li data-jstree="{ "type" : "file" }">
                                 Another node
                              </li>
                           </ul>
                        </li>
                        <li data-jstree="{ "icon" : "fa fa-warning icon-state-danger" }">
                           Custom icon class (bootstrap)
                        </li>
                     </ul>
                  </li>
                  <li data-jstree="{ "type" : "file" }">
                     <a href="http://www.jstree.com">
                     Clickanle link node </a>
                  </li>
               </ul>
            </div>

Thus you can customize your tree further according to your project requirements. For any further info you can refer to the plugin’s official documentation: https://www.jstree.com/

Thanks.

Hello,

I was checking this on mobile – in this link on mobile: http://keenthemes.com/preview/metronic/theme/admin_7_rounded/index.html

The close button moves way over on IOS.

Will there be a fix to this?

Here’s a screenshot from ios. http://s9.postimg.org/su1j1vpbj/image1.png

Hi :),

Thanks for reporting this issue. We will check it further and provide the fix in the next update very soon. Stay tuned.

If you need any further clarification please let us know.

Thanks.

minedun6

minedun6 Purchased

is there a way to get some sorts of gant chart or a kanban component ? These are some real world features that I could use for future projects ^^

Hi :),

Thanks for your feedback on this. At the moment we don’t have those components integrated. But we can consider them for a future releases. If you know any similar plugins you can suggest us and we will consider integrating them as soon as possible.

==============

Just a friendly reminder: Seems your support subscription is expired and if you wish to get any further theme support you will need to renew your support subscription. For further check please go to Metronic purchase page http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes.

For more info please check: https://help.market.envato.com/hc/en-us/articles/208191263-What-is-Item-Support- or http://themeforest.net/page/item_support_policy

Thanks.

gavinaw

gavinaw Purchased

When I tried to integrate plugin Editor1.5.6(I have 1 lincense) for Datatables, I got an error: Uncaught Editor requires DataTables 1.10.7 or newer. But looks like the version of datatables in metronic 4.7 is 1.10.2, can you help me? Thanks in advance!

gavinaw

gavinaw Purchased

Correct one typo, the version of datatables in metronic 4.7 is 1.10.12, newer than 1.10.7.

Hi,

Yes, the latest v4.7 uses DataTables 1.10.12. Since the error caused by the editor plugin you can ask the premium support of the datatables editor team and they should be able to point you out. If there is anything else you need from our side please let us know.

Thanks.

hasanAdib

hasanAdib Purchased

hi

i have a question … please help me

how can i create a menu for all page with selected and arrow open class ???

Hi :),

Sorry for the late reply. Could you please contact our support at support@keenthemes.com and clarify your question with more details ? Which admin theme are you using ? Are you using a server side code to generate your pages ? Do you want to expand a certain sub menu for selected menu item in the sidebar ?

Thanks.

Hi ,

I Try to use prototype.js but it trigger js error !! Uncaught TypeError: Cannot read property ‘css’ of null When I am click it on tab.

How can to ressolve this issue !!

How to resolve this issue **

the problem in Uncaught TypeError: Cannot read property ‘css’ of null : app.js file => when I am using prototype

Hi,

Metronic by default uses jquery and prototype.js is not officially supported. To use prototype.js with jquery based code you should check below link: https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

Thanks.

Hi there, could you tell me what your plans to support Bootstrap 4 are?

by
by
by
by
by
by