1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Renamed Main.js to App.js

Because now we're going to use the same logic for the client and server
This commit is contained in:
Jeremy Ruston 2012-01-03 11:38:15 +00:00
parent 0552da7810
commit 883956e855
6 changed files with 6 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/*\ /*\
title: js/Main.js title: js/App.js
This is the main() function in the browser This is the main() function in the browser

View File

@ -17,7 +17,7 @@ var Sandbox = function(parserText) {
Sandbox.prototype.parse = function(code) { Sandbox.prototype.parse = function(code) {
return this.parser.parse(code); return this.parser.parse(code);
} };
Sandbox.prototype.execute = function(code,globals) { Sandbox.prototype.execute = function(code,globals) {
var globalNames = [], var globalNames = [],

View File

@ -168,18 +168,14 @@ WikiStore.prototype.getFormattedTiddlerField = function(title,field,format,templ
switch(format) { switch(format) {
case "text": case "text":
return utils.htmlEncode(tiddler.fields[field]); return utils.htmlEncode(tiddler.fields[field]);
break;
case "link": case "link":
// xxx: Attribute encoding is wrong // xxx: Attribute encoding is wrong
return "<a href='" + utils.htmlEncode(tiddler.fields[field]) + "'>" + utils.htmlEncode(tiddler.fields[field]) + "</a>"; return "<a href='" + utils.htmlEncode(tiddler.fields[field]) + "'>" + utils.htmlEncode(tiddler.fields[field]) + "</a>";
break;
case "wikified": case "wikified":
return this.renderTiddler("text/html",tiddler.fields.title); return this.renderTiddler("text/html",tiddler.fields.title);
break;
case "date": case "date":
template = template || "DD MMM YYYY"; template = template || "DD MMM YYYY";
return utils.htmlEncode(utils.formatDateString(tiddler.fields[field],template)); return utils.htmlEncode(utils.formatDateString(tiddler.fields[field],template));
break;
} }
} }
return ""; return "";

View File

@ -78,9 +78,9 @@ WikiTextCompiler.prototype.compileAsHtml = function(treenode) {
var insertParam = function(name,arg) { var insertParam = function(name,arg) {
if(arg.evaluated) { if(arg.evaluated) {
var prog = me.store.sandbox.parse(arg.string); var prog = me.store.sandbox.parse(arg.string);
paramsProps[m] = prog.elements[0]; paramsProps[name] = prog.elements[0];
} else { } else {
paramsProps[m] = {type: "StringLiteral", value: arg.string}; paramsProps[name] = {type: "StringLiteral", value: arg.string};
} }
}; };
for(var m in macro.params) { for(var m in macro.params) {

View File

@ -62,7 +62,7 @@ function executeModule(modName,modRoot) {
$(function() { $(function() {
// Execute the main module // Execute the main module
executeModule("js/Main.js"); executeModule("js/App.js");
}) })
})(); })();

View File

@ -22,7 +22,7 @@ jsmodule: ../js/WikiTextRenderer.js
jsmodule: ../js/WikiTextCompiler.js jsmodule: ../js/WikiTextCompiler.js
jsmodule: ../js/Navigators.js jsmodule: ../js/Navigators.js
jsmodule: ../js/StoryNavigator.js jsmodule: ../js/StoryNavigator.js
jsmodule: ../js/Main.js jsmodule: ../js/App.js
jsmodule: ../node_modules/pegjs/lib/peg.js jsmodule: ../node_modules/pegjs/lib/peg.js
title: pegjs title: pegjs