misc fixes
This commit is contained in:
parent
44a8ff015c
commit
8ea49fab73
10 changed files with 41 additions and 16 deletions
|
@ -1012,7 +1012,7 @@ Lists
|
|||
|
||||
.OxIconList .OxItem {
|
||||
float: left;
|
||||
margin: 4px;
|
||||
margin: 2px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
.OxIconList .OxItem.OxHover,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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 = $('<div>')
|
||||
.addClass('OxIcon')
|
||||
|
|
|
@ -18,7 +18,7 @@ Ox.IconList <f:Ox.Element> IconList Object
|
|||
keys <a|[]> available item keys
|
||||
max <n|-1> maximum selected selected items
|
||||
min <n|0> minimum of selcted items
|
||||
orientation <s|both> list orientation
|
||||
orientation <s|both> orientation ("horizontal", "vertical" or "both")
|
||||
selected <a|[]> array of selected items
|
||||
size <n|128> list size
|
||||
sort <a|[]> sort keys
|
||||
|
|
|
@ -19,7 +19,7 @@ Ox.List <f:Ox.Element> List Element
|
|||
keys <a|[]> keys of the list items
|
||||
max <n|-1> Maximum number of items that can be selected (-1 for all)
|
||||
min <n|0> Minimum number of items that must be selected
|
||||
orientation <s|vertical> 'horizontal' or 'vertical'
|
||||
orientation <s|vertical> 'horizontal', 'vertical' or 'both'
|
||||
pageLength <n|100> number of items per page
|
||||
selected <a|[]> ids of the selected elements
|
||||
sort <a|[]> 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 <s> 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) {
|
||||
|
|
|
@ -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 = $('<img>')
|
||||
.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()})
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
================================================================================
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
================================================================================
|
||||
|
|
|
@ -4516,7 +4516,7 @@ Ox.isValidEmail <f> 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 <f> 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;
|
||||
|
|
Loading…
Reference in a new issue