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

layer alert UI applied (HIVE-127, 151)
@ea9841372becb0335f6b0c8e56c5e4d903fc07ae
+++ app/views/alertUI.scala.html
... | ... | @@ -0,0 +1,14 @@ |
1 | +@import utils.TemplateHelper._ | |
2 | + | |
3 | +<script type="text/javascript" src="@getJSLink("common/hive.ui.Dialog")"></script> | |
4 | + | |
5 | +<div id="hiveDialog" class="modal hide fade hiveDialog" tabindex="-1" role="dialog" aria-hidden="true"> | |
6 | + <div class="btn-dismiss"><button type="button" class="btn-transparent" data-dismiss="modal">×</button></div> | |
7 | + | |
8 | + <div class="message"> | |
9 | + <p class="center-text msg"></p> | |
10 | + <p class="center-txt"> | |
11 | + <button type="submit" class="btn-transparent n-btn orange med" data-dismiss="modal">@Messages("button.confirm")</button> | |
12 | + </p> | |
13 | + </div> | |
14 | +</div>(파일 끝에 줄바꿈 문자 없음) |
+++ public/javascripts/common/hive.ui.Dialog.js
... | ... | @@ -0,0 +1,82 @@ |
1 | +/** | |
2 | + * @(#)hive.ui.Dialog.js 2013.04.22 | |
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(sContainer, htOptions){ | |
14 | + | |
15 | + var htVar = {}; | |
16 | + var htElement = {}; | |
17 | + | |
18 | + /** | |
19 | + * 초기화 | |
20 | + * @param {String} sContainer | |
21 | + * @param {Hash Table} htOptions | |
22 | + */ | |
23 | + function _init(sContainer, htOptions){ | |
24 | + _initElement(sContainer); | |
25 | + _attachEvent(); | |
26 | + } | |
27 | + | |
28 | + /** | |
29 | + * 엘리먼트 변수 | |
30 | + * @param {String} sContainer | |
31 | + */ | |
32 | + function _initElement(sContainer){ | |
33 | + htElement.welContainer = $(sContainer); | |
34 | + htElement.welMessage = htElement.welContainer.find(".msg"); | |
35 | + htElement.welContainer.modal({ | |
36 | + "show": false | |
37 | + }); | |
38 | + } | |
39 | + | |
40 | + /** | |
41 | + * 이벤트 설정 | |
42 | + */ | |
43 | + function _attachEvent(){ | |
44 | + htElement.welContainer.on("hidden", _onHiddenDialog); | |
45 | + } | |
46 | + | |
47 | + /** | |
48 | + * 메시지 출력 | |
49 | + * @param {String} sMessage | |
50 | + */ | |
51 | + function showDialog(sMessage, fCallback){ | |
52 | + htElement.welMessage.html(sMessage); | |
53 | + htElement.welContainer.modal("show"); | |
54 | + htVar.fCallback = fCallback; | |
55 | + } | |
56 | + | |
57 | + /** | |
58 | + * 대화창 닫음 | |
59 | + */ | |
60 | + function hideDialog(){ | |
61 | + htElement.welContainer.modal("hide"); | |
62 | + } | |
63 | + | |
64 | + function _onHiddenDialog(){ | |
65 | + htElement.welMessage.html(""); | |
66 | + | |
67 | + if(typeof htVar.fCallback == "function"){ | |
68 | + htVar.fCallback(); | |
69 | + htVar.fCallback = null; | |
70 | + } | |
71 | + } | |
72 | + | |
73 | + // 초기화 | |
74 | + _init(sContainer, htOptions || {}); | |
75 | + | |
76 | + return { | |
77 | + "show": showDialog, | |
78 | + "hide": hideDialog | |
79 | + }; | |
80 | + }; | |
81 | + | |
82 | +})("hive.ui.Dialog");(파일 끝에 줄바꿈 문자 없음) |
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?