[Notice] Announcing the End of Demo Server [Read me]

project delete form departed from project setting (HIVE-36)
@3a6ae092be8114a59476fe663591f80f048dbc83
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -1435,6 +1435,8 @@ |
1435 | 1435 |
.box-wrap { |
1436 | 1436 |
border-bottom: 1px solid #E9E9E9; |
1437 | 1437 |
padding: 0 20px; |
1438 |
+ &:last-of-type { border-bottom:none; } |
|
1439 |
+ |
|
1438 | 1440 |
&.top { |
1439 | 1441 |
padding-bottom: 20px; |
1440 | 1442 |
} |
... | ... | @@ -1479,7 +1481,7 @@ |
1479 | 1481 |
width: 380px; |
1480 | 1482 |
} |
1481 | 1483 |
.textarea { |
1482 |
- height: 111px; |
|
1484 |
+ height: 70px; /*111px;*/ |
|
1483 | 1485 |
margin-bottom: 0; |
1484 | 1486 |
resize:vertical; |
1485 | 1487 |
} |
... | ... | @@ -1495,7 +1497,7 @@ |
1495 | 1497 |
position: absolute; |
1496 | 1498 |
left: -5px; |
1497 | 1499 |
top: -2px; |
1498 |
- .opacity(0); |
|
1500 |
+ .opacity(0.5); |
|
1499 | 1501 |
} |
1500 | 1502 |
} |
1501 | 1503 |
|
... | ... | @@ -2243,7 +2245,7 @@ |
2243 | 2245 |
width: 45px; |
2244 | 2246 |
}*/ |
2245 | 2247 |
.attach-info-wrap { |
2246 |
- width: 707px; /*715px;*/ |
|
2248 |
+ width: 657px; /*715px;*/ |
|
2247 | 2249 |
font-size: 11px; |
2248 | 2250 |
/*opacity:0; |
2249 | 2251 |
-webkit-transition-duration:0.3s; |
... | ... | @@ -2267,7 +2269,7 @@ |
2267 | 2269 |
} |
2268 | 2270 |
} |
2269 | 2271 |
.btn-wrap { |
2270 |
- width: 88px; /*80px*/ |
|
2272 |
+ width: 138px; /*80px*/ |
|
2271 | 2273 |
text-align: right; |
2272 | 2274 |
} |
2273 | 2275 |
} |
... | ... | @@ -2356,10 +2358,12 @@ |
2356 | 2358 |
.option { |
2357 | 2359 |
width:250px; |
2358 | 2360 |
.inline-block; |
2359 |
- .option-label { color:#959595; font-weight:bold; margin-bottom:5px; } |
|
2361 |
+ /*.option-label { color:#959595; font-weight:bold; margin-bottom:5px; }*/ |
|
2360 | 2362 |
.d-label { width:200px; } |
2361 | 2363 |
} |
2362 | 2364 |
} |
2365 |
+ |
|
2366 |
+ .option-label { color:#959595; font-weight:bold; margin-bottom:5px; } |
|
2363 | 2367 |
} |
2364 | 2368 |
.content-footer { |
2365 | 2369 |
padding: 20px; |
--- app/controllers/ProjectApp.java
+++ app/controllers/ProjectApp.java
... | ... | @@ -164,6 +164,16 @@ |
164 | 164 |
return isImageFile; |
165 | 165 |
} |
166 | 166 |
|
167 |
+ public static Result deleteForm(String userName, String projectName) { |
|
168 |
+ Project project = getProject(userName, projectName); |
|
169 |
+ if (!AccessControl.isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
170 |
+ return unauthorized(views.html.project.unauthorized.render(project)); |
|
171 |
+ } |
|
172 |
+ |
|
173 |
+ Form<Project> projectForm = form(Project.class).fill(project); |
|
174 |
+ return ok(projectDelete.render("title.projectSetting", projectForm, project)); |
|
175 |
+ } |
|
176 |
+ |
|
167 | 177 |
public static Result deleteProject(String userName, String projectName) throws Exception { |
168 | 178 |
Project project = getProject(userName, projectName); |
169 | 179 |
|
--- app/views/issue/editIssue.scala.html
+++ app/views/issue/editIssue.scala.html
... | ... | @@ -59,8 +59,11 @@ |
59 | 59 |
</div> |
60 | 60 |
|
61 | 61 |
<div class="btn-wrap"> |
62 |
- <div class="ns-btn fake-file-wrap"> |
|
63 |
- <i class="ico ico-plus-blue"></i>@Messages("button.upload") <input type="file" class="file" name="filePath"> |
|
62 |
+ <div class="fake-file-wrap"> |
|
63 |
+ <input type="file" class="file" name="filePath"> |
|
64 |
+ <div class="ns-btn"> |
|
65 |
+ <i class="ico ico-plus-blue"></i>@Messages("button.upload") |
|
66 |
+ </div> |
|
64 | 67 |
</div> |
65 | 68 |
</div> |
66 | 69 |
</div> |
... | ... | @@ -164,6 +167,7 @@ |
164 | 167 |
**@ |
165 | 168 |
|
166 | 169 |
<!-- issue.label js module appends a label selector here. --> |
170 |
+ <p class="option-label">@Messages("label.select")</p> |
|
167 | 171 |
<fieldset class="labels"></fieldset> |
168 | 172 |
|
169 | 173 |
<div class="actions"> |
+++ app/views/project/projectDelete.scala.html
... | ... | @@ -0,0 +1,46 @@ |
1 | +@(message: String)(projectForm: Form[Project], project:Project) | |
2 | + | |
3 | +@import helper._ | |
4 | +@import utils.TemplateHelper._ | |
5 | + | |
6 | +@projectMngMain(message, project) { | |
7 | + @prjmenu(project, utils.MenuType.PROJECT_SETTING, "") | |
8 | + | |
9 | + <div class="bubble-wrap gray wp"> | |
10 | + <div class="cu-label">@Messages("project.delete")</div> | |
11 | + <div class="cu-desc"> | |
12 | + <p><strong class="notice">@Messages("project.delete.description")</strong></p> | |
13 | + <p> | |
14 | + <input type="checkbox" class="checkbox" autocomplete="off" id="accept"><!-- | |
15 | + --><label for="accept" class="bg-checkbox label-agreement">@Messages("project.delete.accept")</label> | |
16 | + </p> | |
17 | + </div> | |
18 | + </div> | |
19 | + <div class="box-wrap bottom"> | |
20 | + <a id="deletion" data-toggle="modal" href="#alertDeletion" class="n-btn orange med"><!-- | |
21 | + --><i class="ico ico-delete-small"></i>@Messages("project.delete.this")</a> | |
22 | + </div> | |
23 | + | |
24 | + | |
25 | + <div class="modal hide" id="alertDeletion"> | |
26 | + <div class="modal-header"> | |
27 | + <button type="button" class="close" data-dismiss="modal">×</button> | |
28 | + <h3>@Messages("project.delete.requestion")</h3> | |
29 | + </div> | |
30 | + <div class="modal-body"> | |
31 | + <p> @Messages("project.delete.description")</p> | |
32 | + <p> @Messages("project.delete.reaccept") </p> | |
33 | + </div> | |
34 | + <div class="modal-footer"> | |
35 | + <a href="#" class="btn" data-dismiss="modal">@Messages("button.no")</a> | |
36 | + <a href="@routes.ProjectApp.deleteProject(project.owner, project.name)" class="btn btn-danger">@Messages("button.yes")</a> | |
37 | + </div> | |
38 | + </div> | |
39 | + | |
40 | + <script type="text/javascript"> | |
41 | + $(document).ready(function(){ | |
42 | + $hive.loadModule("project.Delete"); | |
43 | + }); | |
44 | + </script> | |
45 | + | |
46 | +} |
--- app/views/project/setting.scala.html
+++ app/views/project/setting.scala.html
... | ... | @@ -7,110 +7,85 @@ |
7 | 7 |
@projectMngMain(message, project) { |
8 | 8 |
@prjmenu(project, utils.MenuType.PROJECT_SETTING, "") |
9 | 9 |
|
10 |
+ @form(action=routes.ProjectApp.settingProject(project.owner, project.name), 'id->"saveSetting" , 'enctype->"multipart/form-data", 'class->"nm"){ |
|
10 | 11 |
<div class="bubble-wrap gray"> |
11 |
- @form(action=routes.ProjectApp.settingProject(project.owner, project.name), 'id->"saveSetting" , 'enctype->"multipart/form-data", 'class->"nm"){ |
|
12 |
- <input type="hidden" name="id" value="@projectForm("id").value.toLong"> |
|
13 |
- <div class="box-wrap top clearfix frm-wrap"> |
|
14 |
- <div class="setting-box left"> |
|
15 |
- <div class="logo-wrap"> |
|
16 |
- <img src="@defining(Attachment.findByContainer(project.asResource)) @{ files => |
|
17 |
- if (files.size > 0) "/files/" + files.head.id |
|
18 |
- else routes.Assets.at("images/bg-default-project.jpg") }" alt="project-logo"> |
|
19 |
- </div> |
|
20 |
- <div class="logo-desc"> |
|
21 |
- <ul class="unstyled descs"> |
|
22 |
- <li><strong>@Messages("project.logo")</strong></li> |
|
23 |
- <li>@Messages("project.logo.type") <span class="point">bmp, jpg, gif, png</span></li> |
|
24 |
- <li>@Messages("project.logo.maxFileSize") <span class="point">1MB</span></li> |
|
25 |
- <li>@Messages("project.logo.size") <span class="point">234px × 168px</span></li> |
|
26 |
- <li> |
|
27 |
- <div class="ns-btn fake-file-wrap"><i class="ico ico-plus-blue"></i>@Messages("button.upload") |
|
28 |
- <input type="file" class="file" name="logoPath"> |
|
29 |
- </div> |
|
30 |
- </li> |
|
31 |
- </ul> |
|
32 |
- </div> |
|
12 |
+ <input type="hidden" name="id" value="@projectForm("id").value.toLong"> |
|
13 |
+ <div class="box-wrap top clearfix frm-wrap"> |
|
14 |
+ <div class="setting-box left"> |
|
15 |
+ <div class="logo-wrap"> |
|
16 |
+ <img src="@defining(Attachment.findByContainer(project.asResource)) @{ files => |
|
17 |
+ if (files.size > 0) "/files/" + files.head.id |
|
18 |
+ else routes.Assets.at("images/bg-default-project.jpg") }"> |
|
33 | 19 |
</div> |
34 |
- <dl class="setting-box right"> |
|
35 |
- <dt> |
|
36 |
- <div class="n-alert hide" id="alert_msg"> |
|
37 |
- <div class="n-inner"> |
|
38 |
- <span class="msg">@Messages("project.wrongName")</span> |
|
39 |
- <a href="#" class="ico btn-delete" data-dismiss="alert"></a> |
|
40 |
- </div> |
|
41 |
- </div> |
|
42 |
- <label for="project-name">@Messages("project.name.placeholder")</label> |
|
43 |
- </dt> |
|
44 |
- <dd> |
|
45 |
- @inputText(projectForm("name"), 'class->"text", 'maxlength -> "250") |
|
46 |
- </dd> |
|
47 |
- |
|
48 |
- <dt> |
|
49 |
- <label for="project-desc">@Messages("project.description.placeholder")</label> |
|
50 |
- </dt> |
|
51 |
- <dd> |
|
52 |
- @textarea(projectForm("overview"), 'class->"textarea") |
|
53 |
- </dd> |
|
54 |
- </dl> |
|
55 |
- </div> |
|
56 |
- <div class="box-wrap middle"> |
|
57 |
- <div class="cu-label">@Messages("project.tags")</div> |
|
58 |
- <div class="cu-desc"> |
|
59 |
- <div id="tags"> |
|
60 |
- <!-- tags will be added here by hive.project.Settings.js --> |
|
61 |
- </div> |
|
62 |
- <input name="newTag" type="text" class="text" style="margin-bottom: 0px" |
|
63 |
- data-provider="typeahead" autocomplete="off"/> |
|
64 |
- <a href="javascript:void(0)" class="n-btn small orange" id="addTag">@Messages("button.add")</a> |
|
20 |
+ <div class="logo-desc"> |
|
21 |
+ <ul class="unstyled descs"> |
|
22 |
+ <li><strong>@Messages("project.logo")</strong></li> |
|
23 |
+ <li>@Messages("project.logo.type") <span class="point">bmp, jpg, gif, png</span></li> |
|
24 |
+ <li>@Messages("project.logo.maxFileSize") <span class="point">1MB</span></li> |
|
25 |
+ <li>@Messages("project.logo.size") <span class="point">234px × 168px</span></li> |
|
26 |
+ <li> |
|
27 |
+ <div class="ns-btn fake-file-wrap"> |
|
28 |
+ <i class="ico ico-plus-blue"></i>@Messages("button.upload") |
|
29 |
+ <input type="file" class="file" name="logoPath" accept="image/*"> |
|
30 |
+ </div> |
|
31 |
+ </li> |
|
32 |
+ </ul> |
|
65 | 33 |
</div> |
66 | 34 |
</div> |
67 |
- <div class="box-wrap middle"> |
|
68 |
- <div class="cu-label">@Messages("project.shareOption")</div> |
|
69 |
- <div class="cu-desc"> |
|
70 |
- <input name="share_option" type="radio" @if(project.share_option == true){checked="checked"} id="public" value="true" class="radio-btn"><label for="public" class="bg-radiobtn label-public">@Messages("project.public")</label> |
|
71 |
- <input name="share_option" type="radio" @if(project.share_option == false){checked="checked"} id="private" value="false" class="radio-btn"><label for="private" class="bg-radiobtn label-private">@Messages("project.private")</label> |
|
72 |
- <span class="note">@Messages("project.private.notice")</span> |
|
35 |
+ <dl class="setting-box right"> |
|
36 |
+ <dt> |
|
37 |
+ <!-- |
|
38 |
+ <div class="n-alert hide" id="alert_msg"> |
|
39 |
+ <div class="n-inner"> |
|
40 |
+ <span class="msg">@Messages("project.wrongName")</span> |
|
41 |
+ <a href="#" class="ico btn-delete" data-dismiss="alert"></a> |
|
42 |
+ </div> |
|
43 |
+ </div> |
|
44 |
+ --> |
|
45 |
+ <label for="project-name">@Messages("project.name.placeholder")</label> |
|
46 |
+ </dt> |
|
47 |
+ <dd> |
|
48 |
+ @inputText(projectForm("name"), 'class->"text", 'maxlength -> "250") |
|
49 |
+ </dd> |
|
50 |
+ |
|
51 |
+ <dt> |
|
52 |
+ <label for="project-desc">@Messages("project.description.placeholder")</label> |
|
53 |
+ </dt> |
|
54 |
+ <dd> |
|
55 |
+ @textarea(projectForm("overview"), 'class->"textarea") |
|
56 |
+ </dd> |
|
57 |
+ </dl> |
|
58 |
+ </div> |
|
59 |
+ <div class="box-wrap middle"> |
|
60 |
+ <div class="cu-label" style="line-height:30px;">@Messages("project.tags")</div> |
|
61 |
+ <div class="cu-desc"> |
|
62 |
+ <div id="tags"> |
|
63 |
+ <!-- tags will be added here by hive.project.Settings.js --> |
|
73 | 64 |
</div> |
74 |
- </div> |
|
75 |
- <div class="box-wrap bottom"> |
|
76 |
- <button class="btn-transparent n-btn orange med" type="submit" id="save">@Messages("button.save")</button> |
|
77 |
- </div> |
|
78 |
- <!-- 현재 레이아웃에 존재하지 않는 기능 --> |
|
79 |
- <input type="hidden" name="isAuthorEditable" value="true"/> |
|
80 |
- <input type="hidden" name="siteurl" value="@routes.ProjectApp.project(project.owner, project.name)"/> |
|
81 |
- } |
|
82 |
- </div> |
|
83 |
- <div class="bubble-wrap gray wp"> |
|
84 |
- <div class="n-alert project-del"> |
|
85 |
- <div class="n-inner hide" id="acceptAlert"> |
|
86 |
- <span class="msg">@Messages("project.delete.alert")</span> |
|
87 |
- <a class="ico btn-delete" data-dismiss="alert"></a> |
|
65 |
+ <input name="newTag" type="text" class="text" style="margin-bottom:0px" data-provider="typeahead" autocomplete="off"/> |
|
66 |
+ <button id="addTag" type="button" class="btn-transparent n-btn med gray">@Messages("button.add")</button> |
|
88 | 67 |
</div> |
89 | 68 |
</div> |
90 |
- <div class="cu-label">@Messages("project.delete")</div> |
|
91 |
- <div class="cu-desc"> |
|
92 |
- <p><strong class="notice">@Messages("project.delete.description")</strong></p> |
|
93 |
- <p><input type="checkbox" class="checkbox" autocomplete="off" id="accept"><label for="accept" class="bg-checkbox label-agreement">@Messages("project.delete.accept")</label> |
|
94 |
- <a id="deletion" data-toggle="modal" href="#alertDeletion" class="n-btn small black"><i class="ico ico-delete-small"></i>@Messages("project.delete.this")</a> |
|
95 |
- </p> |
|
69 |
+ |
|
70 |
+ <div class="box-wrap middle"> |
|
71 |
+ <div class="cu-label">@Messages("project.shareOption")</div> |
|
72 |
+ <div class="cu-desc"> |
|
73 |
+ <input name="share_option" type="radio" @if(project.share_option == true){checked="checked"} id="public" value="true" class="radio-btn"><label for="public" class="bg-radiobtn label-public">@Messages("project.public")</label> |
|
74 |
+ <input name="share_option" type="radio" @if(project.share_option == false){checked="checked"} id="private" value="false" class="radio-btn"><label for="private" class="bg-radiobtn label-private">@Messages("project.private")</label> |
|
75 |
+ <span class="note">@Messages("project.private.notice")</span> |
|
76 |
+ </div> |
|
96 | 77 |
</div> |
78 |
+ |
|
79 |
+ @** |
|
80 |
+ <!-- 현재 레이아웃에 존재하지 않는 기능 --> |
|
81 |
+ <input type="hidden" name="isAuthorEditable" value="true"/> |
|
82 |
+ <input type="hidden" name="siteurl" value="@routes.ProjectApp.project(project.owner, project.name)"/> |
|
83 |
+ **@ |
|
97 | 84 |
</div> |
98 |
- |
|
99 |
- |
|
100 |
-<div class="modal hide" id="alertDeletion"> |
|
101 |
- <div class="modal-header"> |
|
102 |
- <button type="button" class="close" data-dismiss="modal">×</button> |
|
103 |
- <h3>@Messages("project.delete.requestion")</h3> |
|
85 |
+ <div class="box-wrap bottom"> |
|
86 |
+ <button id="save" type="submit" class="btn-transparent n-btn orange med">@Messages("button.save")</button> |
|
104 | 87 |
</div> |
105 |
- <div class="modal-body"> |
|
106 |
- <p> @Messages("project.delete.description")</p> |
|
107 |
- <p> @Messages("project.delete.reaccept") </p> |
|
108 |
- </div> |
|
109 |
- <div class="modal-footer"> |
|
110 |
- <a href="#" class="btn" data-dismiss="modal">@Messages("button.no")</a> |
|
111 |
- <a href="@routes.ProjectApp.deleteProject(project.owner, project.name)" class="btn btn-danger">@Messages("button.yes")</a> |
|
112 |
- </div> |
|
113 |
-</div> |
|
88 |
+ } |
|
114 | 89 |
|
115 | 90 |
<script type="text/javascript"> |
116 | 91 |
$(document).ready(function(){ |
... | ... | @@ -119,7 +94,6 @@ |
119 | 94 |
"sURLTags" : "@routes.TagApp.tags()" |
120 | 95 |
}); |
121 | 96 |
}); |
122 |
- |
|
123 | 97 |
</script> |
124 | 98 |
|
125 | 99 |
} |
--- conf/messages.en
+++ conf/messages.en
... | ... | @@ -60,6 +60,7 @@ |
60 | 60 |
label.add = Add |
61 | 61 |
label.manage = Manage Label |
62 | 62 |
label.confirm.delete = Are you Sure? |
63 |
+label.select = Select Label |
|
63 | 64 |
|
64 | 65 |
order.all = All |
65 | 66 |
order.date = Date |
--- conf/messages.ko
+++ conf/messages.ko
... | ... | @@ -61,6 +61,7 @@ |
61 | 61 |
label.add = 추가 |
62 | 62 |
label.manage = 라벨관리 |
63 | 63 |
label.confirm.delete = 라벨을 삭제하면 이슈에 지정한 라벨도 함께 제거됩니다. 정말 삭제하시겠습니까? |
64 |
+label.select = 라벨 선택 |
|
64 | 65 |
|
65 | 66 |
order.all = 전체 |
66 | 67 |
order.date = 날짜순 |
--- conf/routes
+++ conf/routes
... | ... | @@ -76,6 +76,7 @@ |
76 | 76 |
GET /:user/:project controllers.ProjectApp.project(user, project) |
77 | 77 |
GET /:user/:project/settingform controllers.ProjectApp.settingForm(user, project) |
78 | 78 |
POST /:user/:project/setting controllers.ProjectApp.settingProject(user, project) |
79 |
+GET /:user/:project/deleteform controllers.ProjectApp.deleteForm(user, project) |
|
79 | 80 |
GET /:user/:project/delete controllers.ProjectApp.deleteProject(user, project) |
80 | 81 |
GET /:user/:project/members controllers.ProjectApp.members(user, project) |
81 | 82 |
POST /:user/:project/members controllers.ProjectApp.newMember(user, project) |
+++ public/javascripts/service/hive.project.Delete.js
... | ... | @@ -0,0 +1,59 @@ |
1 | +/** | |
2 | + * @(#)hive.project.Delete.js 2013.04.24 | |
3 | + * | |
4 | + * Copyright NHN Corporation. | |
5 | + * Released under the MIT license | |
6 | + * | |
7 | + * http://hive.dev.naver.com/license | |
8 | + */ | |
9 | + | |
10 | +(function(ns){ | |
11 | + | |
12 | + var oNS = $hive.createNamespace(ns); | |
13 | + oNS.container[oNS.name] = function(htOptions){ | |
14 | + | |
15 | + var htVar = {}; | |
16 | + var htElement = {}; | |
17 | + | |
18 | + /** | |
19 | + * initialize | |
20 | + */ | |
21 | + function _init(htOptions){ | |
22 | + _initElement(htOptions); | |
23 | + _attachEvent(); | |
24 | + } | |
25 | + | |
26 | + /** | |
27 | + * initialize element variables | |
28 | + */ | |
29 | + function _initElement(htOptions){ | |
30 | + htElement.welChkAccept = $("#accept"); | |
31 | + htElement.welBtnDeletePrj = $("#deletion"); | |
32 | + } | |
33 | + | |
34 | + /** | |
35 | + * attach event handlers | |
36 | + */ | |
37 | + function _attachEvent(){ | |
38 | + htElement.welBtnDeletePrj.click(_onClickBtnDeletePrj); | |
39 | + } | |
40 | + | |
41 | + /** | |
42 | + * 프로젝트 삭제 버튼 클릭시 이벤트 핸들러 | |
43 | + * 데이터 영구 삭제 동의에 체크했는지 확인하고 | |
44 | + * 체크되지 않았으면 경고 | |
45 | + */ | |
46 | + function _onClickBtnDeletePrj(){ | |
47 | + var bChecked = htElement.welChkAccept.is(":checked"); | |
48 | + | |
49 | + if(bChecked === false){ | |
50 | + $hive.showAlert("project.delete.alert"); | |
51 | + return false; | |
52 | + } | |
53 | + return true; | |
54 | + } | |
55 | + | |
56 | + _init(htOptions || {}); | |
57 | + }; | |
58 | + | |
59 | +})("hive.project.Delete"); |
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?