From 1416ae36a21c334e5e0c79ebd53174dcda6a2711 Mon Sep 17 00:00:00 2001 From: artem Date: Thu, 14 Aug 2008 09:05:23 +0000 Subject: - [DEV-137] minor fix in selection box (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5910 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/js/common.js | 2 +- frontends/php/js/sbox.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'frontends/php') diff --git a/frontends/php/js/common.js b/frontends/php/js/common.js index 621bb4c2..2dc484bb 100644 --- a/frontends/php/js/common.js +++ b/frontends/php/js/common.js @@ -84,7 +84,7 @@ function SDI(msg){ doc_body.appendChild(div_help); div_help.setAttribute('id','div_help'); - div_help.setAttribute('style','position: absolute; left: 10px; top: 10px; border: 1px red solid; width: 800px; height: 400px; background-color: white; overflow: auto; z-index: 20;'); + div_help.setAttribute('style','position: absolute; left: 10px; top: 10px; border: 1px red solid; width: 500px; height: 400px; background-color: white; overflow: auto; z-index: 20;'); } div_help.appendChild(document.createTextNode("DEBUG INFO: ")); diff --git a/frontends/php/js/sbox.js b/frontends/php/js/sbox.js index fd323774..231b2762 100644 --- a/frontends/php/js/sbox.js +++ b/frontends/php/js/sbox.js @@ -77,11 +77,12 @@ initialize: function(stime, period){ }, onselect: function(){ - this.px2time = parseInt(this.obj.period/this.obj.width); - + this.px2time = this.obj.period/this.obj.width; + this.stime = Math.round(this.box.left * this.px2time + this.obj.stime); this.period = this.calcperiod(); +//SDI(this.stime+' : '+this.period); this.sboxload(); }, @@ -212,7 +213,8 @@ moveright: function(width){ }, calcperiod: function(){ - this.px2time = parseInt(this.obj.period/this.obj.width); + this.px2time = this.obj.period/this.obj.width; +//SDI('CALCP: '+this.box.width+' * '+this.px2time); return Math.round(this.box.width * this.px2time); }, -- cgit