Merge branch 'dapsi-demo-update' into exportSheet

This commit is contained in:
yflory 2021-10-04 16:08:28 +02:00
commit 24fa6a4fb6
4 changed files with 16 additions and 2 deletions

View File

@ -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,

View File

@ -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');

View File

@ -16,4 +16,8 @@
iframe[name="frameEditor"] {
display: none;
}
input[type="file"] {
padding: 5px !important;
margin-bottom: 5px;
}
}

View File

@ -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') {