timeline.js

来自「axjx工具代码给大家交流」· JavaScript 代码 · 共 62 行

JS
62
字号

Class('App.linb_UI_TimeLine', 'linb.Com',{
    Instance:{
        iniComponents:function(){
            // [[code created by jsLinb UI Builder
            var host = this,
                children = [],
                append = function(child){
                    children.push(child.get(0))
                };

            append((new linb.UI.Button)
                .host(host,"button3")
                .setLeft(100)
                .setTop(30)
                .setCaption("drag me to calendar")
                .onRender("_button3_aftercreated")
            );

            append((new linb.UI.Block)
                .host(host,"block2")
                .setLeft(10)
                .setTop(80)
                .setWidth(420)
                .setHeight(304)
                .setResizer(true)
                .setBorder(true)
            );

            host.block2.append((new linb.UI.TimeLine)
                .host(host,"timeline1")
                .setLeft(10)
                .setTop(10)
                .setUnitPixs(30)
                .setIncrement(30)
                .setTimeSpanKey("2 h")
                .setMultiTasks(true)
                .setDropKeys("iEvent")
                .setWidth(796)
            );

            append((new linb.UI.Button)
                .host(host,"button5")
                .setLeft(140)
                .setTop(420)
                .setCaption("linb.reLang('cn')")
                .onClick("_button5_onclick")
            );

            return children;
            // ]]code created by jsLinb UI Builder
        },
        required:["linb.UI.Block","linb.UI.TimeLine","linb.UI.DatePicker", "linb.UI.Button"],
        _button3_aftercreated:function (profile) {
            profile.boxing().dragable('iEvent','data');
        },

        _button5_onclick:function (profile, e, value) {
            linb.reLang('cn');
        }
    }
});

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?