简体   繁体   中英

JsTree's nodes are not using using icons specified in Types plugin in IE

In my application I have the following jsTree created

$('#categoryTree').jstree({
    plugins: ['themes', 'html_data', 'contextmenu', 'ui', 'types'],
    contextmenu: {
        items: ContextMenuItems
    },
    ui: {
        select_limit: 0
    },
    themes: {
        theme: 'classic'
    },
    types: {
        type_attr: 'nodetype',
        types: {
            category: {
                icon: { image: baseUrl + '/Images/folder.png' }
            },

            testcase: {
                icon: { image: baseUrl + '/Images/hlp.png' }
            }
        }
    }
});

Everything is working great on FF and Chrome, category nodes use the specified folder.png and test case nodes use hlp.png as their icons.

However, Internet explorer does not seem to respect this and it uses the default icon for ALL nodes. Anyone have any ideas how to force IE to use the correct icons for the type, and not use the default icons?

Try putting this at the top of your page to disable quirks mode:

<!DOCTYPE html 
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

reference: http://groups.google.com/group/jstree/browse_thread/thread/e049c1a6eb24b44a

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM