Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

It works! Thank you for your support!

2

it's bug, Mif.Tree.Draw.update don't update node.cls info, fixed rev 28.

function disablePath(node){
    var parent = node.getParent();
    if(parent){
        parent.removeType('folder');
        parent.addType('parent');
        disablePath(parent);
    }
}

should work with latest rev.

3

I met another problem, after I changed node type (at first deleted old one, and then added another), it didn't change its appearance(and it don't have to). I thought Mif.Tree.Draw.update(node) will help me, but it didn't. Here is the code:

function disablePath(node){
    var parent = node.getParent();
    if(parent){
        parent.removeType('folder');
        parent.addType('parent');
        disablePath(parent);
        Mif.Tree.Draw.update(parent);
    }
}

Could you please help me to show changed style?

4

moro wrote:
types: {
            folder:{
                openIcon: 'mif-tree-open-icon',
                closeIcon: 'mif-tree-close-icon',
                cls: 'my-node-class'
            }
        },

Thank you very much. And sorry for bothering you

5

I found how to do it. It looks like this

types: {
            folder:{
                cls: 'mif-tree-node-stype'
            }
        },

Sorry, for writing here before trying to find resolution by myself.

6

types: {
            folder:{
                openIcon: 'mif-tree-open-icon',
                closeIcon: 'mif-tree-close-icon',
                cls: 'my-node-class'
            }
        },

7

Hello moro! How can I add custom css style to node type? I saw this

types: {
            folder:{
                openIcon: 'mif-tree-open-icon',
                closeIcon: 'mif-tree-close-icon'
            }
        },

in your examples, and is it possible to add something like this 

 name: 'mif-tree-nodeName'

to change node font according to its type?