diff --git a/bower.json b/bower.json index 3ad7d88d2..9fd787c20 100644 --- a/bower.json +++ b/bower.json @@ -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", diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 61a114a68..50249baa8 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -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 diff --git a/www/pad/mediatag-plugin-dialog.js b/www/pad/mediatag-plugin-dialog.js index 472525edd..44503af9b 100644 --- a/www/pad/mediatag-plugin-dialog.js +++ b/www/pad/mediatag-plugin-dialog.js @@ -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() {