From 72fce725d7f064f1118a334b53cc4116de6a8b1c Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 17 Sep 2014 15:25:48 +0200 Subject: [PATCH] typos --- static/js/importAnnotationsDialog.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/static/js/importAnnotationsDialog.js b/static/js/importAnnotationsDialog.js index 1523a3988..db58371d9 100644 --- a/static/js/importAnnotationsDialog.js +++ b/static/js/importAnnotationsDialog.js @@ -9,7 +9,7 @@ pandora.ui.importAnnotationsDialog = function(data) { languages = Ox.sortBy(Ox.LANGUAGES.map(function(language) { return {id: language.code, title: language.name}; - }, 'title')), + }), 'title'), $content = Ox.Element() .css({margin: '16px'}), @@ -17,7 +17,7 @@ pandora.ui.importAnnotationsDialog = function(data) { $layerSelect = Ox.Select({ items: layers, label: Ox._('Layer'), - labelWidth: 128 + labelWidth: 128, width: 384 }) .css({ @@ -26,9 +26,9 @@ pandora.ui.importAnnotationsDialog = function(data) { .appendTo($content), $languageSelect = Ox.Select({ - items: layers, + items: languages, label: Ox._('Language'), - labelWidth: 128 + labelWidth: 128, width: 384 }) .css({ @@ -37,7 +37,7 @@ pandora.ui.importAnnotationsDialog = function(data) { .appendTo($content), $fileInput = Ox.FileInput({ - max: 1, + maxFiles: 1, width: 384 }) .css({ @@ -45,8 +45,9 @@ pandora.ui.importAnnotationsDialog = function(data) { }) .bindEvent({ change: function(data) { - if (data.files.length) { - var reader = new FileReader(); + var reader; + if (data.value.length) { + reader = new FileReader(); reader.onloadend = function(event) { srt = parseSRT(this.result); total = srt.length; @@ -60,7 +61,7 @@ pandora.ui.importAnnotationsDialog = function(data) { + (total == 1 ? '' : 's') + '.', [total]) ); }; - reader.readAsText(data.files[0]); + reader.readAsText(data.value[0]); } else { srt = []; total = 0;