Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2021-06-27 22:29:12 +02:00
commit 5fcc60fea8
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
10 changed files with 23 additions and 21 deletions

View file

@ -95,14 +95,14 @@ gem "entypo-rails", "3.0.0"
# JavaScript # JavaScript
gem "handlebars_assets", "0.23.8" gem "handlebars_assets", "0.23.8"
gem "jquery-rails", "4.3.5" gem "jquery-rails", "4.4.0"
gem "jquery-ui-rails", "5.0.5" gem "jquery-ui-rails", "5.0.5"
gem "js-routes", "1.4.9" gem "js-routes", "1.4.9"
gem "js_image_paths", "0.1.1" gem "js_image_paths", "0.1.1"
gem "sprockets-es6", "0.9.2" gem "sprockets-es6", "0.9.2"
source "https://gems.diasporafoundation.org" do source "https://gems.diasporafoundation.org" do
gem "rails-assets-jquery", "3.4.1" # Should be kept in sync with jquery-rails gem "rails-assets-jquery", "3.5.1" # Should be kept in sync with jquery-rails
gem "rails-assets-highlightjs", "9.12.0" gem "rails-assets-highlightjs", "9.12.0"
gem "rails-assets-markdown-it", "8.4.2" gem "rails-assets-markdown-it", "8.4.2"

View file

@ -352,7 +352,7 @@ GEM
rake rake
jasmine-core (3.7.1) jasmine-core (3.7.1)
jasmine-jquery-rails (2.0.3) jasmine-jquery-rails (2.0.3)
jquery-rails (4.3.5) jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
@ -554,7 +554,7 @@ GEM
rails-assets-jasmine (3.4.0) rails-assets-jasmine (3.4.0)
rails-assets-jasmine-ajax (4.0.0) rails-assets-jasmine-ajax (4.0.0)
rails-assets-jasmine (~> 3) rails-assets-jasmine (~> 3)
rails-assets-jquery (3.4.1) rails-assets-jquery (3.5.1)
rails-assets-jquery-placeholder (2.3.1) rails-assets-jquery-placeholder (2.3.1)
rails-assets-jquery (>= 1.6) rails-assets-jquery (>= 1.6)
rails-assets-jquery-textchange (0.2.3) rails-assets-jquery-textchange (0.2.3)
@ -828,7 +828,7 @@ DEPENDENCIES
i18n-inflector-rails (= 1.0.7) i18n-inflector-rails (= 1.0.7)
jasmine (= 3.7.0) jasmine (= 3.7.0)
jasmine-jquery-rails (= 2.0.3) jasmine-jquery-rails (= 2.0.3)
jquery-rails (= 4.3.5) jquery-rails (= 4.4.0)
jquery-ui-rails (= 5.0.5) jquery-ui-rails (= 5.0.5)
js-routes (= 1.4.9) js-routes (= 1.4.9)
js_image_paths (= 0.1.1) js_image_paths (= 0.1.1)
@ -874,7 +874,7 @@ DEPENDENCIES
rails-assets-fine-uploader (= 5.13.0)! rails-assets-fine-uploader (= 5.13.0)!
rails-assets-highlightjs (= 9.12.0)! rails-assets-highlightjs (= 9.12.0)!
rails-assets-jasmine-ajax (= 4.0.0)! rails-assets-jasmine-ajax (= 4.0.0)!
rails-assets-jquery (= 3.4.1)! rails-assets-jquery (= 3.5.1)!
rails-assets-jquery-placeholder (= 2.3.1)! rails-assets-jquery-placeholder (= 2.3.1)!
rails-assets-jquery-textchange (= 0.2.3)! rails-assets-jquery-textchange (= 0.2.3)!
rails-assets-jquery.are-you-sure (= 1.9.0)! rails-assets-jquery.are-you-sure (= 1.9.0)!

View file

@ -130,7 +130,7 @@ app.views.Hovercard = app.views.Base.extend({
// set hashtags // set hashtags
this.hashtags.empty(); this.hashtags.empty();
this.hashtags.html($(_.map(person.profile.tags, function(tag) { this.hashtags.html($(_.map(person.profile.tags, function(tag) {
return $("<a/>", {href: Routes.tag(tag)}).text("#" + tag)[0]; return $("<a></a>", {href: Routes.tag(tag)}).text("#" + tag)[0];
}))); })));
} }
}, },

View file

@ -19,7 +19,7 @@ app.views.Location = Backbone.View.extend({
var locator = new OSM.Locator(); var locator = new OSM.Locator();
locator.getAddress(function(address, latlng){ locator.getAddress(function(address, latlng){
$(element).empty(); $(element).empty();
$("<input/>", $("<input></input>",
{ id: "location_address", { id: "location_address",
value: address, value: address,
type: "text", type: "text",

View file

@ -351,7 +351,7 @@ app.views.Publisher = Backbone.View.extend({
}; };
var previewPost = new app.views.PreviewPost({model: new app.models.Post(previewMessage)}).render().el; var previewPost = new app.views.PreviewPost({model: new app.models.Post(previewMessage)}).render().el;
return $("<div/>").append(previewPost).html(); return $("<div></div>").append(previewPost).html();
}, },
keyDown : function(evt) { keyDown : function(evt) {

View file

@ -185,8 +185,8 @@
addNewComments: function(bottomBar, data) { addNewComments: function(bottomBar, data) {
if ($(".comment-container", bottomBar).length === 0) { if ($(".comment-container", bottomBar).length === 0) {
$(".show-comments", bottomBar).after($("<div/>", {"class": "comment-container"})); $(".show-comments", bottomBar).after($("<div></div>", {"class": "comment-container"}));
$(".comment-container", bottomBar).append($("<ul/>", {"class": "comments"})); $(".comment-container", bottomBar).append($("<ul></ul>", {"class": "comments"}));
} }
$(".comment-container .comments", bottomBar).append(data); $(".comment-container .comments", bottomBar).append(data);
}, },
@ -212,8 +212,10 @@
var postGuid = bottomBar.parents(".stream-element").data("guid"); var postGuid = bottomBar.parents(".stream-element").data("guid");
toggleReactionsLink.remove(); toggleReactionsLink.remove();
toggleReactionsLink = $("<a/>", {"class": "show-comments", "href": Routes.postComments(postGuid) + ".mobile"}) toggleReactionsLink = $("<a></a>", {
.html(text + "<i class='entypo-chevron-up'/>"); "class": "show-comments",
"href": Routes.postComments(postGuid) + ".mobile"
}).html(text + "<i class='entypo-chevron-up'/>");
parent.prepend(toggleReactionsLink); parent.prepend(toggleReactionsLink);
bottomBar.removeClass("inactive").addClass("active"); bottomBar.removeClass("inactive").addClass("active");
} }

View file

@ -33,7 +33,7 @@ $(document).ready(function(){
if(hiddenField.length > 0) { hiddenField.remove(); } if(hiddenField.length > 0) { hiddenField.remove(); }
else { else {
$("#new_status_message").append( $("#new_status_message").append(
$("<input/>", { $("<input></input>", {
name: "services[]", name: "services[]",
type: "hidden", type: "hidden",
value: provider value: provider

View file

@ -47,7 +47,7 @@ describe("app", function() {
describe("setupForms", function() { describe("setupForms", function() {
beforeEach(function() { beforeEach(function() {
spec.content().append("<textarea/> <input/>"); spec.content().append("<textarea></textarea> <input></input>");
}); });
it("calls jQuery.placeholder() for inputs", function() { it("calls jQuery.placeholder() for inputs", function() {

View file

@ -62,8 +62,8 @@ describe("app.views.Base", function(){
}, },
postRenderTemplate : function(){ postRenderTemplate : function(){
$(this.el).append("<div class=subview1/>"); $(this.el).append("<div class=subview1></div>");
$(this.el).append("<div class=subview2/>"); $(this.el).append("<div class=subview2></div>");
}, },
createSubview2 : function(){ createSubview2 : function(){
@ -121,7 +121,7 @@ describe("app.views.Base", function(){
it("replaces .time with relative time ago in words", function() { it("replaces .time with relative time ago in words", function() {
this.view.templateName = false; this.view.templateName = false;
spyOn($.fn, "timeago"); spyOn($.fn, "timeago");
this.view.$el.append("<time/>"); this.view.$el.append("<time></time>");
this.view.render(); this.view.render();
expect($.fn.timeago).toHaveBeenCalled(); expect($.fn.timeago).toHaveBeenCalled();
expect($.fn.timeago.calls.mostRecent().object.first().is("time")).toBe(true); expect($.fn.timeago.calls.mostRecent().object.first().is("time")).toBe(true);
@ -145,7 +145,7 @@ describe("app.views.Base", function(){
beforeEach(function() { beforeEach(function() {
this.view.$el.htmlOriginal = this.view.$el.html; this.view.$el.htmlOriginal = this.view.$el.html;
spyOn(this.view.$el, "html").and.callFake(function() { spyOn(this.view.$el, "html").and.callFake(function() {
this.htmlOriginal("<input><textarea/></input>"); this.htmlOriginal("<input><textarea></textarea></input>");
return this; return this;
}); });
}); });

View file

@ -148,7 +148,7 @@ describe("Diaspora.Mobile.Comments", function(){
var parent = this.toggleReactionsLink.parent(); var parent = this.toggleReactionsLink.parent();
var postGuid = this.bottomBar.parents(".stream-element").data("guid"); var postGuid = this.bottomBar.parents(".stream-element").data("guid");
this.toggleReactionsLink.remove(); this.toggleReactionsLink.remove();
parent.prepend($("<span/>", {"class": "show-comments"}).text("0 comments")); parent.prepend($("<span></span>", {"class": "show-comments"}).text("0 comments"));
Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar); Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar);
this.toggleReactionsLink = this.bottomBar.find(".show-comments").first(); this.toggleReactionsLink = this.bottomBar.find(".show-comments").first();
@ -160,7 +160,7 @@ describe("Diaspora.Mobile.Comments", function(){
var parent = this.toggleReactionsLink.parent(); var parent = this.toggleReactionsLink.parent();
var postGuid = this.bottomBar.parents(".stream-element").data("guid"); var postGuid = this.bottomBar.parents(".stream-element").data("guid");
this.toggleReactionsLink.remove(); this.toggleReactionsLink.remove();
parent.prepend($("<span/>", {"class": "show-comments"}).text("Aucun commentaire")); parent.prepend($("<span></span>", {"class": "show-comments"}).text("Aucun commentaire"));
Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar); Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar);
this.toggleReactionsLink = this.bottomBar.find(".show-comments").first(); this.toggleReactionsLink = this.bottomBar.find(".show-comments").first();