1c55371a56
- show at least one stopwatch - add a refresh button (for web-apps) - no-cache for index.html - reorder buttons for Aircraft topic - add aircraft thumbnail to Aircraft topic
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
define([
|
|
'knockout', 'text!./Aircraft.html',
|
|
], function(ko, htmlString) {
|
|
ko.components.register('Aircraft/Select', {
|
|
require : 'topics/Aircraft/Select'
|
|
});
|
|
|
|
ko.components.register('Aircraft/Mass & Balance', {
|
|
require : 'topics/Aircraft/MassBalance'
|
|
});
|
|
|
|
ko.components.register('Aircraft/Checklists', {
|
|
require : 'topics/Aircraft/Checklists'
|
|
});
|
|
|
|
ko.components.register('Aircraft/Help', {
|
|
require : 'topics/Aircraft/Help'
|
|
});
|
|
|
|
function ViewModel(params) {
|
|
var self = this;
|
|
|
|
self.topics = [
|
|
'Mass & Balance', 'Checklists', 'Failures', 'Panel', 'Select', 'Help'
|
|
];
|
|
|
|
self.selectedTopic = ko.observable();
|
|
|
|
self.selectedComponent = ko.pureComputed(function(){
|
|
return "Aircraft/" + self.selectedTopic();
|
|
});
|
|
|
|
self.selectTopic = function(topic) {
|
|
self.selectedTopic(topic);
|
|
}
|
|
|
|
self.selectTopic(self.topics[self.topics.length-1]);
|
|
|
|
}
|
|
|
|
ViewModel.prototype.dispose = function() {
|
|
}
|
|
|
|
// Return component definition
|
|
return {
|
|
viewModel : ViewModel,
|
|
template : htmlString
|
|
};
|
|
});
|