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

pull/1/head
yflory 5 years ago
commit d587a23418

@ -24,7 +24,7 @@
"ckeditor": "4.14.0",
"codemirror": "^5.19.0",
"requirejs": "2.3.5",
"marked": "0.5.0",
"marked": "1.1.0",
"rangy": "rangy-release#~1.3.0",
"json.sortify": "~2.1.0",
"secure-fabric.js": "secure-v1.7.9",

@ -20,7 +20,7 @@ define(function() {
* users and these users will be redirected to the login page if they still try to access
* the app
*/
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'notifications'];
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'notifications', 'support'];
/* CryptPad is available is multiple languages, but only English and French are maintained
* by the developers. The other languages may be outdated, and any missing string for a langauge

@ -1,5 +1,19 @@
CKEDITOR.dialog.add('mediatag', function (editor) {
var Messages = CKEDITOR._mediatagTranslations;
var isReadOnly = function (el) {
if (!el) { return; }
var parent = el;
while (parent) {
if (parent.nodeName.toUpperCase() === 'BODY') {
// I'm not sure why "false" is a string and not a boolean here
// but that's how it is and I'm scared to touch it
// --ansuz
return parent.getAttribute("contenteditable") === 'false';
}
parent = parent.parentElement;
}
};
return {
title: Messages.title,
minWidth: 400,
@ -118,6 +132,14 @@ CKEDITOR.dialog.add('mediatag', function (editor) {
update();
});
// disable all of the dialog's inputs if it is opened while in read-only mode
if (isReadOnly(element && element.$)) {
Array.prototype.slice.call(inputs).forEach(function (node) {
node.setAttribute('disabled', true);
});
return;
}
setTimeout(update);
},
onOk: function() {

Loading…
Cancel
Save