From 21eb1b6a1b8faf55c737f6a2d91a7f9782c22e4b Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 29 Sep 2020 16:49:40 +0200 Subject: [PATCH] Fix overflowing spinner when loading history --- customize.dist/src/less2/include/toolbar-history.less | 5 +++++ www/common/sframe-common-history.js | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/customize.dist/src/less2/include/toolbar-history.less b/customize.dist/src/less2/include/toolbar-history.less index 0d3395255..9ab6604cb 100644 --- a/customize.dist/src/less2/include/toolbar-history.less +++ b/customize.dist/src/less2/include/toolbar-history.less @@ -22,6 +22,11 @@ font: @colortheme_app-font; } + &.cp-history-init { + padding: 0; + height: 32px; + } + .cp-toolbar-history-timeline { display: flex; flex-flow: column; diff --git a/www/common/sframe-common-history.js b/www/common/sframe-common-history.js index 284a39774..abe3cb01a 100644 --- a/www/common/sframe-common-history.js +++ b/www/common/sframe-common-history.js @@ -20,6 +20,7 @@ define([ History.state = true; var $toolbar = config.$toolbar; var $hist = $toolbar.find('.cp-toolbar-history'); + $hist.addClass('cp-history-init'); if (!config.applyVal || !config.setHistory || !config.onLocal || !config.onRemote) { throw new Error("Missing config element: applyVal, onLocal, onRemote, setHistory"); @@ -411,6 +412,7 @@ define([ // Create the history toolbar var display = function () { $hist.html(''); + $hist.removeClass('cp-history-init'); var fastPrev = h('button.cp-toolbar-history-previous', { title: Messages.history_fastPrev }, [ h('i.fa.fa-step-backward'), @@ -524,8 +526,8 @@ define([ } if (config.drive) { $hist.addClass('cp-history-drive'); - snapshot.disabled = true; - share.disabled = true; + $(snapshot).hide(); + $(share).hide(); } $hist.append([timeline, actions]);