diff --git a/static/js/pandora/chunkupload.js b/static/js/pandora/chunkupload.js index 87b8774b..822d965e 100644 --- a/static/js/pandora/chunkupload.js +++ b/static/js/pandora/chunkupload.js @@ -12,9 +12,9 @@ console.log(data.progress); }, done: function(result) { - if(result.progress == 1) { + if (result.progress == 1) { var response = JSON.parse(result.responseText); - if(response.resultUrl) { + if (response.resultUrl) { document.location.href = response.resultUrl; } else { alert(response.status; @@ -117,9 +117,9 @@ pandora.chunkupload = function(options) { if (file.mozSlice) { chunk = file.mozSlice(chunkOffset, chunkOffset+chunkSize, file.type); - } else if(file.webkitSlice) { + } else if (file.webkitSlice) { chunk = file.webkitSlice(chunkOffset, chunkOffset+chunkSize, file.type); - } else if(file.slice) { + } else if (file.slice) { chunk = file.slice(chunkOffset, chunkOffset+chunkSize, file.type); } else { that.status = Ox._('Sorry, your browser is currently not supported.'); diff --git a/static/js/pandora/editPanel.js b/static/js/pandora/editPanel.js index 11591eae..6961fa4d 100644 --- a/static/js/pandora/editPanel.js +++ b/static/js/pandora/editPanel.js @@ -206,7 +206,7 @@ pandora.ui.editPanel = function() { } if (['id', 'index', 'in', 'out', 'duration'].indexOf(key) > -1) { edit.clips = Ox.sortBy(edit.clips, key); - if(data[0].operator == '-') { + if (data[0].operator == '-') { edit.clips.reverse(); } updateClips(edit.clips); diff --git a/static/js/pandora/folderList.js b/static/js/pandora/folderList.js index e06279aa..20c92935 100644 --- a/static/js/pandora/folderList.js +++ b/static/js/pandora/folderList.js @@ -363,7 +363,7 @@ pandora.ui.folderList = function(id) { }, */ init: function(data) { - if(pandora.site.sectionFolders[ui.section][i]) { + if (pandora.site.sectionFolders[ui.section][i]) { pandora.site.sectionFolders[ui.section][i].items = data.items; pandora.$ui.folder[i].$content.css({ height: data.items * 16 + 'px' diff --git a/static/js/pandora/folders.js b/static/js/pandora/folders.js index 6afd7ae7..fc138924 100644 --- a/static/js/pandora/folders.js +++ b/static/js/pandora/folders.js @@ -82,7 +82,7 @@ pandora.ui.folders = function() { } }) ]; - } else if(ui.section == 'texts') { + } else if (ui.section == 'texts') { extras = [ pandora.$ui.personalListsMenu = Ox.MenuButton({ items: [ @@ -113,7 +113,7 @@ pandora.ui.folders = function() { ]('deletetext'); }) ]; - } else if(ui.section == 'edits') { + } else if (ui.section == 'edits') { extras = [ pandora.$ui.personalListsMenu = Ox.MenuButton({ items: [ diff --git a/static/js/pandora/importAnnotations.js b/static/js/pandora/importAnnotations.js index ccae291c..2cc1d059 100644 --- a/static/js/pandora/importAnnotations.js +++ b/static/js/pandora/importAnnotations.js @@ -83,7 +83,7 @@ pandora.ui.importAnnotations = function(data) { text: Ox._('Importing {0} annotations...', [srt.length]) })); pandora.wait(result.data.taskId, function(result) { - if(result.data.status == 'SUCCESS') { + if (result.data.status == 'SUCCESS') { setStatus(Ox._('{0} annotations imported.', [annotations.length])); Ox.Request.clearCache(pandora.user.ui.item); pandora.$ui.contentPanel.replaceElement( @@ -147,12 +147,12 @@ pandora.ui.importAnnotations = function(data) { }) .bindEvent({ click: function(data) { - if(data.files.length) { + if (data.files.length) { var reader = new FileReader(); reader.onloadend = function(event) { srt = parseSRT(this.result); total = srt.length; - if(total && layer) { + if (total && layer) { importButton.options({disabled: false}); selectLayer.hide(); selectFile.hide(); diff --git a/static/js/pandora/uploadDialog.js b/static/js/pandora/uploadDialog.js index d5865fea..feea22e3 100644 --- a/static/js/pandora/uploadDialog.js +++ b/static/js/pandora/uploadDialog.js @@ -62,7 +62,7 @@ pandora.ui.uploadDialog = function(data) { width: 96 }).bindEvent({ click: function(data) { - if(data.files.length) { + if (data.files.length) { $actionButton.hide(); $closeButton.options('title', Ox._('Cancel')); upload(data.files[0]); diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 50d3ca2b..52b482d7 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -593,10 +593,10 @@ pandora.getClipVideos = function(clip, resolution) { var item = { src: pandora.getVideoURL(clip.item, resolution, i + 1) }; - if(currentTime + clip.durations[i] <= start || currentTime > end) { + if (currentTime + clip.durations[i] <= start || currentTime > end) { item = null; } else { - if(currentTime <= start && currentTime + clip.durations[i] > start) { + if (currentTime <= start && currentTime + clip.durations[i] > start) { item['in'] = start - currentTime; } if (currentTime + clip.durations[i] >= end) { @@ -1724,7 +1724,7 @@ pandora.wait = function(taskId, callback, timeout) { task.timeout = setTimeout(function() { pandora.api.taskStatus({taskId: taskId}, function(result) { var t; - if(result.data.status == 'PENDING') { + if (result.data.status == 'PENDING') { t = pandora.wait(taskId, callback); task.timeout = t.timeout; } else {