1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
var TextEditor = FormView.extend({
el: "#textEditor",
events: {
"keydown": 'taint',
"focus [name]": "clearMinotaur",
"mousedown": "stopPropagation",
"change [name=font-family]": 'changeFontFamily',
"change [name=font-size]": 'changeFontSize',
"input [name=text-body]": 'changeText',
"click [data-role=destroy-media]": "destroy",
},
initialize: function(opt){
this.parent = opt.parent
this.__super__.initialize.call(this)
this.$fontFamily = this.$("[name=font-family]")
this.$fontSize = this.$("[name=font-size]")
this.$textBody = this.$("[name=text-body]")
},
toggle: function(state){
this.$el.toggleClass("active", state);
},
taint: function(e){
e.stopPropagation()
},
changeFontFamily: function(){
},
changeFontSize: function(){
},
changeText: function(){
},
})
|