ChangJoo Park(박창주) ChangJoo Park(박창주) 2013-10-15
Add tooltip sidemenu
@d4be8c3931d0571c6b2e2b6215cdb56e474b0d81
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -528,15 +528,14 @@
             
             li {
                 width:40px;
-                
                 a {
                     .menu-title { 
                         display:none;
                     }
                 }
+
             }
         }
-
     }
 }
 
app/views/projectMenu.scala.html
--- app/views/projectMenu.scala.html
+++ app/views/projectMenu.scala.html
@@ -20,13 +20,14 @@
 <div class="project-menu">
     <ul class="nav project-menu-wrap">
         <li class="@isActiveMenu(MenuType.PROJECT_HOME)">
-            <a href="@routes.ProjectApp.project(project.owner, project.name)">
+            <a href="@routes.ProjectApp.project(project.owner, project.name)" data-toggle="tooltip" title="@Messages("menu.home")" data-placement="right">
                 <i class="yobicon-home"></i>
                 <span class="menu-title">@Messages("title.projectHome")</span>
             </a>
         </li>
+
         <li class="@isActiveMenu(MenuType.BOARD)">
-            <a href="@routes.BoardApp.posts(project.owner, project.name)">
+            <a href="@routes.BoardApp.posts(project.owner, project.name)" data-toggle="tooltip" title="@Messages("menu.board")" data-placement="right" >
                 <i class="yobicon-notes"></i>
                 <span class="menu-title">@Messages("menu.board")</span>
                 @if(Posting.countPostings(project) > 0){
@@ -35,14 +36,14 @@
             </a>
         </li>
         <li class="@isActiveMenu(MenuType.CODE)">
-            <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">
+            <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)" data-toggle="tooltip" title="@Messages("menu.code")" data-placement="right">
                 <i class="yobicon-code"></i>
                 <span class="menu-title">@Messages("menu.code")</span>
             </a>
         </li>
          @if(project.vcs.equals("GIT")){
         <li class="@isActiveMenu(MenuType.PULL_REQUEST)">
-            <a href="@getPullRequestURL(project)">
+            <a href="@getPullRequestURL(project)" data-toggle="tooltip" title="@Messages("menu.pullRequest")" data-placement="right">
                 <i class="yobicon-merge"></i>
                 <span class="menu-title">@Messages("menu.pullRequest")</span>
                 @if(PullRequest.countOpenedPullRequests(project) > 0){
@@ -52,7 +53,7 @@
         </li>
         }
         <li class="@isActiveMenu(MenuType.ISSUE)">
-            <a href="@routes.IssueApp.issues(project.owner, project.name, "open")">
+            <a href="@routes.IssueApp.issues(project.owner, project.name, "open")" data-toggle="tooltip" title="@Messages("menu.issue")" data-placement="right">
                 <i class="yobicon-science"></i>
                 <span class="menu-title">@Messages("menu.issue")</span>
                 @if(Issue.countIssues(project.id, State.OPEN) > 0){
@@ -61,7 +62,7 @@
             </a>
         </li>
         <li class="@isActiveMenu(MenuType.MILESTONE)">
-            <a href="@routes.MilestoneApp.milestones(project.owner, project.name)">
+            <a href="@routes.MilestoneApp.milestones(project.owner, project.name)" data-toggle="tooltip" title="@Messages("milestone")" data-placement="right">
                 <i class="yobicon-tasks"></i>
                 <span class="menu-title">@Messages("milestone")</span>
                 @if(Milestone.countOpened(project) > 0){
@@ -71,7 +72,7 @@
         </li>
         @if(ProjectUser.roleOf(session.get("loginId"), project).equals("manager")){
         <li class="@isActiveMenu(MenuType.PROJECT_SETTING)">
-            <a href="@routes.ProjectApp.settingForm(project.owner, project.name)">
+            <a href="@routes.ProjectApp.settingForm(project.owner, project.name)" data-toggle="tooltip" title="@Messages("menu.admin")" data-placement="right">
                 <i class="yobicon-websitebuilder"></i>
                 <span class="menu-title">@Messages("menu.admin")</span>
                 @if(project.enrolledUsers.size > 0){
public/javascripts/service/yobi.project.Global.js
--- public/javascripts/service/yobi.project.Global.js
+++ public/javascripts/service/yobi.project.Global.js
@@ -56,6 +56,7 @@
             htElement.weBtnHeaderToggle = $('.project-header-toggle-btn');
             // 프로젝트 페이지에서만.
             
+            htElement.weSideMenu = $('.project-menu-wrap li a');
         }
 
         /**
@@ -65,10 +66,7 @@
         function _attachEvent() {
             htElement.welBtnWatch.on('click',_onClickBtnWatch);
             htElement.welBtnEnroll.on('click',_onClickBtnEnroll);
-            
-            htElement.welBtnMenuToggle.on('click', function(){
-                htElement.welPageWrap.toggleClass('mini');
-            });
+            htElement.welBtnMenuToggle.on('click', _onClickBtnMenuToggle);
             // 내용은 data-content 속성으로 scala 파일 내에 있음.
             htElement.welForkedFrom.popover({
                 "html"   : true
@@ -130,6 +128,20 @@
         }
 
         /**
+         * MenuToggle 버튼 클릭시 이벤트 핸들러
+         * @param {Wrapped Event} weEvt
+         */
+        function _onClickBtnMenuToggle(weEvt){
+            if(htElement.welPageWrap.hasClass('mini')){
+                htElement.welPageWrap.removeClass('mini');
+                htElement.weSideMenu.tooltip('disable');
+            }else{
+                htElement.welPageWrap.addClass('mini');
+                htElement.weSideMenu.tooltip('enable');
+            }            
+        }
+
+        /**
          * 프로젝트 전역 공통 단축키
          * @param {Hash Table} htKeyMap
          * @require yobi.ShortcutKey
Add a comment
List