diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index a6f830354..4962bd072 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1204,8 +1204,8 @@ define([ }; // Forget button - var moveToTrash = common.moveToTrash = function (cb) { - var href = window.location.href; + var moveToTrash = common.moveToTrash = function (cb, href) { + href = href || window.location.href; common.forgetPad(href, function (err) { if (err) { console.log("unable to forget pad"); diff --git a/www/common/sframe-common-interface.js b/www/common/sframe-common-interface.js index 6e6b4539d..52d95b040 100644 --- a/www/common/sframe-common-interface.js +++ b/www/common/sframe-common-interface.js @@ -150,9 +150,6 @@ define([ 'class': "fa fa-trash cryptpad-forget", style: 'font:'+size+' FontAwesome' }); - if (!common.isStrongestStored()) { - button.addClass('cp-toolbar-hidden'); - } if (callback) { button .click(common.prepareFeedback(type)) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index d06ffd4b5..46534fe9d 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -216,6 +216,12 @@ define([ }); sframeChan.on('Q_MOVE_TO_TRASH', function (data, cb) { + cb = cb || $.noop; + if (readOnly && hashes.editHash) { + var appPath = window.location.pathname; + Cryptpad.moveToTrash(cb, appPath + '#' + hashes.editHash); + return; + } Cryptpad.moveToTrash(cb); });