From 7f4af0359f82e1590579c99cb1a95b4b10f1d558 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Fri, 27 Apr 2012 20:45:26 -0700 Subject: [PATCH] add bootstrap tooltips for great justice (and clarity) [ci skip] --- app/assets/javascripts/app/pages/profile.js | 2 ++ .../javascripts/app/views/profile_info_view.js | 2 ++ app/assets/stylesheets/new_styles/_canvas.scss | 18 +++++++++++------- app/assets/templates/post-viewer.jst.hbs | 1 - app/assets/templates/profile-info.jst.hbs | 2 +- app/assets/templates/profile.jst.hbs | 8 ++++---- app/assets/templates/small-frame.jst.hbs | 4 +++- spec/javascripts/app/pages/profile_spec.js | 2 +- 8 files changed, 24 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index 33c9f88f6..02b353d24 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -15,6 +15,8 @@ app.pages.Profile = app.views.Base.extend({ "click #edit-mode-toggle" : "toggleEdit" }, + tooltipSelector : "*[rel=tooltip]", + personGUID : null, editMode : false, diff --git a/app/assets/javascripts/app/views/profile_info_view.js b/app/assets/javascripts/app/views/profile_info_view.js index 8fcc3bced..0b2fb9574 100644 --- a/app/assets/javascripts/app/views/profile_info_view.js +++ b/app/assets/javascripts/app/views/profile_info_view.js @@ -1,6 +1,8 @@ app.views.ProfileInfo = app.views.Base.extend({ templateName : "profile-info", + tooltipSelector : "*[rel=tooltip]", + initialize : function(){ this.model.bind("change", this.render, this) //this should go on profile info view when it gets Extracted } diff --git a/app/assets/stylesheets/new_styles/_canvas.scss b/app/assets/stylesheets/new_styles/_canvas.scss index b19c665bd..5f99bc2f1 100644 --- a/app/assets/stylesheets/new_styles/_canvas.scss +++ b/app/assets/stylesheets/new_styles/_canvas.scss @@ -147,15 +147,19 @@ body { width : 29px; } + .timestamp, + .permalink { + margin : 1px 7px; + } + + .timestamp { + float : left; + margin-top : 2px; + } + .permalink { cursor : pointer; - position : absolute; - right : 10px; - margin-top : 2px; - - &:hover { - background-color : #ddd; - } + float : right; } } diff --git a/app/assets/templates/post-viewer.jst.hbs b/app/assets/templates/post-viewer.jst.hbs index 5fddd6ef6..a34e1a3e3 100644 --- a/app/assets/templates/post-viewer.jst.hbs +++ b/app/assets/templates/post-viewer.jst.hbs @@ -13,7 +13,6 @@ -
\ No newline at end of file diff --git a/app/assets/templates/profile-info.jst.hbs b/app/assets/templates/profile-info.jst.hbs index cdb6f3f3c..5b3aa27b4 100644 --- a/app/assets/templates/profile-info.jst.hbs +++ b/app/assets/templates/profile-info.jst.hbs @@ -37,7 +37,7 @@ {{#if isOwnProfile}} - + {{/if}} diff --git a/app/assets/templates/profile.jst.hbs b/app/assets/templates/profile.jst.hbs index 5aea788bb..a066fd645 100644 --- a/app/assets/templates/profile.jst.hbs +++ b/app/assets/templates/profile.jst.hbs @@ -15,11 +15,11 @@
{{#if isOwnProfile}} - - + + - - + + {{/if}}
diff --git a/app/assets/templates/small-frame.jst.hbs b/app/assets/templates/small-frame.jst.hbs index ce5370e79..4ce198356 100644 --- a/app/assets/templates/small-frame.jst.hbs +++ b/app/assets/templates/small-frame.jst.hbs @@ -35,11 +35,13 @@ {{/linkToPerson}} {{/if}} + + + {{likes_count}} {{reshares_count}} {{comments_count}} - diff --git a/spec/javascripts/app/pages/profile_spec.js b/spec/javascripts/app/pages/profile_spec.js index 175ed7e78..162dfa26b 100644 --- a/spec/javascripts/app/pages/profile_spec.js +++ b/spec/javascripts/app/pages/profile_spec.js @@ -44,7 +44,7 @@ describe("app.pages.Profile", function(){ // will fix this in the next commit. // spyOn(this.page, "isOwnProfile").andReturn(false) // this.page.render() -// expect(this.page.$("#profile-controls .control").length).toBe(1) +// expect(this.page.$("#follow .control").length).toBe(1) }) })