From 96e18c6a7b63518072b7be16d18e74c5f988268e Mon Sep 17 00:00:00 2001 From: flaburgan Date: Sun, 25 Aug 2013 21:15:05 +0200 Subject: [PATCH] Add aspect modification and fix check icon regression on contacts page, close #4397 --- Changelog.md | 2 ++ app/assets/stylesheets/application.css.sass | 5 +--- app/assets/stylesheets/sidebar.css.scss | 16 ++++++------ app/views/contacts/_aspect_listings.haml | 29 +++++++++++---------- app/views/shared/_contact_sidebar.html.haml | 8 +++--- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5c0838304..5dea98772 100644 --- a/Changelog.md +++ b/Changelog.md @@ -45,6 +45,7 @@ * Fix the overlapping of embedded youtube videos [#2943](https://github.com/diaspora/diaspora/issues/2943) * Fix opacity of control icons [#4414](https://github.com/diaspora/diaspora/issues/4414/) * Add hover state to header icons [#4436](https://github.com/diaspora/diaspora/pull/4436) +* Fix check icon regression on contacts page [#4440](https://github.com/diaspora/diaspora/pull/4440) ## Features * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) @@ -62,6 +63,7 @@ * Remove posts, comments and private conversations from the mobile site. [#4408](https://github.com/diaspora/diaspora/pull/4408) [#4409](https://github.com/diaspora/diaspora/pull/4409) * Added a link to user photos and thumbnails are shown in the left side bar [#4347](https://github.com/diaspora/diaspora/issues/4347) * Rework the single post view +* Add aspect modification on contacts page, close [#4397](https://github.com/diaspora/diaspora/issues/4397) # 0.1.1.0 diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index a98638d40..da1c2fe72 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -1967,6 +1967,7 @@ ul#requested-scopes :width 16px :line-height 16px :text-align center + :float right @include border-radius(4px) :margin-top 1px :color #999 @@ -2063,10 +2064,6 @@ ul.left_nav &:hover @include opacity(1) - a.home_selector - .item_count - :float right - ul.sub_nav :padding :left 25px diff --git a/app/assets/stylesheets/sidebar.css.scss b/app/assets/stylesheets/sidebar.css.scss index 300ae7483..5308de144 100644 --- a/app/assets/stylesheets/sidebar.css.scss +++ b/app/assets/stylesheets/sidebar.css.scss @@ -25,10 +25,10 @@ $bluebg: #e7f2f7; float: left; margin: 0px; margin-right: 10px; - padding: 0px; color: #222222; ul { + margin: 0px; padding: 0px; } @@ -40,7 +40,7 @@ $bluebg: #e7f2f7; .hoverable { display: block; - width: 90%; + margin-right: 6px; padding: 4px; &:hover { @@ -54,12 +54,6 @@ $bluebg: #e7f2f7; overflow: hidden; text-overflow: ellipsis; } -} - -#stream_selection { - & > li { - margin-bottom: 10px; - } .action { width: 12px; @@ -74,6 +68,12 @@ $bluebg: #e7f2f7; } } +#stream_selection { + & > li { + margin-bottom: 10px; + } +} + #aspects_list { .icons-check_yes_ok { height:18px; diff --git a/app/views/contacts/_aspect_listings.haml b/app/views/contacts/_aspect_listings.haml index 120f6bf21..1b479e3a8 100644 --- a/app/views/contacts/_aspect_listings.haml +++ b/app/views/contacts/_aspect_listings.haml @@ -2,36 +2,37 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -%ul#aspect_nav.left_nav +%ul#aspect_nav %li.all_aspects{:class => ("active" if params["set"] != "all" && params["set"] != "only_sharing" && !@spotlight)} - %a.home_selector{:href => contacts_path, :class => ("sub_selected" if params["a_id"])} + %a.home_selector.hoverable{:href => contacts_path, :class => ("sub_selected" if params["a_id"])} = t('contacts.index.my_contacts') .item_count = my_contacts_count - %ul.sub_nav + %ul.sub_nav#aspects_list - all_aspects.each do |aspect| - %li.aspect_element{:data => {:aspect_id => aspect.id}, :class => ("active" if params["a_id"].to_i == aspect.id)} - .icons-check_yes_ok{:class => ("invisible" if params["a_id"].to_i != aspect.id) } - %a.community_aspect_selector{:href => contacts_path(:a_id => aspect.id)} - = aspect + %li.hoverable{:data => {:aspect_id => aspect.id}, :class => ("active" if params["a_id"].to_i == aspect.id)} .item_count = aspect.contacts.size + %a.action.modify_aspect{:href => "/aspects/#{aspect.id}/edit", :rel => "facebox"} + .icons-check_yes_ok{:class => ("selected" if params["a_id"].to_i == aspect.id) } + %a.selectable{:href => contacts_path(:a_id => aspect.id)} + = aspect - %li - = link_to t('aspects.aspect_listings.add_an_aspect'), new_aspect_path, :class => "new_aspect", :rel => "facebox" + %li.hoverable + = link_to t('aspects.aspect_listings.add_an_aspect'), new_aspect_path, :class => "selectable new_aspect", :rel => "facebox" %li.all_contacts{:class => ("active" if params["set"] == "all" || params["set"] == "only_sharing")} - %a.home_selector{:href => contacts_path(:set => "all"), :class => ("sub_selected" if params["set"] == "only_sharing")} + %a.home_selector.hoverable{:href => contacts_path(:set => "all"), :class => ("sub_selected" if params["set"] == "only_sharing")} = t('contacts.index.all_contacts') .item_count = all_contacts_count %ul.sub_nav - %li.aspect_element{:class => ("active" if params["set"] == "only_sharing")} + %li.hoverable{:class => ("active" if params["set"] == "only_sharing")} .icons-check_yes_ok{:class => ("invisible" if params["set"] == "only_sharing")} - %a.community_aspect_selector{:href => contacts_path(:set => "only_sharing")} + %a.selectable{:href => contacts_path(:set => "only_sharing")} = t('contacts.index.only_sharing_with_me') - .item_count - = only_sharing_count + .item_count + = only_sharing_count diff --git a/app/views/shared/_contact_sidebar.html.haml b/app/views/shared/_contact_sidebar.html.haml index 85106b36b..861965e77 100644 --- a/app/views/shared/_contact_sidebar.html.haml +++ b/app/views/shared/_contact_sidebar.html.haml @@ -2,12 +2,12 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span-5.append-1 +#leftNavBar.span-5.append-1 = render 'contacts/aspect_listings' - %hr + - if AppConfig.settings.community_spotlight.enable? + %hr - %ul.left_nav - - if AppConfig.settings.community_spotlight.enable? + %ul.left_nav %li{:class => ("active" if @spotlight)} = link_to t('contacts.spotlight.community_spotlight'), community_spotlight_path, :class => "element_selector"