diff --git a/www/calendar/inner.js b/www/calendar/inner.js index fbc910bdb..80b5606f2 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -513,7 +513,8 @@ define([ options: types, // Entries displayed in the menu isSelect: true, initialValue: '.ics', - common: common + common: common, + buttonCls: 'btn', }; var $select = UIElements.createDropdown(dropdownConfig); UI.prompt(Messages.exportPrompt, diff --git a/www/common/media-tag.js b/www/common/media-tag.js index a99a74f8f..133e64805 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -82,7 +82,11 @@ var factory = function () { plainText.innerText = e.srcElement.result; cb(void 0, plainText); }); - reader.readAsText(content); + try { + reader.readAsText(content); + } catch (err) { + cb(err); + } }, image: function (metadata, url, content, cfg, cb) { var img = document.createElement('img'); diff --git a/www/convert/app-convert.less b/www/convert/app-convert.less index 79585cad8..18132bc0c 100644 --- a/www/convert/app-convert.less +++ b/www/convert/app-convert.less @@ -16,4 +16,8 @@ iframe[name="frameEditor"] { display: none; } + input[type="file"] { + padding: 5px !important; + margin-bottom: 5px; + } } diff --git a/www/convert/inner.js b/www/convert/inner.js index 7075c4467..c8b2cdd71 100644 --- a/www/convert/inner.js +++ b/www/convert/inner.js @@ -325,8 +325,10 @@ define([ type: 'file' }); APP.$rightside.append([hint, picker]); + Messages.convert_unsupported = "UNSUPPORTED FILE TYPE :("; // XXX $(picker).on('change', function () { + APP.$rightside.find('button, div.notice').remove(); var file = picker.files[0]; var name = file && file.name; var reader = new FileReader(); @@ -345,6 +347,9 @@ define([ }).appendTo(APP.$rightside); }); + } else { + var notice = h('div.notice', Messages.convert_unsupported); + APP.$rightside.append(notice); } }; if (ext === 'bin') {