forked from 0x2620/oxjs
use new form element syntax
This commit is contained in:
parent
d80019a17c
commit
215f1f6c1b
11 changed files with 56 additions and 90 deletions
|
|
@ -493,9 +493,9 @@ Ox.VideoEditor = function(options, self) {
|
|||
.css({float: 'left'})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
self.$goToPosterButton.toggleDisabled();
|
||||
self.$setPosterButton.toggleDisabled();
|
||||
self.$unlockPosterButton.toggleTitle();
|
||||
self.$goToPosterButton.toggleOption('disabled');
|
||||
self.$setPosterButton.toggleOption('disabled');
|
||||
self.$unlockPosterButton.toggle();
|
||||
}
|
||||
})
|
||||
.appendTo(self.$videobar);
|
||||
|
|
@ -512,7 +512,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
.css({float: 'left'})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
self.$setPosterButton.toggleDisabled();
|
||||
self.$setPosterButton.toggleOption('disabled');
|
||||
}
|
||||
})
|
||||
.appendTo(self.$videobar);
|
||||
|
|
@ -632,9 +632,6 @@ Ox.VideoEditor = function(options, self) {
|
|||
})
|
||||
.css({float: 'left'})
|
||||
.appendTo(self.$annotationsbar);
|
||||
self.$annotationsMenuButton.find('input').attr({
|
||||
src: Ox.UI.getImageURL('symbolSet')
|
||||
});
|
||||
|
||||
that.$element = Ox.SplitPanel({
|
||||
elements: [
|
||||
|
|
|
|||
|
|
@ -126,12 +126,9 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
// fixme: $buttonPlay etc. ?
|
||||
self.$playButton = Ox.Button({
|
||||
id: self.options.id + 'Play',
|
||||
title: [
|
||||
{id: 'play', title: 'play'},
|
||||
{id: 'pause', title: 'pause'}
|
||||
],
|
||||
tooltip: ['Play', 'Pause'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
values: ['play', 'pause']
|
||||
})
|
||||
.bindEvent('click', togglePlay)
|
||||
.appendTo(self.$controls);
|
||||
|
|
@ -147,26 +144,21 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
.appendTo(self.$controls);
|
||||
self.$muteButton = Ox.Button({
|
||||
id: self.options.id + 'Mute',
|
||||
title: [
|
||||
{id: 'mute', title: 'mute'},
|
||||
{id: 'unmute', title: 'unmute'}
|
||||
],
|
||||
tooltip: ['Mute', 'Unmute'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
values: ['mute', 'unmute']
|
||||
})
|
||||
.bindEvent('click', toggleMute)
|
||||
.appendTo(self.$controls);
|
||||
self.$sizeButton = Ox.Button({
|
||||
id: self.options.id + 'Size',
|
||||
title: self.options.size == 'small' ? [
|
||||
{id: 'large', title: 'grow'},
|
||||
{id: 'small', title: 'shrink'}
|
||||
] : [
|
||||
{id: 'small', title: 'shrink'},
|
||||
{id: 'large', title: 'grow'}
|
||||
],
|
||||
tooltip: ['Larger', 'Smaller'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.size,
|
||||
values: [
|
||||
{id: 'small', title: 'grow'},
|
||||
{id: 'large', title: 'shrink'}
|
||||
]
|
||||
})
|
||||
.bindEvent('click', toggleSize)
|
||||
.appendTo(self.$controls);
|
||||
|
|
@ -254,7 +246,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function paused() {
|
||||
self.$playButton.toggleTitle();
|
||||
self.$playButton.toggle();
|
||||
}
|
||||
|
||||
function playing(data) {
|
||||
|
|
@ -412,7 +404,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
playInToOut <f> playInToOut
|
||||
@*/
|
||||
that.playInToOut = function() {
|
||||
self.$video.paused() && self.$playButton.toggleTitle();
|
||||
self.$video.paused() && self.$playButton.toggle();
|
||||
self.$video.playInToOut();
|
||||
return that;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -536,12 +536,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
self.$fullscreenButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: [
|
||||
{id: 'grow', title: 'grow', selected: !self.options.fullscreen},
|
||||
{id: 'shrink', title: 'shrink', selected: self.options.fullscreen}
|
||||
],
|
||||
tooltip: ['Enter Fullscreen', 'Exit Fullscreen'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.fullscreen ? 'shrink' : 'grow'
|
||||
values: ['grow', 'shrink']
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
|
|
@ -567,12 +565,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
self.$muteButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: [
|
||||
{id: 'mute', title: 'mute', selected: !self.options.muted},
|
||||
{id: 'unmute', title: 'unmute', selected: self.options.muted}
|
||||
],
|
||||
tooltip: ['Mute', 'Unmute'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.muted ? 'unmute' : 'mute',
|
||||
values: ['mute', 'unmute']
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
|
|
@ -601,12 +597,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$playButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
// FIXME: this is retarded, fix Ox.Button
|
||||
title: [
|
||||
{id: 'play', title: 'play', selected: self.options.paused},
|
||||
{id: 'pause', title: 'pause', selected: !self.options.paused}
|
||||
],
|
||||
tooltip: ['Play', 'Pause'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.paused ? 'play' : 'pause',
|
||||
values: ['play', 'pause']
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
|
|
@ -729,9 +723,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$resolution.children().each(function() {
|
||||
var $this = $(this);
|
||||
$this.children()[1].src =
|
||||
$this.data('resolution') == resolution ?
|
||||
Ox.UI.getImageURL('symbolCheck') :
|
||||
Ox.UI.PATH + 'png/transparent.png'
|
||||
$this.data('resolution') == resolution
|
||||
? Ox.UI.getImageURL('symbolCheck')
|
||||
: Ox.UI.PATH + 'png/transparent.png'
|
||||
});
|
||||
self.$resolutionButton.html(resolution + 'p');
|
||||
self.options.resolution = resolution
|
||||
|
|
@ -770,12 +764,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
self.$scaleButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: [
|
||||
{id: 'fill', title: 'fill', selected: !self.options.scaleToFill},
|
||||
{id: 'fit', title: 'fit', selected: self.options.scaleToFill}
|
||||
],
|
||||
tooltip: ['Scale to Fill', 'Scale to Fit'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.scaleToFill ? 'fit' : 'fill',
|
||||
values: ['fill', 'fit']
|
||||
})
|
||||
.bindEvent('click', function() {
|
||||
toggleScale('button');
|
||||
|
|
@ -799,12 +791,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
self.$sizeButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: [
|
||||
{id: 'grow', title: 'grow', selected: !self.options.sizeIsLarge},
|
||||
{id: 'shrink', title: 'shrink', selected: self.options.sizeIsLarge}
|
||||
],
|
||||
tooltip: ['Larger', 'Smaller'],
|
||||
type: 'image'
|
||||
type: 'image',
|
||||
value: self.options.sizeIsLarge ? 'shrink' : 'grow',
|
||||
values: ['grow', 'shrink']
|
||||
})
|
||||
.bindEvent('click', toggleSize)
|
||||
.appendTo(self['$controls' + titleCase]);
|
||||
|
|
@ -1002,12 +992,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
self.$muteButton = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: [
|
||||
{id: 'mute', title: 'mute', selected: !self.options.muted},
|
||||
{id: 'unmute', title: 'unmute', selected: self.options.muted}
|
||||
],
|
||||
tooltip: ['Mute', 'Unmute'],
|
||||
type: 'image'
|
||||
value: self.options.muted ? 'unmute' : 'mute',
|
||||
values: ['mute', 'unmute']
|
||||
})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
|
|
@ -1601,9 +1589,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
} else if (self.options.paused && self.playOnLoad) {
|
||||
togglePaused('button');
|
||||
}
|
||||
self.$playButton && self.$playButton.options({
|
||||
disabled: false
|
||||
});
|
||||
self.$playButton && self.$playButton.options({disabled: false});
|
||||
|
||||
hideLoadingIcon();
|
||||
if (self.options.showIcon || self.options.showIconOnLoad) {
|
||||
|
|
@ -1803,9 +1789,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.loadedMetadata = false;
|
||||
showLoadingIcon();
|
||||
self.$video.src(self.options.video[self.options.resolution]);
|
||||
self.$playButton && self.$playButton.options({
|
||||
disabled: true
|
||||
});
|
||||
self.$playButton && self.$playButton.options({disabled: true});
|
||||
that.triggerEvent('resolution', {
|
||||
resolution: self.options.resolution
|
||||
});
|
||||
|
|
@ -2119,7 +2103,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
});
|
||||
}
|
||||
if (self.$fullscreenButton && from != 'button') {
|
||||
self.$fullscreenButton.toggleTitle();
|
||||
self.$fullscreenButton.toggle();
|
||||
}
|
||||
that.triggerEvent('fullscreen', {
|
||||
fullscreen: self.options.fullscreen
|
||||
|
|
@ -2135,7 +2119,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$video.volume(1);
|
||||
}
|
||||
if (self.$muteButton && from != 'button') {
|
||||
self.$muteButton.toggleTitle();
|
||||
self.$muteButton.toggle();
|
||||
}
|
||||
self.$volumeButton && self.$volumeButton.attr({
|
||||
src: getVolumeImageURL()
|
||||
|
|
@ -2182,7 +2166,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.options.showMarkers && hideMarkers();
|
||||
}
|
||||
if (self.$playButton && from != 'button') {
|
||||
self.$playButton.toggleTitle();
|
||||
self.$playButton.toggle();
|
||||
}
|
||||
that.triggerEvent('paused', {
|
||||
paused: self.options.paused
|
||||
|
|
@ -2206,7 +2190,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$video.animate(self.videoCSS, 250);
|
||||
self.$poster && self.$poster.animate(self.videoCSS, 250);
|
||||
if (self.$scaleButton && from != 'button') {
|
||||
self.$scaleButton.toggleTitle();
|
||||
self.$scaleButton.toggle();
|
||||
}
|
||||
if (self.$posterMarker) {
|
||||
self.posterMarkerCSS = getPosterMarkerCSS();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue