From ccde18044f9a13d91d367550d72b61a03e32129a Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Thu, 21 Mar 2013 19:26:11 +0000 Subject: Fix Option object creation for non-firfox browsers --- src/lib/rrdFlot.js | 12 ++++++------ src/lib/rrdFlotMatrix.js | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/lib/rrdFlot.js b/src/lib/rrdFlot.js index 4a0a5c7..4edc5d6 100644 --- a/src/lib/rrdFlot.js +++ b/src/lib/rrdFlot.js @@ -184,11 +184,11 @@ rrdFlot.prototype.createHTML = function() { var forScaleLegend=document.createElement("Select"); forScaleLegend.id=this.legend_sel_id; - forScaleLegend.appendChild(new Option("Top","nw",this.rrdflot_defaults.legend=="Top")); - forScaleLegend.appendChild(new Option("Bottom","sw",this.rrdflot_defaults.legend=="Bottom")); - forScaleLegend.appendChild(new Option("TopRight","ne",this.rrdflot_defaults.legend=="TopRight")); - forScaleLegend.appendChild(new Option("BottomRight","se",this.rrdflot_defaults.legend=="BottomRight")); - forScaleLegend.appendChild(new Option("None","None",this.rrdflot_defaults.legend=="None")); + forScaleLegend.appendChild(new Option("Top","nw",this.rrdflot_defaults.legend=="Top",this.rrdflot_defaults.legend=="Top")); + forScaleLegend.appendChild(new Option("Bottom","sw",this.rrdflot_defaults.legend=="Bottom",this.rrdflot_defaults.legend=="Bottom")); + forScaleLegend.appendChild(new Option("TopRight","ne",this.rrdflot_defaults.legend=="TopRight",this.rrdflot_defaults.legend=="TopRight")); + forScaleLegend.appendChild(new Option("BottomRight","se",this.rrdflot_defaults.legend=="BottomRight",this.rrdflot_defaults.legend=="BottomRight")); + forScaleLegend.appendChild(new Option("None","None",this.rrdflot_defaults.legend=="None",this.rrdflot_defaults.legend=="None")); forScaleLegend.onchange= function () {rf_this.callback_legend_changed();}; cellScaleLegend.appendChild(forScaleLegend); @@ -218,7 +218,7 @@ rrdFlot.prototype.createHTML = function() { true_tz=-Math.ceil(d.getTimezoneOffset()/60); } for(var j=0; j<24; j++) { - timezone.appendChild(new Option(timezones[j],timezones[j],true_tz==Math.ceil(timezones[j]))); + timezone.appendChild(new Option(timezones[j],timezones[j],true_tz==Math.ceil(timezones[j]),true_tz==Math.ceil(timezones[j]))); } timezone.onchange= function () {rf_this.callback_timezone_changed();}; diff --git a/src/lib/rrdFlotMatrix.js b/src/lib/rrdFlotMatrix.js index 3ab25f8..0d5be93 100644 --- a/src/lib/rrdFlotMatrix.js +++ b/src/lib/rrdFlotMatrix.js @@ -164,11 +164,11 @@ rrdFlotMatrix.prototype.createHTML = function() { cellScaleLegend.appendChild(document.createElement('br')); var forScaleLegend=document.createElement("Select"); forScaleLegend.id=this.legend_sel_id; - forScaleLegend.appendChild(new Option("Top","nw",this.rrdflot_defaults.legend=="Top")); - forScaleLegend.appendChild(new Option("Bottom","sw",this.rrdflot_defaults.legend=="Bottom")); - forScaleLegend.appendChild(new Option("TopRight","ne",this.rrdflot_defaults.legend=="TopRight")); - forScaleLegend.appendChild(new Option("BottomRight","se",this.rrdflot_defaults.legend=="BottomRight")); - forScaleLegend.appendChild(new Option("None","None",this.rrdflot_defaults.legend=="None")); + forScaleLegend.appendChild(new Option("Top","nw",this.rrdflot_defaults.legend=="Top",this.rrdflot_defaults.legend=="Top")); + forScaleLegend.appendChild(new Option("Bottom","sw",this.rrdflot_defaults.legend=="Bottom",this.rrdflot_defaults.legend=="Bottom")); + forScaleLegend.appendChild(new Option("TopRight","ne",this.rrdflot_defaults.legend=="TopRight",this.rrdflot_defaults.legend=="TopRight")); + forScaleLegend.appendChild(new Option("BottomRight","se",this.rrdflot_defaults.legend=="BottomRight",this.rrdflot_defaults.legend=="BottomRight")); + forScaleLegend.appendChild(new Option("None","None",this.rrdflot_defaults.legend=="None",this.rrdflot_defaults.legend=="None")); forScaleLegend.onchange= function () {rf_this.callback_legend_changed();}; cellScaleLegend.appendChild(forScaleLegend); -- cgit v1.2.3