Merge branch 'staging' into ooslide

pull/1/head
yflory 4 years ago
commit c72658f36f

@ -11,6 +11,7 @@ www/common/onlyoffice/web-apps
www/common/onlyoffice/x2t
www/common/onlyoffice/v1
www/common/onlyoffice/v2*
www/common/onlyoffice/v4
server.js
www/common/old-media-tag.js

@ -36,6 +36,10 @@
* updated catch-phrase (Collaboration suite\nend-to-end-encrypted and open-source
* CKEditor
* cursor jump when clicking on a comment bubble
* keybindings for common styles
* nodrive
* load anonymous accounts without creating a drive
* faster load time, less junk on the server
# 4.2.1

@ -62,7 +62,7 @@ define([
var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ?
'/imprint.html' : AppConfig.imprint);
Pages.versionString = "v4.2.1";
Pages.versionString = "v4.3.0";
// used for the about menu
Pages.imprintLink = AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined;

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "cryptpad",
"version": "4.2.0",
"version": "4.3.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
"version": "4.2.1",
"version": "4.3.0",
"license": "AGPL-3.0+",
"repository": {
"type": "git",

@ -30,6 +30,7 @@ var grep = function (pattern, cb) {
'www/common/translations/*',
'www/common/onlyoffice/v1/*',
'www/common/onlyoffice/v2b*',
'www/common/onlyoffice/v4*',
'www/common/onlyoffice/x2t/*',
//'www/common/onlyoffice/build/*',
'www/lib/*',

@ -43,7 +43,12 @@ define([
}, _alert('Sandbox configuration: httpUnsafeOrigin !== httpSafeOrigin'));
assert(function (cb) {
cb((window.location.origin + '/') === ApiConfig.httpUnsafeOrigin);
cb(trimmedSafe === ApiConfig.httpSafeOrigin);
}, "httpSafeOrigin must not have a trailing slash");
assert(function (cb) {
var origin = window.location.origin;
return void cb(ApiConfig.httpUnsafeOrigin === origin);
}, _alert('Sandbox configuration: loading via httpUnsafeOrigin'));

@ -1536,7 +1536,7 @@ define([
var legalLine = template(Messages.info_imprintFlavour, Pages.imprintLink);
var privacyLine = template(Messages.info_privacyFlavour, Pages.privacyLink);
var faqLine = template(Messages.help.generic.more, Pages.docsLink);
var faqLine = template(Messages.help_genericMore, Pages.docsLink);
var content = h('div.cp-info-menu-container', [
h('div.logo-block', [

@ -1292,13 +1292,15 @@ define([
'#title-user-name { display: none !important; }' +
(supportsXLSX() ? '' : '#slot-btn-dt-print { display: none !important; }') +
// New OO:
'#asc-gen566 { display: none !important; }' + // Insert image from url
'#asc-gen257 { display: none !important; }' + // Insert image from url
'section[data-tab="ins"] .separator:nth-last-child(2) { display: none !important; }' + // separator
'#slot-btn-insequation { display: none !important; }' + // Insert equation
//'.toolbar .tabs .ribtab:not(.canedit) { display: none !important; }' + // Switch collaborative mode
'#fm-btn-info { display: none !important; }' + // Author name, doc title, etc. in "File" (menu entry)
'#panel-info { display: none !important; }' + // Same but content
'#image-button-from-url { display: none !important; }' + // Inline image settings: replace with url
'#asc-gen1839 { display: none !important; }' + // Image context menu: replace with url
'#asc-gen5883 { display: none !important; }' + // Rightside image menu: replace with url
'#file-menu-panel .devider { display: none !important; }' + // separator in the "File" menu
'#left-btn-spellcheck, #left-btn-about { display: none !important; }'+
'div.btn-users.dropdown-toggle { display: none; !important }';

@ -2835,6 +2835,9 @@ define([
if (store.ready) { return; } // the store is already ready, it is a reconnection
store.driveMetadata = info.metadata;
if (!rt.proxy.drive || typeof(rt.proxy.drive) !== 'object') { rt.proxy.drive = {}; }
if (!rt.proxy[Constants.displayNameKey] && store.noDriveName) {
store.proxy[Constants.displayNameKey] = store.noDriveName;
}
/*
// deprecating localStorage migration as of 4.2.0
var drive = rt.proxy.drive;
@ -2950,7 +2953,13 @@ define([
if (!store.network) {
var wsUrl = NetConfig.getWebsocketURL();
return void Netflux.connect(wsUrl).then(function (network) {
store.network = network;
// If we already haave a network (race condition), use the
// existing one and forget this one
if (!store.network) { store.network = network; }
else {
network.disconnect();
network = store.network;
}
// We need to know the HistoryKeeper ID to initialize the anon RPC
// Join a basic ephemeral channel, get the ID and leave it instantly
network.join('0000000000000000000000000000000000').then(function (wc) {

@ -153,7 +153,6 @@
"cancel": "Cancel·la",
"cancelButton": "Cancel·la (Esc)",
"show_help_button": "Mostra l'ajuda",
"hide_help_button": "Amaga l'ajuda",
"help_button": "Ajuda",
"historyText": "Historial",
"historyButton": "Mostra l'historial del document",
@ -420,7 +419,6 @@
"settings_deleteHint": "La supressió del vostre compte és permanent. El vostre CryptDrive i la vostra llista de documents seran suprimits del servidor. La resta de documents serà suprimida després de 90 dies d'inactivitat si ningú els ha desat al seu CryptDrive.",
"settings_deleteButton": "Suprimir el vostre compte",
"settings_deleteModal": "Envieu la següent informació a qui administri el vostre CryptPad per tal que les vostres dades siguin esborrades del servidor.",
"settings_deleteConfirm": "Segur que voleu suprimir el vostre compte? Aquesta acció és irreversible.",
"settings_deleted": "El vostre compte ha estat suprimit. Premeu D'acord per tornar a la pàgina inicial.",
"storageStatus": "Emmagatzematge:<br /><b>{0}</b> utilitzats de <b>{1}</b>",
"settings_anonymous": "No heu iniciat la sessió. Els paràmetres només s'aplicaran al navegador actual.",

@ -151,7 +151,6 @@
"cancel": "Abbrechen",
"cancelButton": "Abbrechen (Esc)",
"show_help_button": "Hilfe anzeigen",
"hide_help_button": "Hilfe verbergen",
"help_button": "Hilfe",
"historyText": "Verlauf",
"historyButton": "Dokumentverlauf anzeigen",
@ -402,7 +401,6 @@
"settings_deleteHint": "Die Löschung eines Accounts ist endgültig. Dein CryptDrive und die Liste deiner Pads werden vom Server gelöscht. Deine restlichen Pads werden nach 90 Tage gelöscht, wenn niemand anderes sie in seinem CryptDrive gespeichert hat.",
"settings_deleteButton": "Deinen Account löschen",
"settings_deleteModal": "Gib die folgenden Informationen an deinen CryptPad-Administrator weiter, damit er die Daten vom Server löschen kann.",
"settings_deleteConfirm": "Wenn du auf OK klickst, wird dein Account dauerhaft gelöscht. Bist du sicher?",
"settings_deleted": "Dein Account ist jetzt gelöscht. Klicke auf OK, um zur Hauptseite zu gelangen.",
"settings_anonymous": "Du bist nicht eingeloggt. Die Einstellungen hier gelten nur für diesen Browser.",
"settings_publicSigningKey": "Öffentlicher Schlüssel zum Unterschreiben",

@ -377,7 +377,6 @@
"slide_invalidLess": "Estilo personalizado no válido",
"ok": "OK",
"show_help_button": "Mostrar ayuda",
"hide_help_button": "Esconder ayuda",
"help_button": "Ayuda",
"history_loadMore": "Cargar más historial",
"pad_mediatagWidth": "Ancho (px)",
@ -484,7 +483,6 @@
"settings_deleteHint": "Borra la cuenta es permanente. SU CryptDrive y la lista de notas serán borradas del servidor. El resto de sus notas sera borrada en 90 días si nadie mas las ha guardado en su CryptDrive.",
"settings_deleteButton": "Borrar su cuenta",
"settings_deleteModal": "Compartir la siguiente información con el administrado de su CryptDrive a fin de que sus datos sean removidos de su servidor.",
"settings_deleteConfirm": "Presionar OK borrará su cuanta de manera permanente. Está seguro?",
"settings_deleted": "Tu cuenta de usuario ha sido borrada. Presione OK para ir a la página principal.",
"uploadFolderButton": "Subir carpeta",
"fm_morePads": "Más",

@ -156,7 +156,6 @@
"cancel": "Keskeytä",
"cancelButton": "Keskeytä (Esc)",
"show_help_button": "Näytä ohje",
"hide_help_button": "Piilota ohje",
"help_button": "Ohje",
"historyText": "Historia",
"historyButton": "Näytä asiakirjan historia",
@ -419,7 +418,6 @@
"settings_deleteHint": "Käyttäjätilin poisto on pysyvä toimenpide. CryptDrivesi ja lista padeistasi poistetaan palvelimelta. Loput padeistasi poistetaan 90 päivän kuluttua, jos kukaan muu ei ole tallentanut niitä omaan CryptDriveensa.",
"settings_deleteButton": "Poista käyttäjätilisi",
"settings_deleteModal": "Jaa seuraavat tiedot CryptPad-instanssisi ylläpitäjän kanssa poistaaksesi tietosi palvelimelta.",
"settings_deleteConfirm": "Napsauttamalla OK käyttäjätilisi poistetaan pysyvästi. Oletko varma?",
"settings_deleted": "Käyttäjätilisi on nyt poistettu. Napsauta OK siirtyäksesi kotisivulle.",
"settings_anonymous": "Et ole kirjautunut sisään. Nämä asetukset koskevat vain tätä selainta.",
"settings_publicSigningKey": "Julkinen salausavain",

@ -153,7 +153,6 @@
"cancel": "Annuler",
"cancelButton": "Annuler (Échap)",
"show_help_button": "Afficher l'aide",
"hide_help_button": "Cacher l'aide",
"help_button": "Aide",
"historyText": "Historique",
"historyButton": "Afficher l'historique du document",
@ -409,7 +408,6 @@
"settings_deleteHint": "La suppression de votre compte utilisateur est permanente. Votre CryptDrive et votre liste de pads seront supprimés du serveur. Le reste de vos pads sera supprimé après 90 jours d'inactivité si personne ne les a stockés dans leur CryptDrive.",
"settings_deleteButton": "Supprimer votre compte",
"settings_deleteModal": "Veuillez envoyer les informations suivantes à votre administrateur CryptPad afin que vos données soient supprimées du serveur.",
"settings_deleteConfirm": "Êtes-vous sûr de vouloir supprimer votre compte utilisateur ? Cette action est irréversible.",
"settings_deleted": "Votre compte utilisateur a été supprimé. Appuyez sur OK pour être redirigé(e) vers la page d'accueil.",
"settings_anonymous": "Vous n'êtes pas connecté. Ces préférences seront utilisées pour ce navigateur.",
"settings_publicSigningKey": "Clé publique de signature",

@ -153,7 +153,6 @@
"cancel": "Annulla",
"cancelButton": "Annulla (Esc)",
"show_help_button": "Mostra la guida",
"hide_help_button": "Nascondi la guida",
"help_button": "Guida",
"historyText": "Cronologia",
"historyButton": "Mostra la cronologia del documento",
@ -570,7 +569,6 @@
"settings_anonymous": "Non sei connesso. Queste impostazioni sono specifiche per questo browser.",
"settings_deleted": "Il tuo account utente è stato cancellato. Premi OK per tornare alla home page.",
"settings_deleteModal": "Condividi le seguenti informazioni con il tuo amministratore CryptPad per far rimuovere i tuoi dati dal server.",
"settings_deleteConfirm": "Cliccando OK cancellerai il tuo account definitivamente. Sei sicuro?",
"settings_autostoreHint": "<b>Automatico</b> Tutti i pad che visiti sono conservati nel tuo CryptDrive.<br><b>Manuale (chiedi sempre)</b> Se non hai ancora conservato alcun pad ti verrà chiesto se vuoi conservarli nel tuo CryptDrive.<br><b>Manuale (non chiedere mai)</b> I pads non sono conservati automaticamente nel tuo Cryptpad. L'opzione di conservarli sarà nascosta.",
"settings_autostoreNo": "Manuale (non chiedere mai)",
"settings_autostoreYes": "Automatico",

@ -285,7 +285,6 @@
"historyText": "履歴",
"help_button": "ヘルプ",
"show_help_button": "ヘルプを表示",
"hide_help_button": "ヘルプを非表示",
"cancel": "キャンセル",
"ok": "OK",
"okButton": "OK (enter)",

@ -156,7 +156,6 @@
"cancel": "Cancel",
"cancelButton": "Cancel (esc)",
"show_help_button": "Show help",
"hide_help_button": "Hide help",
"help_button": "Help",
"historyText": "History",
"historyButton": "Display the document history",
@ -419,7 +418,6 @@
"settings_deleteHint": "Account deletion is permanent. Your CryptDrive and your list of pads will be deleted from the server. The rest of your pads will be deleted in 90 days if nobody else has stored them in their CryptDrive.",
"settings_deleteButton": "Delete your account",
"settings_deleteModal": "Share the following information with your CryptPad administrator in order to have your data removed from their server.",
"settings_deleteConfirm": "Clicking OK will delete your account permanently. Are you sure?",
"settings_deleted": "Your user account is now deleted. Press OK to go to the home page.",
"settings_anonymous": "You are not logged in. Settings here are specific to this browser.",
"settings_publicSigningKey": "Public Signing Key",

@ -276,7 +276,6 @@
"historyButton": "Vis dokumenthistorikken",
"historyText": "Historikk",
"help_button": "Hjelp",
"hide_help_button": "Skjul Hjelp",
"show_help_button": "Vis Hjelp",
"cancelButton": "Avslutt (esc)",
"cancel": "Avslutt",

@ -38,7 +38,6 @@
"historyButton": "Toon documentgeschiedenis",
"historyText": "Geschiedenis",
"help_button": "Hulp",
"hide_help_button": "Verberg hulp",
"show_help_button": "Toon hulp",
"cancelButton": "Annuleren (esc)",
"cancel": "Annuleren",
@ -316,7 +315,6 @@
"settings_publicSigningKey": "Openbare Ondertekeningssleutel",
"settings_anonymous": "U bent niet ingelogd. Instellingen hier gelden alleen voor deze browser.",
"settings_deleted": "Uw account is nu verwijderd. Klik OK om naar de startpagina te gaan.",
"settings_deleteConfirm": "Als u op OK klikt, wordt uw account blijvend verwijderd. Weet u het zeker?",
"settings_deleteModal": "Deel de volgende informatie met uw CryptPad administrator om uw data te laten verwijderen van de server.",
"settings_deleteButton": "Uw account verwijderen",
"settings_deleteHint": "Het verwijderen van uw account is blijvend. Uw CryptDrive en lijst van werkomgevingen worden voorgoed verwijderd van de server. Uw overige werkomgevingen worden over 90 dagen verwijderd, behalve als ze door een andere gebruiker zijn opgeslagen.",

@ -325,7 +325,6 @@
"fileEmbedTag": "",
"ok": "",
"show_help_button": "",
"hide_help_button": "",
"help_button": "",
"historyText": "",
"openLinkInNewTab": "",

@ -317,7 +317,6 @@
"fileEmbedTag": "După care plasează această etichetă Media oriunde pe pagina unde vrei sa o plasezi",
"ok": "Ok",
"show_help_button": "Arată ajutorul",
"hide_help_button": "Maschează ajutorul",
"help_button": "Ajutor",
"historyText": "Istoric",
"history_loadMore": "Afișează mai multe elemente din istoric",
@ -462,7 +461,6 @@
"padNotPinnedVariable": "Acest document va expira dupa {4} zile de inactivitate, {0}autentifică-te{1} sau {2}creează-ți un cont{3} pentru a-l pastra.",
"settings_logoutEverywhereButton": "Deconectează-te",
"settings_deleted": "Contul tău de utilizator este șters. Apasă OK pentru a reveni la pagina principală.",
"settings_deleteConfirm": "Dacă apeși OK, contul tău va fi șters permanent. Ești sigur?",
"settings_deleteModal": "Furnizați informațiile următoare administratorului CryptPad-ului dvs. astfel încât acestea să fie șterse de pe server.",
"settings_deleteButton": "Șterge contul tău",
"settings_deleteHint": "Ștergerea contului este permanentă. Cryptdrive-ul tău și lista ta de documente vor fi șterse de pe server. Restul documentelor vor fi șterse în timp de 90 de zile dacă nimeni nu le stochează în CryptDrive-ul său.",

@ -149,7 +149,6 @@
"cancel": "Отмена",
"cancelButton": "Отмена (Esc)",
"show_help_button": "Показать справку",
"hide_help_button": "Скрыть справку",
"help_button": "Справка",
"historyText": "История",
"historyButton": "Показать историю документа",
@ -413,7 +412,6 @@
"settings_deleteHint": "Удаление аккаунта является постоянным. Ваш CryptDrive и список пэдов будут удалены с сервера. Остальные ваши пэды будут удалены через 90 дней, если никто другой не сохранил их в CryptDrive.",
"settings_deleteButton": "Удалить ваш аккаунт",
"settings_deleteModal": "Обменивайтесь следующей информацией с администратором CryptPad, чтобы удалить ваши данные с сервера.",
"settings_deleteConfirm": "Нажмите OK, чтобы удалить ваш аккаунт навсегда. Вы уверены?",
"settings_deleted": "Ваша учетная запись пользователя удалена. Нажмите OK, чтобы перейти на главную страницу.",
"settings_publicSigningKey": "Публичный ключ подписи",
"oo_exportInProgress": "Экспорт в процессе",

@ -171,7 +171,6 @@
"historyButton": "Visa dokumenthistoriken",
"historyText": "Historik",
"help_button": "Hjälp",
"hide_help_button": "Dölj hjälp",
"show_help_button": "Visa hjälp",
"cancelButton": "Avbryt (Esc)",
"cancel": "Avbryt",

@ -1404,6 +1404,35 @@ define([
};
framework._.sfCommon.getSframeChannel().event('EV_SHARE_OPEN', data);
};
var CKEDITOR = window.CKEDITOR;
// remove selected formatting with ctrl-space
editor.addCommand('deformat', {
exec: function (edt) {
edt.execCommand( 'removeFormat', editor.selection );
},
});
editor.setKeystroke(CKEDITOR.CTRL + 32, 'deformat');
// Add keybindings for CTRL+ALT+n to set headings 1-6 on selected text
var styleKeys = {
h1: 49, // 1
h2: 50, // 2
h3: 51, // 3
h4: 52, // 4
h5: 53, // 5
h6: 54, // 6
// 7 unassigned
div: 56,// 8
pre: 57, // 9
p: 48, // 0
};
Object.keys(styleKeys).forEach(function (tag) {
editor.addCommand(tag, new CKEDITOR.styleCommand(new CKEDITOR.style({ element: tag })));
editor.setKeystroke( CKEDITOR.CTRL + CKEDITOR.ALT + styleKeys[tag], tag);
});
Links.init(Ckeditor, editor);
}).nThen(function() {
// Move ckeditor parts to have a structure like the other apps

Loading…
Cancel
Save