mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +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
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
var self = this;
|
||||
function isUnmodifiedShadow(title) {
|
||||
// jshint eqnull:true
|
||||
var tiddler = $tw.wiki.getTiddler(title);
|
||||
var tiddler = self.wiki.getTiddler(title);
|
||||
return (
|
||||
$tw.wiki.isShadowTiddler(title) &&
|
||||
self.wiki.isShadowTiddler(title) &&
|
||||
tiddler.fields.modified == null
|
||||
);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ EditTextWidget.prototype.postRender = function() {
|
||||
lineWrapping: true,
|
||||
lineNumbers: true
|
||||
},
|
||||
tid = $tw.wiki.getTiddler(this.editTitle);
|
||||
tid = this.wiki.getTiddler(this.editTitle);
|
||||
if(tid && tid.fields.type) {
|
||||
cm_opts.mode = tid.fields.type
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user