diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 7a3a18498..93a71c967 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -65,6 +65,7 @@ Diaspora.Page = "#{params[:controller].camelcase}#{params[:action].camelcase}"; - if current_user + :javascript app.user({ current_user: #{current_user.person.as_api_response(:backbone).to_json} }); diff --git a/app/views/templates/header.jst b/app/views/templates/header.jst index 42469bce3..23c1ea1cb 100644 --- a/app/views/templates/header.jst +++ b/app/views/templates/header.jst @@ -68,9 +68,7 @@
-
- <%= current_user.name %> -
+ <%= current_user.name %> <%= current_user.name %>
  • Profile
  • diff --git a/features/manages_aspects.feature b/features/manages_aspects.feature index c59985514..a8b9473e2 100644 --- a/features/manages_aspects.feature +++ b/features/manages_aspects.feature @@ -35,7 +35,7 @@ Feature: User manages contacts Scenario: deleting an aspect from homepage Given I am signed in And I have an aspect called "People" - When I am on the home page + When I am on the aspects page And I click on "People" aspect edit icon And I wait for the ajax to finish And I preemptively confirm the alert diff --git a/public/javascripts/widgets/likes.js b/public/javascripts/widgets/likes.js deleted file mode 100644 index fb233e9fc..000000000 --- a/public/javascripts/widgets/likes.js +++ /dev/null @@ -1,38 +0,0 @@ -(function() { - var Likes = function() { - var self = this; - - this.subscribe("widget/ready", function(evt, likesContainer) { - $.extend(self, { - likesContainer: likesContainer, - likesList: likesContainer.find(".likes_list"), - loadingImage: $("", { src: "/images/ajax-loader.gif" }), - expander: likesContainer.find("a.expand_likes") - }); - - self.expander.click(self.expandLikes); - }); - - this.expandLikes = function(evt) { - evt.preventDefault(); - - if(self.likesList.children().length == 0) { - self.loadingImage.appendTo(self.likesContainer); - - $.get(self.expander.attr('href'), function(data) { - self.loadingImage.fadeOut(100, function() { - self.expander.fadeOut(100, function(){ - self.likesList.html(data) - .fadeToggle(100); - }); - }); - }); - } - else { - self.likesList.fadeToggle(100); - } - }; - }; - - Diaspora.Widgets.Likes = Likes; -})(); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index be58b95d5..55d7ddbb5 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -61,6 +61,12 @@ form :display none .avatar + :-webkit-box-shadow rgba(0,0,0,0.12) 0px 0px 5px inset + :-moz-box-shadow rgba(0,0,0,0.12) 0px 0px 5px inset + + :background + :color #eee + :width 50px :height 50px @@ -252,11 +258,11 @@ header :border 1px solid #999 .avatar - :height 20px - :width 20px + :height 22px + :width 22px :position absolute - :left 4px - :top 5px + :left 7px + :top 9px :display block header.ie-user-menu-active diff --git a/spec/javascripts/widgets/likes-spec.js b/spec/javascripts/widgets/likes-spec.js deleted file mode 100644 index d5e9ea295..000000000 --- a/spec/javascripts/widgets/likes-spec.js +++ /dev/null @@ -1,66 +0,0 @@ -describe("Diaspora.Widgets.Likes", function() { - var likes; - beforeEach(function() { - spec.readFixture("ajax_likes_on_post"); - spec.loadFixture("aspects_index_with_a_post_with_likes"); - likes = Diaspora.BaseWidget.instantiate("Likes", $(".stream_element .likes_container")); - jasmine.Ajax.useMock(); - $.fx.off = true; - }); - - describe("integration", function() { - beforeEach(function() { - likes = new Diaspora.Widgets.Likes(); - - spyOn(likes, "expandLikes"); - - likes.publish("widget/ready", [$(".stream_element .likes_container")]); - }); - - it("calls expandLikes when you click on the expand likes link", function() { - $(".stream_element a.expand_likes").click(); - - expect(likes.expandLikes).toHaveBeenCalled(); - }); - }); - - describe("expandLikes", function() { - it("makes an ajax request if the list does not have children", function() { - spyOn($, "ajax"); - - likes.expandLikes($.Event()); - - expect($.ajax).toHaveBeenCalled(); - }); - - it("does not make an ajax request if the list has children", function() { - spyOn($, "ajax"); - - $(".stream_element .likes_list").html(""); - - likes.expandLikes($.Event()); - - expect($.ajax).not.toHaveBeenCalled(); - }); - - it("makes the likes list's html the response of the request", function() { - spyOn($, "ajax").andCallThrough(); - - likes.expandLikes($.Event()); - - mostRecentAjaxRequest().response({ - responseHeaders: { - "Content-type": "text/html" - }, - responseText: spec.readFixture("ajax_likes_on_post"), - status: 200 - }); - - expect($(".stream_element .likes_list").html()).toEqual(spec.readFixture("ajax_likes_on_post")); - }); - }); - - afterEach(function() { - $.fx.off = false; - }); -});