kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Update navigator.js
As described here: https://groups.google.com/d/msg/tiddlywikidev/AWvXz7RMIC4/gFF5crN2UJoJ Providing a name for the new tiddler message only works if a skeleton tiddler already exists. If not, "New Tiddler" is taken. This change fixes that in that the provided name is taken even if there is no skeleton.print-window-tiddler
rodzic
9b6c59e9a6
commit
d5c31ed07f
|
@ -323,10 +323,11 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
|||
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
// Get the story details
|
||||
var storyList = this.getStoryList();
|
||||
var newTiddlerTitle = event.param || "New Tiddler";
|
||||
// Get the template tiddler if there is one
|
||||
var templateTiddler = this.wiki.getTiddler(event.param);
|
||||
var templateTiddler = this.wiki.getTiddler(newTiddlerTitle);
|
||||
// Create the new tiddler
|
||||
var title = this.wiki.generateNewTitle((templateTiddler && templateTiddler.fields.title) || "New Tiddler");
|
||||
var title = this.wiki.generateNewTitle((templateTiddler && templateTiddler.fields.title) || newTiddlerTitle);
|
||||
var tiddler = new $tw.Tiddler(this.wiki.getCreationFields(),{
|
||||
text: "Newly created tiddler",
|
||||
title: title
|
||||
|
|
Ładowanie…
Reference in New Issue