feat(user preferences) Add User Preferences & Theming to Standalone Viewer (closes #117). Update Standalone to Meteor 1.7
This commit is contained in:
1 parent
7090b4f3e0
commit
de7135f3b8
32 files changed
+337
-250
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