Skip to content

Commit

Permalink
Merge pull request #5 from cpradio/beta
Browse files Browse the repository at this point in the history
Updated to v1.0.0
  • Loading branch information
cpradio authored Oct 27, 2016
2 parents 3ee7c9a + 477ee78 commit 39c70a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.

This file was deleted.

16 changes: 11 additions & 5 deletions assets/javascripts/discourse/views/replygif-result.js.es6
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import StringBuffer from 'discourse/mixins/string-buffer';
import { bufferedRender } from 'discourse-common/lib/buffered-render';

export default Ember.View.extend(StringBuffer, {
export default Ember.View.extend(bufferedRender({
result: Em.computed.alias("content"),
tagName: "div",
selected: false,
classNames: ["replygif-imgwrap"],
rawTemplate: "replygif-result.raw",

selectedClass: function() {
return this.get("selected") ? "selected" : "";
Expand All @@ -30,6 +29,13 @@ export default Ember.View.extend(StringBuffer, {
} else {
return this.get("result.file").replace("/i/", "/thumbnail/");
}
}.property("result.file", "selected")
}.property("result.file", "selected"),

});
buildBuffer(buffer) {
let selectedClass = this.get('selectedClass');
let imagePath = this.get('imagePath');
let alternateText = this.get('alternateText');

buffer.push(`<img class="replygif-img ${selectedClass}" src="${imagePath}" alt="${alternateText}" title="${alternateText}">`);
}
}));
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# name: discourse-plugin-replygif
# about: Add ReplyGIF support
# version: 0.5.0
# version: 1.0.0
# authors: Matthew Wilkin
# url: https://github.com/cpradio/discourse-plugin-replygif

Expand Down

0 comments on commit 39c70a1

Please sign in to comment.