merging changes
This commit is contained in:
parent
b05be138cc
commit
8e468ced0b
7 changed files with 31 additions and 14 deletions
|
@ -926,8 +926,7 @@ Lists
|
||||||
margin: auto;
|
margin: auto;
|
||||||
border: 2px solid rgba(0, 0, 0, 0);
|
border: 2px solid rgba(0, 0, 0, 0);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-moz-border-radius: 4px;
|
border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
.OxIconList .OxItem > .OxReflection {
|
.OxIconList .OxItem > .OxReflection {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -55,18 +55,25 @@ Ox.App = function(options) {
|
||||||
@*/
|
@*/
|
||||||
that.api.api(function(result) {
|
that.api.api(function(result) {
|
||||||
Ox.forEach(result.data.actions, function(val, key) {
|
Ox.forEach(result.data.actions, function(val, key) {
|
||||||
that.api[key] = function(data, callback) {
|
that.api[key] = function(/*data, age, callback*/) {
|
||||||
if (arguments.length == 1 && Ox.isFunction(data)) {
|
var data = {}, age = -1, callback = null;
|
||||||
callback = data;
|
Ox.forEach(arguments, function(argument) {
|
||||||
data = {};
|
if (Ox.isObject(argument)) {
|
||||||
}
|
data = argument;
|
||||||
|
} else if (Ox.isNumber(argument)) {
|
||||||
|
age = argument;
|
||||||
|
} else if (Ox.isFunction(argument)) {
|
||||||
|
callback = argument;
|
||||||
|
}
|
||||||
|
});
|
||||||
return Ox.Request.send($.extend({
|
return Ox.Request.send($.extend({
|
||||||
url: self.options.url,
|
age: age,
|
||||||
|
callback: callback,
|
||||||
data: {
|
data: {
|
||||||
action: key,
|
action: key,
|
||||||
data: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
},
|
},
|
||||||
callback: callback
|
url: self.options.url
|
||||||
}, !val.cache ? {age: 0}: {}));
|
}, !val.cache ? {age: 0}: {}));
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -53,6 +53,10 @@ Ox.Request = function(options) {
|
||||||
cache = {};
|
cache = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_leakCache: function() {
|
||||||
|
return cache;
|
||||||
|
},
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
options <f> get/set options
|
options <f> get/set options
|
||||||
() -> <o> get options
|
() -> <o> get options
|
||||||
|
|
|
@ -6,6 +6,7 @@ Ox.IconItem <f:Ox.Element> IconItem Object
|
||||||
(options) -> <f> IconItem Object
|
(options) -> <f> IconItem Object
|
||||||
(options, self) -> <f> IconItem Object
|
(options, self) -> <f> IconItem Object
|
||||||
options <o> Options object
|
options <o> Options object
|
||||||
|
borderRadius <n|0> border radius for icon images
|
||||||
fixedRatio <b|n|false> if set to a number, icons have a fixed ratio
|
fixedRatio <b|n|false> if set to a number, icons have a fixed ratio
|
||||||
height <n|128> icon height
|
height <n|128> icon height
|
||||||
id <s> element id
|
id <s> element id
|
||||||
|
@ -24,6 +25,7 @@ Ox.IconItem = function(options, self) {
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
|
borderRadius: 0,
|
||||||
fixedRatio: false,
|
fixedRatio: false,
|
||||||
height: 128,
|
height: 128,
|
||||||
id: '',
|
id: '',
|
||||||
|
@ -64,7 +66,8 @@ Ox.IconItem = function(options, self) {
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
width: self.options.width + 'px',
|
width: self.options.width + 'px',
|
||||||
height: self.options.height + 'px'
|
height: self.options.height + 'px',
|
||||||
|
borderRadius: self.options.borderRadius + 4 + 'px'
|
||||||
})
|
})
|
||||||
.mousedown(mousedown)
|
.mousedown(mousedown)
|
||||||
.mouseenter(mouseenter)
|
.mouseenter(mouseenter)
|
||||||
|
@ -103,7 +106,8 @@ Ox.IconItem = function(options, self) {
|
||||||
width: self.options.width + 'px',
|
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)
|
// firefox is 1px off when centering images with odd width and scaleY(-1)
|
||||||
paddingLeft: ($.browser.mozilla && self.options.width % 2 ? 1 : 0) + 'px'
|
paddingLeft: ($.browser.mozilla && self.options.width % 2 ? 1 : 0) + 'px',
|
||||||
|
borderRadius: self.options.borderRadius + 4 + 'px'
|
||||||
});
|
});
|
||||||
that.$gradient = $('<div>')
|
that.$gradient = $('<div>')
|
||||||
.css({
|
.css({
|
||||||
|
|
|
@ -5,6 +5,7 @@ Ox.IconList <f:Ox.Element> IconList Object
|
||||||
(options) -> <f> IconList Object
|
(options) -> <f> IconList Object
|
||||||
(options, self) -> <f> IconList Object
|
(options, self) -> <f> IconList Object
|
||||||
options <o> Options object
|
options <o> Options object
|
||||||
|
borderRadius <n|0> border radius for icon images
|
||||||
centerSelection <b|false> scroll list so selection is always centered
|
centerSelection <b|false> scroll list so selection is always centered
|
||||||
defaultRatio <n|1> aspect ratio of icon placeholders
|
defaultRatio <n|1> aspect ratio of icon placeholders
|
||||||
draggable <b|true> can be dragged
|
draggable <b|true> can be dragged
|
||||||
|
@ -29,6 +30,7 @@ Ox.IconList = function(options, self) {
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
|
borderRadius: 0,
|
||||||
centerSelection: false,
|
centerSelection: false,
|
||||||
defaultRatio: 1,
|
defaultRatio: 1,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
@ -91,6 +93,7 @@ Ox.IconList = function(options, self) {
|
||||||
self.options.item(data, self.options.sort, self.options.size) : {}
|
self.options.item(data, self.options.sort, self.options.size) : {}
|
||||||
ratio = !isEmpty ? data.width / data.height : self.options.defaultRatio;
|
ratio = !isEmpty ? data.width / data.height : self.options.defaultRatio;
|
||||||
return self.options.itemConstructor($.extend(data, {
|
return self.options.itemConstructor($.extend(data, {
|
||||||
|
borderRadius: self.options.borderRadius,
|
||||||
fixedRatio: self.options.fixedRatio,
|
fixedRatio: self.options.fixedRatio,
|
||||||
height: Math.round(self.options.size / (ratio <= 1 ? 1 : ratio)),
|
height: Math.round(self.options.size / (ratio <= 1 ? 1 : ratio)),
|
||||||
size: self.options.size,
|
size: self.options.size,
|
||||||
|
|
|
@ -162,9 +162,9 @@ Ox.LargeTimeline = function(options, self) {
|
||||||
if (!self.$tiles[v]) {
|
if (!self.$tiles[v]) {
|
||||||
self.$tiles[v] = $('<img>')
|
self.$tiles[v] = $('<img>')
|
||||||
.attr({
|
.attr({
|
||||||
src: '/' + self.options.videoId + '/timelines/' + (
|
src: '/' + self.options.videoId + '/' + (
|
||||||
self.options.style == 'default' ? 'timeline' : self.options.style
|
self.options.style == 'default' ? 'timeline' : self.options.style
|
||||||
) + '.64.' + v + '.png'
|
) + '64p' + v + '.png'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
left: (v * self.tileWidth) + 'px'
|
left: (v * self.tileWidth) + 'px'
|
||||||
|
|
|
@ -56,7 +56,7 @@ Ox.SmallTimeline = function(options, self) {
|
||||||
self.$line = $('<img>')
|
self.$line = $('<img>')
|
||||||
.addClass('OxTimelineSmallImage')
|
.addClass('OxTimelineSmallImage')
|
||||||
.attr({
|
.attr({
|
||||||
src: '/' + self.options.videoId + '/timelines/timeline.16.0.png'
|
src: '/' + self.options.videoId + '/timeline16.png'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|
Loading…
Reference in a new issue