Dojo automatically loads pages---load as needed

Source: Internet
Author: User

Click the menu will go to load the page, non-IFRAME implementation, feel the effect can also;

Some places are unsatisfactory, for example, parsing other libraries like Fusionchart is a bit problematic.

There is the operation in IE to pay attention, do not know why, Dojo API website address in IE run also have problems. This is a shocking thing;

<! DOCTYPE html>  


Require (["Dojo/_base/fx", "Dojo/_base/lang", "Dojo/dom-style", "Dojo/parser", "Dojo/ready", "Diji

    T/registry "," Dijit/layout/contentpane "], function (Basefx, Lang, Domstyle, parser, ready, registry, ContentPane) {

        Lang.setobject ("App.basename", function (path, suffix) {var b = path.replace (/^.*[\/\\]/g, '); if (typeof (suffix) = = ' String ' && b.substr (b.length-suffix.length) = = suffix) {b = b.substr (0, B.le
        Ngth-suffix.length);
    return b; 
});  Lang.setobject ("App.addtab", Function (tabcontainer, href, title, closable) {if (typeof Tabcontainer = = "string")
        {Tabcontainer = Registry.byid (Tabcontainer);
        var tabname = "tab" + app.basename (HREF, ". html"), Tab = Registry.byid (tabname); if (typeof tab = = = "undefined") {tab = new ContentPane ({id:tabname, title: Title, Href:hRef, closable:closable, Style: "PADDING:3PX;"
            });
        Tabcontainer.addchild (tab);
    } tabcontainer.selectchild (tab);
    }); Lang.setobject ("App.formatterincode", function (Iconclass) {//Use global IP instead of return ' <div class= ' ' > ' + ico
    NClass + ' </div> ';
    }); Lang.setobject ("App.formattericon", function (iconclass) {return ' <div class= ' ' + Iconclass + ' "></div&gt
    ;';
    }); Lang.setobject ("App.formatterstatusicon", function (iconclass) {return ' <div class= ' + (iconclass==1? ')
    Isone ': ' notone ') + ' ></div> ';
});
        Ready (function () {var iconclass = ' 6 ';
        var codeip = window.location.href;

        Codeip = codeip.substring (Codeip.indexof ("://") +3, codeip.length);
        var tempstr = ' <script type= ' text/javascript ' > ';
        TempStr = "</script>";
Console.info (TEMPSTR); var Nameby = ' theme1 ' function getqueRystringregexp () {var reg = new RegExp ("^|\\?|
            &) "+ Nameby +" = ([^&]*) (\\s|&|$), "I");
            if (Reg.test (location.href)) return unescape (Regexp.$2.replace (/\+/g, ""));
        Return "";
        };
        Console.dir (Dojo.hasclass (document.body,theme)); var theme = Getquerystringregexp () | |
        '';
        Alert (codeip+ "\ n" +theme);
            if (theme) {Dojo.removeclass (document.body);
        Dojo.addclass (document.body, theme); 
                } parser.parse (). Then (function (objects) {basefx.fadeout ({//get rid of the loader once parsing are done Node: "Preloader", Onend:function () {Domstyle.set ("preloader", "Dis
                Play "," none ");
        }). Play ();

	});
        var oldwid = null;
            Dojo.connect (Dojo.byid ("Paneltoggle"), ' click ', function () {var sty = ' block ';
            var src = '. png ';if (Dojo.attr (Dojo.byid ("Paneltoggle"), ' src '). IndexOf (' resources/arrow.png ')!=-1) {sty = ' None
                ';
                src = '-r.png ';
                Oldwid = Domstyle.get ("Mainsplitter", ' width ');
            Domstyle.set ("Mainsplitter", ' width ', ' 30px ');
            else {domstyle.set ("Mainsplitter", ' width ', oldwid+ ' px ');
            }//console.info (Oldwid); Dojo.attr (Dojo.byid ("Paneltoggle"), ' src ', '.
            /resources/arrow ' +src);
            
            Dojo.query (". Thinger"). Style ("display", sty);
            App.registry.byId ("Maincontainer"). layout ();
        Console.dir (App.registry.byId ("Maincontainer"));
    });
}); });



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.