📄 index.js
字号:
Class('App', 'linb.Com',{ Instance:{ $v1:null, $v2:null, iniComponents:function(){ // [[code created by jsLinb UI Builder var host=this, children=[], append=function(child){children.push(child.get(0))}; append((new linb.DataBinder) .host(host,"dbOrder") .setName("order") ); append((new linb.UI.Block) .host(host,"block1") .setDock("top") .setHeight(70) ); host.block1.append((new linb.UI.Div) .host(host,"div18") .setLeft(10) .setTop(1) .setWidth("62") .setHeight("62") .setHtml("<img src='img/001.gif'>") ); host.block1.append((new linb.UI.Div) .host(host,"div19") .setLeft(90) .setTop(0) .setWidth(470) .setHeight(60) .setHtml("<font size=8>Order Management</font>") ); append((new linb.UI.Block) .host(host,"block3") .setDock("left") .setWidth(160) ); host.block3.append((new linb.UI.Stacks) .host(host,"stacks1") .setItems([{"id":"a", "caption":"Task", "tips":"Task - Orders - Customers", "image":"img/module.gif"}, {"id":"b", "caption":"Set up", "tips":"item b", "image":"img/module.gif"}, {"id":"c", "caption":"About", "tips":"item c", "image":"img/module.gif"}]) .setLeft(0) .setTop(0) .setValue("a") ); host.stacks1.append((new linb.UI.Div) .host(host,"div22") .setLeft(10) .setTop(10) .setWidth(130) .setHtml("<font color=red>All copy right reserved<br>Sigmasoft<br>2005-2008</font>") , 'c'); host.stacks1.append((new linb.UI.Button) .host(host,"button12") .setLeft(10) .setTop(20) .setWidth(110) .setPosition("relative") .setCaption("Orders") .setImage("img/order.gif") .setVAlign("middle") .onClick("_button12_onclick") , 'a'); host.stacks1.append((new linb.UI.Button) .host(host,"button13") .setLeft(10) .setTop(60) .setWidth(110) .setCaption("Customers") .setImage("img/customer.gif") .onClick("_button13_onclick") , 'a'); host.stacks1.append((new linb.UI.Label) .host(host,"label67") .setLeft(10) .setTop(10) .setWidth(110) .setCaption("Not implemented") .setHAlign("left") , 'b'); append((new linb.UI.Block) .host(host,"block6") .setDock("fill") .setLeft(450) .setTop(310) ); host.block6.append((new linb.UI.Panel) .host(host,"dialog7") .setLeft(0) .setTop(0) .setCaption("Orders") .setImage("img/order.gif") ); host.dialog7.append((new linb.UI.Label) .host(host,"label4") .setLeft(30) .setTop(320) .setWidth(110) .setCaption("Ship Date:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label8") .setLeft(30) .setTop(50) .setWidth(110) .setCaption("Ship Method:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label13") .setLeft(370) .setTop(20) .setCaption("Order ID:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label10") .setLeft(370) .setTop(50) .setWidth(140) .setCaption("Order Date:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label6") .setLeft(370) .setTop(80) .setWidth(110) .setCaption("PO Number:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label7") .setLeft(30) .setTop(80) .setCaption("Employee:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label37") .setLeft(30) .setTop(350) .setWidth(100) .setCaption("Sale Tax Rate") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label11") .setLeft(30) .setTop(20) .setCaption("Customer:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label14") .setLeft(370) .setTop(320) .setWidth(110) .setCaption("Order Subtotal:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label38") .setLeft(370) .setTop(410) .setWidth(110) .setCaption("Order total:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"Sales Tax:") .setLeft(370) .setTop(350) .setCaption("Shipping & Handle:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Label) .host(host,"label9") .setLeft(370) .setTop(380) .setWidth(100) .setCaption("Sale Tax:") .setHAlign("left") ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_tax_rate") .setDataBinder("order") .setDataField("tax_rate") .setLeft(130) .setTop(350) .setWidth(140) ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_handle") .setDataBinder("order") .setDataField("handle") .setLeft(480) .setTop(350) .setWidth(140) ); host.dialog7.append((new linb.UI.ComboInput) .host(host,"cbi_orders_employee") .setDataBinder("order") .setDataField("employee") .setLeft(130) .setTop(80) .setWidth(140) .setReadonly(true) .setType("listbox") .setItems([{"id":"a", "caption":"Cok,Oliver"}, {"id":"b", "caption":"Jimi,Larry"}, {"id":"c", "caption":"Steven, Du"}, {"id":"d", "caption":"Tracy, Tang"}]) .setValue(null) ); host.dialog7.append((new linb.UI.ComboInput) .host(host,"cbi_orders_ship_method") .setDataBinder("order") .setDataField("shipment") .setLeft(130) .setTop(50) .setWidth(140) .setReadonly(true) .setType("listbox") .setItems([{"id":"1", "caption":"Federal Express"}, {"id":"2", "caption":"UPS Ground"}, {"id":"3", "caption":"UPS Mail"}]) .setValue(null) ); host.dialog7.append((new linb.UI.ComboInput) .host(host,"cbi_orders_customer") .setDataBinder("order") .setDataField("customer") .setLeft(130) .setTop(20) .setWidth(140) .setReadonly(true) .setType("listbox") .setItems([{"id":"1", "caption":"Mike,Silla"}, {"id":"2", "caption":"Rose,Kim"}, {"id":"3", "caption":"Betty,Jin"}]) ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_order_id") .setDataBinder("order") .setDataField("order_id") .setLeft(480) .setTop(20) .setWidth(140) ); host.dialog7.append((new linb.UI.PageBar) .host(host,"pagebar1") .setLeft(30) .setTop(420) .setWidth('auto') .setHeight(20) .setCaption("<font color=red>Click No To See Orders</font>") .setValue("1:1:3") .onClick("_pagebar1_onclick") ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_subtotal") .setDisabled(true) .setLeft(480) .setTop(320) .setWidth(140) ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_order_date") .setDataBinder("order") .setDataField("order_date") .setLeft(480) .setTop(50) .setWidth(140) ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_po_number") .setDataBinder("order") .setDataField("po_number") .setLeft(480) .setTop(80) .setWidth(140) ); host.dialog7.append((new linb.UI.ComboInput) .host(host,"dpi_orders_ship_date") .setDataBinder("order") .setLeft(130) .setTop(320) .setWidth(140) .setType("datepicker") .setItems([{"id":"a", "caption":"itema", "tips":"item a"}, {"id":"b", "caption":"itemb", "tips":"item b"}, {"id":"c", "caption":"itemc", "tips":"item c"}]) ); host.dialog7.append((new linb.UI.TreeGrid) .host(host,"tgd_orders_details") .setDock("none") .setDockMargin({"left":0, "top":0, "right":0, "bottom":0}) .setLeft(30) .setTop(200) .setWidth(590) .setHeight(110) .setHeader([{"id":"col1", "caption":"Product", "type":"input", "width":120}, {"id":"col4", "caption":"quantity", "type":"input", "width":100}, {"id":"col2", "caption":"Unit Price", "type":"number", "format":"^-?\\d\\d*$", "width":100}, {"id":"col3", "caption":"Discount", "type":"number", "format":"^-?\\d\\d*$", "width":100}, {"id":"col5", "caption":"Tatal Price", "type":"number", "format":"^-?\\d\\d*$", "width":120}]) .setRows([]) ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_total") .setDisabled(true) .setLeft(480) .setTop(410) .setWidth(140) ); host.dialog7.append((new linb.UI.CheckBox) .host(host,"cbi_shipment_received") .setDataBinder("order") .setDataField("shipment_received") .setLeft(30) .setTop(380) .setWidth(150) .setCaption("Shipment Received") ); host.dialog7.append((new linb.UI.Input) .host(host,"ipt_orders_tax") .setDisabled(true) .setLeft(480) .setTop(380) .setWidth(140) ); host.dialog7.append((new linb.UI.Group) .host(host,"group1") .setLeft(30) .setTop(100) .setWidth(590)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -