forked from 0x2620/oxjs
misc fixes
This commit is contained in:
parent
44a8ff015c
commit
8ea49fab73
10 changed files with 41 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue