define(["backbone","jquery","handlebar"], function(){

  Handlebars.registerHelper('toUpper', function(options) {
    return options.toUpperCase();
});

  var Controller = Backbone.View.extend({

    template: Handlebars.compile("<button class='{{feature}}'>{{toUpper feature}}</button>"),

    initialize: function() {
      this.model.on('inactivate', this.inactivate, this);
    },

    events: {
      'click button': "renderTextTag"
    },

    inactivate: function(eventName) {
      if (!this.$("button").hasClass('inactive')) {
        this.$("button").addClass('inactive');
      }
    },

    renderTextTag: function(e) {
      this.model.collection.trigger('showTextTags', this.model);
      if (this.$("button").hasClass('inactive')) {
        this.$("button").removeClass('inactive');
      }
    },

    render: function () {
      this.$el.html(this.template(this.model.attributes));
      //to fix. position
      return this;
    }

  });

  return Controller;
});
@@ -491,9 +491,8 @@
 if (
-!
 this
@@ -506,34 +506,32 @@
 ton%22).hasClass('
-in
 active')) %7B%0A    
@@ -555,20 +555,21 @@
 n%22).
-add
+remove
 Class('
-in
 acti
@@ -690,32 +690,33 @@
 del);%0A      if (
+!
 this.$(%22button%22)
@@ -722,26 +722,24 @@
 ).hasClass('
-in
 active')) %7B%0A
@@ -767,23 +767,18 @@
 n%22).
-remove
+add
 Class('
-in
 acti

copy singlePage branch code over