mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-12 11:48:06 +00:00
Changed the name of the 'list' attribute to 'field'
Other users found this to be confusing -- I have made this change in both this widget and the $checklist widget to maintain consistency
This commit is contained in:
@@ -3,7 +3,7 @@ title: $:/core/modules/widgets/action-listops.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: widget
|
module-type: widget
|
||||||
|
|
||||||
Action widget to apply list operations to any tiddler field (defaults to the 'tags' field of the current tiddler)
|
Action widget to apply list operations to any tiddler field (defaults to the 'list' field of the current tiddler)
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function () {
|
(function () {
|
||||||
@@ -12,7 +12,8 @@ Action widget to apply list operations to any tiddler field (defaults to the 'ta
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
var Widget = require("$:/core/modules/widgets/widget.js")
|
||||||
|
.widget;
|
||||||
|
|
||||||
var ActionListopsWidget = function (parseTreeNode, options) {
|
var ActionListopsWidget = function (parseTreeNode, options) {
|
||||||
this.initialise(parseTreeNode, options);
|
this.initialise(parseTreeNode, options);
|
||||||
@@ -39,7 +40,7 @@ Action widget to apply list operations to any tiddler field (defaults to the 'ta
|
|||||||
this.target = this.getAttribute("$tiddler", this.getVariable("currentTiddler"));
|
this.target = this.getAttribute("$tiddler", this.getVariable("currentTiddler"));
|
||||||
this.filter = this.getAttribute("$filter");
|
this.filter = this.getAttribute("$filter");
|
||||||
this.subfilter = this.getAttribute("$subfilter");
|
this.subfilter = this.getAttribute("$subfilter");
|
||||||
this.listField = this.getAttribute("$list", "list");
|
this.listField = this.getAttribute("$field", "list");
|
||||||
this.listIndex = this.getAttribute("$index");
|
this.listIndex = this.getAttribute("$index");
|
||||||
this.filtertags = this.getAttribute("$tags");
|
this.filtertags = this.getAttribute("$tags");
|
||||||
};
|
};
|
||||||
@@ -60,14 +61,15 @@ Action widget to apply list operations to any tiddler field (defaults to the 'ta
|
|||||||
Invoke the action associated with this widget
|
Invoke the action associated with this widget
|
||||||
*/
|
*/
|
||||||
ActionListopsWidget.prototype.invokeAction = function (triggeringWidget, event) {
|
ActionListopsWidget.prototype.invokeAction = function (triggeringWidget, event) {
|
||||||
//try this
|
//Apply the specified filters to the lists
|
||||||
var field = this.listField,
|
var field = this.listField,
|
||||||
index = undefined,
|
index = undefined,
|
||||||
type = "!!",
|
type = "!!",
|
||||||
list = this.listField;
|
list = this.listField;
|
||||||
if (this.listIndex) {
|
if (this.listIndex) {
|
||||||
field = undefined;
|
field = undefined;
|
||||||
index = this.listIndex; type = "##";
|
index = this.listIndex;
|
||||||
|
type = "##";
|
||||||
list = this.listIndex;
|
list = this.listIndex;
|
||||||
}
|
}
|
||||||
if (this.filter) {
|
if (this.filter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user