mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-16 22:30:09 -07:00
Updated styles for Silvermel add-on
This commit is contained in:
parent
8a7e3c5389
commit
2feddca69a
@ -17,7 +17,7 @@ var mailHops =
|
|||||||
'debug':false,
|
'debug':false,
|
||||||
'hide_compact':false,
|
'hide_compact':false,
|
||||||
'bar_color': '#5E7A9B',
|
'bar_color': '#5E7A9B',
|
||||||
'font_color': '#FFF',
|
'font_color': '#ffffff',
|
||||||
'font_size': '14px',
|
'font_size': '14px',
|
||||||
'country_tag':false,
|
'country_tag':false,
|
||||||
'travel_time_junk':false,
|
'travel_time_junk':false,
|
||||||
@ -47,7 +47,7 @@ mailHops.init = function() {
|
|||||||
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("mailhopsDataPaneRefreshLink").addEventListener("click", function () {
|
document.getElementById("mailhopsDataPaneRefresh").addEventListener("click", function () {
|
||||||
mailHops.refreshCache();
|
mailHops.refreshCache();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ mailHops.loadPref = function(reload)
|
|||||||
//Display
|
//Display
|
||||||
mailHops.options.bar_color = mailHops.getCharPref('mail.mailHops.bar_color','#5E7A9B');
|
mailHops.options.bar_color = mailHops.getCharPref('mail.mailHops.bar_color','#5E7A9B');
|
||||||
|
|
||||||
mailHops.options.font_color = mailHops.getCharPref('mail.mailHops.font_color','#FFF');
|
mailHops.options.font_color = mailHops.getCharPref('mail.mailHops.font_color','#ffffff');
|
||||||
|
|
||||||
mailHops.options.font_size = mailHops.getCharPref('mail.mailHops.font_size','14px');
|
mailHops.options.font_size = mailHops.getCharPref('mail.mailHops.font_size','14px');
|
||||||
|
|
||||||
|
@ -28,40 +28,47 @@ var mailHopsDisplay =
|
|||||||
this.mailhopsDataPaneDNSBL = document.getElementById("mailhopsDataPaneDNSBL");
|
this.mailhopsDataPaneDNSBL = document.getElementById("mailhopsDataPaneDNSBL");
|
||||||
|
|
||||||
//wait for message to be selected before showing
|
//wait for message to be selected before showing
|
||||||
if(!reload)
|
if(!reload) this.mhBox.style.display = 'none';
|
||||||
this.mhBox.style.display = 'none';
|
|
||||||
|
|
||||||
//event listner for route click to launch map
|
//event listner for route click to launch map
|
||||||
this.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
this.mailhopsDataPaneDNSBL.addEventListener("click", function () {
|
||||||
if(this.hasAttribute('data-ip'))
|
if(this.hasAttribute('data-ip'))
|
||||||
mailHopsUtils.launchSpamHausURL( this.getAttribute('data-ip') );
|
mailHopsUtils.launchSpamHausURL( this.getAttribute('data-ip') );
|
||||||
});
|
});
|
||||||
|
|
||||||
this.resultText.addEventListener("click", function () {
|
this.resultText.addEventListener("click", function () {
|
||||||
if(this.value.indexOf('Rate Limit')!==-1){
|
if(this.value.indexOf('Rate Limit')!==-1)
|
||||||
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
window.openDialog("chrome://mailhops/content/preferences.xul","","chrome, dialog, modal, centerscreen").focus();
|
||||||
}
|
|
||||||
else if(this.hasAttribute('data-route'))
|
else if(this.hasAttribute('data-route'))
|
||||||
mailHopsUtils.launchMap( String(this.getAttribute('data-route')), options );
|
mailHopsUtils.launchMap( String(this.getAttribute('data-route')), options );
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!!options.bar_color)
|
this.mailhopsResultWeather.addEventListener("click", function () {
|
||||||
this.mhBox.style.background = options.bar_color;
|
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
|
||||||
else
|
});
|
||||||
this.mhBox.style.background = '';
|
|
||||||
|
|
||||||
if(!!options.font_size)
|
this.mailhopsUnsubscribe.addEventListener("click", function () {
|
||||||
this.mhBox.style.fontSize = options.font_size;
|
if(this.getAttribute('href'))
|
||||||
|
mailHopsUtils.launchExternalURL(this.getAttribute('href'));
|
||||||
|
});
|
||||||
|
|
||||||
if(!!options.font_color){
|
if(!!options.bar_color)
|
||||||
this.resultText.style.color = options.font_color;
|
this.mhBox.style.background = options.bar_color;
|
||||||
this.mailhopsResultWeather.style.color = options.font_color;
|
else
|
||||||
this.mailhopsUnsubscribe.style.color = options.font_color;
|
this.mhBox.style.background = '';
|
||||||
this.mailhopsDataPaneSPF.style.color = options.font_color;
|
|
||||||
this.mailhopsDataPaneDKIM.style.color = options.font_color;
|
if(!!options.font_size)
|
||||||
this.mailhopsDataPaneMailer.style.color = options.font_color;
|
this.mhBox.style.fontSize = options.font_size;
|
||||||
this.mailhopsDataPaneDNSBL.style.color = options.font_color;
|
|
||||||
}
|
if(!!options.font_color){
|
||||||
|
this.resultText.style.color = options.font_color;
|
||||||
|
this.mailhopsResultWeather.style.color = options.font_color;
|
||||||
|
this.mailhopsUnsubscribe.style.color = options.font_color;
|
||||||
|
this.mailhopsDataPaneSPF.style.color = options.font_color;
|
||||||
|
this.mailhopsDataPaneDKIM.style.color = options.font_color;
|
||||||
|
this.mailhopsDataPaneMailer.style.color = options.font_color;
|
||||||
|
this.mailhopsDataPaneDNSBL.style.color = options.font_color;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
lists: function( header_unsubscribe ){
|
lists: function( header_unsubscribe ){
|
||||||
|
@ -17,16 +17,16 @@
|
|||||||
|
|
||||||
<hbox id="mailhopsResult" flex="1">
|
<hbox id="mailhopsResult" flex="1">
|
||||||
|
|
||||||
<label id="mailhopsResultText" class="text-link"></label>
|
<label id="mailhopsResultText" class="bar-link"></label>
|
||||||
|
|
||||||
<label id="mailhopsResultWeather" class="text-link"></label>
|
<label id="mailhopsResultWeather" class="bar-link"></label>
|
||||||
|
|
||||||
<button type="menu" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_hops;">
|
<button type="menu" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_hops;">
|
||||||
<menupopup id="mailhopsDataPaneDetails">
|
<menupopup id="mailhopsDataPaneDetails">
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button id="mailhopsDataPaneRefreshLink" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_route_nav_refresh_label;"></button>
|
<button id="mailhopsDataPaneRefresh" class="msgHeaderView-button msgHeaderView-flat-button" label="&mailhops_route_nav_refresh_label;"></button>
|
||||||
|
|
||||||
<label id="mailhopsDataPaneMailer" class="auth-item" value="" tooltiptext="Mailer"></label>
|
<label id="mailhopsDataPaneMailer" class="auth-item" value="" tooltiptext="Mailer"></label>
|
||||||
|
|
||||||
@ -34,9 +34,9 @@
|
|||||||
|
|
||||||
<label id="mailhopsDataPaneDKIM" class="auth-item" value="" tooltiptext="DKIM"></label>
|
<label id="mailhopsDataPaneDKIM" class="auth-item" value="" tooltiptext="DKIM"></label>
|
||||||
|
|
||||||
<label id="mailhopsDataPaneDNSBL" class="text-link auth-item" value="" tooltiptext="DNSBL"></label>
|
<label id="mailhopsDataPaneDNSBL" class="bar-link auth-item" value="" tooltiptext="DNSBL"></label>
|
||||||
|
|
||||||
<label id="mailhopsUnsubscribe" class="text-link unsubscribe" value="&mailhops_unsubscribe;"></label>
|
<label id="mailhopsUnsubscribe" class="bar-link unsubscribe" value="&mailhops_unsubscribe;"></label>
|
||||||
|
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
|
@ -35,7 +35,7 @@ var mailHopPreferences = {
|
|||||||
|
|
||||||
//Display Box styles
|
//Display Box styles
|
||||||
document.getElementById("mailhop.bar_color").value = pref.getCharPref("mail.mailHops.bar_color",'#5E7A9B');
|
document.getElementById("mailhop.bar_color").value = pref.getCharPref("mail.mailHops.bar_color",'#5E7A9B');
|
||||||
document.getElementById("mailhop.font_color").value = pref.getCharPref("mail.mailHops.font_color",'#FFF');
|
document.getElementById("mailhop.font_color").value = pref.getCharPref("mail.mailHops.font_color",'#ffffff');
|
||||||
document.getElementById("mailhop.font_size").value = pref.getCharPref("mail.mailHops.font_size",'14px');
|
document.getElementById("mailhop.font_size").value = pref.getCharPref("mail.mailHops.font_size",'14px');
|
||||||
|
|
||||||
//Update styles
|
//Update styles
|
||||||
@ -90,7 +90,7 @@ var mailHopPreferences = {
|
|||||||
document.getElementById("mailhops-membership-link").addEventListener("click", function () {
|
document.getElementById("mailhops-membership-link").addEventListener("click", function () {
|
||||||
mailHopsUtils.launchExternalURL(this.getAttribute('data-account-url'));
|
mailHopsUtils.launchExternalURL(this.getAttribute('data-account-url'));
|
||||||
});
|
});
|
||||||
|
|
||||||
this.saveAPIKey();
|
this.saveAPIKey();
|
||||||
|
|
||||||
document.getElementById("mailhop.bar_color").addEventListener("input", function () {
|
document.getElementById("mailhop.bar_color").addEventListener("input", function () {
|
||||||
|
@ -519,7 +519,7 @@
|
|||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #e8e8e8"></div>
|
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #eeeeee"></div>
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #c9c9c9"></div>
|
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #c9c9c9"></div>
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #afafaf"></div>
|
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #afafaf"></div>
|
||||||
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #a9e0f2"></div>
|
<div width="25px" height="25px" onclick="mailHopPreferences.ResetDisplay(this.style.backgroundColor);" style="cursor: pointer; background-color: #a9e0f2"></div>
|
||||||
@ -540,7 +540,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="Font Color"></label>
|
<label value="Font Color"></label>
|
||||||
<textbox id="mailhop.font_color" value="#FFF" placeholder="Enter a hex color code"/>
|
<textbox id="mailhop.font_color" value="#ffffff" placeholder="Enter a hex color code"/>
|
||||||
<grid class="grid-color">
|
<grid class="grid-color">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -560,7 +560,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<span></span>
|
<span></span>
|
||||||
<button onclick="mailHopPreferences.ResetDisplay('#5E7A9B','#FFF','14px');" style="text-align:center;">Reset Display</button>
|
<button onclick="mailHopPreferences.ResetDisplay('#5E7A9B','#ffffff','14px');" style="text-align:center;">Reset Display</button>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -38,6 +38,16 @@
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
background: #5E7A9B;
|
background: #5E7A9B;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mailhopsNoficationBox .bar-link {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mailhopsNoficationBox .bar-link:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mailhopsNoficationBox #mailhopsDataPanePrefsLink {
|
#mailhopsNoficationBox #mailhopsDataPanePrefsLink {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user