forum-navbar.js 474 B

1234567891011121314151617181920212223
  1. import Ember from 'ember';
  2. export default Ember.Component.extend({
  3. classNames: 'navbar-spacer',
  4. affixNavbar: function() {
  5. // take navbar's height in document
  6. this.$().height(this.$().height());
  7. // affix navbar
  8. this.$('.navbar').affix({
  9. offset: {
  10. top: this.$('.navbar').offset().top
  11. }
  12. });
  13. }.on('didInsertElement'),
  14. actions: {
  15. showModal: function(template, model) {
  16. this.modal.show(template, model);
  17. }
  18. }
  19. });