mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
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:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user