summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-04 19:07:26 +0000
committeralecpl <alec@alec.pl>2011-07-04 19:07:26 +0000
commit8fc0f9451e63c92ec99eadb8cd13dd69ded69156 (patch)
tree35ee70a9e7ba1d82cff9140b5fdd439da101d859 /program/js/common.js
parent8bce65524675bb0ab95819fe8214f4390c2cf9ea (diff)
- Fix GCC errors and warnings (#1487988)
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js26
1 files changed, 11 insertions, 15 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 16f2ebfc4..cacf0ff8e 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -383,21 +383,17 @@ function rcube_layer(id, attributes)
parent = arg.parent,
obj = document.createElement('DIV');
- with (obj) {
- id = this.name;
- with (style) {
- position = 'absolute';
- visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden';
- left = l+'px';
- top = t+'px';
- if (w)
- width = w.toString().match(/\%$/) ? w : w+'px';
- if (h)
- height = h.toString().match(/\%$/) ? h : h+'px';
- if (z)
- zIndex = z;
- }
- }
+ obj.id = this.name;
+ obj.style.position = 'absolute';
+ obj.style.visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden';
+ obj.style.left = l+'px';
+ obj.style.top = t+'px';
+ if (w)
+ obj.style.width = w.toString().match(/\%$/) ? w : w+'px';
+ if (h)
+ obj.style.height = h.toString().match(/\%$/) ? h : h+'px';
+ if (z)
+ obj.style.zIndex = z;
if (parent)
parent.appendChild(obj);