From 636b3588cfcb58c402b3639f9152d1f591764076 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 25 Sep 2019 12:37:38 +0200 Subject: [PATCH 1/3] Fix anonymous shared folders --- www/common/outer/async-store.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 6edfa1299..623d61528 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1722,7 +1722,9 @@ define([ Store.loadSharedFolder(null, id, data, cb); }; Store.loadSharedFolderAnon = function (clientId, data, cb) { - Store.loadSharedFolder(null, data.id, data.data, cb); + Store.loadSharedFolder(null, data.id, data.data, function () { + cb(); + }); }; Store.addSharedFolder = function (clientId, data, cb) { var s = getStore(data.teamId); From 4d799a85525d0ab505a525420de556baedfadb0f Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 25 Sep 2019 14:52:24 +0200 Subject: [PATCH 2/3] Fix kanban items issues --- www/kanban/inner.js | 2 +- www/kanban/jkanban.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 609e5ac31..74abb7f8d 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -139,7 +139,7 @@ define([ // Remove the input $(el).text(name); // Save the value for the correct board - var board = $(el.parentNode.parentNode.parentNode).attr("data-id"); + var board = $(el).closest('.kanban-board').attr("data-id"); var pos = kanban.findElementPosition(el.parentNode); kanban.getBoardJSON(board).item[pos].title = name; kanban.onChange(); diff --git a/www/kanban/jkanban.js b/www/kanban/jkanban.js index a44aefed9..aa3f6c922 100644 --- a/www/kanban/jkanban.js +++ b/www/kanban/jkanban.js @@ -271,7 +271,10 @@ if (element.id) { nodeItem.setAttribute('data-eid', element.id) } - nodeItem.innerHTML = element.title; + var nodeItemText = document.createElement('div'); + nodeItemText.classList.add('kanban-item-text'); + nodeItemText.innerHTML = element.title; + nodeItem.appendChild(nodeItemText); //add function nodeItem.clickfn = element.click; nodeItem.dragfn = element.drag; From 82a00480829f47853f0f8217d9fb56f82e1e7625 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 26 Sep 2019 11:56:53 +0200 Subject: [PATCH 3/3] keep trying to draw the preview pane, if necessary --- www/code/inner.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/www/code/inner.js b/www/code/inner.js index 7f043a9c9..7c5e64c4f 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -227,6 +227,20 @@ define([ $(window).off('mouseup mousemove', handler); $(window).on('mouseup mousemove', handler); }); + + var previewInt; + var clear = function () { clearInterval(previewInt); }; + + // keep trying to draw until you're confident it has been drawn + previewInt = setInterval(function () { + // give up if it's not a valid preview mode + if (['markdown', 'gfm'].indexOf(CodeMirror.highlightMode) === -1) { return void clear(); } + // give up if content has been drawn + if ($preview.text()) { return void clear(); } + // only draw if there is actually content to display + if (editor && !editor.getValue().trim()) { return void clear(); } + forceDrawPreview(); + }, 1000); }); framework._.sfCommon.getPadAttribute('previewMode', function (e, data) {