From a299de4fe03ccf6ec12e71bc9e1669f149ae7693 Mon Sep 17 00:00:00 2001 From: Chris Bell Date: Fri, 17 Aug 2012 12:01:15 +0100 Subject: [PATCH] Update readme and blocks --- README.md | 8 +++++--- src/gist.js | 2 -- src/tweet.js | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1f297a3..b17fddf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ A place for Sir Trevor Blocks that don't come packaged as the default set. -# Documentation - -Each BlockType should be documented with a header +# Block Types +1. Gist - written by (Chris Bell)[http://github.com/cjbell88] +2. Markdown - written by (Chris Bell)[http://github.com/cjbell88] +3. Ordered List - written by (Chris Bell)[http://github.com/cjbell88] +4. Tweet - written by (Chris Bell)[http://github.com/cjbell88] \ No newline at end of file diff --git a/src/gist.js b/src/gist.js index be5568c..9257dca 100644 --- a/src/gist.js +++ b/src/gist.js @@ -15,8 +15,6 @@ var Gist = SirTrevor.BlockType.extend({ dropzoneHTML: template, - validate: function() {}, - loadData: function(data){ this.loading(); this._super("loadGist", data.id); diff --git a/src/tweet.js b/src/tweet.js index 35d8241..5ab38df 100644 --- a/src/tweet.js +++ b/src/tweet.js @@ -1,4 +1,3 @@ - var t_template = '

Drop tweet link here

'; var tweet_template = '

@<%= user.screen_name %>: <%= text %>

'; @@ -8,14 +7,12 @@ var Tweet = SirTrevor.BlockType.extend({ className: "tweet", dropEnabled: true, - dropzoneHTML: template, - - validate: function() {}, + dropzoneHTML: t_template, loadData: function(data){ this.$block.find(".dropzone").hide(); this.$el.show(); - this.$el.html(_.template(t_template, data)); + this.$el.html(_.template(tweet_template, data)); }, onContentPasted: function(event){ @@ -57,7 +54,6 @@ var Tweet = SirTrevor.BlockType.extend({ // Save this data on the block var dataStruct = this.$el.data('block'); dataStruct.data = obj; - this.$el.html(_.template(tweet_template, obj)); // Render this.$dropzone.hide(); this.$el.show();