Added support for new Elastic skin in v1.4. Thanx to Estudio Nexos.
Closes #33
This commit is contained in:
@@ -13,6 +13,9 @@ $(function() {
|
||||
case 'classic':
|
||||
isOk = plugin_switchIdent_addCbClassic($sw);
|
||||
break;
|
||||
case 'elastic':
|
||||
isOk = plugin_switchIdent_addCbElastic($sw);
|
||||
break;
|
||||
}
|
||||
|
||||
if (isOk)
|
||||
@@ -43,6 +46,19 @@ function plugin_switchIdent_addCbClassic($sw) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function plugin_switchIdent_addCbElastic($sw) {
|
||||
var $taskBar = $('.header-title.username');
|
||||
$sw.css("background-color", "transparent").css("border","none");
|
||||
$sw.css("background-position-x","left 0.75rem").css("padding","0 0 0 2rem");
|
||||
$sw.css("font-weight","bold").css("box-shadow","none");
|
||||
if ($taskBar.length > 0) {
|
||||
$taskBar.prepend($sw);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function plugin_switchIdent_switch(val) {
|
||||
rcmail.env.unread_counts = {};
|
||||
console.log(rcmail.env.unread_counts);
|
||||
|
||||
2
ident_switch-switch.min.js
vendored
2
ident_switch-switch.min.js
vendored
@@ -1 +1 @@
|
||||
$(function(){$sw=$("#plugin-ident_switch-account");isOk=false;switch(rcmail.env.skin){case"larry":isOk=plugin_switchIdent_addCbLarry($sw);break;case"classic":isOk=plugin_switchIdent_addCbClassic($sw);break}if(isOk){$sw.show()}});function plugin_switchIdent_addCbLarry(b){var a=$(".topright .username");if(a.length>0){if(b.length>0){b.prependTo(".topright");a.hide();return true}}return false}function plugin_switchIdent_addCbClassic(b){var a=$("#taskbar");if(a.length>0){a.prepend(b);return true}return false}function plugin_switchIdent_switch(a){rcmail.env.unread_counts={};console.log(rcmail.env.unread_counts);rcmail.http_post("plugin.ident_switch.switch",{"_ident-id":a,_mbox:rcmail.env.mailbox})}function plugin_switchIdent_fixIdent(a){if(parseInt(a)>0){$("#_from").val(a)}};
|
||||
$(function(){$sw=$("#plugin-ident_switch-account");isOk=false;switch(rcmail.env.skin){case"larry":isOk=plugin_switchIdent_addCbLarry($sw);break;case"classic":isOk=plugin_switchIdent_addCbClassic($sw);break;case"elastic":isOk=plugin_switchIdent_addCbElastic($sw);break}if(isOk){$sw.show()}});function plugin_switchIdent_addCbLarry(b){var a=$(".topright .username");if(a.length>0){if(b.length>0){b.prependTo(".topright");a.hide();return true}}return false}function plugin_switchIdent_addCbClassic(b){var a=$("#taskbar");if(a.length>0){a.prepend(b);return true}return false}function plugin_switchIdent_addCbElastic(b){var a=$(".header-title.username");b.css("background-color","transparent").css("border","none");b.css("background-position-x","left 0.75rem").css("padding","0 0 0 2rem");b.css("font-weight","bold").css("box-shadow","none");if(a.length>0){a.prepend(b);return true}return false}function plugin_switchIdent_switch(a){rcmail.env.unread_counts={};console.log(rcmail.env.unread_counts);rcmail.http_post("plugin.ident_switch.switch",{"_ident-id":a,_mbox:rcmail.env.mailbox})}function plugin_switchIdent_fixIdent(a){if(parseInt(a)>0){$("#_from").val(a)}};
|
||||
Reference in New Issue
Block a user