Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 5 years ago
commit d9259d4658

@ -377,6 +377,14 @@ define([
field.focus();
});
var $field = field.tokenfield.closest('.tokenfield').find('.token-input');
$field.on('keypress', function (e) {
if (!$field.val() && e.which === 13) { return void $ok.click(); }
});
$field.on('keydown', function (e) {
if (!$field.val() && e.which === 27) { return void $cancel.click(); }
});
return tagger;
};

@ -1364,6 +1364,7 @@ define([
case 'import':
button = $('<button>', {
'class': 'fa fa-upload cp-toolbar-icon-import',
// XXX text is weird anywhere other than the drive
title: Messages.importButtonTitle,
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.importButton));
/*if (data.types) {
@ -1569,6 +1570,7 @@ define([
button = $('<button>', {
title: Messages.printButtonTitle2,
'class': "fa fa-print cp-toolbar-icon-print",
// XXX people don't realize this does PDF (https://github.com/xwiki-labs/cryptpad/issues/357#issuecomment-640711724)
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.printText));
break;
case 'history':

@ -526,6 +526,8 @@ define([
}
});
});
return $(menu);
};
@ -919,6 +921,11 @@ define([
if (e.ctrlKey) { ev.ctrlKey = true; }
if (e.shiftKey) { ev.shiftKey = true; }
// ESC
if (e.which === 27) {
return void APP.hideMenu();
}
// Enter
if (e.which === 13) {
var $allSelected = $content.find('.cp-app-drive-element.cp-app-drive-element-selected');

@ -376,6 +376,7 @@ define([
todo();
});
var $upButton = common.createButton('upload', false, data);
$upButton.removeProp('title');
$upButton.text(Messages.profile_upload);
$upButton.prepend($('<span>', {'class': 'fa fa-upload'}));
$block.append($upButton);

@ -177,7 +177,7 @@ define([
});
// If file, display the upload button
if (types.indexOf('file') !== -1 && common.isLoggedIn()) {
if (types.indexOf('file') !== -1) {
var f = (filters && filters.filter) || {};
delete data.accept;
if (Array.isArray(f.fileType)) {
@ -188,7 +188,13 @@ define([
return val;
});
}
$filter.append(common.createButton('upload', false, data));
}
var $uploadButton = common.createButton('upload', false, data);
$filter.append($uploadButton);
if (!common.isLoggedIn()) {
$uploadButton.prop('disabled', true)
.prop('title', Messages.upload_mustLogin);
}
var $container = $(h('span.cp-filepicker-content', [

@ -173,7 +173,7 @@ define([
classes: 'btn-danger'
}, function() {
if (typeof(onHide) !== "function") { return; }
onHide(hide); // XXX
onHide(hide);
});
$(answer).click(function () {

@ -220,6 +220,7 @@
width: 100%;
padding: 12px;
margin-bottom: 20px;
white-space: pre;
}
.cp-teams-invite-password {
margin-bottom: 20px;

@ -987,6 +987,7 @@ define([
});
});
var $upButton = common.createButton('upload', false, data);
$upButton.removeProp('title');
$upButton.text(Messages.profile_upload);
$upButton.prepend($('<span>', {'class': 'fa fa-upload'}));

Loading…
Cancel
Save