1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-08 22:06:05 +00:00

Refactor the list widget to get rid of some hacks

As promised.
This commit is contained in:
Jeremy Ruston
2013-11-02 10:12:55 +00:00
parent 51394e50e8
commit 0b1f0a5fab
6 changed files with 17 additions and 26 deletions

View File

@@ -449,7 +449,7 @@ describe("Widget module", function() {
var wiki = new $tw.Wiki();
// Add some tiddlers
wiki.addTiddlers([
{title: "$:/myTemplate", text: "<$tiddler tiddler=<<listItem>>><$view field='title'/></$tiddler>"},
{title: "$:/myTemplate", text: "(<$view field='title'/>)"},
{title: "TiddlerOne", text: "Jolly Old World"},
{title: "TiddlerTwo", text: "Worldly Old Jelly"},
{title: "TiddlerThree", text: "Golly Gosh"},
@@ -462,7 +462,7 @@ describe("Widget module", function() {
var wrapper = renderWidgetNode(widgetNode);
//console.log(require("util").inspect(widgetNode,{depth:8,colors:true}));
// Test the rendering
expect(wrapper.innerHTML).toBe("<p>TiddlerFourTiddlerOneTiddlerThreeTiddlerTwo</p>");
expect(wrapper.innerHTML).toBe("<p>(TiddlerFour)(TiddlerOne)(TiddlerThree)(TiddlerTwo)</p>");
});
it("should deal with the list widget and empty lists", function() {