fix cyclePlay button not working. Move SetButtonState into skin.js
parent
ced36a5333
commit
a6f5ae2601
|
@ -557,3 +557,16 @@ function scaleToFit(baseWidth, baseHeight, scaleEl, bottomEl) {
|
|||
autoScale = closest;
|
||||
return {width: Math.floor(newWidth), height: Math.floor(newHeight), autoScale: autoScale};
|
||||
}
|
||||
|
||||
function setButtonState(element, butClass) {
|
||||
if ( element ) {
|
||||
element.className = butClass;
|
||||
if (butClass == 'unavail' || (butClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) {
|
||||
element.disabled = true;
|
||||
} else {
|
||||
element.disabled = false;
|
||||
}
|
||||
} else {
|
||||
console.log('Element was null in setButtonState');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,18 +130,6 @@ function renderAlarmCues(containerEl) {
|
|||
return alarmHtml;
|
||||
}
|
||||
|
||||
function setButtonState( element, butClass ) {
|
||||
if ( element ) {
|
||||
element.className = butClass;
|
||||
if (butClass == 'unavail' || (butClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) {
|
||||
element.disabled = true;
|
||||
} else {
|
||||
element.disabled = false;
|
||||
}
|
||||
} else {
|
||||
console.log('Element was null in setButtonState');
|
||||
}
|
||||
}
|
||||
|
||||
function changeCodec() {
|
||||
location.replace(thisUrl + '?view=event&eid=' + eventData.Id + filterQuery + sortQuery+'&codec='+$j('#codec').val());
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
function setButtonState(element, butClass) {
|
||||
if ( element ) {
|
||||
element.className = butClass;
|
||||
element.disabled = (butClass != 'inactive');
|
||||
}
|
||||
}
|
||||
|
||||
function showEvents() {
|
||||
$('ptzControls').addClass( 'hidden' );
|
||||
|
|
Loading…
Reference in New Issue