[Notice] Announcing the End of Demo Server [Read me]
doortts doortts 2018-12-11
sidebar: Modify margin and add selected ux
@f5b794411e43ec969e0216b395d14784a5df71a6
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -38,7 +38,7 @@
 
         .active {
             a {
-                color: white;
+                color: #f36c22;
                 background-color: black;
                 border: none;
             }
@@ -122,11 +122,15 @@
 }
 
 .pin {
-    position: fixed;
+    position: absolute;
     display: inline-block;
     left: -2px;
     top: 9px;
     border: 1px solid #666;
+
+    .yobicon-arrow-right {
+        padding: 4px 2px;
+    }
 }
 
 .gnb-inner {
app/assets/stylesheets/less/_usermenu.less
--- app/assets/stylesheets/less/_usermenu.less
+++ app/assets/stylesheets/less/_usermenu.less
@@ -91,10 +91,6 @@
   .user-li {
     cursor: pointer;
 
-    &:hover {
-      background-color: rgba(255, 255, 255, 0.15);
-    }
-
     .popover {
       word-wrap: break-word;
       min-width: 200px;
@@ -211,7 +207,7 @@
     width:0;
     bottom:1px;
     position:absolute;
-    background: @orange;
+    background: #1976d2;
     transition:0.2s ease all;
   }
   .bar:before {
@@ -323,14 +319,13 @@
   }
 
   .starred {
-    color: #e91e63;
+    color: rgba(255, 255, 255, 0.85);
   }
 
   .star-project, .star-org {
     width: 29px;
     min-height: 26px;
     flex-shrink: 0;
-    color: #eee;
 
     &:hover {
       color: #e91e63;
@@ -368,13 +363,7 @@
   }
 
   .selected {
-    border-radius: 5px;
-    background-color: #9C27B0;
-    color: #fafafa;
-    padding: 3px 7px;
-    margin-right: 5px;
-    line-height: 25px;
-    z-index: 999;
+    background-color: rgba(255, 255, 255, 0.15);
   }
 
   .additional-help{
@@ -403,18 +392,19 @@
   }
 
   .site-logo {
-    width: 45px;
+    width: 26px;
     text-align: center;
     margin-left: 2px;
-    margin-right: -2px;
     padding-top: 3px;
     overflow: hidden;
     flex-shrink: 0;
+
     img {
-      width: 24px;
+      width: 16px;
       border-radius: 3px;
-      margin-right: 3px;
+      margin-right: 0;
       height: auto;
+      vertical-align: text-top;
     }
   }
 
public/javascripts/common/yona.Usermenu.js
--- public/javascripts/common/yona.Usermenu.js
+++ public/javascripts/common/yona.Usermenu.js
@@ -115,7 +115,6 @@
                         that.find('i').addClass("starred");
                     } else {
                         that.find('i').removeClass("starred");
-                        removeIfNotFavoriteProject(that);
                     }
                 })
                 .fail(function (data) {
@@ -132,7 +131,6 @@
                         that.find('i').addClass("starred");
                     } else {
                         that.find('i').removeClass("starred");
-                        removeIfNotFavoriteProject(that);
                     }
                     $yobi.notify(Messages(data.message), 3000);
                 })
@@ -141,25 +139,6 @@
                 });
 
         });
-
-
-        function removeIfNotFavoriteProject(that) {
-            var $recentlyVisited = $('.user-li');
-            var lastFavoriteItemIndex = $recentlyVisited.index($(".favored"));
-            var currentItemIndex = $recentlyVisited.index(that.parent(".project-list").parent());
-            if (lastFavoriteItemIndex < currentItemIndex) {
-                that.parent(".project-list").remove();
-            }
-        }
-
-        function removeIfNotFavoriteIssue(that) {
-            var $recentlyVisited = $('.user-li');
-            var lastFavoriteItemIndex = $recentlyVisited.index($(".favored"));
-            var currentItemIndex = $recentlyVisited.index(that.parent(".issue-list").parent());
-            if (lastFavoriteItemIndex < currentItemIndex) {
-                that.parent(".issue-list").remove();
-            }
-        }
 
         $(".user-ul > .user-li, .project-ul > .user-li").on("click", function (e) {
             e.preventDefault();
@@ -170,6 +149,9 @@
             } else {
                 window.open(location, 'mainFrame');
             }
+
+            $(".user-ul > .user-li, .project-ul > .user-li").removeClass("selected");
+            $(this).addClass("selected");
         });
 
       $(".org-list > .star-org").on("click", function toggleOrgFavorite(e) {
Add a comment
List