project-info: Remove project label feature
It is easy to make bugs and (IMHO) it is not so useful in these days. So I thought it would be better to remove that feature. See: Yona Github issues #122 #93
@133a42e60a03ac0634b236bc3e2f4528a6e890fb
--- app/views/project/home.scala.html
+++ app/views/project/home.scala.html
... | ... | @@ -137,47 +137,6 @@ |
137 | 137 |
} |
138 | 138 |
} |
139 | 139 |
} |
140 |
- |
|
141 |
- <div class="inner project-info"> |
|
142 |
- <header> |
|
143 |
- <h3>@Messages("project.info")</h3> |
|
144 |
- @if(isAllowed(UserApp.currentUser(), project.labelsAsResource(), Operation.UPDATE)){ |
|
145 |
- <button type="button" class="ybtn ybtn-minimum" data-toggle="button" id="label-editor-toggle"><i class="yobicon-edit"></i> @Messages("button.edit")</button> |
|
146 |
- } |
|
147 |
- </header> |
|
148 |
- <ul class="infos" id="label-board"> |
|
149 |
- <!-- labels are added here by yobi.project.Home.js --> |
|
150 |
- </ul> |
|
151 |
- |
|
152 |
- <script id="label-delete-button-template" type="text/x-jquery-tmpl"> |
|
153 |
- <a href="javascript:void(0)">×</a> |
|
154 |
- </script> |
|
155 |
- |
|
156 |
- <script id="label-template" type="text/x-jquery-tmpl"> |
|
157 |
- <span class="label">${name}</span> |
|
158 |
- </script> |
|
159 |
- |
|
160 |
- <script id="category-template" type="text/x-jquery-tmpl"> |
|
161 |
- <li class="info" data-category="${category}"> |
|
162 |
- <strong>${category} : </strong> |
|
163 |
- <span class="label-list"></span> |
|
164 |
- </li> |
|
165 |
- </script> |
|
166 |
- |
|
167 |
- <script id="plus-button-template" type="text/x-jquery-tmpl"> |
|
168 |
- <button class="ybtn ybtn-minimum"> |
|
169 |
- <i class="yobicon-plus"></i> |
|
170 |
- </button> |
|
171 |
- </script> |
|
172 |
- |
|
173 |
- <script id="label-input-template" type="text/x-jquery-tmpl"> |
|
174 |
- <input type="text" autocomplete="off" class="text" style="margin-bottom: 0px;"> |
|
175 |
- </script> |
|
176 |
- |
|
177 |
- <script id="label-submit-template" type="text/x-jquery-tmpl"> |
|
178 |
- <button type="button" class="ybtn ybtn-mini">@Messages("button.add")</button> |
|
179 |
- </script> |
|
180 |
- </div> |
|
181 | 140 |
<div class="inner member-info"> |
182 | 141 |
<header> |
183 | 142 |
<h3>@Messages("project.members")</h3> |
--- public/javascripts/service/yobi.project.Home.js
+++ public/javascripts/service/yobi.project.Home.js
... | ... | @@ -31,7 +31,6 @@ |
31 | 31 |
_initVar(htOpt); |
32 | 32 |
_initElement(htOptions); |
33 | 33 |
_attachEvent(); |
34 |
- _initLabels(); |
|
35 | 34 |
|
36 | 35 |
// _resizeProjectInfo(); |
37 | 36 |
} |
... | ... | @@ -60,50 +59,7 @@ |
60 | 59 |
htElement.welInputCloneURL =$('#cloneURL'); |
61 | 60 |
htElement.welBtnCopy = $('#cloneURLBtn'); |
62 | 61 |
|
63 |
- // project label |
|
64 |
- htElement.welLabelBoard = htOptions.welLabelBoard; |
|
65 |
- htElement.welLabelEditorToggle = htOptions.welLabelEditorToggle; |
|
66 |
- |
|
67 |
- htElement.welInputCategory = $('#label-input-template').tmpl(); |
|
68 |
- htElement.welSubmitCategory = $('#label-submit-template').tmpl(); |
|
69 |
- htElement.welInputCategory.attr('placeholder', Messages('label.addNewCategory')); |
|
70 |
- htElement.welInputCategory.keypress(_onKeyPressNewCategory); |
|
71 |
- htElement.welSubmitCategory.click(_onClickNewCategory); |
|
72 |
- |
|
73 |
- htElement.welInputLabel = $('#label-input-template').tmpl(); |
|
74 |
- htElement.welSubmitLabel = $('#label-submit-template').tmpl(); |
|
75 |
- htElement.welInputLabel.keypress(_onKeyPressNewLabel); |
|
76 |
- htElement.welInputLabel.attr('placeholder', Messages('label.new')); |
|
77 |
- htElement.welSubmitLabel.click(_submitLabel); |
|
78 |
- |
|
79 |
- htElement.welInputLabelBox = $('<p>') |
|
80 |
- .append(htElement.welInputLabel) |
|
81 |
- .append(htElement.welSubmitLabel); |
|
82 |
- |
|
83 |
- htElement.welInputCategoryBox = $('<p>') |
|
84 |
- .append(htElement.welInputCategory) |
|
85 |
- .append(htElement.welSubmitCategory); |
|
86 |
- |
|
87 |
- htElement.welBtnPlusLabel = welBtnPlus.clone(); |
|
88 |
- htElement.welBtnPlusCategory = welBtnPlus.clone(); |
|
89 |
- |
|
90 |
- htElement.aLabel = []; |
|
91 |
- htElement.htCategory = {}; |
|
92 |
- htElement.aBtnPlusLabel = []; |
|
93 |
- |
|
94 |
- htElement.welNewCategory = $('<li>') |
|
95 |
- .append(htElement.welBtnPlusCategory); |
|
96 |
- |
|
97 |
- htElement.welLabelBoard.append(htElement.welNewCategory); |
|
98 |
- |
|
99 | 62 |
htElement.welAlertLeave = $("#alertLeave"); |
100 |
- |
|
101 |
- /* |
|
102 |
- htElement.welHome = $(".project-home"); |
|
103 |
- htElement.welHomeLogo = htElement.welHome.find(".logo"); |
|
104 |
- htElement.welHomeInfo = htElement.welHome.find(".project-info"); |
|
105 |
- htElement.welHomeMember = htElement.welHome.find(".member-info"); |
|
106 |
- */ |
|
107 | 63 |
} |
108 | 64 |
|
109 | 65 |
/** |
... | ... | @@ -111,29 +67,6 @@ |
111 | 67 |
*/ |
112 | 68 |
function _attachEvent(){ |
113 | 69 |
htElement.welRepoURL.click(_onClickRepoURL); |
114 |
- htElement.welLabelEditorToggle.on('click', function() { |
|
115 |
- if ($(this).hasClass('active')) { |
|
116 |
- // Now inactive |
|
117 |
- $(this).removeClass('active'); |
|
118 |
- $(this).text(Messages("button.edit")); |
|
119 |
- _hideLabelEditor(); |
|
120 |
- } else { |
|
121 |
- // Now active |
|
122 |
- $(this).addClass('active'); |
|
123 |
- $(this).text(Messages("button.done")); |
|
124 |
- _showLabelEditor(); |
|
125 |
- } |
|
126 |
- }); |
|
127 |
- |
|
128 |
- new yobi.ui.Typeahead(htElement.welInputCategory, { |
|
129 |
- "sActionURL": htVar.sURLLabelCategories, |
|
130 |
- "htData": { |
|
131 |
- "project_id": htVar.nProjectId, |
|
132 |
- "limit": 8 |
|
133 |
- } |
|
134 |
- }); |
|
135 |
- |
|
136 |
- htElement.welBtnPlusCategory.click(_onClickPlusCategory); |
|
137 | 70 |
|
138 | 71 |
htElement.welBtnCopy.zclip({ |
139 | 72 |
"path": htVar.sURLZeroClipboard, |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?