1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +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

View File

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

View File

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

View File

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

View File

@ -62,7 +62,7 @@ function executeModule(modName,modRoot) {
$(function() {
// 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/Navigators.js
jsmodule: ../js/StoryNavigator.js
jsmodule: ../js/Main.js
jsmodule: ../js/App.js
jsmodule: ../node_modules/pegjs/lib/peg.js
title: pegjs