Merge branch 'hotfix/0.0.3.1'
This commit is contained in:
commit
4a92508281
18 changed files with 65 additions and 39 deletions
|
|
@ -1,3 +1,12 @@
|
|||
# 0.0.3.1
|
||||
|
||||
* exec foreman in ./script/server to replace the process so that we can Ctrl+C it again.
|
||||
* Include our custom fileuploader on the mobile site too. [#3994](https://github.com/diaspora/diaspora/pull/3994)
|
||||
* Move custom splash page logic into the controller [#3991](https://github.com/diaspora/diaspora/issues/3991)
|
||||
* Fixed removing images from publisher on the profile and tags pages. [#3995](https://github.com/diaspora/diaspora/pull/3995)
|
||||
* Wrap text if too long in mobile notifications. [#3990](https://github.com/diaspora/diaspora/pull/3990)
|
||||
* Sort tag followings alphabetically, not in reverse [#3986](https://github.com/diaspora/diaspora/issues/3986)
|
||||
|
||||
# 0.0.3.0
|
||||
|
||||
## Refactor
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
app.collections.TagFollowings = Backbone.Collection.extend({
|
||||
|
||||
model: app.models.TagFollowing,
|
||||
|
||||
url : "/tag_followings",
|
||||
comparator: function(first_tf, second_tf) {
|
||||
return first_tf.get("name") < second_tf.get("name");
|
||||
},
|
||||
|
||||
create : function(model) {
|
||||
var name = model.name || model.get("name");
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ app.Router = Backbone.Router.extend({
|
|||
$("#tags_list").replaceWith(followedTagsView.render().el);
|
||||
followedTagsView.setupAutoSuggest();
|
||||
|
||||
app.tagFollowings.add(preloads.tagFollowings);
|
||||
app.tagFollowings.reset(preloads.tagFollowings);
|
||||
|
||||
if(name) {
|
||||
var followedTagsAction = new app.views.TagFollowingAction(
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ app.views.TagFollowingList = app.views.Base.extend({
|
|||
},
|
||||
|
||||
initialize : function(){
|
||||
this.collection.bind("add", this.appendTagFollowing, this);
|
||||
this.collection.on("add", this.appendTagFollowing, this);
|
||||
this.collection.on("reset", this.postRenderTemplate, this);
|
||||
},
|
||||
|
||||
postRenderTemplate : function() {
|
||||
|
|
@ -72,4 +73,4 @@ app.views.TagFollowingList = app.views.Base.extend({
|
|||
}).render().el);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
//= require mbp-respond.min
|
||||
//= require mbp-helper
|
||||
//= require jquery.autoSuggest.custom
|
||||
//= require fileuploader-custom
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
|
|
|||
|
|
@ -50,9 +50,13 @@ body {
|
|||
font-weight: bold;
|
||||
}
|
||||
margin-bottom: 2px;
|
||||
height: 45px;
|
||||
white-space: nowrap;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
.time_notif {
|
||||
font-weight: normal;
|
||||
float: right;
|
||||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
> .content,
|
||||
|
|
@ -165,6 +169,10 @@ body {
|
|||
#main_stream {
|
||||
margin-left: -10px;
|
||||
margin-right: -10px;
|
||||
.from {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.more-link {
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
<form accept-charset="UTF-8" action="/tag_followings" id="new_tag_following" method="post">
|
||||
<input class="tag_input" type="text" name="name" placeholder="{{t "stream.followed_tag.add_a_tag"}}" />
|
||||
</form>
|
||||
</li>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,22 @@
|
|||
|
||||
class HomeController < ApplicationController
|
||||
def show
|
||||
partial_dir = Rails.root.join('app', 'views', 'home')
|
||||
if user_signed_in?
|
||||
redirect_to stream_path
|
||||
elsif is_mobile_device?
|
||||
unless(File.exist?(Rails.root.join('app', 'views', 'home', '_show.mobile.erb')))
|
||||
redirect_to user_session_path
|
||||
if partial_dir.join('_show.mobile.haml').exist? ||
|
||||
partial_dir.join('_show.mobile.erb').exist?
|
||||
render :show, layout: 'post'
|
||||
else
|
||||
render :show, :layout => 'post'
|
||||
redirect_to user_session_path
|
||||
end
|
||||
elsif partial_dir.join("_show.html.haml").exist? ||
|
||||
partial_dir.join("_show.html.erb").exist?
|
||||
render :show, layout: 'post'
|
||||
else
|
||||
render :show, :layout => 'post'
|
||||
render file: Rails.root.join("public", "default.html"),
|
||||
layout: 'post'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,4 @@
|
|||
- content_for :page_title do
|
||||
= pod_name
|
||||
|
||||
- begin
|
||||
= render :partial => 'home/show'
|
||||
|
||||
- rescue
|
||||
:erb
|
||||
<%= File.open(Rails.root.join('public', 'default.html')).read %>
|
||||
= render :partial => 'home/show'
|
||||
|
|
|
|||
|
|
@ -13,12 +13,11 @@
|
|||
%ul.notifications_for_day
|
||||
- notes.each do |note|
|
||||
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"}
|
||||
|
||||
.content
|
||||
=person_image_link(note.actors.last)
|
||||
%span.from
|
||||
= notification_message_for(note)
|
||||
.time
|
||||
.from
|
||||
= notification_message_for(note)
|
||||
.time_notif
|
||||
= time_ago_in_words(note.created_at)
|
||||
|
||||
= will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
$('.x').bind('click', function(){
|
||||
var photo = $(this).closest('.publisher_photo');
|
||||
photo.addClass("dim");
|
||||
$.ajax({url: "photos/" + photo.children('img').attr('data-id'),
|
||||
$.ajax({url: "/photos/" + photo.children('img').attr('data-id'),
|
||||
dataType: 'json',
|
||||
type: 'DELETE',
|
||||
success: function() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :jquery
|
||||
= javascript_include_tag :home
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
defaults:
|
||||
version:
|
||||
number: "0.0.3.0"
|
||||
release: true # Do not touch unless in a merge conflict on doing a release, master should have a commit setting this to true which is not backported to the develop branch.
|
||||
number: "0.0.3.1"
|
||||
heroku: false
|
||||
environment:
|
||||
url: "http://localhost:3000/"
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ Feature: posting from own profile page
|
|||
Given I am on the home page
|
||||
And a user with username "alice"
|
||||
When I sign in as "alice@alice.alice"
|
||||
|
||||
Given I have following aspects:
|
||||
| Family |
|
||||
| Work |
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
|
||||
Scenario: posting some text
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
Given I expand the publisher
|
||||
And I have turned off jQuery effects
|
||||
And I append "I want to understand people" to the publisher
|
||||
And I select "Family" on the aspect dropdown
|
||||
|
|
@ -45,3 +45,12 @@ Feature: posting from own profile page
|
|||
When I am on the home page
|
||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||
And I should see "who am I?" within ".stream_element"
|
||||
|
||||
Scenario: back out of posting a photo-only post
|
||||
Given I expand the publisher
|
||||
And I have turned off jQuery effects
|
||||
When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I wait for the ajax to finish
|
||||
And I click to delete the first uploaded photo
|
||||
And I wait for the ajax to finish
|
||||
Then I should not see an uploaded image within the photo drop zone
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ module Configuration
|
|||
def version_string
|
||||
return @version_string unless @version_string.nil?
|
||||
@version_string = version.number.to_s
|
||||
@version_string << "pre" unless version.release?
|
||||
@version_string << "-p#{git_revision[0..7]}" if git_available?
|
||||
@version_string
|
||||
end
|
||||
|
|
@ -54,6 +53,7 @@ module Configuration
|
|||
@git_available = false
|
||||
else
|
||||
`which git`
|
||||
`git status 2> /dev/null` if $?.success?
|
||||
@git_available = $?.success?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -115,4 +115,4 @@ else
|
|||
fi
|
||||
echo ""
|
||||
|
||||
bundle exec foreman start -m "web=1,worker=$workers" -p $port
|
||||
exec bundle exec foreman start -m "web=1,worker=$workers" -p $port
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@ describe("app.collections.TagFollowings", function(){
|
|||
this.collection = new app.collections.TagFollowings();
|
||||
})
|
||||
|
||||
describe("comparator", function() {
|
||||
it("should compare in reverse order", function() {
|
||||
var a = new app.models.TagFollowing({name: "aaa"}),
|
||||
b = new app.models.TagFollowing({name: "zzz"})
|
||||
expect(this.collection.comparator(a, b)).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe("create", function(){
|
||||
it("should not allow duplicates", function(){
|
||||
this.collection.create({"name":"name"})
|
||||
|
|
|
|||
|
|
@ -82,16 +82,6 @@ describe Configuration::Methods do
|
|||
@settings.version_string.should include @version.number
|
||||
end
|
||||
|
||||
context "on a non release" do
|
||||
before do
|
||||
@version.stub(:release?).and_return(false)
|
||||
end
|
||||
|
||||
it "includes pre" do
|
||||
@settings.version_string.should include "pre"
|
||||
end
|
||||
end
|
||||
|
||||
context "with git available" do
|
||||
before do
|
||||
@settings.stub(:git_available?).and_return(true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue