summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/TextEditor.js
diff options
context:
space:
mode:
authorryderr <r@okfoc.us>2014-10-02 12:26:41 -0400
committerryderr <r@okfoc.us>2014-10-02 12:26:41 -0400
commit07c4bbecdad6ba4522de09d52884e1ad790fff87 (patch)
tree1e276d3eae7dbf564b11b1388972cadd905dab3f /public/assets/javascripts/ui/editor/TextEditor.js
parent7767259acb90375f55b15ad906e3d434219d43fc (diff)
parent52cabd89039fa852cbd59db9b8bfcb29e1e0a170 (diff)
Merge branch 'master' of github.com:okfocus/vvalls
Diffstat (limited to 'public/assets/javascripts/ui/editor/TextEditor.js')
-rw-r--r--public/assets/javascripts/ui/editor/TextEditor.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/public/assets/javascripts/ui/editor/TextEditor.js b/public/assets/javascripts/ui/editor/TextEditor.js
new file mode 100644
index 0000000..0319a31
--- /dev/null
+++ b/public/assets/javascripts/ui/editor/TextEditor.js
@@ -0,0 +1,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(){
+ },
+
+})