1
0
Fork 0
forked from 0x2620/oxjs

use new form element syntax

This commit is contained in:
rolux 2011-12-22 12:54:20 +05:30
commit 215f1f6c1b
11 changed files with 56 additions and 90 deletions

View file

@ -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;
};