mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 01:23:01 +00:00 
			
		
		
		
	Appeasing the gods of JSHint
This commit is contained in:
		@@ -61,7 +61,6 @@ exports.executeMacro = function() {
 | 
			
		||||
	]);
 | 
			
		||||
	child.execute(this.parents,this.tiddlerTitle);
 | 
			
		||||
	return child;
 | 
			
		||||
	return this.viewer.render();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ exports.createListElement = function(title) {
 | 
			
		||||
	node.execute(this.parents,this.tiddlerTitle);
 | 
			
		||||
	// Add any specified classes
 | 
			
		||||
	if(this.hasParameter("itemClass")) {
 | 
			
		||||
		attributes["class"].push(this.params["itemClass"]);
 | 
			
		||||
		attributes["class"].push(this.params.itemClass);
 | 
			
		||||
	}
 | 
			
		||||
	var listElement = $tw.Tree.Element(this.isBlock ? "div" : "span",attributes,[node],{
 | 
			
		||||
			events: ["tw-navigate","tw-EditTiddler","tw-SaveTiddler","tw-CloseTiddler","tw-NewTiddler"],
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ function CecilyListView(listMacro) {
 | 
			
		||||
		domNode.style.position = "absolute";
 | 
			
		||||
		this.positionTiddler(title,domNode);
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
CecilyListView.prototype.getMapTiddlerTitle = function() {
 | 
			
		||||
	return this.listMacro.params.map || "$:/TiddlerMap";
 | 
			
		||||
@@ -117,6 +117,6 @@ CecilyListView.prototype.remove = function(index) {
 | 
			
		||||
	return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["cecily"] = CecilyListView;
 | 
			
		||||
exports.cecily = CecilyListView;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -88,6 +88,6 @@ ClassicListView.prototype.remove = function(index) {
 | 
			
		||||
	return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["classic"] = ClassicListView;
 | 
			
		||||
exports.classic = ClassicListView;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ SidewaysListView.prototype.insert = function(index) {
 | 
			
		||||
		{verticalAlign: "top"},
 | 
			
		||||
		{display: "inline-block"},
 | 
			
		||||
		{transition: "none"},
 | 
			
		||||
		{opacity: "0.0"},
 | 
			
		||||
		{opacity: "0.0"}
 | 
			
		||||
	]);
 | 
			
		||||
	var	currWidth = targetElement.offsetWidth + parseInt(window.getComputedStyle(targetElement).marginLeft,10);
 | 
			
		||||
	$tw.utils.setStyle(targetElement,[
 | 
			
		||||
@@ -89,6 +89,6 @@ SidewaysListView.prototype.remove = function(index) {
 | 
			
		||||
	return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["sideways"] = SidewaysListView;
 | 
			
		||||
exports.sideways = SidewaysListView;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -165,8 +165,9 @@ exports.eventMap["tw-NewTiddler"] = function(event) {
 | 
			
		||||
	// Get the story details
 | 
			
		||||
	this.story = this.getList(this.storyTitle);
 | 
			
		||||
	// Create the new tiddler
 | 
			
		||||
	var title;
 | 
			
		||||
	for(var t=0; true; t++) {
 | 
			
		||||
		var title = "New Tiddler" + (t ? " " + t : "");
 | 
			
		||||
		title = "New Tiddler" + (t ? " " + t : "");
 | 
			
		||||
		if(!this.wiki.tiddlerExists(title)) {
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -46,10 +46,10 @@ exports.executeMacro = function() {
 | 
			
		||||
		$tw.utils.pushTop(outerClasses,this.classes);
 | 
			
		||||
	}
 | 
			
		||||
	if(this.hasParameter("width")) {
 | 
			
		||||
		outerAttributes.style.width = this.params["width"];
 | 
			
		||||
		outerAttributes.style.width = this.params.width;
 | 
			
		||||
	}
 | 
			
		||||
	if(this.hasParameter("height")) {
 | 
			
		||||
		outerAttributes.style.height = this.params["height"];
 | 
			
		||||
		outerAttributes.style.height = this.params.height;
 | 
			
		||||
	}
 | 
			
		||||
	var innerFrame = $tw.Tree.Element("div",innerAttributes,this.content),
 | 
			
		||||
		outerFrame = $tw.Tree.Element("div",outerAttributes,[innerFrame]);
 | 
			
		||||
@@ -85,7 +85,7 @@ exports.scrollTo = function(bounds) {
 | 
			
		||||
				t = 1;
 | 
			
		||||
			}
 | 
			
		||||
			t = slowInSlowOut(t);
 | 
			
		||||
			self.child.domNode.scrollLeft = self.startX + (self.endX - self.startX) * t
 | 
			
		||||
			self.child.domNode.scrollLeft = self.startX + (self.endX - self.startX) * t;
 | 
			
		||||
			self.child.domNode.scrollTop = self.startY + (self.endY - self.startY) * t;
 | 
			
		||||
		}, 10);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,7 @@ exports.executeMacro = function() {
 | 
			
		||||
		Viewer = this.wiki.macros.view.fieldviewers[this.params.format];
 | 
			
		||||
	}
 | 
			
		||||
	if(!Viewer) {
 | 
			
		||||
		Viewer = this.wiki.macros.view.fieldviewers["text"];
 | 
			
		||||
		Viewer = this.wiki.macros.view.fieldviewers.text;
 | 
			
		||||
	}
 | 
			
		||||
	this.viewer = new Viewer(this,tiddler,field,value);
 | 
			
		||||
	// Call the viewer to generate the content
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,6 @@ DateViewer.prototype.render = function() {
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["date"] = DateViewer;
 | 
			
		||||
exports.date = DateViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -32,8 +32,8 @@ LinkViewer.prototype.render = function() {
 | 
			
		||||
		link.execute(this.viewMacro.parents,this.viewMacro.tiddlerTitle);
 | 
			
		||||
		return link;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["link"] = LinkViewer;
 | 
			
		||||
exports.link = LinkViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -70,6 +70,6 @@ RelativeDateViewer.prototype.update = function() {
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["relativedate"] = RelativeDateViewer;
 | 
			
		||||
exports.relativedate = RelativeDateViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -30,8 +30,8 @@ TextViewer.prototype.render = function() {
 | 
			
		||||
	} else {
 | 
			
		||||
		return $tw.Tree.Text(this.value);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["text"] = TextViewer;
 | 
			
		||||
exports.text = TextViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -31,8 +31,8 @@ TranscludeViewer.prototype.render = function() {
 | 
			
		||||
		}
 | 
			
		||||
		return $tw.Tree.Element(this.viewMacro.isBlock ? "div" : "span",{},childrenClone);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["transclude"] = TranscludeViewer;
 | 
			
		||||
exports.transclude = TranscludeViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
@@ -42,8 +42,8 @@ WikifiedViewer.prototype.render = function() {
 | 
			
		||||
		childrenClone[t].execute(parents,this.viewMacro.tiddlerTitle);
 | 
			
		||||
	}
 | 
			
		||||
	return $tw.Tree.Element(this.viewMacro.isBlock ? "div" : "span",{},childrenClone);
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports["wikified"] = WikifiedViewer;
 | 
			
		||||
exports.wikified = WikifiedViewer;
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user