mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Remove erroneous global wiki references
$tw.wiki is used as a global reference in the outer initialisation modules. It shouldn’t be used in widgets etc.
This commit is contained in:
parent
e548dd35af
commit
6ab68e0fca
@ -172,11 +172,12 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
|||||||
|
|
||||||
// Place a tiddler in edit mode
|
// Place a tiddler in edit mode
|
||||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||||
|
var self = this;
|
||||||
function isUnmodifiedShadow(title) {
|
function isUnmodifiedShadow(title) {
|
||||||
// jshint eqnull:true
|
// jshint eqnull:true
|
||||||
var tiddler = $tw.wiki.getTiddler(title);
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
return (
|
return (
|
||||||
$tw.wiki.isShadowTiddler(title) &&
|
self.wiki.isShadowTiddler(title) &&
|
||||||
tiddler.fields.modified == null
|
tiddler.fields.modified == null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ EditTextWidget.prototype.postRender = function() {
|
|||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
lineNumbers: true
|
lineNumbers: true
|
||||||
},
|
},
|
||||||
tid = $tw.wiki.getTiddler(this.editTitle);
|
tid = this.wiki.getTiddler(this.editTitle);
|
||||||
if(tid && tid.fields.type) {
|
if(tid && tid.fields.type) {
|
||||||
cm_opts.mode = tid.fields.type
|
cm_opts.mode = tid.fields.type
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user