1
0
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:
Jermolene 2014-05-07 14:49:14 +01:00
parent e548dd35af
commit 6ab68e0fca
2 changed files with 4 additions and 3 deletions

View File

@ -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
);
}

View File

@ -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
};