1
0
Fork 0
forked from 0x2620/oxjs

various improvements in OxJS and OxUI

This commit is contained in:
rolux 2011-04-29 14:40:51 +02:00
commit 7380595c7e
48 changed files with 184 additions and 161 deletions

View file

@ -2,7 +2,7 @@
Ox.AnnotationPanel = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
id: '',
items: [],
@ -39,7 +39,7 @@ Ox.AnnotationPanel = function(options, self) {
self.$annotations = new Ox.List({
construct: function(data) {
return new Ox.Element('div')
return new Ox.Element({})
.addClass('OxAnnotation OxEditable OxTarget')
.html(Ox.parseHTML(data.value));
},
@ -68,11 +68,11 @@ Ox.AnnotationPanel = function(options, self) {
.appendTo(that.$content);
/*
self.$annotations = new Ox.Element('div')
self.$annotations = new Ox.Element({})
.appendTo(that.$content);
self.$annotation = [];
self.options.items.forEach(function(item, i) {
self.$annotation[i] = new Ox.Element('div')
self.$annotation[i] = new Ox.Element({})
.addClass('OxAnnotation')
.html(item.value.replace(/\n/g, '<br/>'))
.click(function() {

View file

@ -2,7 +2,7 @@
Ox.BlockTimeline = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
cuts: [],
duration: 0,
@ -85,7 +85,7 @@ Ox.BlockTimeline = function(options, self) {
function addLine(i) {
// fixme: get URLs once, not once for every line
self.$lines[i] = new Ox.Element('div')
self.$lines[i] = new Ox.Element({})
.css({
top: i * (self.height + self.margin) + 'px',
width: self.options.width + 'px'
@ -345,7 +345,7 @@ Ox.BlockTimeline = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
//Ox.print('onChange:', key, value)
if (key == 'points') {
//Ox.print('key', key, 'value', value)

View file

@ -10,7 +10,7 @@ Pan.do/ra
Ox.FilesView = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
id: ''
})

View file

@ -22,7 +22,7 @@ Ox.Flipbook = function(options, self) {
'width': '100%'
})
.hide(),
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
frames: {},
duration: 0,
@ -85,7 +85,7 @@ Ox.Flipbook = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'frames') {
cacheFrames();
} else if (key == 'icon') {

View file

@ -2,7 +2,7 @@
Ox.LargeTimeline = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
cuts: [],
duration: 0,
@ -197,7 +197,7 @@ Ox.LargeTimeline = function(options, self) {
}
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'points') {
setMarkerPoint(0);
setMarkerPoint(1);

View file

@ -2,7 +2,7 @@
Ox.SmallTimeline = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
duration: 0,
find: '',
@ -174,7 +174,7 @@ Ox.SmallTimeline = function(options, self) {
setMarkerPoint(1);
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
//Ox.print('onChange:', key, value)
if (key == 'points') {
//Ox.print('key', key, 'value', value)

View file

@ -3,7 +3,7 @@
Ox.VideoEditorPlayer = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
duration: 0,
find: '',
@ -360,7 +360,7 @@ Ox.VideoEditorPlayer = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'height') {
setHeight();
} else if (key == 'points') {

View file

@ -2,7 +2,7 @@
Ox.VideoElement = function(options, self) {
var self = self || {},
that = new Ox.Element('video', self)
that = new Ox.Element('<video>', self)
.defaults({
fps: 25,
height: 0,
@ -57,7 +57,7 @@ Ox.VideoElement = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'height') {
that.size(self.options.width, value);
} else if (key == 'muted') {

View file

@ -2,7 +2,7 @@
Ox.VideoPanelPlayer = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
annotationsSize: 256,
duration: 0,
@ -385,7 +385,7 @@ Ox.VideoPanelPlayer = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'height') {
resizeVideo();
} else if (key == 'position') {

View file

@ -2,7 +2,7 @@
Ox.VideoEditor = function(options, self) {
var self = self || {},
that = new Ox.Element('div', self)
that = new Ox.Element({}, self)
.defaults({
annotationsSize: 0,
cuts: [],
@ -565,7 +565,7 @@ Ox.VideoEditor = function(options, self) {
});
}
self.onChange = function(key, value) {
self.setOption = function(key, value) {
if (key == 'width' || key == 'height') {
//Ox.print('XXXX setSizes', key, value, self.options.width, self.options.height)
setSizes();