Merge branch 'next-minor' into develop
This commit is contained in:
commit
d9b02418b6
11 changed files with 40 additions and 114 deletions
|
|
@ -23,11 +23,15 @@
|
||||||
* Remove unused setPreload function [#7354](https://github.com/diaspora/diaspora/pull/7354)
|
* Remove unused setPreload function [#7354](https://github.com/diaspora/diaspora/pull/7354)
|
||||||
* Remove jQuery deprecations [#7356](https://github.com/diaspora/diaspora/pull/7356)
|
* Remove jQuery deprecations [#7356](https://github.com/diaspora/diaspora/pull/7356)
|
||||||
* Use empty selector where "#" was used as a selector before (prepare jQuery 3 upgrade) [#7372](https://github.com/diaspora/diaspora/pull/7372)
|
* Use empty selector where "#" was used as a selector before (prepare jQuery 3 upgrade) [#7372](https://github.com/diaspora/diaspora/pull/7372)
|
||||||
|
* Increase maximal height of large thumbnail on mobile [#7383](https://github.com/diaspora/diaspora/pull/7383)
|
||||||
|
* Reduce conversation recipient size [#7376](https://github.com/diaspora/diaspora/pull/7376)
|
||||||
|
* Cleanup rtl css [#7374](https://github.com/diaspora/diaspora/pull/7374)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Don't hide posts when blocking someone from the profile [#7379](https://github.com/diaspora/diaspora/pull/7379)
|
* Don't hide posts when blocking someone from the profile [#7379](https://github.com/diaspora/diaspora/pull/7379)
|
||||||
* Disable autocomplete for the conversation form recipient input [#7375](https://github.com/diaspora/diaspora/pull/7375)
|
* Disable autocomplete for the conversation form recipient input [#7375](https://github.com/diaspora/diaspora/pull/7375)
|
||||||
* Fix sharing indicator on profile page for blocked users [#7382](https://github.com/diaspora/diaspora/pull/7382)
|
* Fix sharing indicator on profile page for blocked users [#7382](https://github.com/diaspora/diaspora/pull/7382)
|
||||||
|
* Remove post only after a successful deletion on the server [#7385](https://github.com/diaspora/diaspora/pull/7385)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Add links to liked and commented pages [#5502](https://github.com/diaspora/diaspora/pull/5502)
|
* Add links to liked and commented pages [#5502](https://github.com/diaspora/diaspora/pull/5502)
|
||||||
|
|
|
||||||
|
|
@ -132,18 +132,19 @@ app.views.Base = Backbone.View.extend({
|
||||||
|
|
||||||
destroyModel: function(evt) {
|
destroyModel: function(evt) {
|
||||||
evt && evt.preventDefault();
|
evt && evt.preventDefault();
|
||||||
var self = this;
|
|
||||||
var url = this.model.urlRoot + "/" + this.model.id;
|
var url = this.model.urlRoot + "/" + this.model.id;
|
||||||
|
|
||||||
if( confirm(_.result(this, "destroyConfirmMsg")) ) {
|
if( confirm(_.result(this, "destroyConfirmMsg")) ) {
|
||||||
this.$el.addClass("deleting");
|
this.$el.addClass("deleting");
|
||||||
this.model.destroy({ url: url })
|
this.model.destroy({
|
||||||
.done(function() {
|
url: url,
|
||||||
self.remove();
|
success: function() {
|
||||||
})
|
this.remove();
|
||||||
.fail(function() {
|
}.bind(this),
|
||||||
self.$el.removeClass("deleting");
|
error: function() {
|
||||||
|
this.$el.removeClass("deleting");
|
||||||
app.flashMessages.error(Diaspora.I18n.t("failed_to_remove"));
|
app.flashMessages.error(Diaspora.I18n.t("failed_to_remove"));
|
||||||
|
}.bind(this)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,10 @@ app.views.PostControls = app.views.Base.extend({
|
||||||
$.post(Routes.postParticipation(this.model.get("id")), {_method: "delete"}, function() {
|
$.post(Routes.postParticipation(this.model.get("id")), {_method: "delete"}, function() {
|
||||||
this.model.set({participation: false});
|
this.model.set({participation: false});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
},
|
||||||
|
|
||||||
|
destroyModel: function() {
|
||||||
|
this.post.destroyModel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ app.views.StreamPost = app.views.Post.extend({
|
||||||
var personId = this.model.get("author").id;
|
var personId = this.model.get("author").id;
|
||||||
app.events.on("person:block:" + personId, this.remove, this);
|
app.events.on("person:block:" + personId, this.remove, this);
|
||||||
}
|
}
|
||||||
this.model.on("remove", this.remove, this);
|
|
||||||
//subviews
|
//subviews
|
||||||
this.commentStreamView = new app.views.CommentStream({model : this.model});
|
this.commentStreamView = new app.views.CommentStream({model : this.model});
|
||||||
this.oEmbedView = new app.views.OEmbed({model : this.model});
|
this.oEmbedView = new app.views.OEmbed({model : this.model});
|
||||||
|
|
|
||||||
|
|
@ -197,16 +197,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.recipients-tag-list {
|
.recipients-tag-list {
|
||||||
|
margin: 0 -2px $form-group-margin-bottom;
|
||||||
|
|
||||||
.conversation-recipient-tag {
|
.conversation-recipient-tag {
|
||||||
background-color: $brand-primary;
|
background-color: $brand-primary;
|
||||||
border-radius: $btn-border-radius-base;
|
border-radius: $btn-border-radius-base;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin: 0 2px $form-group-margin-bottom;
|
margin: 0 2px;
|
||||||
padding: 8px;
|
padding: $btn-border-radius-base;
|
||||||
|
|
||||||
&:first-child { margin-left: 0; }
|
|
||||||
|
|
||||||
&:last-child { margin-right: 0; }
|
|
||||||
|
|
||||||
div {
|
div {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|
@ -215,9 +213,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
height: 40px;
|
height: 35px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
width: 40px;
|
width: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-and-handle {
|
.name-and-handle {
|
||||||
|
|
|
||||||
|
|
@ -625,20 +625,6 @@ h1.session {
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
form p.checkbox_select {
|
|
||||||
position: relative;
|
|
||||||
label {
|
|
||||||
left: 25px;
|
|
||||||
top: 4px;
|
|
||||||
position: absolute;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
position: relative;
|
|
||||||
top: 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#profile_photo_upload {
|
#profile_photo_upload {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,6 @@ body {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
|
||||||
left: 0;
|
|
||||||
right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stream-element .content {
|
|
||||||
padding-right: 60px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stream-element .right {
|
|
||||||
left: 12px;
|
|
||||||
right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.as-selections li {
|
ul.as-selections li {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
@ -31,65 +16,11 @@ ul.as-selections li.as-selection-item {
|
||||||
padding: 3px 6px 3px 0;
|
padding: 3px 6px 3px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#profile_photo_upload img {
|
|
||||||
left: auto;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#profile_photo_upload {
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form p.checkbox_select label {
|
|
||||||
right: 20px;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#update_profile_form h4 textarea[placeholder] {
|
|
||||||
right: -9999px;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
right: 0.48em;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul, ol {
|
ul, ol {
|
||||||
margin: 0 0 1.5em 1.5em;
|
margin: 0 0 1.5em 1.5em;
|
||||||
padding-right: 3.333em;
|
padding-right: 3.333em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.last {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.comments li .content, ul.show_comments li .content, div.likes li .content, div.dislikes li .content {
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.comments li form p, ul.show_comments li form p, div.likes li form p, div.dislikes li form p {
|
|
||||||
left: auto;
|
|
||||||
right: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stream .stream-element time {
|
|
||||||
right: auto;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stream-element.conversation .message-count {
|
|
||||||
right: auto;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stream-element.conversation .timestamp {
|
|
||||||
right: auto;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.content span.rtl {
|
div.content span.rtl {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
&.deleting {
|
&.deleting {
|
||||||
> .media { opacity: 0.3; }
|
opacity: .3;
|
||||||
|
|
||||||
.control-icons { display: none !important; }
|
.control-icons { display: none !important; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -337,12 +337,12 @@ class Person < ActiveRecord::Base
|
||||||
def as_json( opts = {} )
|
def as_json( opts = {} )
|
||||||
opts ||= {}
|
opts ||= {}
|
||||||
json = {
|
json = {
|
||||||
:id => self.id,
|
id: id,
|
||||||
:guid => self.guid,
|
guid: guid,
|
||||||
:name => self.name,
|
name: name,
|
||||||
:avatar => self.profile.image_url(:thumb_medium),
|
avatar: profile.image_url(:thumb_small),
|
||||||
:handle => self.diaspora_handle,
|
handle: diaspora_handle,
|
||||||
:url => Rails.application.routes.url_helpers.person_path(self),
|
url: Rails.application.routes.url_helpers.person_path(self)
|
||||||
}
|
}
|
||||||
json.merge!(:tags => self.profile.tags.map{|t| "##{t.name}"}) if opts[:includes] == "tags"
|
json.merge!(:tags => self.profile.tags.map{|t| "##{t.name}"}) if opts[:includes] == "tags"
|
||||||
json
|
json
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,15 @@ class ProcessedImage < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
version :thumb_small do
|
version :thumb_small do
|
||||||
process :resize_to_fill => [50,50]
|
process resize_to_fill: [50, 50]
|
||||||
end
|
end
|
||||||
version :thumb_medium do
|
version :thumb_medium do
|
||||||
process :resize_to_limit => [100,100]
|
process resize_to_limit: [100, 100]
|
||||||
end
|
end
|
||||||
version :thumb_large do
|
version :thumb_large do
|
||||||
process :resize_to_limit => [300,300]
|
process resize_to_limit: [300, 1500]
|
||||||
end
|
end
|
||||||
version :scaled_full do
|
version :scaled_full do
|
||||||
process :resize_to_limit => [700,nil]
|
process resize_to_limit: [700, nil]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -74,12 +74,15 @@ describe("app.views.PostControls", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls destroyModel when removing a post", function() {
|
it("calls destroyModel when removing a post", function() {
|
||||||
spyOn(app.views.PostControls.prototype, "destroyModel");
|
spyOn(app.views.PostControls.prototype, "destroyModel").and.callThrough();
|
||||||
|
spyOn(app.views.Post.prototype, "destroyModel");
|
||||||
app.currentUser = new app.models.User(this.model.attributes.author);
|
app.currentUser = new app.models.User(this.model.attributes.author);
|
||||||
this.view = new app.views.PostControls({model: this.model});
|
this.postView = new app.views.Post({model: this.model});
|
||||||
|
this.view = new app.views.PostControls({model: this.model, post: this.postView});
|
||||||
this.view.render();
|
this.view.render();
|
||||||
this.view.$(".remove_post.delete").click();
|
this.view.$(".remove_post.delete").click();
|
||||||
expect(app.views.PostControls.prototype.destroyModel).toHaveBeenCalled();
|
expect(app.views.PostControls.prototype.destroyModel).toHaveBeenCalled();
|
||||||
|
expect(app.views.Post.prototype.destroyModel).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls hidePost when hiding a post", function() {
|
it("calls hidePost when hiding a post", function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue