Commit 67653cf4 authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Jonne Haß
Browse files

Update backbone.js

closes #6262
parent c8b01cb6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ gem "entypo-rails", "2.2.3"

# JavaScript

gem "backbone-on-rails", "1.1.2.1"
gem "backbone-on-rails", "1.2.0.0"
gem "handlebars_assets", "0.20.2"
gem "jquery-rails",      "4.0.4"
gem "jquery-ui-rails",   "5.0.5"
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ GEM
    autoprefixer-rails (5.2.1)
      execjs
      json
    backbone-on-rails (1.1.2.1)
    backbone-on-rails (1.2.0.0)
      eco
      ejs
      jquery-rails
@@ -752,7 +752,7 @@ DEPENDENCIES
  addressable (= 2.3.8)
  asset_sync (= 1.1.0)
  autoprefixer-rails (= 5.2.1)
  backbone-on-rails (= 1.1.2.1)
  backbone-on-rails (= 1.2.0.0)
  bootstrap-sass (= 2.3.2.2)
  capybara (= 2.4.4)
  carrierwave (= 0.10.0)
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ app.Router = Backbone.Router.extend({
            {tagText: decodeURIComponent(name).toLowerCase()}
          );
      $("#author_info").prepend(followedTagsAction.render().el);
      app.tags = new app.views.Tags({tagName: name});
      app.tags = new app.views.Tags({hashtagName: name});
    }
    this._hideInactiveStreamLists();
  },
+2 −3
Original line number Diff line number Diff line
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later

app.views.Tags = Backbone.View.extend({

  initialize: function() {
    app.publisher.setText("#"+ this.tagName + " ");
  initialize: function(opts) {
    app.publisher.setText("#"+ opts.hashtagName + " ");
  }
});
// @license-end
+9 −3
Original line number Diff line number Diff line
@@ -60,13 +60,19 @@ describe("app.views.Feedback", function(){
        });

        it("allows for unliking a just-liked post", function(){
          var responseText = JSON.stringify({"author": this.userAttrs});
          var ajax_success = { status: 201, responseText: responseText };
          expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
          this.link().click();
          jasmine.Ajax.requests.mostRecent().respondWith(ajax_success);
          jasmine.Ajax.requests.mostRecent().respondWith({
            status: 201,
            responseText: JSON.stringify({
              id: 42,
              guid: 42,
              author: this.userAttrs
            })
          });
          expect(this.link().text()).toContain(Diaspora.I18n.t("stream.unlike"));
          this.link().click();
          jasmine.Ajax.requests.mostRecent().respondWith({status: 204});
          expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
        });
      });