Run pre-commit on legacy code

This commit is contained in:
jo 2021-10-12 11:17:57 +02:00
parent fea11ac752
commit 83b7e4162e
323 changed files with 6126 additions and 6462 deletions

View file

@ -8,7 +8,7 @@ function isAudioSupported(mime){
var bMime = null;
if (mime.indexOf("ogg") != -1 || mime.indexOf("vorbis") != -1) {
bMime = 'audio/ogg; codecs="vorbis"';
bMime = 'audio/ogg; codecs="vorbis"';
} else {
bMime = mime;
}
@ -17,8 +17,8 @@ function isAudioSupported(mime){
//file is an mp3 and flash is installed (jPlayer will fall back to flash to play mp3s).
//Note that checking the navigator.mimeTypes value does not work for IE7, but the alternative
//is adding a javascript library to do the work for you, which seems like overkill....
return (!!audio.canPlayType && audio.canPlayType(bMime) != "") ||
return (!!audio.canPlayType && audio.canPlayType(bMime) != "") ||
(mime.indexOf("mp3") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) ||
(mime.indexOf("mp4") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) ||
(mime.indexOf("mpeg") != -1 && navigator.mimeTypes ["application/x-shockwave-flash"] != undefined);
}
}

View file

@ -109,12 +109,12 @@ function getDatatablesStrings(overrideDict) {
}
function adjustDateToServerDate(date, serverTimezoneOffset){
//date object stores time in the browser's localtime. We need to artificially shift
//it to
//date object stores time in the browser's localtime. We need to artificially shift
//it to
var timezoneOffset = date.getTimezoneOffset()*60*1000;
date.setTime(date.getTime() + timezoneOffset + serverTimezoneOffset*1000);
/* date object has been shifted to artificial UTC time. Now let's
* shift it to the server's timezone */
return date;
@ -130,13 +130,13 @@ var _preview_window = null;
*/
function openAudioPreview(p_event) {
p_event.stopPropagation();
var audioFileID = $(this).attr('audioFile');
var objId = $('.obj_id:first').attr('value');
var objType = $('.obj_type:first').attr('value');
var playIndex = $(this).parent().parent().attr('id');
playIndex = playIndex.substring(4); //remove the spl_
if (objType == "playlist") {
open_playlist_preview(objId, playIndex);
} else if (objType == "block") {
@ -161,8 +161,8 @@ function open_audio_preview(type, id) {
function open_playlist_preview(p_playlistID, p_playlistIndex) {
if (p_playlistIndex == undefined) //Use a resonable default.
p_playlistIndex = 0;
if (_preview_window != null && !_preview_window.closed)
_preview_window.playAllPlaylist(p_playlistID, p_playlistIndex);
else
@ -173,7 +173,7 @@ function open_playlist_preview(p_playlistID, p_playlistIndex) {
function open_block_preview(p_blockId, p_blockIndex) {
if (p_blockIndex == undefined) //Use a resonable default.
p_blockIndex = 0;
if (_preview_window != null && !_preview_window.closed)
_preview_window.playBlock(p_blockId, p_blockIndex);
else
@ -190,7 +190,7 @@ function open_block_preview(p_blockId, p_blockIndex) {
function open_show_preview(p_showID, p_showIndex) {
if (_preview_window != null && !_preview_window.closed)
_preview_window.playAllShow(p_showID, p_showIndex);
else
else
openPreviewWindow(baseUrl+'audiopreview/show-preview/showID/'+p_showID+'/showIndex/'+p_showIndex, previewWidth, previewHeight);
_preview_window.focus();
}
@ -268,7 +268,7 @@ function pad(number, length) {
function removeSuccessMsg() {
var $status = $('.success');
$status.fadeOut("slow", function(){$status.empty()});
}

View file

@ -86,4 +86,3 @@ var AIRTIME = (function(AIRTIME) {
return AIRTIME;
}(AIRTIME || {}));