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 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)
|
||||
* 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
|
||||
* 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)
|
||||
* 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
|
||||
* 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) {
|
||||
evt && evt.preventDefault();
|
||||
var self = this;
|
||||
var url = this.model.urlRoot + "/" + this.model.id;
|
||||
|
||||
if( confirm(_.result(this, "destroyConfirmMsg")) ) {
|
||||
this.$el.addClass("deleting");
|
||||
this.model.destroy({ url: url })
|
||||
.done(function() {
|
||||
self.remove();
|
||||
})
|
||||
.fail(function() {
|
||||
self.$el.removeClass("deleting");
|
||||
this.model.destroy({
|
||||
url: url,
|
||||
success: function() {
|
||||
this.remove();
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
this.$el.removeClass("deleting");
|
||||
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() {
|
||||
this.model.set({participation: false});
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
destroyModel: function() {
|
||||
this.post.destroyModel();
|
||||
}
|
||||
});
|
||||
// @license-end
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ app.views.StreamPost = app.views.Post.extend({
|
|||
var personId = this.model.get("author").id;
|
||||
app.events.on("person:block:" + personId, this.remove, this);
|
||||
}
|
||||
this.model.on("remove", this.remove, this);
|
||||
//subviews
|
||||
this.commentStreamView = new app.views.CommentStream({model : this.model});
|
||||
this.oEmbedView = new app.views.OEmbed({model : this.model});
|
||||
|
|
|
|||
|
|
@ -197,16 +197,14 @@
|
|||
}
|
||||
|
||||
.recipients-tag-list {
|
||||
margin: 0 -2px $form-group-margin-bottom;
|
||||
|
||||
.conversation-recipient-tag {
|
||||
background-color: $brand-primary;
|
||||
border-radius: $btn-border-radius-base;
|
||||
display: inline-flex;
|
||||
margin: 0 2px $form-group-margin-bottom;
|
||||
padding: 8px;
|
||||
|
||||
&:first-child { margin-left: 0; }
|
||||
|
||||
&:last-child { margin-right: 0; }
|
||||
margin: 0 2px;
|
||||
padding: $btn-border-radius-base;
|
||||
|
||||
div {
|
||||
align-self: center;
|
||||
|
|
@ -215,9 +213,9 @@
|
|||
}
|
||||
|
||||
.avatar {
|
||||
height: 40px;
|
||||
height: 35px;
|
||||
margin-right: 8px;
|
||||
width: 40px;
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
.name-and-handle {
|
||||
|
|
|
|||
|
|
@ -625,20 +625,6 @@ h1.session {
|
|||
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 {
|
||||
margin-top: 5px;
|
||||
min-height: 100px;
|
||||
|
|
|
|||
|
|
@ -3,21 +3,6 @@ body {
|
|||
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 {
|
||||
float: right;
|
||||
}
|
||||
|
|
@ -31,65 +16,11 @@ ul.as-selections li.as-selection-item {
|
|||
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 {
|
||||
margin: 0 0 1.5em 1.5em;
|
||||
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 {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
margin: 0px;
|
||||
}
|
||||
&.deleting {
|
||||
> .media { opacity: 0.3; }
|
||||
opacity: .3;
|
||||
|
||||
.control-icons { display: none !important; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,12 +337,12 @@ class Person < ActiveRecord::Base
|
|||
def as_json( opts = {} )
|
||||
opts ||= {}
|
||||
json = {
|
||||
:id => self.id,
|
||||
:guid => self.guid,
|
||||
:name => self.name,
|
||||
:avatar => self.profile.image_url(:thumb_medium),
|
||||
:handle => self.diaspora_handle,
|
||||
:url => Rails.application.routes.url_helpers.person_path(self),
|
||||
id: id,
|
||||
guid: guid,
|
||||
name: name,
|
||||
avatar: profile.image_url(:thumb_small),
|
||||
handle: diaspora_handle,
|
||||
url: Rails.application.routes.url_helpers.person_path(self)
|
||||
}
|
||||
json.merge!(:tags => self.profile.tags.map{|t| "##{t.name}"}) if opts[:includes] == "tags"
|
||||
json
|
||||
|
|
|
|||
|
|
@ -18,16 +18,15 @@ class ProcessedImage < CarrierWave::Uploader::Base
|
|||
end
|
||||
|
||||
version :thumb_small do
|
||||
process :resize_to_fill => [50,50]
|
||||
process resize_to_fill: [50, 50]
|
||||
end
|
||||
version :thumb_medium do
|
||||
process :resize_to_limit => [100,100]
|
||||
process resize_to_limit: [100, 100]
|
||||
end
|
||||
version :thumb_large do
|
||||
process :resize_to_limit => [300,300]
|
||||
process resize_to_limit: [300, 1500]
|
||||
end
|
||||
version :scaled_full do
|
||||
process :resize_to_limit => [700,nil]
|
||||
process resize_to_limit: [700, nil]
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -74,12 +74,15 @@ describe("app.views.PostControls", 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);
|
||||
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.$(".remove_post.delete").click();
|
||||
expect(app.views.PostControls.prototype.destroyModel).toHaveBeenCalled();
|
||||
expect(app.views.Post.prototype.destroyModel).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("calls hidePost when hiding a post", function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue