Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

31 řádky
493 B

  1. define([
  2. 'html!./template',
  3. 'css!./styles',
  4. 'js/generator'
  5. ], function (
  6. template,
  7. styles,
  8. generator
  9. ) {
  10. return {
  11. tpl: template,
  12. loaded: null,
  13. postRender: function () {
  14. this.on('.btn', 'click', this.events.onChangeMode.bind(this));
  15. },
  16. events: {
  17. onChangeMode: function (event, e) {
  18. var el = $(e.currentTarget);
  19. this.find('.active').removeClass('active');
  20. el.addClass('active');
  21. var mode = el.attr('mode');
  22. generator.setMode(mode);
  23. }
  24. }
  25. }
  26. });