⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.js

📁 axjx工具代码给大家交流
💻 JS
📖 第 1 页 / 共 3 页
字号:
Class('App', 'linb.Com',{        Initialize:function(){            var arr=[];            arr.push('.ccss-item{text-decoration: line-through;}');            arr.push('h1{margin:10px 2px 2px 10px; padding-bottom:10px; font: bold 24px "Trebuchet MS","Lucida Grande",Verdana,sans-serif; color: #D00000; border-bottom: 1px dashed #aca899;}');            arr.push('h2{margin:10px 2px 10px 2px; font: bold 18px "Trebuchet MS","Lucida Grande",Verdana,sans-serif;  color:#134275; border-bottom: 1px dashed #aca899;}');            arr.push('h2.notice{color:#000}');            arr.push('h2.inherite{color:#D2691E}');            arr.push('h3{margin:10px 2px 10px 2px; font: bold 16px Bookman Old Style, Helvetica, sans-serif; color: #4C4B43; border-bottom: 1px dashed #aca899;}');            arr.push('h4{position:relative;padding-left:20px;font: bold 12px "Trebuchet MS","Lucida Grande",Verdana,sans-serif;background:#F9FFE9;}');            arr.push('.totop{position:absolute;padding-left:3px;padding-right:3px;left:4px;top:4px;}');            arr.push('.linb-custom-block{margin:2px 2px 2px 18px;display:none;}');            arr.push('.linb-custom-icon{margin:2px;width:16px;height:16px;background-image:url(img/img.gif);vertical-align: bottom;}');            arr.push('.inndiv {margin:3px;}');            arr.push('.inndiv li{padding-left:20px;}');                        arr.push('.required{color:red;}');            arr.push('.linb-custom-block .p{margin:2px;border: 1px solid #E9D3F4;position:relative;}');            arr.push('.linb-custom-block .con{display:none;padding:8px; font: 12px "Trebuchet MS","Lucida Grande",Verdana,sans-serif;background:#FFF;border-top: 1px solid #E9D3F4;}');            arr.push('.linb-custom-list{background:#E5ECF9;border:1px solid #3366CC;margin:2px;padding:5px;}');            arr.push('.linb-custom-list a{text-decoration: underline;}');            arr.push('.linb-custom-cmd{cursor:pointer;margin:2px;width:16px;height:16px;line-height:0;font-size:0;background-image:url(img/img.gif)}');            linb.CSS.addStyleSheet(arr.join(''),'',true);                        //dont want to show original function code            _.id.$auto$=1;        },        Instance:{        $S_CLS:{'Namespace':1,'Class':1,'_':1,'_.fun':1,'_.arr':1,'_.str':1,'linb':1},        $CLS_FUN:{'Namespace':1,'Class':1,'_':1,'_.fun':1,'linb':1,'linb.Thread':1,'linb.Ajax':1,'linb.SAjax':1,'linb.IAjax':1,'linb.SC':1},        $CLS_STATIC:{'_.fun':1,'linb':1,'linb.Thread':1,'linb.Ajax':1,'linb.SAjax':1,'linb.IAjax':1,'linb.SC':1,'linb.Event':1,'linb.DragDrop':1,'linb.CSS':1,'linb.History':1,'linb.Cookies':1,'linb.ComFactory':1,'linb.Debugger':1,'linb.Date':1,'linb.Tips':1,'linb.Coder':1},        events:{onRender:'_onrender'},        _onrender:function(){            SPA=this;            SPA.btnLang.setCaption(linb.getRes('app.'+linb.$lang));            linb.UI.Border.$abstract=linb.UI.Shadow.$abstract=linb.UI.Resizer.$abstract=true;            linb.History.setCallback(function(str){                str=str.replace('#','');                if(!str)return;                var obj, t, id1, id2, id3, id4;                obj=linb.SC.get(str);//input must be a valid object path                while(!obj && str.indexOf('.')!=-1){                    t=str.split('.');                    t.pop();                    str=t.join('.');                    obj=linb.SC.get(str);                }                //if same                if(SPA.__vid==str)return;                //if return to list                if(SPA.__vid && _.str.endWith(SPA.__vid, '._list'))                    return;                SPA.__vid=str;                if(str.indexOf('.prototype.')!=-1){                    id1=str.split('.prototype.')[0];                    if(obj){                        id2= id1 + (obj.$event$?'._event':'._prototype');                        if(obj.$original$)                            id3= obj.$original$==linb.SC.get(id1).KEY? null: (id2 + '.' + obj.$original$.replace(/\./g,'_'));                    }                    id4=str;                }else{                    //show to class layer only                    if(SPA.$S_CLS[str] || obj.$linb$){                        id1=str;                        //construcotr or global function                        id2=id1+'.constructor';                        id4=id1+'._global';                        id3=id2+'.'+id1.replace(/\./g,'_');                    //show to static method                    }else if(typeof obj=='function'){                        id1=str.slice(0,str.lastIndexOf('.'));                        id2=id1+'._staticM';                        if(obj && obj.$original$)                            id3=obj.$original$==linb.SC.get(id1).KEY?null:id2+'.'+obj.$original$.replace(/\./g,'_');                        id4=str;                    //show to static property                    }else{                        id1=str.slice(0,str.lastIndexOf('.'));                        id2=id1+'._staticP';                        //properties: no super                        id3=null;                        id4=str;                    }                }                 if(id1){                    if(SPA._curId!=id1){                        SPA._curId=id1;                        SPA.objTree.openToNode(id1).setValue(id1);                        var node=SPA.divHead.getRoot(),                            ics=SPA._iconPosMap,                            f=SPA._clickForToggle                            ;                        //build html                        SPA.divHead.setHtml( SPA._format( SPA._parse(id1) ) );                        //attach event                        node.query('h2').css('cursor','pointer').onClick(f).first().css('backgroundPosition',ics.close);                        node.query('h3').css('cursor','pointer').onClick(f).first().css('backgroundPosition',ics.close);                    }                    //open                    _.arr.each([id2,id3,id4],function(id){                        var t;                        if(id && (t=linb.Dom.byId(id)) && _.get(t,['nextSibling', 'style', 'display'])!='block')linb(id).onClick();                    });                    //focus                    if(id4 && (t=linb.Dom.byId(id4)))                        _.asyRun(function(){                            SPA.divHead.getRoot().scrollTop(linb(id4).offset(null,SPA.divHead.getRoot()).top);                        });                }            });                    },        showCode:function(e, key){            var txt = linb.getRes('app.oCodeDesc') +                       key + ' = ' +                       linb.SC(key).toString();            txt = linb.Coder.formatAll(txt, 'js', ['plain']);            var node=linb.create("<div style='visibiliy:hidden;left:-10000px;width:600px;background:#fff;border:solid 1px #aaa;overflow:auto;'>"+txt+"</div>");            //add first            linb('body').append(node);            //adjust height            if(node.first().height()>400)node.height(400);            //pop            node.popToTop(linb.Event.getPos(e));            node.setBlurTrigger(_()+"", function(){                node.remove();            });            return false;        },        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,"popLang")                .setItems([{"id":"en", "caption":"$app.en"}, {"id":"cn", "caption":"$app.cn"}])                .onMenuSelected("_pop_onmenuselected")            );            append((new linb.UI.Pane)                .host(host,"paneTop")                .setDock("top")                .setHeight("38")                .setCustomStyle({"KEY":"border:solid 1px;border-color:#fff #ccc #ccc #fff;background-color:#EBEADB;"})            );                        host.paneTop.append((new linb.UI.Label)                .host(host,"labelName")                .setLeft(10)                .setTop(10)                .setWidth(270)                .setCaption("$app.apititle")                .setFontSize("16px")                .setFontWeight("bold")                .setHAlign('left')            );                        host.paneTop.append((new linb.UI.Button)                .host(host,"btnLang")                .setTop(10)                .setWidth("80")                .setRight("10")                .setType("drop")                .onClickDrop("_butlang_onclickdrop")                .onClick("_butlang_onclickdrop")            );            append((new linb.UI.Layout)                .host(host,"mainLayout")                .setItems([{"id":"before", "pos":"before", "locked":false, "size":240, "min":100, "max":400, "hide":false, "cmd":true, "caption":"before"}, {"id":"main", "min":10, "caption":"main"}])                .setType("horizontal")            );                        host.mainLayout.append((new linb.UI.TreeBar)                .host(host,"objTree")                .onRender("_objtree_aftercreated")            ,'before');                        host.mainLayout.append((new linb.UI.Div)                .host(host,"divHead")                .setDock("fill")                .setCustomStyle({"KEY":"overflow:auto;"})            , 'main');            return children;            // ]]code created by jsLinb UI Builder        },        _pop_onmenuselected:function (profile, item, src) {            if(linb.$lang==item.id)return;            linb.reLang(item.id,function(){                SPA.btnLang.setCaption(linb.getRes('app.'+linb.$lang));                if(SPA.__vid){                    var s=SPA.__vid;                    delete SPA.__vid;                    delete SPA._curId;                    linb.History._callback(s);

⌨️ 快捷键说明

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