fix video buttons

This commit is contained in:
rolux 2013-01-31 17:28:35 +05:30
parent 788989258a
commit dc8bde4f73
3 changed files with 24 additions and 22 deletions

View file

@ -325,7 +325,8 @@ Forms
background-image: -webkit-linear-gradient(top, $buttonDisabledGradient); background-image: -webkit-linear-gradient(top, $buttonDisabledGradient);
color: $buttonDisabledColor; color: $buttonDisabledColor;
} }
.$themeClass .OxButton.OxSymbol.OxDisabled { .$themeClass .OxButton.OxSymbol.OxDisabled,
.$themeClass .OxButton.OxVideo.OxDisabled {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
} }

View file

@ -10,7 +10,7 @@ Ox.Button <f> Button Object
id <s|''> Element id id <s|''> Element id
overlap <s|'none'> 'none', 'left' or 'right' overlap <s|'none'> 'none', 'left' or 'right'
selectable <b|false> If true, button is selectable selectable <b|false> If true, button is selectable
style <s|'default'> 'default', 'checkbox', 'symbol' or 'tab' style <s|'default'> 'default', 'checkbox', 'symbol', 'tab' or 'video'
title <s|''> Button title title <s|''> Button title
tooltip <s|[s]|''> Tooltip tooltip <s|[s]|''> Tooltip
type <s|text> 'text' or 'image' type <s|text> 'text' or 'image'
@ -69,7 +69,7 @@ Ox.Button = function(options, self) {
.addClass( .addClass(
'OxButton Ox' + Ox.toTitleCase(self.options.size) 'OxButton Ox' + Ox.toTitleCase(self.options.size)
+ (self.options.disabled ? ' OxDisabled': '') + (self.options.disabled ? ' OxDisabled': '')
+ (self.options.selectable && self.options.value ? ' OxSelected': '') + (self.options.selectable && self.options.value ? ' OxSelected' : '')
+ (self.options.style != 'default' ? ' Ox' + Ox.toTitleCase(self.options.style) : '') + (self.options.style != 'default' ? ' Ox' + Ox.toTitleCase(self.options.style) : '')
+ (self.options.overlap != 'none' ? ' OxOverlap' + Ox.toTitleCase(self.options.overlap) : '') + (self.options.overlap != 'none' ? ' OxOverlap' + Ox.toTitleCase(self.options.overlap) : '')
) )
@ -145,7 +145,8 @@ Ox.Button = function(options, self) {
src: Ox.UI.getImageURL( src: Ox.UI.getImageURL(
'symbol' + self.options.title[0].toUpperCase() 'symbol' + self.options.title[0].toUpperCase()
+ self.options.title.slice(1), + self.options.title.slice(1),
self.options.disabled ? 'disabled' self.options.style == 'video' ? 'video'
: self.options.disabled ? 'disabled'
: self.options.selectable && self.options.value ? 'selected' : self.options.selectable && self.options.value ? 'selected'
: '' : ''
) )

View file

@ -601,7 +601,7 @@ Ox.VideoPlayer = function(options, self) {
if (control == 'close') { if (control == 'close') {
self.$closeButton = Ox.Button({ self.$closeButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'close', title: 'close',
tooltip: 'Close', tooltip: 'Close',
type: 'image' type: 'image'
@ -616,7 +616,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'find') { } else if (control == 'find') {
self.$findButton = Ox.Button({ self.$findButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'find', title: 'find',
tooltip: 'Find', tooltip: 'Find',
type: 'image' type: 'image'
@ -629,7 +629,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'fullscreen') { } else if (control == 'fullscreen') {
self.$fullscreenButton = Ox.Button({ self.$fullscreenButton = Ox.Button({
style: 'symbol', style: 'video',
tooltip: ['Enter Fullscreen', 'Exit Fullscreen'], tooltip: ['Enter Fullscreen', 'Exit Fullscreen'],
type: 'image', type: 'image',
value: self.options.fullscreen ? 'shrink' : 'grow', value: self.options.fullscreen ? 'shrink' : 'grow',
@ -645,7 +645,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'goto') { } else if (control == 'goto') {
self.$setButton = Ox.Button({ self.$setButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'goTo' + Ox.toTitleCase(self.options.type), title: 'goTo' + Ox.toTitleCase(self.options.type),
tooltip: 'Go to ' + Ox.toTitleCase(self.options.type) + ' Point', tooltip: 'Go to ' + Ox.toTitleCase(self.options.type) + ' Point',
type: 'image' type: 'image'
@ -658,7 +658,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'mute') { } else if (control == 'mute') {
self.$muteButton = Ox.Button({ self.$muteButton = Ox.Button({
style: 'symbol', style: 'video',
tooltip: ['Mute', 'Unmute'], tooltip: ['Mute', 'Unmute'],
type: 'image', type: 'image',
value: self.options.muted ? 'unmute' : 'mute', value: self.options.muted ? 'unmute' : 'mute',
@ -674,7 +674,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'next') { } else if (control == 'next') {
self.$nextClipButton = Ox.Button({ self.$nextClipButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'arrowRight', title: 'arrowRight',
tooltip: 'Next', tooltip: 'Next',
type: 'image' type: 'image'
@ -689,7 +689,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'open') { } else if (control == 'open') {
self.$openButton = Ox.Button({ self.$openButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'arrowRight', title: 'arrowRight',
tooltip: self.options.controlsTooltips.open || '', tooltip: self.options.controlsTooltips.open || '',
type: 'image' type: 'image'
@ -704,7 +704,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'play') { } else if (control == 'play') {
self.$playButton = Ox.Button({ self.$playButton = Ox.Button({
style: 'symbol', style: 'video',
// FIXME: this is retarded, fix Ox.Button // FIXME: this is retarded, fix Ox.Button
tooltip: ['Play', 'Pause'], tooltip: ['Play', 'Pause'],
type: 'image', type: 'image',
@ -721,7 +721,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'playInToOut') { } else if (control == 'playInToOut') {
self.$playInToOutButton = Ox.Button({ self.$playInToOutButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'playInToOut', title: 'playInToOut',
tooltip: 'Play In to Out', tooltip: 'Play In to Out',
type: 'image' type: 'image'
@ -799,7 +799,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'previous') { } else if (control == 'previous') {
self.$previousClipButton = Ox.Button({ self.$previousClipButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'arrowLeft', title: 'arrowLeft',
tooltip: 'Previous', tooltip: 'Previous',
type: 'image' type: 'image'
@ -814,7 +814,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'scale') { } else if (control == 'scale') {
self.$scaleButton = Ox.Button({ self.$scaleButton = Ox.Button({
style: 'symbol', style: 'video',
tooltip: ['Scale to Fill', 'Scale to Fit'], tooltip: ['Scale to Fill', 'Scale to Fit'],
type: 'image', type: 'image',
value: self.options.scaleToFill ? 'fit' : 'fill', value: self.options.scaleToFill ? 'fit' : 'fill',
@ -828,7 +828,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'set') { } else if (control == 'set') {
self.$setButton = Ox.Button({ self.$setButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'set' + Ox.toTitleCase(self.options.type), title: 'set' + Ox.toTitleCase(self.options.type),
tooltip: 'Set ' + Ox.toTitleCase(self.options.type) + ' Point', tooltip: 'Set ' + Ox.toTitleCase(self.options.type) + ' Point',
type: 'image' type: 'image'
@ -841,7 +841,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'settings') { } else if (control == 'settings') {
self.$settingsButton = Ox.Button({ self.$settingsButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'set', title: 'set',
tooltip: 'Settings', tooltip: 'Settings',
type: 'image' type: 'image'
@ -858,7 +858,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'size') { } else if (control == 'size') {
self.$sizeButton = Ox.Button({ self.$sizeButton = Ox.Button({
style: 'symbol', style: 'video',
tooltip: ['Larger', 'Smaller'], tooltip: ['Larger', 'Smaller'],
type: 'image', type: 'image',
value: self.options.sizeIsLarge ? 'shrink' : 'grow', value: self.options.sizeIsLarge ? 'shrink' : 'grow',
@ -907,7 +907,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'volume') { } else if (control == 'volume') {
self.$volumeButton = Ox.Button({ self.$volumeButton = Ox.Button({
style: 'symbol', style: 'video',
title: getVolumeImage(), title: getVolumeImage(),
tooltip: 'Volume', tooltip: 'Volume',
type: 'image' type: 'image'
@ -920,7 +920,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'zapHome') { } else if (control == 'zapHome') {
self.$zapHomeButton = Ox.Button({ self.$zapHomeButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'up', title: 'up',
tooltip: 'Home Channel', tooltip: 'Home Channel',
type: 'image' type: 'image'
@ -935,7 +935,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'zapNext') { } else if (control == 'zapNext') {
self.$zapNextButton = Ox.Button({ self.$zapNextButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'right', title: 'right',
tooltip: 'Next Channel', tooltip: 'Next Channel',
type: 'image' type: 'image'
@ -950,7 +950,7 @@ Ox.VideoPlayer = function(options, self) {
} else if (control == 'zapPrevious') { } else if (control == 'zapPrevious') {
self.$zapPreviousButton = Ox.Button({ self.$zapPreviousButton = Ox.Button({
style: 'symbol', style: 'video',
title: 'left', title: 'left',
tooltip: 'Previous Channel', tooltip: 'Previous Channel',
type: 'image' type: 'image'