From 1ac454b4ddbc17d01a83e9738c932271e890926b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 23 Apr 2011 16:55:14 +0200 Subject: [PATCH] make jslint happy --- source/js/OxUI.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/js/OxUI.js b/source/js/OxUI.js index 8e386b6f..3cf30cc7 100644 --- a/source/js/OxUI.js +++ b/source/js/OxUI.js @@ -184,13 +184,17 @@ Provides function Ox.UI([options], callback) that fires when }, attr: function(obj) { for (var key in obj) { - this[0].setAttribute(key, obj[key]); + if (obj.hasOwnProperty(key)) { + this[0].setAttribute(key, obj[key]); + } } return this; }, css: function(obj) { for (var key in obj) { - this[0].style[key] = obj[key]; + if (obj.hasOwnProperty(key)) { + this[0].style[key] = obj[key]; + } } return this; }, @@ -206,13 +210,13 @@ Provides function Ox.UI([options], callback) that fires when } function start() { - console.log('start') + console.log('start'); var image = new Image(), src = path + 'svg/ox.ui.classic/symbolLoading.svg'; image.onload = function() { element('') .attr({ - src: src, + src: src }) .css(css) .css({ @@ -220,7 +224,7 @@ Provides function Ox.UI([options], callback) that fires when height: '32px' }) .mousedown(function(e) { - e.preventDefault() + e.preventDefault(); }) .appendTo(div); }; @@ -228,7 +232,7 @@ Provides function Ox.UI([options], callback) that fires when } function stop() { - console.log('stop') + console.log('stop'); var counter = 0, message = 'Browser not supported, use ' + userAgents.map(function(userAgent, i) { return userAgent.name + ( @@ -271,7 +275,7 @@ Provides function Ox.UI([options], callback) that fires when position: 'absolute', left: (i * 72) + 'px', width: '72px', - height: '72px', + height: '72px' }) .appendTo(box); element('')