all files / app/model/ view_mode.ts

94.44% Statements 17/18
50% Branches 5/10
100% Functions 4/4
93.75% Lines 15/16
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            1×   4×     4× 4× 4× 12× 8×   4× 4×       1×   1×         4× 4×   4×   1×  
/* Copyright CloudLinux Zug GmbH 2010-2017 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * http://cloudlinux.com/docs/LICENSE.TXT
 */
 
export class ViewMode {
 
    public linkedModes: string[] = [];
 
    constructor(
        public name: string,
        public title: TitleForViewMode,
        public checked: boolean,
        public Eactive: boolean = true,
        ElinkedModes: string[] = []
    ) {
        this.linkedModes.push(name);
        Iif (linkedModes.length) {
            this.linkedModes = this.linkedModes.concat(linkedModes);
        }
    }
}
 
export class TitleForViewMode {
 
    public tooltip: string;
 
    constructor(
        public value: string,
        Itooltip: string = ''
    ) {
        this.tooltip = !tooltip ? value : tooltip;
    };
}