diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 9b32385c4..5aeef9291 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -99,7 +99,7 @@ Modal.prototype.display = function(title,options) { if(tiddler && tiddler.fields && tiddler.fields.footer) { footerText = tiddler.fields.footer; } else { - footerText = '<$button message="tw-close" class="btn btn-primary">Close$button>'; + footerText = '<$button message="tw-close-tiddler" class="btn btn-primary">Close$button>'; } var footerParser = this.wiki.parseText("text/vnd.tiddlywiki-run",footerText), footerRenderTree = new $tw.WikiRenderTree(footerParser,{wiki: $tw.wiki}); @@ -109,7 +109,7 @@ Modal.prototype.display = function(title,options) { footerRenderTree.refreshInDom(changes); }); // Add the close event handler - wrapper.addEventListener("tw-close",function(event) { + wrapper.addEventListener("tw-close-tiddler",function(event) { // Force layout and animate the modal message away $tw.utils.forceLayout(modalBackdrop); $tw.utils.forceLayout(modalWrapper); @@ -126,7 +126,7 @@ Modal.prototype.display = function(title,options) { document.body.removeChild(wrapper); } },false); - // Don't let anyone else handle the tw-close message + // Don't let anyone else handle the tw-close-tiddler message event.stopPropagation(); return false; },false); diff --git a/core/modules/widgets/list/list.js b/core/modules/widgets/list/list.js index e6d7f8996..94d0769a9 100644 --- a/core/modules/widgets/list/list.js +++ b/core/modules/widgets/list/list.js @@ -110,10 +110,10 @@ ListWidget.prototype.createListElement = function(title) { children: [this.createListElementMacro(title)], events: [ {name: "tw-navigate", handlerFunction: handleEvent}, - {name: "tw-EditTiddler", handlerFunction: handleEvent}, - {name: "tw-SaveTiddler", handlerFunction: handleEvent}, - {name: "tw-CloseTiddler", handlerFunction: handleEvent}, - {name: "tw-NewTiddler", handlerFunction: handleEvent} + {name: "tw-edit-tiddler", handlerFunction: handleEvent}, + {name: "tw-save-tiddler", handlerFunction: handleEvent}, + {name: "tw-close-tiddler", handlerFunction: handleEvent}, + {name: "tw-new-tiddler", handlerFunction: handleEvent} ] }; }; diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 9ad2d1f36..c682b2e30 100644 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -31,10 +31,10 @@ NavigatorWidget.prototype.generate = function() { this.children = this.renderer.renderTree.createRenderers(this.renderer.renderContext,this.renderer.parseTreeNode.children); this.events = [ {name: "tw-navigate", handlerObject: this, handlerMethod: "handleNavigateEvent"}, - {name: "tw-EditTiddler", handlerObject: this, handlerMethod: "handleEditTiddlerEvent"}, - {name: "tw-SaveTiddler", handlerObject: this, handlerMethod: "handleSaveTiddlerEvent"}, - {name: "tw-close", handlerObject: this, handlerMethod: "handleCloseTiddlerEvent"}, - {name: "tw-NewTiddler", handlerObject: this, handlerMethod: "handleNewTiddlerEvent"} + {name: "tw-edit-tiddler", handlerObject: this, handlerMethod: "handleEditTiddlerEvent"}, + {name: "tw-save-tiddler", handlerObject: this, handlerMethod: "handleSaveTiddlerEvent"}, + {name: "tw-close-tiddler", handlerObject: this, handlerMethod: "handleCloseTiddlerEvent"}, + {name: "tw-new-tiddler", handlerObject: this, handlerMethod: "handleNewTiddlerEvent"} ]; }; diff --git a/core/templates/EditTemplate.tid b/core/templates/EditTemplate.tid index e680fa774..e246c06fb 100644 --- a/core/templates/EditTemplate.tid +++ b/core/templates/EditTemplate.tid @@ -1,9 +1,7 @@ title: $:/templates/EditTemplate modifier: JeremyRuston -