cosmetic changes

This commit is contained in:
rolux 2013-07-14 17:44:30 +00:00
parent dcb2395250
commit 5ff09f73ff
7 changed files with 15 additions and 15 deletions

View file

@ -12,9 +12,9 @@
console.log(data.progress); console.log(data.progress);
}, },
done: function(result) { done: function(result) {
if(result.progress == 1) { if (result.progress == 1) {
var response = JSON.parse(result.responseText); var response = JSON.parse(result.responseText);
if(response.resultUrl) { if (response.resultUrl) {
document.location.href = response.resultUrl; document.location.href = response.resultUrl;
} else { } else {
alert(response.status; alert(response.status;
@ -117,9 +117,9 @@ pandora.chunkupload = function(options) {
if (file.mozSlice) { if (file.mozSlice) {
chunk = file.mozSlice(chunkOffset, chunkOffset+chunkSize, file.type); chunk = file.mozSlice(chunkOffset, chunkOffset+chunkSize, file.type);
} else if(file.webkitSlice) { } else if (file.webkitSlice) {
chunk = file.webkitSlice(chunkOffset, chunkOffset+chunkSize, file.type); chunk = file.webkitSlice(chunkOffset, chunkOffset+chunkSize, file.type);
} else if(file.slice) { } else if (file.slice) {
chunk = file.slice(chunkOffset, chunkOffset+chunkSize, file.type); chunk = file.slice(chunkOffset, chunkOffset+chunkSize, file.type);
} else { } else {
that.status = Ox._('Sorry, your browser is currently not supported.'); that.status = Ox._('Sorry, your browser is currently not supported.');

View file

@ -206,7 +206,7 @@ pandora.ui.editPanel = function() {
} }
if (['id', 'index', 'in', 'out', 'duration'].indexOf(key) > -1) { if (['id', 'index', 'in', 'out', 'duration'].indexOf(key) > -1) {
edit.clips = Ox.sortBy(edit.clips, key); edit.clips = Ox.sortBy(edit.clips, key);
if(data[0].operator == '-') { if (data[0].operator == '-') {
edit.clips.reverse(); edit.clips.reverse();
} }
updateClips(edit.clips); updateClips(edit.clips);

View file

@ -363,7 +363,7 @@ pandora.ui.folderList = function(id) {
}, },
*/ */
init: function(data) { 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.site.sectionFolders[ui.section][i].items = data.items;
pandora.$ui.folder[i].$content.css({ pandora.$ui.folder[i].$content.css({
height: data.items * 16 + 'px' height: data.items * 16 + 'px'

View file

@ -82,7 +82,7 @@ pandora.ui.folders = function() {
} }
}) })
]; ];
} else if(ui.section == 'texts') { } else if (ui.section == 'texts') {
extras = [ extras = [
pandora.$ui.personalListsMenu = Ox.MenuButton({ pandora.$ui.personalListsMenu = Ox.MenuButton({
items: [ items: [
@ -113,7 +113,7 @@ pandora.ui.folders = function() {
]('deletetext'); ]('deletetext');
}) })
]; ];
} else if(ui.section == 'edits') { } else if (ui.section == 'edits') {
extras = [ extras = [
pandora.$ui.personalListsMenu = Ox.MenuButton({ pandora.$ui.personalListsMenu = Ox.MenuButton({
items: [ items: [

View file

@ -83,7 +83,7 @@ pandora.ui.importAnnotations = function(data) {
text: Ox._('Importing {0} annotations...', [srt.length]) text: Ox._('Importing {0} annotations...', [srt.length])
})); }));
pandora.wait(result.data.taskId, function(result) { pandora.wait(result.data.taskId, function(result) {
if(result.data.status == 'SUCCESS') { if (result.data.status == 'SUCCESS') {
setStatus(Ox._('{0} annotations imported.', [annotations.length])); setStatus(Ox._('{0} annotations imported.', [annotations.length]));
Ox.Request.clearCache(pandora.user.ui.item); Ox.Request.clearCache(pandora.user.ui.item);
pandora.$ui.contentPanel.replaceElement( pandora.$ui.contentPanel.replaceElement(
@ -147,12 +147,12 @@ pandora.ui.importAnnotations = function(data) {
}) })
.bindEvent({ .bindEvent({
click: function(data) { click: function(data) {
if(data.files.length) { if (data.files.length) {
var reader = new FileReader(); var reader = new FileReader();
reader.onloadend = function(event) { reader.onloadend = function(event) {
srt = parseSRT(this.result); srt = parseSRT(this.result);
total = srt.length; total = srt.length;
if(total && layer) { if (total && layer) {
importButton.options({disabled: false}); importButton.options({disabled: false});
selectLayer.hide(); selectLayer.hide();
selectFile.hide(); selectFile.hide();

View file

@ -62,7 +62,7 @@ pandora.ui.uploadDialog = function(data) {
width: 96 width: 96
}).bindEvent({ }).bindEvent({
click: function(data) { click: function(data) {
if(data.files.length) { if (data.files.length) {
$actionButton.hide(); $actionButton.hide();
$closeButton.options('title', Ox._('Cancel')); $closeButton.options('title', Ox._('Cancel'));
upload(data.files[0]); upload(data.files[0]);

View file

@ -593,10 +593,10 @@ pandora.getClipVideos = function(clip, resolution) {
var item = { var item = {
src: pandora.getVideoURL(clip.item, resolution, i + 1) 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; item = null;
} else { } else {
if(currentTime <= start && currentTime + clip.durations[i] > start) { if (currentTime <= start && currentTime + clip.durations[i] > start) {
item['in'] = start - currentTime; item['in'] = start - currentTime;
} }
if (currentTime + clip.durations[i] >= end) { if (currentTime + clip.durations[i] >= end) {
@ -1724,7 +1724,7 @@ pandora.wait = function(taskId, callback, timeout) {
task.timeout = setTimeout(function() { task.timeout = setTimeout(function() {
pandora.api.taskStatus({taskId: taskId}, function(result) { pandora.api.taskStatus({taskId: taskId}, function(result) {
var t; var t;
if(result.data.status == 'PENDING') { if (result.data.status == 'PENDING') {
t = pandora.wait(taskId, callback); t = pandora.wait(taskId, callback);
task.timeout = t.timeout; task.timeout = t.timeout;
} else { } else {