diff --git a/core/modules/macros/list.js b/core/modules/macros/list/list.js similarity index 100% rename from core/modules/macros/list.js rename to core/modules/macros/list/list.js diff --git a/core/modules/macros/view/view.js b/core/modules/macros/view/view.js index b4e7362a9..cff3edd67 100644 --- a/core/modules/macros/view/view.js +++ b/core/modules/macros/view/view.js @@ -49,10 +49,10 @@ exports.executeMacro = function() { // Figure out which viewer to use // TODO: Tiddler field modules should be able to specify a field type from which the viewer is derived if(tiddler && this.params.format) { - var viewer = this.wiki.macros.view.viewers[this.params.format]; + var viewer = this.wiki.macros.view.fieldviewers[this.params.format]; } if(!viewer) { - viewer = this.wiki.macros.view.viewers["text"]; + viewer = this.wiki.macros.view.fieldviewers["text"]; } // Call the viewer to generate the content return viewer(tiddler,field,value,this); diff --git a/core/modules/macros/view/viewers/date.js b/core/modules/macros/view/viewers/date.js index 18d69bce5..c017576d1 100644 --- a/core/modules/macros/view/viewers/date.js +++ b/core/modules/macros/view/viewers/date.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/macros/view/viewers/date.js type: application/javascript -module-type: viewer +module-type: fieldviewer A viewer for viewing tiddler fields as a date diff --git a/core/modules/macros/view/viewers/link.js b/core/modules/macros/view/viewers/link.js index 9e9e41b8f..2031680ac 100644 --- a/core/modules/macros/view/viewers/link.js +++ b/core/modules/macros/view/viewers/link.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/macros/view/viewers/link.js type: application/javascript -module-type: viewer +module-type: fieldviewer A viewer for viewing tiddler fields as a link diff --git a/core/modules/macros/view/viewers/text.js b/core/modules/macros/view/viewers/text.js index 1aae9ff18..64c04cb36 100644 --- a/core/modules/macros/view/viewers/text.js +++ b/core/modules/macros/view/viewers/text.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/macros/view/viewers/text.js type: application/javascript -module-type: viewer +module-type: fieldviewer A viewer for viewing tiddler fields as plain text diff --git a/core/modules/macros/view/viewers/transclude.js b/core/modules/macros/view/viewers/transclude.js index 8bdba58cc..26341beba 100644 --- a/core/modules/macros/view/viewers/transclude.js +++ b/core/modules/macros/view/viewers/transclude.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/macros/view/viewers/transclude.js type: application/javascript -module-type: viewer +module-type: fieldviewer A viewer that transcludes the tiddler whose title is specified in the viewed field diff --git a/core/modules/macros/view/viewers/wikified.js b/core/modules/macros/view/viewers/wikified.js index ebe69337d..6b8c09d69 100644 --- a/core/modules/macros/view/viewers/wikified.js +++ b/core/modules/macros/view/viewers/wikified.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/macros/view/viewers/wikified.js type: application/javascript -module-type: viewer +module-type: fieldviewer A viewer for viewing tiddler fields as wikified text diff --git a/core/modules/startup.js b/core/modules/startup.js index 33fe7f713..c19952df0 100644 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -33,7 +33,7 @@ exports.startup = function() { // Set up the wiki store $tw.wiki.initMacros(); $tw.wiki.initEditors(); - $tw.wiki.initViewers(); + $tw.wiki.initFieldViewers(); $tw.wiki.initStoryViews(); $tw.wiki.initParsers(); // Set up the command modules diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 679ee34b8..756dc5bfa 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -533,14 +533,14 @@ exports.initEditors = function(moduleType) { }; /* -Install viewer modules for the edit macro +Install field viewer modules for the edit macro */ -exports.initViewers = function(moduleType) { - moduleType = moduleType || "viewer"; +exports.initFieldViewers = function(moduleType) { + moduleType = moduleType || "fieldviewer"; var viewMacro = this.macros.view; if(viewMacro) { - viewMacro.viewers = {}; - $tw.modules.applyMethods(moduleType,viewMacro.viewers); + viewMacro.fieldviewers = {}; + $tw.modules.applyMethods(moduleType,viewMacro.fieldviewers); } };