Merge branch 'soon'
This commit is contained in:
@@ -283,10 +283,11 @@ define([
|
|||||||
present: present
|
present: present
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var getLinkValue = function () {
|
var getLinkValue = function (initValue) {
|
||||||
var edit = $(link).find('#cp-share-editable-true').is(':checked');
|
var val = initValue || {};
|
||||||
var embed = $(link).find('#cp-share-embed').is(':checked');
|
var edit = initValue ? val.edit : $(link).find('#cp-share-editable-true').is(':checked');
|
||||||
var present = $(link).find('#cp-share-present').is(':checked');
|
var embed = initValue ? val.embed : $(link).find('#cp-share-embed').is(':checked');
|
||||||
|
var present = initValue ? val.present : $(link).find('#cp-share-present').is(':checked');
|
||||||
|
|
||||||
var hash = (edit && hashes.editHash) ? hashes.editHash : hashes.viewHash;
|
var hash = (edit && hashes.editHash) ? hashes.editHash : hashes.viewHash;
|
||||||
var href = origin + pathname + '#' + hash;
|
var href = origin + pathname + '#' + hash;
|
||||||
@@ -375,6 +376,7 @@ define([
|
|||||||
}
|
}
|
||||||
if (val.embed) { $(link).find('#cp-share-embed').attr('checked', true); }
|
if (val.embed) { $(link).find('#cp-share-embed').attr('checked', true); }
|
||||||
if (val.present) { $(link).find('#cp-share-present').attr('checked', true); }
|
if (val.present) { $(link).find('#cp-share-present').attr('checked', true); }
|
||||||
|
$(link).find('#cp-share-link-preview').val(getLinkValue(val));
|
||||||
});
|
});
|
||||||
return tabs;
|
return tabs;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,9 +104,13 @@ define([
|
|||||||
fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) {
|
fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) {
|
||||||
removeOwnedChannel(channelId, function (obj) {
|
removeOwnedChannel(channelId, function (obj) {
|
||||||
if (obj && obj.error) {
|
if (obj && obj.error) {
|
||||||
console.error(obj.error);
|
// If the error is that the file is already removed, nothing to
|
||||||
|
// report, it's a normal behavior (pad expired probably)
|
||||||
|
if (obj.error.code === 'ENOENT') { return; }
|
||||||
|
|
||||||
// RPC may not be responding
|
// RPC may not be responding
|
||||||
// Send a report that can be handled manually
|
// Send a report that can be handled manually
|
||||||
|
console.error(obj.error);
|
||||||
Feedback.send('ERROR_DELETING_OWNED_PAD=' + channelId, true);
|
Feedback.send('ERROR_DELETING_OWNED_PAD=' + channelId, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user