js2ts: common 분리, troop.js
This commit is contained in:
1 parent
c31a867bde
commit
7e4068a244
8 files changed
+210
-230
No files matched your search
+1
-1
@@ -1,2 +1,2 @@
|
||||
(()=>{"use strict";function t(n){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function e(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&f(t,n)}function o(t){var n=l();return function(){var r,e=s(t);if(n){var o=s(this).constructor;r=Reflect.construct(e,arguments,o)}else r=e.apply(this,arguments);return i(this,r)}}function i(n,r){return!r||"object"!==t(r)&&"function"!=typeof r?a(n):r}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){var n="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return c(t,arguments,s(this).constructor)}return e.prototype=ObjLine truncated
|
||||
(()=>{"use strict";function t(n){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function e(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&f(t,n)}function o(t){var n=l();return function(){var r,e=s(t);if(n){var o=s(this).constructor;r=Reflect.construct(e,arguments,o)}else r=e.apply(this,arguments);return i(this,r)}}function i(n,r){return!r||"object"!==t(r)&&"function"!=typeof r?a(n):r}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){var n="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return c(t,arguments,s(this).constructor)}return e.prototype=ObjLine truncated
|
||||
//# sourceMappingURL=common.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"common.js","mappings":"80EAGO,IAeMA,EAAb,yLACkB,mBADlB,YAfA,uB,IAAA,OAEI,aAAyC,MAAtBC,EAAsB,uDAAJ,GAAI,qBACrC,cAAMA,IAD+B,OAD3B,gBAC2B,EAAtBA,QAAAA,EAAsB,EAF7C,O,EAAA,G,EAAA,uBAKI,WACI,OAAIC,KAAKD,QACEC,KAAKC,KAAO,KAAOD,KAAKD,QAGxBC,KAAKC,U,iBAVxB,KAAkCC,S,0GCM3B,IACGC,EADGC,GACHD,EAAqC,CACvC,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,QACL,IAAK,SACL,IAAK,SACL,IAAK,UAGF,SAAUE,GACb,OAAOC,OAAOD,GAAQE,QAAQ,eAAe,SAAUC,GACnD,OAAOL,EAAUK,QAqBtB,SAASC,EAAYC,GAGxB,IAFA,IAAMC,EAAID,EAAIE,OACVA,EAAS,EACJC,EAAI,EAAGA,EAAIF,EAAGE,IAAK,CACxB,IAAMC,EAAIJ,EAAIK,WAAWF,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KAAK,QACzBZ,EAAEE,KAAKO,EAAKI,KAAK,QAAQC,MAAM,MAAM,SAAUC,EAAKC,GAEhD,KADAA,EAAQhB,EAAEiB,KAAKD,IAEX,OAAO,EAEXN,EAAUC,KAAKK,MAEfN,EAAU7B,QAAU,IAGxB4B,EAAKI,KAAK,sBAAuBH,GACjCD,EAAKI,KAAK,oBAAqB,GAE/BJ,EAAKS,OAAM,WACP,IAAMC,EAAMV,EAAKI,KAAK,uBAClBE,EAAMN,EAAKI,KAAK,qBACpBE,GAAOA,Line truncated
|
||||
+2
-111
@@ -1,111 +1,2 @@
|
||||
jQuery(function($){
|
||||
//btnJoinTroop, btnLeaveTroop, btnKickTroop, btnCreateTroop, btnChangeTroopName
|
||||
$('#btnLeaveTroop').click(function(e){
|
||||
if(!confirm("정말 부대를 탈퇴하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대탈퇴'
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnCreateTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대창설',
|
||||
name:$('#nameplate').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnChangeTroopName').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대변경',
|
||||
name:$('#nameplate').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnKickTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대추방',
|
||||
gen:$('#genNo').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnJoinTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대가입',
|
||||
troop:$('.troopId:checked').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
(()=>{"use strict";function o(){alert("작업을 실패했습니다.")}Error,String.prototype.format=function(){for(var o=arguments.length,t=new Array(o),n=0;n<o;n++)t[n]=arguments[n];return this.replace(/{(\d+)}/g,(function(o,n){return void 0!==t[n]?t[n]:o}))},jQuery((function(t){t("#btnLeaveTroop").click((function(n){return!!confirm("정말 부대를 탈퇴하시겠습니까?")&&(t.post({url:"j_troop.php",dataType:"json",data:{action:"부대탈퇴"}}).then((function(o){console.log(o),o.result||(alert(o.reason),location.reload()),location.reload()}),o),!1)})),t("#btnCreateTroop").click((function(n){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대창설",name:t("#nameplate").val()}}).then((function(o){console.log(o),o.result||(alert(o.reason),location.reload()),location.reload()}),o),!1})),t("#btnChangeTroopName").click((function(n){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대변경",name:t("#nameplate").val()}}).then((function(o){console.log(o),o.result||(alert(o.reason),location.reload()),location.reload()}),o),!1})),t("#btnKickTroop").click((function(n){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대추방",gen:t("#genNo").val()}}).then((function(o){console.log(o),o.result||(alert(o.reason),location.reload()),location.reload()}),o),!1})),t("#btnJoinTroop").click((function(n){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대가입",troop:t(".troopId:checked").val()}}).then((function(o){Line truncated
|
||||
//# sourceMappingURL=troop.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"troop.js","mappings":"mBA4SO,SAASA,IACZC,MAAM,eC1SwBC,MD4HlCC,OAAOC,UAAUC,OAAS,WAA6B,2BAAhBC,EAAgB,yBAAhBA,EAAgB,gBACnD,OAAOC,KAAKC,QAAQ,YAAY,SAAUC,EAAOC,GAC7C,YAA+B,IAAhBJ,EAAKI,GAA0BJ,EAAKI,GAAUD,ME/HrEE,QAAO,SAASC,GAEZA,EAAE,kBAAkBC,OAAM,SAASC,GAC/B,QAAIC,QAAQ,sBAGZH,EAAEI,KAAK,CACHC,IAAI,cACJC,SAAS,OACTC,KAAK,CACDC,OAAO,UAEZC,MAAK,SAASF,GACbG,QAAQC,IAAIJ,GACRA,EAAKK,SACLvB,MAAMkB,EAAKM,QACXC,SAASC,UAGbD,SAASC,WAEV3B,IACI,MAGXY,EAAE,mBAAmBC,OAAM,SAASC,GAkBhC,OAjBAF,EAAEI,KAAK,CACHC,IAAI,cACJC,SAAS,OACTC,KAAK,CACDC,OAAO,OACPQ,KAAKhB,EAAE,cAAciB,SAE1BR,MAAK,SAASF,GACbG,QAAQC,IAAIJ,GACRA,EAAKK,SACLvB,MAAMkB,EAAKM,QACXC,SAASC,UAGbD,SAASC,WAEV3B,IACI,KAGXY,EAAE,uBAAuBC,OAAM,SAASC,GAkBpC,OAjBAF,EAAEI,KAAK,CACHC,IAAI,cACJC,SAAS,OACTC,KAAK,CACDC,OAAO,OACPQ,KAAKhB,EAAE,cAAciB,SAE1BR,MAAK,SAASF,GACbG,QAAQC,IAAIJ,GACRA,EAAKK,SACLvB,MAAMkB,EAAKM,QACXC,SAASC,UAGbD,SAASC,WAEV3B,IACI,KAGXY,EAAE,iBAAiBC,OAAM,SAASC,GAkB9B,OAjBAF,EAAEI,KAAK,CACHC,IAAI,cACJC,SAAS,OACTC,KAAK,CACDC,OAAO,OACPU,IAAIlB,EAAE,UAAUiB,SAErBR,MAAK,SAASF,GACbG,QAAQC,IAAIJ,GACRA,EAAKK,SACLvB,MAAMkB,EAAKM,QACXC,SAASC,UAGbD,SAASC,WAEV3B,IACI,KAGXY,EAAE,iBAAiBC,OAAM,SAASC,GAkB9B,OAjBAF,EAAEI,KAAK,CACHC,IAAI,cACJC,SAAS,OACTC,KAAK,CACDC,OAAO,OACPW,MAAMnB,EAAE,oBAAoBiB,SAEjCR,MAAK,SAASF,GACbG,QAAQC,IAAIJ,GACRA,EAAKK,SACLvB,MAAMkB,EAAKM,QACXC,SAASC,UAGbD,SAASC,WAEV3B,IACI,S","sources":["webpack://hidche_lib/./hwe/ts/common_legacy.ts","webpack://hidche_lib/./hwe/ts/util.ts","webpack://hidche_lib/./hwe/ts/tLine truncated
|
||||
@@ -0,0 +1,88 @@
|
||||
import { activeFlip, escapeHtml, isInt, mb_strwidth, mb_strimwidth, convertDictById, convertSet, hexToRgb, isBrightColor, convColorValue, numberWithCommas, linkifyStrWithOpt, TemplateEngine, getIconPath, combineObject, combineArray, activeFlipItem, errUnknown, errUnknownToast, quickReject, nl2br, getNpcColor, initTooltip } from "./common_legacy";
|
||||
|
||||
jQuery(function ($) {
|
||||
initTooltip();
|
||||
activeFlip();
|
||||
|
||||
const customCSS = localStorage.getItem('sam_customCSS');
|
||||
if (customCSS) {
|
||||
const $style = $('<style type="text/css"></style>');
|
||||
$style.text(customCSS);
|
||||
$style.appendTo($('head'));
|
||||
}
|
||||
});
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
/** @deprecated Module 사용할 것 */
|
||||
escapeHtml: typeof escapeHtml;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
isInt: typeof isInt;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
mb_strwidth: typeof mb_strwidth;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
mb_strimwidth: typeof mb_strimwidth;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convertDictById: typeof convertDictById;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convertSet: typeof convertSet;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
hexToRgb: typeof hexToRgb;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
isBrightColor: typeof isBrightColor;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convColorValue: typeof convColorValue;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
numberWithCommas: typeof numberWithCommas;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
linkifyStrWithOpt: typeof linkifyStrWithOpt;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
TemplateEngine: typeof TemplateEngine;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
getIconPath: typeof getIconPath;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
activeFlip: typeof activeFlip;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
combineObject: typeof combineObject;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
combineArray: typeof combineArray;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
activeFlipItem: typeof activeFlipItem;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
errUnknown: typeof errUnknown;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
errUnknownToast: typeof errUnknownToast;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
quickReject: typeof quickReject;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
nl2br: typeof nl2br;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
getNpcColor: typeof getNpcColor;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
initTooltip: typeof initTooltip;
|
||||
}
|
||||
}
|
||||
|
||||
window.escapeHtml = escapeHtml;
|
||||
window.isInt = isInt;
|
||||
window.mb_strwidth = mb_strwidth;
|
||||
window.mb_strimwidth = mb_strimwidth;
|
||||
window.convertDictById = convertDictById;
|
||||
window.convertSet = convertSet;
|
||||
window.hexToRgb = hexToRgb;
|
||||
window.isBrightColor = isBrightColor;
|
||||
window.convColorValue = convColorValue;
|
||||
window.numberWithCommas = numberWithCommas;
|
||||
window.linkifyStrWithOpt = linkifyStrWithOpt;
|
||||
window.TemplateEngine = TemplateEngine;
|
||||
window.getIconPath = getIconPath;
|
||||
window.activeFlip = activeFlip;
|
||||
window.combineObject = combineObject;
|
||||
window.combineArray = combineArray;
|
||||
window.activeFlipItem = activeFlipItem;
|
||||
window.errUnknown = errUnknown;
|
||||
window.errUnknownToast = errUnknownToast;
|
||||
window.quickReject = quickReject;
|
||||
window.nl2br = nl2br;
|
||||
window.getNpcColor = getNpcColor;
|
||||
window.initTooltip = initTooltip;
|
||||
+2
-116
@@ -296,45 +296,6 @@ export function activeFlipItem($img: JQuery<HTMLElement>): void {
|
||||
$img.css('cursor', 'pointer');
|
||||
}
|
||||
|
||||
jQuery(function ($) {
|
||||
$('.obj_tooltip').mouseover(function () {
|
||||
const $objTooltip = $(this);
|
||||
if ($objTooltip.data('setObjTooltip')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let tooltipClassText = $objTooltip.data('tooltip-class');
|
||||
if (!tooltipClassText) {
|
||||
tooltipClassText = '';
|
||||
}
|
||||
const template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
.format(tooltipClassText);
|
||||
|
||||
$objTooltip.tooltip({
|
||||
title: function () {
|
||||
return $.trim($(this).find('.tooltiptext').html());
|
||||
},
|
||||
template: template,
|
||||
html: true
|
||||
}).tooltip('show');
|
||||
|
||||
$objTooltip.data('setObjTooltip', true);
|
||||
});
|
||||
/*each(function(){
|
||||
var $objTooltip = $(this);
|
||||
|
||||
|
||||
});*/
|
||||
|
||||
activeFlip();
|
||||
|
||||
const customCSS = localStorage.getItem('sam_customCSS');
|
||||
if (customCSS) {
|
||||
const $style = $('<style type="text/css"></style>');
|
||||
$style.text(customCSS);
|
||||
$style.appendTo($('head'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
export function errUnknown(): void {
|
||||
@@ -380,7 +341,7 @@ export function getNpcColor(npcType: number): 'cyan' | 'skyblue' | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
export function initTooltip($obj: JQuery<HTMLElement>): void {
|
||||
export function initTooltip($obj?: JQuery<HTMLElement>): void {
|
||||
if ($obj === undefined) {
|
||||
$obj = $('.obj_tooltip');
|
||||
} else if (!$obj.hasClass('obj_tooltip')) {
|
||||
@@ -420,79 +381,4 @@ export function initTooltip($obj: JQuery<HTMLElement>): void {
|
||||
$objTooltip.data('setObjTooltip', true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
/** @deprecated Module 사용할 것 */
|
||||
escapeHtml: typeof escapeHtml;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
isInt: typeof isInt;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
mb_strwidth: typeof mb_strwidth;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
mb_strimwidth: typeof mb_strimwidth;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convertDictById: typeof convertDictById;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convertSet: typeof convertSet;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
hexToRgb: typeof hexToRgb;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
isBrightColor: typeof isBrightColor;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
convColorValue: typeof convColorValue;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
numberWithCommas: typeof numberWithCommas;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
linkifyStrWithOpt: typeof linkifyStrWithOpt;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
TemplateEngine: typeof TemplateEngine;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
getIconPath: typeof getIconPath;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
activeFlip: typeof activeFlip;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
combineObject: typeof combineObject;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
combineArray: typeof combineArray;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
activeFlipItem: typeof activeFlipItem;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
errUnknown: typeof errUnknown;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
errUnknownToast: typeof errUnknownToast;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
quickReject: typeof quickReject;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
nl2br: typeof nl2br;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
getNpcColor: typeof getNpcColor;
|
||||
/** @deprecated Module 사용할 것 */
|
||||
initTooltip: typeof initTooltip;
|
||||
}
|
||||
}
|
||||
|
||||
window.escapeHtml = escapeHtml;
|
||||
window.isInt = isInt;
|
||||
window.mb_strwidth = mb_strwidth;
|
||||
window.mb_strimwidth = mb_strimwidth;
|
||||
window.convertDictById = convertDictById;
|
||||
window.convertSet = convertSet;
|
||||
window.hexToRgb = hexToRgb;
|
||||
window.isBrightColor = isBrightColor;
|
||||
window.convColorValue = convColorValue;
|
||||
window.numberWithCommas = numberWithCommas;
|
||||
window.linkifyStrWithOpt = linkifyStrWithOpt;
|
||||
window.TemplateEngine = TemplateEngine;
|
||||
window.getIconPath = getIconPath;
|
||||
window.activeFlip = activeFlip;
|
||||
window.combineObject = combineObject;
|
||||
window.combineArray = combineArray;
|
||||
window.activeFlipItem = activeFlipItem;
|
||||
window.errUnknown = errUnknown;
|
||||
window.errUnknownToast = errUnknownToast;
|
||||
window.quickReject = quickReject;
|
||||
window.nl2br = nl2br;
|
||||
window.getNpcColor = getNpcColor;
|
||||
window.initTooltip = initTooltip;
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import { errUnknown } from "./common_legacy";
|
||||
|
||||
jQuery(function($){
|
||||
//btnJoinTroop, btnLeaveTroop, btnKickTroop, btnCreateTroop, btnChangeTroopName
|
||||
$('#btnLeaveTroop').click(function(e){
|
||||
if(!confirm("정말 부대를 탈퇴하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대탈퇴'
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnCreateTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대창설',
|
||||
name:$('#nameplate').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnChangeTroopName').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대변경',
|
||||
name:$('#nameplate').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnKickTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대추방',
|
||||
gen:$('#genNo').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#btnJoinTroop').click(function(e){
|
||||
$.post({
|
||||
url:'j_troop.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
action:'부대가입',
|
||||
troop:$('.troopId:checked').val()
|
||||
}
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
if(!data.result){
|
||||
alert(data.reason);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
}, errUnknown);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
+2
-1
@@ -10,7 +10,8 @@ module.exports = [
|
||||
},
|
||||
entry: {
|
||||
inheritPoint: './hwe/ts/inheritPoint.ts',
|
||||
common: './hwe/ts/common_legacy.ts',
|
||||
common: './hwe/ts/common_deprecated.ts',
|
||||
troop: './hwe/ts/troop.ts',
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
|
||||
Reference in new issue
Block a user