mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'dapsi-demo-update' into exportSheet
This commit is contained in:
commit
24fa6a4fb6
|
@ -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,
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -16,4 +16,8 @@
|
|||
iframe[name="frameEditor"] {
|
||||
display: none;
|
||||
}
|
||||
input[type="file"] {
|
||||
padding: 5px !important;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue