diff --git a/build/css/ox.ui.classic.css b/build/css/ox.ui.classic.css index ce75b363..c6bd7bad 100644 --- a/build/css/ox.ui.classic.css +++ b/build/css/ox.ui.classic.css @@ -165,7 +165,7 @@ Lists ================================================================================ */ -.OxThemeClassic .OxIconList .OxItem > .OxIcon img.OxLoading { +.OxThemeClassic .OxIconList .OxItem img.OxLoading { border-color: rgb(208, 208, 208); background: -moz-linear-gradient(top, rgb(255, 255, 255), rgb(224, 224, 224)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(255, 255, 255)), color-stop(1, rgb(224, 224, 224))); diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index 9b4a580c..69477f7e 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -692,7 +692,7 @@ Lists .OxIconList .OxItem > .OxIcon, .OxIconList .OxItem > .OxText { - left: -2px; + //left: -2px; } .OxIconList .OxItem > .OxIcon img { diff --git a/build/css/ox.ui.modern.css b/build/css/ox.ui.modern.css index 0858afb2..8060d876 100644 --- a/build/css/ox.ui.modern.css +++ b/build/css/ox.ui.modern.css @@ -146,7 +146,7 @@ Lists ================================================================================ */ -.OxThemeModern .OxIconList .OxItem > .OxIcon img.OxLoading { +.OxThemeModern .OxIconList .OxItem img.OxLoading { border-color: rgb(48, 48, 48); background: -moz-linear-gradient(top, rgb(32, 32, 32), rgb(0, 0, 0)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(32, 32, 32)), color-stop(1, rgb(0, 0, 0))); diff --git a/build/js/ox.js b/build/js/ox.js index 3f8f627f..26ca2919 100644 --- a/build/js/ox.js +++ b/build/js/ox.js @@ -1731,7 +1731,7 @@ Ox.wordwrap = function(str, len, sep, bal, spa) { >>> Ox.wordwrap("These are short words", 16, "
", true) These are
short words */ - var str = str.toString(), + var str = str === null ? '' : str.toString(), len = len || 80, sep = sep || "
", bal = bal || false, diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 5a171c71..f2db5906 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -5719,7 +5719,7 @@ requires height: self.options.size * 1.5, lineLength: self.options.size == 64 ? 17 : 23, lines: self.options.size == 64 ? 4 : 5, - url: oxui.path + '/png/ox.ui.' + Ox.theme() + '/icon.png', + url: oxui.path + '/png/ox.ui/transparent.png', width: self.options.size }); self.title = formatText(self.options.title, self.lines - 1, self.lineLength); @@ -5732,14 +5732,14 @@ requires that.$icon = $('
') .addClass('OxIcon') .css({ - top: self.options.size == 64 ? -68 : -120, + top: self.options.size == 64 ? -72 : -124, width: (self.options.size + 4) + 'px', - height: self.options.size + 'px' + height: (self.options.size + 4) + 'px' }); that.$iconImage = $('') .addClass('OxLoading OxTarget') .attr({ - src: self.options.url + src: self.url }) .css({ width: self.options.width + 'px', @@ -5748,7 +5748,7 @@ requires .mousedown(mousedown) .mouseenter(mouseenter) .mouseleave(mouseleave) - .load(load); + .one('load', load); that.$textBox = $('
') .addClass('OxText') .css({ @@ -5770,17 +5770,19 @@ requires .addClass('OxReflection') .css({ top: self.options.size + 'px', - width: self.options.size + 'px', + width: (self.options.size + 4) + 'px', height: (self.options.size / 2) + 'px' }); that.$reflectionImage = $('') .addClass('OxLoading') .attr({ - src: self.options.url + src: self.url }) .css({ width: self.options.width + 'px', - height: self.options.height + 'px' + height: self.options.height + 'px', + // firefox is 1px off when centering images with odd width and scaleY(-1) + paddingLeft: ($.browser.mozilla && self.options.width % 2 ? 1 : 0) + 'px' }); that.$gradient = $('
') .css({ @@ -5821,8 +5823,16 @@ requires } function load() { - that.$iconImage.removeClass('OxLoading'); - that.$reflectionImage.removeClass('OxLoading'); + that.$iconImage.attr({ + src: self.options.url + }) + .one('load', function() { + that.$iconImage.removeClass('OxLoading'); + that.$reflectionImage.removeClass('OxLoading'); + }); + that.$reflectionImage.attr({ + src: self.options.url + }); } function mousedown(e) { @@ -6071,9 +6081,11 @@ requires } function getPage() { - return self.options.orientation == 'horizontal' - ? Math.floor((that.scrollLeft() - self.listMargin / 2) / self.pageWidth) - : Math.floor((that.scrollTop() - self.listMargin / 2) / self.pageHeight); + return Math.max( + Math.floor(self.options.orientation == 'horizontal' ? + (that.scrollLeft() - self.listMargin / 2) / self.pageWidth : + (that.scrollTop() - self.listMargin / 2) / self.pageHeight + ), 0); } function getPositions() { diff --git a/build/png/ox.ui/transparent.png b/build/png/ox.ui/transparent.png new file mode 100644 index 00000000..95007b9b Binary files /dev/null and b/build/png/ox.ui/transparent.png differ