kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Adjust listops widget to only modify tiddler if tags have changed
We do this so that we don’t accidentally modify shadow tiddlers when we drag them to reorder them within their tag parent. Otherwise, moving a toolbar button like $:/core/ui/Buttons/permaview in the control panel will override the shadow tiddler.print-window-tiddler
rodzic
d9ed01b621
commit
4891732481
|
@ -80,9 +80,13 @@ ActionListopsWidget.prototype.invokeAction = function(triggeringWidget,
|
|||
.filterTiddlers(subfilter, this)));
|
||||
}
|
||||
if(this.filtertags) {
|
||||
var tagfilter = "[list[" + this.target + "!!tags]] " + this.filtertags;
|
||||
this.wiki.setText(this.target, "tags", undefined, $tw.utils.stringifyList(
|
||||
this.wiki.filterTiddlers(tagfilter, this)));
|
||||
var tiddler = this.wiki.getTiddler(this.target),
|
||||
oldtags = tiddler ? (tiddler.fields.tags || []).slice(0) : [],
|
||||
tagfilter = "[list[" + this.target + "!!tags]] " + this.filtertags,
|
||||
newtags = this.wiki.filterTiddlers(tagfilter,this);
|
||||
if($tw.utils.stringifyList(oldtags.sort()) !== $tw.utils.stringifyList(newtags.sort())) {
|
||||
this.wiki.setText(this.target,"tags",undefined,$tw.utils.stringifyList(newtags));
|
||||
}
|
||||
}
|
||||
return true; // Action was invoked
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue