Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ ## Bug fixes * Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167) * Hide 'reshare' button on already reshared posts [#7169](https://github.com/diaspora/diaspora/pull/7169) * Only reload profile header when changing aspect memberships [#7183](https://github.com/diaspora/diaspora/pull/7183) ## Features * Show spinner when loading comments in the stream [#7170](https://github.com/diaspora/diaspora/pull/7170) Loading app/assets/javascripts/app/pages/profile.js +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ app.pages.Profile = app.views.Base.extend({ this.streamCollection = _.has(opts, "streamCollection") ? opts.streamCollection : null; this.streamViewClass = _.has(opts, "streamView") ? opts.streamView : null; this.model.on("change", this.render, this); this.model.on("sync", this._done, this); // bind to global events Loading app/assets/javascripts/app/views/profile_header_view.js +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ app.views.ProfileHeader = app.views.Base.extend({ initialize: function(opts) { this.photos = _.has(opts, 'photos') ? opts.photos : null; this.contacts = _.has(opts, 'contacts') ? opts.contacts : null; this.model.on("change", this.render, this); $("#mentionModal").on("modal:loaded", this.mentionModalLoaded.bind(this)); $("#mentionModal").on("hidden.bs.modal", this.mentionModalHidden); }, Loading spec/javascripts/app/views/profile_header_view_spec.js +28 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,34 @@ describe("app.views.ProfileHeader", function() { loginAs(factory.userAttrs()); }); describe("initialize", function() { it("calls #render when the model changes", function() { spyOn(app.views.ProfileHeader.prototype, "render"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.render).not.toHaveBeenCalled(); this.view.model.trigger("change"); expect(app.views.ProfileHeader.prototype.render).toHaveBeenCalled(); }); it("calls #mentionModalLoaded on modal:loaded", function() { spec.content().append("<div id='mentionModal'></div>"); spyOn(app.views.ProfileHeader.prototype, "mentionModalLoaded"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.mentionModalLoaded).not.toHaveBeenCalled(); $("#mentionModal").trigger("modal:loaded"); expect(app.views.ProfileHeader.prototype.mentionModalLoaded).toHaveBeenCalled(); }); it("calls #mentionModalHidden on hidden.bs.modal", function() { spec.content().append("<div id='mentionModal'></div>"); spyOn(app.views.ProfileHeader.prototype, "mentionModalHidden"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.mentionModalHidden).not.toHaveBeenCalled(); $("#mentionModal").trigger("hidden.bs.modal"); expect(app.views.ProfileHeader.prototype.mentionModalHidden).toHaveBeenCalled(); }); }); context("#presenter", function() { it("contains necessary elements", function() { expect(this.view.presenter()).toEqual(jasmine.objectContaining({ Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ ## Bug fixes * Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167) * Hide 'reshare' button on already reshared posts [#7169](https://github.com/diaspora/diaspora/pull/7169) * Only reload profile header when changing aspect memberships [#7183](https://github.com/diaspora/diaspora/pull/7183) ## Features * Show spinner when loading comments in the stream [#7170](https://github.com/diaspora/diaspora/pull/7170) Loading
app/assets/javascripts/app/pages/profile.js +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ app.pages.Profile = app.views.Base.extend({ this.streamCollection = _.has(opts, "streamCollection") ? opts.streamCollection : null; this.streamViewClass = _.has(opts, "streamView") ? opts.streamView : null; this.model.on("change", this.render, this); this.model.on("sync", this._done, this); // bind to global events Loading
app/assets/javascripts/app/views/profile_header_view.js +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ app.views.ProfileHeader = app.views.Base.extend({ initialize: function(opts) { this.photos = _.has(opts, 'photos') ? opts.photos : null; this.contacts = _.has(opts, 'contacts') ? opts.contacts : null; this.model.on("change", this.render, this); $("#mentionModal").on("modal:loaded", this.mentionModalLoaded.bind(this)); $("#mentionModal").on("hidden.bs.modal", this.mentionModalHidden); }, Loading
spec/javascripts/app/views/profile_header_view_spec.js +28 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,34 @@ describe("app.views.ProfileHeader", function() { loginAs(factory.userAttrs()); }); describe("initialize", function() { it("calls #render when the model changes", function() { spyOn(app.views.ProfileHeader.prototype, "render"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.render).not.toHaveBeenCalled(); this.view.model.trigger("change"); expect(app.views.ProfileHeader.prototype.render).toHaveBeenCalled(); }); it("calls #mentionModalLoaded on modal:loaded", function() { spec.content().append("<div id='mentionModal'></div>"); spyOn(app.views.ProfileHeader.prototype, "mentionModalLoaded"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.mentionModalLoaded).not.toHaveBeenCalled(); $("#mentionModal").trigger("modal:loaded"); expect(app.views.ProfileHeader.prototype.mentionModalLoaded).toHaveBeenCalled(); }); it("calls #mentionModalHidden on hidden.bs.modal", function() { spec.content().append("<div id='mentionModal'></div>"); spyOn(app.views.ProfileHeader.prototype, "mentionModalHidden"); this.view.initialize(); expect(app.views.ProfileHeader.prototype.mentionModalHidden).not.toHaveBeenCalled(); $("#mentionModal").trigger("hidden.bs.modal"); expect(app.views.ProfileHeader.prototype.mentionModalHidden).toHaveBeenCalled(); }); }); context("#presenter", function() { it("contains necessary elements", function() { expect(this.view.presenter()).toEqual(jasmine.objectContaining({ Loading