From 6a17497fbd0979c157d0e3583b444553ad59b533 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 11 Jul 2018 03:27:27 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=99=EC=9D=98=20=EC=8B=9C=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=EC=A0=84=ED=8A=B9=20=ED=91=9C=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/js/select_npc.js | 36 +++++++++++++++++++++++++++++++++++- hwe/select_npc.php | 24 ++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/hwe/js/select_npc.js b/hwe/js/select_npc.js index b41713ff..4393193d 100644 --- a/hwe/js/select_npc.js +++ b/hwe/js/select_npc.js @@ -3,11 +3,19 @@ var templateGeneralCard =

<%name%>

\

\

<%leader%> / <%power%> / <%intel%>
\ - <%special%> / <%special2%>

\ + <%specialText%> / <%special2Text%>

\ \ \ '; +var templateSpecial = +'<%text%>\ + \ + <%info%>\ + \ +\ +'; + function pickGeneral(){ $btn = $(this); @@ -85,12 +93,38 @@ function printGenerals(value){ $.each(pick, function(idx, cardData){ cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture); + if(cardData.special in specialInfo){ + cardData.specialText = TemplateEngine(templateSpecial, { + text:cardData.special, + info:specialInfo[cardData.special] + }); + } + else{ + cardData.specialText = special; + } + + if(cardData.special2 in specialInfo){ + cardData.special2Text = TemplateEngine(templateSpecial, { + text:cardData.special2, + info:specialInfo[cardData.special2] + }); + } + else{ + cardData.special2Text = cardData.special2; + } + var $card = $(TemplateEngine(templateGeneralCard, cardData)); console.log($card); $('.card_holder').append($card); $card.find('.select_btn').click(pickGeneral); + $card.find('.obj_tooltip').tooltip({ + title:function(){ + return $(this).find('.tooltiptext').html(); + }, + html:true + }); }); updatePickMoreTimer(); diff --git a/hwe/select_npc.php b/hwe/select_npc.php index 442fc840..cabafc1a 100644 --- a/hwe/select_npc.php +++ b/hwe/select_npc.php @@ -27,15 +27,35 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation - + + + - + +