index.js

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

JS
730
字号
Class('App', 'linb.Com',{    Instance:{        //base Class for linb.Com        base:["linb.UI"],         //requried class for the App        //"linb.Tips","linb.UI.Resizer","linb.UI.Border","linb.UI.Shadow"        required:["linb.UI.Block", "linb.UI.Div", "linb.UI.Stacks", "linb.UI.Button", "linb.UI.Panel", "linb.UI.Dialog", "linb.UI.Label", "linb.UI.TextEditor", "linb.UI.TreeGrid", "linb.UI.CheckBox", "linb.UI.PageBar", "linb.UI.ComboInput", "linb.UI.Input", "linb.UI.Group", "linb.UI.Tabs", "linb.UI.DatePicker", "linb.DataBinder"],         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,"block3")                .setDock("left")                .setWidth(160)                .setBorder(true)            );                        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"}])                .setValue("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');                        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")                .onClick("_button12_onclick")            , 'a');                        append((new linb.UI.Block)                .host(host,"block6")                .setDock("fill")            );                        host.block6.append((new linb.UI.Panel)                .host(host,"dialog7")                .setCaption("Orders")                .setImage("img/order.gif")            );                        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.Label)                .host(host,"label11")                .setLeft(30)                .setTop(20)                .setCaption("Customer:")                .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,"Sales Tax:")                .setLeft(370)                .setTop(350)                .setCaption("Shipping & Handle:")                .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,"label4")                .setLeft(30)                .setTop(320)                .setWidth(110)                .setCaption("Ship Date:")                .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,"label6")                .setLeft(370)                .setTop(80)                .setWidth(110)                .setCaption("PO Number:")                .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,"label14")                .setLeft(370)                .setTop(320)                .setWidth(110)                .setCaption("Order Subtotal:")                .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,"label7")                .setLeft(30)                .setTop(80)                .setCaption("Employee:")                .setHAlign("left")            );                        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.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.Input)                .host(host,"ipt_orders_handle")                .setDataBinder("order")                .setDataField("handle")                .setLeft(480)                .setTop(350)                .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.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.Input)                .host(host,"ipt_orders_po_number")                .setDataBinder("order")                .setDataField("po_number")                .setLeft(480)                .setTop(80)                .setWidth(140)            );                        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.PageBar)                .host(host,"pagebar1")                .setLeft(30)                .setTop(420)                .setWidth(190)                .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_order_date")                .setDataBinder("order")                .setDataField("order_date")                .setLeft(480)                .setTop(50)                .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")                .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}])            );                        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.Input)                .host(host,"ipt_orders_total")                .setDisabled(true)                .setLeft(480)                .setTop(410)                .setWidth(140)            );                        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.Group)                .host(host,"group1")                .setLeft(30)                .setTop(100)                .setWidth(590)                .setHeight(90)                .setCaption("Notes")            );                        host.group1.append((new linb.UI.TextEditor)                .host(host,"texteditor8")                .setDock("fill")                .setDockMargin({"left":0, "top":0, "right":0, "bottom":3})                .setPosition("relative")            );                        host.block6.append((new linb.UI.Panel)                .host(host,"dialog14")                .setCaption("Customers")                .setImage("img/customer.gif")            );                        host.dialog14.append((new linb.UI.Tabs)                .host(host,"tabs2")                .setItems([{"id":"a", "caption":"Customer", "tips":"Customer Info"}, {"id":"b", "caption":"Order Summary & Details", "tips":"Order Info"}])                .setDockMargin({"left":4, "top":4, "right":4, "bottom":4})                .setValue("a")            );                        host.tabs2.append((new linb.UI.Label)                .host(host,"label46")                .setLeft(330)                .setTop(80)                .setWidth(110)                .setCaption("Fax Number:")

⌨️ 快捷键说明

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