¾È³çÇϼ¼¿ä ¸ð´ÞÀ» ÀÌ¿ëÇÏ¿© Alert, Confirm âÀ» ¸¹ÀÌµé »ç¿ëÇÏ°í ÀÖÀ¸½ÃÁÒ?
JQuery ¸¦ ÀÌ¿ëÇÏ¿© ½±°Ô Alert, Confirm, Window âÀ» »ý¼ºÇÒ ¼ö ÀÖ´Â ÀڷḦ ¼Ò°³ÇØ µå¸±±î ÇÕ´Ï´Ù. ^^;
¾ÐÃàÆÄÀÏÀ» ´Ù¿î·Îµå ¹ÞÀ¸½Ã¸é test.html ÆÄÀÏÀ» ¸¸µé¾î µÎ¾ú½À´Ï´Ù.
( ¿øÀÚ·áÀÇ »çÀÌÆ®¿¡¼´Â »ùÇà ÆÄÀÏÀ» Á¦°øÇÏÁö ¾Ê¾Æ¼ ¸¸µé¾î¼ ÷ºÎÇß¾î¿ä ^^ )
½ºÅ¸ÀÏÀ» È£ÃâÇØ ÁÖ¼¼¿ä.
¸ð´ÞâÀÇ Å©±â ¹× ·¹À̾ƿô °ü·Ã ½ºÅ¸ÀÏ ÀÔ´Ï´Ù.
½ºÅ©¸³Æ®¸¦ È£ÃâÇÕ´Ï´Ù.
º»¹®À» ±¸¼º ÇÕ´Ï´Ù.
¹öÆ° »ý¼ºÀÌ¶ó º¸½Ã´Â°Ô ¸ÂÀ»µí ÇÕ´Ï´Ù.
¸ð´ÞâÀ» ¼ÂÆà ÇÕ´Ï´Ù.
var dialogManager = new DialogsManager.Instance(); //Instance »ý¼ºÇÕ´Ï´Ù. ÇÑÆäÀÌÁö¿¡ 1°³ÀÇ Instance ¸¸À¸·Î ÃæºÐÇÕ´Ï´Ù.
var confirmWidget = dialogManager.createWidget('confirm');
var alertWidget = dialogManager.createWidget('alert');
var lightboxWidget = dialogManager.createWidget('lightbox', {
headerMessage: 'ŸÀÌƲ ³»¿ëÀ» ³ÖÀ¸¼¼¿ä.',
message: 'º»¹® ³»¿ëÀ» ³ÖÀ¸¼¼¿ä.'
});
//confirm, alert, lightbox ¸¦ À§¿Í °°ÀÌ ¼±¾ðÇÏ°í »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
alertWidget.setMessage('³»¿ë');
confirmWidget.setMessage('³»¿ë');
//setMessage ¸¦ ÀÌ¿ëÇÏ¿© ³»¿ëÀ» ±¸¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.
test.html ÆÄÀÏ¿¡´Â ¿©·¯°¡Áö Å×½ºÆ®ÇÑ ÈçÀûÀ» ³²°Ü µÎ¾ú½À´Ï´Ù.
´Ù¿î·Îµå ¹ÞÀ¸¼Å¼ »ìÆ캸½Ã°í Á¶±Ý ´õ °¡°øÇÏ¿© »ç¿ëÇϼŵµ ÁÁÀ»µí ÇÕ´Ï´Ù. ^^
|