Refactor common template HTML for atmospheric scan into its own file.

As a demonstration of the partials inclusion feature, the HTML for the atmospheric scan screen (which was nearly identical between PDAs and Communicators) was moved into a separate file and then transcluded into both pda.tmpl and communicator.tmpl
Also added a README.dm with the very basics of nanoui and template transclusion, and fixed comments in nano_state.js
This commit is contained in:
Leshana
2018-04-27 11:58:41 -04:00
parent b60281e19a
commit f508841fff
7 changed files with 104 additions and 114 deletions

View File

@@ -50,12 +50,12 @@ NanoStateClass.prototype.onUpdate = function (data) {
{
if (!this.layoutRendered || (data['config'].hasOwnProperty('autoUpdateLayout') && data['config']['autoUpdateLayout']))
{
$("#uiLayout").html(NanoTemplate.parse('layout', data)); // render the 'mail' template to the #mainTemplate div
$("#uiLayout").html(NanoTemplate.parse('layout', data)); // render the 'layout' template to the #uiLayout div
this.layoutRendered = true;
}
if (!this.contentRendered || (data['config'].hasOwnProperty('autoUpdateContent') && data['config']['autoUpdateContent']))
{
$("#uiContent").html(NanoTemplate.parse('main', data)); // render the 'mail' template to the #mainTemplate div
$("#uiContent").html(NanoTemplate.parse('main', data)); // render the 'main' template to the #uiContent div
this.contentRendered = true;
}
if (NanoTemplate.templateExists('mapContent'))