From a0ec51dde57319b95478ec4a4336893072498821 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Feb 2018 12:43:06 +0100 Subject: [PATCH] Fix share modal with new pads --- www/common/common-ui-elements.js | 4 ++++ www/common/sframe-common-outer.js | 1 + 2 files changed, 5 insertions(+) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 1d41d8308..c8b118694 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -378,6 +378,10 @@ define([ if (val.present) { $(link).find('#cp-share-present').attr('checked', true); } $(link).find('#cp-share-link-preview').val(getLinkValue(val)); }); + common.getMetadataMgr().onChange(function () { + hashes = common.getMetadataMgr().getPrivateData().availableHashes; + $(link).find('#cp-share-link-preview').val(getLinkValue()); + }); return tabs; }; UIElements.createFileShareModal = function (config) { diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 57261372d..70d1f72ac 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -625,6 +625,7 @@ define([ // Update metadata values and send new metadata inside parsed = Utils.Hash.parsePadUrl(window.location.href); defaultTitle = Utils.Hash.getDefaultName(parsed); + hashes = Utils.Hash.getHashes(secret.channel, secret); readOnly = false; updateMeta();