Jihan Kim 2014-02-11
Label: import issueLabel relative scripts only in required pages
@d2f345b4f7c12709f3b2f4dcc5dc0887327bc7ff
 
app/views/common/issueLabel.scala.html (added)
+++ app/views/common/issueLabel.scala.html
@@ -0,0 +1,49 @@
+@**
+* Yobi, Project Hosting SW
+*
+* Copyright 2013 NAVER Corp.
+* http://yobi.io
+*
+* @Author Jihan 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.
+**@
+@()
+<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Label.js")"></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.LabelEditor.js")"></script>
+
+@**<!-- yobi.LabelEditor -->**@
+<script type="text/x-jquery-tmpl" id="tplYobiLabelEditor">
+<div class="control-group label-editor">
+    <strong class="control-label">${labelNew}</strong>
+    <div id="custom-label" class="controls mt5">
+        <div class="row-fluid">
+            <div>
+                <input type="text" name="labelCategory" class="input-small labelInput" data-provider="typeahead" autocomplete="off" placeholder="${labelCategory}">
+            </div>
+            <div>
+                <input type="text" name="labelName" class="input-small labelInput" placeholder="${labelName}" autocomplete="off">
+            </div>
+        </div>
+        <div class="row-fluid colors-wrap">
+            <div class="colors"></div>
+            <div class="colorInput">
+                <input type="text" name="labelColor" class="input-small labelInput labelColor" placeholder="${labelCustomColor}">
+            </div>
+        </div>
+        <div class="row-fluid mt5">
+            <div class="span12"><button type="button" class="ybtn ybtn-default labelSubmit">${labelAdd}</button></div>
+        </div>
+    </div></div>
+</script>
+@**<!-- // yobi.LabelEditor -->**@
app/views/common/scripts.scala.html
--- app/views/common/scripts.scala.html
+++ app/views/common/scripts.scala.html
@@ -32,32 +32,6 @@
 </div>
 @**<!-- //yobi.ui.Spinner -->**@
 
-@**<!-- yobi.LabelEditor -->**@
-<script type="text/x-jquery-tmpl" id="tplYobiLabelEditor">
-<div class="control-group label-editor">
-    <strong class="control-label">${labelNew}</strong>
-    <div id="custom-label" class="controls mt5">
-        <div class="row-fluid">
-            <div>
-                <input type="text" name="labelCategory" class="input-small labelInput" data-provider="typeahead" autocomplete="off" placeholder="${labelCategory}">
-            </div>
-            <div>
-                <input type="text" name="labelName" class="input-small labelInput" placeholder="${labelName}" autocomplete="off">
-            </div>
-        </div>
-        <div class="row-fluid colors-wrap">
-            <div class="colors"></div>
-            <div class="colorInput">
-                <input type="text" name="labelColor" class="input-small labelInput labelColor" placeholder="${labelCustomColor}">
-            </div>
-        </div>
-        <div class="row-fluid mt5">
-            <div class="span12"><button type="button" class="ybtn ybtn-default labelSubmit">${labelAdd}</button></div>
-        </div>
-    </div></div>
-</script>
-@**<!-- // yobi.LabelEditor -->**@
-
 <script type="text/javascript" src="@routes.Application.jsMessages()"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.tmpl.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/jquery/jquery.form.js")"></script>
@@ -74,8 +48,6 @@
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/spin.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Attachments.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Files.js")"></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Label.js")"></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.LabelEditor.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Mention.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Markdown.js")"></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/common/yobi.Pagination.js")"></script>
app/views/issue/create.scala.html
--- app/views/issue/create.scala.html
+++ app/views/issue/create.scala.html
@@ -134,11 +134,9 @@
 </div>
 
 @common.markdown(project)
+@common.issueLabel()
 
 <link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/mentionjs/mention.css")">
-<script id="tplRelIssue" type="text/x-jquery-tmpl">
-<li class="issue-item"><a href="${link}" class="title-link" target="_blank"><strong class="issue-id">#${id}</strong> ${title}</a><span class="date">${date}</span></li>
-</script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/mentionjs/mention.js")"></script>
 <script type="text/javascript">
 	$(document).ready(function(){
app/views/issue/edit.scala.html
--- app/views/issue/edit.scala.html
+++ app/views/issue/edit.scala.html
@@ -160,11 +160,9 @@
 </div>
 
 @common.markdown(project)
+@common.issueLabel()
 
 <link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/mentionjs/mention.css")">
-<script type="text/x-jquery-tmpl" id="tplRelIssue">
-<li class="issue-item"><a href="${link}" class="title-link" target="_blank"><strong class="issue-id">#${id}</strong> ${title}</a><span class="date">${date}</span></li>
-</script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/mentionjs/mention.js")"></script>
 <script type="text/javascript">
     $(document).ready(function(){
app/views/issue/partial_search.scala.html
--- app/views/issue/partial_search.scala.html
+++ app/views/issue/partial_search.scala.html
@@ -217,6 +217,9 @@
             @help.keymap("issueList", project)
         }
         </div>
+
+        @common.issueLabel()
+
 		<script type="text/javascript">
 			$(document).ready(function(){
 
app/views/issue/view.scala.html
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
@@ -262,6 +262,7 @@
 </div>
 
 @common.markdown(project)
+@common.issueLabel()
 
 <link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/mentionjs/mention.css")">
 <script type="text/javascript" src="@routes.Assets.at("javascripts/lib/mentionjs/mention.js")"></script>
@@ -302,8 +303,5 @@
             url : "@Html(routes.ProjectApp.mentionList(project.owner, project.name, issue.getNumber, issue.asResource().getType().resource()).toString())"
         });
     });
-
-
 </script>
-
 }
Add a comment
List