Ability to delete a stronger pad from readonly mode
parent
b28c1537e8
commit
95ad25973e
|
@ -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");
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue