Work in progress on a major revision of the NanoUI templating system.

This commit is contained in:
Mark Aherne
2014-07-07 02:05:39 +01:00
parent 4703526738
commit 1b8d865061
6 changed files with 30 additions and 16 deletions

View File

@@ -1,15 +1,21 @@
// NanoUtility is the place to store utility functions
var NanoUtility = function ()
{
return {
var _urlParameters = {}; // This is populated with the base url parameters (used by all links), which is probaby just the "src" parameter
return {
init: function ()
{
if (typeof jQuery == 'undefined') {
alert('ERROR: jQuery failed to load!');
alert('ERROR: Javascript library failed to load!');
}
if (typeof $.views == 'undefined') {
alert('ERROR: JSRender failed to load!');
}
if (typeof doT == 'undefined') {
alert('ERROR: Template engine failed to load!');
}
var body = $('body'); // We store data in the body tag, it's as good a place as any
_urlParameters = body.data('urlParameters');
},
// generate a Byond href, combines _urlParameters with parameters
generateHref: function (parameters)