diff --git a/source/Ox.UI/css/Ox.UI.css b/source/Ox.UI/css/Ox.UI.css index 5da5cfe6..12e2addf 100644 --- a/source/Ox.UI/css/Ox.UI.css +++ b/source/Ox.UI/css/Ox.UI.css @@ -1012,7 +1012,7 @@ Lists .OxIconList .OxItem { float: left; - margin: 4px; + margin: 2px; opacity: 0.9; } .OxIconList .OxItem.OxHover, diff --git a/source/Ox.UI/js/Form/Ox.Filter.js b/source/Ox.UI/js/Form/Ox.Filter.js index 2c1072c4..22a50614 100644 --- a/source/Ox.UI/js/Form/Ox.Filter.js +++ b/source/Ox.UI/js/Form/Ox.Filter.js @@ -69,8 +69,8 @@ Ox.Filter = function(options, self) { {id: '!<', title: 'is not less than'}, {id: '>', title: 'is greater than'}, {id: '!>', title: 'is not greater than'}, - {id: '=:', title: 'is between'}, - {id: '!=:', title: 'is not between'}/*, + {id: '-', title: 'is between'}, + {id: '!-', title: 'is not between'}/*, {id: '^', title: 'starts with'}, {id: '!^', title: 'does not start with'}, {id: '$', title: 'ends with'}, @@ -339,6 +339,7 @@ Ox.Filter = function(options, self) { var condition = subpos == -1 ? self.options.query.conditions[pos] : self.options.query.conditions[pos].conditions[subpos]; + // fixme: change to number if needed condition.value = value; triggerChangeEvent(); } diff --git a/source/Ox.UI/js/List/Ox.IconItem.js b/source/Ox.UI/js/List/Ox.IconItem.js index 453f9393..b790b5cc 100644 --- a/source/Ox.UI/js/List/Ox.IconItem.js +++ b/source/Ox.UI/js/List/Ox.IconItem.js @@ -64,8 +64,9 @@ Ox.IconItem = function(options, self) { } that.css({ - width: self.options.itemWidth + 'px', - height: self.options.itemHeight + 'px' + // 2 * 2 px margin (.css), 2 * 2 px border (here) + width: self.options.itemWidth + 4 + 'px', + height: self.options.itemHeight + + 4 + 'px' }); that.$icon = $('
') .addClass('OxIcon') diff --git a/source/Ox.UI/js/List/Ox.IconList.js b/source/Ox.UI/js/List/Ox.IconList.js index 25c32b07..9678bc7e 100644 --- a/source/Ox.UI/js/List/Ox.IconList.js +++ b/source/Ox.UI/js/List/Ox.IconList.js @@ -18,7 +18,7 @@ Ox.IconList IconList Object keys available item keys max maximum selected selected items min minimum of selcted items - orientation list orientation + orientation orientation ("horizontal", "vertical" or "both") selected array of selected items size list size sort sort keys diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 70e0731b..2d941a45 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -19,7 +19,7 @@ Ox.List List Element keys keys of the list items max Maximum number of items that can be selected (-1 for all) min Minimum number of items that must be selected - orientation 'horizontal' or 'vertical' + orientation 'horizontal', 'vertical' or 'both' pageLength number of items per page selected ids of the selected elements sort sort order @@ -120,9 +120,9 @@ Ox.List = function(options, self) { key_control_v: pasteItems, key_control_x: cutItems, key_delete: deleteItems, - key_end: scrollToFirst, + key_end: scrollToLast, key_enter: open, - key_home: scrollToLast, + key_home: scrollToFirst, key_pagedown: scrollPageDown, key_pageup: scrollPageUp, key_section: preview, // fixme: firefox gets keyCode 0 when pressing space @@ -1158,7 +1158,7 @@ Ox.List = function(options, self) { function setSelected(ids, callback) { // fixme: no case where callback is set - // fixme: can't use selectNone here, + // note: can't use selectNone here, // since it'd trigger a select event var counter = 0; self.$items.forEach(function($item, pos) { @@ -1650,7 +1650,9 @@ Ox.List = function(options, self) { value value, can be whatever that property is @*/ that.value = function(id, key, value) { - var pos = getPositionById(id), + // id can be a number and will then be interpreted as position + Ox.print('that.value id key value', id, key, value) + var pos = Ox.isNumber(id) ? id : getPositionById(id), $item = self.$items[pos], data = $item.options('data'); if (arguments.length == 1) { diff --git a/source/Ox.UI/js/Video/Ox.VideoPreview.js b/source/Ox.UI/js/Video/Ox.VideoPreview.js index aa4c46bf..2b868884 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPreview.js +++ b/source/Ox.UI/js/Video/Ox.VideoPreview.js @@ -10,6 +10,7 @@ Ox.VideoPreview = function(options, self) { fps: 25, frameRatio: 16/9, height: 256, + position: void 0, scaleToFill: false, timeline: '', width: 256 @@ -26,7 +27,7 @@ Ox.VideoPreview = function(options, self) { self.$frame = $('') .addClass('OxFrame') - .attr({src: self.options.getFrame()}) + .attr({src: self.options.getFrame(self.options.position)}) .css(getFrameCSS()) .appendTo(that.$element); @@ -50,7 +51,7 @@ Ox.VideoPreview = function(options, self) { click: click, mouseenter: startLoading, mouseleave: function() { - self.$frame.attr({src: self.options.getFrame()}); + self.$frame.attr({src: self.options.getFrame(self.options.position)}); stopLoading(); } }) @@ -121,7 +122,9 @@ Ox.VideoPreview = function(options, self) { self.setOption = function(key, value) { if (key == 'height') { that.css({height: value + 'px'}); - self.$frame.css(getFrameCSS()); + self.$frame.css(getFrameCSS()); + } else if (key == 'position') { + self.$frame.attr({src: self.options.getFrame(value)}); } else if (key == 'width') { that.css({width: value + 'px'}); self.$frame.attr({src: self.options.getFrame()}) diff --git a/source/Ox.UI/js/Window/Ox.Dialog.js b/source/Ox.UI/js/Window/Ox.Dialog.js index 78c9164c..aa33acbd 100644 --- a/source/Ox.UI/js/Window/Ox.Dialog.js +++ b/source/Ox.UI/js/Window/Ox.Dialog.js @@ -261,7 +261,7 @@ Ox.Dialog = function(options, self) { function getButtonById(id) { var ret = null; Ox.forEach(self.options.buttons, function(button) { - Ox.print(button.options(), button.options('id')) + //Ox.print(button.options(), button.options('id')) if (button.options && button.options('id') == id) { ret = button; return false; diff --git a/source/Ox.UI/themes/classic/css/classic.css b/source/Ox.UI/themes/classic/css/classic.css index 3935fb30..c6cb1020 100644 --- a/source/Ox.UI/themes/classic/css/classic.css +++ b/source/Ox.UI/themes/classic/css/classic.css @@ -141,6 +141,9 @@ Dialog .OxThemeClassic .OxDialog .OxContent { background: rgba(208, 208, 208, 0.95); } +.OxThemeClassic .OxDialog .OxIconList .OxContent { + background: transparent; +} .OxThemeClassic .OxDialog .OxTitle { //color: rgb(48, 48, 48); @@ -305,6 +308,11 @@ Images background: -o-linear-gradient(top, rgba(240, 240, 240, 0.75), rgba(240, 240, 240, 1)); background: -webkit-linear-gradient(top, rgba(240, 240, 240, 0.75), rgba(240, 240, 240, 1)); } +.OxThemeClassic .OxDialog .OxReflection > div { + background: -moz-linear-gradient(top, rgba(208, 208, 208, 0.75), rgba(208, 208, 208, 1)); + background: -o-linear-gradient(top, rgba(208, 208, 208, 0.75), rgba(208, 208, 208, 1)); + background: -webkit-linear-gradient(top, rgba(208, 208, 208, 0.75), rgba(208, 208, 208, 1)); +} /* ================================================================================ diff --git a/source/Ox.UI/themes/modern/css/modern.css b/source/Ox.UI/themes/modern/css/modern.css index 2b6c24b1..15c57cd5 100644 --- a/source/Ox.UI/themes/modern/css/modern.css +++ b/source/Ox.UI/themes/modern/css/modern.css @@ -141,6 +141,9 @@ Dialog .OxThemeModern .OxDialog .OxContent { background: rgba(48, 48, 48, 0.95); } +.OxThemeModern .OxDialog .OxIconList .OxContent { + background: transparent; +} .OxThemeModern .OxLayer { background: rgb(0, 0, 0); @@ -288,6 +291,11 @@ Images background: -o-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1)); background: -webkit-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1)); } +.OxThemeModern .OxDialog .OxReflection > div { + background: -moz-linear-gradient(top, rgba(48, 48, 48, 0.75), rgba(48, 48, 48, 1)); + background: -o-linear-gradient(top, rgba(48, 48, 48, 0.75), rgba(48, 48, 48, 1)); + background: -webkit-linear-gradient(top, rgba(48, 48, 48, 0.75), rgba(48, 48, 48, 1)); +} /* ================================================================================ diff --git a/source/Ox.js b/source/Ox.js index 474930a9..c6b0a4b8 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -4516,7 +4516,7 @@ Ox.isValidEmail Tests if a string is a valid e-mail address @*/ // fixme: rename to isEmail Ox.isValidEmail = function(str) { - return !!/^[0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6}$/i(str); + return !!/^[0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6}$/i.test(str); } /*@ @@ -4613,6 +4613,8 @@ Ox.repeat Repeat a value multiple times "foofoofoo" > Ox.repeat([1, 2], 3) [1, 2, 1, 2, 1, 2] + > Ox.repeat([{k: "v"}], 3) + [{k: "v"}, {k: "v"}, {k: "v"}] @*/ Ox.repeat = function(val, num) { var ret;