diff --git a/build/css/ox.ui.classic.css b/build/css/ox.ui.classic.css
index c510c5e4..ce75b363 100644
--- a/build/css/ox.ui.classic.css
+++ b/build/css/ox.ui.classic.css
@@ -165,15 +165,20 @@ Lists
================================================================================
*/
-.OxThemeClassic .OxIconList .OxItem > .OxReflection > div {
- background: -moz-linear-gradient(top, rgba(240, 240, 240, 0.75), rgba(240, 240, 240, 1));
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(240, 240, 240, 0.75)), color-stop(1, rgba(240, 240, 240, 1)));
+.OxThemeClassic .OxIconList .OxItem > .OxIcon 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)));
}
.OxThemeClassic .OxIconList .OxItem.OxSelected > .OxIcon img {
border-color: rgb(128, 128, 128);
-moz-box-shadow: 0 0 4px rgba(128, 128, 128, 1);
-webkit-box-shadow: 0 0 4px rgba(128, 128, 128, 1);
}
+.OxThemeClassic .OxIconList .OxItem > .OxReflection > div {
+ background: -moz-linear-gradient(top, rgba(240, 240, 240, 0.75), rgba(240, 240, 240, 1));
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(240, 240, 240, 0.75)), color-stop(1, rgba(240, 240, 240, 1)));
+}
.OxThemeClassic .OxIconList .OxItem > .OxText > div {
text-shadow: rgb(255, 255, 255) 1px 1px 0;
}
diff --git a/build/css/ox.ui.modern.css b/build/css/ox.ui.modern.css
index d9c5ace4..0858afb2 100644
--- a/build/css/ox.ui.modern.css
+++ b/build/css/ox.ui.modern.css
@@ -146,25 +146,20 @@ Lists
================================================================================
*/
-.OxThemeModern .OxIconList .OxItem {
- //background: rgb(20, 20, 20);
-}
-.OxThemeModern .OxIconList .OxItem img.OxLoading {
- 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)));
-}
.OxThemeModern .OxIconList .OxItem > .OxIcon img.OxLoading {
border-color: rgb(48, 48, 48);
-}
-.OxThemeModern .OxIconList .OxItem > .OxReflection > div {
- background: -moz-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1));
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(16, 16, 16, 0.75)), color-stop(1, rgba(16, 16, 16, 1)));
+ 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)));
}
.OxThemeModern .OxIconList .OxItem.OxSelected > .OxIcon img {
border-color: rgb(128, 128, 128);
-moz-box-shadow: 0 0 4px rgba(128, 128, 128, 1);
-webkit-box-shadow: 0 0 4px rgba(128, 128, 128, 1);
}
+.OxThemeModern .OxIconList .OxItem > .OxReflection > div {
+ background: -moz-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1));
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(16, 16, 16, 0.75)), color-stop(1, rgba(16, 16, 16, 1)));
+}
.OxThemeModern .OxIconList .OxItem > .OxText > div {
text-shadow: rgb(0, 0, 0) 1px 1px 0;
}
diff --git a/build/js/ox.js b/build/js/ox.js
index 53a0a7cf..3f8f627f 100644
--- a/build/js/ox.js
+++ b/build/js/ox.js
@@ -1731,7 +1731,8 @@ Ox.wordwrap = function(str, len, sep, bal, spa) {
>>> Ox.wordwrap("These are short words", 16, "
", true)
These are
short words
*/
- var len = len || 80,
+ var str = str.toString(),
+ len = len || 80,
sep = sep || "
",
bal = bal || false,
spa = Ox.isUndefined(spa) ? true : spa,
diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js
index dd8f9af9..5a171c71 100644
--- a/build/js/ox.ui.js
+++ b/build/js/ox.ui.js
@@ -5632,29 +5632,36 @@ requires
that.$element = new Ox.List({
construct: constructItem,
+ id: self.options.id,
itemHeight: self.itemHeight,
itemWidth: self.itemWidth,
- keys: 'foo',
+ keys: self.options.keys,
orientation: self.options.orientation,
keys: self.options.keys,
request: self.options.request,
- // rowLength: 4,
- size: 128,
+ size: self.options.size,
+ sort: self.options.sort,
type: 'icon',
+ unique: self.options.unique
}/*, self*/)
.addClass('OxIconList Ox' + Ox.toTitleCase(self.options.orientation))
.click(click)
.dblclick(dblclick)
.scroll(scroll);
+ updateKeys();
+
function click() {
}
function constructItem(data) {
- var data = self.options.item(data, self.options.sort, self.options.size);
+ var data = self.options.item(data, self.options.sort, self.options.size),
+ ratio = data.width / data.height;
return new Ox.IconItem($.extend(data, {
- size: self.options.size
+ height: self.options.size / (ratio <= 1 ? 1 : ratio),
+ size: self.options.size,
+ width: self.options.size * (ratio >= 1 ? 1 : ratio)
}));
}
@@ -5666,7 +5673,27 @@ requires
}
- Ox.print('IconList', that.options('id'))
+ function updateKeys() {
+ self.options.keys = Ox.unique($.merge(self.options.keys, [self.options.sort[0].key]));
+ that.$element.options({
+ keys: self.options.keys
+ });
+ }
+
+ self.onChange = function(key, value) {
+ if (key == 'request') {
+ that.$element.options(key, value);
+ }
+ }
+
+ that.sortList = function(key, operator) {
+ self.options.sort = [{
+ key: key,
+ operator: operator
+ }];
+ updateKeys();
+ that.$element.sortList(key, operator);
+ }
return that;
@@ -5677,21 +5704,26 @@ requires
var self = self || {},
that = new Ox.Element({}, self)
.defaults({
- height: 0,
+ height: 128,
id: '',
info: '',
size: 128,
title: '',
- width: 0,
+ width: 128,
url: ''
})
.options(options || {})
$.extend(self, {
+ fontSize: self.options.size == 64 ? 7 : 9,
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',
width: self.options.size
});
+ self.title = formatText(self.options.title, self.lines - 1, self.lineLength);
+ self.info = formatText(self.options.info, 5 - self.title.split('
').length, self.lineLength);
that.css({
width: self.width + 'px',
@@ -5700,7 +5732,7 @@ requires
that.$icon = $('