Using the Theme-switch, without having it in the header?

0
I assume the theme-switch actually has an "working" part or parts stuck somewhere in the dojo or Mendix bits. Can anybody point me where to look? I would very much like to activate THAT particular logic from a MF....... for obvious reasons
asked
2 answers
3

It is posible to update the login widget so it redirects you ater login

        validate : function(response, ioArgs) {
    logger.debug(this.id + ".validate");

    this.indicator && this.indicator.stop();

    dojo.cookie("EXTENDCOOKIE", this.checkboxInput.checked, { expires: 365 });

    var i18nmap = this.i18nmap;
    var span = this.messageNode;

    switch(ioArgs.xhr.status) {
        case 200 :
            mendix.widget.hideTooltip();
            mx.login();
                            if(this.redirectURLmf !== "" ) //have a MF that return the theme index file liek: mytheme-index.html
                                this.redirectURL(this.redirectURLmf);

in following link you will find the updated version of the widget: Widget

answered
1

Lets take a look. In the index-default.html is the line

     <div dojoType="mxui.widget.ThemeSwitch" themes="Default;Basic;Dutch;Dark" 
label="Pick your theme:"></div>

Which displays the themeswitcher. Normally the mx stuff is in the runtime. On your local machine goto C:/program files/Mendix/4.5.2./runtime/mxclientsystem.

Use a find tool and look for ThemeSwitch. Seems to be in mxui/widget/ThemeSwitch.js. But not readable. Format the file with a tool like notepad++. The only thing what happens is:

        window.location.replace("index-" + this.selectNode.value + ".html");

You can do that even in html/Javascript snippet widget.

answered