allow us to import formerly blocked system tiddlers (#5479)

This commit is contained in:
Mario Pietsch
2021-05-25 22:21:57 +01:00
committed by GitHub
parent 123666c240
commit c6ed4aa84e
4 changed files with 35 additions and 8 deletions
+6 -1
View File
@@ -522,10 +522,15 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
});
// Give the active upgrader modules a chance to process the incoming tiddlers
var messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers);
// Deselect any disabled, but _not_ suppressed tiddlers
var systemMessage = $tw.language.getString("Import/Upgrader/Tiddler/Unselected");
$tw.utils.each(messages,function(message,title) {
newFields["message-" + title] = message;
if (message.indexOf(systemMessage) !== -1) {
newFields["selection-" + title] = "unchecked";
}
});
// Deselect any suppressed tiddlers
// Deselect suppressed tiddlers ... they have been removed and can't be selected anymore
$tw.utils.each(importData.tiddlers,function(tiddler,title) {
if($tw.utils.count(tiddler) === 0) {
newFields["selection-" + title] = "unchecked";