1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-17 14:50:08 -07:00

Fixed preferences display bar style update

This commit is contained in:
Andrew Van Tassel 2017-01-07 13:00:12 -07:00
parent b0ef68a9c3
commit 89b78d075c

View File

@ -10,8 +10,9 @@ var mailHopPreferences = {
fkey: '', //forecast.io api key fkey: '', //forecast.io api key
country_filter: [], country_filter: [],
previewBar: null, previewBar: null,
loadPreferences: function(){ loadPreferences: function(){
var self = this;
this.api_host = document.getElementById("mailhop.api_host"); this.api_host = document.getElementById("mailhop.api_host");
@ -90,13 +91,13 @@ var mailHopPreferences = {
this.saveAPIKey(); this.saveAPIKey();
document.getElementById("mailhop.bar_color").addEventListener("input", function () { document.getElementById("mailhop.bar_color").addEventListener("input", function () {
this.previewBar.style.background = this.value; self.previewBar.style.background = this.value;
}); });
document.getElementById("mailhop.font_color").addEventListener("input", function () { document.getElementById("mailhop.font_color").addEventListener("input", function () {
this.previewBar.style.color = this.value; self.previewBar.style.color = this.value;
}); });
document.getElementById("mailhop.font_size").addEventListener("input", function () { document.getElementById("mailhop.font_size").addEventListener("input", function () {
this.previewBar.style.fontSize = this.value; self.previewBar.style.fontSize = this.value;
}); });
}, },
savePreferences: function() { savePreferences: function() {