mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
allow empty state tiddlers and missing state attributes act as missing state tiddlers
As described here: https://groups.google.com/d/msg/tiddlywikidev/ODJhIw6-UjQ/3ZKrlA4B810J I think it would be a good small enhancement as the reveal widget can now be used in previously impossible ways.
This commit is contained in:
parent
61718d6023
commit
79e428757b
@ -106,20 +106,18 @@ Read the state tiddler
|
|||||||
*/
|
*/
|
||||||
RevealWidget.prototype.readState = function() {
|
RevealWidget.prototype.readState = function() {
|
||||||
// Read the information from the state tiddler
|
// Read the information from the state tiddler
|
||||||
if(this.stateTitle) {
|
var state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler")) : this["default"];
|
||||||
var state = this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler"));
|
switch(this.type) {
|
||||||
switch(this.type) {
|
case "popup":
|
||||||
case "popup":
|
this.readPopupState(state);
|
||||||
this.readPopupState(state);
|
break;
|
||||||
break;
|
case "match":
|
||||||
case "match":
|
this.readMatchState(state);
|
||||||
this.readMatchState(state);
|
break;
|
||||||
break;
|
case "nomatch":
|
||||||
case "nomatch":
|
this.readMatchState(state);
|
||||||
this.readMatchState(state);
|
this.isOpen = !this.isOpen;
|
||||||
this.isOpen = !this.isOpen;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user