mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-25 07:20:02 +00:00
And now the tag popups hide themselves after being used
This commit is contained in:
parent
ccfa7e1322
commit
474212dade
@ -21,7 +21,8 @@ exports.info = {
|
|||||||
qualifyTiddlerTitles: {byName: true, type: "text"},
|
qualifyTiddlerTitles: {byName: true, type: "text"},
|
||||||
"default": {byName: true, type: "text"},
|
"default": {byName: true, type: "text"},
|
||||||
"class": {byName: true, type: "text"}
|
"class": {byName: true, type: "text"}
|
||||||
}
|
},
|
||||||
|
events: ["click"]
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.readState = function() {
|
exports.readState = function() {
|
||||||
@ -63,6 +64,14 @@ exports.readPopupState = function(state) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.handleEvent = function(event) {
|
||||||
|
if(event.type === "click") {
|
||||||
|
// Cancel the popup if we get a click on it
|
||||||
|
var tiddler = this.wiki.getTiddler(this.stateTitle);
|
||||||
|
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.stateTitle, text: ""}),true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
exports.executeMacro = function() {
|
exports.executeMacro = function() {
|
||||||
this.stateTitle = this.params.state;
|
this.stateTitle = this.params.state;
|
||||||
if(this.hasParameter("qualifyTiddlerTitles")) {
|
if(this.hasParameter("qualifyTiddlerTitles")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user