Dropdown not visible for Roundcube 1.3.0

Issue #20 closed
Richard Gee created an issue

The dropdown just doesn't appear - probably some change to the DOM in the new version.

The config pages seem to still be OK.

Comments (17)

  1. Gergely Papp

    Replacing the size() function with length attribute in the ROOT_PATH/plugins/ident_switch/ident_switch.min.js solves the issue.

    Original:

    $(function(){var $truName=$('.topright .username');if($truName.size()>0){$sw=$('#plugin-ident_switch-account');if($sw.size()>0){$sw.prependTo('.topright');$truName.hide();$('#plugin-ident_switch-account').show();}}
    

    Fixed

    $(function(){var $truName=$('.topright .username');if($truName.length>0){$sw=$('#plugin-ident_switch-account');if($sw.length>0){$sw.prependTo('.topright');$truName.hide();$('#plugin-ident_switch-account').show();}}
    
  2. Roland Meier

    Hello, only this is not working for me. Yes, the select field is available after this, but i cannot change identities. The Browser console says: QWEL

  3. Stefano

    Hi, Just change the $('.topright .username') that no loger exists on 1.3.0 I put $('#logo'); Also removed the hide function and changed the show function. Here is my line:

    $(function(){var $truName=$('#logo');if($truName.length>0){$sw=$('#plugin-ident_switch-account');if($sw.length>0){$sw.prependTo('.topright');$('#plugin-ident_switch-account').css("display","inline-block");}}
    
    
    
  4. Roland Meier

    Hello, sorry but also this dont work. The select field is available with first changes. The .topright .username is available... The select field wont change the mail account on other selection.

    Did it work on your installation? Can you provide the complete file?

  5. Steven Sullivan

    Use this instead:

    $(function(){var $truName=$('.topright .username');if($truName){$sw=$('#plugin-ident_switch-account');if($sw){$sw.prependTo('#topline .topright');$truName.hide();$('#plugin-ident_switch-account:first-child').show();}}
    $("INPUT[name='_ident_switch.form.enabled']").change();$("SELECT[name='_ident_switch.form.secure']").change();plugin_switchIdent_processPreconfig();});function plugin_switchIdent_processPreconfig(){var disFld=$("INPUT[name='_ident_switch.form.readonly']");disFld.parentsUntil("TABLE","TR").hide();var disVal=disFld.val();if(disVal>0){$("INPUT[name='_ident_switch.form.host']").prop("disabled",true);$("SELECT[name='_ident_switch.form.secure']").prop("disabled",true);$("INPUT[name='_ident_switch.form.port']").prop("disabled",true);}
    if(2==disVal){$("INPUT[name='_ident_switch.form.username']").prop("disabled",true);}}
    function plugin_switchIdent_enabled_onChange(e){var $enFld=$("INPUT[name='_ident_switch.form.enabled']");$("INPUT[name!='_ident_switch.form.enabled'], SELECT",$enFld.parents("FIELDSET")).prop("disabled",!$enFld.is(":checked"));plugin_switchIdent_processPreconfig();}
    function plugin_switchIdent_secure_onChange(e){var $secSel=$("SELECT[name='_ident_switch.form.secure']");var $portFld=$("INPUT[name='_ident_switch.form.port']");if('SSL'===$secSel.val().toUpperCase())
    $portFld.attr("placeholder",993);else
    $portFld.attr("placeholder",143);}
    function plugin_switchIdent_switch(val){rcmail.http_post('plugin.ident_switch.switch',{'_ident-id':val,'_mbox':rcmail.env.mailbox});}
    function plugin_switchIdent_fixIdent(iid){if(parseInt(iid)>0)
    $("#_from").val(iid);}
    
  6. Roland Meier

    Hello, with this code, the select field seems to switch, no error or other message in konsole. But also no mailbox switch / loading! The mailbox keep the old/first one.

  7. Steven Sullivan
        Hmm. That’s odd. For me it’s working for both skins. I’m not sure what the issue could be without logging in on your server and checking it out.
    
    
        Get Outlook for iOS
    
  8. Roland Meier

    yeah... now its workin... i changed your ident_switch.js, a ident_switch.min.js its new on my setup and also the ident_switch.php have changes... this 3 files from you and the Plugin works now...

    THANK YOUUUUU

  9. Boris Gulay repo owner

    Initial release for Roundcube 1.3.

    Fixed compatibility with new jQuery (combobox not displayed). Closes #20. Pumped up Roundcube version requirement.

    → <<cset 707abf2a8154>>

  10. Log in to comment