3 Commits
1.2 ... 3.0

Author SHA1 Message Date
Boris Gulay
28d7841af5 Fix description of compatibility for v1.3 branch. 2018-03-17 17:16:18 +03:00
Boris Gulay
707abf2a81 Initial release for Roundcube 1.3.
Fixed compatibility with new jQuery (combobox not displayed). Closes #20.
Pumped up Roundcube version requirement.
2018-03-17 17:09:16 +03:00
Boris Gulay
c90efaa00b Readme updated. 2018-03-12 23:21:38 +03:00
4 changed files with 12 additions and 5 deletions

View File

@@ -8,4 +8,11 @@ This plugin allows users to switch between different accounts (including remote)
### Where to start ###
* In settigs interface create new identity.
* For all identities except default you will see new section of settings - IMAP. Enter data required to connect to remote server. Don't forget to check Enabled check box.
* After you have created at least one identity with active IMAP settings you will see combobox in the top right corner instead of plain text field with account name. It will allows you to switch to another account.
* After you have created at least one identity with active IMAP settings you will see combobox in the top right corner instead of plain text field with account name. It will allows you to switch to another account.
### Version compatibility ###
* Branch 1.X - for Roundcube v1.1
* Branch 2.X - for Roundcube v1.2
* Branch 3.X - for Roundcube v1.3
Please specify verion like "~2.0" in your composer.json file for ident_switch requirement. In this case you will stay inside compatible branch until you manually update ypur Roundcube installation.

View File

@@ -30,7 +30,7 @@
},
"extra": {
"roundcube": {
"min-version": "1.1",
"min-version": "1.3",
"sql-dir": "SQL"
}
}

View File

@@ -4,9 +4,9 @@
$(function() {
var $truName = $('.topright .username');
if ($truName.size() > 0) {
if ($truName.length > 0) {
$sw = $('#plugin-ident_switch-account');
if ($sw.size() > 0) {
if ($sw.length > 0) {
$sw.prependTo('.topright');
$truName.hide();
$('#plugin-ident_switch-account').show();

2
ident_switch.min.js vendored
View File

@@ -1,4 +1,4 @@
$(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();}}
$(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();}}
$("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();}