Commit 15aa4063 authored by Jonne Haß's avatar Jonne Haß
Browse files

Merge pull request #6104 from svbergerem/jquery-autosize

Replace jquery.autoresize with autosize
parents 77854cd3 92a3dd53
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ bind to an UNIX socket at `unix:tmp/diaspora.sock`. Please change your local
* Update listen configuration to listen on unix sockets by default [#5974](https://github.com/diaspora/diaspora/pull/5974)
* Port to Bootstrap 3 [#6015](https://github.com/diaspora/diaspora/pull/6015)
* Use a fixed width for the mobile drawer [#6057](https://github.com/diaspora/diaspora/pull/6057)
* Replace jquery.autoresize with autosize [#6104](https://github.com/diaspora/diaspora/pull/6104)

## Bug fixes
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)
+1 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ source "https://rails-assets.org" do
  gem "rails-assets-jquery-textchange",             "0.2.3"
  gem "rails-assets-perfect-scrollbar",             "0.6.2"
  gem "rails-assets-jakobmattsson--jquery-elastic", "1.6.11"
  gem "rails-assets-autosize",                      "3.0.6"
end

gem "facebox-rails", "0.2.0"
+2 −0
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@ GEM
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.1)
      sprockets-rails
    rails-assets-autosize (3.0.6)
    rails-assets-diaspora_jsxc (0.1.1)
      rails-assets-jquery (~> 1.11.1)
      rails-assets-jquery-colorbox (~> 1.5.14)
@@ -820,6 +821,7 @@ DEPENDENCIES
  rack-rewrite (= 1.5.1)
  rack-ssl (= 1.4.1)
  rails (= 4.2.1)
  rails-assets-autosize (= 3.0.6)!
  rails-assets-diaspora_jsxc (~> 0.1.1)!
  rails-assets-highlightjs (= 8.5.0)!
  rails-assets-jakobmattsson--jquery-elastic (= 1.6.11)!
+4 −4
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ app.views.CommentStream = app.views.Base.extend({
    this.model.comments.each(this.appendComment, this);

    // add autoexpanders to new comment textarea
    this.$("textarea").autoResize({'extraSpace' : 10});
    this.$('textarea').val(this.textareaValue);
    this.$("textarea").val(this.textareaValue);
    autosize(this.$("textarea"));
  },

  presenter: function(){
+6 −3
Original line number Diff line number Diff line
@@ -44,9 +44,6 @@ app.views.Publisher = Backbone.View.extend({
    // init mentions plugin
    Mentions.initialize(this.inputEl);

    // init autoresize plugin
    this.inputEl.autoResize({ "extraSpace" : 10, "maxHeight" : Infinity });

    // if there is data in the publisher we ask for a confirmation
    // before the user is able to leave the page
    $(window).on("beforeunload", _.bind(this._beforeUnload, this));
@@ -97,6 +94,9 @@ app.views.Publisher = Backbone.View.extend({
      this.viewPollCreator.render();
    });

    // init autosize plugin
    autosize(this.inputEl);

    this.initSubviews();
    this.checkSubmitAvailability();
    return this;
@@ -147,6 +147,7 @@ app.views.Publisher = Backbone.View.extend({
    this.prefillText = txt;

    this.inputEl.trigger("input");
    autosize.update(this.inputEl);
    this.handleTextchange();
  },

@@ -373,6 +374,7 @@ app.views.Publisher = Backbone.View.extend({
    this.hiddenInputEl.val("");
    this.inputEl.trigger("keyup")
                 .trigger("keydown");
    autosize.update(this.inputEl);

    // remove mentions
    this.inputEl.mentionsInput("reset");
@@ -429,6 +431,7 @@ app.views.Publisher = Backbone.View.extend({
    // visually 'open' the publisher
    this.$el.removeClass("closed");
    this.wrapperEl.addClass("active");
    autosize.update(this.inputEl);

    // fetch contacts for mentioning
    Mentions.fetchContacts();
Loading