From b2972d5707fc427532aa1a22a2c5e0ecf0c679fa Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 20 Jun 2019 10:21:42 +0200 Subject: [PATCH 01/17] Add rename F2 shortcut in drive --- www/drive/inner.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/drive/inner.js b/www/drive/inner.js index 1d90beb49..151ef76d2 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -3636,6 +3636,14 @@ define([ APP.hideMenu(); }); + $content.on("keydown", function (e) { + if (e.which === 113) { + var paths = $contextMenu.data('paths'); + if (paths.length !== 1) { return; } + displayRenameInput(paths[0].element, paths[0].path); + } + }); + // Chrome considers the double-click means "select all" in the window $content.on('mousedown', function (e) { $content.focus(); From 0af7824a3ea3bf063ca691764ef0017cfae213ba Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 20 Jun 2019 16:51:04 +0200 Subject: [PATCH 02/17] Add context menu separators --- www/drive/inner.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/www/drive/inner.js b/www/drive/inner.js index 151ef76d2..d7629d52c 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -124,6 +124,7 @@ define([ var $tagsIcon = $('', {"class": "fa " + faTags}); var $passwordIcon = $('', {"class": "fa fa-lock"}); var $expirableIcon = $('', {"class": "fa fa-clock-o"}); + var $separator = $('
', {"class": "dropdown-divider"}); var LS_LAST = "app-drive-lastOpened"; var LS_OPENED = "app-drive-openedFolders"; @@ -311,6 +312,7 @@ define([ 'tabindex': '-1', 'data-icon': faReadOnly, }, Messages.fc_open_ro)), + $separator.clone()[0], h('li', h('a.cp-app-drive-context-expandall.dropdown-item', { 'tabindex': '-1', 'data-icon': "expandAll", @@ -319,6 +321,7 @@ define([ 'tabindex': '-1', 'data-icon': "collapseAll", }, Messages.fc_collapseAll)), + $separator.clone()[0], h('li', h('a.cp-app-drive-context-color.dropdown-item.cp-app-drive-context-editable', { 'tabindex': '-1', 'data-icon': faColor, @@ -347,6 +350,7 @@ define([ 'tabindex': '-1', 'data-icon': faTags, }, Messages.fc_hashtag)), + $separator.clone()[0], h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { 'tabindex': '-1', 'data-icon': AppConfig.applicationsIcon.pad, @@ -372,6 +376,7 @@ define([ 'data-icon': AppConfig.applicationsIcon.whiteboard, 'data-type': 'whiteboard' }, Messages.button_newwhiteboard)), + $separator.clone()[0], h('li', h('a.cp-app-drive-context-empty.dropdown-item.cp-app-drive-context-editable', { 'tabindex': '-1', 'data-icon': faEmpty, @@ -380,6 +385,7 @@ define([ 'tabindex': '-1', 'data-icon': faRestore, }, Messages.fc_restore)), + $separator.clone()[0], h('li', h('a.cp-app-drive-context-rename.dropdown-item.cp-app-drive-context-editable', { 'tabindex': '-1', 'data-icon': faRename, @@ -1238,6 +1244,20 @@ define([ var displayMenu = function (e) { var $menu = $contextMenu; + var showSep = false; + var $lastVisibleSep = null; + $menu.find(".dropdown-menu").children().each(function (i, el) { + var $el = $(el); + if ($el.is(".dropdown-divider")) { + $el.css("display", showSep ? "list-item" : "none"); + if (showSep) { $lastVisibleSep = $el; } + showSep = false; + } + else if ($el.is("li") && $el.css("display") !== "none") { + showSep = true; + } + }); + if (!showSep && $lastVisibleSep) { $lastVisibleSep.css("display", "none"); } // remove last divider if no options after $menu.css({ display: "block" }); if (APP.mobile()) { return; } var h = $menu.outerHeight(); From 7af53cc0e7ccb2706080ae8d42ab17ea75e279ea Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 20 Jun 2019 16:56:37 +0200 Subject: [PATCH 03/17] Remove New Folder option in context menu when clicking on folder --- www/drive/inner.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index d7629d52c..d6669d1c7 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -1059,8 +1059,7 @@ define([ show = ['newfolder', 'newsharedfolder', 'newdoc']; break; case 'tree': - show = ['open', 'openro', 'expandall', 'collapseall', 'color', 'download', 'share', 'rename', 'delete', 'deleteowned', 'removesf', - 'newfolder', 'properties', 'hashtag']; + show = ['open', 'openro', 'expandall', 'collapseall', 'color', 'download', 'share', 'rename', 'delete', 'deleteowned', 'removesf', 'properties', 'hashtag']; break; case 'default': show = ['open', 'openro', 'share', 'openparent', 'delete', 'deleteowned', 'properties', 'hashtag']; From 29b7c2c2955edc60b9b2d0c884f7aa87839d5610 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 20 Jun 2019 17:17:28 +0200 Subject: [PATCH 04/17] Display "No Action" in context menu when empty --- customize.dist/src/less2/include/contextmenu.less | 6 ++++++ www/drive/inner.js | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index 1a9049b54..e60394bd7 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -15,5 +15,11 @@ cursor: pointer; } } + .cp-app-drive-context-noAction { + font-style: italic; + color: #aaa; + cursor: default; + display: none; + } } } diff --git a/www/drive/inner.js b/www/drive/inner.js index d6669d1c7..94f7d9e5e 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -304,6 +304,7 @@ define([ 'aria-labelledby': 'dropdownMenu', 'style': 'display:block;position:static;margin-bottom:5px;' }, [ + h('span.cp-app-drive-context-noAction.dropdown-item.disabled', Messages.fc_noAction || "No action possible"), h('li', h('a.cp-app-drive-context-open.dropdown-item', { 'tabindex': '-1', 'data-icon': faFolderOpen, @@ -1332,11 +1333,7 @@ define([ displayMenu(e); - if ($contextMenu.find('li:visible').length === 0) { - debug("No visible element in the context menu. Abort."); - $contextMenu.hide(); - return true; - } + $(".cp-app-drive-context-noAction").toggle($contextMenu.find('li:visible').length === 0); $contextMenu.data('paths', paths); return false; From 9b8fed55e976804010e6da6d6ae50e60d5d13a01 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Fri, 21 Jun 2019 17:25:00 +0200 Subject: [PATCH 05/17] Show folders in the results of drive search --- www/common/userObject.js | 34 +++++++++++++++++++++++ www/drive/inner.js | 59 ++++++++++++++++++++++++---------------- 2 files changed, 70 insertions(+), 23 deletions(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index a9068afe6..096cc5057 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -514,6 +514,40 @@ define([ data: exp.getFileData(l) }); }); + + // find folders + var resFolders = []; + var findFoldersRec = function (folder, path) { + for (var key in folder) { + if (isFolder(folder[key])) { + if (isSharedFolder(folder[key])) { +// var name = getSharedFolderData(folder[key]).title || ""; +// if (name.toLowerCase().indexOf(lValue) !== -1) { +// resFolders.push(path.concat([key, ROOT])); +// } + findFoldersRec(folder[key], path.concat([key, ROOT])); + } + else { + if (key.toLowerCase().indexOf(lValue) !== -1) { + resFolders.push({ + id: null, + paths: [path.concat(key)], + data: { + title: key + } + }); + } + findFoldersRec(folder[key], path.concat(key)); + } + } + } + }; + findFoldersRec(files[ROOT], [ROOT]); + resFolders = resFolders.sort(function (a, b) { + return a.data.title.toLowerCase() > b.data.title.toLowerCase(); + }); + ret = resFolders.concat(ret); + return ret; }; exp.getRecentPads = function () { diff --git a/www/drive/inner.js b/www/drive/inner.js index 94f7d9e5e..5937b6aed 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2610,6 +2610,7 @@ define([ var displaySearch = function ($list, value) { var filesList = manager.search(value); filesList.forEach(function (r) { + // if r.id === null, then it's a folder, not a file r.paths.forEach(function (path) { if (!r.inSharedFolder && APP.hideDuplicateOwned && manager.isDuplicateOwned(path)) { return; } @@ -2617,25 +2618,27 @@ define([ var parsed = Hash.parsePadUrl(href); var $table = $(''); var $icon = $('').append($icon).append($title).append($typeName).append($type).appendTo($table); @@ -3208,7 +3221,7 @@ define([ placeholder: Messages.fm_searchPlaceholder }).keyup(function (e) { if (search.to) { window.clearTimeout(search.to); } - if ([38, 39, 40, 41].indexOf(e.which) !== -1) { + if ([37, 38, 39, 40].indexOf(e.which) !== -1) { if (!$input.val()) { $input.blur(); $content.focus(); From d34d517e270d58324567113ffa248df6ff68b164 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Fri, 21 Jun 2019 17:26:32 +0200 Subject: [PATCH 06/17] Fix flex direction in results path of drive search --- www/drive/app-drive.less | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/www/drive/app-drive.less b/www/drive/app-drive.less index ba59e9124..c85cd3c88 100644 --- a/www/drive/app-drive.less +++ b/www/drive/app-drive.less @@ -513,12 +513,18 @@ } .cp-app-drive-search-path { font-style: italic; - display: flex; - flex-flow: row-reverse; - justify-content: right; - .cp-app-drive-path-element { - display: inline-block; - margin-right: 5px; + .cp-app-drive-path-inner { + display: flex; + flex-flow: row-reverse wrap-reverse; + justify-content: flex-end; + .cp-app-drive-path-element { + flex-shrink: 0; + display: inline-block; + margin-right: 5px; + white-space: normal; + word-wrap: break-word; + max-width: 100%; + } } } .cp-app-drive-search-title { From dd62533467c5abe4ba2c38e9e03e5e8b573384f6 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Mon, 24 Jun 2019 10:07:16 +0200 Subject: [PATCH 07/17] Better code for displaying result of search in drive --- www/drive/inner.js | 61 +++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index 5937b6aed..fb2b0bcd9 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2617,28 +2617,10 @@ define([ var href = r.data.href; var parsed = Hash.parsePadUrl(href); var $table = $('
', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'}) - .append(getFileIcon(r.id)); + .append(r.id ? getFileIcon(r.id) : $folderIcon.clone()); var $title = $('', { 'class': 'cp-app-drive-search-col1 cp-app-drive-search-title' - }).text(r.data.title) - .click(function () { - openFile(null, r.data.href); - }); + }).text(r.data.title); + if (r.id) { + $title.click(function () { + openFile(null, r.data.href); + }); + } var $typeName = $('', {'class': 'cp-app-drive-search-label2'}) .text(Messages.fm_type); var $type = $('', {'class': 'cp-app-drive-search-col2'}) - .text(Messages.type[parsed.type] || parsed.type); + .text(r.id ? Messages.type[parsed.type] || parsed.type : Messages.fm_folder); var $atimeName = $('', {'class': 'cp-app-drive-search-label2'}) - .text(Messages.fm_lastAccess); + .text(r.id ? Messages.fm_lastAccess : ""); var $atime = $('', {'class': 'cp-app-drive-search-col2'}) - .text(new Date(r.data.atime).toLocaleString()); + .text(r.id ? new Date(r.data.atime).toLocaleString() : ""); var $ctimeName = $('', {'class': 'cp-app-drive-search-label2'}) - .text(Messages.fm_creation); + .text(r.id ? Messages.fm_creation : ""); var $ctime = $('', {'class': 'cp-app-drive-search-col2'}) - .text(new Date(r.data.ctime).toLocaleString()); + .text(r.id ? new Date(r.data.ctime).toLocaleString() : ""); if (manager.isPathIn(path, ['hrefArray'])) { path.pop(); path.push(r.data.title); @@ -2646,23 +2649,33 @@ define([ createTitle($path, path, true); var parentPath = path.slice(); var $a; - if (parentPath) { - $a = $('').text(Messages.fm_openParent).click(function (e) { + if (r.id) { + if (parentPath) { + $a = $('').text(Messages.fm_openParent).click(function (e) { + e.preventDefault(); + if (manager.isInTrashRoot(parentPath)) { parentPath = [TRASH]; } + else { parentPath.pop(); } + APP.selectedFiles = [r.id]; + APP.displayDirectory(parentPath); + }); + } + } + else { + $a = $('').text(Messages.fm_OpenFolder || "Open folder").click(function (e) { e.preventDefault(); - if (manager.isInTrashRoot(parentPath)) { parentPath = [TRASH]; } - else { parentPath.pop(); } - APP.selectedFiles = [r.id]; - APP.displayDirectory(parentPath); + APP.displayDirectory(path); }); } var $openDir = $('', {'class': 'cp-app-drive-search-opendir'}).append($a); - $('').text(Messages.fc_prop).click(function () { - APP.getProperties(r.id, function (e, $prop) { - if (e) { return void logError(e); } - UI.alert($prop[0], undefined, true); - }); - }).appendTo($openDir); + if (r.id) { + $('').text(Messages.fc_prop).click(function () { + APP.getProperties(r.id, function (e, $prop) { + if (e) { return void logError(e); } + UI.alert($prop[0], undefined, true); + }); + }).appendTo($openDir); + } // rows 1-3 $('
'); - var $icon = $('').append($icon).append($title).append($typeName).append($type).appendTo($table); From ba95ad6bf5e94d787b00707b61b369c0b97faffd Mon Sep 17 00:00:00 2001 From: ClemDee Date: Tue, 25 Jun 2019 09:45:30 +0200 Subject: [PATCH 08/17] Do not move folders if destination is one of the moved folders --- www/drive/inner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/drive/inner.js b/www/drive/inner.js index fb2b0bcd9..7224d729d 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -1361,6 +1361,7 @@ define([ }); cb(); }; + if (paths.some(function (p) { return manager.comparePath(newPath, p) })) { return void cb(); } manager.move(paths, newPath, newCb, copy); }; // Delete paths from the drive and/or shared folders (without moving them to the trash) From 29a2e3a0ea8ae49f5bb5780f50dd8e9d45ee5fd1 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Tue, 25 Jun 2019 10:43:40 +0200 Subject: [PATCH 09/17] Add icons in context menu --- customize.dist/src/less2/include/colortheme.less | 2 ++ customize.dist/src/less2/include/contextmenu.less | 4 ++++ www/drive/inner.js | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index abbe07955..b2076034c 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -26,6 +26,8 @@ @colortheme_form-warning: #f49842; @colortheme_form-warning-hov: darken(@colortheme_form-warning, 5%); +@colortheme_context-menu-icon-color: #7b7b7b; + @colortheme_modal-bg: @colortheme_form-bg-alt; // TODO Modals bg @colortheme_modal-fg: @colortheme_form-color-alt; @colortheme_modal-link: @colortheme_link-color; diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index e60394bd7..2063a239e 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -13,6 +13,10 @@ font-size: @colortheme_app-font-size; a { cursor: pointer; + .fa, .cptools { + margin-right: 1rem; + color: @colortheme_context-menu-icon-color; + } } } .cp-app-drive-context-noAction { diff --git a/www/drive/inner.js b/www/drive/inner.js index 7224d729d..fb9bd4063 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -413,6 +413,16 @@ define([ }, Messages.fc_prop)), ]) ]); + $(menu).find("li a.dropdown-item").each(function (i, el) { + var $icon = $(""); + if ($(el).attr('data-icon')) { + var font = $(el).attr('data-icon').indexOf('cptools') === 0 ? 'cptools' : 'fa'; + $icon.addClass(font).addClass($(el).attr('data-icon')); + } else { + $icon.text($(el).text()); + } + $(el).prepend($icon); + }); return $(menu); }; From bb5104dc0cebe350b5271486d4c1c217db567459 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Wed, 3 Jul 2019 10:54:36 +0200 Subject: [PATCH 10/17] Make sidebar-layout responsive --- customize.dist/src/less2/include/sidebar-layout.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/customize.dist/src/less2/include/sidebar-layout.less b/customize.dist/src/less2/include/sidebar-layout.less index 07471183a..566deca16 100644 --- a/customize.dist/src/less2/include/sidebar-layout.less +++ b/customize.dist/src/less2/include/sidebar-layout.less @@ -1,5 +1,6 @@ @import (reference) "/customize/src/less2/include/colortheme-all.less"; @import (reference) "/customize/src/less2/include/leftside-menu.less"; +@import (reference) "./browser.less"; @sidebar_button-width: 400px; @@ -109,4 +110,13 @@ } } +@media screen and (max-width: @browser_media-medium-screen) { + #cp-sidebarlayout-container { + flex-flow: column; + #cp-sidebarlayout-leftside { + width: 100%; + } + } + +} From 9cff6b0f3bbb29d679fd2aab9ce13514289d84e4 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 3 Jul 2019 15:42:32 +0200 Subject: [PATCH 11/17] Fix typo --- www/drive/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index fb9bd4063..21fd44b3c 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2677,7 +2677,7 @@ define([ else { $icon.append($folderIcon.clone()); $type.text(Messages.fm_folder); - $('').text(Messages.fm_OpenFolder || "Open folder").click(function (e) { + $('').text(Messages.fm_openFolder || "Open folder").click(function (e) { e.preventDefault(); APP.displayDirectory(path); }).appendTo($openDir); From eba32fe994a81c7166424ebfbf984cb460326a70 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 3 Jul 2019 15:54:03 +0200 Subject: [PATCH 12/17] Remove unnecessary code --- www/common/userObject.js | 29 ++++++++++------------------- www/drive/inner.js | 2 +- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index 4cdcc0c46..39b55484a 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -519,26 +519,17 @@ define([ var resFolders = []; var findFoldersRec = function (folder, path) { for (var key in folder) { - if (isFolder(folder[key])) { - if (isSharedFolder(folder[key])) { -// var name = getSharedFolderData(folder[key]).title || ""; -// if (name.toLowerCase().indexOf(lValue) !== -1) { -// resFolders.push(path.concat([key, ROOT])); -// } - findFoldersRec(folder[key], path.concat([key, ROOT])); - } - else { - if (key.toLowerCase().indexOf(lValue) !== -1) { - resFolders.push({ - id: null, - paths: [path.concat(key)], - data: { - title: key - } - }); - } - findFoldersRec(folder[key], path.concat(key)); + if (isFolder(folder[key]) && !isSharedFolder(folder[key])) { + if (key.toLowerCase().indexOf(lValue) !== -1) { + resFolders.push({ + id: null, + paths: [path.concat(key)], + data: { + title: key + } + }); } + findFoldersRec(folder[key], path.concat(key)); } } }; diff --git a/www/drive/inner.js b/www/drive/inner.js index c0e67329b..9db0d92a9 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2684,7 +2684,7 @@ define([ else { $icon.append($folderIcon.clone()); $type.text(Messages.fm_folder); - $('').text(Messages.fm_openFolder || "Open folder").click(function (e) { + $('').text(Messages.fc_open).click(function (e) { e.preventDefault(); APP.displayDirectory(path); }).appendTo($openDir); From c281b3afa6e10a472d05fcb0577a03ca792e896a Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 3 Jul 2019 15:55:24 +0200 Subject: [PATCH 13/17] lint compliance --- www/drive/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index 9db0d92a9..8c35e2300 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -1371,7 +1371,7 @@ define([ }); cb(); }; - if (paths.some(function (p) { return manager.comparePath(newPath, p) })) { return void cb(); } + if (paths.some(function (p) { return manager.comparePath(newPath, p); })) { return void cb(); } manager.move(paths, newPath, newCb, copy); }; // Delete paths from the drive and/or shared folders (without moving them to the trash) From 5bd2f83ebd95a6089148a8e998d424ad6a630c62 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 3 Jul 2019 15:58:06 +0200 Subject: [PATCH 14/17] Revert "Make sidebar-layout responsive" This reverts commit bb5104dc0cebe350b5271486d4c1c217db567459. --- customize.dist/src/less2/include/sidebar-layout.less | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/customize.dist/src/less2/include/sidebar-layout.less b/customize.dist/src/less2/include/sidebar-layout.less index 566deca16..07471183a 100644 --- a/customize.dist/src/less2/include/sidebar-layout.less +++ b/customize.dist/src/less2/include/sidebar-layout.less @@ -1,6 +1,5 @@ @import (reference) "/customize/src/less2/include/colortheme-all.less"; @import (reference) "/customize/src/less2/include/leftside-menu.less"; -@import (reference) "./browser.less"; @sidebar_button-width: 400px; @@ -110,13 +109,4 @@ } } -@media screen and (max-width: @browser_media-medium-screen) { - #cp-sidebarlayout-container { - flex-flow: column; - #cp-sidebarlayout-leftside { - width: 100%; - } - } - -} From 44f9e5ff76483880d037d44f7636752024913dbe Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 3 Jul 2019 14:20:03 +0000 Subject: [PATCH 15/17] Translated using Weblate (English) Currently translated at 100.0% (1017 of 1017 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1017 of 1017 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1016 of 1016 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1015 of 1015 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1014 of 1014 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1013 of 1013 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1012 of 1012 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1011 of 1011 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1010 of 1010 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index e0885452f..ca1783b25 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1057,7 +1057,7 @@ "friendRequest_accepted": "{0} accepted your friend request", "friendRequest_received": "{0} would like to be your friend", "friendRequest_notification": "{0} sent you a friend request", - "notifications_empty": "You have no new notifications", + "notifications_empty": "No notifications available", "notifications_title": "You have unread notifications", "profile_addDescription": "Add a description", "profile_editDescription": "Edit your description", @@ -1103,5 +1103,13 @@ "support_remove": "Remove the ticket", "support_showData": "Show/hide user data", "support_from": "From: {0}", - "support_closed": "This ticket has been closed" + "support_closed": "This ticket has been closed", + "fc_noAction": "No action available", + "notificationsPage": "Notifications", + "openNotificationsApp": "Open notifications panel", + "notifications_cat_all": "All", + "notifications_cat_friends": "Friend requests", + "notifications_cat_pads": "Shared with me", + "notifications_cat_archived": "History", + "notifications_dismissAll": "Dismiss all" } From 80437332005fa35943a241665fc4a0718d07360e Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 3 Jul 2019 14:20:04 +0000 Subject: [PATCH 16/17] Translated using Weblate (French) Currently translated at 99.4% (1011 of 1017 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 34 ++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index a5bd0f946..f9ef1f7e8 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1056,7 +1056,7 @@ "friendRequest_accepted": "{0} a accepté votre demande d'ami", "friendRequest_received": "{0} souhaite être votre ami", "friendRequest_notification": "{0} vous a envoyé une demande d'ami", - "notifications_empty": "Vous n'avez pas de nouvelle notification", + "notifications_empty": "Pas de nouvelle notification", "notifications_title": "Vous avez des notifications non lues", "profile_addDescription": "Ajouter une description", "profile_editDescription": "Modifier votre description", @@ -1075,5 +1075,35 @@ "notifications_dismiss": "Cacher", "fm_info_sharedFolderHistory": "Vous regardez l'historique de votre dossier partagé {0}
Votre CryptDrive restera en lecture seule pendant la navigation.", "share_description": "Choisissez ce que vous souhaitez partager puis obtenez le lien ou envoyez-le directement à vos amis CryptPad.", - "fc_color": "Changer la couleur" + "fc_color": "Changer la couleur", + "supportPage": "Support", + "admin_cat_support": "Support", + "admin_supportAddKey": "Ajouter la clé", + "admin_supportAddError": "Clé privée non valide", + "admin_supportInitTitle": "Initialisation du support", + "admin_supportListTitle": "Messagerie du support", + "support_disabledTitle": "Le support n'est pas activé", + "support_disabledHint": "Cette instance de CryptPad n'est pas encore configurée pour utiliser le formulaire de support.", + "support_cat_new": "Nouveau ticket", + "support_formTitle": "Titre du ticket", + "support_formButton": "Envoyer", + "support_formTitleError": "Erreur : le titre est vide", + "support_formContentError": "Erreur : le contenu est vide", + "support_formMessage": "Taper votre message...", + "support_cat_tickets": "Tickets existants", + "support_listTitle": "Tickets de support", + "support_answer": "Répondre", + "support_close": "Fermer le ticket", + "support_remove": "Supprimer le ticket", + "support_showData": "Afficher/cacher les données de l'utilisateur", + "support_from": "De : {0}", + "support_closed": "Ce ticket a été fermé", + "fc_noAction": "Pas d'action disponible", + "notificationsPage": "Notifications", + "openNotificationsApp": "Ouvrir le panneau de notifications", + "notifications_cat_all": "Toutes", + "notifications_cat_friends": "Demandes d'ami", + "notifications_cat_pads": "Partagé avec moi", + "notifications_cat_archived": "Historique", + "notifications_dismissAll": "Tout cacher" } From df7bca4bbf73dfeadb268aa8b93f00df23a96536 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 3 Jul 2019 14:20:04 +0000 Subject: [PATCH 17/17] Translated using Weblate (German) Currently translated at 96.4% (980 of 1017 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ --- www/common/translations/messages.de.json | 30 +++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index 6125abf5c..a24c1a9f7 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1075,5 +1075,33 @@ "share_description": "Wähle aus, was du teilen möchtest. Dir wird dann ein entsprechender Link anzeigt. Du kannst es auch direkt an deine Freunde in CryptPad senden.", "fc_expandAll": "Alle ausklappen", "fc_collapseAll": "Alle einklappen", - "fc_color": "Farbe ändern" + "fc_color": "Farbe ändern", + "supportPage": "", + "admin_cat_support": "", + "admin_supportInitHelp": "", + "admin_supportInitPrivate": "", + "admin_supportAddKey": "", + "admin_supportAddError": "", + "admin_supportInitTitle": "", + "admin_supportInitHint": "", + "admin_supportListTitle": "", + "admin_supportListHint": "", + "support_disabledTitle": "", + "support_disabledHint": "", + "support_cat_new": "", + "support_formTitle": "", + "support_formHint": "", + "support_formButton": "", + "support_formTitleError": "", + "support_formContentError": "", + "support_formMessage": "", + "support_cat_tickets": "", + "support_listTitle": "", + "support_listHint": "", + "support_answer": "", + "support_close": "", + "support_remove": "", + "support_showData": "", + "support_from": "", + "support_closed": "" }
', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'}) - .append(r.id ? getFileIcon(r.id) : $folderIcon.clone()); + var $icon = $('', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'}); var $title = $('', { 'class': 'cp-app-drive-search-col1 cp-app-drive-search-title' }).text(r.data.title); - if (r.id) { - $title.click(function () { - openFile(null, r.data.href); - }); - } - var $typeName = $('', {'class': 'cp-app-drive-search-label2'}) - .text(Messages.fm_type); - var $type = $('', {'class': 'cp-app-drive-search-col2'}) - .text(r.id ? Messages.type[parsed.type] || parsed.type : Messages.fm_folder); - var $atimeName = $('', {'class': 'cp-app-drive-search-label2'}) - .text(r.id ? Messages.fm_lastAccess : ""); - var $atime = $('', {'class': 'cp-app-drive-search-col2'}) - .text(r.id ? new Date(r.data.atime).toLocaleString() : ""); - var $ctimeName = $('', {'class': 'cp-app-drive-search-label2'}) - .text(r.id ? Messages.fm_creation : ""); - var $ctime = $('', {'class': 'cp-app-drive-search-col2'}) - .text(r.id ? new Date(r.data.ctime).toLocaleString() : ""); if (manager.isPathIn(path, ['hrefArray'])) { path.pop(); path.push(r.data.title); @@ -2647,28 +2629,33 @@ define([ 'class': 'cp-app-drive-search-col1 cp-app-drive-search-path' }); createTitle($path, path, true); - var parentPath = path.slice(); - var $a; + var $typeName = $('', {'class': 'cp-app-drive-search-label2'}).text(Messages.fm_type); + var $type = $('', {'class': 'cp-app-drive-search-col2'}); + var $atimeName = $('', {'class': 'cp-app-drive-search-label2'}); + var $atime = $('', {'class': 'cp-app-drive-search-col2'}); + var $ctimeName = $('', {'class': 'cp-app-drive-search-label2'}); + var $ctime = $('', {'class': 'cp-app-drive-search-col2'}); + var $openDir = $('', {'class': 'cp-app-drive-search-opendir'}); if (r.id) { + $icon.append(getFileIcon(r.id)); + $type.text(Messages.type[parsed.type] || parsed.type); + $title.click(function () { + openFile(null, r.data.href); + }); + $atimeName.text(Messages.fm_lastAccess); + $atime.text(new Date(r.data.atime).toLocaleString()); + $ctimeName.text(Messages.fm_creation); + $ctime.text(new Date(r.data.ctime).toLocaleString()); + var parentPath = path.slice(); if (parentPath) { - $a = $('').text(Messages.fm_openParent).click(function (e) { + $('').text(Messages.fm_openParent).click(function (e) { e.preventDefault(); if (manager.isInTrashRoot(parentPath)) { parentPath = [TRASH]; } else { parentPath.pop(); } APP.selectedFiles = [r.id]; APP.displayDirectory(parentPath); - }); + }).appendTo($openDir); } - } - else { - $a = $('').text(Messages.fm_OpenFolder || "Open folder").click(function (e) { - e.preventDefault(); - APP.displayDirectory(path); - }); - } - var $openDir = $('', {'class': 'cp-app-drive-search-opendir'}).append($a); - - if (r.id) { $('').text(Messages.fc_prop).click(function () { APP.getProperties(r.id, function (e, $prop) { if (e) { return void logError(e); } @@ -2676,6 +2663,14 @@ define([ }); }).appendTo($openDir); } + else { + $icon.append($folderIcon.clone()); + $type.text(Messages.fm_folder); + $('').text(Messages.fm_OpenFolder || "Open folder").click(function (e) { + e.preventDefault(); + APP.displayDirectory(path); + }).appendTo($openDir); + } // rows 1-3 $('