[Notice] Announcing the End of Demo Server [Read me]
Jihan Kim 2013-04-22
layer alert UI applied (HIVE-127, 151)
@ea9841372becb0335f6b0c8e56c5e4d903fc07ae
 
app/views/alertUI.scala.html (added)
+++ app/views/alertUI.scala.html
@@ -0,0 +1,14 @@
+@import utils.TemplateHelper._
+
+<script type="text/javascript" src="@getJSLink("common/hive.ui.Dialog")"></script>
+
+<div id="hiveDialog" class="modal hide fade hiveDialog" tabindex="-1" role="dialog" aria-hidden="true">
+	<div class="btn-dismiss"><button type="button" class="btn-transparent" data-dismiss="modal">&times;</button></div>
+	
+	<div class="message">
+		<p class="center-text msg"></p>
+		<p class="center-txt">
+			<button type="submit" class="btn-transparent n-btn orange med" data-dismiss="modal">@Messages("button.confirm")</button>
+		</p>
+	</div>
+</div>(파일 끝에 줄바꿈 문자 없음)
 
public/javascripts/common/hive.ui.Dialog.js (added)
+++ public/javascripts/common/hive.ui.Dialog.js
@@ -0,0 +1,82 @@
+/**
+ * @(#)hive.ui.Dialog.js 2013.04.22
+ *
+ * Copyright NHN Corporation.
+ * Released under the MIT license
+ * 
+ * http://hive.dev.naver.com/license
+ */
+
+(function(ns){
+	
+	var oNS = $hive.createNamespace(ns);
+	oNS.container[oNS.name] = function(sContainer, htOptions){
+
+		var htVar = {};
+		var htElement = {};
+		
+		/**
+		 * 초기화
+		 * @param {String} sContainer
+		 * @param {Hash Table} htOptions
+		 */
+		function _init(sContainer, htOptions){
+			_initElement(sContainer);
+			_attachEvent();
+		}
+		
+		/**
+		 * 엘리먼트 변수
+		 * @param {String} sContainer
+		 */
+		function _initElement(sContainer){
+			htElement.welContainer = $(sContainer);
+			htElement.welMessage = htElement.welContainer.find(".msg");
+			htElement.welContainer.modal({
+				"show": false
+			});
+		}
+		
+		/**
+		 * 이벤트 설정
+		 */
+		function _attachEvent(){
+			htElement.welContainer.on("hidden", _onHiddenDialog);
+		}
+		
+		/**
+		 * 메시지 출력
+		 * @param {String} sMessage
+		 */
+		function showDialog(sMessage, fCallback){
+			htElement.welMessage.html(sMessage);
+			htElement.welContainer.modal("show");
+			htVar.fCallback = fCallback;
+		}
+
+		/**
+		 * 대화창 닫음
+		 */
+		function hideDialog(){
+			htElement.welContainer.modal("hide");
+		}
+		
+		function _onHiddenDialog(){
+			htElement.welMessage.html("");
+			
+			if(typeof htVar.fCallback == "function"){
+				htVar.fCallback();
+				htVar.fCallback = null; 
+			}
+		}
+		
+		// 초기화
+		_init(sContainer, htOptions || {});
+		
+		return {
+			"show": showDialog,
+			"hide": hideDialog
+		};
+	};
+
+})("hive.ui.Dialog");(파일 끝에 줄바꿈 문자 없음)
Add a comment
List