reasons
This commit is contained in:
@@ -17,30 +17,37 @@ Template.tabs.helpers({
|
||||
},
|
||||
|
||||
selected_controller: function() {
|
||||
return Session.get('controller_id');
|
||||
return
|
||||
},
|
||||
|
||||
accessible: Meteor.zoblak.client.accessible
|
||||
});
|
||||
|
||||
|
||||
function saveParamsAndGo(where) {
|
||||
var hideControllerSelection = Session.get('hide_controller_selection');
|
||||
if (hideControllerSelection) {
|
||||
Router.go(where + "?controller_id=" + Session.get('controller_id'));
|
||||
} else {
|
||||
Router.go(where);
|
||||
}
|
||||
}
|
||||
|
||||
Template.tabs.events({
|
||||
'click .start': function() {
|
||||
Router.go('/');
|
||||
saveParamsAndGo('/');
|
||||
},
|
||||
'click .weather': function() {
|
||||
Router.go('/weather');
|
||||
saveParamsAndGo('/weather');
|
||||
},
|
||||
'click .log': function() {
|
||||
Router.go('/log');
|
||||
saveParamsAndGo('/log');
|
||||
},
|
||||
'click .surveillance': function() {
|
||||
Router.go('/surveillance');
|
||||
saveParamsAndGo('/surveillance');
|
||||
},
|
||||
|
||||
'click .alarm': function() {
|
||||
Router.go('/alarm');
|
||||
saveParamsAndGo('/alarm');
|
||||
},
|
||||
'click .settings': function() {
|
||||
Session.set('templateName', 'settings');
|
||||
|
||||
Reference in New Issue
Block a user