DataMarks

class webix.DataMarks()

Datamarks mixin

Referenced by

views
datatable(), proto().

External references

Official documentation page.

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
webix.DataMarks = {
    addCss:function(id, css, silent){
        if (!this.addRowCss && !silent){
            if (!this.hasCss(id, css)){
                var node = this.getItemNode(id);
                if (node){
                    node.className += " "+css;
                    silent = true;
                }
            }
        }
        return this.data.addMark(id, css, 1, 1, silent);
    },
    removeCss:function(id, css, silent){
        if (!this.addRowCss && !silent){
            if (this.hasCss(id, css)){
                var node = this.getItemNode(id);
                if (node){
                    node.className = node.className.replace(css,"").replace("  "," ");
                    silent = true;
                }
            }
        }
        return this.data.removeMark(id, css, 1, silent);
    },
    hasCss:function(id, mark){
        return this.data.getMark(id, mark);
    },
    clearCss:function(css, silent){
        return this.data.clearMark(css, 1, silent);
    }
};

/*
    DataStore is not a behavior, it standalone object, which represents collection of data.
    Call provideAPI to map data API

    @export
        exists
        getIdByIndex
        getIndexById
        get
        set
        refresh
        count
        sort
        filter
        next
        previous
        clearAll
        first
        last
*/