4d94d42ff6
with this patch, navigation with the browsers forward/backward buttons is supported within topics and subtopics as well as deep linking into topics using hashed urls like /gui/#Map or /gui/#Environment/Weather Also, slightly rename map overlay layers
27 lines
811 B
JavaScript
27 lines
811 B
JavaScript
define([
|
|
'knockout', 'text!./Environment.html', './SubtopicViewmodel'
|
|
], function(ko, htmlString, SubtopicViewmodel) {
|
|
ko.components.register('Environment/Date & Time', {
|
|
require : 'topics/Environment/DateTime'
|
|
});
|
|
|
|
ko.components.register('Environment/Weather', {
|
|
require : 'topics/Environment/Weather'
|
|
});
|
|
|
|
ko.components.register('Environment/Position', {
|
|
require : 'topics/Environment/Position'
|
|
});
|
|
|
|
// Return component definition
|
|
return {
|
|
viewModel : {
|
|
createViewModel : function(params, componentInfo) {
|
|
return new SubtopicViewmodel([
|
|
'Date & Time', 'Weather', 'Position',
|
|
], "Environment", params);
|
|
},
|
|
},
|
|
template : htmlString
|
|
};
|
|
});
|