From a55391d77136f9ceb1d627d033e704607472436b Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 17 May 2018 18:26:52 +0200 Subject: [PATCH 01/10] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b74dff06d..e0ea88e95 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "2.1.0", + "version": "2.1.1", "license": "AGPL-3.0-or-later", "dependencies": { "chainpad-server": "^2.0.0", From 884f2b465d5bf3679d26cf5f97d254ac9d8ea09d Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 25 May 2018 11:49:43 +0200 Subject: [PATCH 02/10] Fix kanban creation --- www/kanban/inner.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 0bcaa2bb3..be2906e87 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -30,6 +30,7 @@ define([ var COLORS = ['yellow', 'green', 'orange', 'blue', 'red', 'purple', 'cyan', 'lightgreen', 'lightblue']; var addRemoveItemButton = function (framework, kanban) { + if (!kanban) { return; } if (framework.isReadOnly() || framework.isLocked()) { return; } var $container = $(kanban.element); $container.find('.kanban-remove-item').remove(); @@ -325,6 +326,7 @@ define([ } framework.onEditableChange(function (unlocked) { if (framework.isReadOnly()) { return; } + if (!kanban) { return; } if (unlocked) { addRemoveItemButton(framework, kanban); kanban.options.readOnly = false; @@ -357,7 +359,11 @@ define([ }); framework.setContentGetter(function () { - if (!kanban) { return; } + if (!kanban) { + return { + content: [] + }; + } var content = kanban.getBoardsJSON(); verbose("Content current value is " + content); return { @@ -369,6 +375,10 @@ define([ $("#cp-app-kanban-content").focus(); }); + framework.onDefaultContentNeeded(function () { + kanban = initKanban(framework); + }); + framework.start(); }; From 598960d960b4ee8004ef14f243939b78b215662b Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 May 2018 11:01:03 +0200 Subject: [PATCH 03/10] Disable language selector in static pages --- customize.dist/pages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 2ed4832eb..13a496746 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -32,6 +32,7 @@ define([ }); return select; }; + languageSelector = languageSelector; // jshint var footerCol = function (title, L, literal) { return h('div.col-6.col-sm-3', [ @@ -68,7 +69,7 @@ define([ footerCol(null, [ h('div.cp-bio-foot', [ h('p', Msg.main_footerText), - languageSelector() + //languageSelector() ]) ], ''), footerCol('footer_applications', [ From b377da12278c75560098a184d2f6505744d78996 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 May 2018 11:22:48 +0200 Subject: [PATCH 04/10] Highlight the selected line in polls --- www/poll/app-poll.less | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/poll/app-poll.less b/www/poll/app-poll.less index 1b56b99bd..0c594395b 100644 --- a/www/poll/app-poll.less +++ b/www/poll/app-poll.less @@ -18,6 +18,7 @@ @poll-th-user-bg: darken(@poll-th-bg, 10%); @poll-editing: lighten(@poll-th-bg, 10%); @poll-winner: darken(@poll-th-bg, 15%); +@poll-highlighted: lighten(@poll-th-bg, 15%); @poll-td-bg: @poll-th-bg; @poll-td-fg: @poll-th-fg; @@ -514,6 +515,13 @@ div.cp-app-poll-realtime { } } } + tr:not(:last-child) { + &:hover { + td:first-child { + background-color: @poll-highlighted; + } + } + } } .cp-app-poll-table-edit { //color: @poll-cover-color; From 6bd5d698b5cf50270bfd9010fd4893c126c9fbe5 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 May 2018 12:05:13 +0200 Subject: [PATCH 05/10] Add kanban help --- customize.dist/translations/messages.fr.js | 5 +++++ customize.dist/translations/messages.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index fd406f7aa..b11bc2e17 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -1002,6 +1002,11 @@ define(function () { embed: 'Intégrez des images de votre disque ou de votre CryptDrive et exporter le contenu en tant que PNG sur votre disque ou votre CryptDrive ' }; + out.help.kanban = { + add: 'Ajoutez un tableau en utilisant le bouton dans le coin supérieur-droit', + task: 'Déplacez les éléments en les faisant glisser d\'un tableau à l\'autre', + color: 'Modifiez les couleurs en cliquant sur les parties colorées à côté du titre de chaque tableau' + }; out.initialState = [ '

', diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index eb29b9395..ddbccaa68 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -1046,7 +1046,9 @@ define(function () { }; out.help.kanban = { - //add: '' + add: 'Add new boards using the button in the top-right corner', + task: 'Move the items by dragging and dropping them from a board to another', + color: 'Change the colors by clicking on the colored part next to the board titles', }; out.initialState = [ From 0e9bd156b1dfb5a19af5ff01a33c350f76fca1b5 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 May 2018 12:07:12 +0200 Subject: [PATCH 06/10] Update footer --- customize.dist/pages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 13a496746..1cd3d5f7c 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -95,7 +95,7 @@ define([ ]) ]) ]), - h('div.cp-version-footer', "CryptPad v2.1.0 (Badger)") + h('div.cp-version-footer', "CryptPad v2.2.0 (Coati)") ]); }; From 3267268e20f09fcc6247277ec667dc5aa229ba73 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 May 2018 15:33:49 +0200 Subject: [PATCH 07/10] Fix share modal not using the previous values --- www/common/common-ui-elements.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 3ba800b49..18f38aae0 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -394,8 +394,11 @@ define([ val = val || {}; if (val.edit === false) { $(link).find('#cp-share-editable-false').prop('checked', true); + $(link).find('#cp-share-editable-true').prop('checked', false); + } else { + $(link).find('#cp-share-editable-true').prop('checked', true); + $(link).find('#cp-share-editable-false').prop('checked', false); } - else { $(link).find('#cp-share-editable-true').prop('checked', true); } if (val.embed) { $(link).find('#cp-share-embed').prop('checked', true); } if (val.present) { $(link).find('#cp-share-present').prop('checked', true); } $(link).find('#cp-share-link-preview').val(getLinkValue(val)); From 3af997db2b2029e7fa72ed3f7aaca79984cb568f Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 30 May 2018 10:36:26 +0200 Subject: [PATCH 08/10] Kanban translation --- customize.dist/translations/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index ddbccaa68..225965b42 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -1047,7 +1047,7 @@ define(function () { out.help.kanban = { add: 'Add new boards using the button in the top-right corner', - task: 'Move the items by dragging and dropping them from a board to another', + task: 'Move items by dragging and dropping them from one board to another', color: 'Change the colors by clicking on the colored part next to the board titles', }; From 69c5eb0cd9b69bae5e00f4c9b8df89a38ebe9a52 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 30 May 2018 10:37:05 +0200 Subject: [PATCH 09/10] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b74dff06d..7ad861062 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "2.1.0", + "version": "2.2.0", "license": "AGPL-3.0-or-later", "dependencies": { "chainpad-server": "^2.0.0", From fe202a92b490404e3d8b7b8a2712e2e0a33a9851 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 30 May 2018 15:00:26 +0200 Subject: [PATCH 10/10] Fix UI issues in kanban --- customize.dist/translations/messages.js | 2 +- www/kanban/app-kanban.less | 7 +++---- www/kanban/inner.js | 15 +++++++++------ www/kanban/jkanban.js | 10 ++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 225965b42..b61ae3d23 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -254,7 +254,7 @@ define(function () { out.kanban_item = "Item {0}"; // Item number for initial content out.kanban_todo = "To Do"; out.kanban_done = "Done"; - out.kanban_working = "Working"; + out.kanban_working = "In progress"; out.kanban_deleteBoard = "Are you sure you want to delete this board?"; out.kanban_addBoard = "Add a board"; out.kanban_removeItem = "Remove this item"; diff --git a/www/kanban/app-kanban.less b/www/kanban/app-kanban.less index 03b9267e5..ab49cfda5 100644 --- a/www/kanban/app-kanban.less +++ b/www/kanban/app-kanban.less @@ -48,12 +48,14 @@ display: flex; align-items: center; justify-content: space-between; + padding: 10px 5px 10px 10px; } .kanban-board { header { display: flex; align-items: center; + padding: 13px 10px; .kanban-title-board { flex: 1; margin-right: 10px; @@ -84,9 +86,8 @@ line-height: @button-size; text-align: center; background: @colortheme_kanban-bg; - font-weight: bold; align-self: flex-start; - font-size: 50px; + font-size: 30px; cursor: pointer; .tools_unselectable(); } @@ -108,8 +109,6 @@ line-height: 1; margin-bottom: 5px; margin-right: 5px; - font-weight: bold; - font-size: 1.2em; &:hover { background: transparent; } diff --git a/www/kanban/inner.js b/www/kanban/inner.js index be2906e87..b79b6e381 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -40,7 +40,7 @@ define([ return b.id === $(el.parentNode.parentNode).attr('data-id'); }); $('' headerBoard.appendChild(btn); __onButtonClickHandler(btn, board.id); @@ -348,8 +346,7 @@ var footerBoard = document.createElement('footer'); //add button var addBoardItem = document.createElement('button'); - $(addBoardItem).text("+") - $(addBoardItem).addClass("kanban-additem btn btn-default"); + $(addBoardItem).addClass("kanban-additem btn btn-default fa fa-plus"); footerBoard.appendChild(addBoardItem); __onAddItemClickHandler(addBoardItem); @@ -459,7 +456,7 @@ boardContainerOuter.appendChild(boardContainer); var addBoard = document.createElement('div'); addBoard.id = 'kanban-addboard'; - $(addBoard).text("+"); + addBoard.setAttribute('class', 'fa fa-plus'); boardContainerOuter.appendChild(addBoard); self.container = boardContainer; @@ -502,6 +499,7 @@ function __onAddItemClickHandler(nodeItem, clickfn) { nodeItem.addEventListener('click', function (e) { e.preventDefault; + e.stopPropagation(); self.options.addItemClick(this); if (typeof (this.clickfn) === 'function') this.clickfn(this);