Implemented remaining core features

This commit is contained in:
Thaum
2015-02-25 12:48:45 +00:00
parent 52b8c8b8d6
commit 56f8e95d81
38 changed files with 748 additions and 100 deletions

View File

@@ -34,15 +34,9 @@ evaluateString = function(charId, string){
if(!string) return string;
var brackets = /\{[^\{\}]*\}/g;
var result = string.replace(brackets, function(exp){
var exp = exp.replace(/(\{|\})/g, "") //remove brackets
var span = jQuery('<span/>', {
title: exp,
text: evaluate(charId, exp),
class: "calculatedValue"
});
return span.prop('outerHTML');
var exp = exp.replace(/(\{|\})/g, "") //remove curly brackets
return evaluate(charId, exp);
});
//this is going to return HTML, ensure it is santized!
return result;
}