doortts doortts 2018-10-23
mention: Change rendered mention css style
@457680ff59e9aeef784191929b6c23b0ab4fd914
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -2937,10 +2937,6 @@
                     }
                 }
                 .one-line-comment {
-                    :hover {
-                       background-color: #f1f1f1;
-                    }
-
                     .contents {
                         text-align: left;
                         margin-left: 12px;
@@ -6639,6 +6635,37 @@
   text-decoration: none !important;
 }
 
+.user-link {
+    -webkit-font-smoothing: antialiased;
+    -webkit-text-size-adjust: 100%;
+    -webkit-font-feature-settings: "kern" 1;
+    -moz-font-feature-settings: "kern" 1;
+    -o-font-feature-settings: "kern" 1;
+    font-feature-settings: "kern" 1;
+    font-kerning: normal;
+    border: 1px solid #4FC3F7;
+    border-radius: 3px;
+    margin-right: 3px;
+    padding-left: 2px;
+    padding-right: 2px;
+    background-color: #4FC3F7;
+    color: white;
+
+    &.me {
+        background-color: #4FC3F7;
+    }
+
+    &:hover {
+        color: black;
+        background-color: #4FC3F7 !important;
+    }
+
+    span {
+        font-weight: 600;
+        color: white;
+    }
+}
+
 .ago-date {
   vertical-align: middle;
 }
app/models/User.java
--- app/models/User.java
+++ app/models/User.java
@@ -1076,7 +1076,7 @@
                 pureName = this.name;
             }
             if (pureName.contains(spliter)) {
-                pureName = this.name.substring(0, this.name.indexOf(spliter));
+                pureName = this.name.substring(0, this.name.indexOf(spliter)).trim();
             }
         }
 
app/utils/AutoLinkRenderer.java
--- app/utils/AutoLinkRenderer.java
+++ app/utils/AutoLinkRenderer.java
@@ -1,23 +1,10 @@
 /**
- * Yobi, Project Hosting SW
- *
- * Copyright 2014 NAVER Corp.
- * http://yobi.io
- *
- * @author Changgun Kim
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ * Yona, 21st Century Project Hosting SW
+ * <p>
+ * Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp.
+ * https://yona.io
+ **/
+
 package utils;
 
 import controllers.UserApp;
@@ -338,7 +325,7 @@
                 userName = user.getPureNameOnly(lang);
             }
 
-            return new Link(RouteUtil.getUrl(user), "no-text-decoration", "<span data-toggle='popover' data-placement='top' data-trigger='hover' data-html='true' data-content=\"" + StringEscapeUtils.escapeHtml4(avatarImage + user.name + " " + user.loginId) + "\">@" + userName + "</span>");
+            return new Link(RouteUtil.getUrl(user), "no-text-decoration user-link", "<span data-toggle='popover' data-placement='top' data-trigger='hover' data-html='true' data-content=\"" + StringEscapeUtils.escapeHtml4(avatarImage + user.name + " " + user.loginId) + "\">@" + userName + "</span>");
         }
     }
 
Add a comment
List