Adding user preferences to LT and Viewer
This commit is contained in:
1 parent
3d081fe297
commit
e8d729c9b0
9 files changed
+121
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
|
||||
Template.userPreferencesDialog.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
instance.activeTab = new ReactiveVar('hotkeys');
|
||||
});
|
||||
|
||||
Template.userPreferencesDialog.events({
|
||||
'click .nav-tabs li a'(event, instance) {
|
||||
const tabId = $(event.currentTarget).attr('data-id');
|
||||
instance.activeTab.set(tabId);
|
||||
}
|
||||
});
|
||||
|
||||
Template.userPreferencesDialog.helpers({
|
||||
tabClasses(tabId) {
|
||||
const instance = Template.instance();
|
||||
const activeTab = instance.activeTab.get();
|
||||
return tabId === activeTab ? 'active' : '';
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user