Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2017-01-10 23:45:08 +01:00
commit f01480a14c
8 changed files with 20 additions and 12 deletions

View file

@ -15,6 +15,8 @@
## Bug fixes ## Bug fixes
* Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263) * Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263)
* Fix jasmine tests in firefox [#7246](https://github.com/diaspora/diaspora/pull/7246)
* Prevent scroll to top when clicking 'mark all as read' in the notification dropdown [#7253](https://github.com/diaspora/diaspora/pull/7253)
## Features ## Features
* Add links to the aspects and followed tags pages on mobile [#7265](https://github.com/diaspora/diaspora/pull/7265) * Add links to the aspects and followed tags pages on mobile [#7265](https://github.com/diaspora/diaspora/pull/7265)

View file

@ -112,7 +112,7 @@ source "https://rails-assets.org" do
gem "rails-assets-jquery-placeholder", "2.3.1" gem "rails-assets-jquery-placeholder", "2.3.1"
gem "rails-assets-jquery-textchange", "0.2.3" gem "rails-assets-jquery-textchange", "0.2.3"
gem "rails-assets-perfect-scrollbar", "0.6.12" gem "rails-assets-perfect-scrollbar", "0.6.12"
gem "rails-assets-autosize", "3.0.17" gem "rails-assets-autosize", "3.0.20"
gem "rails-assets-blueimp-gallery", "2.21.3" gem "rails-assets-blueimp-gallery", "2.21.3"
end end

View file

@ -640,7 +640,7 @@ GEM
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1) railties (= 4.2.7.1)
sprockets-rails sprockets-rails
rails-assets-autosize (3.0.17) rails-assets-autosize (3.0.20)
rails-assets-blueimp-gallery (2.21.3) rails-assets-blueimp-gallery (2.21.3)
rails-assets-bootstrap (3.3.7) rails-assets-bootstrap (3.3.7)
rails-assets-jquery (>= 1.9.1, < 4) rails-assets-jquery (>= 1.9.1, < 4)
@ -997,7 +997,7 @@ DEPENDENCIES
rack-rewrite (= 1.5.1) rack-rewrite (= 1.5.1)
rack-ssl (= 1.4.1) rack-ssl (= 1.4.1)
rails (= 4.2.7.1) rails (= 4.2.7.1)
rails-assets-autosize (= 3.0.17)! rails-assets-autosize (= 3.0.20)!
rails-assets-blueimp-gallery (= 2.21.3)! rails-assets-blueimp-gallery (= 2.21.3)!
rails-assets-bootstrap-markdown (= 2.10.0)! rails-assets-bootstrap-markdown (= 2.10.0)!
rails-assets-corejs-typeahead (= 1.0.1)! rails-assets-corejs-typeahead (= 1.0.1)!

View file

@ -28,7 +28,8 @@ app.views.Notifications = Backbone.View.extend({
} }
}, },
markAllRead: function() { markAllRead: function(evt) {
evt.preventDefault();
this.collection.setAllRead(); this.collection.setAllRead();
}, },

View file

@ -274,11 +274,6 @@
padding: 4px 2px; padding: 4px 2px;
text-decoration: none; text-decoration: none;
i { color: $text-grey; } i { color: $text-grey; }
[type='file'],
[type='file']::-webkit-file-upload-button {
cursor: pointer;
}
} }
.btn.btn-link:hover { .btn.btn-link:hover {

View file

@ -168,9 +168,16 @@ describe("app.views.Notifications", function() {
describe("markAllRead", function() { describe("markAllRead", function() {
it("calls collection#setAllRead", function() { it("calls collection#setAllRead", function() {
spyOn(this.collection, "setAllRead"); spyOn(this.collection, "setAllRead");
this.view.markAllRead(); this.view.markAllRead($.Event());
expect(this.collection.setAllRead).toHaveBeenCalled(); expect(this.collection.setAllRead).toHaveBeenCalled();
}); });
it("calls preventDefault", function() {
var evt = $.Event();
spyOn(evt, "preventDefault");
this.view.markAllRead(evt);
expect(evt.preventDefault).toHaveBeenCalled();
});
}); });
describe("onChangedUnreadStatus", function() { describe("onChangedUnreadStatus", function() {

View file

@ -61,7 +61,7 @@ describe("app.views.ProfileHeader", function() {
describe("showMessageModal", function() { describe("showMessageModal", function() {
beforeEach(function() { beforeEach(function() {
spec.content().append("<div id='conversationModal'/>"); spec.content().append("<div id='conversationModal' class='modal fade'><div class='modal-body'></div></div>");
}); });
it("calls app.helpers.showModal", function() { it("calls app.helpers.showModal", function() {
@ -78,8 +78,8 @@ describe("app.views.ProfileHeader", function() {
]; ];
spyOn(app.views.ConversationsForm.prototype, "initialize"); spyOn(app.views.ConversationsForm.prototype, "initialize");
spyOn($.fn, "load").and.callFake(function(url, callback) { callback(); });
this.view.showMessageModal(); this.view.showMessageModal();
$("#conversationModal").trigger("modal:loaded");
expect(app.views.ConversationsForm.prototype.initialize) expect(app.views.ConversationsForm.prototype.initialize)
.toHaveBeenCalledWith({prefill: gon.conversationPrefill}); .toHaveBeenCalledWith({prefill: gon.conversationPrefill});
}); });

View file

@ -78,8 +78,11 @@ afterEach(function() {
jasmine.clock().uninstall(); jasmine.clock().uninstall();
jasmine.Ajax.uninstall(); jasmine.Ajax.uninstall();
$(".modal").removeClass("fade").modal("hide");
$("#jasmine_content").empty(); $("#jasmine_content").empty();
expect(spec.loadFixtureCount).toBeLessThan(2); expect(spec.loadFixtureCount).toBeLessThan(2);
expect($(".modal-backdrop").length).toBe(0);
$(".modal-backdrop").remove();
spec.loadFixtureCount = 0; spec.loadFixtureCount = 0;
}); });