index.js

来自「axjx工具代码给大家交流」· JavaScript 代码 · 共 355 行 · 第 1/2 页

JS
355
字号
Class('App', 'linb.Com',{        Instance:{        //base Class for linb.Com        base:["linb.UI"],         //requried class for the App        required:["linb.UI.MenuBar", "linb.UI.ToolBar", "linb.UI.Layout", "linb.UI.ButtonViews", "linb.UI.Stacks", "linb.UI.Button", "linb.UI.Panel", "linb.UI.TreeBar", "linb.UI.TreeGrid", "linb.UI.Block", "linb.UI.Pane", "linb.UI.ComboInput", "linb.UI.Label", "linb.UI.Input", "linb.UI.PopMenu", "linb.UI.Gallery", "linb.UI.Group", "linb.UI.RadioBox"],         iniComponents:function(){            // [[code created by jsLinb UI Builder            var host=this, children=[], append=function(child){children.push(child.get(0))};                        append((new linb.UI.PopMenu)                .host(host,"popmenu5")                .setItems([{"id":"a", "caption":"itema", "tips":"item a", "sub":[{"id":"aa", "caption":"suba"}, {"id":"ab", "caption":"subb"}]}, {"id":"b", "caption":"itemb", "tips":"item b"}, {"id":"c", "caption":"itemc", "tips":"item c"}])                .setWidth(91)                .setHeight(73)            );                        append((new linb.UI.Layout)                .host(host,"layout4")                .setItems([{"id":"before", "pos":"before", "locked":false, "size":200, "min":50, "max":200, "hide":false, "cmd":true, "caption":"before"}, {"id":"main", "min":10, "caption":"main"}])                .setLeft(0)                .setTop(0)                .setType("horizontal")            );                        host.layout4.append((new linb.UI.Pane)                .host(host,"panel13")                .setDock("top")                .setHeight(30)            , 'main');                        host.panel13.append((new linb.UI.Button)                .host(host,"button11")                .setLeft(480)                .setTop(7)                .setWidth(50)                .setCaption("option")                .onClick("_button11_onclick")            );                        host.panel13.append((new linb.UI.Label)                .host(host,"label4")                .setLeft(10)                .setTop(10)                .setCaption("<b>Look for:</b>")            );                        host.panel13.append((new linb.UI.Input)                .host(host,"input6")                .setLeft(340)                .setTop(8)            );                        host.panel13.append((new linb.UI.Label)                .host(host,"button11")                .setLeft(260)                .setTop(10)                .setWidth(70)                .setCaption("<b>Search in:</b>")            );                        host.panel13.append((new linb.UI.ComboInput)                .host(host,"comboinput14")                .setLeft(130)                .setTop(8)                .setItems([{"id":"a", "caption":"itema", "tips":"item a", "sub":[{"id":"aa", "caption":"suba"}, {"id":"ab", "caption":"subb"}]}, {"id":"b", "caption":"itemb", "tips":"item b"}, {"id":"c", "caption":"itemc", "tips":"item c"}])            );                        host.layout4.append((new linb.UI.Panel)                .host(host,"pnlNote")                .setCaption("Note Pane")            , 'main');                        host.pnlNote.append((new linb.UI.Gallery)                .host(host,"gallery5")                .setItems([{"id":"a", "caption":"Meeting..", "tips":"Meeting with Mr. Lincon", "image":"img/notice.gif"}, {"id":"b", "caption":"1:1 talk", "tips":"1:1 talk with Mr. Terry", "image":"img/notice.gif"}, {"id":"c", "caption":"Interview", "tips":"Interview with BCC", "image":"img/notice.gif"}])                .setDock("fill")                .setLeft(210)                .setTop(130)                .setItemPadding("4")                .setItemWidth("64")                .setItemHeight("64")                .setImgWidth("48")                .setImgHeight("48")            );                        host.layout4.append((new linb.UI.Panel)                .host(host,"pnlEmail")                .setCaption("Emails")            , 'main');                        host.pnlEmail.append((new linb.UI.Layout)                .host(host,"layout5")                .setItems([{"id":"before", "pos":"before", "locked":false, "size":200, "min":50, "max":200, "hide":false, "cmd":true, "caption":"before"}, {"id":"main", "min":10, "caption":"main"}])                .setLeft(0)                .setTop(0)            );                        host.layout5.append((new linb.UI.TreeGrid)                .host(host,"treegrid2")                .setDockMargin({"left":0, "top":0, "right":0, "bottom":0})                .setHeader([{"id":"col1", "caption":"From", "type":"input", "width":80}, {"id":"col2", "caption":"Subject", "type":"input", "width":340}, {"id":"col3", "caption":"Received", "type":"input", "width":80}, {"id":"col4", "caption":"size", "type":"input", "width":80}])                .setRows([])                .afterRowActive("_treegrid2_afterrowactive")            , 'before');                        host.layout5.append((new linb.UI.Block)                .host(host,"block2")                .setDock("fill")                .setDockMargin({"left":10, "top":10, "right":10, "bottom":10})                .setLeft(160)                .setTop(100)                .setBorder(true)                .setShadow(true)            , 'main');                        host.layout4.append((new linb.UI.ButtonViews)                .host(host,"buttonviews4")                .setItems([{"id":"email", "image":"img/allinone.gif", "imagePos":"-80px top", "tips":"Email", "caption":"email"}, {"id":"note", "image":"img/allinone.gif", "imagePos":"-96px top", "tips":"Note", "caption":"note"}, {"id":"contact", "image":"img/allinone.gif", "imagePos":"-48px top", "tips":"Contact", "caption":"contact"}])                .setLeft(0)                .setTop(0)                .setBarHAlign("right")                .setBarSize("28")                .onItemSelected("_buttonviews4_onitemselected")            , 'before');                        host.buttonviews4.append((new linb.UI.Panel)                .host(host,"panelbar4")                .setLeft(0)                .setTop(0)                .setZIndex(1)                .setCaption("Email")            , 'email');                        host.panelbar4.append((new linb.UI.TreeBar)                .host(host,"treebar5")                .setItems([{"id":"a", "caption":"Personal Folder", "image":"img/allinone.gif", "imagePos":"-128px top", "tips":"Personal Only", "sub":[{"id":"aa", "caption":"Inbox", "image":"img/allinone.gif", "imagePos":"-16px top"}, {"id":"ab", "caption":"Sent Items", "image":"img/allinone.gif", "imagePos":"-208px top"}, {"id":"ac", "caption":"Deleted Items", "image":"img/allinone.gif", "imagePos":"-240px top"}]}, {"id":"b", "caption":"<font color=red><b>Inbox(6)</b></font>", "tips":"incoming messages go here", "image":"img/allinone.gif", "imagePos":"-16px top"}, {"id":"c", "caption":"Outbox", "tips":"Sent items go here", "image":"img/allinone.gif", "imagePos":"-112px top"}])                .setLeft(0)                .setTop(0)                .setValue("")                .onItemSelected("_treebar5_onitemselected")            );                        host.buttonviews4.append((new linb.UI.Panel)                .host(host,"panelbar12")                .setLeft(0)                .setTop(0)                .setZIndex(1)                .setCaption("Note")            , 'note');                        host.panelbar12.append((new linb.UI.Group)                .host(host,"group1")                .setDock("top")                .setHeight(170)                .setCaption("Current View")            );                        host.group1.append((new linb.UI.RadioBox)                .host(host,"radiobox2")                .setItems([{"id":"a", "caption":"Show note images", "tips":"Show note images"}, {"id":"b", "caption":"Notes List", "tips":"Show notes within a list"}, {"id":"c", "caption":"Other", "tips":"Other"}])                .setDock("fill")                .setLeft(30)                .setTop(20)            );                        host.layout4.append((new linb.UI.Panel)                .host(host,"pnlContact")                .setCaption("Bussiness & Contact ")            , 'main');                        host.pnlContact.append((new linb.UI.Group)                .host(host,"group3")                .setLeft(20)                .setTop(30)                .setWidth(560)                .setHeight(150)

⌨️ 快捷键说明

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