diff --git a/Gruntfile.js b/Gruntfile.js index e9250295..8e30ef44 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -127,5 +127,6 @@ grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.registerTask('default', ['concat','uglify','cssmin']); + grunt.registerTask('js', ['concat','uglify']); + grunt.registerTask('css', ['cssmin']); }; \ No newline at end of file diff --git a/README.md b/README.md index b4ef49c8..5fd11a14 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ Javascript UI Library AXISJ ```js // bower install $ bower install axisj - /* http://dev.axisj.com : Demonstration http://jdoc.axisj.com : Documentation @@ -16,6 +15,12 @@ http://facebook.com/axisj : Fanpage http://google.com/+axisj : Google+ */ ``` + +```html +dist/AXJ.min.js +ui/[theme]/AXJ.min.css +``` +
axisjui
diff --git a/dist/AXJ.all.js b/dist/AXJ.all.js index a543d895..c9aba9af 100644 --- a/dist/AXJ.all.js +++ b/dist/AXJ.all.js @@ -1,5 +1,5 @@ /*! -AXJ - v1.0.4 - 2014-05-19 +AXJ - v1.0.4 - 2014-05-22 */ /* http://www.axisj.com, license : http://www.axisj.com/license */ @@ -1288,7 +1288,7 @@ var AXJ = Class.create({ if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver); this.windowResizeObserver = setTimeout(function () { windowResizeApply(); - }, 100); + }, 1); }, windowResizeApply: function () { @@ -4945,18 +4945,18 @@ var AXMobileModal = Class.create(AXJ, { top = (clientHeight - modalHeight) / 2; if (left < 0) left = margin; - if (top < 0) top = margin; + if (top < -5) top = -5; var cssStylesStart = { left: (axf.clientWidth() - (modalWidth*0.8)) / 2, - top: (axf.clientHeight() - (modalHeight*0.8)) / 2 + axf.scrollTop(), + top: (axf.clientHeight() - (modalHeight*0.8)) / 2, width: (modalWidth*0.8), height: (modalHeight*0.8) }; this.modalPanel.css(cssStylesStart); cssStyles.left = left; - cssStyles.top = top + axf.scrollTop(); + cssStyles.top = top; cssStyles.width = modalWidth; cssStyles.height = modalHeight; mask.open(); @@ -5063,7 +5063,7 @@ var AXMobileModal = Class.create(AXJ, { top = (clientHeight - modalHeight) / 2; if (left < 0) left = margin; - if (top < 0) top = margin; + if (top < -5) top = -5; cssStyles.left = left; cssStyles.top = top; @@ -8082,6 +8082,13 @@ AXGrid = Class.create(AXJ, { var browser = AXUtil.browser; this.isMobile = browser.mobile; this.cachedDom = {}; + this.virtualScroll = { + startIndex : 0, + endIndex : 0, + itemTrHeight: 0, + printListCount: 0, + scrollTop: 0 + }; }, /* 공통 영역 */ defineConfig: function (rewrite) { @@ -9295,41 +9302,37 @@ AXGrid = Class.create(AXJ, { var _list = this.list; if (itemIndex == undefined) { + this.colHead.find(".gridCheckBox_colHead_colSeq" + colSeq).each(function () { + trace(checked); this.checked = checked; }); axdom("#" + cfg.targetID + "_AX_fixedColHead").find(".gridCheckBox_colHead_colSeq" + colSeq).each(function () { this.checked = checked; - var ieid = this.id.split(/_AX_/g); - var checkboxColSeq = ieid[ieid.length - 2]; - var checkboxIndex = ieid[ieid.length - 1]; - if (cfg.colGroup[checkboxColSeq].oncheck) { - var sendObj = { - index: checkboxIndex, - list: _list, - item: _list[checkboxIndex] - }; - cfg.colGroup[checkboxColSeq].oncheck.call(sendObj, this.checked); - } }); this.body.find(".gridCheckBox_body_colSeq" + colSeq).each(function () { if (axdom("#" + this.id).attr("disabled") != "disabled") { this.checked = checked; - var ieid = this.id.split(/_AX_/g); - var checkboxColSeq = ieid[ieid.length - 2]; - var checkboxIndex = ieid[ieid.length - 1]; - if (cfg.colGroup[checkboxColSeq].oncheck) { - var sendObj = { - index: checkboxIndex, - list: _list, - item: _list[checkboxIndex] - }; - cfg.colGroup[checkboxColSeq].oncheck.call(sendObj, this.checked); - } } }); + + for (var item, itemIndex = 0, __arr = this.list; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + if(!item.___disabled) item.___disabled = {}; + if(!item.___checked) item.___checked = {}; + + item.___checked[colSeq] = checked; + } + + if (cfg.colGroup[colSeq].oncheck) { + var sendObj = { + index: checkboxIndex, + list: _list + }; + cfg.colGroup[colSeq].oncheck.call(sendObj, checked); + } + } else { this.body.find(".gridBodyTr_" + itemIndex + " .gridCheckBox_body_colSeq" + colSeq).each(function () { @@ -9338,18 +9341,23 @@ AXGrid = Class.create(AXJ, { } else { this.checked = checked; } - var ieid = this.id.split(/_AX_/g); - var checkboxColSeq = ieid[ieid.length - 2]; - var checkboxIndex = ieid[ieid.length - 1]; - if (cfg.colGroup[checkboxColSeq].oncheck) { - var sendObj = { - index: checkboxIndex, - list: _list, - item: _list[checkboxIndex] - }; - cfg.colGroup[checkboxColSeq].oncheck.call(sendObj, this.checked); - } }); + var item = this.list[itemIndex]; + if(!item.___disabled) item.___disabled = {}; + if(!item.___checked) item.___checked = {}; + if (checked == null) { + item.___checked[colSeq] = !item.___checked[colSeq]; + }else{ + item.___checked[colSeq] = checked; + } + + if (cfg.colGroup[colSeq].oncheck) { + var sendObj = { + index: checkboxIndex, + list: _list + }; + cfg.colGroup[colSeq].oncheck.call(sendObj, checked); + } } }, @@ -10890,8 +10898,6 @@ AXGrid = Class.create(AXJ, { /* view mode 가 grid 인경우만 유효 */ if (cfg.viewMode == "grid") { if(cfg.height == "auto"){ - //TODO : this.virtualScroll 속성정의 없으면 null - this.virtualScroll = null; for (var item, itemIndex = 0, __arr = this.list; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { po.push(getItem(itemIndex, item, "n")); if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { @@ -10992,6 +10998,16 @@ AXGrid = Class.create(AXJ, { // 스크롤 y 포지션 초기화 this.scrollContent.css({ top: 0 }); this.contentScrollContentSync({ top: 0 }); + }else{ + this.virtualScroll = { + startIndex : 0, + endIndex : 0, + itemTrHeight: 0, + printListCount: 0, + scrollTop: 0 + }; + this.scrollContent.css({ top: 0 }); + this.contentScrollContentSync({ top: 0 }); } this.body.find(".gridBodyTr").bind("mouseover", this.gridBodyOver.bind(this)); @@ -12211,6 +12227,7 @@ AXGrid = Class.create(AXJ, { var eventCancle = false; scrollTop += delta; + //trace(scrollTop.abs() + bodyHeight, scrollHeight); if (scrollTop > 0) { scrollTop = 0; eventCancle = true; @@ -12224,7 +12241,6 @@ AXGrid = Class.create(AXJ, { this.scrollContent.css({ top: scrollTop }); this.contentScrollContentSync({ top: scrollTop }); - if (!eventCancle) { if (event.preventDefault) event.preventDefault(); if (event.stopPropagation) event.stopPropagation(); @@ -12410,8 +12426,11 @@ AXGrid = Class.create(AXJ, { }, bigDataSync: function(){ - if(this.bigDataSyncObserver) clearTimeout(this.bigDataSyncObserver); - this.bigDataSyncObserver = setTimeout(this.bigDataSyncApply.bind(this), 10); + var cfg = this.config; + if(cfg.viewMode == "grid"){ + if(this.bigDataSyncObserver) clearTimeout(this.bigDataSyncObserver); + this.bigDataSyncObserver = setTimeout(this.bigDataSyncApply.bind(this), 10); + } }, bigDataSyncApply: function(){ var cfg = this.config; @@ -12435,78 +12454,81 @@ AXGrid = Class.create(AXJ, { } //trace(newStartIndex, newEndIndex); - //그리드 내용 다시 구성 - po = []; - for(var itemIndex = newStartIndex;itemIndex < newEndIndex;itemIndex++) { - item = this.list[itemIndex]; - po.push(getItem(itemIndex, item, "n")); - if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { - po.push(getItemMarker(itemIndex, item, "n")); - } - } - this.cachedDom.tbody.empty(); - this.cachedDom.tbody.append(po.join('')); + if(VS.startIndex != newStartIndex) { - if (this.hasFixed) { + //그리드 내용 다시 구성 po = []; - for(var itemIndex = newStartIndex;itemIndex < newEndIndex;itemIndex++) { + for (var itemIndex = newStartIndex; itemIndex < newEndIndex; itemIndex++) { item = this.list[itemIndex]; - po.push(getItem(itemIndex, item, "fix")); + po.push(getItem(itemIndex, item, "n")); if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { - po.push(getItemMarker(itemIndex, item, "fix")); + po.push(getItemMarker(itemIndex, item, "n")); } } - this.cachedDom.fixed_tbody.empty(); - this.cachedDom.fixed_tbody.append(po.join('')); - } + this.cachedDom.tbody.empty(); + this.cachedDom.tbody.append(po.join('')); - this.cachedDom.thpadding.css({ height: (newStartIndex) * VS.itemTrHeight }); // 상단패딩증가 - this.cachedDom.tfpadding.css({ height: (this.list.length - newEndIndex - 1) * (VS.itemTrHeight) }); - if(this.hasFixed) { - this.cachedDom.fthpadding.css({ height: (newStartIndex) * VS.itemTrHeight }); // 상단패딩증가 - this.cachedDom.ftfpadding.css({ height: (this.list.length - newEndIndex - 1) * (VS.itemTrHeight) }); - } + if (this.hasFixed) { + po = []; + for (var itemIndex = newStartIndex; itemIndex < newEndIndex; itemIndex++) { + item = this.list[itemIndex]; + po.push(getItem(itemIndex, item, "fix")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "fix")); + } + } + this.cachedDom.fixed_tbody.empty(); + this.cachedDom.fixed_tbody.append(po.join('')); + } - this.body.find(".gridBodyTr").bind("mouseover", this.gridBodyOver.bind(this)); - this.body.find(".gridBodyTr").bind("mouseout", this.gridBodyOut.bind(this)); - this.body.find(".gridBodyTr").bind("click", this.gridBodyClick.bind(this)); - if (this.needBindDBLClick()) this.body.find(".gridBodyTr").bind("dblclick", this.gridBodyDBLClick.bind(this)); + this.cachedDom.thpadding.css({ height: (newStartIndex) * VS.itemTrHeight }); // 상단패딩증가 + this.cachedDom.tfpadding.css({ height: (this.list.length - newEndIndex - 1) * (VS.itemTrHeight) }); + if (this.hasFixed) { + this.cachedDom.fthpadding.css({ height: (newStartIndex) * VS.itemTrHeight }); // 상단패딩증가 + this.cachedDom.ftfpadding.css({ height: (this.list.length - newEndIndex - 1) * (VS.itemTrHeight) }); + } - if (this.selectedRow && this.selectedRow.length > 0) { + this.body.find(".gridBodyTr").bind("mouseover", this.gridBodyOver.bind(this)); + this.body.find(".gridBodyTr").bind("mouseout", this.gridBodyOut.bind(this)); + this.body.find(".gridBodyTr").bind("click", this.gridBodyClick.bind(this)); + if (this.needBindDBLClick()) this.body.find(".gridBodyTr").bind("dblclick", this.gridBodyDBLClick.bind(this)); - var body = this.body; - for (var item, itemIndex = 0, __arr = this.selectedRow; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { - body.find(".gridBodyTr_" + item).addClass("selected"); - } + if (this.selectedRow && this.selectedRow.length > 0) { - var itemIndex = this.selectedRow.last(); - try { - var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; - var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); + var body = this.body; + for (var item, itemIndex = 0, __arr = this.selectedRow; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + body.find(".gridBodyTr_" + item).addClass("selected"); + } - var scrollHeight = this.scrollContent.height(); - var bodyHeight = this.body.height(); + var itemIndex = this.selectedRow.last(); + try { + var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; + var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); - if (trTop.number() + trHeight.number() > bodyHeight) { - var scrollTop = bodyHeight - (trTop.number() + VS.itemTrHeight.number()); - this.scrollContent.css({ top: scrollTop }); - this.contentScrollContentSync({ top: scrollTop }); - } else { - if (trTop.number() == 0) { - var scrollTop = 0; + var scrollHeight = this.scrollContent.height(); + var bodyHeight = this.body.height(); + + if (trTop.number() + trHeight.number() > bodyHeight) { + var scrollTop = bodyHeight - (trTop.number() + VS.itemTrHeight.number()); this.scrollContent.css({ top: scrollTop }); this.contentScrollContentSync({ top: scrollTop }); + } else { + if (trTop.number() == 0) { + var scrollTop = 0; + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } } + } catch (e) { + } - } catch (e) { } + VS.startIndex = newStartIndex; + VS.endIndex = newEndIndex; + VS.scrollTop = scrollContentScrollTop; } - - VS.startIndex = newStartIndex; - VS.endIndex = newEndIndex; - VS.scrollTop = scrollContentScrollTop; } }, @@ -14455,43 +14477,49 @@ var AXHtmlElement = Class.create(AXJ, { /* ---------------------------- */ /* http://www.axisj.com, license : http://www.axisj.com/license */ +/** + * AXInputConverter + * @class AXInputConverter + * @extends AXJ + * @version v1.48 + * @author tom@axisj.com + * @logs + "2012-11-05 오후 1:23:24", + "2013-02-21 오후 5:47:22 슬라이드에 터치 이벤트 추가 - root", + "2013-06-09 오후 10:31:34 bindNumber - onchange ", + "2013-06-10 오후 1:37:41 unbinddate 메서드 추가", + "2013-06-13 오후 7:26:49 bindDate - config 에 defaultDate 속성 확장", + "2013-06-20 오전 12:49:06 twinbindDate - 아이디 체크 버그 픽스", + "2013-08-28 오후 4:16:01 bindMoney - 성능개선", + "2013-09-29 오전 12:39:49 bindSlider 연속호출 버그 패치 - tom", + "2013-11-06 오후 1:13:46 bindMoney min, max, onChange 속성 구현 및 기타 버그 패치 - tom", + "2013-11-28 오전 10:51:22 : tom - onsearch 옵션 추가 및 CSS 수정", + "2013-12-09 오후 8:06:17 : tom - bindSelectorOptionsClick 버그픽스", + "2013-12-16 오후 4:46:14 : tom - bindMoneyCheck", + "2013-12-25 오후 3:26:54 : tom - bindTwinDate 기본값 초기화 버그픽스", + "2013-12-27 오후 12:09:20 : tom - obj.inProgressReACT 기능 추가", + "2014-01-02 오후 12:59:17 : tom - bindSelector AJAX 호출 중지 기능 추가", + "2014-01-10 오후 5:07:44 : tom - event bind modify, fix", + "2014-01-14 오후 3:43:06 : tom - bindSelector expandBox close 버그픽스", + "2014-01-20 오후 4:16:56 : tom - bindDateTime 시간이 선택 해제되는 문제 해결", + "2014-02-05 오후 4:32:34 : tom - bindSelector blur 이벤트 값 제거 문제 해결 / bindDate 문자열 자동완성 버그 픽스", + "2014-02-06 오후 7:59:54 tom : jQuery 독립 우회 코드 변경", + "2014-02-13 오후 5:39:21 tom : bindDate 월 이동 버그 픽스", + "2014-02-14 오후 1:29:01 tom : bindSelector enter키 입력 후 blur 제거", + "2014-02-17 오후 7:38:59 tom : bindDate 월선택 도구에서 1월 선택 버그 픽스", + "2014-02-21 오후 4:52:24 tom : bindMoney 포커스 유지 기능 추가", + "2014-02-25 오후 9:05:04 tom : earlierThan/ laterThan 설정 버그픽스", + "2014-03-18 오후 1:58:57 tom : bindSelector 텍스트 변경 안 되었을 때 이벤트 처리 안하기", + "2014-03-18 오후 9:44:57 tom : 날짜 입력 시 4자리 입력 후 포커스 아웃 시 당해년도 4자리 자동 포함, 날짜 입력 시 6자리 입력 후 포커스 아웃 시 당해년도 앞 2자리 자동 포함", + "2014-04-03 오후 3:49:21 tom : bindDate ie 10 blur 버그 픽스", + "2014-04-14 tom : 모바일 너비 지정 방식 변경", + "2014-04-21 tom : bindDate 다중 오픈 되었을 때 닫기 버그 픽스", + "2014-04-24 오후 7:33:25 tom : bindDate 개체에 리턴입력시 onBlur 연결", + "2014-05-21 tom : resize event 상속" + * + */ var AXInputConverter = Class.create(AXJ, { - version: "AXInputConverter v1.47", - author: "tom@axisj.com", - logs: [ - "2012-11-05 오후 1:23:24", - "2013-02-21 오후 5:47:22 슬라이드에 터치 이벤트 추가 - root", - "2013-06-09 오후 10:31:34 bindNumber - onchange ", - "2013-06-10 오후 1:37:41 unbinddate 메서드 추가", - "2013-06-13 오후 7:26:49 bindDate - config 에 defaultDate 속성 확장", - "2013-06-20 오전 12:49:06 twinbindDate - 아이디 체크 버그 픽스", - "2013-08-28 오후 4:16:01 bindMoney - 성능개선", - "2013-09-29 오전 12:39:49 bindSlider 연속호출 버그 패치 - tom", - "2013-11-06 오후 1:13:46 bindMoney min, max, onChange 속성 구현 및 기타 버그 패치 - tom", - "2013-11-28 오전 10:51:22 : tom - onsearch 옵션 추가 및 CSS 수정", - "2013-12-09 오후 8:06:17 : tom - bindSelectorOptionsClick 버그픽스", - "2013-12-16 오후 4:46:14 : tom - bindMoneyCheck", - "2013-12-25 오후 3:26:54 : tom - bindTwinDate 기본값 초기화 버그픽스", - "2013-12-27 오후 12:09:20 : tom - obj.inProgressReACT 기능 추가", - "2014-01-02 오후 12:59:17 : tom - bindSelector AJAX 호출 중지 기능 추가", - "2014-01-10 오후 5:07:44 : tom - event bind modify, fix", - "2014-01-14 오후 3:43:06 : tom - bindSelector expandBox close 버그픽스", - "2014-01-20 오후 4:16:56 : tom - bindDateTime 시간이 선택 해제되는 문제 해결", - "2014-02-05 오후 4:32:34 : tom - bindSelector blur 이벤트 값 제거 문제 해결 / bindDate 문자열 자동완성 버그 픽스", - "2014-02-06 오후 7:59:54 tom : jQuery 독립 우회 코드 변경", - "2014-02-13 오후 5:39:21 tom : bindDate 월 이동 버그 픽스", - "2014-02-14 오후 1:29:01 tom : bindSelector enter키 입력 후 blur 제거", - "2014-02-17 오후 7:38:59 tom : bindDate 월선택 도구에서 1월 선택 버그 픽스", - "2014-02-21 오후 4:52:24 tom : bindMoney 포커스 유지 기능 추가", - "2014-02-25 오후 9:05:04 tom : earlierThan/ laterThan 설정 버그픽스", - "2014-03-18 오후 1:58:57 tom : bindSelector 텍스트 변경 안 되었을 때 이벤트 처리 안하기", - "2014-03-18 오후 9:44:57 tom : 날짜 입력 시 4자리 입력 후 포커스 아웃 시 당해년도 4자리 자동 포함, 날짜 입력 시 6자리 입력 후 포커스 아웃 시 당해년도 앞 2자리 자동 포함", - "2014-04-03 오후 3:49:21 tom : bindDate ie 10 blur 버그 픽스", - "2014-04-14 tom : 모바일 너비 지정 방식 변경", - "2014-04-21 tom : bindDate 다중 오픈 되었을 때 닫기 버그 픽스", - "2014-04-24 오후 7:33:25 tom : bindDate 개체에 리턴입력시 onBlur 연결" - ], initialize: function (AXJ_super) { AXJ_super(); this.objects = []; @@ -14524,10 +14552,9 @@ var AXInputConverter = Class.create(AXJ, { init: function () { axdom(window).resize(this.windowResize.bind(this)); }, - windowResize: function () { - if (this.windowResizeObs) clearTimeout(this.windowResizeObs); - this.windowResizeObs = setTimeout(this.alignAllAnchor.bind(this), 10); - }, + windowResizeApply: function(){ + this.alignAllAnchor(); + }, alignAllAnchor: function () { var alignAnchor = this.alignAnchor.bind(this); axf.each(this.objects, function (index, O) { @@ -19120,23 +19147,29 @@ var AXMobileMenu = Class.create(AXJ, { }); /* ---------------------------- */ /* http://www.axisj.com, license : http://www.axisj.com/license */ - + +/** + * AXModal + * @class AXModal + * @extends AXJ + * @version v1.35 + * @author tom@axisj.com + * @logs + "2013-02-13 오전 10:39:17 - axmods 에서 컨버트 : tom ", + "2013-04-08 오전 12:15:17 - resize 메소스 추가 및 버그 픽스 : tom ", + "2013-06-20 오후 5:21:24 - open 메소드 속성에 width 조건 추가 : tom ", + "2013-07-09 오후 4:41:48 - animateDuration 속성 추가 : tom ", + "2013-08-21 오후 4:46:51 - openNew 버그 픽스 : tom ", + "2013-08-22 오전 10:56:20 - resize 버그 픽스 : tom ", + "2013-08-24 - openNew 메소드 기능 확장 : tom ", + "2013-10-14 오전 6:54:40 - resize 기능 보강 : tom ", + "2013-11-15 오후 4:01:29 - tom : openDiv scroll 버그 패치", + "2013-11-18 오후 5:16:02 - tom resize 버그 패치", + "2014-05-21 - tom : AXModal mediaQuery 속성 추가" + * + */ var AXModal = Class.create(AXJ, { - version: "AXModal V1.34", - author: "tom@axisj.com", - logs: [ - "2013-02-13 오전 10:39:17 - axmods 에서 컨버트 : tom ", - "2013-04-08 오전 12:15:17 - resize 메소스 추가 및 버그 픽스 : tom ", - "2013-06-20 오후 5:21:24 - open 메소드 속성에 width 조건 추가 : tom ", - "2013-07-09 오후 4:41:48 - animateDuration 속성 추가 : tom ", - "2013-08-21 오후 4:46:51 - openNew 버그 픽스 : tom ", - "2013-08-22 오전 10:56:20 - resize 버그 픽스 : tom ", - "2013-08-24 - openNew 메소드 기능 확장 : tom ", - "2013-10-14 오전 6:54:40 - resize 기능 보강 : tom ", - "2013-11-15 오후 4:01:29 - tom : openDiv scroll 버그 패치", - "2013-11-18 오후 5:16:02 - tom resize 버그 패치" - ], initialize: function (AXJ_super) { AXJ_super(); this.config.maskCss = "AXMask"; @@ -19148,10 +19181,35 @@ var AXModal = Class.create(AXJ, { this.config.windowID = "AXModal" + AXUtil.timekey(); this.config.contentDivClass = (AXConfig.AXModal) ? AXConfig.AXModal.contentDivClass : "bodyHeightDiv"; this.config.displayLoading = true; + this.config.viewMode = "dx"; + this.config.opendModalID = ""; }, init: function () { var cfg = this.config; this.mask = jQuery("
"); + if (cfg.mediaQuery) { + var _viewMode = "", clientWidth = axf.clientWidth(); + axf.each(cfg.mediaQuery, function (k, v) { + if (Object.isObject(v)) { + + if(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; + } + } + }, setWidth: function (width) { var cfg = this.config; @@ -19206,7 +19264,7 @@ var AXModal = Class.create(AXJ, { po.push("
"); po.push("
"); if (cfg.displayLoading) { - po.push("
"); + po.push("
"); po.push("
"); po.push("

페이지를 로딩 중입니다. 잠시만 기다려 주세요.
"); } @@ -19237,6 +19295,13 @@ var AXModal = Class.create(AXJ, { jQuery(document.body).append(po.join('')); } + jQuery("#" + cfg.windowID).data("width", maskWidth); + jQuery("#" + cfg.windowID).data("top", maskTop); + + if(cfg.viewMode == "mx"){ + jQuery("#" + cfg.windowID).css({ left: 0, top:jQuery(window).scrollTop(), width:"100%" }); + } + var loadingID = this.config.windowID + "_loading"; var _winID = this.winID; var _frmID = this.frmID; @@ -19250,8 +19315,8 @@ var AXModal = Class.create(AXJ, { if (jQuery(myIframe.document.body).find("." + cfg.contentDivClass).get(0)) { bodyHeight = jQuery(myIframe.document.body).find("." + cfg.contentDivClass).outerHeight(); } - jQuery(this).animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); - jQuery("#" + _winID + "_box").animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery(this).css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + _winID + "_box").css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); if (cfg.displayLoading) jQuery("#" + loadingID).fadeOut("slow"); jQuery("#" + _winID).addClass("loaded"); @@ -19363,8 +19428,8 @@ var AXModal = Class.create(AXJ, { } } - jQuery(this).animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); - jQuery("#" + _winID + "_box").animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery(this).css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + _winID + "_box").css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); jQuery("#" + loadingID).fadeOut("slow"); jQuery("#" + _winID).addClass("loaded"); }); @@ -19382,15 +19447,14 @@ var AXModal = Class.create(AXJ, { jQuery(window).bind("resize.AXModal", this.onDocResize.bind(this)); }, openDiv: function (args) { + var cfg = this.config; mask.open(); - var modalID = args.modalID; + var modalID = cfg.opendModalID = args.modalID; if (AXgetId(modalID)) { jQuery("#" + modalID).show(); - this.config.windowID = modalID; - var maskTop = this.config.defaultTop; if (args.top != undefined) { maskTop = jQuery(window).scrollTop() + args.top; @@ -19398,6 +19462,10 @@ var AXModal = Class.create(AXJ, { maskTop = jQuery(window).scrollTop() + 50; } + if(cfg.viewMode == "mx"){ + maskTop = jQuery(window).scrollTop(); + } + jQuery("#" + modalID).css({ "top": maskTop }); if (args.closeByEscKey) { @@ -19450,6 +19518,13 @@ var AXModal = Class.create(AXJ, { jQuery("#" + modalID + "_content").append(jQuery("#" + args.targetID)); + jQuery("#" + cfg.opendModalID).data("width", maskWidth); + jQuery("#" + cfg.opendModalID).data("top", maskTop); + + if(cfg.viewMode == "mx"){ + jQuery("#" + cfg.opendModalID).css({ left: 0, top:jQuery(window).scrollTop(), width:"100%" }); + } + var loadingID = modalID + "_loading"; var closeBind = this.close.bind(this); @@ -19529,6 +19604,7 @@ var AXModal = Class.create(AXJ, { if (modalID) { jQuery("#" + modalID).hide(); + this.config.opendModalID = ""; mask.close(); } else { @@ -19580,8 +19656,8 @@ var AXModal = Class.create(AXJ, { if (jQuery(myIframe.document.body).find("." + cfg.contentDivClass).get(0)) { bodyHeight = jQuery(myIframe.document.body).find("." + cfg.contentDivClass).outerHeight(); } - jQuery("#" + _winID).animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); - jQuery("#" + _winID + "_box").animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + _winID).css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + _winID + "_box").css({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); //trace({ h: jQuery(myIframe.document.body).find("." + cfg.contentDivClass).height() }); //trace(bodyHeight); @@ -19600,19 +19676,77 @@ var AXModal = Class.create(AXJ, { }, onDocResize: function () { var cfg = this.config; - try { - if (cfg.fixedWidth) { - var maskWidth = jQuery("#" + cfg.windowID).outerWidth(); - var maskLeft = (jQuery(document.body).width() / 2) - (maskWidth / 2); - if (maskLeft < 0) maskLeft = 0; - jQuery("#" + cfg.windowID).css({ left: maskLeft }); - } else { - var maskWidth = jQuery(".container").width() - 50; - jQuery("#" + cfg.windowID).css({ width: maskWidth }); + + if (cfg.mediaQuery) { + var _viewMode = "", clientWidth = axf.clientWidth(); + axf.each(cfg.mediaQuery, function (k, v) { + if (Object.isObject(v)) { + + if(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; } - } catch (e) { + } + + if(cfg.viewMode == "dx"){ + try { + if (cfg.fixedWidth) { + + if(cfg.opendModalID != ""){ + var maskWidth = jQuery("#" + cfg.opendModalID).outerWidth(); + if(maskWidth != jQuery("#" + cfg.opendModalID).data("width")) { + jQuery("#" + cfg.opendModalID).css({ + top: jQuery("#" + cfg.opendModalID).data("top"), + width: jQuery("#" + cfg.opendModalID).data("width") + }); + } + var maskLeft = (jQuery(document.body).width() / 2) - (maskWidth / 2); + if (maskLeft < 0) maskLeft = 0; + jQuery("#" + cfg.opendModalID).css({ left: maskLeft }); + }else{ + var maskWidth = jQuery("#" + cfg.windowID).outerWidth(); + if(maskWidth != jQuery("#" + cfg.windowID).data("width")) { + jQuery("#" + cfg.windowID).css({ + top: jQuery("#" + cfg.windowID).data("top"), + width: jQuery("#" + cfg.windowID).data("width") + }); + } + var maskLeft = (jQuery(document.body).width() / 2) - (maskWidth / 2); + if (maskLeft < 0) maskLeft = 0; + jQuery("#" + cfg.windowID).css({ left: maskLeft }); + } + } else { + if(cfg.opendModalID != "") { + var maskWidth = jQuery(".container").width() - 50; + jQuery("#" + cfg.opendModalID).css({ width: maskWidth }); + }else{ + var maskWidth = jQuery(".container").width() - 50; + jQuery("#" + cfg.windowID).css({ width: maskWidth }); + } + } + } catch (e) { + } + }else if(cfg.viewMode == "mx"){ + if(cfg.opendModalID != "") { + jQuery("#" + cfg.opendModalID).css({ left: 0, top: jQuery(window).scrollTop(), width: "100%" }); + }else { + jQuery("#" + cfg.windowID).css({ left: 0, top: jQuery(window).scrollTop(), width: "100%" }); + } } + } }); /* ---------------------------- */ @@ -21104,21 +21238,27 @@ var AXProgress = Class.create(AXJ, { }); /* ---------------------------- */ /* http://www.axisj.com, license : http://www.axisj.com/license */ - +/** + * AXSearch + * @class AXSearch + * @extends AXJ + * @version v1.22 + * @author tom@axisj.com + * @logs + "2013-06-04 오후 2:00:44 - tom@axisj.com", + "2013-07-29 오전 9:35:19 - expandToggle 버그픽스 - tom", + "2013-09-16 오후 9:59:52 - inputBox 의 경우 엔터 작동 - tom", + "2013-11-12 오후 6:13:03 - tom : setItemValue bugFix", + "2013-12-27 오후 4:55:15 - tom : Checkbox, radio onchange 버그픽스", + "2014-05-21 - tom : mobile view mode 추가" + * + */ var AXSearch = Class.create(AXJ, { - version: "AXSearch V1.21", - author: "tom@axisj.com", - logs: [ - "2013-06-04 오후 2:00:44 - tom@axisj.com", - "2013-07-29 오전 9:35:19 - expandToggle 버그픽스 - tom", - "2013-09-16 오후 9:59:52 - inputBox 의 경우 엔터 작동 - tom", - "2013-11-12 오후 6:13:03 - tom : setItemValue bugFix", - "2013-12-27 오후 4:55:15 - tom : Checkbox, radio onchange 버그픽스" - ], initialize: function(AXJ_super) { AXJ_super(); this.config.theme = "AXSearch"; + this.config.viewMode = "dx"; }, init: function() { var cfg = this.config; @@ -21126,8 +21266,63 @@ var AXSearch = Class.create(AXJ, { trace("need targetID - setConfig({targetID:''})"); return; } + + if (cfg.mediaQuery) { + var _viewMode = "", clientWidth = axf.clientWidth(); + axf.each(cfg.mediaQuery, function (k, v) { + if (Object.isObject(v)) { + + if(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; + } + } + + this.target = axdom("#"+cfg.targetID); this.setBody(); + axdom(window).bind("resize", this.windowResize.bind(this)); }, + windowResizeApply: function () { + var cfg = this.config; + + if (cfg.mediaQuery) { + var _viewMode = "", clientWidth = axf.clientWidth(); + axf.each(cfg.mediaQuery, function (k, v) { + if (Object.isObject(v)) { + + if(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "dx" : "mx"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; + } + } + this.target.find("."+cfg.theme).removeClass("dx"); + this.target.find("."+cfg.theme).removeClass("mx"); + this.target.find("."+cfg.theme).addClass(cfg.viewMode); + }, getItem: function(gr, itemIndex, item){ var cfg = this.config; var po = []; @@ -21136,159 +21331,170 @@ var AXSearch = Class.create(AXJ, { if(item.addClass) itemAddClass.push(item.addClass); if(item.style) itemAddStyles.push(item.style); if(item.type == "label"){ - po.push("
"); + + po.push("
"); po.push(item.value); po.push("
"); + }else if(item.type == "link"){ - po.push("
"); - po.push(""); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - jQuery.each(item.options, function(idx, Opt){ - if(idx > 0) po.push(" | "); - var classOn = ""; - if(item.value == Opt.optionValue){ - classOn = " on"; - item.selectedIndex = idx; - } - po.push("", Opt.optionText,""); - }); - po.push("
"); + + po.push("
"); + po.push(""); + po.push(""); po.push("
"); + }else if(item.type == "checkBox"){ - po.push("
"); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - - var values = item.value.split(/,/g); - jQuery.each(item.options, function(idx, Opt){ - var isCheck = false; - jQuery.each(values, function(){ - if(this == Opt.optionValue){ - isCheck = true; - return false; - } - }); - po.push(""); - po.push(""); - }); - po.push("
"); + + po.push("
"); + po.push(""); po.push("
"); + }else if(item.type == "radioBox"){ - po.push("
"); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - var values = item.value.split(/,/g); - jQuery.each(item.options, function(idx, Opt){ - var isCheck = false; - jQuery.each(values, function(){ - if(this == Opt.optionValue){ - isCheck = true; - return false; - } - }); - po.push(""); - po.push(""); - }); - po.push("
"); + + po.push("
"); + po.push(""); po.push("
"); + }else if(item.type == "selectBox"){ - po.push("
"); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - var selectWidth = (item.width) ? item.width+"px" : "auto"; - po.push(" "); - po.push("
"); + + po.push("
"); + po.push(""); po.push("
"); + }else if(item.type == "inputText"){ - po.push("
"); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - }else{ - item.labelWidth = 0; - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - var inputWidth = (item.width||100).number(); - po.push(" "); - po.push("
"); + + po.push("
"); + po.push(""); po.push("
"); + }else if(item.type == "hidden"){ po.push(""); }else if(item.type == "button" || item.type == "submit"){ - po.push("
"); - po.push(""); - po.push(" "); - po.push(" "); - if(item.label){ - po.push(" "); - }else{ - item.labelWidth = 0; - } - po.push(" "); - po.push(" "); - po.push(" "); - po.push("
", item.label,""); - var inputWidth = (item.width||100).number(); - po.push(" "); - po.push("
"); + po.push("
"); + po.push(""); po.push("
"); } return po.join(''); @@ -21298,39 +21504,41 @@ var AXSearch = Class.create(AXJ, { var getItem = this.getItem.bind(this); var po = []; var AXBinds = []; - po.push("
"); - po.push("
"); - var gr = 0; - var hasHide = false; - for(;gr"); - jQuery.each(cfg.rows[gr].list, function(itemIndex, item){ - po.push(getItem(gr, itemIndex, item)); - if(item.AXBind){ - AXBinds.push({display:cfg.rows[gr].display, gr:gr, itemIndex:itemIndex, item:item}); - } - }); - po.push("
"); - po.push("
"); - gr++; - } - if(hasHide){ - po.push(""); - po.push("상세검색"); - po.push(""); - } - po.push(""); + + po.push("
"); + po.push("
"); + var gr = 0; + var hasHide = false; + for(;gr"); + jQuery.each(cfg.rows[gr].list, function(itemIndex, item){ + po.push(getItem(gr, itemIndex, item)); + if(item.AXBind){ + AXBinds.push({display:cfg.rows[gr].display, gr:gr, itemIndex:itemIndex, item:item}); + } + po.push("
"); + }); + po.push("
"); + po.push("
"); + gr++; + } + if(hasHide){ + po.push(""); + po.push("상세검색"); + po.push(""); + } + po.push(""); po.push("
"); - jQuery("#"+cfg.targetID).html(po.join('')); + this.target.html(po.join('')); if(cfg.onsubmit){ document[cfg.targetID+"_AX_form"].onsubmit = function(){ @@ -21340,18 +21548,18 @@ var AXSearch = Class.create(AXJ, { } jQuery("#"+cfg.targetID+"_AX_expandHandle").bind("click", this.expandToggle.bind(this)); - jQuery("#"+cfg.targetID).find(".searchLinkItem").bind("click", this.onclickLinkItem.bind(this)); - jQuery("#"+cfg.targetID).find(".searchCheckboxItem").bind("click", this.onclickCheckboxItem.bind(this)); - jQuery("#"+cfg.targetID).find(".searchSelectboxItem").bind("change", this.onChangeSelect.bind(this)); - jQuery("#"+cfg.targetID).find(".searchInputTextItem").bind("change", this.onChangeInput.bind(this)); - jQuery("#"+cfg.targetID).find(".searchButtonItem").bind("click", this.onclickButton.bind(this)); + this.target.find(".searchLinkItem").bind("click", this.onclickLinkItem.bind(this)); + this.target.find(".searchCheckboxItem").bind("click", this.onclickCheckboxItem.bind(this)); + this.target.find(".searchSelectboxItem").bind("change", this.onChangeSelect.bind(this)); + this.target.find(".searchInputTextItem").bind("change", this.onChangeInput.bind(this)); + this.target.find(".searchButtonItem").bind("click", this.onclickButton.bind(this)); this.AXBinds = AXBinds; var _this = this; setTimeout(function(){ _this.AXBindItems(); - }, 100); + }, 10); }, AXBindItems: function(){ var cfg = this.config; @@ -21364,7 +21572,10 @@ var AXSearch = Class.create(AXJ, { if(item.AXBind.type == "selector"){ jQuery("#"+itemID).bindSelector(item.AXBind.config); }else if(item.AXBind.type == "select"){ - jQuery("#"+itemID).bindSelect(item.AXBind.config); + try{ + jQuery("#"+itemID).bindSelect(item.AXBind.config); + }catch(e){ + } }else if(item.AXBind.type == "date"){ jQuery("#"+itemID).bindDate(item.AXBind.config); }else if(item.AXBind.type == "twinDate"){ @@ -21387,11 +21598,11 @@ var AXSearch = Class.create(AXJ, { var cfg = this.config; if(this.expanded){ jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색"); - jQuery("#"+cfg.targetID).find(".expandGroup").hide(); + this.target.find(".expandGroup").hide(); this.expanded = false; }else{ jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색창 닫기"); - jQuery("#"+cfg.targetID).find(".expandGroup").show(); + this.target.find(".expandGroup").show(); this.expanded = true; jQuery.each(this.AXBinds, function(){ @@ -21594,7 +21805,7 @@ var AXSearch = Class.create(AXJ, { * AXSelectConverter * @class AXSelectConverter * @extends AXJ - * @version v2.52 + * @version v2.53 * @author tom@axisj.com * @logs "2012-12-19 오후 12:00:43", @@ -21617,6 +21828,7 @@ var AXSearch = Class.create(AXJ, { "2014-03-31 오후 4:41:18 - tom : 셀렉트 포커스 된 상태에서 키 입력하면 입력된 값으로 select 처리 하기 (현재 영문만)", "2014-04-10 오후 6:09:44 - tom : appendAnchor, alignAnchor 방식 변경 및 크기 버그 픽스 & select element hide 에서 투명으로 변경", "2014-04-18 - tom : mobile 브라우저 버그 픽스" + "2014-05-21 tom : resize event 상속" * */ @@ -21632,10 +21844,9 @@ var AXSelectConverter = Class.create(AXJ, { this.isMobile = browser.mobile; axdom(window).resize(this.windowResize.bind(this)); }, - windowResize: function () { - if (this.windowResizeObs) clearTimeout(this.windowResizeObs); - this.windowResizeObs = setTimeout(this.alignAllAnchor.bind(this), 50); - }, + windowResizeApply: function(){ + this.alignAllAnchor(); + }, alignAllAnchor: function () { var alignAnchor = this.alignAnchor.bind(this); axf.each(this.objects, function (index, O) { @@ -24104,12 +24315,17 @@ var AXTopDownMenu = Class.create(AXJ, { var cfg = this.config; if(cfg.menuBoxID){ + + this.menuBox = axdom("#"+cfg.menuBoxID); + //서브 메뉴를 숨김 처리 합니다. - jQuery("#"+cfg.menuBoxID).find("."+cfg.childMenu.className).hide(); - jQuery("#"+cfg.menuBoxID).find("."+cfg.childsMenu.className).hide(); - + this.menuBox.find("."+cfg.childMenu.className).hide(); + this.menuBox.find("."+cfg.childsMenu.className).hide(); + this.initParents(); this.initChild(); + if(cfg.onComplete) cfg.onComplete.call(this); + }else if(cfg.targetID){ } @@ -24117,22 +24333,27 @@ var AXTopDownMenu = Class.create(AXJ, { axdom(window).bind("resize", this.windowResize.bind(this)); }, windowResizeApply: function(){ - var cfg = this.config; + var cfg = this.config, menuBoxWidth = 0; axf.each(this.tree, function(){ this.height = axdom("#" + this.id).outerHeight(); + menuBoxWidth += axdom("#" + this.id).parent().outerWidth().number() + 2; }); + //trace(menuBoxWidth); + //this.menuBox.css({width:menuBoxWidth}); }, setTree: function(tree){ var cfg = this.config; cfg.menuBoxID = cfg.targetID, _this = this; - + + if(!this.menuBox) this.menuBox = axdom("#"+cfg.menuBoxID); + var po = []; var treeFn = function(subTree){ jQuery.each(subTree, function(pi, T){ po.push("
  • "); var addClass = (T.cn && T.cn.length > 0 ) ? " class = \"" + cfg.childsMenu.hasChildClassName + "\"" : ""; - po.push(""+ T.label + ""); + po.push(""+ T.label + ""); if(T.cn && T.cn.length > 0 ){ po.push("
    "); po.push("
      "); @@ -24153,7 +24374,7 @@ var AXTopDownMenu = Class.create(AXJ, { po.push("
    • "); po.push("
      "); var addClass = (T.cn) ? " class = \"" + cfg.childMenu.hasChildClassName + "\"" : ""; - po.push(""+ T.label + ""); + po.push(""+ T.label + ""); if(T.cn){ po.push("
      "); po.push("
        "); @@ -24166,23 +24387,24 @@ var AXTopDownMenu = Class.create(AXJ, { }); po.push("
      "); po.push("
      "); - - jQuery("#"+cfg.menuBoxID).empty(); - jQuery("#"+cfg.menuBoxID).append(po.join('')); + + this.menuBox.empty(); + this.menuBox.append(po.join('')); //서브 메뉴를 숨김 처리 합니다. - jQuery("#"+cfg.menuBoxID).find("."+cfg.childMenu.className).hide(); - jQuery("#"+cfg.menuBoxID).find("."+cfg.childsMenu.className).hide(); + this.menuBox.find("."+cfg.childMenu.className).hide(); + this.menuBox.find("."+cfg.childsMenu.className).hide(); setTimeout(function(){ _this.initParents(); _this.initChild(); + if(cfg.onComplete) cfg.onComplete.call(this); }, 300); }, initParents: function(){ var cfg = this.config; - var parents = []; - jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className).each(function(pi, EL){ + var parents = [], menuBoxWidth = 0; + this.menuBox.find("." + cfg.parentMenu.className).each(function(pi, EL){ EL.id = cfg.menuBoxID + "_PM_" + pi; var _id = ""; if(jQuery(EL).children("A").get(0).id) _id = jQuery(EL).children("A").get(0).id; @@ -24195,16 +24417,18 @@ var AXTopDownMenu = Class.create(AXJ, { cn:[], coi:"" }); + menuBoxWidth += axdom(EL).parent().outerWidth().number() + 2; }); this.tree = parents; - - //trace(jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className + ">a")); - jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className + ">a").bind("mouseover", this.onoverParent.bind(this)); - jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className + ">a").bind("focus", this.onoverParent.bind(this)); + //this.menuBox.css({width:menuBoxWidth}); + + //trace(this.menuBox.find("." + cfg.parentMenu.className + ">a")); + this.menuBox.find("." + cfg.parentMenu.className + ">a").bind("mouseover", this.onoverParent.bind(this)); + this.menuBox.find("." + cfg.parentMenu.className + ">a").bind("focus", this.onoverParent.bind(this)); if(cfg.childOutClose){ var onoutChild = this.onoutChild.bind(this); - jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className + ">a").bind("mouseout", onoutChild); + this.menuBox.find("." + cfg.parentMenu.className + ">a").bind("mouseout", onoutChild); } }, onoverParent: function(event){ @@ -24308,7 +24532,7 @@ var AXTopDownMenu = Class.create(AXJ, { var cfg = this.config; var initChilds = this.initChilds.bind(this); var tree = this.tree; - jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className).each(function(pi, EL){ + this.menuBox.find("." + cfg.parentMenu.className).each(function(pi, EL){ var child = jQuery(EL).children("."+cfg.childMenu.className).get(0); if(child){ child.id = cfg.menuBoxID + "_PMC_" + pi; @@ -24548,7 +24772,8 @@ var AXTopDownMenu = Class.create(AXJ, { } }); }; - jQuery.each(tree, function(idx, T){ + + jQuery.each(this.tree, function(idx, T){ if(T._id == _id){ findedID = T.id; return false; @@ -24564,483 +24789,40 @@ var AXTopDownMenu = Class.create(AXJ, { this.setHighLightMenu(selectedMenus); return selectedMenus; } - } -}); - -var AXMobileMenu = Class.create(AXJ, { - version: "AXMobileMenu V0.4", - author: "tom@axisj.com", - logs: [ - "2013-12-13 오전 10:53:43", - "2014-02-26 오전 11:42:23 tom : 각종 버그 픽스", - "2014-02-26 오후 4:35:05 tom : hasSubMenu 분리" - ], - initialize: function(AXJ_super) { - AXJ_super(); - - this.moveSens = 0; - this.config.moveSens = 1; - this.touchMode; - this.selectedPoi = null; - this.config.width = 300; - this.config.height = 388; - this.config.reserveKeys = { - labelKey:"label", - urlKey:"url", - targetKey:"target", - addClassKey:"addClass", - subMenuKey:"cn" - }; - }, - init: function() { - var cfg = this.config; - - /* 이벤트 대소문자 확장 */ - if(!cfg.onclick) cfg.onclick = cfg.onClick; - - //var close = this.close.bind(this); - this.modal = new AXMobileModal(); - this.modal.setConfig({ - addClass:"AXMobileMenu", - height: cfg.height, - width: cfg.width, - head:{ - close:{ - onclick:function(){ - - } - } - }, - onclose: function(){ - //close(); - } - }); - - }, - open: function(){ - var cfg = this.config; - /* - var obj = this.modal.open(); - this.initMenu(obj); - */ - var onLoad = this.initMenu.bind(this); - this.modal.open(null, onLoad); - }, - initMenu: function(obj){ - var cfg = this.config; - this.modalObj = obj; - this.modalID = obj.jQueryModal.get(0).id; - - if(this.selectedPoi){ - var lpoi = this.selectedPoi.last(); - var apoi = this.selectedPoi.concat(); - apoi.pop(); - var menu = cfg.menu; - axf.each(apoi, function(idx, P){ - if(idx == 0){ - menu = menu[P]; - }else{ - menu = menu[cfg.reserveKeys.subMenuKey][P]; - } - }); - - if(menu[cfg.reserveKeys.subMenuKey] && menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey] && menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey].length > 0){ - apoi.push(lpoi); - var tpl = this.getMenu(this.modalID, menu[cfg.reserveKeys.subMenuKey][lpoi], apoi); - }else{ - var tpl = this.getMenu(this.modalID, menu, apoi); - } - }else{ - var tpl = this.getMenu(this.modalID, cfg.menu); - } - - if(AXUtil.browser.mobile){ - //obj.modalBody.unbind("touchstart.AXMobileMenu").bind("touchstart.AXMobileMenu", this.touchstart.bind(this)); - var modalBodyID = obj.modalBody.get(0).id; - var touchstart = this.touchstart.bind(this); - this.touchstartBind = function () { - touchstart(); - }; - if (document.addEventListener) { - AXgetId(modalBodyID).addEventListener("touchstart", this.touchstartBind, false); - } - }else{ - obj.modalBody.unbind("mousedown.AXMobileMenu").bind("mousedown.AXMobileMenu", this.touchstart.bind(this)); - } - - obj.modalBody.attr("onselectstart", "return false"); - obj.modalBody.addClass("AXUserSelectNone"); - obj.modalBody.bind("click.AXMobileMenu", this.onclickModalBody.bind(this)); - - /* drag cancle */ - //obj.modalBody.unbind("dragstart.AXMobileMenu").bind("dragstart.AXMobileMenu", this.cancelEvent.bind(this)); - this.printMenu(tpl); - }, - printMenu: function(tpl){ - var obj = this.modalObj; - - obj.modalHead.empty(); - obj.modalHead.append(tpl.headPo); - obj.modalBody.empty(); - obj.modalBody.append(tpl.bodyPo); - obj.modalFoot.empty(); - obj.modalFoot.append(tpl.pagePo); - - /* - obj.modalBody.hide(); - obj.modalBody.fadeIn("300"); - */ - obj.modalHead.find(".mobileMenuHome").bind("click", this.onclickHome.bind(this)); - obj.modalHead.find(".mobileMenuPrev").bind("click", this.onclickPrev.bind(this)); - - this.menuPageWidth = obj.modalBody.find(".mobileMenuBodyPage").width() + 9; - this.mobileMenuBodyScroll = obj.modalBody.find(".mobileMenuBodyScroll"); - obj.modalBody.find(".mobileMenuBodyScroll").css({width:tpl.pageNum * this.menuPageWidth}); - }, - getMenu: function(modalID, _menu, poi){ - var cfg = this.config; - var countPerBlock = 9; - var menu = _menu; - var menuTitle = ""; - if(poi == undefined || poi.length == 0) poi = []; - else{ - menuTitle = menu[cfg.reserveKeys.labelKey]; - menu = menu[cfg.reserveKeys.subMenuKey]; - } - - var headPo = []; - /* 현재 선택된 메뉴 선택 하는 기능구현 필요 */ - headPo.push('home'); - if(menuTitle != ""){ - headPo.push('', menuTitle,''); - } - - var bodyPo = []; - bodyPo.push('
      '); - bodyPo.push('
      '); - bodyPo.push('
      '); - - var ppoi = poi.join("_"); - if(ppoi != "") ppoi += "_"; - - var selectedPoi = ""; - if(this.selectedPoi){ - selectedPoi = this.selectedPoi.join("_"); - } - - axf.each(menu, function(midx, M){ - if(midx % countPerBlock == 0 && midx > 0){ - bodyPo.push('
      '); - bodyPo.push('
      '); - } - var addClass = []; - if(this[cfg.reserveKeys.addClassKey]){ - addClass.push(this[cfg.reserveKeys.addClassKey]); - } - if(selectedPoi == (ppoi + midx)){ - addClass.push("selected"); - } - bodyPo.push(''); - bodyPo.push(this[cfg.reserveKeys.labelKey]); - if(this[cfg.reserveKeys.subMenuKey] && this[cfg.reserveKeys.subMenuKey].length > 0){ - bodyPo.push(''); - } - bodyPo.push(''); - }); - bodyPo.push('
      '); - bodyPo.push('
      '); - bodyPo.push('
      '); - - var pageNum = (menu.length / (countPerBlock)).ceil(); - this.pageNo = 0; - this.pageNum = pageNum; - - var pagePo = []; - pagePo.push('
      '); - axf.each(pageNum.rangeFrom(1), function(pidx, p){ - if(pidx == 0) pagePo.push(''); - }); - pagePo.push('
      '); - - return { - headPo : headPo.join(''), - bodyPo : bodyPo.join(''), - pagePo : pagePo.join(''), - pageNum : ( pageNum ) - }; - }, - close: function(){ - var cfg = this.config; - this.modal.close(); - }, - setHighLight: function(menuID){ - var cfg = this.config; - - var menu = cfg.menu; - var pois = ""; - - var treeFn = function(subTree, parentPoi){ - axf.each(subTree, function(idx, M){ - if(M[cfg.reserveKeys.primaryKey] == menuID){ - pois = parentPoi + "_" + idx; - return false; - }else{ - if(M[cfg.reserveKeys.subMenuKey] && M[cfg.reserveKeys.subMenuKey].length > 0) treeFn(M[cfg.reserveKeys.subMenuKey], parentPoi + "_" + idx); - } - }); - }; - - axf.each(menu, function(idx, M){ - if(M[cfg.reserveKeys.primaryKey] == menuID){ - pois = idx + ""; - return false; - }else{ - if(M[cfg.reserveKeys.subMenuKey] && M[cfg.reserveKeys.subMenuKey].length > 0) treeFn(M[cfg.reserveKeys.subMenuKey], idx); - } - }); - - var poi; - if(pois != "") poi = pois.split(/_/g); - this.selectedPoi = poi; - }, - setHighLightMenu: function(menuID){ - this.setHighLight(menuID); - }, - onclickModalBody: function(event){ - var cfg = this.config; - var eid = event.target.id.split(/_AX_/g); - var eventTarget = event.target; - var myTarget = this.getEventTarget({ - evt : eventTarget, evtIDs : eid, - until:function(evt, evtIDs){ return (axdom(evt.parentNode).hasClass("mobileMenuBodyScroll")) ? true:false; }, - find:function(evt, evtIDs){ return (axdom(evt).hasClass("mobileMenuItem")) ? true : false; } - }); - - if(myTarget){ - //something - //trace(myTarget.id); - var poi = myTarget.id.split(/_AX_/g).last(); - var menu = cfg.menu; - var apoi = poi.split(/_/g); - axf.each(apoi, function(idx, P){ - if(idx == 0){ - menu = menu[P]; - }else{ - menu = menu[cfg.reserveKeys.subMenuKey][P]; - } - }); - - if(menu[cfg.reserveKeys.subMenuKey] && menu[cfg.reserveKeys.subMenuKey].length > 0){ - /* animated menu */ - var menuItem = this.modalObj.modalBody.find("#"+myTarget.id); - menuItem.css({opacity:0}); - var menuItemPos = menuItem.position(); - - var mobileMenuBody = this.modalObj.modalBody.find(".mobileMenuBodyScroll"); - var bodyPos = mobileMenuBody.position(); - var cloneMenuItem = axdom("
      " + menuItem.html() + "
      "); - mobileMenuBody.append(cloneMenuItem); - cloneMenuItem.css({ - position:"absolute", - left:menuItemPos.left, - top:menuItemPos.top - }); - - var getMenuBind = this.getMenu.bind(this); - var printMenuBind = this.printMenu.bind(this); - var modalID = this.modalID; - cloneMenuItem.animate({left:9 - bodyPos.left, top:0, width:270, height:270}, 300, "backInOut").animate({opacity:0}, 100, "expoOut", function () { - var tpl = getMenuBind(modalID, menu, apoi); - printMenuBind(tpl); - }); - - return; - }else{ - if(cfg.onclick){ - cfg.onclick.call(menu, menu); - } - } - } - }, - onclickHome: function(event){ - var cfg = this.config; - var tpl = this.getMenu(this.modalID, cfg.menu); - this.printMenu(tpl); - }, - onclickPrev: function(event){ - var cfg = this.config; - var poi = event.target.id.split(/_AX_/g).last(); - var menu = cfg.menu; - var apoi = poi.split(/_/g); - apoi.pop(); - - axf.each(apoi, function(idx, P){ - if(idx == 0){ - menu = menu[P]; - }else{ - menu = menu[cfg.reserveKeys.subMenuKey][P]; - } - }); - - var tpl = this.getMenu(this.modalID, menu, apoi); - this.printMenu(tpl); - }, - setTree: function(tree){ - this.config.menu = tree; - }, - /* 메뉴 터치 이동관련 함수 - s */ - touchstart: function (e) { - var cfg = this.config; - - var touch; - var event = window.event; - if (AXUtil.browser.mobile){ - touch = event.touches[0]; - if (!touch.pageX) return; - }else{ - var event = e; - touch = { - pageX : e.pageX, - pageY : e.pageY - }; - } - - this.touchStartXY = { - sTime: ((new Date()).getTime() / 1000), - sLeft: this.mobileMenuBodyScroll.position().left, - x: touch.pageX, - y: touch.pageY - }; - - if(AXUtil.browser.mobile){ - var event = window.event; - var touchEnd = this.touchEnd.bind(this); - this.touchEndBind = function () { - touchEnd(event); - }; - var touchMove = this.touchMove.bind(this); - this.touchMoveBind = function () { - touchMove(event); - }; - if (document.addEventListener) { - document.addEventListener("touchend", this.touchEndBind, false); - document.addEventListener("touchmove", this.touchMoveBind, false); - } - }else{ - axdom(document.body).bind("mouseup.AXMobileMenu", this.touchEnd.bind(this)); - axdom(document.body).bind("mousemove.AXMobileMenu", this.touchMove.bind(this)); - } - - this.mobileMenuBodyScroll.stop(); - }, - touchMove: function (e) { - if (this.touhEndObserver) clearTimeout(this.touhEndObserver); //닫기 명령 제거 - var cfg = this.config; - - var touch; - var event = window.event; - if (AXUtil.browser.mobile){ - touch = event.touches[0]; - if (!touch.pageX) return; - }else{ - var event = e; - touch = { - pageX : e.pageX, - pageY : e.pageY - }; - } - - if ((this.touchStartXY.x - touch.pageX).abs() < (this.touchStartXY.y - touch.pageY).abs()) { - //this.touchMode = ((this.touchStartXY.y - touch.pageY) <= 0) ? "up" : "dn"; /* 위아래 이동 */ - } else if ((this.touchStartXY.x - touch.pageX).abs() > (this.touchStartXY.y - touch.pageY).abs()) { - //this.touchMode = ((this.touchStartXY.x - touch.pageX) <= 0) ? "lt" : "rt"; /* 좌우 이동 */ - - this.moveBlock(touch.pageX - this.touchStartXY.x); - if (event.preventDefault) event.preventDefault(); - else return false; - - } - if (((this.touchStartXY.x - touch.pageX).abs() - (this.touchStartXY.y - touch.pageY).abs()).abs() < 5) { - //this.touchSelecting = true; - } - }, - touchEnd: function (e) { - var cfg = this.config; - var event = window.event || e; - //this.moveSens = 0; - //this.touchMode = false; - - if(AXUtil.browser.mobile){ - if (document.removeEventListener) { - document.removeEventListener("touchend", this.touchEndBind, false); - document.removeEventListener("touchmove", this.touchMoveBind, false); - } - }else{ - axdom(document.body).unbind("mouseup.AXMobileMenu"); - axdom(document.body).unbind("mousemove.AXMobileMenu"); - } - - var moveEndBlock = this.moveEndBlock.bind(this); - this.touhEndObserver = setTimeout(function () { - moveEndBlock(); - }, 10); - }, - moveBlock: function(moveX){ - trace(this.mobileMenuBodyScroll.width()); - var cfg = this.config; - var newLeft = (this.touchStartXY.sLeft + (moveX * 1)); - if(newLeft > this.menuPageWidth*0.5){ - newLeft = this.menuPageWidth*0.5; - }else if(newLeft < ( - this.mobileMenuBodyScroll.width()) * 1.5){ - newLeft = ( - this.mobileMenuBodyScroll.width()) * 1.5; - } - this.mobileMenuBodyScroll.css({left: newLeft}); - }, - moveEndBlock: function(){ - /* 관성발동여부 체크 */ - if(!this.touchStartXY) return; - var sTime = this.touchStartXY.sTime; - var eTime = ((new Date()).getTime() / 1000); - var dTime = eTime - sTime; - var eLeft = this.mobileMenuBodyScroll.position().left; - var dLeft = eLeft - this.touchStartXY.sLeft; - var velocity = Math.ceil((dLeft/dTime)/10); // 속력= 거리/시간 - var endLeft = Math.ceil(eLeft + velocity); //스크롤할때 목적지 - /*trace({eLeft: eLeft, velocity:velocity, endLeft:endLeft});*/ - if(endLeft > 0){ - endLeft = 0; - } - var calLeft = (endLeft.abs() % this.menuPageWidth); - var absPage = (endLeft.abs() / this.menuPageWidth).floor(); - var newLeft = 0; - if(calLeft < this.menuPageWidth/2){ - }else{ - absPage += 1; - } - if(absPage > this.pageNum-1) absPage = this.pageNum - 1; - newLeft = this.menuPageWidth * absPage; - - //trace(absPage); - this.touchStartXY.sLeft = -newLeft; - - this.mobileMenuBodyScroll.animate({left: -newLeft}, (this.mobileMenuBodyScroll.position().left + newLeft).abs(), "cubicOut", function () {}); - this.modalObj.modalFoot.find('#' + this.modalID + '_AX_pageNav_AX_' + this.pageNo).removeClass("on"); - this.modalObj.modalFoot.find('#' + this.modalID + '_AX_pageNav_AX_' + absPage).addClass("on"); - - this.pageNo = absPage; + }, + setHighLightID: function(_id){ + var cfg = this.config; + var tree = this.tree; + var findedID = ""; - this.touchStartXY = null; - }, - /* 메뉴 터치 이동관련 함수 - e */ + var treeFn = function(subTree){ + jQuery.each(subTree, function(idx, T){ + if(T.id == _id){ + findedID = T.id; + return false; + }else{ + if(T.cn) treeFn(T.cn); + } + }); + }; + jQuery.each(tree, function(idx, T){ + if(T.id == _id){ + findedID = T.id; + return false; + }else{ + if(T.cn) treeFn(T.cn); + } + }); - cancelEvent: function (event) { - event.stopPropagation(); // disable event - return false; - } + if(findedID){ + this.findedID = findedID; + var pos = findedID.split(/_PM[C]?_/g).last(); + var selectedMenus = pos.split(/_/g); + this.setHighLightMenu(selectedMenus); + return selectedMenus; + } + } }); - /* ---------------------------- */ /* http://www.axisj.com, license : http://www.axisj.com/license */ diff --git a/dist/AXJ.min.js b/dist/AXJ.min.js index 7d4a9256..63b4824c 100644 --- a/dist/AXJ.min.js +++ b/dist/AXJ.min.js @@ -1,26 +1,26 @@ function AXgetId(id){return document.getElementById(id)}function AX_A(iterable){if(!iterable)return[];if("toArray"in Object(iterable))return iterable.toArray();for(var length=iterable.length||0,results=new Array(length);length--;)results[length]=iterable[length];return results}var AXConfig={weekDays:[{label:"일"},{label:"월"},{label:"화"},{label:"수"},{label:"목"},{label:"금"},{label:"토"}],AXReq:{async:!0,okCode:"ok",responseType:"",dataType:"",contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataSendMethod:"parameter",crossDomain:!1,resultFormatter:function(){return this}},AXGrid:{passiveMode:!1,passiveRemoveHide:!1,fitToWidthRightMargin:10,fitToWidth:!1,pageSize:10,pageHeight:400,keyResult:"result",keyList:"list",emptyListMSG:"empty of list",listCountMSG:"{listCount} count(s)",pageCountMSG:"page(s)"},AXTree:{fitToWidthRightMargin:10,fitToWidth:!1,pageSize:10,pageHeight:400,keyResult:"result",keyTree:"tree",keyList:"list",emptyListMSG:"목록이 없습니다."},AXProgress:{cancelMsg:"프로세스를 취소 하시겠습니까?"},AXUpload5:{buttonTxt:"Upload files",deleteConfirm:"정말 삭제하시겠습니까?",uploadSelectTxt:"업로드 하실 파일을 선택해주세요.",dropZoneTxt:"업로드할 파일을 여기에 놓습니다."},AXModal:{contentDivClass:"bodyHeightDiv"},AXInput:{errorPrintType:"toast",selectorOptionEmpty:"목록이 없습니다.",yearText:"{year}년",monthText:"{month}월",confirmText:"확인"},AXContextMenu:{title:"선택하세요"},mobile:{responsiveWidth:0}},axf=AXUtil={async:!0,ajaxOkCode:"ok",ajaxResponseType:"",ajaxDataType:"",gridPassiveMode:!1,gridPassiveRemoveHide:!1,gridFitToWidthRightMargin:10,uniqueSeq:0,getUniqueId:function(){return axf.uniqueSeq+=1},getId:function(id){return document.getElementById(id)},each:function(obj,callback){if(obj){var name,i=0,length=obj.length,isObj=void 0===length||Object.isFunction(obj);if(isObj){for(name in obj)if(callback.call(obj[name],name,obj[name])===!1)break}else for(;length>i&&callback.call(obj[i],i,obj[i++])!==!1;);}},browser:function(){var ua=navigator.userAgent.toLowerCase(),mobile=-1!=ua.search(/mobile/g);if(-1!=ua.search(/iphone/g))return{name:"iphone",version:0,mobile:!0};if(-1!=ua.search(/ipad/g))return{name:"ipad",version:0,mobile:!0};if(-1!=ua.search(/android/g)){var match=/(android)[ \/]([\w.]+)/.exec(ua)||[],browserVersion=match[2]||"0";return{name:"android",version:browserVersion,mobile:mobile}}var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[],browser=match[1]||"",browserVersion=match[2]||"0";return"msie"==browser&&(browser="ie"),{name:browser,version:browserVersion,mobile:mobile}}(),docTD:function(){return document.compatMode&&"BackCompat"!=document.compatMode?"S":"Q"}(),timekey:function(){var d=new Date;return"A"+d.getHours().setDigit(2)+d.getMinutes().setDigit(2)+d.getSeconds().setDigit(2)+d.getMilliseconds()},overwriteObject:function(tg,obj,rewrite){return void 0==rewrite&&(rewrite=!0),obj&&AXUtil.each(obj,function(k,v){rewrite?tg[k]=v:void 0==tg[k]&&(tg[k]=v)}),tg},copyObject:function(obj){return Object.toJSON(obj).object()},consonantKR:function(cword){var cons=[{c:"ㄱ",re:"[가-깋]"},{c:"ㄲ",re:"[까-낗]"},{c:"ㄴ",re:"[나-닣]"},{c:"ㄷ",re:"[다-딯]"},{c:"ㄸ",re:"[따-띻]"},{c:"ㄹ",re:"[라-맇]"},{c:"ㅁ",re:"[마-밓]"},{c:"ㅂ",re:"[바-빟]"},{c:"ㅃ",re:"[빠-삫]"},{c:"ㅅ",re:"[사-싷]"},{c:"ㅆ",re:"[싸-앃]"},{c:"ㅇ",re:"[아-잏]"},{c:"ㅈ",re:"[자-짛]"},{c:"ㅉ",re:"[짜-찧]"},{c:"ㅊ",re:"[차-칳]"},{c:"ㅋ",re:"[카-킿]"},{c:"ㅌ",re:"[타-팋]"},{c:"ㅍ",re:"[파-핗]"},{c:"ㅎ",re:"[하-힣]"}],rword="",cwords=cword.split("");return AXUtil.each(cwords,function(i,n){var fos=cons.searchObject(function(){return this.item.c==n}),fo=fos.first();rword+=fo?fo.re:n}),rword},setCookie:function(name,value,expiredays){if(expiredays){var todayDate=new Date;todayDate.setDate(todayDate.getDate()+expiredays),document.cookie=name+"="+escape(value)+"; path=/; expires="+todayDate.toGMTString()+";"}else document.cookie=name+"="+escape(value)+"; path=/;"},getCookie:function(name){for(var nameOfCookie=name+"=",x=0;x<=document.cookie.length;){var y=x+nameOfCookie.length;if(document.cookie.substring(x,y)==nameOfCookie)return-1==(endOfCookie=document.cookie.indexOf(";",y))&&(endOfCookie=document.cookie.length),unescape(document.cookie.substring(y,endOfCookie));if(x=document.cookie.indexOf(" ",x)+1,0==x)break}return""},JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,dayLen:function(y,m){return[3,5,8,10].has(function(){return this.item==m})?30:1==m?y%4==0&&y%100!=0||y%400==0?29:28:31},clientHeight:function(){return"Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight},scrollHeight:function(){return"Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight},clientWidth:function(){return"Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth},scrollWidth:function(){return"Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth},scrollTop:function(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},scrollLeft:function(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft},Event:{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,KEY_SPACE:32,cache:{}},console:function(obj){var po="";if(arguments.length>1)for(i=0;i"+po+"
      ");else if(void 0==window.console);else try{console.log(po)}catch(e){alert(e)}},alert:function(obj){var po="";if(arguments.length>1)for(i=0;i
      '),axdom(document.body).append(AXUtil.mobileConsole)},parsingTable:function(elemObj){var head={},body=[];return elemObj.find("thead tr td").each(function(){var elem=axdom(this),attrs={key:elem.attr("name"),label:elem.html()||"",width:elem.attr("width")||"*",align:elem.attr("align")||""};head[attrs.key]=attrs}),elemObj.find("tbody tr").each(function(){var item={};axdom(this).find("td").each(function(){var elem=axdom(this);item[elem.attr("name")]=elem.html()}),body.push(item)}),{head:head,body:body}}};try{var axdom=jQuery}catch(e){var axdom=axdomConverter}var Class=function(){function subclass(){}function create(){function klass(){this.initialize.apply(this,arguments)}var parent=null,properties=AX_A(arguments);Object.isFunction(properties[0])&&(parent=properties.shift()),Object.extend(klass,Class.Methods),klass.superclass=parent,klass.subclasses=[],parent&&(subclass.prototype=parent.prototype,klass.prototype=new subclass,parent.subclasses.push(klass));for(var i=0;ii;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&"AXJ_super"==value.argumentNames().first()){var method=value;value=function(m){return function(){return ancestor[m].apply(this,arguments)}}(property).wrap(method),value.valueOf=method.valueOf.bind(method),value.toString=method.toString.bind(method)}this.prototype[property]=value}return this}return{create:create,Methods:{addMethods:addMethods}}}();!function(){function extend(destination,source){for(var property in source)destination[property]=source[property];return destination}function inspect(obj){try{return isUndefined(obj)?"undefined":null===obj?"null":obj.inspect?obj.inspect():String(obj)}catch(e){if(e instanceof RangeError)return"...";throw e}}function toJSON(object,qoute){var type=typeof object,isqoute=qoute;switch(void 0==isqoute&&(isqoute=!0),type){case"undefined":return"undefined";case"function":return;case"unknown":return"unknown";case"boolean":return object.toString();case"number":return object.toString();case"string":return object.axtoJSON(!0)}if(null===object)return"null";if(object.axtoJSON)return object.axtoJSON(isqoute);if(!isElement(object)){var results=[];for(var property in object)if(object.hasOwnProperty(property)){var value=toJSON(object[property],isqoute);isUndefined(value)||results.push(property.axtoJSON(isqoute)+":"+value)}return"{"+results.join(", ")+"}"}}function toJSONfn(object,qoute){var type=typeof object,isqoute=qoute;switch(void 0==isqoute&&(isqoute=!0),type){case"undefined":return"undefined";case"function":try{return toJSONfn(object(),isqoute)}catch(e){return}case"unknown":return"unknown";case"boolean":return object.toString();case"number":return object.toString();case"string":return object.axtoJSON(!0)}if(null===object)return"null";if(object.axtoJSON)return object.axtoJSON(isqoute);if(!isElement(object)){var results=[];for(var property in object)if(object.hasOwnProperty(property)){var value=toJSONfn(object[property],isqoute);isUndefined(value)||results.push(property.axtoJSON(isqoute)+":"+value)}return"{"+results.join(", ")+"}"}}function toJSONforMobile(object){var type=typeof object;switch(type){case"undefined":case"function":return;case"unknown":return;case"boolean":return'"'+object.toString()+'"';case"number":return'"'+object.toString()+'"';case"string":return object.axtoJSON(!0)}if(null===object)return"null";if(object.toJSONforMobile)return object.toJSONforMobile(!0);if(!isElement(object)){var results=[];for(var property in object)if(object.hasOwnProperty(property)){var value=axtoJSON(object[property]);isUndefined(value)||results.push(property.axtoJSON(!0)+":"+value)}return"{"+results.join(", ")+"}"}}function keys(obj){var results=[];for(var property in obj)results.push(property);return results}function values(obj){var results=[];for(var property in obj)results.push(obj[property]);return results}function clone(obj){return extend({},obj)}function isElement(obj){return!(!obj||1!=obj.nodeType)}function isObject(obj){return"[object Object]"==_toString.call(obj)}function isArray(obj){return"[object Array]"==_toString.call(obj)}function isHash(obj){return obj instanceof Hash}function isFunction(obj){return"function"==typeof obj}function isString(obj){return"[object String]"==_toString.call(obj)}function isNumber(obj){return"[object Number]"==_toString.call(obj)}function isUndefined(obj){return"undefined"==typeof obj}var _toString=Object.prototype.toString;extend(Object,{extend:extend,inspect:inspect,toJSON:toJSON,toJSONfn:toJSONfn,toJSONforMobile:toJSONforMobile,keys:keys,values:values,clone:clone,isElement:isElement,isObject:isObject,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isUndefined:isUndefined})}(),Object.extend(Function.prototype,function(){function update(array,args){for(var arrayLength=array.length,length=args.length;length--;)array[arrayLength+length]=args[length];return array}function merge(array,args){return array=slice.call(array,0),update(array,args)}function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return 1!=names.length||names[0]?names:[]}function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a)}}function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a)}}function delay(timeout){var __method=this,args=slice.call(arguments,1);return timeout=1e3*timeout,window.setTimeout(function(){return __method.apply(__method,args)},timeout)}function defer(){var args=update([.01],arguments);return this.delay.apply(this,args)}function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a)}}function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a)}}function addPrototype(fns){var name,length=fns.length,isObj=void 0===length||Object.isFunction(fns);if(isObj)for(name in fns)this.prototype[name]=fns[name]}var slice=Array.prototype.slice;return{argumentNames:argumentNames,bind:bind,curry:curry,delay:delay,defer:defer,wrap:wrap,methodize:methodize,addPrototype:addPrototype}}()),Object.extend(String.prototype,function(){function left(strLen){return this.toString().substr(0,strLen)}function right(strLen){return this.substring(this.length-strLen,this.length)}function dec(){var decodeURI;try{decodeURI=decodeURIComponent(this.replace(/\+/g," "))}catch(e){var decodeURI=this}return this?decodeURI:this}function enc(){return this?encodeURIComponent(this):this}function object(){try{var res=this.evalJSON()}catch(e){res={error:"syntaxerr",result:"syntaxerr",msg:"to object error, "+e.print()+", "+this};try{mask.close()}catch(e){}}return res}function array(){try{var res=this.split(/,/g)}catch(e){res={error:"syntaxerr",result:"syntaxerr",msg:"to object error, "+e.print()+", "+this}}return res}function toDate(separator,defaultDate){if(14==this.length)try{var va=this.replace(/\D/g,"");return new Date(va.substr(0,4),va.substr(4,2).number()-1,va.substr(6,2),va.substr(8,2),va.substr(10,2),va.substr(12,2))}catch(e){return defaultDate||new Date}else if(10==this.length)try{var aDate=this.split(separator||"-");return new Date(aDate[0],(aDate[1]-1).number(),aDate[2].number(),12)}catch(e){return defaultDate||new Date}else{if(8==this.length){var separator=separator||"-",va=this.replace(/\D/g,"");return(va.substr(0,4)+separator+(va.substr(4,2).number()-1)+separator+va.substr(6,2)).date()}if(this.length<10)return defaultDate||new Date;if(!(this.length>15)){var now=new Date;return defaultDate||new Date(now.getFullYear(),now.getMonth(),now.getDate(),12)}try{var aDateTime=this.split(/ /g),aDate=aDateTime[0].split(separator||"-");if(aDateTime[1])var aTime=aDateTime[1];else var aTime="09:00";var is24=!0;("AM"==aTime.right(2)||"PM"==aTime.right(2))&&(is24=!1);var aTimes=aTime.left(5).split(":"),hh=aTimes[0],mm=aTimes[1];return is24||(hh+=12),new Date(aDate[0],parseFloat(aDate[1])-1,parseFloat(aDate[2]),parseFloat(hh),parseFloat(mm))}catch(e){var now=new Date;return defaultDate||new Date(now.getFullYear(),now.getMonth(),now.getDate(),12)}}}function toNum(){var pair=this.replace(/,/g,"").split("."),isMinus=!1;parseFloat(pair[0])<0&&(isMinus=!0),"-0"==pair[0]&&(isMinus=!0);var returnValue=0;return pair[0]=pair[0].replace(/[-|+]?[\D]/gi,""),pair[1]?(pair[1]=pair[1].replace(/\D/gi,""),returnValue=parseFloat(pair[0]+"."+pair[1])||0):returnValue=parseFloat(pair[0])||0,isMinus?-returnValue:returnValue}function parseF(){return parseFloat(this)}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function stripScript(){var cStr,RegExpJS=new RegExp("<[ ]*script[^>]*>[^<]*]*>","gi");return cStr=this.replace(RegExpJS,""),cStr=cStr.replace(/[\s]*onclick[^=]*=/gi," xonclick="),cStr=cStr.replace(/[\s]*onmouserover[^=]*=/gi," xonmouseover="),cStr=cStr.replace(/[\s]*onmouseout[^=]*=/gi," xonmouseout="),cStr=cStr.replace(/[\s]*onchange[^=]*=/gi," xonchange="),cStr=cStr.replace(/[\s]*onblur[^=]*=/gi," xonblur="),cStr=cStr.replace(/[\s]*onerror[^=]*=/gi," xonerror="),cStr=cStr.replace(/[\s]*onload[^=]*=/gi," xonload="),cStr=cStr.replace(/[\s]*href[^=]*=[\s]*["']?javascript/gi,' href="xjavascript')}function times(count){return 1>count?"":new Array(count+1).join(this)}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){try{if(character in String.specialChar)return String.specialChar[character]}catch(e){}return"\\u00"+character.charCodeAt()});return useDoubleQuotes?'"'+escapedString.replace(/"/g,'\\"')+'"':""+escapedString.replace(/'/g,"\\'")}function axtoJSON(TF){return this.inspect(TF||!1)}function blank(){return/^\s*$/.test(this)}function isJSON(){var str=this;return str.isBlank()?!1:(str=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(str))}function unfilterJSON(filter){return this.replace(filter||AXUtil.JSONFilter,"$1")}function evalJSON(sanitize){var json=this.unfilterJSON();try{return!sanitize||json.isJSON()?eval("("+json+")"):{error:"syntaxerr",result:"syntaxerr",msg:"JSON syntax error. fail to convert Object\n"+this}}catch(e){return{error:"syntaxerr",result:"syntaxerr",msg:"JSON syntax error.\n"+this,body:this}}}function queryToObject(separator){var match=this.trim().match(/([^?#]*)(#.*)?$/);if(!match)return{};for(var rs=match[1].split(separator||"&"),returnObj={},i=0;i")}function ecrlf(replaceTarget,replacer){return this.replace(replaceTarget||/%0A/g,replacer||"
      ")}function formatDigit(length,padder){var string=this;return(padder||"0").times(length-string.length)+string}function getFileName(){{var sToMatch=this,reAt=/[\/\\]?([^\/\\]?\.?[^\/\\]+)$/;sToMatch.match(reAt)}return RegExp.$1}function toColor(sharp){var colorValue="";if("rgb"==this.left(3)){var val=this,reAt=/rgb\((.+)\)/;val.match(reAt);for(var vals=RegExp.$1.split(", "),a=0;ai;i++)this.charCodeAt(i)>128&&valueByte++;return valueByte}function toPhoneString(){if(""==this)return this;var _this=this.replace(/\D+/g,""),myLocalNums="",num1="",num2="",localNum="031/032/033/041/042/043/051/052/053/054/055/061/062/063/064/010/011/016/017/019/070/080/060";if("02"==_this.left(2))myLocalNums="02";else{var localNums=localNum.split(/\//g),tempNum=_this.left(3);AXUtil.each(localNums,function(){return this==tempNum?(myLocalNums=this,!1):void 0})}if(""==myLocalNums)myLocalNums="02",_this.length>7?(num1=_this.substr(0,4),num2=_this.substr(4)):(num1=_this.substr(0,3),num2=_this.substr(3));else try{var snum=myLocalNums.length;_this.length-snum>7?(num1=_this.substr(snum,4),num2=_this.substr(snum+4)):(num1=_this.substr(snum,3),num2=_this.substr(snum+3))}catch(e){}var returnString=myLocalNums;return""!=num1&&(returnString+="-"+num1),""!=num2&&(returnString+="-"+num2),returnString}function getAnchorData(){var idx=this.indexOf("#",0);if(0>idx)return"";var cnt=this.length,str=this.substring(idx+1,cnt);return str}function print(){return this}return{left:left,right:right,dec:dec,decode:dec,enc:enc,object:object,array:array,date:toDate,number:toNum,num:parseF,money:toMoney,"byte":toByte,trim:strip,delHtml:stripTags,delScript:stripScript,removeScript:stripScript,times:times,inspect:inspect,axtoJSON:axtoJSON,isBlank:blank,isJSON:isJSON,unfilterJSON:unfilterJSON,evalJSON:evalJSON,queryToObject:queryToObject,queryToObjectDec:queryToObjectDec,crlf:crlf,ecrlf:ecrlf,setDigit:formatDigit,getFileName:getFileName,toColor:toColor,lcase:lcase,ucase:ucase,getByte:getByte,phone:toPhoneString,getAnchorData:getAnchorData,print:print}}()),Object.extend(Number.prototype,function(){function left(strLen){return this.toString().substr(0,strLen)}function right(strLen){return this.toString().substring(this.toString().length-strLen,this.toString().length)}function toMoney(){var txtNumber=""+this;if(isNaN(txtNumber)||""==txtNumber)return"";var rxSplit=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),arrNumber=txtNumber.split(".");arrNumber[0]+=".";do arrNumber[0]=arrNumber[0].replace(rxSplit,"$1,$2");while(rxSplit.test(arrNumber[0]));return arrNumber.length>1?arrNumber.join(""):arrNumber[0].split(".")[0]}function toByte(){var n_unit="KB",myByte=this/1024;return myByte/1024>1&&(n_unit="MB",myByte/=1024),myByte/1024>1&&(n_unit="GB",myByte/=1024),myByte.round(1)+n_unit}function toNum(){return Math.round(1e14*this)/1e14}function formatDigit(length,padder,radix){var string=this.toString(radix||10);return(padder||"0").times(length-string.length)+string}function range(start){for(var ra=[],a=start||0;this+1>a;a++)ra.push(a);return ra}function axtoJSON(){return this}function abs(){return Math.abs(this)}function round(digit){return Math.round(Math.round(1e14*this)/1e14*Math.pow(10,digit||0))/Math.pow(10,digit||0)}function ceil(){return Math.ceil(this)}function floor(){return Math.floor(this)}function date(){return new Date(this)}function div(divisor){return 0!=divisor?this/divisor:0}function none(){return this}function times(count){return 1>count?"":new Array(count+1).join(this.toString())}function phone(){var txtNumber=""+this;return txtNumber.phone()}return{left:left,right:right,abs:abs,round:round,ceil:ceil,floor:floor,money:toMoney,"byte":toByte,num:toNum,number:toNum,setDigit:formatDigit,date:date,div:div,dec:none,enc:none,rangeFrom:range,axtoJSON:axtoJSON,times:times,phone:phone}}()),Object.extend(Date.prototype,function(){function dateAdd(daynum,interval){interval=interval||"d";var interval=interval.toLowerCase(),DyMilli=864e5,aDate=new Date(this.getUTCFullYear(),this.getMonth(),this.getDate(),12);if("d"==interval)aDate.setTime(this.getTime()+daynum*DyMilli);else if("m"==interval){var yy=aDate.getFullYear(),mm=aDate.getMonth(),dd=aDate.getDate();yy+=parseInt(daynum/12),mm+=daynum%12;var mxdd=AXUtil.dayLen(yy,mm);dd>mxdd&&(dd=mxdd),aDate=new Date(yy,mm,dd,12)}else"y"==interval&&aDate.setTime(this.getTime()+365*daynum*DyMilli);return aDate}function dayDiff(edDate,tp){var DyMilli=864e5,y1=this.getFullYear(),m1=this.getMonth(),d1=this.getDate(),hh1=this.getHours(),mm1=this.getMinutes(),dd1=new Date(y1,m1,d1,hh1,mm1,this.getSeconds()),day2=edDate.date(),y2=day2.getFullYear(),m2=day2.getMonth(),d2=day2.getDate(),hh2=day2.getHours(),mm2=day2.getMinutes(),dd2=new Date(y2,m2,d2,hh2,mm2,this.getSeconds());return void 0!=tp&&("D"==tp?(DyMilli=864e5,dd2=new Date(y2,m2,d2,hh1,mm1,this.getSeconds())):"H"==tp?DyMilli=36e5:"mm"==tp?DyMilli=6e4:(DyMilli=864e5,dd2=new Date(y2,m2,d2,hh1,mm1,this.getSeconds()))),((dd2.getTime()-dd1.getTime())/DyMilli).floor()}function toString(format){if(void 0==format){var sSeper="-";return this.getUTCFullYear()+sSeper+(this.getMonth()+1).setDigit(2)+sSeper+this.getDate().setDigit(2)}var nY,nM,nD,nH,nMM,nS,nDW,fStr=format;nY=this.getUTCFullYear(),nM=(this.getMonth()+1).setDigit(2),nD=this.getDate().setDigit(2),nH=this.getHours().setDigit(2),nMM=this.getMinutes().setDigit(2),nS=this.getSeconds().setDigit(2),nDW=this.getDay();var yre=/[^y]*(y{0,4})[^y]*/gi;yre.test(fStr);var regY=RegExp.$1,mre=/[^m]*(m{2})[^m]*/gi;mre.test(fStr);var regM=RegExp.$1,dre=/[^d]*(d{1,2})[^d]*/gi;dre.test(fStr);var regD=RegExp.$1,hre=/[^h]*(h{2})[^d]*/gi;hre.test(fStr);var regH=RegExp.$1,mire=/[^mi]*(mi)[^mi]*/gi;mire.test(fStr);var regMI=RegExp.$1,sre=/[^s]*(s{2})[^s]*/gi;sre.test(fStr);var regS=RegExp.$1,dwre=/[^d]*(dw)[^w]*/gi;dwre.test(fStr);var regDW=RegExp.$1;return regY&&(fStr=fStr.replace(regY,nY.right(regY.length))),regM&&(1==regM.length&&(nM=this.getMonth()+1),fStr=fStr.replace(regM,nM)),regD&&(1==regD.length&&(nD=this.getDate()),fStr=fStr.replace(regD,nD)),regH&&(fStr=fStr.replace(regH,nH)),regMI&&(fStr=fStr.replace(regMI,nMM)),regS&&(fStr=fStr.replace(regS,nS)),regS&&(fStr=fStr.replace(regDW,AXConfig.weekDays[nDW].label)),fStr}function getTimeAgo(){var rtnStr="",nMinute=Math.abs((new Date).diff(this,"mm")),wknames=[];return wknames.push("일","월","화","수","목","금","토"),isNaN(nMinute)?rtnStr="알수없음":parseInt(nMinute/60/24)>=1?rtnStr=this.print("yyyy년 mm월 dd일")+" "+wknames[this.getDay()]:(rtnStr=nMinute,rtnStr=nMinute/60>1?parseInt(nMinute/60)+"시간 "+nMinute%60+"분 전":nMinute+"분 전"),rtnStr}function date(){return this}function axtoJSON(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).setDigit(2)+"-"+this.getUTCDate().setDigit(2)+"T"+this.getUTCHours().setDigit(2)+":"+this.getUTCMinutes().setDigit(2)+":"+this.getUTCSeconds().setDigit(2)+'Z"'}function axGetDay(dayOfStart){void 0==dayOfStart&&(dayOfStart=0);var myDay=this.getDay()-dayOfStart;return 0>myDay&&(myDay=7+myDay),myDay}return{add:dateAdd,diff:dayDiff,print:toString,date:date,axtoJSON:axtoJSON,getTimeAgo:getTimeAgo,axGetDay:axGetDay}}()),Object.extend(Error.prototype,function(){function print(){return(65535&this.number)+" : "+this}return{print:print}}()),Object.extend(Array.prototype,function(){function clear(){return this.length=0,this}function first(){return this[0]}function last(){return this[this.length-1]}function getToSeq(seq){return seq>this.length-1?null:this[seq]}function axtoJSON(qoute){for(var results=[],i=0;iv1?-1:v1>v2?1:v1==v2?0:void 0}),tempArray.first()||{}}function getMaxObject(key){var tempArray=this.concat();return tempArray=tempArray.sort(function(pItem,nItem){var v1=pItem[key],v2=nItem[key];return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),tempArray.first()||{}}function m_notall(context){context=context||function(x){return x};for(var result=!0,i=0;i0&&(pTreeItem=pTree[T.number()],pTree=pTree[T.number()].subTree)}),L.subTree=[];var __subTreeLength=pItem.__subTreeLength;L.pHash=pHash,L.hash=pHash+"_"+__subTreeLength.setDigit(hashDigit),pTree.push(AXUtil.copyObject(L)),pItem.__subTreeLength++,pTreeItem.__subTreeLength=pItem.__subTreeLength}}return tree}function getIndex(context){Object.isFunction(context)||(findObj=context,context=function(x){return x==findObj});for(var findObject,findIndex,i=0;i
    ')},open:function(configs){axdom(document.body).append(this.mask);var bodyHeight=0;bodyHeight="Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight,configs&&(configs.onclick||(configs.onclick=configs.onClick),configs.onclick&&this.mask.bind("click.AXMask",configs.onclick))},close:function(delay){if(delay){var maskHide=this.hide.bind(this);setTimeout(maskHide,delay)}else this.mask.unbind("click.AXMask"),this.mask.remove();this.blinkTrack.clear()},hide:function(){this.mask.unbind("click.AXMask"),this.mask.remove(),this.blinkTrack.clear()},setCSS:function(CSS){this.mask.css(CSS)},addClass:function(className){this.mask.addClass(className)},removeClass:function(className){this.mask.removeClass(className)},blink:function(obj){this.blinkTrack=[{css:{opacity:.1},time:1e3},{css:{opacity:.8},time:1e3}],obj&&(this.blinkTrack=obj),this.blinking(0)},stopBlink:function(){this.blinkTrack.clear()},blinking:function(blinkIndex){if(this.blinkTrack.length>0){var blinkTrack=this.blinkTrack,onblink=this.blinking.bind(this);this.mask.animate(blinkTrack[blinkIndex].css,blinkTrack[blinkIndex].time,"circInOut",function(){onblink((blinkIndex+1)%blinkTrack.length)})}}}),mask=new AXMask;mask.setConfig();var AXNotification=Class.create(AXJ,{version:"AXNotification v1.0",author:"tom@axisj.com",logs:["2012-10-30 오후 12:01:10","2013-01-09 오후 1:46:55 push type bug fix - tom"],initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.lasBreadSeq=0,this.bread=[],this.config.easing={open:{duration:300,easing:"expoOut"},close:{duration:500,easing:"expoOut"}},this.config.eatUpTime=2500,this.config.confirmStr="확인",this.config.cancelStr="취소"},init:function(){var config=this.config;"toast"==config.type?this.toastTray=axdom('
    '):"dialog"==config.type&&(this.dialogTray=axdom('
    '))},push:function(obj){var config=this.config,breadID=config.targetID+""+this.lasBreadSeq;this.lasBreadSeq++;var po=[];if("object"!=(typeof obj).toLowerCase()?(po.push('")):(po.push('")),"toast"==config.type)AXgetId(config.targetID)||axdom(document.body).append(this.toastTray),this.bread.push({breadID:breadID,type:obj.type,html:po.join("").enc()}),this.insertBread();else if("dialog"==config.type){AXgetId(config.targetID)||axdom(document.body).append(this.dialogTray),this.dialogTray.prepend(po.join("")),mask.open();var bodyWidth="Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth,l=bodyWidth/2-this.dialogTray.width()/2;this.dialogTray.css({left:l+"px"}),axdom("#bread_AX_"+breadID).fadeIn();var endCheck=this.endCheck.bind(this);axdom("#bread_AX_"+breadID+"_AX_confirm").bind("click",function(){obj.onConfirm&&obj.onConfirm(obj.data),axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").bind("click",function(event){var eid=event.target.id.split(/_AX_/g),myBreadID=eid[1],buttonSeq=eid.last();obj.buttons&&obj.buttons[buttonSeq]&&obj.buttons[buttonSeq].onClick&&obj.buttons[buttonSeq].onClick(obj.buttons[buttonSeq].data),axdom("#bread_AX_"+myBreadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+myBreadID).remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").get(0).focus(),axdom(document.body).unbind("keyup."+breadID).bind("keyup."+breadID,function(event){event.keyCode==AXUtil.Event.KEY_ESC&&axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck(breadID)}})})}},insertBread:function(){var config=this.config;if(0!=this.bread.length&&!this.busy){this.busy=!0;var nextBread=this.nextBread.bind(this),endCheck=this.endCheck.bind(this),myQue=this.bread.first(),breadID=myQue.breadID;axdom("#"+config.targetID).prepend(myQue.html.decode()),axdom("#bread_AX_"+breadID+"_AX_confirm").bind("click",function(){axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})}),axdom("#bread_AX_"+breadID).slideDown({duration:config.easing.open.duration,easing:config.easing.open.easing,complete:function(){nextBread(),"Caution"!=myQue.type&&setTimeout(function(){axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})},config.eatUpTime)}})}},nextBread:function(){this.bread.shift(),this.busy=!1,this.insertBread()},endCheck:function(breadID){""==axdom("#"+this.config.targetID).html()&&(this.lasBreadSeq=0,"dialog"==this.config.type&&(mask.close(),breadID&&axdom(document.body).unbind("keyup."+breadID)))}}),toast=new AXNotification;toast.setConfig({targetID:"basicToast",type:"toast"});var dialog=new AXNotification;dialog.setConfig({targetID:"basicDialog",type:"dialog"});var AXScroll=Class.create(AXJ,{version:"AXScroll v1.5",author:"tom@axisj.com",logs:["2012-10-10 오전 11:17:34","2013-01-08 오후 2:33:39 스크롤대상을 스크롤바에서 컨테이너 기준으로 변경 - root","2013-01-09 오후 1:29:26 mobile 환경에서 클릭버그수정 - tom","2013-01-11 오후 4:18:21 스크롤바 드래그시 컨테이너 top 계산 수정-root","2013-01-11 오후 5:18:54 컨테이너와 스크롤타겟의 높이에 따른 스크롤바표시 관련 수정-root","2013-01-31 오후 3:10:02 스크롤바가 최소일때 휠 및 드래그 계산수정-root ","2013-02-08 오후 5:48:26 컨테이너가 스크롤타켓보다 길때 휠 함수 중단 처리 - tom","2013-02-16 오후 4:13:16 unbind 후 다시 bind할때 생기는 이벤트 중첩현상 처리 - tom","2013-08-01 오후 4:54:17 mobile touch 버그픽스 - tom ","2013-10-16 오후 6:45:48 mobile 스크롤 속도문제 패치 - tom","2013-11-28 오전 11:23:11 tom - AX scrollTop 메소드 추가","2013-12-12 오전 10:25:28 tom - moveTo 메소드 추가","2014-01-06 오후 12:55:20 tom - 관성 작용중 touchStart stop 버그픽스","2014-03-31 오후 6:26:34 root - yscroll 이 없어지면 scroll top 을 0으로"],initialize:function(AXJ_super){AXJ_super(),this.config.CT_className="AXScroll",this.config.ST_className="scrollTarget",this.scrollBarMove=!1,this.scrollBarAttr={},this.Observer=null,this.config.yscroll=!0,this.config.xscroll=!1,this.minHeightSB={TF:!1,h:0},this.minWidthSB={TF:!1,w:0}},init:function(){var config=this.config;return Object.isUndefined(config.targetID)?void trace("need targetID - setConfig({targetID:''})"):Object.isUndefined(config.scrollID)?void trace("need scrollID - setConfig({scrollID:''})"):(this.scrollTargetID=axdom("#"+config.targetID),this.scrollScrollID=axdom("#"+config.scrollID),this.scrollTargetID.addClass(this.config.CT_className),this.scrollScrollID.addClass(this.config.ST_className),this.initScroll(),void this.bindEvent())},updateScroll:function(){this.initScroll()},initScroll:function(){var cfg=this.config;if(this.scroll)cfg.yscroll||this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()});else{var po=[];cfg.yscroll?(po.push('
    '),po.push('
    ')):this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()}),cfg.xscroll&&(po.push('
    '),po.push('
    ')),this.scrollTargetID.append(po.join("")),this.scroll=!0,cfg.yscroll&&(this.scrollTrack=axdom("#"+cfg.targetID+"_AX_scrollTrack"),this.scrollBar=axdom("#"+cfg.targetID+"_AX_scrollBar")),cfg.xscroll&&(this.xscrollTrack=axdom("#"+cfg.targetID+"_AX_xscrollTrack"),this.xscrollBar=axdom("#"+cfg.targetID+"_AX_xscrollBar"))}var CTheight=this.scrollTargetID.innerHeight(),CTwidth=this.scrollTargetID.innerWidth();cfg.yscroll&&this.scrollTrack.css({height:CTheight-4}),cfg.xscroll?this.xscrollTrack.css({width:CTwidth-4}):this.scrollScrollID.css({width:CTwidth});var Cheight=this.scrollScrollID.outerHeight(),Cwidth=this.scrollScrollID.outerWidth();if(cfg.yscroll){var SBheight=CTheight*(CTheight-4)/Cheight;this.scrollBar.css({height:Math.ceil(SBheight)}),10>SBheight&&(this.minHeightSB.TF=!0,this.minHeightSB.h=SBheight),CTheight==Cheight||CTheight>Cheight?(this.scrollTrack.hide(),this.scrollBar.hide(),this.scrollScrollID.css({top:0})):(this.scrollTrack.show(),this.scrollBar.show())}if(cfg.xscroll){var SBwidth=CTwidth*(CTwidth-4)/Cwidth;this.xscrollBar.css({width:Math.ceil(SBwidth)}),10>SBwidth&&(this.minWidthSB.TF=!0,this.minWidthSB.w=SBwidth),CTwidth==Cwidth||CTwidth>Cwidth?(this.xscrollTrack.hide(),this.xscrollBar.hide()):(this.xscrollTrack.show(),this.xscrollBar.show())}},resizeScroll:function(){this.initScroll()},bindEvent:function(){{var cfg=this.config;this.scrollTargetID.innerHeight(),this.scrollScrollID.outerHeight()}if(cfg.xscroll){this.scrollTargetID.innerWidth(),this.scrollScrollID.outerWidth()}var tractActive=this.tractActive.bind(this);this.tractActiveBind=function(event){tractActive(event)};var tractInActive=this.tractInActive.bind(this);this.tractInActiveBind=function(event){tractInActive(event)};var cancelEvent=this.cancelEvent.bind(this);this.cancelEventBind=function(event){cancelEvent(event)};var SBonMouseDown=this.SBonMouseDown.bind(this);this.SBonMouseDownBind=function(event){SBonMouseDown(event)};var SBonMouseMove=this.SBonMouseMove.bind(this);this.SBonMouseMoveBind=function(event){SBonMouseMove(event)};var SBonMouseUp=this.SBonMouseUp.bind(this);if(this.SBonMouseUpBind=function(event){SBonMouseUp(event)},this.SBonWheelBind=this.SBonWheel.bind(this),this.scrollTargetID.bind("mouseover",this.tractActiveBind),this.scrollTargetID.bind("mouseout",this.tractInActiveBind),cfg.yscroll&&(this.scrollBar.bind("dragstart",this.cancelEventBind),this.scrollBar.bind("mousedown",this.SBonMouseDownBind)),cfg.xscroll){var SBonMouseDownX=this.SBonMouseDownX.bind(this);this.SBonMouseDownXBind=function(event){SBonMouseDownX(event)};var SBonMouseMoveX=this.SBonMouseMoveX.bind(this);this.SBonMouseMoveXBind=function(event){SBonMouseMoveX(event)};var SBonMouseUpX=this.SBonMouseUpX.bind(this);this.SBonMouseUpXBind=function(event){SBonMouseUpX(event)},this.xscrollBar.bind("dragstart",this.cancelEventBind),this.xscrollBar.bind("mousedown",this.SBonMouseDownXBind)}var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";if(document.attachEvent?AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).attachEvent("on"+mousewheelevt,this.SBonWheelBind):document.addEventListener&&AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener(mousewheelevt,this.SBonWheelBind,!1),document.addEventListener){var touchstart=this.touchstart.bind(this);this.touchstartBind=function(){touchstart()},AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener("touchstart",this.touchstartBind,!1)}},tractActive:function(){var cfg=this.config;cfg.yscroll&&(this.scrollBar.addClass("scrollBar_hover"),this.scrollTrack.addClass("scrollTrack_hover")),cfg.xscroll&&(this.xscrollBar.addClass("xscrollBar_hover"),this.xscrollTrack.addClass("xscrollTrack_hover")),this.Observer&&clearTimeout(this.Observer),this.initScroll()},tractInActive:function(){var SBonWheelEnd=this.SBonWheelEnd.bind(this);this.Observer=setTimeout(function(){SBonWheelEnd()},500)},getMousePosition:function(event){var pos=(this.config,this.scrollTrack?this.scrollTrack.offset():{left:0,top:0}),posx=this.xscrollTrack?this.xscrollTrack.offset():{left:0,top:0},x=event.pageX-posx.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPosition:function(event){var touch=(this.config,event.touches[0]),pos=this.scrollTrack.offset();if(this.config.touchDirection)var x=touch.pageX-pos.left,y=touch.pageY-pos.top;else var x=-touch.pageX-pos.left,y=-touch.pageY-pos.top;return{x:x,y:y}},touchstart:function(){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){this.touchStartXY={sTime:(new Date).getTime()/1e3,sTop:this.scrollScrollID.position().top,sLeft:this.scrollScrollID.position().left,scrollWidth:this.scrollScrollID.outerWidth(),scrollHeight:this.scrollScrollID.outerHeight(),targetWidth:this.scrollTargetID.outerWidth(),targetHeight:this.scrollTargetID.outerHeight(),x:touch.pageX,y:touch.pageY};var touchEnd=this.touchEnd.bind(this);this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)),document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1));var minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth),minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight),scrollPosition=this.scrollScrollID.position();(scrollPosition.leftmaxLeft||scrollPosition.topmaxTop)&&(this.scrollScrollID.stop(),cfg.yscroll&&this.scrollBar.stop(),cfg.xscroll&&this.xscrollBar.stop()),this.tractActive()}},touchMove:function(){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs()){if(cfg.yscroll&&this.touchStartXY.scrollHeight>this.touchStartXY.targetHeight){this.touchMode="ns";var touchDirection=this.touchStartXY.y-touch.pageY<=0?"T":"B";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({top:touch.pageY-this.touchStartXY.y})){if(!event.preventDefault)return!1;event.preventDefault()}}}else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()&&cfg.xscroll&&this.touchStartXY.scrollWidth>this.touchStartXY.targetWidth){this.touchMode="we";var touchDirection=this.touchStartXY.x-touch.pageX<=0?"L":"R";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({left:touch.pageX-this.touchStartXY.x})){if(!event.preventDefault)return!1;event.preventDefault()}}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5;var touchMoveAfter=this.touchMoveAfter.bind(this);this.touhMoveObserver=setTimeout(function(){touchMoveAfter(touch)},50)}},touchMoveAfter:function(touch){try{this.touchStartXY.sTime=(new Date).getTime()/1e3,this.touchStartXY.sTop=this.scrollScrollID.position().top,this.touchStartXY.sLeft=this.scrollScrollID.position().left,this.touchStartXY.x=touch.pageX,this.touchStartXY.y=touch.pageY}catch(e){}},touchEnd:function(e){this.config,window.event||e;document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1));var moveEndBlock=this.moveEndBlock.bind(this);this.touchStartXY&&(this.touhEndObserver=setTimeout(function(){moveEndBlock()},10))},moveBlock:function(moveXY){var cfg=this.config,returnTF=!0;if(void 0!=moveXY.left){var newLeft=this.touchStartXY.sLeft+moveXY.left,minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth);cfg.bounces&&(minLeft=.4*this.touchStartXY.targetWidth,maxLeft=-(1.2*(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth))),newLeft>minLeft?(newLeft=minLeft,returnTF=!1):maxLeft>newLeft&&(newLeft=maxLeft,returnTF=!1),this.scrollScrollID.css({left:newLeft}),this.setScrollbarPositionForWheel("left")}else if(void 0!=moveXY.top){var newTop=this.touchStartXY.sTop+moveXY.top,minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight);cfg.bounces&&(minTop=.4*this.touchStartXY.targetHeight,maxTop=-(1.2*(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight))),newTop>minTop?(newTop=minTop,returnTF=!1):maxTop>newTop&&(newTop=maxTop,returnTF=!1),this.scrollScrollID.css({top:newTop}),this.setScrollbarPositionForWheel("top")}return returnTF},moveEndBlock:function(){if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,tractInActive=this.tractInActive.bind(this);if("we"==this.touchMode){if(this.touchStartXY.scrollWidth<=this.touchStartXY.targetWidth)return;var eLeft=this.scrollScrollID.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocityLeft=Math.ceil(dLeft/dTime/1),endLeft=Math.ceil(eLeft+velocityLeft);endLeft>0?endLeft=0:endLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(endLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth));var newLeft=endLeft.abs();if(this.touchStartXY.sLeft=-newLeft,this.scrollScrollID.animate({left:-newLeft},(eLeft+newLeft).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("left",(eLeft+newLeft).abs(),"circOut",{left:-newLeft}),cfg.yscroll){var eTop=this.scrollScrollID.position().top,topChange=!1;eTop>0?(eTop=0,topChange=!0):eTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(eTop=this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight,topChange=!0),topChange&&this.scrollScrollID.css({top:-eTop})}}else{if(this.touchStartXY.scrollHeight<=this.touchStartXY.targetHeight)return;var eTop=this.scrollScrollID.position().top,dTop=eTop-this.touchStartXY.sTop,velocityTop=Math.ceil(dTop/dTime/1),endTop=Math.ceil(eTop+velocityTop);endTop>0?endTop=0:endTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(endTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight));var newTop=endTop.abs();if(this.touchStartXY.sTop=-newTop,this.scrollScrollID.animate({top:-newTop},(eTop+newTop).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("top",(eTop+newTop).abs(),"circOut",{top:-newTop}),cfg.xscroll){var eLeft=this.scrollScrollID.position().left,leftChange=!1;eLeft>0?(eLeft=0,leftChange=!0):eLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(eLeft=this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth,leftChange=!0),leftChange&&this.scrollScrollID.css({left:-eLeft})}}this.touchStartXY=null}},SBonMouseDown:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.scrollBar.position(),SBh=this.scrollBar.height(),STh=this.scrollTrack.height(),Ch=this.scrollScrollID.outerHeight();this.Ch=Ch,this.STh=STh,this.scrollBarAttr={x:(SBpos.left-pos.x).number(),y:(SBpos.top-pos.y).number(),h:SBh.number(),sth:STh},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpBind)},SBonMouseMove:function(event){this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone");var pos=this.getMousePosition(event),SBy=pos.y+this.scrollBarAttr.y;2>SBy&&(SBy=2),SBy+this.scrollBarAttr.h>this.scrollBarAttr.sth&&(SBy=this.scrollBarAttr.sth-this.scrollBarAttr.h+2),this.scrollBar.css({top:SBy}),this.setContentPosition()}},SBonMouseUp:function(){if(this.scrollBarMove){{this.config}this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonMouseDownX:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.xscrollBar.position(),SBw=this.xscrollBar.width(),STw=this.xscrollTrack.width(),Cw=this.scrollScrollID.outerWidth();this.Cw=Cw,this.STw=STw,this.scrollBarAttr={x:(SBpos.left-pos.x).number(),w:SBw.number(),stw:STw},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveXBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpXBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpXBind)},SBonMouseMoveX:function(event){this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone");var pos=this.getMousePosition(event),SBx=pos.x+this.scrollBarAttr.x;2>SBx&&(SBx=2),SBx+this.scrollBarAttr.w>this.scrollBarAttr.stw&&(SBx=this.scrollBarAttr.stw-this.scrollBarAttr.w+2),this.xscrollBar.css({left:SBx}),this.setContentPosition("xscroll")}},SBonMouseUpX:function(){if(this.scrollBarMove){{this.config}this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonWheel:function(e){var event=(this.config,window.event||e),delta=event.detail?-10*event.detail:event.wheelDelta,Sy=this.scrollScrollID.position().top,Sh=this.scrollScrollID.outerHeight(),TGh=this.scrollTargetID.height();if(!(TGh>Sh)){var eventCancle=!1;return Sy+=delta,Sy>0&&(Sy=0,eventCancle=!0),TGh>Sh+Sy&&(Sy=TGh-Sh,eventCancle=!0),this.scrollScrollID.css({top:Sy}),this.setScrollbarPositionForWheel("top"),eventCancle?void 0:(event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1)}},SBonWheelEnd:function(){if(!this.scrollBarMove){var config=this.config;config.yscroll&&(this.scrollBar.removeClass("scrollBar_hover"),this.scrollTrack.removeClass("scrollTrack_hover")),config.xscroll&&(this.xscrollBar.removeClass("xscrollBar_hover"),this.xscrollTrack.removeClass("xscrollTrack_hover"))}},cancelEvent:function(event){return event.stopPropagation(),!1},setContentPosition:function(xscroll){this.config;if("xscroll"==xscroll){var SBx=this.xscrollBar.position().left,STw=this.STw,Cw=this.Cw,CTwidth=this.CTwidth,Cwidth=this.Cwidth,SBwidth=CTwidth*(CTwidth-4)/Cwidth;if(10>SBwidth){var addLeft,Cleft;2==SBx&&(SBx=0),addLeft=(10-this.minWidthSB.w)/(STw-10)*SBx,addLeft=0==addLeft?addLeft=0:addLeft-=1,Cleft=STw-10>SBx?(SBx+addLeft)*Cw/STw:Cw-CTwidth,SBx==STw&&(Cleft=Cw-CTwidth)}else{SBx=2==SBx?SBx=0:SBx-=2;var Cleft=SBx*Cw/STw}this.scrollScrollID.css({left:-Cleft.round()})}else{var SBy=this.scrollBar.position().top,STh=this.STh,Ch=this.Ch,CTheight=this.CTheight,Cheight=this.Cheight,SBheight=CTheight*(CTheight-4)/Cheight;if(10>SBheight){var addTop,Ctop;2==SBy&&(SBy=0),addTop=(10-this.minHeightSB.h)/(STh-10)*SBy,addTop=0==addTop?addTop=0:addTop-=1,Ctop=STh-10>SBy?(SBy+addTop)*Ch/STh:Ch-CTheight,SBy==STh&&(Ctop=Ch-CTheight)}else{SBy=2==SBy?SBy=0:SBy-=2;var Ctop=SBy*Ch/STh}this.scrollScrollID.css({top:-Ctop.round()})}},setScrollbarPositionForWheel:function(direction,duration,easing,position){var config=this.config;if("left"==direction){if(position)var Sy=position.left;else var Sy=this.scrollScrollID.position().left;var STh=this.xscrollTrack.outerWidth(),Sh=this.scrollScrollID.outerWidth(),SBh=this.xscrollBar.outerWidth(),SBy=-Sy*STh/Sh,addTop=0;this.minWidthSB.TF&&(addTop=Math.floor((10-this.minWidthSB.h)/(STh-4-10)*SBy));var addY=0;2>SBy?(addY=SBy.abs(),SBy=2):(addY=0,SBy-=addTop,SBy+SBh>STh&&(addY=SBy+SBh-STh,SBy=STh-SBh+2)),easing?this.xscrollBar.animate({left:SBy,width:Math.ceil(this.scrollTargetID.outerWidth()*(this.scrollTargetID.outerWidth()-4)/(this.scrollScrollID.outerWidth()+addY))},duration,easing,function(){}):this.xscrollBar.css({left:SBy,width:Math.ceil(this.scrollTargetID.outerWidth()*(this.scrollTargetID.outerWidth()-4)/(this.scrollScrollID.outerWidth()+addY))})}else{if(!config.yscroll)return!1;if(position)var Sy=position.top;else var Sy=this.scrollScrollID.position().top;var STh=this.scrollTrack.outerHeight(),Sh=this.scrollScrollID.outerHeight(),SBh=this.scrollBar.outerHeight(),SBy=-Sy*STh/Sh,addTop=0;this.minHeightSB.TF&&(addTop=Math.floor((10-this.minHeightSB.h)/(STh-4-10)*SBy));var addY=0;2>SBy?(addY=SBy.abs(),SBy=2):(addY=0,SBy-=addTop,SBy+SBh>STh&&(addY=SBy+SBh-STh,SBy=STh-SBh+2)),easing?this.scrollBar.animate({top:SBy,height:Math.ceil(this.scrollTargetID.outerHeight()*(this.scrollTargetID.outerHeight()-4)/(this.scrollScrollID.outerHeight()+addY))},duration,easing,function(){}):this.scrollBar.css({top:SBy,height:Math.ceil(this.scrollTargetID.outerHeight()*(this.scrollTargetID.outerHeight()-4)/(this.scrollScrollID.outerHeight()+addY))}) +},init:function(){trace(Object.toJSON(this.config))},info:function(dispType){if(void 0==dispType||"console"==dispType)trace(this.version+"\n"+this.logs.join("\n"));else if("alert"==dispType)AXUtil.alert(this.version+"\n"+this.logs.join("\n"));else if("return"==dispType)return this.version+"\n"+this.logs.join("\n")},echo:function(msg,mtype){void 0==mtype||"console"==mtype?trace(msg):"alert"==mtype?AXUtil.alert(msg):"toast"==mtype?toast.push(msg):"dialog"==mtype&&dialog.push(msg)},setConfig:function(configs){var _self=this;configs&&AXUtil.each(configs,function(k,v){_self.config[k]=v}),_self.config.target&&(void 0===_self.config.target.id||""==_self.config.target.id)&&axdom(_self.config.target).attr("id",_self.config.target.id=_self.config.targetID="AXJUnique_"+axf.getUniqueId()),this.init()},changeConfig:function(configs){var _self=this;configs&&AXUtil.each(configs,function(k,v){_self.config[k]=v})},getEventTarget:function(arg){var eventTarget=arg.evt,eid=eventTarget&&eventTarget.id&&""!=eventTarget.id?eventTarget.id.split(/_AX_/g):[];if(eventTarget)for(;!arg.find(eventTarget,eid);){if(!eventTarget.parentNode){eventTarget=null;break}if(arg.until&&arg.until(eventTarget,eid)){eventTarget=null;break}if(!eventTarget.parentNode)break;eventTarget=eventTarget.parentNode;try{eid=eventTarget&&eventTarget.id&&""!=eventTarget.id?eventTarget.id.split(/_AX_/g):[]}catch(e){eid=[]}}return eventTarget},getMousePositon:function(event){var eventDoc,doc,body;eventDoc=document,doc=eventDoc.documentElement,body=eventDoc.body;var css={};return css.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),css.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0),css},_GID:function(ids){for(var myid=[],a=0;a
  • ')},open:function(configs){axdom(document.body).append(this.mask);var bodyHeight=0;bodyHeight="Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight,configs&&(configs.onclick||(configs.onclick=configs.onClick),configs.onclick&&this.mask.bind("click.AXMask",configs.onclick))},close:function(delay){if(delay){var maskHide=this.hide.bind(this);setTimeout(maskHide,delay)}else this.mask.unbind("click.AXMask"),this.mask.remove();this.blinkTrack.clear()},hide:function(){this.mask.unbind("click.AXMask"),this.mask.remove(),this.blinkTrack.clear()},setCSS:function(CSS){this.mask.css(CSS)},addClass:function(className){this.mask.addClass(className)},removeClass:function(className){this.mask.removeClass(className)},blink:function(obj){this.blinkTrack=[{css:{opacity:.1},time:1e3},{css:{opacity:.8},time:1e3}],obj&&(this.blinkTrack=obj),this.blinking(0)},stopBlink:function(){this.blinkTrack.clear()},blinking:function(blinkIndex){if(this.blinkTrack.length>0){var blinkTrack=this.blinkTrack,onblink=this.blinking.bind(this);this.mask.animate(blinkTrack[blinkIndex].css,blinkTrack[blinkIndex].time,"circInOut",function(){onblink((blinkIndex+1)%blinkTrack.length)})}}}),mask=new AXMask;mask.setConfig();var AXNotification=Class.create(AXJ,{version:"AXNotification v1.0",author:"tom@axisj.com",logs:["2012-10-30 오후 12:01:10","2013-01-09 오후 1:46:55 push type bug fix - tom"],initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.lasBreadSeq=0,this.bread=[],this.config.easing={open:{duration:300,easing:"expoOut"},close:{duration:500,easing:"expoOut"}},this.config.eatUpTime=2500,this.config.confirmStr="확인",this.config.cancelStr="취소"},init:function(){var config=this.config;"toast"==config.type?this.toastTray=axdom('
    '):"dialog"==config.type&&(this.dialogTray=axdom('
    '))},push:function(obj){var config=this.config,breadID=config.targetID+""+this.lasBreadSeq;this.lasBreadSeq++;var po=[];if("object"!=(typeof obj).toLowerCase()?(po.push('")):(po.push('")),"toast"==config.type)AXgetId(config.targetID)||axdom(document.body).append(this.toastTray),this.bread.push({breadID:breadID,type:obj.type,html:po.join("").enc()}),this.insertBread();else if("dialog"==config.type){AXgetId(config.targetID)||axdom(document.body).append(this.dialogTray),this.dialogTray.prepend(po.join("")),mask.open();var bodyWidth="Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth,l=bodyWidth/2-this.dialogTray.width()/2;this.dialogTray.css({left:l+"px"}),axdom("#bread_AX_"+breadID).fadeIn();var endCheck=this.endCheck.bind(this);axdom("#bread_AX_"+breadID+"_AX_confirm").bind("click",function(){obj.onConfirm&&obj.onConfirm(obj.data),axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").bind("click",function(event){var eid=event.target.id.split(/_AX_/g),myBreadID=eid[1],buttonSeq=eid.last();obj.buttons&&obj.buttons[buttonSeq]&&obj.buttons[buttonSeq].onClick&&obj.buttons[buttonSeq].onClick(obj.buttons[buttonSeq].data),axdom("#bread_AX_"+myBreadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+myBreadID).remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").get(0).focus(),axdom(document.body).unbind("keyup."+breadID).bind("keyup."+breadID,function(event){event.keyCode==AXUtil.Event.KEY_ESC&&axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck(breadID)}})})}},insertBread:function(){var config=this.config;if(0!=this.bread.length&&!this.busy){this.busy=!0;var nextBread=this.nextBread.bind(this),endCheck=this.endCheck.bind(this),myQue=this.bread.first(),breadID=myQue.breadID;axdom("#"+config.targetID).prepend(myQue.html.decode()),axdom("#bread_AX_"+breadID+"_AX_confirm").bind("click",function(){axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})}),axdom("#bread_AX_"+breadID).slideDown({duration:config.easing.open.duration,easing:config.easing.open.easing,complete:function(){nextBread(),"Caution"!=myQue.type&&setTimeout(function(){axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck()}})},config.eatUpTime)}})}},nextBread:function(){this.bread.shift(),this.busy=!1,this.insertBread()},endCheck:function(breadID){""==axdom("#"+this.config.targetID).html()&&(this.lasBreadSeq=0,"dialog"==this.config.type&&(mask.close(),breadID&&axdom(document.body).unbind("keyup."+breadID)))}}),toast=new AXNotification;toast.setConfig({targetID:"basicToast",type:"toast"});var dialog=new AXNotification;dialog.setConfig({targetID:"basicDialog",type:"dialog"});var AXScroll=Class.create(AXJ,{version:"AXScroll v1.5",author:"tom@axisj.com",logs:["2012-10-10 오전 11:17:34","2013-01-08 오후 2:33:39 스크롤대상을 스크롤바에서 컨테이너 기준으로 변경 - root","2013-01-09 오후 1:29:26 mobile 환경에서 클릭버그수정 - tom","2013-01-11 오후 4:18:21 스크롤바 드래그시 컨테이너 top 계산 수정-root","2013-01-11 오후 5:18:54 컨테이너와 스크롤타겟의 높이에 따른 스크롤바표시 관련 수정-root","2013-01-31 오후 3:10:02 스크롤바가 최소일때 휠 및 드래그 계산수정-root ","2013-02-08 오후 5:48:26 컨테이너가 스크롤타켓보다 길때 휠 함수 중단 처리 - tom","2013-02-16 오후 4:13:16 unbind 후 다시 bind할때 생기는 이벤트 중첩현상 처리 - tom","2013-08-01 오후 4:54:17 mobile touch 버그픽스 - tom ","2013-10-16 오후 6:45:48 mobile 스크롤 속도문제 패치 - tom","2013-11-28 오전 11:23:11 tom - AX scrollTop 메소드 추가","2013-12-12 오전 10:25:28 tom - moveTo 메소드 추가","2014-01-06 오후 12:55:20 tom - 관성 작용중 touchStart stop 버그픽스","2014-03-31 오후 6:26:34 root - yscroll 이 없어지면 scroll top 을 0으로"],initialize:function(AXJ_super){AXJ_super(),this.config.CT_className="AXScroll",this.config.ST_className="scrollTarget",this.scrollBarMove=!1,this.scrollBarAttr={},this.Observer=null,this.config.yscroll=!0,this.config.xscroll=!1,this.minHeightSB={TF:!1,h:0},this.minWidthSB={TF:!1,w:0}},init:function(){var config=this.config;return Object.isUndefined(config.targetID)?void trace("need targetID - setConfig({targetID:''})"):Object.isUndefined(config.scrollID)?void trace("need scrollID - setConfig({scrollID:''})"):(this.scrollTargetID=axdom("#"+config.targetID),this.scrollScrollID=axdom("#"+config.scrollID),this.scrollTargetID.addClass(this.config.CT_className),this.scrollScrollID.addClass(this.config.ST_className),this.initScroll(),void this.bindEvent())},updateScroll:function(){this.initScroll()},initScroll:function(){var cfg=this.config;if(this.scroll)cfg.yscroll||this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()});else{var po=[];cfg.yscroll?(po.push('
    '),po.push('
    ')):this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()}),cfg.xscroll&&(po.push('
    '),po.push('
    ')),this.scrollTargetID.append(po.join("")),this.scroll=!0,cfg.yscroll&&(this.scrollTrack=axdom("#"+cfg.targetID+"_AX_scrollTrack"),this.scrollBar=axdom("#"+cfg.targetID+"_AX_scrollBar")),cfg.xscroll&&(this.xscrollTrack=axdom("#"+cfg.targetID+"_AX_xscrollTrack"),this.xscrollBar=axdom("#"+cfg.targetID+"_AX_xscrollBar"))}var CTheight=this.scrollTargetID.innerHeight(),CTwidth=this.scrollTargetID.innerWidth();cfg.yscroll&&this.scrollTrack.css({height:CTheight-4}),cfg.xscroll?this.xscrollTrack.css({width:CTwidth-4}):this.scrollScrollID.css({width:CTwidth});var Cheight=this.scrollScrollID.outerHeight(),Cwidth=this.scrollScrollID.outerWidth();if(cfg.yscroll){var SBheight=CTheight*(CTheight-4)/Cheight;this.scrollBar.css({height:Math.ceil(SBheight)}),10>SBheight&&(this.minHeightSB.TF=!0,this.minHeightSB.h=SBheight),CTheight==Cheight||CTheight>Cheight?(this.scrollTrack.hide(),this.scrollBar.hide(),this.scrollScrollID.css({top:0})):(this.scrollTrack.show(),this.scrollBar.show())}if(cfg.xscroll){var SBwidth=CTwidth*(CTwidth-4)/Cwidth;this.xscrollBar.css({width:Math.ceil(SBwidth)}),10>SBwidth&&(this.minWidthSB.TF=!0,this.minWidthSB.w=SBwidth),CTwidth==Cwidth||CTwidth>Cwidth?(this.xscrollTrack.hide(),this.xscrollBar.hide()):(this.xscrollTrack.show(),this.xscrollBar.show())}},resizeScroll:function(){this.initScroll()},bindEvent:function(){{var cfg=this.config;this.scrollTargetID.innerHeight(),this.scrollScrollID.outerHeight()}if(cfg.xscroll){this.scrollTargetID.innerWidth(),this.scrollScrollID.outerWidth()}var tractActive=this.tractActive.bind(this);this.tractActiveBind=function(event){tractActive(event)};var tractInActive=this.tractInActive.bind(this);this.tractInActiveBind=function(event){tractInActive(event)};var cancelEvent=this.cancelEvent.bind(this);this.cancelEventBind=function(event){cancelEvent(event)};var SBonMouseDown=this.SBonMouseDown.bind(this);this.SBonMouseDownBind=function(event){SBonMouseDown(event)};var SBonMouseMove=this.SBonMouseMove.bind(this);this.SBonMouseMoveBind=function(event){SBonMouseMove(event)};var SBonMouseUp=this.SBonMouseUp.bind(this);if(this.SBonMouseUpBind=function(event){SBonMouseUp(event)},this.SBonWheelBind=this.SBonWheel.bind(this),this.scrollTargetID.bind("mouseover",this.tractActiveBind),this.scrollTargetID.bind("mouseout",this.tractInActiveBind),cfg.yscroll&&(this.scrollBar.bind("dragstart",this.cancelEventBind),this.scrollBar.bind("mousedown",this.SBonMouseDownBind)),cfg.xscroll){var SBonMouseDownX=this.SBonMouseDownX.bind(this);this.SBonMouseDownXBind=function(event){SBonMouseDownX(event)};var SBonMouseMoveX=this.SBonMouseMoveX.bind(this);this.SBonMouseMoveXBind=function(event){SBonMouseMoveX(event)};var SBonMouseUpX=this.SBonMouseUpX.bind(this);this.SBonMouseUpXBind=function(event){SBonMouseUpX(event)},this.xscrollBar.bind("dragstart",this.cancelEventBind),this.xscrollBar.bind("mousedown",this.SBonMouseDownXBind)}var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";if(document.attachEvent?AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).attachEvent("on"+mousewheelevt,this.SBonWheelBind):document.addEventListener&&AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener(mousewheelevt,this.SBonWheelBind,!1),document.addEventListener){var touchstart=this.touchstart.bind(this);this.touchstartBind=function(){touchstart()},AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener("touchstart",this.touchstartBind,!1)}},tractActive:function(){var cfg=this.config;cfg.yscroll&&(this.scrollBar.addClass("scrollBar_hover"),this.scrollTrack.addClass("scrollTrack_hover")),cfg.xscroll&&(this.xscrollBar.addClass("xscrollBar_hover"),this.xscrollTrack.addClass("xscrollTrack_hover")),this.Observer&&clearTimeout(this.Observer),this.initScroll()},tractInActive:function(){var SBonWheelEnd=this.SBonWheelEnd.bind(this);this.Observer=setTimeout(function(){SBonWheelEnd()},500)},getMousePosition:function(event){var pos=(this.config,this.scrollTrack?this.scrollTrack.offset():{left:0,top:0}),posx=this.xscrollTrack?this.xscrollTrack.offset():{left:0,top:0},x=event.pageX-posx.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPosition:function(event){var touch=(this.config,event.touches[0]),pos=this.scrollTrack.offset();if(this.config.touchDirection)var x=touch.pageX-pos.left,y=touch.pageY-pos.top;else var x=-touch.pageX-pos.left,y=-touch.pageY-pos.top;return{x:x,y:y}},touchstart:function(){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){this.touchStartXY={sTime:(new Date).getTime()/1e3,sTop:this.scrollScrollID.position().top,sLeft:this.scrollScrollID.position().left,scrollWidth:this.scrollScrollID.outerWidth(),scrollHeight:this.scrollScrollID.outerHeight(),targetWidth:this.scrollTargetID.outerWidth(),targetHeight:this.scrollTargetID.outerHeight(),x:touch.pageX,y:touch.pageY};var touchEnd=this.touchEnd.bind(this);this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)),document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1));var minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth),minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight),scrollPosition=this.scrollScrollID.position();(scrollPosition.leftmaxLeft||scrollPosition.topmaxTop)&&(this.scrollScrollID.stop(),cfg.yscroll&&this.scrollBar.stop(),cfg.xscroll&&this.xscrollBar.stop()),this.tractActive()}},touchMove:function(){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs()){if(cfg.yscroll&&this.touchStartXY.scrollHeight>this.touchStartXY.targetHeight){this.touchMode="ns";var touchDirection=this.touchStartXY.y-touch.pageY<=0?"T":"B";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({top:touch.pageY-this.touchStartXY.y})){if(!event.preventDefault)return!1;event.preventDefault()}}}else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()&&cfg.xscroll&&this.touchStartXY.scrollWidth>this.touchStartXY.targetWidth){this.touchMode="we";var touchDirection=this.touchStartXY.x-touch.pageX<=0?"L":"R";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({left:touch.pageX-this.touchStartXY.x})){if(!event.preventDefault)return!1;event.preventDefault()}}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5;var touchMoveAfter=this.touchMoveAfter.bind(this);this.touhMoveObserver=setTimeout(function(){touchMoveAfter(touch)},50)}},touchMoveAfter:function(touch){try{this.touchStartXY.sTime=(new Date).getTime()/1e3,this.touchStartXY.sTop=this.scrollScrollID.position().top,this.touchStartXY.sLeft=this.scrollScrollID.position().left,this.touchStartXY.x=touch.pageX,this.touchStartXY.y=touch.pageY}catch(e){}},touchEnd:function(e){this.config,window.event||e;document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1));var moveEndBlock=this.moveEndBlock.bind(this);this.touchStartXY&&(this.touhEndObserver=setTimeout(function(){moveEndBlock()},10))},moveBlock:function(moveXY){var cfg=this.config,returnTF=!0;if(void 0!=moveXY.left){var newLeft=this.touchStartXY.sLeft+moveXY.left,minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth);cfg.bounces&&(minLeft=.4*this.touchStartXY.targetWidth,maxLeft=-(1.2*(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth))),newLeft>minLeft?(newLeft=minLeft,returnTF=!1):maxLeft>newLeft&&(newLeft=maxLeft,returnTF=!1),this.scrollScrollID.css({left:newLeft}),this.setScrollbarPositionForWheel("left")}else if(void 0!=moveXY.top){var newTop=this.touchStartXY.sTop+moveXY.top,minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight);cfg.bounces&&(minTop=.4*this.touchStartXY.targetHeight,maxTop=-(1.2*(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight))),newTop>minTop?(newTop=minTop,returnTF=!1):maxTop>newTop&&(newTop=maxTop,returnTF=!1),this.scrollScrollID.css({top:newTop}),this.setScrollbarPositionForWheel("top")}return returnTF},moveEndBlock:function(){if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,tractInActive=this.tractInActive.bind(this);if("we"==this.touchMode){if(this.touchStartXY.scrollWidth<=this.touchStartXY.targetWidth)return;var eLeft=this.scrollScrollID.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocityLeft=Math.ceil(dLeft/dTime/1),endLeft=Math.ceil(eLeft+velocityLeft);endLeft>0?endLeft=0:endLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(endLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth));var newLeft=endLeft.abs();if(this.touchStartXY.sLeft=-newLeft,this.scrollScrollID.animate({left:-newLeft},(eLeft+newLeft).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("left",(eLeft+newLeft).abs(),"circOut",{left:-newLeft}),cfg.yscroll){var eTop=this.scrollScrollID.position().top,topChange=!1;eTop>0?(eTop=0,topChange=!0):eTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(eTop=this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight,topChange=!0),topChange&&this.scrollScrollID.css({top:-eTop})}}else{if(this.touchStartXY.scrollHeight<=this.touchStartXY.targetHeight)return;var eTop=this.scrollScrollID.position().top,dTop=eTop-this.touchStartXY.sTop,velocityTop=Math.ceil(dTop/dTime/1),endTop=Math.ceil(eTop+velocityTop);endTop>0?endTop=0:endTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(endTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight));var newTop=endTop.abs();if(this.touchStartXY.sTop=-newTop,this.scrollScrollID.animate({top:-newTop},(eTop+newTop).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("top",(eTop+newTop).abs(),"circOut",{top:-newTop}),cfg.xscroll){var eLeft=this.scrollScrollID.position().left,leftChange=!1;eLeft>0?(eLeft=0,leftChange=!0):eLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(eLeft=this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth,leftChange=!0),leftChange&&this.scrollScrollID.css({left:-eLeft})}}this.touchStartXY=null}},SBonMouseDown:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.scrollBar.position(),SBh=this.scrollBar.height(),STh=this.scrollTrack.height(),Ch=this.scrollScrollID.outerHeight();this.Ch=Ch,this.STh=STh,this.scrollBarAttr={x:(SBpos.left-pos.x).number(),y:(SBpos.top-pos.y).number(),h:SBh.number(),sth:STh},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpBind)},SBonMouseMove:function(event){this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone");var pos=this.getMousePosition(event),SBy=pos.y+this.scrollBarAttr.y;2>SBy&&(SBy=2),SBy+this.scrollBarAttr.h>this.scrollBarAttr.sth&&(SBy=this.scrollBarAttr.sth-this.scrollBarAttr.h+2),this.scrollBar.css({top:SBy}),this.setContentPosition()}},SBonMouseUp:function(){if(this.scrollBarMove){{this.config}this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonMouseDownX:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.xscrollBar.position(),SBw=this.xscrollBar.width(),STw=this.xscrollTrack.width(),Cw=this.scrollScrollID.outerWidth();this.Cw=Cw,this.STw=STw,this.scrollBarAttr={x:(SBpos.left-pos.x).number(),w:SBw.number(),stw:STw},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveXBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpXBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpXBind)},SBonMouseMoveX:function(event){this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone");var pos=this.getMousePosition(event),SBx=pos.x+this.scrollBarAttr.x;2>SBx&&(SBx=2),SBx+this.scrollBarAttr.w>this.scrollBarAttr.stw&&(SBx=this.scrollBarAttr.stw-this.scrollBarAttr.w+2),this.xscrollBar.css({left:SBx}),this.setContentPosition("xscroll")}},SBonMouseUpX:function(){if(this.scrollBarMove){{this.config}this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonWheel:function(e){var event=(this.config,window.event||e),delta=event.detail?-10*event.detail:event.wheelDelta,Sy=this.scrollScrollID.position().top,Sh=this.scrollScrollID.outerHeight(),TGh=this.scrollTargetID.height();if(!(TGh>Sh)){var eventCancle=!1;return Sy+=delta,Sy>0&&(Sy=0,eventCancle=!0),TGh>Sh+Sy&&(Sy=TGh-Sh,eventCancle=!0),this.scrollScrollID.css({top:Sy}),this.setScrollbarPositionForWheel("top"),eventCancle?void 0:(event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1)}},SBonWheelEnd:function(){if(!this.scrollBarMove){var config=this.config;config.yscroll&&(this.scrollBar.removeClass("scrollBar_hover"),this.scrollTrack.removeClass("scrollTrack_hover")),config.xscroll&&(this.xscrollBar.removeClass("xscrollBar_hover"),this.xscrollTrack.removeClass("xscrollTrack_hover"))}},cancelEvent:function(event){return event.stopPropagation(),!1},setContentPosition:function(xscroll){this.config;if("xscroll"==xscroll){var SBx=this.xscrollBar.position().left,STw=this.STw,Cw=this.Cw,CTwidth=this.CTwidth,Cwidth=this.Cwidth,SBwidth=CTwidth*(CTwidth-4)/Cwidth;if(10>SBwidth){var addLeft,Cleft;2==SBx&&(SBx=0),addLeft=(10-this.minWidthSB.w)/(STw-10)*SBx,addLeft=0==addLeft?addLeft=0:addLeft-=1,Cleft=STw-10>SBx?(SBx+addLeft)*Cw/STw:Cw-CTwidth,SBx==STw&&(Cleft=Cw-CTwidth)}else{SBx=2==SBx?SBx=0:SBx-=2;var Cleft=SBx*Cw/STw}this.scrollScrollID.css({left:-Cleft.round()})}else{var SBy=this.scrollBar.position().top,STh=this.STh,Ch=this.Ch,CTheight=this.CTheight,Cheight=this.Cheight,SBheight=CTheight*(CTheight-4)/Cheight;if(10>SBheight){var addTop,Ctop;2==SBy&&(SBy=0),addTop=(10-this.minHeightSB.h)/(STh-10)*SBy,addTop=0==addTop?addTop=0:addTop-=1,Ctop=STh-10>SBy?(SBy+addTop)*Ch/STh:Ch-CTheight,SBy==STh&&(Ctop=Ch-CTheight)}else{SBy=2==SBy?SBy=0:SBy-=2;var Ctop=SBy*Ch/STh}this.scrollScrollID.css({top:-Ctop.round()})}},setScrollbarPositionForWheel:function(direction,duration,easing,position){var config=this.config;if("left"==direction){if(position)var Sy=position.left;else var Sy=this.scrollScrollID.position().left;var STh=this.xscrollTrack.outerWidth(),Sh=this.scrollScrollID.outerWidth(),SBh=this.xscrollBar.outerWidth(),SBy=-Sy*STh/Sh,addTop=0;this.minWidthSB.TF&&(addTop=Math.floor((10-this.minWidthSB.h)/(STh-4-10)*SBy));var addY=0;2>SBy?(addY=SBy.abs(),SBy=2):(addY=0,SBy-=addTop,SBy+SBh>STh&&(addY=SBy+SBh-STh,SBy=STh-SBh+2)),easing?this.xscrollBar.animate({left:SBy,width:Math.ceil(this.scrollTargetID.outerWidth()*(this.scrollTargetID.outerWidth()-4)/(this.scrollScrollID.outerWidth()+addY))},duration,easing,function(){}):this.xscrollBar.css({left:SBy,width:Math.ceil(this.scrollTargetID.outerWidth()*(this.scrollTargetID.outerWidth()-4)/(this.scrollScrollID.outerWidth()+addY))})}else{if(!config.yscroll)return!1;if(position)var Sy=position.top;else var Sy=this.scrollScrollID.position().top;var STh=this.scrollTrack.outerHeight(),Sh=this.scrollScrollID.outerHeight(),SBh=this.scrollBar.outerHeight(),SBy=-Sy*STh/Sh,addTop=0;this.minHeightSB.TF&&(addTop=Math.floor((10-this.minHeightSB.h)/(STh-4-10)*SBy));var addY=0;2>SBy?(addY=SBy.abs(),SBy=2):(addY=0,SBy-=addTop,SBy+SBh>STh&&(addY=SBy+SBh-STh,SBy=STh-SBh+2)),easing?this.scrollBar.animate({top:SBy,height:Math.ceil(this.scrollTargetID.outerHeight()*(this.scrollTargetID.outerHeight()-4)/(this.scrollScrollID.outerHeight()+addY))},duration,easing,function(){}):this.scrollBar.css({top:SBy,height:Math.ceil(this.scrollTargetID.outerHeight()*(this.scrollTargetID.outerHeight()-4)/(this.scrollScrollID.outerHeight()+addY))}) }},setSBPosition:function(){var Ctop=(this.config,this.scrollScrollID.position().top),STh=(this.scrollTargetID.innerHeight(),this.scrollTrack.height()+8),Ch=this.scrollScrollID.outerHeight(),SBh=this.scrollBar.height(),SBtop=-(STh*Ctop)/Ch;SBtop+SBh>STh&&(SBtop=STh-SBh),this.scrollBar.css({top:SBtop})},focusElement:function(id){this.config;if(AXgetId(id)){var pos=axdom("#"+id).position(),myNewTop=pos.top,CTheight=this.scrollTargetID.innerHeight(),Cheight=this.scrollScrollID.outerHeight();CTheight>Cheight-myNewTop&&(myNewTop=Cheight-CTheight),0>myNewTop&&(myNewTop=0),this.scrollScrollID.css({top:-myNewTop}),this.setSBPosition()}},scrollTop:function(top){var myNewTop=top,CTheight=this.scrollTargetID.innerHeight(),Cheight=this.scrollScrollID.outerHeight();CTheight>Cheight-myNewTop&&(myNewTop=Cheight-CTheight),0>myNewTop&&(myNewTop=0),this.scrollScrollID.css({top:-myNewTop}),this.setSBPosition()},moveTo:function(x,y){var cfg=this.config,css={};AXUtil.isEmpty(x)||(css.left=-x),AXUtil.isEmpty(y)||(css.top=-y),this.scrollScrollID.css(css),cfg.yscroll&&!AXUtil.isEmpty(css.top)&&this.scrollBar.css({top:css.top}),cfg.xscroll&&!AXUtil.isEmpty(css.left)&&this.xscrollBar.css({left:css.left})},unbind:function(){var config=this.config;this.scroll=!1,this.scrollTrack.remove(),this.scrollBar.remove(),this.scrollTargetID.unbind("mouseover",this.tractActiveBind),this.scrollTargetID.unbind("mouseout",this.tractInActiveBind),axdom(document.body).unbind("mousemove.AXScroll",this.SBonMouseMoveBind),axdom(document.body).unbind("mouseup.AXScroll",this.SBonMouseUpBind);var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";document.attachEvent?AXgetId(config.targetID)&&AXgetId(config.targetID).detachEvent("on"+mousewheelevt,this.SBonWheelBind):document.addEventListener&&AXgetId(config.targetID)&&AXgetId(config.targetID).removeEventListener(mousewheelevt,this.SBonWheelBind,!1),document.addEventListener&&AXgetId(config.targetID)&&AXgetId(config.targetID).removeEventListener("touchstart",this.SBtouchstartBind,!1)}}),AXCalendar=Class.create(AXJ,{version:"AXCalendar v1.1",author:"tom@axisj.com",logs:["2012-12-05 오후 11:54:27","2014-03-31 오후 4:53:02 - tom : timePage PM 이면 12시 선택 못하도록 기능 변경"],initialize:function(AXJ_super){AXJ_super(),this.config.CT_className="AXCalendar",this.Observer=null,this.config.weeks=[{name:"SUN"},{name:"MON"},{name:"TUE"},{name:"WED"},{name:"THU"},{name:"FRI"},{name:"SAT"}],this.config.printFormat="d",this.config.titleFormat="yyyy/mm/dd",this.config.valueFormat="yyyy-mm-dd"},init:function(){},getBasicDate:function(){var cfg=this.config;return void 0!=cfg.basicDate?cfg.basicDate.date():new Date},getCalendarStartDate:function(date){{var calendarStartDate,monthStartDate,basicDate;this.config}basicDate=date?date.date():this.getBasicDate(),monthStartDate=new Date(basicDate.getFullYear(),basicDate.getMonth(),1,12);var calendarStartDateDay=monthStartDate.getDay();return 0==calendarStartDateDay&&(calendarStartDateDay=7),calendarStartDate=monthStartDate.add(-calendarStartDateDay),{calendarStartDate:calendarStartDate,monthStartDate:monthStartDate}},printDayPage:function(date){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var calendarDate=this.getCalendarStartDate(date),calendarStartDate=calendarDate.calendarStartDate,monthStartDate=calendarDate.monthStartDate,setDate=(this.getBasicDate(),date?date.date():new Date),po=[];po.push('
    '),po.push(''),po.push(""),po.push(""),axf.each(cfg.weeks,function(wi,ww){po.push('")}),po.push(""),po.push(""),po.push("");for(var roopDate=calendarStartDate,i=0;6>i;){po.push("");for(var k=0;7>k;){var dayValue=roopDate.print(this.config.printFormat),addClass=[],tdClass=[];roopDate.getMonth()!=monthStartDate.getMonth()&&addClass.push("notThisMonth"),0==setDate.diff(roopDate,"D")&&tdClass.push("setDate"),po.push('"),k++,roopDate=roopDate.add(1)}po.push(""),i++}po.push(""),po.push("
    '+ww.name+"
    '+dayValue+"
    "),po.push("
    "),axdom("#"+cfg.targetID).html(po.join(""))},dayPageSetDay:function(date){var cfg=this.config;axdom("#"+cfg.targetID).find(".calendarDate").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+date.print(this.config.valueFormat)+"_AX_date").addClass("selected")},printMonthPage:function(date){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var setDate=date?date.date():new Date,po=[];po.push('
    '),po.push(''),po.push("");for(var m=1,i=0;4>i;){po.push("");for(var k=0;3>k;){var tdClass=[];m==setDate.getMonth()+1&&tdClass.push("setDate"),po.push('"),k++,m++}po.push(""),i++}po.push(""),po.push("
    '+m+"월
    "),po.push("
    "),axdom("#"+cfg.targetID).html(po.join(""))},monthPageSetMonth:function(date){var cfg=this.config;axdom("#"+cfg.targetID).find(".calendarMonth").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+(date.getMonth()+1)+"_AX_month").addClass("selected")},printYearPage:function(year){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var po=[];po.push('
    '),po.push(''),po.push("");for(var m=year-4,i=0;4>i;){po.push("");for(var k=0;3>k;){var tdClass=[];m==year&&tdClass.push("setDate"),po.push('"),k++,m++}po.push(""),i++}po.push(""),po.push("
    '+m+"년
    "),po.push("
    "),axdom("#"+cfg.targetID).html(po.join(""))},yearPageSetYear:function(date){var cfg=this.config;axdom("#"+cfg.targetID).find(".calendarMonth").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+date.print("yyyy")+"_AX_year").addClass("selected")},printTimePage:function(displayTime){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");if(displayTime){var now=displayTime.split(":"),hh=now[0].setDigit(2),mm=now[1].left(2).setDigit(2),apm=now[1].right(2);"00"==hh&&"00"==mm&&(hh="12",apm="PM"),"00"==apm&&(apm="AM")}else{var now=new Date,hh=now.getHours(),mm=now.getMinutes(),apm="AM";0==hh&&0==mm&&(hh=24),hh>12&&(apm="PM",hh-=12),hh=hh.setDigit(2),mm=mm.setDigit(2)}var po=[];po.push('
    '),po.push("
    "),po.push("
    Hour
    "),po.push("
    "),po.push("
    Minute
    "),po.push("
    "),po.push("
    "+hh+":"+mm+" "+apm+"
    "),po.push("
    "),po.push("
    "),po.push("
    "),axdom("#"+cfg.targetID).html(po.join(""));var timePageChange=this.timePageChange.bind(this);axdom("#"+cfg.targetID+"_AX_hour").unbindInput(),axdom("#"+cfg.targetID+"_AX_minute").unbindInput(),axdom("#"+cfg.targetID+"_AX_AMPM").unbindInput(),axdom("#"+cfg.targetID+"_AX_hour").bindSlider({min:1,max:12,onChange:function(objID,objVal){timePageChange(objID,objVal)}}),axdom("#"+cfg.targetID+"_AX_minute").bindSlider({min:0,max:59,onChange:function(objID,objVal){timePageChange(objID,objVal)}}),axdom("#"+cfg.targetID+"_AX_AMPM").bindSwitch({off:"AM",on:"PM",onChange:function(objID,objVal){timePageChange(objID,objVal)}})},timePageChange:function(){var cfg=this.config;"PM"==axdom("#"+cfg.targetID+"_AX_AMPM").val()&&axdom("#"+cfg.targetID+"_AX_hour").val().number()>11&&(axdom("#"+cfg.targetID+"_AX_hour").val(11),axdom("#"+cfg.targetID+"_AX_hour").setValueInput(11));var mytime=axdom("#"+cfg.targetID+"_AX_hour").val().number().setDigit(2)+":"+axdom("#"+cfg.targetID+"_AX_minute").val().number().setDigit(2)+" "+axdom("#"+cfg.targetID+"_AX_AMPM").val();if(axdom("#"+cfg.targetID+"_AX_box").find(".timeDisplay").html(mytime),cfg.onChange){var hh=axdom("#"+cfg.targetID+"_AX_hour").val().number(),mi=axdom("#"+cfg.targetID+"_AX_minute").val().number(),apm=axdom("#"+cfg.targetID+"_AX_AMPM").val();"PM"==apm&&(hh+=12),cfg.onChange(hh.setDigit(2)+":"+mi.setDigit(2))}},getTime:function(){var cfg=this.config,hh=axdom("#"+cfg.targetID+"_AX_hour").val().number(),mi=axdom("#"+cfg.targetID+"_AX_minute").val().number(),apm=axdom("#"+cfg.targetID+"_AX_AMPM").val();return"PM"==apm&&(hh+=12),hh.setDigit(2)+":"+mi.setDigit(2)}}),AXMultiSelect=Class.create(AXJ,{version:"AXMultiSelect v1.8",author:"tom@axisj.com",logs:["2013-01-31 오후 5:01:12","2013-11-12 오전 9:19:09 - tom : 버그픽스","2013-11-12 오전 11:59:38 - tom : body relative 버그 픽스, 스크롤바 마우스 선택 문제 해결","2013-11-13 오후 3:01:15 - tom : 모바일 터치 기능 지원"],initialize:function(AXJ_super){AXJ_super(),this.selects=[],this.config.selectClassName="readySelect",this.config.beselectClassName="beSelected",this.config.selectingClassName="AX_selecting",this.config.unselectingClassName="AX_unselecting",this.moveSens=0,this.config.moveSens=5,this.touchMode,this.config.useHelper=!0},init:function(){var mouseClick=this.onmouseClick.bind(this);this._selectStage=axdom("#"+this.config.selectStage),this._selectStage.css({position:"relative"}),this._selectStage.bind("mousedown",this.mousedown.bind(this)),this._selectStage.bind("click",function(event){mouseClick(this,event)}),this.helper=axdom("
    "),this.collect(),axdom(window).bind("resize.AXMultiSelect",this.collect.bind(this)),axdom(window).bind("keydown.AXMultiSelect",this.onKeydown.bind(this)),this._selectStage.bind("scroll",this.onScrollStage.bind(this)),this._selectStage.bind("touchstart",this.touchstart.bind(this))},onKeydown:function(event){event.keyCode==AXUtil.Event.KEY_ESC&&this.clearSelects()},onScrollStage:function(){this.config;AXUtil.browser.mobile||(this.helperAppened||this.helperAppenedReady)&&(this.moveSens=0,axdom(document.body).unbind("mousemove.AXMultiSelect"),axdom(document.body).unbind("mouseup.AXMultiSelect"),axdom(document.body).unbind("mouseleave.AXMultiSelect"),axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone"),this.helperAppenedReady=!1,this.helperAppened=!1,this.helper.remove())},onmouseClick:function(element,event){var cfg=this.config,eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return AXgetId(evt.parentNode)==AXgetId(cfg.selectStage)?!0:!1},find:function(evt){return axdom(evt).hasClass(cfg.selectClassName)?!0:!1}});if(!myTarget)return void(event.target.id==cfg.selectStage&&"ie"!=AXUtil.browser.name&&this.clearSelects());var selectElement=myTarget;selectElement&&(event.shiftKey?this.shiftSelects(selectElement):event.metaKey||event.ctrlKey?this.toggleSelects(selectElement):this.clickSelects(selectElement))},collect:function(){var cfg=this.config;this._selectTargets=axdom("#"+cfg.selectStage+" ."+cfg.selectClassName),this.selectTargets=this._selectTargets.get();var scrollLeft=this._selectStage.scrollLeft().number(),scrollTop=this._selectStage.scrollTop().number();this._selectTargets.each(function(){var jQuerythis=axdom(this),pos=jQuerythis.position();axdom.data(this,"selectableItem",{element:this,jQueryelement:jQuerythis,left:pos.left+scrollLeft,top:pos.top+scrollTop,right:pos.left+scrollLeft+jQuerythis.outerWidth(),bottom:pos.top+scrollTop+jQuerythis.outerHeight(),selected:jQuerythis.hasClass(cfg.beselectClassName),selecting:jQuerythis.hasClass(cfg.selectingClassName)})})},clearSelects:function(){var cfg=this.config;this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1))})},pushSelects:function(Obj){var hasSelect=this.selects.has(function(){return this.item==Obj});hasSelect||this.selects.push(Obj)},clickSelects:function(Obj){var cfg=this.config;this.clearSelects();var selectTarget=axdom.data(Obj,"selectableItem");selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0},toggleSelects:function(Obj){var cfg=this.config,selectTarget=axdom.data(Obj,"selectableItem");selectTarget.selected?(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1):(selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0)},shiftSelects:function(Obj){var li,si,cfg=this.config,selectedLength=0;if(this._selectTargets.each(function(stIndex){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&(selectedLength++,li=stIndex),this===Obj&&(si=stIndex)}),0==selectedLength)this.clickSelects(Obj);else{if(si==li)return;this.clearSelects();var temp;si>li&&(temp=si,si=li,li=temp),this._selectTargets.each(function(stIndex){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&stIndex>=si&&li>=stIndex&&(selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0)})}},mousedown:function(){this.config;axdom(document.body).bind("mousemove.AXMultiSelect",this.mousemove.bind(this)),axdom(document.body).bind("mouseup.AXMultiSelect",this.mouseup.bind(this)),axdom(document.body).bind("mouseleave.AXMultiSelect",this.mouseup.bind(this)),axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone"),this.helperAppenedReady=!0},mousemove:function(event){this.config;event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.selectorHelperMove(event))},mouseup:function(){var cfg=this.config;this.helperAppenedReady=!1,this.moveSens=0,axdom(document.body).unbind("mousemove.AXMultiSelect"),axdom(document.body).unbind("mouseup.AXMultiSelect"),axdom(document.body).unbind("mouseleave.AXMultiSelect"),axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone"),this.helperAppened&&(this.helperAppened=!1,this.helper.remove(),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&(selectTarget.selecting?(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1,selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0):selectTarget.selected)}))},selectorHelperMove:function(event){var cfg=this.config;if(cfg.useHelper)if(this.helperAppened){var tmp,_helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=event.pageX-_helperPos.bodyLeft,y2=event.pageY-_helperPos.bodyTop;x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem"),hit=!1;if(selectTarget){var stL=selectTarget.left.number(),stR=selectTarget.right.number(),stT=selectTarget.top.number(),stB=selectTarget.bottom.number();stL=stL+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stR=stR+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stT=stT+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,stB=stB+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,hit=!(stL>x2||x1>stR||stT>y2||y1>stB),hit?(selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1),selectTarget.selecting||(selectTarget.jQueryelement.addClass(cfg.selectingClassName),selectTarget.selecting=!0)):(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(event.metaKey||event.shiftKey||event.ctrlKey||(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1)))}})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var css={left:event.pageX-axdom(document.body).offset().left,top:event.pageY-axdom(document.body).offset().top,width:0,height:0};this.helper.css(css);var stagePos=this._selectStage.offset();this.helperPos={stageX:stagePos.left.number(),stageY:stagePos.top.number(),x:css.left.number(),y:css.top.number(),scrollLeft:this._selectStage.scrollLeft().number(),scrollTop:this._selectStage.scrollTop().number(),bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}},touchstart:function(event){var touchEnd=(this.config,this.touchEnd.bind(this));this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1)),this.helperAppenedReady=!0},touchMove:function(event){var event=(this.config,window.event||e),touch=event.touches[0];if(touch.pageX){var offset=this._selectStage.offset(),right=offset.left+this._selectStage.width(),bottom=offset.top+this._selectStage.height();return 0==this.moveSens&&(this.touchStartXY={x:touch.pageX,y:touch.pageY,scrollTop:this._selectStage.scrollTop()}),this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&("drag"==this.touchMode?(bottomtouch.pageY&&this._selectStage.scrollTop(this.touchStartXY.scrollTop-(offset.top-touch.pageY)),righttouch.pageX&&this._selectStage.scrollLeft(this.touchStartXY.scrollLeft-(offset.left-touch.pageX)),this.selectorHelperMoveByTouch(event)):"scrollTop"==this.touchMode?this._selectStage.scrollTop(this.touchStartXY.scrollTop+(this.touchStartXY.y-touch.pageY)):"scrollLeft"==this.touchMode?this._selectStage.scrollLeft(this.touchStartXY.scrollLeft+(this.touchStartXY.x-touch.pageX)):((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5?(this.touchMode="drag",this.selectorHelperMoveByTouch(event)):(this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs()?(this.touchMode="scrollTop",this._selectStage.scrollTop(this.touchStartXY.scrollTop+(this.touchStartXY.y-touch.pageY))):(this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()&&(this.touchMode="scrollLeft",this._selectStage.scrollLeft(this.touchStartXY.scrollLeft+(this.touchStartXY.x-touch.pageX)))),event.preventDefault?void event.preventDefault():!1}},selectorHelperMoveByTouch:function(e){var cfg=this.config,event=window.event||e,touch=event.touches[0];if(this.helperAppened){var tmp,_helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=touch.pageX-_helperPos.bodyLeft,y2=touch.pageY-_helperPos.bodyTop;x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem"),hit=!1;if(selectTarget){var stL=selectTarget.left.number(),stR=selectTarget.right.number(),stT=selectTarget.top.number(),stB=selectTarget.bottom.number();stL=stL+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stR=stR+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stT=stT+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,stB=stB+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,hit=!(stL>x2||x1>stR||stT>y2||y1>stB),hit?(selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1),selectTarget.selecting||(selectTarget.jQueryelement.addClass(cfg.selectingClassName),selectTarget.selecting=!0)):(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(event.metaKey||event.shiftKey||event.ctrlKey||(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1)))}})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var css={left:touch.pageX-axdom(document.body).offset().left,top:touch.pageY-axdom(document.body).offset().top,width:0,height:0};this.helper.css(css);var stagePos=this._selectStage.offset();this.helperPos={stageX:stagePos.left.number(),stageY:stagePos.top.number(),x:css.left.number(),y:css.top.number(),scrollLeft:this._selectStage.scrollLeft().number(),scrollTop:this._selectStage.scrollTop().number(),bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}},touchEnd:function(e){{var cfg=this.config;window.event||e}this.helperAppenedReady=!1,this.moveSens=0,this.touchMode=!1,document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)),this.helperAppened&&(this.helperAppened=!1,this.helper.remove(),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&(selectTarget.selecting?(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1,selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0):selectTarget.selected)}))},getSelects:function(){var selects=(this.config,[]);return this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&selects.push(selectTarget.element)}),selects},size:function(){var selects=(this.config,[]);return this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&selects.push(selectTarget.element)}),selects.length}}),AXResizable=Class.create(AXJ,{version:"AXResizable v1.0",author:"tom@axisj.com",logs:["2013-11-12 오전 10:22:06"],initialize:function(AXJ_super){AXJ_super(),this.moveSens=0,this.config.moveSens=2,this.objects=[],this.config.bindResiableContainer="AXResizable",this.config.bindResiableHandle="AXResizableHandle"},init:function(){this.helper=axdom("
    ")},bind:function(obj){this.config;if(!obj.id)return void trace("bind 대상 ID가 없어 bind 처리할 수 없습니다.");if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");var objID=obj.id,objSeq=null;AXUtil.each(this.objects,function(idx){this.id==objID&&(objSeq=idx)}),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,element:AXgetId(objID),jQueryElement:axdom("#"+objID),config:obj})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),this.bindResizer(objID,objSeq)},unbind:function(obj){{var removeIdx;this.config}AXUtil.each(this.objects,function(idx,O){O.id!=obj.id||1!=O.isDel&&(removeIdx=idx)}),void 0!=removeIdx&&(this.objects[removeIdx].isDel=!0)},bindResizer:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],po=[];po.push('
    '),obj.jQueryElement.addClass(cfg.bindResiableContainer),obj.jQueryElement.append(po.join("")),obj.jQueryElement.bind("mousedown.AXResizable",this.mousedown.bind(this,objID,objSeq))},mousedown:function(objID,objSeq){this.config;axdom(window).bind("mousemove.AXResizable",this.mousemove.bind(this,objID,objSeq)),axdom(window).bind("mouseup.AXResizable",this.mouseup.bind(this,objID,objSeq)),axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone"),this.helperAppenedReady=!0},mousemove:function(objID,objSeq,event){this.config;event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.selectorHelperMove(objID,objSeq,event))},mouseup:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if(this.helperAppenedReady=!1,this.moveSens=0,axdom(window).unbind("mousemove.AXResizable"),axdom(window).unbind("mouseup.AXResizable"),axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone"),this.helperAppened){this.helperAppened=!1;var newWidth=this.helper.width(),newHeight=this.helper.height(),paddingLeft=obj.jQueryElement.css("padding-left"),paddingRight=obj.jQueryElement.css("padding-right"),paddingTop=obj.jQueryElement.css("padding-top"),paddingBottom=obj.jQueryElement.css("padding-bottom"),paddingW=paddingLeft.number()+paddingRight.number(),paddingH=paddingTop.number()+paddingBottom.number();obj.config.animate?obj.jQueryElement.animate({width:newWidth-paddingW,height:newHeight-paddingH},obj.config.animate.duration||300,obj.config.animate.easing||"liner",function(){obj.config.onChange&&obj.config.onChange.call(obj,obj)}):(obj.jQueryElement.css({width:newWidth-paddingW,height:newHeight-paddingH}),obj.config.onChange&&obj.config.onChange.call(obj,obj)),this.helper.remove()}},selectorHelperMove:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]);if(this.helperAppened){var _helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=event.pageX-_helperPos.bodyLeft,y2=event.pageY-_helperPos.bodyTop,minWidth=obj.config.minWidth||0,minHeight=obj.config.minHeight||0,maxWidth=obj.config.maxWidth||0,maxHeight=obj.config.maxHeight||0,myWidth=x2-x1,myHeight=y2-y1;0!=minWidth&&minWidth>myWidth&&(myWidth=minWidth),0!=minHeight&&minHeight>myHeight&&(myHeight=minHeight),0!=maxWidth&&myWidth>maxWidth&&(myWidth=maxWidth),0!=maxHeight&&myHeight>maxHeight&&(myHeight=maxHeight),obj.config.aspectRatio&&(myWidth=myHeight*obj.config.aspectRatio),obj.config.snap&&(myWidth=obj.config.snap*(myWidth/obj.config.snap).ceil(),myHeight=obj.config.snap*(myHeight/obj.config.snap).ceil()),this.helper.css({width:myWidth,height:myHeight})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var bodyLeft=axdom(document.body).offset().left,pos=(axdom(document.body).offset().top,obj.jQueryElement.offset()),css={left:pos.left+bodyLeft,top:pos.top+bodyLeft,width:obj.jQueryElement.outerWidth(),height:obj.jQueryElement.outerHeight()};this.helper.css(css),this.helperPos={x:css.left,y:css.top,bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}}}),AXResizableBinder=new AXResizable;AXResizableBinder.setConfig({targetID:"defaultResiable"}),axdom.fn.bindAXResizable=function(config){AXUtil.each(this,function(){return config=config||{},config.id=this.id,AXResizableBinder.bind(config),this})},axdom.fn.unbindAXResizable=function(config){AXUtil.each(this,function(){return void 0==config&&(config={}),config.id=this.id,AXResizableBinder.unbind(config),this})};var AXContextMenuClass=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.showedItem={},this.objects=[],this.config.theme="AXContextMenu",this.config.width="140",this.config.responsiveMobile=0},init:function(){},bindSetConfig:function(objID,configs){var findIndex=null;if(AXUtil.each(this.objects,function(index,O){return O.id==objID?(findIndex=index,!1):void 0}),null!=findIndex){var _self=this.objects[findIndex];AXUtil.each(configs,function(k,v){_self.config[k]=v})}},bind:function(obj){this.config;if(!obj.id)return void trace("ID가 없어 bind 처리할 수 없습니다. AXContentMenu.bind({id:'idValue'});");var objSeq=null;if(AXUtil.each(this.objects,function(idx){return this.id==obj.id?(objSeq=idx,!1):void 0}),null!=objSeq)return void(this.objects[objSeq]=obj);this.objects[objSeq]=obj;obj.id;objSeq=this.objects.length,this.objects.push(obj)},filter:function(objSeq,objID,myobj,menu){var obj=(this.config,this.objects[objSeq]);if(myobj.filter){var sendObj={menu:menu,sendObj:obj.sendObj};return myobj.filter.call(sendObj,objID)}return!0},getSubMenu:function(parentID,objSeq,objID,myobj,subMenu,depth){var cfg=this.config,obj=this.objects[objSeq],theme=obj.theme||cfg.theme,width=obj.width||cfg.width,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),subMenuID=parentID+"_AX_subMenu",href=void 0==obj.href?cfg.href:obj.href,po=[];return po.push('
    '),AXUtil.each(subMenu,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('
    ');var className=menu.className?menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),po.push("
    "),po.push("
    "),menu.__axdomId=subMenuID+"_AX_"+depth+"_AX_"+idx,menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(subMenuID+"_AX_"+depth+"_AX_"+idx,objSeq,objID,myobj,menu.subMenu,depth+1)),menu.underLine&&po.push('
    ')}}),po.push("
    "),po.join("")},open:function(myobj,position){var cfg=this.config;axf.clientWidth()home'),headPo.push(''),modalObj.modalHead.empty(),modalObj.modalHead.append(headPo.join("")),modalObj.modalHead.find(".AXContextMenuHome").bind("click",function(){_this.initMobileModal(objID,objSeq,myobj,modalObj)});var styles=[];styles.push("height:339px;");var menuList=obj.menu,po=[];po.push('
    '),po.push('
    '),axf.each(menuList,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";if(obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),obj.sortbox){var sortdirect=""; -menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('
    ')}po.push("
    "),po.push("
    "),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx}}),po.push("
    "),po.push("
    "),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});{var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this)}this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},mobileModalSubMenu:function(parentID,objSeq,objID,myobj,modalObj,pMenu,depth){var cfg=this.config,_this=this,obj=this.objects[objSeq],filter=(obj.theme||cfg.theme,obj.width||cfg.width,this.filter.bind(this)),subMenuID=(this.mobileModalSubMenu.bind(this),parentID+"_AX_subMenu"),href=void 0==obj.href?cfg.href:obj.href,poi=parentID.split(/_AX_/g),pdepth=poi[poi.length-2].number();axdom("#"+objID+"_AX_mobileMenuPrevBox").html(''+pMenu.label+""),axdom("#"+objID+"_AX_prev_AX_"+poi.join("_")).bind("click",function(){if(0==pdepth)_this.initMobileModal(objID,objSeq,myobj,modalObj);else{for(var poi=pMenu.__axdomId.split(/_AX_/g),hashs=(poi[poi.length-2].number(),[]),mystrPosition=poi.length-1,r=0;depth+1>r;r++)isNaN(poi[mystrPosition])||hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse(),hashs.pop();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu.subMenu[hash];_this.mobileModalSubMenu(menu.__axdomId,objSeq,objID,_this.mobileModalObj.myobj,_this.mobileModalObj.modalObj,menu,depth-1)}});var styles=[];styles.push("height:339px;");var menuList=pMenu.subMenu,po=[];po.push('
    '),po.push('
    '),axf.each(menuList,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";if(obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),obj.sortbox){var sortdirect="";menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('
    ')}po.push("
    "),po.push("
    "),menu.__axdomId=subMenuID+"_AX_"+depth+"_AX_"+idx}}),po.push("
    "),po.push("
    "),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});{var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this)}this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},closeMobileModal:function(){this.config;this.modal.close()},deskTopOpen:function(myobj,position){var cfg=this.config,objSeq=null;if(this.mobileMode=!1,AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;if(myobj.sendObj&&(obj.sendObj=myobj.sendObj),!AXgetId(objID)){var theme=obj.theme||cfg.theme,width=obj.width||cfg.width;axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),po=[];po.push('
    '),AXUtil.each(obj.menu,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('
    ');var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),obj.sortbox&&po.push('
    '),po.push("
    "),po.push("
    "),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx,menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu.subMenu,1)),menu.underLine&&po.push('
    ')}}),po.push("
    "),axdom(document.body).append(po.join("")),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)},axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind);var css={};if(position.clientX){var mouse=this.getMousePositon(position);css.left=mouse.pageX,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:css.right=position.right,css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()};if(_box.height.number()+css.top.number()>pBox.height&&(css.top-=_box.height.number()+css.top.number()-pBox.height+25,this.openTB="up",css.top<0&&(css.top=0)),void 0!=css.left)if(_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+25;css.left-=moveLeft,this.openLR="left"}else 2*_box.width.number()+css.left.number()>pBox.width&&(this.openLR="left");else css.left="auto",this.openLR="right";axdom("#"+objID).css(css),this.eventBind(objSeq,objID)}}},eventBind:function(objSeq,objID){var contextMenuItemDown=(this.config,this.contextMenuItemDown.bind(this)),contextMenuItemDownBind=function(event){contextMenuItemDown(event,objSeq,objID)};axdom(document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).find("iframe").each(function(){try{axdom(window[this.name].document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(window[this.name].document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind)}catch(e){}});var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},axdom("#"+objID).find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},_close:function(objSeq,objID){this.config;this.mobileMode?this.closeMobileModal():axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown.AXContenxtMenu"),axdom(document).unbind("mousedown.AXContenxtMenu"),axdom(document).find("iframe").each(function(){axdom(window[this.name].document).unbind("mousedown.AXContenxtMenu"),axdom(window[this.name].document).unbind("keydown.AXContenxtMenu")}),this.showedItem={},this.openTB="",this.openLR=""},close:function(myobj){var objSeq=(this.config,null);if(AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown",this.contextMenuItemDownBind),axdom(document).unbind("mousedown",this.contextMenuItemDownBind),this.showedItem={},this.openTB="",this.openLR=""}},contextMenuItemMouseOver:function(event,objSeq){var cfg=this.config,obj=this.objects[objSeq],eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var pElement=axdom("#"+myTarget.id+"_AX_subMenu").offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var css,subMenuTop=({width:axdom("#"+myTarget.id+"_AX_subMenu").outerWidth(),height:axdom("#"+myTarget.id+"_AX_subMenu").outerHeight()},axdom("#"+myTarget.id).position().top);if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuItemDown:function(event,objSeq,objID){this.config,this.objects[objSeq];if(event.keyCode==AXUtil.Event.KEY_ESC)return void this._close(objSeq,objID);var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});myTarget||this._close(objSeq,objID)},contextMenuItemClick:function(event,objSeq,objID){var obj=(this.config,this.objects[objSeq]),eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")||axdom(evt).hasClass("tool-checkbox")||axdom(evt).hasClass("tool-sort")?!0:!1}});if(myTarget){for(var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2].number(),hashs=[],mystrPosition=poi.length-1,r=0;depth+1>r;r++)hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu.subMenu[hash];if(menu.subMenu&&this.mobileMode)return this.mobileModalSubMenu(myTarget.id,objSeq,objID,this.mobileModalObj.myobj,this.mobileModalObj.modalObj,menu,depth+1),!1;if(axdom(myTarget).hasClass("tool-checkbox"))return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID),!0;if(axdom(myTarget).hasClass("tool-sort")){for(var M,midx=0,__arr=obj.menu;midx<__arr.length&&(M=__arr[midx]);midx++)menu!=M&&(M.sort=void 0,axdom("#"+M.__axdomId).find(".tool-sort").removeClass("asc").removeClass("desc"));return void 0==menu.sort&&(menu.sort=""),"asc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("asc").addClass("desc"),menu.sort="desc"):"desc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("desc").addClass("asc"),menu.sort="asc"):(axdom("#"+menu.__axdomId).find(".tool-sort").addClass("desc"),menu.sort="desc"),obj.onsort&&1!=obj.onsort.call({menu:obj.menu,sortMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0}if(menu.onclick)return 1!=menu.onclick.call({menu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0;if(obj.onchange)return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&1!=obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0}}}),AXContextMenu=new AXContextMenuClass;AXContextMenu.setConfig({});var AXPopOverClass=Class.create(AXContextMenuClass,{version:"AXPopOverClass v1.0",author:"tom@axisj.com",logs:["2013-08-28 오후 6:16:46 - 시작 - tom"],open:function(myobj,position){var cfg=this.config,objSeq=null;if(AXUtil.each(this.objects,function(index,O){O.id==myobj.id?objSeq=index:axdom("#"+O.id).remove()}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;myobj.sendObj&&(obj.sendObj=myobj.sendObj),this.observer&&clearTimeout(this.observer);var direction=obj.direction||"top";if(AXgetId(objID))return void(position.clientX&&this.contentMenuSetCss(event,position,objSeq,objID));var theme=obj.theme||cfg.theme,width=obj.width||cfg.width,arrowStyle="";position.clientX?arrowStyle="background-position:10px 0px;":position.arrowLeft&&(arrowStyle="background-position:"+position.arrowLeft+"px 0px;"),axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),po=[];po.push('
    '),po.push('
    '),po.push('
    '),po.push('
    '),obj.menu?AXUtil.each(obj.menu,function(idx,menu){if(!menu)return!1;if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('
    ');var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("'),po.push(menu.label),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu.subMenu,1)),menu.underLine&&po.push('
    ')}}):obj.body&&(po.push('
    '),po.push(obj.body),po.push("
    ")),po.push("
    "),po.push("
    "),axdom(document.body).append(po.join("")),"top"==direction?(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()):"bottom"==direction?(axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show()):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)};var contextMenuMouseOut=this.contextMenuMouseOut.bind(this);this.contextMenuMouseOutBind=function(event){contextMenuMouseOut(event,objSeq,objID)};var eventClear=function(){this.observer&&clearTimeout(this.observer)};axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind),axdom("#"+objID).bind("mouseover",eventClear.bind(this)),axdom("#"+objID).bind("mouseout",this.contextMenuMouseOutBind),this.contentMenuSetCss(null,position,objSeq,objID),this.eventBind(objSeq,objID)}},contentMenuSetCss:function(event,position,objSeq,objID){var obj=(this.config,this.objects[objSeq]),direction=obj.direction||"top",css={};if(position.clientX){var mouse=this.getMousePositon(position);obj.eventPosition=!0,css.left=mouse.pageX,css.left-=20,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:(css.left="auto",css.right=position.right),css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()},openTB="";if("top"==direction?openTB="top":"bottom"==direction?(css.top-=axdom("#"+objID).outerHeight(),openTB="bottom"):_box.height.number()+css.top.number()>pBox.height?(css.top=css.top-_box.height.number()-position.handleHeight-3,axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show(),openTB="bottom"):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide(),openTB="top"),void 0!=css.left&&_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+5;css.left-=moveLeft,"top"==openTB?axdom("#"+objID).find(".arrowTop").css({"background-position":moveLeft+5+"px 0px;"}):axdom("#"+objID).find(".arrowBottom").css({"background-position":moveLeft+5+"px 0px;"})}axdom("#"+objID).css(css)},contextMenuItemMouseOver:function(event,objSeq){var cfg=this.config,obj=this.objects[objSeq];this.observer&&clearTimeout(this.observer);var eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var css,subMenuTop=axdom("#"+myTarget.id).position().top;if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuMouseOut:function(event,objSeq,objID){var close=this._close.bind(this);this.observer=setTimeout(function(){close(objSeq,objID)},200)}}),AXPopOver=new AXPopOverClass;AXPopOver.setConfig({theme:"AXPopOver"}),axdom.fn.bindTooltip=function(config){void 0==config&&(config={}),AXUtil.each(this,function(){var tooltipContent=axdom("#"+this.id+"_AX_tooltip").html();return AXPopOver.bind({id:this.id+"_AX_tooltipobj",theme:config.theme||"AXPopOverTooltip",width:config.width||"",direction:config.direction||"top",body:tooltipContent}),axdom(this).bind(config.event||"mouseover",function(){var pos=axdom(this).offset(),direction=config.direction||"top",posTop=pos.top;"bottom"==direction?posTop-=3:posTop+=axdom(this).outerHeight()+3,AXPopOver.open({id:this.id+"_AX_tooltipobj",sendObj:{}},{left:pos.left,top:posTop,handleHeight:axdom(this).outerHeight().number()+3})}),this})};var AXMobileModal=Class.create(AXJ,{version:"AXMobileModal v1.0",author:"tom@axisj.com",logs:["2013-12-11 오후 5:48:28","2014-04-14 : tom - modalOpen위치 scrollTop 적용"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXMobileModal",this.config.width="auto",this.config.height="auto",this.config.margin="10px",this.config.align="center",this.config.valign="center"},init:function(){var cfg=this.config;cfg.head||(cfg.head={})},open:function(configs,onLoad){var cfg=this.config;configs||(configs={});var theme=configs.theme||cfg.theme;cfg.addClass&&(theme+=" "+cfg.addClass),this.modalId="AXMobileModal"+AXUtil.timekey();var modalId=this.modalId,po=(configs.clientWidth||AXUtil.clientWidth(),[]);return po.push('
    '),po.push('
    '),po.push('
    '),po.push('
    '+(cfg.head.title||"")+"
    "),po.push("
    "),cfg.head.close&&po.push(" Close'),po.push('
    '),po.push('
    '),po.push("
    "),po.push("
    "),this.jQueryModal=axdom(po.join("")),axdom(document.body).append(this.jQueryModal),this.modalPanel=this.jQueryModal.find(".AXMobileModalPanel"),this.modalHead=this.modalPanel.find(".mobileModalHead"),this.modalBody=this.modalPanel.find(".mobileModalBody"),this.modalFoot=this.modalPanel.find(".mobileModalFoot"),this.openConfigs=configs,this.setSizeModal(this.openConfigs,onLoad),this.modalPanel.find(".mobileModelClose").bind("click",this.close.bind(this)),this.jQueryModal.bind("click",this.modalClick.bind(this)),axdom(window).unbind("resize.AXMobileModal").bind("resize.AXMobileModal",this.reposition.bind(this)),this.opened=!0,{jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot}},setSizeModal:function(configs,onLoad){var clientWidth,width,height,left,top,margin,align,valign,modalWidth,modalHeight,cfg=this.config,cssStyles={},clientWidth=this.jQueryModal.innerWidth(),clientHeight=AXUtil.clientHeight(),width=configs.width||cfg.width,height=configs.height||cfg.height,margin=configs.margin||cfg.margin,align=configs.align||cfg.align,valign=configs.valign||cfg.valign;this.openModalAttr={width:width,height:height,margin:margin,align:align,valign:valign},modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),0>top&&(top=margin);var cssStylesStart={left:(axf.clientWidth()-.8*modalWidth)/2,top:(axf.clientHeight()-.8*modalHeight)/2+axf.scrollTop(),width:.8*modalWidth,height:.8*modalHeight};this.modalPanel.css(cssStylesStart),cssStyles.left=left,cssStyles.top=top+axf.scrollTop(),cssStyles.width=modalWidth,cssStyles.height=modalHeight,mask.open();var returnObj={jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot};"android"==AXUtil.browser.name?(this.modalPanel.css(cssStyles),onLoad&&onLoad.call(returnObj,returnObj)):this.modalPanel.animate(cssStyles,300,"expoOut",function(){onLoad&&onLoad.call(returnObj,returnObj)})},modalClick:function(event){this.config;event.target.id==this.modalId&&this.close()},close:function(){var cfg=this.config;mask.close();var modalWidth,modalHeight;modalWidth=this.modalPanel.width(),modalHeight=this.modalPanel.height();var cssStylesStart={left:(AXUtil.clientWidth()-.8*modalWidth)/2,top:(AXUtil.clientHeight()-.8*modalHeight)/2,width:.8*modalWidth,height:.8*modalHeight,opacity:0},remove=this.remove.bind(this);this.modalPanel.animate(cssStylesStart,300,"expoOut",function(){remove(),cfg.onclose&&cfg.onclose()}),this.modalPanel.empty(),this.opened=!1,axdom(window).unbind("resize.AXMobileModal")},remove:function(){this.config;this.jQueryModal.remove()},reposition:function(){var clientWidth=(this.config,AXUtil.clientWidth()),clientHeight=AXUtil.clientHeight();this.jQueryModal.css({width:clientWidth,height:clientHeight});var modalWidth,modalHeight,left,top,width=this.openModalAttr.width,height=this.openModalAttr.height,margin=this.openModalAttr.margin,cssStyles=(this.openModalAttr.align,this.openModalAttr.valign,{});modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),0>top&&(top=margin),cssStyles.left=left,cssStyles.top=top,cssStyles.width=modalWidth,cssStyles.height=modalHeight,this.modalPanel.css(cssStyles)}});axdom.extend(!0,{easing:{backIn:function(p,n,f,d){var c=f+d,s=1.70158;return c*(p/=1)*p*((s+1)*p-s)+f},backOut:function(p,n,f,d){var c=f+d,s=1.70158;return c*((p=p/1-1)*p*((s+1)*p+s)+1)+f},backInOut:function(p,n,f,d){var c=f+d,s=1.70158;return(p/=.5)<1?c/2*p*p*(((s*=1.525)+1)*p-s)+f:c/2*((p-=2)*p*(((s*=1.525)+1)*p+s)+2)+f},bounceIn:function(p,n,f,d){var c=f+d,inv=this.bounceOut(1-p,1,0,d);return c-inv+f},bounceOut:function(p,n,f,d){var c=f+d;return 1/2.75>p?7.5625*c*p*p+f:2/2.75>p?c*(7.5625*(p-=1.5/2.75)*p+.75)+f:2.5/2.75>p?c*(7.5625*(p-=2.25/2.75)*p+.9375)+f:c*(7.5625*(p-=2.625/2.75)*p+.984375)+f},circIn:function(p,n,f,d){var c=f+d;return-c*(Math.sqrt(1-(p/=1)*p)-1)+f},circOut:function(p,n,f,d){var c=f+d;return c*Math.sqrt(1-(p=p/1-1)*p)+f},circInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?-c/2*(Math.sqrt(1-p*p)-1)+f:c/2*(Math.sqrt(1-(p-=2)*p)+1)+f},cubicIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p*p+f},cubicOut:function(p,n,f,d){var c=f+d;return c*((p=p/1-1)*p*p+1)+f},cubicInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p*p+f:c/2*((p-=2)*p*p+2)+f},elasticIn:function(p,n,f,d){var c=f+d;if(0==p)return f;if(1==p)return c;var s,peroid=.25,amplitude=c;return amplitude0&&(pBox.width=boxDim.width),boxDim.height>0&&(pBox.height=boxDim.height));var pos=this.position();if(pos){if(margin)var m={left:margin.left||0,top:margin.top||0,right:margin.right||0,bottom:margin.bottom||0};else var m={left:0,top:0,right:0,bottom:0};var ePos={left:pos.left+this.outerWidth(),top:pos.top+this.outerHeight()},pEbox={width:pBox.width-m.right,height:pBox.height-m.bottom},pES={left:pElement.scrollLeft(),top:pElement.scrollTop()};return ePos.top>pEbox.height?pElement.scrollTop(ePos.top-pEbox.height+pES.top+1):ePos.top-this.outerHeight()-m.top<0?pElement.scrollTop(pES.top+(ePos.top-this.outerHeight()-m.top)):"BODY"==pElement[0].tagName&&window.scroll(0,pES.top+(ePos.top-m.top)),leftScroll&&(ePos.left>pEbox.width?pElement.scrollLeft(ePos.left-pEbox.width+pES.left+1):ePos.left-this.outerWidth()-m.left<0&&pElement.scrollLeft(pES.left+(ePos.left-this.outerWidth()-m.left))),this}};var __r20=/%20/g,__rbracket=/\[\]$/,__rCRLF=/\r?\n/g,__rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,__rselectTextarea=/^(?:select|textarea)/i;axdom.fn.extend({serializeObject:function(){var myArray=this.map(function(){return this.elements?axdom.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||__rselectTextarea.test(this.nodeName)||__rinput.test(this.type))}).map(function(i,elem){var val=axdom(this).val(),label=axdom(elem).attr("title")||axdom(elem).attr("placeholder")||"";return null==val?null:axdom.isArray(val)?axdom.map(val,function(val){return{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}):{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}).get();return myArray}}),axdom(document.body).ready(function(){axdom("input[type=text]").bind("mousedown",function(){this.focus()}),axdom("textarea").bind("mousedown",function(){this.focus()})}),axdom.fn.endFocus=function(){var elem=this,elemLen=elem.val().length;return 0==elemLen?void elem.focus():void(document.selection?(elem.focus(),elem.val(elem.val())):(void 0==document.selection||elem.selectionStart||"0"==elem.selectionStart)&&elem.focus().val(elem.val()))};var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/;axf.each("touchstart touchmove touchend".split(" "),function(i,name){axdom.fn[name]=function(data,fn){return null==fn&&(fn=data,data=null),arguments.length>0?this.on(name,null,data,fn):this.trigger(name)},rkeyEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.keyHooks),rmouseEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.mouseHooks)}),axdom.fn.setCaret=function(pos){var input=this[0];if(input.setSelectionRange)input.focus(),input.setSelectionRange(pos,pos);else if(input.createTextRange){var range=input.createTextRange();range.collapse(!0),range.moveEnd("character",pos),range.moveStart("character",pos),range.select()}else input.selectionStart&&(input.focus(),input.selectionStart=pos,input.selectionEnd=pos)};var DOMfix={DF_parentNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){if(!node)return node;for(;node.previousSibling;)node=node.previousSibling;return node.parentNode}return node.parentNode},DF_childNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){var result=null,ni=0;if(node){var result=[];for(node=node.firstChild;node;)result[ni++]=node,node=node.nextSibling}return result}return node.childNodes}},AXDOMRange=Class.create({START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,initialize:function(_document){this._doc=_document||document,this.collapsed=!0,this.commonAncestorContainer=this._doc.body,this.endContainer=this._doc.body,this.endOffset=0,this.startContainer=this._doc.body,this.startOffset=0},cloneContents:function(){var oClonedContents=this._doc.createDocumentFragment(),oTmpContainer=this._doc.createDocumentFragment(),aNodes=this._getNodesInRange();if(aNodes.length<1)return oClonedContents;var oClonedContainers=this.DF_constructClonedTree(aNodes,oTmpContainer),oTopContainer=oTmpContainer.firstChild;if(oTopContainer)for(var elNextNode,elCurNode=oTopContainer.firstChild;elCurNode;)elNextNode=elCurNode.nextSibling,oClonedContents.appendChild(elCurNode),elCurNode=elNextNode;return oClonedContainers=this._splitTextEndNodes({oStartContainer:oClonedContainers.oStartContainer,iStartOffset:this.startOffset,oEndContainer:oClonedContainers.oEndContainer,iEndOffset:this.endOffset}),oClonedContainers.oStartContainer&&oClonedContainers.oStartContainer.previousSibling&&DOMfix.DF_parentNode(oClonedContainers.oStartContainer).removeChild(oClonedContainers.oStartContainer.previousSibling),oClonedContainers.oEndContainer&&oClonedContainers.oEndContainer.nextSibling&&DOMfix.DF_parentNode(oClonedContainers.oEndContainer).removeChild(oClonedContainers.oEndContainer.nextSibling),oClonedContents +menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('
    ')}po.push("
    "),po.push(""),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx}}),po.push("
    "),po.push("
    "),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});{var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this)}this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},mobileModalSubMenu:function(parentID,objSeq,objID,myobj,modalObj,pMenu,depth){var cfg=this.config,_this=this,obj=this.objects[objSeq],filter=(obj.theme||cfg.theme,obj.width||cfg.width,this.filter.bind(this)),subMenuID=(this.mobileModalSubMenu.bind(this),parentID+"_AX_subMenu"),href=void 0==obj.href?cfg.href:obj.href,poi=parentID.split(/_AX_/g),pdepth=poi[poi.length-2].number();axdom("#"+objID+"_AX_mobileMenuPrevBox").html(''+pMenu.label+""),axdom("#"+objID+"_AX_prev_AX_"+poi.join("_")).bind("click",function(){if(0==pdepth)_this.initMobileModal(objID,objSeq,myobj,modalObj);else{for(var poi=pMenu.__axdomId.split(/_AX_/g),hashs=(poi[poi.length-2].number(),[]),mystrPosition=poi.length-1,r=0;depth+1>r;r++)isNaN(poi[mystrPosition])||hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse(),hashs.pop();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu.subMenu[hash];_this.mobileModalSubMenu(menu.__axdomId,objSeq,objID,_this.mobileModalObj.myobj,_this.mobileModalObj.modalObj,menu,depth-1)}});var styles=[];styles.push("height:339px;");var menuList=pMenu.subMenu,po=[];po.push('
    '),po.push('
    '),axf.each(menuList,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";if(obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),obj.sortbox){var sortdirect="";menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('
    ')}po.push("
    "),po.push("
    "),menu.__axdomId=subMenuID+"_AX_"+depth+"_AX_"+idx}}),po.push("
    "),po.push("
    "),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});{var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this)}this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},closeMobileModal:function(){this.config;this.modal.close()},deskTopOpen:function(myobj,position){var cfg=this.config,objSeq=null;if(this.mobileMode=!1,AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;if(myobj.sendObj&&(obj.sendObj=myobj.sendObj),!AXgetId(objID)){var theme=obj.theme||cfg.theme,width=obj.width||cfg.width;axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),po=[];po.push('
    '),AXUtil.each(obj.menu,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('
    ');var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("');var checked="";obj.checkbox&&(menu.checked&&(checked=" on"),po.push("
    ')),po.push(""+menu.label+""),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),obj.sortbox&&po.push('
    '),po.push("
    "),po.push("
    "),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx,menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu.subMenu,1)),menu.underLine&&po.push('
    ')}}),po.push("
    "),axdom(document.body).append(po.join("")),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)},axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind);var css={};if(position.clientX){var mouse=this.getMousePositon(position);css.left=mouse.pageX,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:css.right=position.right,css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()};if(_box.height.number()+css.top.number()>pBox.height&&(css.top-=_box.height.number()+css.top.number()-pBox.height+25,this.openTB="up",css.top<0&&(css.top=0)),void 0!=css.left)if(_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+25;css.left-=moveLeft,this.openLR="left"}else 2*_box.width.number()+css.left.number()>pBox.width&&(this.openLR="left");else css.left="auto",this.openLR="right";axdom("#"+objID).css(css),this.eventBind(objSeq,objID)}}},eventBind:function(objSeq,objID){var contextMenuItemDown=(this.config,this.contextMenuItemDown.bind(this)),contextMenuItemDownBind=function(event){contextMenuItemDown(event,objSeq,objID)};axdom(document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).find("iframe").each(function(){try{axdom(window[this.name].document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(window[this.name].document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind)}catch(e){}});var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},axdom("#"+objID).find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},_close:function(objSeq,objID){this.config;this.mobileMode?this.closeMobileModal():axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown.AXContenxtMenu"),axdom(document).unbind("mousedown.AXContenxtMenu"),axdom(document).find("iframe").each(function(){axdom(window[this.name].document).unbind("mousedown.AXContenxtMenu"),axdom(window[this.name].document).unbind("keydown.AXContenxtMenu")}),this.showedItem={},this.openTB="",this.openLR=""},close:function(myobj){var objSeq=(this.config,null);if(AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown",this.contextMenuItemDownBind),axdom(document).unbind("mousedown",this.contextMenuItemDownBind),this.showedItem={},this.openTB="",this.openLR=""}},contextMenuItemMouseOver:function(event,objSeq){var cfg=this.config,obj=this.objects[objSeq],eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var pElement=axdom("#"+myTarget.id+"_AX_subMenu").offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var css,subMenuTop=({width:axdom("#"+myTarget.id+"_AX_subMenu").outerWidth(),height:axdom("#"+myTarget.id+"_AX_subMenu").outerHeight()},axdom("#"+myTarget.id).position().top);if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuItemDown:function(event,objSeq,objID){this.config,this.objects[objSeq];if(event.keyCode==AXUtil.Event.KEY_ESC)return void this._close(objSeq,objID);var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});myTarget||this._close(objSeq,objID)},contextMenuItemClick:function(event,objSeq,objID){var obj=(this.config,this.objects[objSeq]),eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")||axdom(evt).hasClass("tool-checkbox")||axdom(evt).hasClass("tool-sort")?!0:!1}});if(myTarget){for(var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2].number(),hashs=[],mystrPosition=poi.length-1,r=0;depth+1>r;r++)hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu.subMenu[hash];if(menu.subMenu&&this.mobileMode)return this.mobileModalSubMenu(myTarget.id,objSeq,objID,this.mobileModalObj.myobj,this.mobileModalObj.modalObj,menu,depth+1),!1;if(axdom(myTarget).hasClass("tool-checkbox"))return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID),!0;if(axdom(myTarget).hasClass("tool-sort")){for(var M,midx=0,__arr=obj.menu;midx<__arr.length&&(M=__arr[midx]);midx++)menu!=M&&(M.sort=void 0,axdom("#"+M.__axdomId).find(".tool-sort").removeClass("asc").removeClass("desc"));return void 0==menu.sort&&(menu.sort=""),"asc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("asc").addClass("desc"),menu.sort="desc"):"desc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("desc").addClass("asc"),menu.sort="asc"):(axdom("#"+menu.__axdomId).find(".tool-sort").addClass("desc"),menu.sort="desc"),obj.onsort&&1!=obj.onsort.call({menu:obj.menu,sortMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0}if(menu.onclick)return 1!=menu.onclick.call({menu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0;if(obj.onchange)return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&1!=obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID),!0}}}),AXContextMenu=new AXContextMenuClass;AXContextMenu.setConfig({});var AXPopOverClass=Class.create(AXContextMenuClass,{version:"AXPopOverClass v1.0",author:"tom@axisj.com",logs:["2013-08-28 오후 6:16:46 - 시작 - tom"],open:function(myobj,position){var cfg=this.config,objSeq=null;if(AXUtil.each(this.objects,function(index,O){O.id==myobj.id?objSeq=index:axdom("#"+O.id).remove()}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;myobj.sendObj&&(obj.sendObj=myobj.sendObj),this.observer&&clearTimeout(this.observer);var direction=obj.direction||"top";if(AXgetId(objID))return void(position.clientX&&this.contentMenuSetCss(event,position,objSeq,objID));var theme=obj.theme||cfg.theme,width=obj.width||cfg.width,arrowStyle="";position.clientX?arrowStyle="background-position:10px 0px;":position.arrowLeft&&(arrowStyle="background-position:"+position.arrowLeft+"px 0px;"),axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),po=[];po.push('
    '),po.push('
    '),po.push('
    '),po.push('
    '),obj.menu?AXUtil.each(obj.menu,function(idx,menu){if(!menu)return!1;if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('
    ');var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("'),po.push(menu.label),menu.subMenu&&menu.subMenu.length>0&&po.push('
    '),po.push("
    "),menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu.subMenu,1)),menu.underLine&&po.push('
    ')}}):obj.body&&(po.push('
    '),po.push(obj.body),po.push("
    ")),po.push("
    "),po.push("
    "),axdom(document.body).append(po.join("")),"top"==direction?(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()):"bottom"==direction?(axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show()):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)};var contextMenuMouseOut=this.contextMenuMouseOut.bind(this);this.contextMenuMouseOutBind=function(event){contextMenuMouseOut(event,objSeq,objID)};var eventClear=function(){this.observer&&clearTimeout(this.observer)};axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind),axdom("#"+objID).bind("mouseover",eventClear.bind(this)),axdom("#"+objID).bind("mouseout",this.contextMenuMouseOutBind),this.contentMenuSetCss(null,position,objSeq,objID),this.eventBind(objSeq,objID)}},contentMenuSetCss:function(event,position,objSeq,objID){var obj=(this.config,this.objects[objSeq]),direction=obj.direction||"top",css={};if(position.clientX){var mouse=this.getMousePositon(position);obj.eventPosition=!0,css.left=mouse.pageX,css.left-=20,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:(css.left="auto",css.right=position.right),css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()},openTB="";if("top"==direction?openTB="top":"bottom"==direction?(css.top-=axdom("#"+objID).outerHeight(),openTB="bottom"):_box.height.number()+css.top.number()>pBox.height?(css.top=css.top-_box.height.number()-position.handleHeight-3,axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show(),openTB="bottom"):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide(),openTB="top"),void 0!=css.left&&_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+5;css.left-=moveLeft,"top"==openTB?axdom("#"+objID).find(".arrowTop").css({"background-position":moveLeft+5+"px 0px;"}):axdom("#"+objID).find(".arrowBottom").css({"background-position":moveLeft+5+"px 0px;"})}axdom("#"+objID).css(css)},contextMenuItemMouseOver:function(event,objSeq){var cfg=this.config,obj=this.objects[objSeq];this.observer&&clearTimeout(this.observer);var eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("contextMenuItem")?!0:!1}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var css,subMenuTop=axdom("#"+myTarget.id).position().top;if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuMouseOut:function(event,objSeq,objID){var close=this._close.bind(this);this.observer=setTimeout(function(){close(objSeq,objID)},200)}}),AXPopOver=new AXPopOverClass;AXPopOver.setConfig({theme:"AXPopOver"}),axdom.fn.bindTooltip=function(config){void 0==config&&(config={}),AXUtil.each(this,function(){var tooltipContent=axdom("#"+this.id+"_AX_tooltip").html();return AXPopOver.bind({id:this.id+"_AX_tooltipobj",theme:config.theme||"AXPopOverTooltip",width:config.width||"",direction:config.direction||"top",body:tooltipContent}),axdom(this).bind(config.event||"mouseover",function(){var pos=axdom(this).offset(),direction=config.direction||"top",posTop=pos.top;"bottom"==direction?posTop-=3:posTop+=axdom(this).outerHeight()+3,AXPopOver.open({id:this.id+"_AX_tooltipobj",sendObj:{}},{left:pos.left,top:posTop,handleHeight:axdom(this).outerHeight().number()+3})}),this})};var AXMobileModal=Class.create(AXJ,{version:"AXMobileModal v1.0",author:"tom@axisj.com",logs:["2013-12-11 오후 5:48:28","2014-04-14 : tom - modalOpen위치 scrollTop 적용"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXMobileModal",this.config.width="auto",this.config.height="auto",this.config.margin="10px",this.config.align="center",this.config.valign="center"},init:function(){var cfg=this.config;cfg.head||(cfg.head={})},open:function(configs,onLoad){var cfg=this.config;configs||(configs={});var theme=configs.theme||cfg.theme;cfg.addClass&&(theme+=" "+cfg.addClass),this.modalId="AXMobileModal"+AXUtil.timekey();var modalId=this.modalId,po=(configs.clientWidth||AXUtil.clientWidth(),[]);return po.push('
    '),po.push('
    '),po.push('
    '),po.push('
    '+(cfg.head.title||"")+"
    "),po.push("
    "),cfg.head.close&&po.push(" Close'),po.push('
    '),po.push('
    '),po.push("
    "),po.push("
    "),this.jQueryModal=axdom(po.join("")),axdom(document.body).append(this.jQueryModal),this.modalPanel=this.jQueryModal.find(".AXMobileModalPanel"),this.modalHead=this.modalPanel.find(".mobileModalHead"),this.modalBody=this.modalPanel.find(".mobileModalBody"),this.modalFoot=this.modalPanel.find(".mobileModalFoot"),this.openConfigs=configs,this.setSizeModal(this.openConfigs,onLoad),this.modalPanel.find(".mobileModelClose").bind("click",this.close.bind(this)),this.jQueryModal.bind("click",this.modalClick.bind(this)),axdom(window).unbind("resize.AXMobileModal").bind("resize.AXMobileModal",this.reposition.bind(this)),this.opened=!0,{jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot}},setSizeModal:function(configs,onLoad){var clientWidth,width,height,left,top,margin,align,valign,modalWidth,modalHeight,cfg=this.config,cssStyles={},clientWidth=this.jQueryModal.innerWidth(),clientHeight=AXUtil.clientHeight(),width=configs.width||cfg.width,height=configs.height||cfg.height,margin=configs.margin||cfg.margin,align=configs.align||cfg.align,valign=configs.valign||cfg.valign;this.openModalAttr={width:width,height:height,margin:margin,align:align,valign:valign},modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),-5>top&&(top=-5);var cssStylesStart={left:(axf.clientWidth()-.8*modalWidth)/2,top:(axf.clientHeight()-.8*modalHeight)/2,width:.8*modalWidth,height:.8*modalHeight};this.modalPanel.css(cssStylesStart),cssStyles.left=left,cssStyles.top=top,cssStyles.width=modalWidth,cssStyles.height=modalHeight,mask.open();var returnObj={jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot};"android"==AXUtil.browser.name?(this.modalPanel.css(cssStyles),onLoad&&onLoad.call(returnObj,returnObj)):this.modalPanel.animate(cssStyles,300,"expoOut",function(){onLoad&&onLoad.call(returnObj,returnObj)})},modalClick:function(event){this.config;event.target.id==this.modalId&&this.close()},close:function(){var cfg=this.config;mask.close();var modalWidth,modalHeight;modalWidth=this.modalPanel.width(),modalHeight=this.modalPanel.height();var cssStylesStart={left:(AXUtil.clientWidth()-.8*modalWidth)/2,top:(AXUtil.clientHeight()-.8*modalHeight)/2,width:.8*modalWidth,height:.8*modalHeight,opacity:0},remove=this.remove.bind(this);this.modalPanel.animate(cssStylesStart,300,"expoOut",function(){remove(),cfg.onclose&&cfg.onclose()}),this.modalPanel.empty(),this.opened=!1,axdom(window).unbind("resize.AXMobileModal")},remove:function(){this.config;this.jQueryModal.remove()},reposition:function(){var clientWidth=(this.config,AXUtil.clientWidth()),clientHeight=AXUtil.clientHeight();this.jQueryModal.css({width:clientWidth,height:clientHeight});var modalWidth,modalHeight,left,top,width=this.openModalAttr.width,height=this.openModalAttr.height,margin=this.openModalAttr.margin,cssStyles=(this.openModalAttr.align,this.openModalAttr.valign,{});modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),-5>top&&(top=-5),cssStyles.left=left,cssStyles.top=top,cssStyles.width=modalWidth,cssStyles.height=modalHeight,this.modalPanel.css(cssStyles)}});axdom.extend(!0,{easing:{backIn:function(p,n,f,d){var c=f+d,s=1.70158;return c*(p/=1)*p*((s+1)*p-s)+f},backOut:function(p,n,f,d){var c=f+d,s=1.70158;return c*((p=p/1-1)*p*((s+1)*p+s)+1)+f},backInOut:function(p,n,f,d){var c=f+d,s=1.70158;return(p/=.5)<1?c/2*p*p*(((s*=1.525)+1)*p-s)+f:c/2*((p-=2)*p*(((s*=1.525)+1)*p+s)+2)+f},bounceIn:function(p,n,f,d){var c=f+d,inv=this.bounceOut(1-p,1,0,d);return c-inv+f},bounceOut:function(p,n,f,d){var c=f+d;return 1/2.75>p?7.5625*c*p*p+f:2/2.75>p?c*(7.5625*(p-=1.5/2.75)*p+.75)+f:2.5/2.75>p?c*(7.5625*(p-=2.25/2.75)*p+.9375)+f:c*(7.5625*(p-=2.625/2.75)*p+.984375)+f},circIn:function(p,n,f,d){var c=f+d;return-c*(Math.sqrt(1-(p/=1)*p)-1)+f},circOut:function(p,n,f,d){var c=f+d;return c*Math.sqrt(1-(p=p/1-1)*p)+f},circInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?-c/2*(Math.sqrt(1-p*p)-1)+f:c/2*(Math.sqrt(1-(p-=2)*p)+1)+f},cubicIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p*p+f},cubicOut:function(p,n,f,d){var c=f+d;return c*((p=p/1-1)*p*p+1)+f},cubicInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p*p+f:c/2*((p-=2)*p*p+2)+f},elasticIn:function(p,n,f,d){var c=f+d;if(0==p)return f;if(1==p)return c;var s,peroid=.25,amplitude=c;return amplitude0&&(pBox.width=boxDim.width),boxDim.height>0&&(pBox.height=boxDim.height));var pos=this.position();if(pos){if(margin)var m={left:margin.left||0,top:margin.top||0,right:margin.right||0,bottom:margin.bottom||0};else var m={left:0,top:0,right:0,bottom:0};var ePos={left:pos.left+this.outerWidth(),top:pos.top+this.outerHeight()},pEbox={width:pBox.width-m.right,height:pBox.height-m.bottom},pES={left:pElement.scrollLeft(),top:pElement.scrollTop()};return ePos.top>pEbox.height?pElement.scrollTop(ePos.top-pEbox.height+pES.top+1):ePos.top-this.outerHeight()-m.top<0?pElement.scrollTop(pES.top+(ePos.top-this.outerHeight()-m.top)):"BODY"==pElement[0].tagName&&window.scroll(0,pES.top+(ePos.top-m.top)),leftScroll&&(ePos.left>pEbox.width?pElement.scrollLeft(ePos.left-pEbox.width+pES.left+1):ePos.left-this.outerWidth()-m.left<0&&pElement.scrollLeft(pES.left+(ePos.left-this.outerWidth()-m.left))),this}};var __r20=/%20/g,__rbracket=/\[\]$/,__rCRLF=/\r?\n/g,__rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,__rselectTextarea=/^(?:select|textarea)/i;axdom.fn.extend({serializeObject:function(){var myArray=this.map(function(){return this.elements?axdom.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||__rselectTextarea.test(this.nodeName)||__rinput.test(this.type))}).map(function(i,elem){var val=axdom(this).val(),label=axdom(elem).attr("title")||axdom(elem).attr("placeholder")||"";return null==val?null:axdom.isArray(val)?axdom.map(val,function(val){return{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}):{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}).get();return myArray}}),axdom(document.body).ready(function(){axdom("input[type=text]").bind("mousedown",function(){this.focus()}),axdom("textarea").bind("mousedown",function(){this.focus()})}),axdom.fn.endFocus=function(){var elem=this,elemLen=elem.val().length;return 0==elemLen?void elem.focus():void(document.selection?(elem.focus(),elem.val(elem.val())):(void 0==document.selection||elem.selectionStart||"0"==elem.selectionStart)&&elem.focus().val(elem.val()))};var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/;axf.each("touchstart touchmove touchend".split(" "),function(i,name){axdom.fn[name]=function(data,fn){return null==fn&&(fn=data,data=null),arguments.length>0?this.on(name,null,data,fn):this.trigger(name)},rkeyEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.keyHooks),rmouseEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.mouseHooks)}),axdom.fn.setCaret=function(pos){var input=this[0];if(input.setSelectionRange)input.focus(),input.setSelectionRange(pos,pos);else if(input.createTextRange){var range=input.createTextRange();range.collapse(!0),range.moveEnd("character",pos),range.moveStart("character",pos),range.select()}else input.selectionStart&&(input.focus(),input.selectionStart=pos,input.selectionEnd=pos)};var DOMfix={DF_parentNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){if(!node)return node;for(;node.previousSibling;)node=node.previousSibling;return node.parentNode}return node.parentNode},DF_childNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){var result=null,ni=0;if(node){var result=[];for(node=node.firstChild;node;)result[ni++]=node,node=node.nextSibling}return result}return node.childNodes}},AXDOMRange=Class.create({START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,initialize:function(_document){this._doc=_document||document,this.collapsed=!0,this.commonAncestorContainer=this._doc.body,this.endContainer=this._doc.body,this.endOffset=0,this.startContainer=this._doc.body,this.startOffset=0},cloneContents:function(){var oClonedContents=this._doc.createDocumentFragment(),oTmpContainer=this._doc.createDocumentFragment(),aNodes=this._getNodesInRange();if(aNodes.length<1)return oClonedContents;var oClonedContainers=this.DF_constructClonedTree(aNodes,oTmpContainer),oTopContainer=oTmpContainer.firstChild;if(oTopContainer)for(var elNextNode,elCurNode=oTopContainer.firstChild;elCurNode;)elNextNode=elCurNode.nextSibling,oClonedContents.appendChild(elCurNode),elCurNode=elNextNode;return oClonedContainers=this._splitTextEndNodes({oStartContainer:oClonedContainers.oStartContainer,iStartOffset:this.startOffset,oEndContainer:oClonedContainers.oEndContainer,iEndOffset:this.endOffset}),oClonedContainers.oStartContainer&&oClonedContainers.oStartContainer.previousSibling&&DOMfix.DF_parentNode(oClonedContainers.oStartContainer).removeChild(oClonedContainers.oStartContainer.previousSibling),oClonedContainers.oEndContainer&&oClonedContainers.oEndContainer.nextSibling&&DOMfix.DF_parentNode(oClonedContainers.oEndContainer).removeChild(oClonedContainers.oEndContainer.nextSibling),oClonedContents },DF_constructClonedTree:function(aNodes,oClonedParentNode){var oClonedStartContainer=null,oClonedEndContainer=null,oStartContainer=this.startContainer,oEndContainer=this.endContainer;return recurConstructClonedTree=function(aAllNodes,iCurIdx,oParentNode,oClonedParentNode){if(0>iCurIdx)return iCurIdx;var iChildIdx=iCurIdx-1,oCurNodeCloneWithChildren=aAllNodes[iCurIdx].cloneNode(!1);for(aAllNodes[iCurIdx]==oStartContainer&&(oClonedStartContainer=oCurNodeCloneWithChildren),aAllNodes[iCurIdx]==oEndContainer&&(oClonedEndContainer=oCurNodeCloneWithChildren);iChildIdx>=0&&DOMfix.DF_parentNode(aAllNodes[iChildIdx])==aAllNodes[iCurIdx];)iChildIdx=this.recurConstructClonedTree(aAllNodes,iChildIdx,aAllNodes[iCurIdx],oCurNodeCloneWithChildren,oClonedStartContainer,oClonedEndContainer);return oClonedParentNode.insertBefore(oCurNodeCloneWithChildren,oClonedParentNode.firstChild),iChildIdx},aNodes[aNodes.length]=DOMfix.DF_parentNode(aNodes[aNodes.length-1]),recurConstructClonedTree(aNodes,aNodes.length-1,aNodes[aNodes.length-1],oClonedParentNode),{oStartContainer:oClonedStartContainer,oEndContainer:oClonedEndContainer}},cloneRange:function(){return this.DF_copyRange(new AXDOMRange(this._doc))},DF_copyRange:function(oClonedRange){return oClonedRange.collapsed=this.collapsed,oClonedRange.commonAncestorContainer=this.commonAncestorContainer,oClonedRange.endContainer=this.endContainer,oClonedRange.endOffset=this.endOffset,oClonedRange.startContainer=this.startContainer,oClonedRange.startOffset=this.startOffset,oClonedRange._document=this._doc,oClonedRange},collapse:function(toStart){toStart?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset),this._updateRangeInfo()},compareBoundaryPoints:function(how,sourceRange){switch(how){case this.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.startContainer,sourceRange.startOffset);case this.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.startContainer,sourceRange.startOffset);case this.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.endContainer,sourceRange.endOffset);case this.END_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.endContainer,sourceRange.endOffset)}},DF_getBody:function(node){if(!node)return null;for(;node;){if("BODY"==node.tagName)return node;node=DOMfix.DF_parentNode(node)}return null},_compareEndPoint:function(oContainerA,iOffsetA,oContainerB,iOffsetB){var iIdxA,iIdxB;oContainerA&&this.DF_getBody(oContainerA)==this._doc.body||(oContainerA=this._doc.body,iOffsetA=0),oContainerB&&this.DF_getBody(oContainerB)==this._doc.body||(oContainerB=this._doc.body,iOffsetB=0);var compareIdx=function(iIdxA,iIdxB){return-1==iIdxB&&(iIdxB=iIdxA+1),iIdxB>iIdxA?-1:iIdxA==iIdxB?0:1},oCommonAncestor=this._getCommonAncestorContainer(oContainerA,oContainerB),nodeA=oContainerA;if(nodeA!=oCommonAncestor){for(;(oTmpNode=DOMfix.DF_parentNode(nodeA))!=oCommonAncestor;)nodeA=oTmpNode;iIdxA=this._getPosIdx(nodeA)+.5}else iIdxA=iOffsetA;var nodeB=oContainerB;if(nodeB!=oCommonAncestor){for(;(oTmpNode=DOMfix.DF_parentNode(nodeB))!=oCommonAncestor;)nodeB=oTmpNode;iIdxB=this._getPosIdx(nodeB)+.5}else iIdxB=iOffsetB;return compareIdx(iIdxA,iIdxB)},_getCommonAncestorContainer:function(node1,node2){for(var oComparingNode=node2;node1;){for(;oComparingNode;){if(node1==oComparingNode)return node1;oComparingNode=DOMfix.DF_parentNode(oComparingNode)}oComparingNode=node2,node1=DOMfix.DF_parentNode(node1)}return this._doc.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var aNodes=this._getNodesInRange();if(!(aNodes.length<1)){for(var oPrevNode=aNodes[0].previousSibling;oPrevNode&&this._isBlankTextNode(oPrevNode);)oPrevNode=oPrevNode.previousSibling;var oNewStartContainer,iNewOffset;oPrevNode||(oNewStartContainer=DOMfix.DF_parentNode(aNodes[0]),iNewOffset=0);for(var i=0;inode.nodeValue.length&&(iOffset=node.nodeValue.length):iOffset>DOMfix.DF_childNode(node).length&&(iOffset=DOMfix.DF_childNode(node).length),iOffset},setEnd:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset),this.endContainer=refNode,this.endOffset=offset,this.startContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)||this.collapse(!1),this._updateRangeInfo()},setEndAfter:function(refNode){if(!refNode)throw new Error("setEndAfter");return"BODY"==refNode.tagName?void this.setEnd(refNode,DOMfix.DF_childNode(refNode).length):void this.setEnd(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode)+1)},setEndBefore:function(refNode){if(!refNode)throw new Error("setEndBefore");return"BODY"==refNode.tagName?void this.setEnd(refNode,0):void this.setEnd(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode))},setStart:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset),this.startContainer=refNode,this.startOffset=offset,this.endContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)||this.collapse(!0),this._updateRangeInfo()},setStartAfter:function(refNode){if(!refNode)throw new Error("setStartAfter");return"BODY"==refNode.tagName?void this.setStart(refNode,DOMfix.DF_childNode(refNode).length):void this.setStart(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode)+1)},setStartBefore:function(refNode){if(!refNode)throw new Error("setStartBefore");return"BODY"==refNode.tagName?void this.setStart(refNode,0):void this.setStart(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode))},surroundContents:function(newParent){newParent.appendChild(this.extractContents()),this.insertNode(newParent),this.selectNode(newParent)},toString:function(){var oTmpContainer=this._doc.createElement("DIV");return oTmpContainer.appendChild(this.cloneContents()),oTmpContainer.textContent||oTmpContainer.innerText||""},_isBlankTextNode:function(node){return 3==node.nodeType&&""==node.nodeValue?!0:!1},_getPosIdx:function(refNode){for(var idx=0,node=refNode.previousSibling;node;node=node.previousSibling)idx++;return idx},_updateRangeInfo:function(){return this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),void(this.commonAncestorContainer=this._getCommonAncestorContainer(this.startContainer,this.endContainer))):void this.init(this._doc)},_isCollapsed:function(oStartContainer,iStartOffset,oEndContainer,iEndOffset){var bCollapsed=!1;if(oStartContainer==oEndContainer&&iStartOffset==iEndOffset)bCollapsed=!0;else{var oActualStartNode=this._getActualStartNode(oStartContainer,iStartOffset),oActualEndNode=this._getActualEndNode(oEndContainer,iEndOffset);oActualStartNode=this._getNextNode(this._getPrevNode(oActualStartNode)),oActualEndNode=this._getPrevNode(this._getNextNode(oActualEndNode)),oActualStartNode&&oActualEndNode&&"BODY"!=oActualEndNode.tagName&&(this._getNextNode(oActualEndNode)==oActualStartNode||oActualEndNode==oActualStartNode&&this._isBlankTextNode(oActualEndNode))&&(bCollapsed=!0)}return bCollapsed},_splitTextEndNodesOfTheRange:function(){var oEndPoints=this._splitTextEndNodes({oStartContainer:this.startContainer,iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=oEndPoints.oStartContainer,this.startOffset=oEndPoints.iStartOffset,this.endContainer=oEndPoints.oEndContainer,this.endOffset=oEndPoints.iEndOffset},_splitTextEndNodes:function(oEndPoints){return oEndPoints=this._splitStartTextNode(oEndPoints),oEndPoints=this._splitEndTextNode(oEndPoints)},_splitStartTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer,iStartOffset=oEndPoints.iStartOffset,oEndContainer=oEndPoints.oEndContainer,iEndOffset=oEndPoints.iEndOffset;if(!oStartContainer)return oEndPoints;if(3!=oStartContainer.nodeType)return oEndPoints;if(0==iStartOffset)return oEndPoints;if(oStartContainer.nodeValue.length<=iStartOffset)return oEndPoints;var oLastPart=oStartContainer.splitText(iStartOffset);return oStartContainer==oEndContainer&&(iEndOffset-=iStartOffset,oEndContainer=oLastPart),oStartContainer=oLastPart,iStartOffset=0,{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset}},_splitEndTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer,iStartOffset=oEndPoints.iStartOffset,oEndContainer=oEndPoints.oEndContainer,iEndOffset=oEndPoints.iEndOffset;return oEndContainer?3!=oEndContainer.nodeType?oEndPoints:iEndOffset>=oEndContainer.nodeValue.length?oEndPoints:0==iEndOffset?oEndPoints:(oEndContainer.splitText(iEndOffset),{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset}):oEndPoints},_getNodesInRange:function(){if(this.collapsed)return[];var oStartNode=this._getActualStartNode(this.startContainer,this.startOffset),oEndNode=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(oStartNode,oEndNode)},_getActualStartNode:function(oStartContainer,iStartOffset){var oStartNode=oStartContainer;return 3==oStartContainer.nodeType?iStartOffset>=oStartContainer.nodeValue.length?(oStartNode=this._getNextNode(oStartContainer),"BODY"==oStartNode.tagName&&(oStartNode=null)):oStartNode=oStartContainer:iStartOffseti;i++)if(oNodeTester=aChildNodes[i],3==oNodeTester.nodeType){if(oNodeTester==oW3CContainer)break;iResultOffset+=oNodeTester.nodeValue.length}else oIERange.moveToElementText(oNodeTester),oNonTextNode=oNodeTester,iResultOffset=0,bCollapseToStart=!1;return 3==oW3CContainer.nodeType&&(iResultOffset+=iW3COffset),{oSelectableNodeForIE:oNonTextNode,iOffsetForIE:iResultOffset,bCollapseToStart:bCollapseToStart}},this._IERange2W3CRange=function(oIERange){var oW3CRange=new AXDOMRange(this._document),oIEPointRange=null,oPosition=null;oIEPointRange=oIERange.duplicate(),oIEPointRange.collapse(!0),oPosition=this._getW3CContainerAndOffset(oIEPointRange,!0),oW3CRange.setStart(oPosition.oContainer,oPosition.iOffset);var oCollapsedChecker=oIERange.duplicate();return oCollapsedChecker.collapse(!0),oCollapsedChecker.isEqual(oIERange)?oW3CRange.collapse(!0):(oIEPointRange=oIERange.duplicate(),oIEPointRange.collapse(!1),oPosition=this._getW3CContainerAndOffset(oIEPointRange),oW3CRange.setEnd(oPosition.oContainer,oPosition.iOffset)),oW3CRange},this._getW3CContainerAndOffset=function(oIEPointRange,bStartPt){for(var oRgOrigPoint=oIEPointRange,oContainer=oRgOrigPoint.parentElement(),offset=-1,oRgTester=this._document.body.createTextRange(),aChildNodes=DOMfix.DF_childNode(oContainer),oPrevNonTextNode=null,pointRangeIdx=0,i=0;i=0)break;oPrevNonTextNode=aChildNodes[i]}var pointRangeIdx=i;if(0!=pointRangeIdx&&3==aChildNodes[pointRangeIdx-1].nodeType){var oRgTextStart=this._document.body.createTextRange(),oCurTextNode=null;oPrevNonTextNode?(oRgTextStart.moveToElementText(oPrevNonTextNode),oRgTextStart.collapse(!1),oCurTextNode=oPrevNonTextNode.nextSibling):(oRgTextStart.moveToElementText(oContainer),oRgTextStart.collapse(!0),oCurTextNode=oContainer.firstChild);var oRgTextsUpToThePoint=oRgOrigPoint.duplicate();oRgTextsUpToThePoint.setEndPoint("StartToStart",oRgTextStart);for(var textCount=oRgTextsUpToThePoint.text.length;textCount>oCurTextNode.nodeValue.length&&oCurTextNode.nextSibling;)textCount-=oCurTextNode.nodeValue.length,oCurTextNode=oCurTextNode.nextSibling;{oCurTextNode.nodeValue}bStartPt&&oCurTextNode.nextSibling&&3==oCurTextNode.nextSibling.nodeType&&textCount==oCurTextNode.nodeValue.length&&(textCount-=oCurTextNode.nodeValue.length,oCurTextNode=oCurTextNode.nextSibling),oContainer=oCurTextNode,offset=textCount}else oContainer=oRgOrigPoint.parentElement(),offset=pointRangeIdx;return{oContainer:oContainer,iOffset:offset}}};var AXDrag=Class.create(AXJ,{version:"AXJDrag V1.2",author:"tom@axisj.com",logs:["2013-08-21 오후 11:47:11 - modsAX 변환","2013-12-17 오후 4:56:13 - multiselect 와 호환성 작업"],initialize:function(AXJ_super){AXJ_super(),this.config.dragBoxClassName="AXJDragBox",this.config.bedragClassName="bedraged",this.config.bedropClassName="bedroped",this.config.dragClassName="readyDrag",this.config.dropClassName="readyDrop",this.config.sort=!1,this.sortOn=!1,this.config.moveSens=5,this.moveSens=0,this.config.scrollPos=!0},init:function(){this.draged=!1,this.dragBox=jQuery("
    "),this.dragBox.html('
    0
    '),this.config.sort&&(this.sorter=jQuery(this.config.sort.sorter));var mouseMove=this.onmouseMove.bind(this);this.dragBox.bind("mousemove",function(event){mouseMove(this,event)}),this.dragCount=this.dragBox.find("div.boxcounter"),this.dragBoxDim={},this.dragItem=[],this.config.multiSelector&&(this.mselector=new AXMultiSelect,this.config.multiSelector.useHelper=!1,this.mselector.setConfig(this.config.multiSelector))},active:function(){this.mouseDown=this.onmouseDown.bind(this),this.dragStart=this.ondragStart.bind(this),jQuery("#"+this.config.dragStage).bind("mousedown",this.mouseDown),jQuery("#"+this.config.dragStage).bind("dragstart",this.dragStart)},draging:function(power){power?(this.draging(!1),this.mouseMove=this.onmouseMove.bind(this),this.mouseOver=this.onmouseOver.bind(this),this.mouseOut=this.onmouseOut.bind(this),this.mouseUp=this.onmouseUp.bind(this),this.selectstart=this.onselectStart.bind(this),this.keyUp=this.onkeyUp.bind(this),jQuery("#"+this.config.dragStage).bind("mousemove",this.mouseMove),jQuery("#"+this.config.dragStage).bind("mouseover",this.mouseOver),jQuery("#"+this.config.dragStage).bind("mouseout",this.mouseOut),jQuery(document).bind("mouseup",this.mouseUp),jQuery(document).bind("selectstart",this.selectstart),jQuery(document).bind("keyup",this.keyUp),jQuery("#"+this.config.dragStage).addClass("AXJSelectNone")):(this.mouseMove&&jQuery("#"+this.config.dragStage).unbind("mousemove",this.mouseMove),this.mouseOver&&jQuery("#"+this.config.dragStage).unbind("mouseover",this.mouseOver),this.mouseUp&&jQuery(document).unbind("mouseup",this.mouseup),this.selectstart&&jQuery(document).unbind("selectstart",this.selectstart),this.keyUp&&jQuery(document).unbind("keyup",this.keyup),jQuery("#"+this.config.dragStage).removeClass("AXJSelectNone"))},inactive:function(){this.mouseDown&&jQuery("#"+this.config.dragStage).unbind("mousedown",this.mouseDown),this.dragStart&&jQuery("#"+this.config.dragStage).unbind("dragstart",this.dragStart)},onmouseDown:function(event){if(2!=event.button){var eventTarget=event.target;if(eventTarget)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;if(jQuery(eventTarget).hasClass(this.config.dragClassName)){var dragElement=eventTarget;dragElement&&("moz"==AXUtil.browser.name&&(this.dragParent=jQuery(dragElement).parent(),"visible"==this.dragParent.css("overflow")&&(this.dragParent=null)),this.config.multiSelector?(event.shiftKey||event.metaKey||event.ctrlKey||this.mselector.clickSelects(dragElement),this.dragReady()):this.dragReady([dragElement]))}}},ondragStart:function(event){return event.stopPropagation(),!1},onselectStart:function(event){return event.stopPropagation(),!1},onmouseUp:function(event){var eventTarget;if(this.config.sort){if(eventTarget=event.target)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;var isSort=jQuery(eventTarget).hasClass(this.config.dragClassName)}if(!isSort){eventTarget=event.target;var isDrop=jQuery(eventTarget).hasClass(this.config.dropClassName)}isSort?eventTarget&&this.draged&&(this.config.onSort&&this.config.onSort({dragItem:this.dragItem,sortItem:eventTarget}),this.endSort()):isDrop&&eventTarget&&this.draged&&(jQuery(eventTarget).removeClass(this.config.bedropClassName),this.config.onDrop&&this.config.onDrop({dragItem:this.dragItem,dropItem:eventTarget})),this.draging(!1),this.endDrag()},onkeyUp:function(){},onmouseMove:function(event){if(event.pageX){if(this.config.scrollPos){if(0==document.body.scrollTop)var st=document.documentElement.scrollTop,sl=document.documentElement.scrollLeft;else var st=document.body.scrollTop,sl=document.body.scrollLeft;this.mouse={x:event.pageX-sl||0,y:event.pageY-st||0}}else this.mouse={x:event.pageX||0,y:event.pageY||0};this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.dragboxMove()}},onmouseOver:function(event){var eventTarget;if(this.config.sort){if(eventTarget=event.target)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;var isSort=jQuery(eventTarget).hasClass(this.config.dragClassName)}if(!isSort){eventTarget=event.target;var isDrop=jQuery(eventTarget).hasClass(this.config.dropClassName)}isDrop?(eventTarget&&jQuery(eventTarget).addClass(this.config.bedropClassName),this.endSort()):isSort?eventTarget&&this.startSort(eventTarget):this.sortOn&&this.endSort()},onmouseOut:function(event){if(jQuery(event.target).hasClass(this.config.dropClassName)){var dropElement=event.target;dropElement&&jQuery(dropElement).removeClass(this.config.bedropClassName)}},startSort:function(target){jQuery(target).before(this.sorter),this.sortOn=!0},endSort:function(){this.sortOn&&jQuery(this.sorter).detach(),this.config.onStopDrag&&this.config.onStopDrag({dragItem:this.dragItem})},dragboxMove:function(){if(!this.draged){this.draged=!0,this.dragParent&&this.dragParent.css({overflow:"hidden"});var bedragClassName=this.config.bedragClassName;this.config.appendTarget?jQuery("#"+this.config.appendTarget).append(this.dragBox):jQuery("#"+this.config.dragStage).after(this.dragBox),this.dragBoxDim={width:this.dragBox.width(),height:this.dragBox.height()},this.dragCount.html(this.dragItem.length),this.dragTrigger(),jQuery(this.dragItem).addClass(bedragClassName)}this.dragBox.css({left:this.mouse.x+20+"px",top:this.mouse.y+20+"px"})},endDrag:function(){if(this.draged){this.dragParent&&this.dragParent.css({overflow:"auto"});var bedragClassName=this.config.bedragClassName;this.draged=!1,this.dragBox.detach(),this.endSort(),jQuery(this.dragItem).removeClass(bedragClassName),this.config.multiSelector?this.mselector.clearSelects():this.dragItem.clear(),this.moveSens=0}},dragReady:function(dragItems){this.dragItem=this.config.multiSelector?this.mselector.getSelects():dragItems,this.draging(!0)},dragTrigger:function(){this.config.onDrag&&this.config.onDrag({dragItem:this.dragItem})},collectItem:function(){this.config.multiSelector&&(this.observer&&clearTimeout(this.observer),this.observer=setTimeout(this.collectItemAct.bind(this),100))},collectItemAct:function(){this.mselector.collect()},nothing:function(){}}),AXEditorLang={en:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"SelectAll",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"},kr:{home:"홈",attch:"파일첨부",table:"테이블",layout:"레이아웃",option:"옵션",external:"추가기능",editor:"Editor",HTML:"HTML",textColor:"텍스트 컬러",textBgColor:"텍스트 배경컬러",fontFamily:"글꼴",fontSize:"글자크기",fontSample:"가나Ab",lineHeight:"줄간격(em)",url:"링크걸기",upload:"업로드",insertDoc:"본문삽입",delSelected:"선택삭제",selectAll:"전체선택",invalidUrlMsg:"url 형식이 잘못되어 url연결에 실패 하였습니다.",volumeOverMsg:"업로드 용량이 초과 되어 업로드 하실 수 없습니다.",noSelectedFileMsg:"선택된 파일이 없습니다.",fileDeleteConfirm:"정말 삭제 하시겠습니까?",externalTitle:"Custom AX Pannel",imoticon:"이모티콘"},jp:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"Select",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"},cn:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"Select",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"}},AXEditor=Class.create(AXJ,{version:"AXEditor V1.1",author:"SQUALL",createDate:"2010.11.23",lastModifyDate:"2014.04.17",initialize:function(AXJ_super){with(AXJ_super(),this.moveSens=0,this.contentMode="editor",this.panelNum=0,this.attchFiles=[],this.readyFiles=[],this)config.containerCss="AXEditor",config.headCss="editorHead",config.bodyCss="editorBody",config.footCss="editorFoot",config.height=300,config.lang="en",config.moveSens=5,config.ie67adj=-2,config.selectMenuIndex=0,config.tabFileUsed=!1,config.tabTableUsed=!1,config.tabLayoutUsed=!1,config.tabOptionUsed=!1,config.tabExternalUsed=!1,config.frameSrc="/_AXJ/lib/AXEditor.html",config.editorFontSize="12px",config.editorFontFamily="Malgun Gothic",config.colors=["ffffff","faedd4","fff3b4","ffffbe","ffeaea","ffeaf8","e6ecfe","d6f3f9","e0f0e9","eaf4cf","e8e8e8","e7c991","f3d756","ffe409","f9b4cb","dfb7ee","b1c4fc","96ddf3","b1dab7","b8d63d","c2c2c2","d18e0a","ec9c2c","ff8b16","f3709b","af65dd","7293fa","49b5d5","6abb9a","5fb636","8e8e8e","9d6c08","c84205","e31600","c8056a","801fbf","3058d2","0686a8","318561","2b8400","474747","654505","8c3c04","840000","8c044b","57048c","193da9","004c5f","105738","174600","000000","463003","612a03","5b0000","610334","320251"],config.fonts=["Malgun Gothic","Gulim","Dotum","궁서"],config.fontsizes=[8,9,10,11,12,14,16,18,20],config.lineHeights=[1,1.2,1.5,1.8,2,2.5],config.swfUploader="",config.uploadUrl="",config.uploadPars=["p1=1","p2=2"],config.deleteUrl="",config.deletePars=[],config.uploadVolume=5242880,config.uploadFilterName="All,Image",config.uploadFilterValue="*.*,*.jpg; *.gif; *.png",config.uploadCallBack="mmuCall",config.tabExternals=[],config.readyTofocus=!0;this.config.AXEditorIcons=[{categoryNM:"Grimi",copyRights:"Copyright © Jowrney.com. All rights reserved.",imageFolder:"/ui/icons/grimi/",icons:["grimi_big_smile16.png","grimi_cry16.png","grimi_doze16.png","grimi_happy16.png","grimi_love16.png","grimi_smile16.png","grimi_so_what16.png","grimi_vomit16.png"]},{categoryNM:"Fugue Icons",copyRights:"Copyright © Yusuke Kamiyamane. All rights reserved.",imageFolder:"/ui/icons/",icons:["address-book.png","alarm-clock.png","arrow-000-medium.png","arrow-045-medium.png","arrow-045.png","arrow-090-medium.png","arrow-090.png","arrow-135-medium.png","arrow-135.png","arrow-180-medium.png","arrow-180.png","arrow-225-medium.png","arrow-225.png","arrow-270-medium.png","arrow-270.png","arrow-315-medium.png","arrow-315.png","arrow.png","asterisk.png","auction-hammer.png","balance.png","balloon-ellipsis.png","balloon-quotation.png","balloon.png","bandaid.png","bell.png","bin.png","binocular.png","block.png","bomb.png","bookmark.png","box.png","briefcase.png","broom.png","building.png","burn.png","calculator.png","camcorder.png","camera.png","car--exclamation.png","car-red.png","clapperboard.png","compass.png","credit-card.png","crown-bronze.png","crown-silver.png","crown.png","currency-euro.png","currency-pound.png","currency-yen.png","currency.png","cursor-small.png","cursor.png","direction.png","drill.png","eraser.png","eye.png","hammer.png","hand.png","heart-break.png","heart.png","inbox.png","keyboard.png","leaf.png","lifebuoy.png","light-bulb.png","mail-open.png","mail.png","marker.png","megaphone.png","microphone.png","mobile-phone.png","money.png","mouse.png","music.png","paint-can.png","pipette-color.png","plug.png","printer.png","safe.png","smiley-confuse.png","smiley-cool.png","smiley-cry.png","smiley-eek.png","smiley-evil.png","smiley-fat.png","smiley-grin.png","smiley-lol.png","smiley-mad.png","smiley-mr-green.png","smiley-neutral.png","smiley-paint-brush.png","smiley-razz.png","smiley-red.png","smiley-roll.png","smiley-sad.png","smiley-slim.png","smiley-surprise.png","smiley-twist.png","smiley-wink.png","smiley-yell.png","smiley.png"]}] },init:function(){this._self=jQuery("#"+this.config.targetID);var config=this.config,po=[];po.push('
    '),po.push('
    '),po.push('
    '),po.push('
    '),po.push("
    "),this._self.append(po.join("")),this.container=jQuery("#"+config.targetID+"_container"),this.head=jQuery("#"+config.targetID+"_head"),this.body=jQuery("#"+config.targetID+"_body"),this.foot=jQuery("#"+config.targetID+"_foot"),this.initHead(),this.initFoot(),this.initBody()},initHead:function(){var config=this.config,re=config.targetID,po=(AXEditorLang[config.lang],[]);po.push('
    "),this.head.append(po.join("")),this.initPanel()},initPanel:function(){var config=this.config,re=config.targetID,po=[];po.push("
    "),po.push(" "+config.editorFontFamily+""),po.push("
    "),po.push("
    "),po.push(" "+config.editorFontSize+""),po.push("
    "),po.push("
    "),po.push(""),po.push(" Bold"),po.push(""),po.push(""),po.push(" Italic"),po.push(""),po.push(""),po.push(" UnderLine"),po.push(""),po.push(""),po.push(" strike"),po.push(""),po.push("
    "),po.push("
    "),po.push("
    "),po.push(" foreColor"),po.push(" +"),po.push("
    "),po.push("
    "),po.push("
    "),po.push(" backColor"),po.push(" +"),po.push("
    "),po.push("
    "),po.push(""),po.push(" alignLeft"),po.push(""),po.push(""),po.push(" alignCenter"),po.push(""),po.push(""),po.push(" alignRight"),po.push(""),po.push(""),po.push(" alignJustify"),po.push(""),po.push("
    "),po.push(""),po.push(" li"),po.push(""),po.push(""),po.push(" ol"),po.push(""),po.push(""),po.push(" lineHeight"),po.push(""),po.push("
    "),po.push(""),po.push(" url"),po.push(""),po.push(""),po.push(" imoticon"),po.push(""),po.push(""),po.push(" pageBreak"),po.push(""),jQuery("#"+re+"_headPanel").append(po.join("")),jQuery("#"+re+"_headPanel").find(".simpleCommand").bind("click",this.onSimpleCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".colorCommand").bind("click",this.onColorCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".selectCommand").bind("click",this.onSelectCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".pbCommand").bind("click",this.onInsertCommand.bind(this))},closePanel:function(){var config=this.config,re=config.targetID,items=["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"];jQuery("#"+re+"_"+items[this.panelNum]).parent().removeClass("me___itemOn"),0!=this.panelNum&&(1==this.panelNum&&this.initFlashButtonMoveTo(jQuery("#"+re+"_"+items[this.panelNum]).parent()),this.divPanel.remove(),jQuery("#"+config.targetID+"_head").removeClass("editorHeadExt"))},openPanel:function(){var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],items=["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"];if(jQuery("#"+re+"_"+items[this.panelNum]).parent().addClass("me___itemOn"),0!=this.panelNum){if(1==this.panelNum){this.divPanel=jQuery("
    ");var po=[];po.push("
    "),po.push("  "),po.push(" "+lg.insertDoc+""),po.push(" "+lg.delSelected+""),po.push("  "),po.push(" "+lg.selectAll+""),po.push("
    "),po.push("
    "),jQuery.each(this.attchFiles,function(si,fo){po.push(fo.checked?"
    ":"
    "),po.push("
    "+fo.ti.dec()+"
    "),po.push("
    ");var ty=fo.ty.dec().toLowerCase();".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty&&po.push(""),po.push("
    "),po.push("
    ")}),po.push("
     
    "),po.push("
    "),this.divPanel.html(po.join("")),this.openFileStatus()}if(5==this.panelNum){this.divPanel=jQuery("
    ");var po=[];po.push("
    "),po.push("
    "+lg.externalTitle+"
    "),po.push("
    "),po.push("
    "),jQuery.each(config.tabExternals,function(idx,n){po.push("
    "),po.push("
    "+n.title+"
    "),po.push("
    "),""!=n.ico&&po.push(""),po.push("
    "),po.push("
    ")}),po.push("
     
    "),po.push("
    "),this.divPanel.html(po.join(""))}jQuery("#"+re+"_headPanel").append(this.divPanel),jQuery("#"+config.targetID+"_head").addClass("editorHeadExt"),1==this.panelNum&&(this.initFlashButtonMoveTo(jQuery("#"+re+"_divPanel_attchBtns")),jQuery("#"+re+"_divPanel_attch").find(".me___btnS1").bind("click",this.onAttbtnsClick.bind(this)),jQuery("#"+re+"_divPanel_attch").find(".attchItem").bind("click",this.onAttchItemClick.bind(this))),5==this.panelNum&&jQuery("#"+re+"_divPanel_external").find(".componentItem").bind("click",this.onClickComponent.bind(this))}},setAttchItem:function(arg){{var config=this.config;config.targetID,AXEditorLang[config.lang]}if(arg){{var useByte=0;config.uploadVolume}jQuery.each(this.attchFiles,function(){useByte+=this.size.number()}),jQuery.each(arg,function(){useByte+=this.size.number()}),this.readyFiles=arg,this.readyUpload()}},readyUpload:function(){if(0!=this.readyFiles.length){var config=this.config,re=config.targetID,startIndex=this.attchFiles.length,po=[];po.push("
    "),po.push("
    .....
    "),po.push("
    "),po.push("
    "),jQuery("#"+re+"_divPanel_attchItemEnd").before(po.join(""))}},uploadedFile:function(arg){var config=this.config,re=config.targetID,startIndex=this.attchFiles.length;jQuery("#"+re+"_attchItem_"+startIndex).attr("title",arg.ti.dec()),jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemName").html(arg.ti.dec()),jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemPreviewLoad").addClass("attchItemPreview"),jQuery("#"+re+"_attchItem_"+startIndex).bind("click",this.onAttchItemClick.bind(this));var ty=arg.ty.dec().toLowerCase();if(".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty){jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemPreviewLoad").html("");var imgObj=new Image;imgObj.src=arg.path.dec()+arg.nm.dec(),imgObj.id="MF_"+arg.nm.replace(arg.ty,"").dec();var pasteHTML=this.__pasteHTML.bind(this),canvasWidth=this.canvas.width()-40;imgObj.onload=function(){var ow=imgObj.width,oh=imgObj.height;imgObj.width>canvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}this.attchFiles.push(arg),this.readyFiles.pop(),this.readyUpload(),this.updateFileStatus()},insertIMG:function(file){var config=this.config,ty=(config.targetID,file.ty.dec().toLowerCase()),tyReg=/(bmp|jpg|jpeg|gif|png)$/;if(tyReg.test(ty)){var imgObj=new Image;imgObj.src=file.path.dec()+file.nm.dec(),imgObj.id="MF_"+file.nm.replace(new RegExp("[.]"+file.ty,"i"),"").dec();var pasteHTML=this.__pasteHTML.bind(this),canvasWidth=this.canvas.width()-40;imgObj.onload=function(){var ow=imgObj.width,oh=imgObj.height;imgObj.width>canvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}},removeIMG:function(fileID){this.onFeilDeleteInFrame("#"+fileID)},initFoot:function(){var config=this.config,po=[];po.push("resizer"),po.push("
    "),po.push(" Editor"),po.push(" HTML"),po.push("
    "),this.foot.append(po.join("")),this.foot.find("a.me___handle").bind("mousedown",this.footOnDrag.bind(this)),this.foot.find("a.me____tab").bind("click",this.onContentMode.bind(this))},footOnDrag:function(){this.footOnMover=this.footOnMove.bind(this),jQuery(document).bind("mousemove",this.footOnMover),this.footOnDroper=this.footOnDrop.bind(this),jQuery(document).bind("mouseup",this.footOnDroper),this.selectstart=this.onselectStart.bind(this),jQuery(document).bind("selectstart",this.selectstart),this.canvasMask.show()},footOnMove:function(event){event.pageX&&(this.mouse={x:event.pageX||0,y:event.pageY||0},this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.footMove())},footMove:function(){this.draged||(this.draged=!0,this.canvasTop="html"==this.contentMode?this.htmlArea.offset().top:this.canvas.offset().top),this.mouse.y-this.canvasTop>100&&(this.config.height=this.mouse.y-this.canvasTop-2),this.observer&&clearTimeout(this.observer),this.observer=setTimeout(this.footSetCanvasHeight.bind(this),10)},footOnDrop:function(){this.moveSens=0,jQuery(document).unbind("mousemove",this.footOnMover),jQuery(document).unbind("mouseup",this.footOnDroper),jQuery(document).unbind("selectstart",this.selectstart),clearTimeout(this.observer),this.canvasMask.hide(),this.draged=!1},footSetCanvasHeight:function(){this.canvas.css({height:this.config.height+"px"}),"html"==this.contentMode&&this.htmlArea.css({height:this.canvas.height()+"px"})},initBody:function(){var config=this.config;this.canvas=jQuery(""),this.canvasMask=jQuery(""),this.body.append(this.canvas),this.body.append(this.canvasMask),this.canvas.css({width:"100%",height:config.height+"px"}),this.canvas.bind("load",this.readyFrame.bind(this))},setHtmlMode:function(power){if("on"==power){var config=this.config,canvasHeight=this.canvas.height();this.canvas.hide(),this.htmlArea=jQuery(""),this.body.append(this.htmlArea),this.htmlArea.css({width:"100%",height:canvasHeight+"px"}),this.htmlArea.val(this.__getContent())}else this.setContent(this.htmlArea.val()),this.canvas.show(),this.htmlArea.remove()},readyFrame:function(){var config=this.config;this.myEDT=window[config.targetID+"_canvas"];var editorBody=this.myEDT.document;"ie"==AXUtil.browser.name?editorBody.body.contentEditable=!0:"webkit"==AXUtil.browser.name?(editorBody.body.contentEditable=!0,editorBody.designMode="On"):editorBody.designMode="mozilla"==AXUtil.browser.name?"On":"On";try{jQuery(editorBody.body).css({"font-size":config.editorFontSize}),jQuery(editorBody.body).css({"font-family":config.editorFontFamily})}catch(e){}this.bindFocusFrame(),this.config.onReady&&this.config.onReady()},focusFrame:function(){this.closeColorPicker(),this.closeffPicker(),this.closefsPicker(),this.closelhPicker(),this.closeicPicker()},unbindFocusFrame:function(){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).unbind("focus",this.focusFrame.bind(this)):jQuery(editorBody.body).unbind("focus",this.focusFrame.bind(this))},bindFocusFrame:function(){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).bind("focus",this.focusFrame.bind(this)):jQuery(editorBody.body).bind("focus",this.focusFrame.bind(this))},onselectStart:function(event){return event.stopPropagation(),!1},__command:function(sCommand,bUserInterface,vValue){var myEDT=this.myEDT.document;myEDT.execCommand(sCommand,bUserInterface,vValue)},__pasteHTML:function(sHTML){var myEDT=this.myEDT.document,oTmpDiv=myEDT.createElement("DIV"),oTmpP=myEDT.createElement("P");if(oTmpDiv.appendChild(oTmpP),"string"==typeof sHTML?oTmpDiv.innerHTML=sHTML:oTmpP.appendChild(sHTML),"editor"==this.contentMode){var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0);rng.insertNode(oTmpDiv.lastChild)}else jQuery("#"+this.config.targetID+"_html").val(jQuery("#"+this.config.targetID+"_html").val()+oTmpDiv.innerHTML)},onHeadClick:function(event){if("object"==typeof event){var myID=event.target.id;if(!myID)return;{var ids=myID.split(/_/g),headNM=ids[1];ids[2]}}else var headNM=event;if("home"==headNM)this.closePanel(),this.panelNum=0,this.openPanel();else if("attch"==headNM){if(1==this.panelNum)return;this.closePanel(),this.panelNum=1,this.openPanel()}else if("external"==headNM){if(5==this.panelNum)return;this.closePanel(),this.panelNum=5,this.openPanel()}},onAttchPanelOpen:function(arg){return 1==this.panelNum?void(arg&&this.setAttchItem(arg)):(this.closePanel(),this.panelNum=1,this.openPanel(),void(arg&&this.setAttchItem(arg)))},onSimpleCommandClick:function(event){var myID=event.target.id;if(myID){var command=this._GPT(myID);this.__command(command)}},onColorCommandClick:function(event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),myID=event.target.id;if(myID){var myCommand=this._GPT(myID),myColor=jQuery("#"+myID+"Val").css("background-color").toColor();this.__command(myCommand,!1,myColor);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getNodes();if(nodes.length)for(var a=0;a")}},onSelectCommandClick:function(event){var myID=(this.myEDT.document,event.target.id);if(myID){var command=this._GPT(myID);("foreColorExt"==command||"backColorExt"==command)&&this.openColorPicker(command),"fontname"==command&&this.fontFamilyPicker(command),"fontsize"==command&&this.fontSizePicker(command),"lineHeight"==command&&this.lineHeightPicker(command),"url"==command&&this.urlPicker(command),"imoticon"==command&&this.icoPicker(command)}},onAttbtnsClick:function(event){var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],myID=event.target.id;if(myID){var cmd=myID.split(/_/g).last();if("selectAll"==cmd&&jQuery.each(this.attchFiles,function(idx,f){f.checked=!0,jQuery("#"+re+"_attchItem_"+idx).addClass("attchItemON")}),"delete"==cmd){var delFiles=[];if(jQuery.each(this.attchFiles,function(idx,f){f.checked&&delFiles.push("file="+f.nm+"&path="+f.path)}),0==delFiles.length)return void alert(lg.noSelectedFileMsg);if(!confirm(lg.fileDeleteConfirm))return;var pars=(config.deleteUrl,config.deletePars.join("&"));""!=pars&&(pars+="&"),pars+=delFiles.join("&")+"&dummy="+AXUtil.timekey()}if("insertDoc"==cmd){var insertFiles=jQuery.map(this.attchFiles,function(f){return f.checked?f:void 0});if(0==insertFiles.length)return void alert(lg.noSelectedFileMsg);try{this.myEDT.document.body.focus()}catch(e){}for(var si=0;sicanvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}else this.__pasteHTML(""+fo.ti.dec()+"")}}}},onFeilDeleteInFrame:function(rid){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).find(rid).remove():jQuery(editorBody.body).find(rid).remove()},onFileDelete:function(res){if("ok"==res.result){var config=this.config,re=config.targetID,removeInFrame=this.onFeilDeleteInFrame.bind(this);if(this.attchFiles=jQuery.map(this.attchFiles,function(f,i){return jQuery("#"+re+"_attchItem_"+i).remove(),f.checked?void removeInFrame("#MF_"+f.nm.replace(f.ty,"").dec()):f}),this.updateFileStatus(),0==this.attchFiles.length)return;jQuery.each(this.attchFiles,function(si,fo){var po=[];po.push("
    "),po.push("
    "+fo.ti.dec()+"
    "),po.push("
    ");var ty=fo.ty.dec().toLowerCase();".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty&&po.push(""),po.push("
    "),po.push("
    "),jQuery("#"+re+"_divPanel_attchItemEnd").before(po.join(""))}),jQuery("#"+re+"_divPanel_attch").find(".attchItem").bind("click",this.onAttchItemClick.bind(this))}else alert(res.msg.dec())},onAttchItemClick:function(event){var config=this.config,re=config.targetID,myID=event.target.id;if(!myID){try{myID=jQuery(event.target).parents(".attchItem")[0].id}catch(e){}if(!myID)return}var fidx=myID.split(/_/g).last().number();this.attchFiles[fidx].checked=!this.attchFiles[fidx].checked,this.attchFiles[fidx].checked?jQuery("#"+re+"_attchItem_"+fidx).addClass("attchItemON"):jQuery("#"+re+"_attchItem_"+fidx).removeClass("attchItemON")},onClickComponent:function(event){var myID=event.target.id;if(!myID){try{myID=jQuery(event.target).parents(".componentItem")[0].id}catch(e){}if(!myID)return}this.config.onTabExternals&&this.config.onTabExternals(myID)},openColorPicker:function(command){this.colorPicker&&this.colorPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],po=[];po.push("
    "),po.push("
    "),"foreColorExt"==command&&po.push("
    "+lg.textColor+"
    "),"backColorExt"==command&&po.push("
    "+lg.textBgColor+"
    "),jQuery.each(config.colors,function(index,n){po.push(""+n+"")}),po.push("
    "),this.colorPicker=jQuery(po.join(""));var myHeight=21*(config.colors.length/7).ceil()+28;"foreColorExt"==command&&this.colorPicker.css({width:150,height:myHeight,left:249,top:25}),"backColorExt"==command&&this.colorPicker.css({width:150,height:myHeight,left:287,top:25}),jQuery("#"+re+"_headPanel").append(this.colorPicker),this.clickToClose=this.closeColorPicker.bind(this),jQuery(document).bind("click",this.clickToClose),this.keyDownToClose=this.closeColorPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToClose),this.colorPicker.find(".colorItem").bind("click",this.clickColor.bind(this,command))},closeColorPicker:function(event){event?jQuery(event.target).hasClass("me_picker")||(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),this.colorPicker&&this.colorPicker.remove()):(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),this.colorPicker&&this.colorPicker.remove())},closeColorPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),this.colorPicker&&this.colorPicker.remove())},clickColor:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,myColor=jQuery(event.target).css("background-color").toColor(),myCommand=command.replace("Ext","");this.__command(myCommand,!1,myColor);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getNodes();if(nodes.length)for(var a=0;a"),po.push("
    "),po.push("
    "+lg.fontFamily+"
    "),jQuery.each(config.fonts,function(index,n){po.push(""+lg.fontSample+"("+n+")")}),po.push("
    "),this.ffPicker=jQuery(po.join(""));var myHeight=25*config.fonts.length+30;this.ffPicker.css({width:150,height:myHeight,left:3,top:25}),jQuery("#"+re+"_headPanel").append(this.ffPicker),this.clickToCloseFF=this.closeffPicker.bind(this),jQuery(document).bind("click",this.clickToCloseFF),this.keyDownToCloseFF=this.closeffPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseFF),this.ffPicker.find(".ffItem").bind("click",this.clickff.bind(this,command))},closeffPicker:function(event){event?jQuery(event.target).hasClass("me_ffs")||(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove()):(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove())},closeffPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove())},clickff:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,myfont=jQuery(event.target).css("font-family");this.__command(command,!1,myfont);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a"),po.push("
    "),po.push("
    "+lg.fontSize+"
    "),jQuery.each(config.fontsizes,function(index,n){po.push(""+lg.fontSample+"("+n+"px)")}),po.push("
    "),this.fsPicker=jQuery(po.join(""));var myHeight=25*config.fontsizes.length+30;this.fsPicker.css({width:150,height:myHeight,left:95,top:25}),jQuery("#"+re+"_headPanel").append(this.fsPicker),this.clickToCloseFS=this.closefsPicker.bind(this),jQuery(document).bind("click",this.clickToCloseFS),this.keyDownToCloseFS=this.closefsPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseFS),this.fsPicker.find(".ffItem").bind("click",this.clickfs.bind(this,command))},closefsPicker:function(event){event?jQuery(event.target).hasClass("me_fss")||(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove()):(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove())},closefsPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove())},clickfs:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,mysize=jQuery(event.target).css("font-size");this.__command(command,!1,1);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a"),po.push("
    "),po.push("
    "+lg.lineHeight+"
    "),jQuery.each(config.lineHeights,function(index,n){po.push(""+n+"")}),po.push("
    "),this.lhPicker=jQuery(po.join(""));var myHeight=25*config.lineHeights.length+30;this.lhPicker.css({width:100,height:myHeight,left:491,top:25}),jQuery("#"+re+"_headPanel").append(this.lhPicker),this.clickToCloseLH=this.closelhPicker.bind(this),jQuery(document).bind("click",this.clickToCloseLH),this.keyDownToCloseLH=this.closelhPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseLH),this.lhPicker.find(".ffItem").bind("click",this.clicklh.bind(this,command))},closelhPicker:function(event){event?jQuery(event.target).hasClass("me_lhs")||(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove()):(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove())},closelhPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove())},clicklh:function(command,event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),mylh=jQuery(event.target).text(),myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a"),po.push("
    "),po.push("
    "+lg.url+"
    "),po.push("
    "),po.push("
    "),po.push(" _blank"),po.push(" _self"),po.push(" "),po.push("
    "),po.push("
    "),this.ulPicker=jQuery(po.join(""));var myHeight=90;this.ulPicker.css({width:300,height:myHeight,left:324,top:25}),jQuery("#"+re+"_headPanel").append(this.ulPicker),this.myRange=new SSelection(this.myEDT),this.oSelection=this.myRange.getRangeAt(0);for(var oNode=this.oSelection.commonAncestorContainer;oNode&&"A"!=oNode.tagName;)oNode=DOMfix.DF_parentNode(oNode);if(oNode){var sTarget=oNode.target;sTarget&&"_blank"==sTarget&&(jQuery("#"+target_blank)[0].checked=!0),jQuery("#"+inpID).val(oNode.href?oNode.href:"http://")}else jQuery("#"+inpID).val("http://");jQuery("#"+inpID).select(),this.clickToCloseUL=this.closeulPicker.bind(this),jQuery(document).bind("click",this.clickToCloseUL),this.keyDownToCloseUL=this.closeulPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseUL),this.ulPicker.find(".me___inputBtnOK").bind("click",this.clickul.bind(this,command))},closeulPicker:function(event){event?jQuery(event.target).hasClass("me_url")||(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove()):(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove())},closeulPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove())},clickul:function(command){var config=this.config,re=config.targetID,lg=(this.myEDT.document,AXEditorLang[config.lang]),inpID=this._GID([re,command,"input"]),target_blank=this._GID([re,command,"target_blank"]),sURL=(this._GID([re,command,"target_self"]),jQuery("#"+inpID).val());if(this.myRange.selectRange(this.oSelection),this._validateURL(sURL)){var sTarget=jQuery("#"+target_blank)[0].checked?"_blank":"_self";if(this.oSelection.collapsed)this.__pasteHTML(""+sURL+"");else{this.__command("CreateLink",!1,sURL),this.myRange=new SSelection(this.myEDT),this.oSelection=this.myRange.getRangeAt(0);for(var oNode=this.oSelection.commonAncestorContainer;oNode&&"A"!=oNode.tagName;)oNode=DOMfix.DF_parentNode(oNode);oNode&&(oNode.target=sTarget)}}else alert(lg.invalidUrlMsg);this.closeulPicker()},_validateURL:function(sURL){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(sURL)},icoPicker:function(command){this.icPicker&&this.icPicker.remove();{var config=this.config,re=config.targetID;AXEditorLang[config.lang]}void 0==this.icoCategoryIndex&&(this.icoCategoryIndex=0);var icoCategoryIndex=this.icoCategoryIndex,po=[];po.push("
    "),po.push("
    "),po.push("
    "),po.push("
    "),jQuery.each(config.AXEditorIcons,function(idx,ca){po.push(icoCategoryIndex==idx?""+ca.categoryNM+"":""+ca.categoryNM+"")}),po.push("
    "),po.push("
    "),po.push("
    ");var icoFolder=config.AXEditorIcons[icoCategoryIndex].imageFolder;jQuery.each(config.AXEditorIcons[icoCategoryIndex].icons,function(index,n){po.push("")}),po.push("
    "),po.push("
    "),po.push(" "+config.AXEditorIcons[icoCategoryIndex].copyRights),po.push("
    "),po.push("
    "),this.icPicker=jQuery(po.join(""));var myWidth=396,myHeight=180;this.icPicker.css({width:myWidth,height:myHeight,left:214,top:25}),jQuery("#"+re+"_headPanel").append(this.icPicker),this.clickToCloseIC=this.closeicPicker.bind(this),jQuery(document).bind("click",this.clickToCloseIC),this.keyDownToCloseIC=this.closeicPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseIC),this.icPicker.find(".icoItem img").bind("click",this.clickic.bind(this,command)),this.icPicker.find(".me___selecterTitleTabTray .categoryItem").bind("click",this.changeCategory.bind(this))},closeicPicker:function(event){event?jQuery(event.target).hasClass("me_ico")||(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove()):(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove())},closeicPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove())},clickic:function(command,event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),sHTML="",oTmpDiv=myEDT.createElement("DIV");oTmpDiv.innerHTML=sHTML;var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0);rng.insertNode(oTmpDiv.lastChild),this.closeicPicker()},changeCategory:function(event){var config=this.config,re=config.targetID,idx=event.target.id.split("_").last();void 0!=this.icoCategoryIndex&&jQuery("#"+re+"_icoCategory_"+this.icoCategoryIndex).removeClass("on"),this.icoCategoryIndex=idx,icoCategoryIndex=idx,jQuery("#"+re+"_icoCategory_"+idx).addClass("on");var po=[],icoFolder=config.AXEditorIcons[icoCategoryIndex].imageFolder;jQuery.each(config.AXEditorIcons[icoCategoryIndex].icons,function(index,n){po.push("")}),jQuery("#"+re+"_icoTray").html(po.join("")),this.icPicker.find(".icoItem img").bind("click",this.clickic.bind(this,"imoticon")),jQuery("#"+re+"_icoBot").html(config.AXEditorIcons[icoCategoryIndex].copyRights)},onContentMode:function(event){var config=this.config;event.target.id==config.targetID+"_contentMode_0"?"editor"!=this.contentMode&&(this.contentMode="editor",jQuery("#"+config.targetID+"_contentMode_0").addClass("me____tabOn"),jQuery("#"+config.targetID+"_contentMode_1").removeClass("me____tabOn"),this.setHtmlMode("off")):"html"!=this.contentMode&&(this.contentMode="html",jQuery("#"+config.targetID+"_contentMode_0").removeClass("me____tabOn"),jQuery("#"+config.targetID+"_contentMode_1").addClass("me____tabOn"),this.setHtmlMode("on"))},__getContent:function(){var myEDT=this.myEDT.document;return myEDT.body.innerHTML},getContentCheck:function(){var myEDT=this.myEDT.document,editorContent="";return editorContent="editor"==this.contentMode?myEDT.body.innerHTML:this.htmlArea.val(),""!=editorContent.trim()?!0:!1},getContent:function(){var myEDT=this.myEDT.document,ff=myEDT.body.style.fontFamily,fs=myEDT.body.style.fontSize,cl=myEDT.body.style.color,bc=myEDT.body.style.backgroundColor,lh=myEDT.body.style.lineHeight;""==lh&&(lh="1.5em");var sts=[];return ff&&sts.push("font-family:"+ff),fs&&sts.push("font-size:"+fs),cl&&sts.push("color:"+cl),bc&&sts.push("background-color:"+bc),lh&&sts.push("line-height:"+lh),"editor"==this.contentMode?"
    "+myEDT.body.innerHTML+"
    ":"
    "+this.htmlArea.val()+"
    "},setContent:function(content){var myEDT=this.myEDT.document;if("string"==typeof content)""==content&&(content="

    "),myEDT.body.innerHTML=content;else{var myBody=content.find(".AXEditorContentBody");null==myBody.html()?jQuery(myEDT.body).html(content.html()):(content.children().each(function(){jQuery(this).hasClass("AXEditorContentBody")||myBody.prepend(this)}),jQuery(myEDT.body).html(myBody.html()),jQuery(myEDT.body).css({"font-family":myBody.css("fontFamily")}),jQuery(myEDT.body).css({"font-size":myBody.css("fontSize")}),jQuery(myEDT.body).css({color:myBody.css("color")}),jQuery(myEDT.body).css({"background-color":myBody.css("backgroundColor")}),jQuery(myEDT.body).css({"line-height":myBody.css("lineHeight")}))}},getFileList:function(){return this.attchFiles},setFileList:function(files){this.attchFiles=files,this.updateFileStatus()},nothing:function(){}}),AXExcelConvert=Class.create(AXJ,{version:"AXExcelConvert V1",author:"tom@axisj.com",logs:["2013-08-21 오후 11:47:11 - modsAX 변환"],initialize:function(AXJ_super){AXJ_super(),this.ds=[]},init:function(){},readyData:function(){this.ds=[];var re=this.config.targetID,po=[];po.push("
    "),po.push("
    엑셀데이터 붙여넣기 - 변환하실 엑셀 데이터를 선택하여 아래에 붙여넣기 해주세요.
    "),po.push(""),po.push("
    "),po.push("
    "),jQuery("#"+re).html(po.join("")),setTimeout(function(){jQuery("#"+re+"_TEXT").focus()},500),jQuery("#"+re+"_convert").bind("click",this.onConvert.bind(this)),jQuery("#"+re+"_close").bind("click",this.onClose.bind(this))},onConvert:function(){var re=this.config.targetID,tStr=jQuery("#"+re+"_TEXT").val().trim();if(""==tStr)return void alert("변환할 내용이 없습니다. 내용을 입력하세요.");for(var codeR=tStr.split(/\n/g),a=0;a"),copt.push(" "),jQuery.each(colnames,function(){copt.push(nm==this.nm?" ":" ")}),copt.push(""),copt.join("")}var re=this.config.targetID,colnames=this.config.colnames,po=[];po.push("
    "),po.push("
    엑셀데이터 확인
    "),po.push("
    "),po.push("
    "),po.push(" "),po.push(" "),po.push(" "),jQuery.each(colnames,function(){po.push(" ")}),po.push(" "),po.push(" "),po.push(" "),jQuery.each(this.ds,function(idx,R){po.push(" "),jQuery.each(colnames,function(icx){po.push(" ")}),po.push(" ")}),po.push(" "),po.push("
    "+getCOPT(this.nm)+"
    "+R[icx]+"
    "),po.push("
    "),po.push("
    "),po.push("
    "),po.push("
    "),jQuery("#"+re).html(po.join("")),jQuery("#"+re+"_convert").bind("click",this.onInsert.bind(this)),jQuery("#"+re+"_close").bind("click",this.onClose.bind(this)),jQuery(".colNamesSelect").bind("change",this.onColNameSelect.bind(this))},onInsert:function(){for(var re=this.config.targetID,frm=document[re+"_frm"],cols=[],a=0;acolWidth+100*astricCount)for(var CG,remainsWidth=bodyWidth-cfg.fitToWidthRightMargin-colWidth,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=(remainsWidth/astricCount).ceil(),CG.width=CG._owidth,colWidth+=(CG._owidth||0).number());else for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=100,CG.width=100,colWidth+=(CG._owidth||0).number());if(this.colWidth=colWidth,cfg.fitToWidth)if(bodyWidth>this.colWidth){var _bodyWidth=bodyWidth-cfg.fitToWidthRightMargin,zoomRatio=bodyWidth/this.colWidth;colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.width=(CG._owidth*zoomRatio).ceil(),_bodyWidth>CG.width?_bodyWidth-=CG.width:CG.width=_bodyWidth,CG.display&&(colWidth+=CG.width.number());this.colWidth=colWidth}else{colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)void 0==CG._owidth&&(CG._owidth=(CG.width||0).number()),CG.width=CG._owidth.number(),CG.display&&(colWidth+=CG.width.number());this.colWidth=colWidth}if(this.showColLen=showColLen,cfg.colHead||(cfg.colHead={}),cfg.body||(cfg.body={}),cfg.page||(cfg.page={display:!1,paging:!1,status:{formatter:null}}),cfg.colHead.rowsEmpty&&(cfg.colHead.rows=void 0),cfg.body.rowsEmpty&&(cfg.body.rows=void 0),cfg.colHead.rows){cfg.colHead._maps=new Array(cfg.colHead.rows.length);for(var colMaxLen=0,r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.colHead._maps[rr][nC]?(cfg.colHead._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}return startPosition},r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.body._maps[rr][nC]?(cfg.body._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.body.marker._maps[rr][nC]?(cfg.body.marker._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.head._maps[rr][nC]?(cfg.head._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.foot._maps[rr][nC]?(cfg.foot._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;rcolMaxLen&&(colMaxLen=colLen)}for(var _m=0;_mrr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.editor._maps[rr][nC]?(cfg.editor._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}},r=0;rcidx&&(cfg.colHead.rows[c.r][c.c].isFixedCell=!0);for(var m,midx=0,__arr=cfg.body._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.body.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.rows[c.r][c.c].isFixedCell=!0));if(cfg.head)for(var m,midx=0,__arr=cfg.head._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.head.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.head.rows[c.r][c.c].isFixedCell=!0));if(cfg.foot)for(var m,midx=0,__arr=cfg.foot._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.foot.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.foot.rows[c.r][c.c].isFixedCell=!0));if(cfg.body.marker&&cfg.body.marker.rows)for(var m,midx=0,__arr=cfg.body.marker._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedCell=!0));if(cfg.editor&&cfg.editor.rows)for(var m,midx=0,__arr=cfg.editor._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.editor.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.editor.rows[c.r][c.c].isFixedCell=!0));if(this.hasFixed=!0,hasHiddenCell){for(var CG,minusFixedCol=0,fixedColSeq=this.fixedColSeq,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display||fixedColSeq+1>cidx&&minusFixedCol++;cfg.fixedColSeq=this.fixedColSeq-minusFixedCol}else cfg.fixedColSeq=this.fixedColSeq;-1==cfg.fixedColSeq&&(this.hasFixed=!1);for(var CG,fixedColSeq=this.fixedColSeq,fixedColWidth=0,fixedColLen=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number(),fixedColLen++);this.showFixedColLen=fixedColLen,this.fixedColWidth=fixedColWidth}},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");if(!cfg.colGroup)return void trace("need colGroup - setConfig({colGroup:[]})");if(cfg.emptyListMSG=cfg.emptyListMSG||AXConfig.AXGrid.emptyListMSG,cfg.listCountMSG=cfg.listCountMSG||AXConfig.AXGrid.listCountMSG||"전체 {listCount}개의 목록이 있습니다.",cfg.pageCountMSG=cfg.pageCountMSG||AXConfig.AXGrid.pageCountMSG,cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"grid":"mobile",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"grid":"mobile",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}if(Object.isObject(cfg.colGroup)){var newColGroup=cfg.colGroup.concat();cfg.colGroup=newColGroup}this.target=axdom("#"+cfg.targetID);var targetInnerHeight=this.target.innerHeight();0==targetInnerHeight&&(targetInnerHeight=AXConfig.AXGrid.pageHeight||400),this.theme=cfg.theme?cfg.theme:"AXGrid",cfg.height=cfg.height?cfg.height:targetInnerHeight+"px";var theme=this.theme,gridCss=[];cfg.width&&gridCss.push("width:"+cfg.width+";"),cfg.height&&gridCss.push("height:"+cfg.height+";");var ol=[];ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push("
    "),ol.push('
    '),ol.push('
    '),ol.push(' PREV'),ol.push('
    '),ol.push('
    / ...
    '),ol.push(' NEXT'),ol.push("
    "),ol.push('
    '),ol.push(" "+cfg.listCountMSG.replace("{listCount}","0")),ol.push("
    "),ol.push("
    "),ol.push("
    "),this.target.html(ol.join("")),this.gridBody=axdom("#"+cfg.targetID+"_AX_grid"),this.scrollBody=axdom("#"+cfg.targetID+"_AX_gridScrollBody"),this.colHead=axdom("#"+cfg.targetID+"_AX_gridColHead"),this.body=axdom("#"+cfg.targetID+"_AX_gridBody"),this.editor=axdom("#"+cfg.targetID+"_AX_gridEditor"),this.pageBody=axdom("#"+cfg.targetID+"_AX_gridPageBody"),this.pageBody.data("display","show"),this.pagingUnit=axdom("#"+cfg.targetID+"_AX_gridPagingUnit"),this.status=axdom("#"+cfg.targetID+"_AX_gridStatus"),this.defineConfig(),cfg.page&&(this.page.pageNo=cfg.page.pageNo||1,this.page.pageSize=cfg.page.pageSize||AXConfig.AXGrid.pageSize||100,this.page.onchange=cfg.page.onchange||this.page.onChange),this.setColHead(),this.setBody(),this.editor.hide(),this.gridTargetSetSize(),this.contentScrollResize(); -var contentScrollTouchstart=this.contentScrollTouchstart.bind(this);this.contentScrollTouchstartBind=function(event){contentScrollTouchstart(event)};var contentScrollScrollWheel=this.contentScrollScrollWheel.bind(this);this.contentScrollScrollWheelBind=function(event){contentScrollScrollWheel(event)};var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";document.attachEvent?axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").attachEvent("on"+mousewheelevt,contentScrollScrollWheel):document.addEventListener&&axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").addEventListener(mousewheelevt,contentScrollScrollWheel,!1),document.addEventListener&&axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").addEventListener("touchstart",contentScrollTouchstart,!1),this.target.bind("keydown",this.onKeydown.bind(this)),cfg.contextMenu&&(AXContextMenu.bind({id:cfg.targetID+"ContextMenu",theme:cfg.contextMenu.theme,width:cfg.contextMenu.width,menu:cfg.contextMenu.menu}),this.target.bind("contextmenu",this.onContextmenu.bind(this)));var goPageMove=this.goPageMove.bind(this);this.pagingUnit.find(".AXgridPagingPrev").bind("click",function(){goPageMove(-1)}),this.pagingUnit.find(".AXgridPagingNext").bind("click",function(){goPageMove(1)}),axdom(window).bind("resize",this.windowResize.bind(this))},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},100)},windowResizeApply:function(){var cfg=this.config;if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"grid":"mobile",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"grid":"mobile",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}this.redrawGrid("")},gridTargetSetSize:function(react){var cfg=this.config;if("mobile"==cfg.viewMode)this.target.css({height:"auto","max-height":"auto"}),this.gridBody.addClass("AXGridMobile"),this.gridBody.css({height:"auto"}),this.scrollBody.css({height:"auto"}),this.body.css({top:"auto",height:"auto"}),this.pageBody.hide(),this.setPaging();else{if(cfg.page?0==cfg.page.display?(this.pageBody.hide(),this.pageBody.data("display","hide")):(this.pageBody.show(),this.pageBody.data("display","show"),cfg.page.paging?this.setPaging():this.pagingUnit.hide(),0==cfg.page.status&&this.status.hide()):(this.pageBody.hide(),this.pageBody.data("display","hide")),this.gridBody.removeClass("AXGridMobile"),"auto"==cfg.height){var colHeadHeight=this.colHead.outerHeight();1==colHeadHeight&&(colHeadHeight=0);var scrollBodyHeight=this.scrollContent.height();this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight})}else{cfg.height&&this.gridBody.css({height:cfg.height});var pageBodyHeight="show"==this.pageBody.data("display")?this.pageBody.outerHeight():0;0==cfg.page.display&&(pageBodyHeight=0);var scrollBodyHeight=cfg.height.number()-pageBodyHeight-2;this.scrollBody.css({height:scrollBodyHeight});var colHeadHeight=this.colHead.outerHeight();1==colHeadHeight&&(colHeadHeight=0),this.body.css({top:colHeadHeight,height:scrollBodyHeight-colHeadHeight})}react&&this.contentScrollResize(!1)}},getColGroup:function(suffix){var cfg=this.config,fixedColSeq=this.fixedColSeq,po=[];if(po.push(""),"FC"!=suffix&&"FB"!=suffix&&"FE"!=suffix){for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&po.push('');"CB"==suffix&&po.push("")}else for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&po.push('');return po.push(""),po.join("")},getColSeqToHead:function(r,c){for(var cfg=this.config,colSeq=null,a=cfg.colHead._maps[r].length-1;a>-1;a--)if(cfg.colHead._maps[r][a].r==r&&cfg.colHead._maps[r][a].c==c){colSeq=a;break}return colSeq},redrawGrid:function(changeGridView){var cfg=this.config;changeGridView&&("grid"==cfg.viewMode?(this.pageBody.show(),this.pageBody.data("display","show")):"icon"==cfg.viewMode?(this.pageBody.show(),this.pageBody.data("display","show")):"mobile"==cfg.viewMode&&(this.pageBody.hide(),this.pageBody.data("display","hide"))),this.defineConfig(!0),this.setColHead(),this.setBody(void 0,!0),"grid"==cfg.viewMode&&this.list.length>0&&(cfg.head&&this.printHead(),cfg.foot&&this.printFoot()),this.gridTargetSetSize(!0),this.contentScrollResize()},checkedColSeq:function(colSeq,checked,itemIndex){var cfg=this.config,_list=this.list;void 0==itemIndex?(this.colHead.find(".gridCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".gridCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked;var ieid=this.id.split(/_AX_/g),checkboxColSeq=ieid[ieid.length-2],checkboxIndex=ieid[ieid.length-1];if(cfg.colGroup[checkboxColSeq].oncheck){var sendObj={index:checkboxIndex,list:_list,item:_list[checkboxIndex]};cfg.colGroup[checkboxColSeq].oncheck.call(sendObj,this.checked)}}),this.body.find(".gridCheckBox_body_colSeq"+colSeq).each(function(){if("disabled"!=axdom("#"+this.id).attr("disabled")){this.checked=checked;var ieid=this.id.split(/_AX_/g),checkboxColSeq=ieid[ieid.length-2],checkboxIndex=ieid[ieid.length-1];if(cfg.colGroup[checkboxColSeq].oncheck){var sendObj={index:checkboxIndex,list:_list,item:_list[checkboxIndex]};cfg.colGroup[checkboxColSeq].oncheck.call(sendObj,this.checked)}}})):this.body.find(".gridBodyTr_"+itemIndex+" .gridCheckBox_body_colSeq"+colSeq).each(function(){this.checked=null==checked?!this.checked:checked;var ieid=this.id.split(/_AX_/g),checkboxColSeq=ieid[ieid.length-2],checkboxIndex=ieid[ieid.length-1];if(cfg.colGroup[checkboxColSeq].oncheck){var sendObj={index:checkboxIndex,list:_list,item:_list[checkboxIndex]};cfg.colGroup[checkboxColSeq].oncheck.call(sendObj,this.checked)}})},getCheckedList:function(colSeq){for(var item,collect=(this.config,[]),itemIndex=(this.list,0),__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)item.___disabled||(item.___disabled={}),item.___checked||(item.___checked={}),1!=item.___disabled[colSeq]&&1==item.___checked[colSeq]&&collect.push(item);return collect},getCheckedListWithIndex:function(colSeq){for(var item,collect=(this.config,[]),itemIndex=(this.list,0),__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)item.___disabled||(item.___disabled={}),item.___checked||(item.___checked={}),1!=item.___disabled[colSeq]&&1==item.___checked[colSeq]&&collect.push({index:itemIndex,item:item});return collect},onKeydown:function(event){67==event.keyCode&&event.ctrlKey,this.editorOpend||(event.keyCode==axf.Event.KEY_UP?this.focusMove(-1,event):event.keyCode==axf.Event.KEY_DOWN&&this.focusMove(1,event))},onContextmenu:function(event){var cfg=this.config;if(this.readyMoved)return!1;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()){var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("gridBodyTr")?!0:!1},find:function(evt){return axdom(evt).hasClass("bodyTd")||axdom(evt).hasClass("bodyNodeIndent")?!0:!1}});if(myTarget){{var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();targetID.split(/_AX_/g)}if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];AXContextMenu.open({id:cfg.targetID+"ContextMenu",filter:cfg.contextMenu.filter,sendObj:{item:item,index:itemIndex}},event)}else AXContextMenu.open({id:cfg.targetID+"ContextMenu",filter:cfg.contextMenu.filter,sendObj:null},event);return!1}}},copyData:function(){var copyOut=(this.config,[]);axf.each(this.selectedCells,function(index,n){var html=axdom("#"+n).find(".bodyNode").html();copyOut.push(html+" ")}),window.clipboardData?(window.clipboardData.setData("Text",copyOut.join("")),toast.push("데이터가 복사되었습니다. 원하시는 곳에 붙여넣기 하세요.")):dialog.push({title:"Copy Data",body:copyOut.join(""),type:"alert"})},getHeadMousePosition:function(event){var pos=this.colHead.offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getColHeadTd:function(arg){var cfg=this.config,po=[];if(arg.ghost)po.push("'),po.push('
    '),po.push('
     
    '),po.push("
    "),po.push("");else{var colHeadTdText=" colHeadTdText",toolUse=!0;("html"==arg.formatter||"checkbox"==arg.formatter)&&(arg.displayLabel||(colHeadTdText=" colHeadTdHtml",toolUse=!1,"checkbox"==arg.formatter&&(colHeadTdText=" colHeadTdCheck",arg.tdHtml='')));var sortClass="";if(arg.sort&&(sortClass="desc"==arg.sort?" sortDesc":" sortAsc"),po.push("'),po.push('
    '),po.push('
    '),po.push(arg.tdHtml),po.push("
    "),toolUse&&null!=arg.colSeq&&void 0!=arg.colSeq&&po.push('T'),po.push('
    '),po.push("
    "),po.push(""),arg.sort){var myColHead=cfg.colHead.rows[arg.r][arg.CHidx],tdID=cfg.targetID+"_AX_colHead_AX_"+arg.r+"_AX_"+arg.CHidx;this.nowSortHeadID=tdID,this.nowSortHeadObj=myColHead}}return po.join("")},setColHead:function(){var cfg=this.config,po=[];if("grid"==cfg.viewMode){this.colHead.show();var getColHeadTd=this.getColHeadTd.bind(this);if(this.hasFixed){po.push(''),po.push(this.getColGroup("CH")),po.push("");for(var r=0;r");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:colCount")}po.push(""),po.push("
    ");var fpo=[];fpo.push('
    '),fpo.push(''),fpo.push(this.getColGroup("FC")),fpo.push("");for(var r=0;r");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.isFixedCell&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";fpo.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:!1}))}colCount+=CH.colspan}),fpo.push("")}fpo.push(""),fpo.push("
    "),fpo.push("
    ")}else{var tableWidth=this.colWidth;po.push(''),po.push(this.getColGroup("CH")),po.push("");for(var r=0;r");for(var CH,CHidx=0,__arr=cfg.colHead.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:!1,displayLabel:CH.displayLabel}))}po.push("")}po.push(""),po.push("
    ")}this.colHead.html(po.join("")),axdom("#"+cfg.targetID+"_AX_fixedColHead").remove(),fpo&&this.colHead.after(fpo.join("")),this.colHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),rowspan=axdom("#"+tdID).attr("rowspan"),valign=axdom("#"+tdID).attr("valign");rowspan||(rowspan=1);var tdHeight=axdom("#"+tdID).height();if(axdom(this).css({height:tdHeight}),axdom(this).parent().css({height:tdHeight}),rowspan>1){var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-axdom("#"+txtID).outerHeight()+5),"middle"==valign&&(cellMarginTop=(tdHeight-axdom("#"+txtID).outerHeight())/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"})}}),this.colHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.colHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.colHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.colHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.colHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.colHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)),this.hasFixed&&(this.fixedColHead=axdom("#"+cfg.targetID+"_AX_fixedColHead"),this.fixedColHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),rowspan=axdom("#"+tdID).attr("rowspan"),valign=axdom("#"+tdID).attr("valign");rowspan||(rowspan=1);var tdHeight=axdom("#"+tdID).height();if(axdom(this).css({height:tdHeight}),axdom(this).parent().css({height:tdHeight}),rowspan>1){var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-axdom("#"+txtID).outerHeight()+5),"middle"==valign&&(cellMarginTop=(tdHeight-axdom("#"+txtID).outerHeight())/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"})}}),this.fixedColHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.fixedColHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.fixedColHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.fixedColHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.fixedColHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.fixedColHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)))}else"icon"==cfg.viewMode?(this.colHead.empty(),this.colHead.hide()):"mobile"==cfg.viewMode&&(this.colHead.empty(),this.colHead.hide())},colHeadMouseOver:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXGridColHead")?!0:!1},find:function(evt){return axdom(evt).hasClass("colHeadTd")?!0:!1}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).addClass("readyTool")}}},colHeadMouseOut:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXGridColHead")?!0:!1},find:function(evt){return axdom(evt).hasClass("colHeadTd")?!0:!1}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).removeClass("readyTool")}}},colHeadResizerMouseDown:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),lastIdx=(event.target,eid.length-1),colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],colSeq=this.getColSeqToHead(colHeadR,colHeadC);if(null!=colSeq){this.colResizing&&this.colHeadResizerEnd();var offset=axdom("#"+cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC).find(".tdRelBlock").position(),relBlockWidth=axdom("#"+cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC).find(".tdRelBlock").width(),rightPosition=offset.left.number()+relBlockWidth.number(),blockWidth=axdom("#"+cfg.targetID+"_AX_col_AX_"+colSeq+"_AX_CH").attr("width");this.colResizeTarget={colSeq:colSeq,leftPosition:rightPosition-blockWidth,blockWidth:blockWidth,newWidth:blockWidth};var colHeadResizerMouseMove=this.colHeadResizerMouseMove.bind(this);this.colHeadResizerMouseMoveBind=function(event){colHeadResizerMouseMove(event)};var colHeadResizerMouseUp=this.colHeadResizerMouseUp.bind(this);this.colHeadResizerMouseUpBind=function(event){colHeadResizerMouseUp(event)},axdom(document.body).bind("mousemove.AXGrid",this.colHeadResizerMouseMoveBind),axdom(document.body).bind("mouseup.AXGrid",this.colHeadResizerMouseUpBind),axdom(document.body).bind("mouseleave.AXGrid",this.colHeadResizerMouseUpBind),axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone")}}},colHeadResizerMouseMove:function(event){event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.colHeadResizerMove(event))},colHeadResizerMove:function(event){var cfg=this.config,mouse=this.getHeadMousePosition(event),newWidth=(this.colResizeTarget.leftPosition-mouse.x).abs();if(!(31>newWidth)){if(axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CH").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_EB").attr("width",newWidth),cfg.colGroup[this.colResizeTarget.colSeq].width=newWidth,cfg.colGroup[this.colResizeTarget.colSeq].widthAstric||(cfg.colGroup[this.colResizeTarget.colSeq]._owidth=newWidth),this.hasFixed){var fixedColSeq=this.fixedColSeq;axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FC").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FE").attr("width",newWidth);for(var CG,fixedColWidth=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number());this.fixedColWidth=fixedColWidth,axdom("#"+cfg.targetID+"_AX_fixedColHead").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".colHeadTable").css({width:fixedColWidth}),this.fixedScrollContent.css({width:fixedColWidth}),this.fixedScrollContent.find(".gridFixedBodyTable").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").find(".gridFixedBodyTable").css({width:fixedColWidth})}if(this.editorOpend)for(var colSeq=this.colResizeTarget.colSeq,_m=0;_m');for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var addClass=CG.display?" on":"",lastClass=cidx==cfg.colGroup.length-1?" last":"";po.push(''),po.push(CG.label),po.push("")}po.push("
    "),axdom(document.body).append(po.join(""));var offset=axdom(eventTarget).offset(),css={};css.top=offset.top-5,css.left=offset.left-20,axdom("#"+cfg.targetID+"_AX_colHeadMenu").css(css);var colGroupListClick=this.colGroupListClick.bind(this);this.colGroupListClickBind=function(event){colGroupListClick(event)},axdom(document).bind("click",this.colGroupListClickBind),axdom(document).bind("keydown",this.colGroupListClickBind)}},colGroupListClick:function(event){var cfg=this.config;if(event.keyCode==AXUtil.Event.KEY_ESC)return axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),void axdom(document).unbind("click",this.colGroupListClickBind);if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("AXGridColGroupListBoxItem")||axdom(evt).hasClass("colHeadTool")?!0:!1}});if(myTarget){if(axdom(myTarget).hasClass("colHeadTool"))return;var targetID=myTarget.id,colSeq=targetID.split(/_AX_/g).last();cfg.colGroup[colSeq].display?(cfg.colGroup[colSeq].display=!1,axdom("#"+targetID).removeClass("on")):(cfg.colGroup[colSeq].display=!0,axdom("#"+targetID).addClass("on")),this.redrawGrid("")}else axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),axdom(document).unbind("click",this.colGroupListClickBind)}},colHeadCheckBoxClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;axdom(eventTarget).hasClass("colHeadTdCheck")&&(eventTarget=axdom(eventTarget).find("input").get(0),eventTarget.checked=!eventTarget.checked);var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],myColHead=cfg.colHead.rows[colHeadR][colHeadC];this.checkedColSeq(myColHead.colSeq,eventTarget.checked)}},needBindDBLClick:function(){return"ie"==axf.browser.name&&("Q"===axf.docTD||axf.browser.version<9)},sortList:function(nsort,myColHead,list){var _this=(this.config,this),getValueForSort=function(item,itemIndex){if(myColHead.formatter){var result;if("money"==myColHead.formatter)result=item[myColHead.key];else if("dec"==myColHead.formatter)result=void 0==item[myColHead.key]?"":item[myColHead.key].dec();else if("html"==myColHead.formatter)result=item[myColHead.key];else if("checkbox"==myColHead.formatter||"radio"==myColHead.formatter)result=item[myColHead.key];else{var sendObj={index:itemIndex,list:list,item:item,page:_this.page};result=myColHead.formatter.call(sendObj,itemIndex,item);var moneyCheck=Object.isString(result)?result.replace(/,/g,""):result;axdom.isNumeric(moneyCheck)&&(result=result.number())}return result}return item[myColHead.key]};if("desc"==nsort){var listIndex=0;list=list.sort(function(prevItem,nowItem){var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?1:v1>v2?-1:v1==v2?0:void 0})}else{var listIndex=0;list=list.sort(function(prevItem,nowItem){var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?-1:v1>v2?1:v1==v2?0:void 0})}return list},setBody:function(list,rewrite){var cfg=this.config;list&&(this.list=list);var po=[];if(po.push('
    '),"grid"==cfg.viewMode?(po.push(''),po.push(this.getColGroup("CB")),po.push(''),po.push(''),po.push(''),po.push(''),po.push('"),po.push(''),po.push(""),po.push(""),po.push(''),po.push(''),po.push("
    '),po.push('
    '),po.push('
    '),po.push(cfg.emptyListMSG),po.push("
    "),po.push("
    "),po.push("
     
    ")):"icon"==cfg.viewMode?po.push('
    '):"mobile"==cfg.viewMode&&po.push('
    '),po.push("
    "),"grid"==cfg.viewMode&&this.hasFixed&&(rewrite&&this.list.length>0||!rewrite)&&(po.push('
    '),po.push(''),po.push(this.getColGroup("FB")),po.push(''),po.push(''),po.push(''),po.push(''),po.push(''),po.push(""),po.push(""),po.push(''),po.push(''),po.push("
    "),po.push("
    ")),("grid"==cfg.viewMode||"icon"==cfg.viewMode)&&(po.push('
    '),po.push('
    '),po.push('
    '),po.push("
    "),po.push('
    ')),this.body.html(po.join("")),this.scrollContent=axdom("#"+cfg.targetID+"_AX_scrollContent"),"grid"==cfg.viewMode&&(this.cachedDom.tbody=axdom("#"+cfg.targetID+"_AX_tbody"),this.hasFixed&&(this.cachedDom.fixed_tbody=axdom("#"+cfg.targetID+"_AX_fixedTbody")),this.cachedDom.thpadding=axdom("#"+cfg.targetID+"_AX_hpadding").find("td"),this.cachedDom.tfpadding=axdom("#"+cfg.targetID+"_AX_fpadding").find("td"),this.hasFixed&&(this.cachedDom.fthpadding=axdom("#"+cfg.targetID+"_AX_fhpadding").find("td"),this.cachedDom.ftfpadding=axdom("#"+cfg.targetID+"_AX_ffpadding").find("td"))),this.fixedScrollContent=axdom("#"+cfg.targetID+"_AX_fixedScrollContent"),this.scrollTrackY=axdom("#"+cfg.targetID+"_AX_scrollTrackY"),this.scrollYHandle=axdom("#"+cfg.targetID+"_AX_scrollYHandle"),this.scrollYTip=axdom("#"+cfg.targetID+"_AX_scrollY_AX_tip"),this.scrollYTipSpan=axdom("#"+cfg.targetID+"_AX_scrollY_AX_tip").find("span"),this.scrollTrackX=axdom("#"+cfg.targetID+"_AX_scrollTrackX"),this.scrollXHandle=axdom("#"+cfg.targetID+"_AX_scrollXHandle"),this.list.length>0){var _this=this;void 0==list?_this.setList(_this.list):setTimeout(function(){_this.setList(_this.list)},100)}("grid"==cfg.viewMode||"icon"==cfg.viewMode)&&(this.scrollYHandle.unbind("mouseover").bind("mouseover",this.contentScrollTipOver.bind(this)),this.scrollYHandle.unbind("mousedown").bind("mousedown",this.contentScrollScrollReady.bind(this)),this.scrollXHandle.unbind("mousedown").bind("mousedown",this.contentScrollScrollReady.bind(this)))},listLoadingDisplay:function(){var cfg=this.config,po=[];"mobile"!=cfg.viewMode?(po.push(''),po.push(''),po.push('
    '),po.push('
    '),po.push('
    '),po.push("
    "),po.push("
    "),po.push(""),po.push('
     
    '),po.push(""),axdom("#"+cfg.targetID+"_AX_tbody").html(po.join("")),po=[],po.push(''),po.push(''),po.push(""),po.push(""),axdom("#"+cfg.targetID+"_AX_fixedTbody").html(po.join(""))):("grid"==cfg.viewMode&&(this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0})),po.push('
    '),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").empty(),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").append(po.join(""))) -},setList:function(obj,sortDisable,rewrite,exts){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;if(this.listLoadingDisplay(),obj.ajaxUrl){this.ajaxInfo=obj,this.ajax_sortDisable=sortDisable,this.pageActive=!0;var url=obj.ajaxUrl,appendPars=["pageNo="+("paging"==exts?this.page.pageNo:1),"pageSize="+this.page.pageSize],pars=obj.ajaxPars?obj.ajaxPars+"&"+appendPars.join("&"):appendPars.join("&"),_method="post",_contentType=AXConfig.AXReq.contentType,_headers={};obj.method&&(_method=obj.method),obj.contentType&&(_contentType=obj.contentType),obj.headers&&(_headers=obj.headers);var ajaxGetList=this.ajaxGetList.bind(this);new AXReq(url,{type:_method,contentType:_contentType,headers:_headers,debug:!1,pars:pars,onsucc:function(res){res.result==AXConfig.AXReq.okCode?(res._sortDisable=sortDisable,obj.response?obj.response.call(res):ajaxGetList(res),obj.onLoad&&obj.onLoad.call(res)):obj.onError?obj.onError.call(res):AXUtil.alert(res)}})}else axdom.isArray(obj)&&(this.list=sortDisable||!cfg.sort?obj:nowSortHeadID?this.sortList(nowSortHeadObj.sort,nowSortHeadObj,obj):obj,this.printList(),this.scrollTop(0),cfg.page.paging||(this.setStatus(this.list.length),this.pagingUnit.hide(),this.pageActive=!1))},reloadList:function(){this.config,this.nowSortHeadID,this.nowSortHeadObj;if(this.selectedCells.clear(),this.selectedRow.clear(),this.ajaxInfo){var obj=this.ajaxInfo,sortDisable=this.ajax_sortDisable;this.pageActive=!0,this.listLoadingDisplay();var url=obj.ajaxUrl,appendPars=["pageNo="+this.page.pageNo,"pageSize="+this.page.pageSize],pars=obj.ajaxPars?obj.ajaxPars+"&"+appendPars.join("&"):appendPars.join("&"),scrollTop=function(){this.scrollTop(0)},scrollTopBind=scrollTop.bind(this),ajaxGetList=this.ajaxGetList.bind(this),userResponseSetPaging=function(res){axf.overwriteObject(this.page,res.page,!0),this.setPaging()},userResponse=userResponseSetPaging.bind(this);new AXReq(url,{debug:!1,pars:pars,onsucc:function(res){res.result==AXConfig.AXReq.okCode?(res._sortDisable=sortDisable,obj.response?(obj.response.call(res),userResponse(res)):ajaxGetList(res),scrollTopBind()):AXUtil.alert(res)}})}},ajaxGetList:function(res){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;this.list=res._sortDisable||!cfg.sort?res.list:nowSortHeadID?this.sortList(nowSortHeadObj.sort,nowSortHeadObj,res.list):res.list,AXUtil.overwriteObject(this.page,res.page,!0),this.printList(),this.scrollTop(0),this.setPaging()},setData:function(res){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;this.list=res._sortDisable||!cfg.sort?res.list:nowSortHeadID?this.sortList(nowSortHeadObj.sort,nowSortHeadObj,res.list):res.list,this.page.onchange||(this.page.onchange=this.page.onChange),axf.overwriteObject(this.page,res.page,!0),this.printList(),this.scrollTop(0),this.setPaging()},getFormatterValue:function(formatter,item,itemIndex,value,key,CH,CHidx){var result,cfg=this.config;if("money"==formatter)result=""==value||"null"==value||null==value||void 0==value?"0":(value||0).number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter){var checked="",disabled="",sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};this.list[itemIndex].___checked?checked=this.list[itemIndex].___checked[CHidx]?' checked="checked" ':" ":CH.checked&&CH.checked.call(sendObj)&&(checked=' checked="checked" ',this.list[itemIndex].___checked||(this.list[itemIndex].___checked={}),this.list[itemIndex].___checked[CHidx]=!0),CH.disabled&&CH.disabled.call(sendObj)&&(disabled=' disabled="disabled" ',this.list[itemIndex].___checked||(this.list[itemIndex].___disabled={}),this.list[itemIndex].___disabled[CHidx]=!0),result='"}else try{var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}catch(e){result=value,trace(e)}return result},getTooltipValue:function(formatter,item,itemIndex,value,key,CH){var result,cfg=this.config;if("money"==formatter)result=""==value||"null"==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter){var checked="";if(CH.checked){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value},callResult=CH.checked.call(sendObj);callResult&&(checked=' checked="checked" ')}result='"}else try{var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}catch(e){trace(e)}return result},getItem:function(itemIndex,item,isfix,hasTr){var cfg=this.config,tpo=[],evenClassName="line"+itemIndex%2,getFormatterValue=this.getFormatterValue.bind(this),getTooltipValue=this.getTooltipValue.bind(this),hasFixed=this.hasFixed,hasTrValue=void 0===hasTr,trAddClass="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){trace(e)}for(var r=0;r');for(var CH,colCount=0,CHidx=0;CHidx0){var printOk=!1;if("n"==isfix&&(printOk=!0),"fix"==isfix&&colCount1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml");var tooltipValue="";CH.tooltip&&(tooltipValue=getTooltipValue(CH.tooltip,item,itemIndex,item[CH.key],CH.key,CH)),tpo.push("'),tpo.push('
    '),tpo.push(hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH,CHidx):item[CH.key]:" "),tpo.push("
    "),tpo.push("")}}0==r&&"n"==isfix&&tpo.push('
     
    '),hasTrValue&&tpo.push("")}return tpo.join("")},getIconItem:function(itemIndex,item,viewIconObj,cssObj){{var format,cfg=this.config,tpo=[];this.getFormatterValue.bind(this),this.getTooltipValue.bind(this)}try{format=viewIconObj.format.call({index:itemIndex,item:item})}catch(e){trace(e)}if(tpo.push('
    '),format.imgsrc&&(tpo.push(''+format.label+'')),format.label&&(tpo.push('
    '),tpo.push(format.label),tpo.push("
    ")),format.description&&(tpo.push('
    '),tpo.push(format.description),tpo.push("
    ")),viewIconObj.buttons&&viewIconObj.buttons.items){tpo.push('
    ');for(var B,bidx=0;bidx'),tpo.push(B.label),tpo.push(" ");tpo.push("
    ")}return tpo.push("
    "),tpo.join("")},getMobileItem:function(itemIndex,item,mobileView){var cfg=this.config,tpo=[],evenClassName="line"+itemIndex%2,getFormatterValue=this.getFormatterValue.bind(this),trAddClass=(this.getTooltipValue.bind(this),"");if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){trace(e)}tpo.push('
    ');for(var CN,__memoCol=null,displayColumnCount=0,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)(1==CN.display||void 0==CN.display)&&displayColumnCount++;for(var CN,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)if(1==CN.display||void 0==CN.display){var colClass="",colAddClass=CN.addClass||"";1===displayColumnCount&&(colAddClass=""),colClass=CN.col?"col"+CN.col:"colNone",null==__memoCol||CN.col||tpo.push("
    "),tpo.push("
    "),0!=mobileView.label?(tpo.push(""+CN.label+""),tpo.push("")):tpo.push(""),tpo.push(CN.formatter?getFormatterValue(CN.formatter,item,itemIndex,item[CN.key],CN.key,CN):item[CN.key]),tpo.push(""),tpo.push("
    "),__memoCol=CN.col}if(tpo.push("
    "),tpo.push("
    "),mobileView.buttons)for(var B,bidx=0,__arr=mobileView.buttons;bidx<__arr.length&&(B=__arr[bidx]);bidx++)tpo.push(""),tpo.push("");return tpo.push("
    "),tpo.push("
    "),tpo.join("")},getItemMarker:function(itemIndex,item,isfix){var cfg=this.config,tpo=[],evenClassName="gridBodyMarker",getFormatterValue=this.getFormatterValue.bind(this),hasFixed=this.hasFixed,trAddClass="";if(cfg.body.marker.addClass)try{trAddClass=cfg.body.marker.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){trace(e)}for(var r=0;r');for(var CH,colCount=0,CHidx=0,__arr=cfg.body.marker.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)if(CH.display&&CH.colspan>0&&("n"==isfix||void 0!=isfix&&colCount1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("'),tpo.push('
    '),tpo.push(hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH):item[CH.key]:" "),tpo.push("
    "),tpo.push("")}0==r&&"n"==isfix&&tpo.push('
     
    '),tpo.push("")}return tpo.join("")},getMarkerDisplay:function(itemIndex,item){var cfg=this.config,bodyHasMarker=this.bodyHasMarker;if(!bodyHasMarker)return!1;var markerDisplay,sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{markerDisplay=cfg.body.marker.display.call(sendObj,itemIndex,item)}catch(e){trace(e)}return markerDisplay},printList:function(){var cfg=this.config,bodyHasMarker=this.bodyHasMarker,getItem=this.getItem.bind(this),getItemMarker=this.getItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this);this.editorOpend&&this.cancelEditor();var getIconItem=this.getIconItem.bind(this),getMobileItem=this.getMobileItem.bind(this),po=[];if("grid"==cfg.viewMode){if("auto"==cfg.height){this.virtualScroll=null;for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"n"))}else if(this.list.length>0){var firstItem=this.list[0];po.push(getItem(0,firstItem,"n")),bodyHasMarker&&getMarkerDisplay(0,firstItem)&&po.push(getItemMarker(0,firstItem,"n"))}if(0==this.list.length&&(po.push(''),po.push(''),po.push('
    '),po.push('
    '),po.push(cfg.emptyListMSG),po.push("
    "),po.push("
    "),po.push(""),po.push('
     
    '),po.push("")),this.cachedDom.tbody.empty(),this.cachedDom.tbody.append(po.join("")),this.hasFixed){if(po=[],"auto"==cfg.height)for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"fix"));else this.list.length>0&&(po.push(getItem(0,firstItem,"fix")),bodyHasMarker&&getMarkerDisplay(0,firstItem)&&po.push(getItemMarker(itemIndex,firstItem,"fix")));this.cachedDom.fixed_tbody.empty(),this.cachedDom.fixed_tbody.append(po.join(""))}if("auto"!=cfg.height&&this.list.length>0){var itemTrHeight=this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0").outerHeight().number();this.scrollContent.css({"padding-bottom":itemTrHeight}),po=[];var printListCount=(this.body.height()/itemTrHeight).ceil();this.list.length>printListCount+10?printListCount+=10:printListCount=this.list.length;for(var item,itemIndex=1,__arr=this.list;printListCount>itemIndex&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"n"));if(this.cachedDom.tbody.append(po.join("")),this.hasFixed){po=[];for(var item,itemIndex=1,__arr=this.list;printListCount>itemIndex&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"fix"));this.cachedDom.fixed_tbody.append(po.join(""))}this.virtualScroll={startIndex:0,endIndex:printListCount-1,itemTrHeight:itemTrHeight,printListCount:printListCount,scrollTop:0},this.cachedDom.thpadding.css({height:0}),this.cachedDom.tfpadding.css({height:(this.list.length-printListCount-1)*itemTrHeight}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:0}),this.cachedDom.ftfpadding.css({height:(this.list.length-printListCount-1)*itemTrHeight})),this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0})}if(this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOver.bind(this)),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOut.bind(this)),this.body.find(".gridBodyTr").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0){for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".gridBodyTr_"+item).addClass("selected");var itemIndex=this.selectedRow.last();try{var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,bodyHeight=(this.scrollContent.height(),this.body.height());if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+itemTrHeight.number());this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}catch(e){}}}else if("icon"==cfg.viewMode){var viewIconObj=cfg.view,viewIconCss=[];viewIconCss.push("width:"+viewIconObj.width.number()+"px"),viewIconCss.push("height:"+viewIconObj.height.number()+"px"),viewIconObj.style&&viewIconCss.push(viewIconObj.style);var viewIconImgCss=[];viewIconImgCss.push("left:"+viewIconObj.img.left.number()+"px"),viewIconImgCss.push("top:"+viewIconObj.img.top.number()+"px"),viewIconImgCss.push("width:"+viewIconObj.img.width.number()+"px"),viewIconImgCss.push("height:"+viewIconObj.img.height.number()+"px"),viewIconObj.img.style&&viewIconImgCss.push(viewIconObj.img.style);var viewIconLabelCss=[];viewIconLabelCss.push("left:"+viewIconObj.label.left.number()+"px"),viewIconLabelCss.push("top:"+viewIconObj.label.top.number()+"px"),viewIconLabelCss.push("width:"+viewIconObj.label.width.number()+"px"),viewIconLabelCss.push("height:"+viewIconObj.label.height.number()+"px"),viewIconObj.label.style&&viewIconLabelCss.push(viewIconObj.label.style);var viewIconDescriptionCss=[];viewIconDescriptionCss.push("left:"+viewIconObj.description.left.number()+"px"),viewIconDescriptionCss.push("top:"+viewIconObj.description.top.number()+"px"),viewIconDescriptionCss.push("width:"+viewIconObj.description.width.number()+"px"),viewIconDescriptionCss.push("height:"+viewIconObj.description.height.number()+"px"),viewIconObj.description.style&&viewIconDescriptionCss.push(viewIconObj.description.style);var viewIconButtonsCss=[];viewIconObj.buttons&&(viewIconButtonsCss.push("left:"+viewIconObj.buttons.left.number()+"px"),viewIconButtonsCss.push("top:"+viewIconObj.buttons.top.number()+"px"),viewIconButtonsCss.push("width:"+viewIconObj.buttons.width.number()+"px"),viewIconButtonsCss.push("height:"+viewIconObj.buttons.height.number()+"px"),viewIconObj.buttons.style&&viewIconButtonsCss.push(viewIconObj.buttons.style));for(var item,cssObj={box:viewIconCss.join(";"),img:viewIconImgCss.join(";"),label:viewIconLabelCss.join(";"),description:viewIconDescriptionCss.join(";"),buttons:viewIconButtonsCss.join(";")},itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getIconItem(itemIndex,item,viewIconObj,cssObj));po.push("
    ");var gridBodyDiv=axdom("#"+cfg.targetID+"_AX_gridBodyDiv");if(gridBodyDiv.empty(),gridBodyDiv.append(po.join("")),this.body.find(".bodyViewIcon").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".bodyViewIcon").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0)for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".bodyViewIcon_"+item).addClass("selected");var _list=this.list,iconButtonClick=function(event){var ids=event.target.id.split(/_AX_/g),itemIndex=ids[ids.length-2],buttonIndex=ids[ids.length-1];viewIconObj.buttons.items[buttonIndex].onclick&&viewIconObj.buttons.items[buttonIndex].onclick.call({index:itemIndex,list:_list,item:_list[itemIndex],buttonItem:viewIconObj.buttons.items[buttonIndex]})},iconButtonClickBind=iconButtonClick.bind(this);this.body.find(".bodyViewIcon .viewIconButtonsItem").bind("click",function(event){iconButtonClickBind(event)})}else if("mobile"==cfg.viewMode){var mobileView=cfg.view;if(void 0==mobileView){for(var CG,columns=[],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var col=null,addClass="";CG.widthAstric||CG.width.number()>=200?(col=4,addClass="underLine"):CG.width.number()>=100?col=2:CG.width.number()>=40,columns.push({key:CG.key,label:CG.label,col:col,formatter:CG.formatter,addClass:addClass,sort:CG.sort||"",display:CG.display||!0})}columns=columns.sort(function(pItem,nItem){var v1=pItem.col,v2=nItem.col;return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),mobileView={labelView:!0,column:columns}}for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getMobileItem(itemIndex,item,mobileView));if(0==this.list.length&&(po.push('
    '),po.push(cfg.emptyListMSG),po.push("
    ")),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").empty(),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").append(po.join("")),this.body.find(".bodyViewMobile").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".bodyViewMobile").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0)for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".bodyViewMobile_"+item).addClass("selected");{var _list=this.list,mobileButtonClick=function(event){var ids=event.target.id.split(/_AX_/g),itemIndex=ids[ids.length-2],buttonIndex=ids[ids.length-1];mobileView.buttons[buttonIndex].onclick&&mobileView.buttons[buttonIndex].onclick.call({index:itemIndex,list:_list,item:_list[itemIndex],buttonItem:mobileView.buttons[buttonIndex]})};mobileButtonClick.bind(this)}this.body.find(".bodyViewMobile").find(".buttonGroupItem").bind("click",function(event){mobileButtonClick(event)})}this.selectedCells.clear(),this.contentScrollResize(),this.contentScrollXAttr=null,this.contentScrollYAttr=null},updateList:function(itemIndex,item){var cfg=this.config;if(this.cancelEditor(),"C"==item._CUD);else{if("D"==item._CUD)return void toast.push("삭제된 아이템 입니다. 수정할 수 없습니다.");item._CUD="U"}this.list[itemIndex]=item;var npo=this.getItem(itemIndex,item,"n","notr");if(this.hasFixed)var fpo=this.getItem(itemIndex,item,"fix","notr");axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).html(npo),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).html(fpo);var trAddClass="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list})||""}catch(e){trace(e)}axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass),this.redrawDataSet()},pushList:function(pushItem,insertIndex){var cfg=this.config;if(this.cancelEditor(),pushItem._CUD="C",null!=insertIndex&&void 0!=insertIndex){for(var L,itemIndex=insertIndex,newList=[],listIndex=0,__arr=this.list;listIndex<__arr.length&&(L=__arr[listIndex]);listIndex++)listIndex==itemIndex&&newList.push(pushItem),newList.push(L);this.list=newList;var item=this.list[itemIndex],npo=this.getItem(itemIndex,item,"n");if(this.hasFixed)var fpo=this.getItem(itemIndex,item,"fix");this.printList(),this.contentScrollResize(!1),this.setFocus(itemIndex)}else{var itemIndex=this.list.length;if(this.list.push(pushItem),0==itemIndex)this.printList();else{var item=this.list[itemIndex],npo=this.getItem(itemIndex,item,"n");if(this.hasFixed)var fpo=this.getItem(itemIndex,item,"fix");var trlen=axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+(itemIndex.number()-1)).length-1;axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+(itemIndex.number()-1)).each(function(idx){idx==trlen&&axdom(this).after(npo)}),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+(itemIndex-1)).each(function(idx){idx==trlen&&axdom(this).after(fpo)}),axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).bind("mouseover",this.gridBodyOver.bind(this)),axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).bind("mouseout",this.gridBodyOut.bind(this)),axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).bind("dblclick",this.gridBodyDBLClick.bind(this)),this.hasFixed&&(axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).bind("mouseover",this.gridBodyOver.bind(this)),axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).bind("mouseout",this.gridBodyOut.bind(this)),axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).bind("dblclick",this.gridBodyDBLClick.bind(this))),this.contentScrollResize(!1),this.setFocus(itemIndex)}}this.pageActive||this.setStatus(this.list.length),this.redrawDataSet()},removeList:function(removeList){var cfg=this.config;if(cfg.passiveMode){var _list=this.list,collect=[];axf.each(removeList,function(ridx,r){axf.each(_list,function(lidx,l){var isDel=!1;axf.each(r,function(k,v){return l[k]!=v?(isDel=!1,!1):void(isDel=!0)}),isDel?"C"!=l._CUD&&(l._CUD="D",collect.push(l)):collect.push(l)})}),this.list=collect}else{var collect=[];axf.each(this.list,function(lidx,l){var isPush=!0;axf.each(removeList,function(ridx,r){return axf.each(r,function(k,v){return l[k]==v?(isPush=!1,!1):void 0}),isPush?void 0:!1}),isPush&&collect.push(l)}),this.list=collect}this.printList(),this.pageActive||this.setStatus(this.list.length),this.redrawDataSet()},removeListIndex:function(removeList){var cfg=this.config,_list=this.list;if(cfg.passiveMode){axf.each(removeList,function(ridx,r){_list[r.index]&&(cfg.passiveRemoveHide?_list[r.index]._isDel=!0:"C"!=_list[r.index]._CUD?_list[r.index]._CUD="D":_list[r.index]._isDel=!0)});var collect=[],removeCollect=this.removedList;axf.each(_list,function(){this._isDel?"C"!=this._CUD&&removeCollect.push(this):collect.push(this)}),this.list=collect,this.removedList=removeCollect}else{var collect=[];axf.each(removeList,function(ridx,r){_list[r.index]&&(_list[r.index]._isDel=!0)});var collect=[],removeCollect=this.removedList;axf.each(_list,function(){this._isDel?removeCollect.push(this):collect.push(this)}),this.list=collect,this.removedList=removeCollect}this.selectedCells.clear(),this.selectedRow.clear(),this.printList(),this.pageActive||this.setStatus(this.list.length),this.redrawDataSet()},restoreList:function(restoreList){var _list=(this.config,this.list),collect=[];axf.each(restoreList,function(ridx,r){axf.each(_list,function(lidx,l){var isDel=!1;axf.each(r,function(k,v){return l[k]!=v?(isDel=!1,!1):void(isDel=!0)}),isDel?("D"==l._CUD&&(l._CUD=""),collect.push(l)):collect.push(l)})}),this.list=collect,this.printList(),this.pageActive||this.setStatus(this.list.length),this.redrawDataSet()},gridBodyOver:function(event){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover");var itemIndex=event.target.id.split(/_AX_/g).last();""!=itemIndex&&(this.body.find(".gridBodyTr_"+itemIndex).addClass("hover"),this.overedItemIndex=itemIndex)},gridBodyOut:function(){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover")},gridBodyClick:function(event){var cfg=this.config;if(cfg.body.ondblclick)if(this.needBindDBLClick())clearTimeout(this.bodyClickObserver),this.gridBodyClickAct(event);else{if(this.bodyClickObserver)return clearTimeout(this.bodyClickObserver),this.gridBodyDBLClick(event),void(this.bodyClickObserver=null);var gridBodyClickAct=this.gridBodyClickAct.bind(this);this.bodyClickObserver=setTimeout(function(){gridBodyClickAct(event)},400)}else this.gridBodyClickAct(event)},gridBodyClickAct:function(event){this.bodyClickObserver=null;var cfg=this.config,eventTarget=event.target;if(""!=event.target.id){var checkedValue,eid=event.target.id.split(/_AX_/g),isoncheck=!1;if("input"==eventTarget.tagName.toLowerCase()||"button"==eventTarget.tagName.toLowerCase()){if("input"==eventTarget.tagName.toLowerCase()&&("checkbox"==eventTarget.type.toLowerCase()||"radio"==eventTarget.type.toLowerCase())&&(isoncheck=!0,checkedValue=eventTarget.checked),cfg.body.oncheck)isoncheck=!0;else if(!isoncheck)return;var ieid=event.target.id.split(/_AX_/g),checkboxColSeq=ieid[ieid.length-2],checkboxIndex=ieid[ieid.length-1];if(cfg.colGroup[checkboxColSeq].oncheck){var sendObj={index:checkboxIndex,list:this.list,item:this.list[checkboxIndex]};try{cfg.colGroup[checkboxColSeq].oncheck.call(sendObj,event.target.checked)}catch(e){trace(e)}}}}var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){var edom=axdom(evt);return axdom(evt.parentNode).hasClass("AXGridBody")||edom.hasClass("buttonGroupItem")},find:function(evt){var edom=axdom(evt);return(edom.hasClass("bodyTd")||edom.hasClass("bodyViewIcon")||edom.hasClass("bodyViewMobile"))&&!edom.hasClass("buttonGroupItem")}});if(isoncheck){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g),item=this.list[itemIndex],r=ids[ids.length-3],c=ids[ids.length-2];this.list[itemIndex].___checked||(this.list[itemIndex].___checked={}),this.list[itemIndex].___checked[c]=checkedValue;var sendObj=(event.target,event.target.checked,{index:itemIndex,target:event.target,checked:event.target.checked,r:r,c:c,list:this.list,item:item,page:this.page});try{cfg.body.oncheck&&cfg.body.oncheck.call(sendObj,itemIndex,item)}catch(e){trace(e)}}else if("grid"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g);if(event.shiftKey);else if(event.metaKey||event.ctrlKey){if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear()}var hasID=!1,collect=[];axf.each(this.selectedCells,function(){this==targetID?hasID=!0:collect.push(this)}),hasID?(axdom("#"+targetID).removeClass("selected"),this.selectedCells=collect):(axdom("#"+targetID).addClass("selected"),this.selectedCells.push(targetID))}else{if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var r=ids[ids.length-3],c=ids[ids.length-2],sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}}}else if("icon"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(event.shiftKey);else if(!event.metaKey&&!event.ctrlKey){if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewIcon_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewIcon_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page}; -try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}}}else if("mobile"==cfg.viewMode&&myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(event.shiftKey);else if(event.metaKey||event.ctrlKey);else{if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}}},gridBodyDBLClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()&&"button"!=eventTarget.tagName.toLowerCase()){var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXGridBody")?!0:!1},find:function(evt){return axdom(evt).hasClass("bodyTd")||axdom(evt).hasClass("bodyViewIcon")||axdom(evt).hasClass("bodyViewMobile")?!0:!1}});if("grid"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g);if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var r=ids[ids.length-3],c=ids[ids.length-2],item=this.list[itemIndex],sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}}else if("icon"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewIcon_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".bodyViewIcon_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var item=this.list[itemIndex],sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}}else if("mobile"==cfg.viewMode&&myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var item=this.list[itemIndex],sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}}this.stopEvent(event),this.clearRange()}}},contentScrollResize:function(resetLeft){var cfg=this.config,_this=this;"mobile"!=cfg.viewMode&&(this.contentScrollResize_timer&&clearTimeout(this.contentScrollResize_timer),this.contentScrollResize_timer=setTimeout(function(){var bodyHeight=_this.body.height(),scrollHeight=_this.scrollContent.height(),bodyWidth=_this.body.width(),_colWidth=_this.colWidth.number()+cfg.fitToWidthRightMargin,scrollWidth=_colWidth>bodyWidth?_colWidth:bodyWidth;if(_this.scrollContent.css({width:scrollWidth}),_this.colHead.css({width:scrollWidth}),_this.hasEditor&&_this.editor.css({width:scrollWidth}),0!=resetLeft?(_this.scrollContent.css({left:0}),axdom("#"+cfg.targetID+"_AX_gridColHead").css({left:0}),_this.scrollXHandle.css({left:0}),_this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:0})):_this.scrollContent.width()+_this.scrollContent.position().left<_this.body.width()&&(_this.scrollContent.css({left:0}),axdom("#"+cfg.targetID+"_AX_gridColHead").css({left:0}),_this.scrollXHandle.css({left:0})),scrollHeight>bodyHeight&&"auto"!=cfg.height){_this.scrollTrackY.show();var scrollTrackYHeight=bodyHeight;_this.scrollTrackY.css({height:scrollTrackYHeight});var scrollYHandleHeight=bodyHeight*scrollTrackYHeight/scrollHeight;_this.scrollYHandle.data("height",scrollYHandleHeight),30>scrollYHandleHeight&&(scrollYHandleHeight=30),_this.scrollYHandle.css({height:scrollYHandleHeight})}else _this.scrollTrackY.hide();if(scrollWidth>bodyWidth+4&&cfg.xscroll){_this.show_scrollTrackX=!0,_this.scrollTrackX.show();var scrollTrackXWidth=bodyWidth;_this.scrollTrackX.css({width:scrollTrackXWidth});var scrollXHandleWidth=bodyWidth*scrollTrackXWidth/scrollWidth;if(_this.scrollXHandle.data("width",scrollXHandleWidth),30>scrollXHandleWidth&&(scrollXHandleWidth=30),_this.scrollXHandle.css({width:scrollXHandleWidth}),"auto"==cfg.height){var colHeadHeight=_this.colHead.outerHeight(),scrollBodyHeight=_this.scrollContent.height();_this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),_this.body.css({top:colHeadHeight,height:scrollBodyHeight})}}else if(_this.show_scrollTrackX=!1,_this.scrollTrackX.hide(),"auto"==cfg.height){var colHeadHeight=_this.colHead.outerHeight(),scrollBodyHeight=_this.scrollContent.height();_this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),_this.body.css({top:colHeadHeight,height:scrollBodyHeight})}},10))},contentScrollScrollSync:function(pos){var cfg=this.config;if(void 0!=pos.left){if(!this.contentScrollXAttr){var scrollWidth=this.colWidth>this.body.width()?this.colWidth:this.body.width();this.contentScrollXAttr={bodyWidth:this.body.width(),scrollWidth:scrollWidth,scrollTrackXWidth:this.scrollTrackX.width(),scrollXHandleWidth:this.scrollXHandle.outerHeight()}}var L=(this.contentScrollXAttr.scrollWidth*pos.left/this.contentScrollXAttr.scrollTrackXWidth).round(0);this.scrollContent.css({left:-L}),axdom("#"+cfg.targetID+"_AX_gridColHead").css({left:-L}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:-L})}else{if("auto"==cfg.height)return;this.contentScrollYAttr?this.contentScrollYAttr.scrollHeight=this.scrollContent.height():this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.outerHeight(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var T=(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight)*(pos.top/(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)).number();this.scrollContent.css({top:-T}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&this.fixedScrollContent.css({top:-T}),this.editorOpend&&this.editor.css({top:-T+this.editorOpenTop}),this.bigDataSync()}},contentScrollContentSync:function(pos,touch){var cfg=this.config;if(void 0!=pos.left){if(!this.contentScrollXAttr){{this.colWidth>this.body.width()?this.colWidth:this.body.width()}this.contentScrollXAttr={bodyWidth:this.body.width(),scrollWidth:this.scrollContent.width(),scrollTrackXWidth:this.scrollTrackX.width(),scrollXHandleWidth:this.scrollXHandle.outerWidth()}}var L=(this.contentScrollXAttr.scrollTrackXWidth-this.contentScrollXAttr.scrollXHandleWidth)*(pos.left/(this.contentScrollXAttr.scrollWidth-this.contentScrollXAttr.bodyWidth));this.scrollXHandle.css({left:-L}),axdom("#"+cfg.targetID+"_AX_gridColHead").css({left:pos.left}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:pos.left})}else{if("auto"==cfg.height)return;this.contentScrollYAttr?(this.contentScrollYAttr.scrollHeight=this.scrollContent.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrackY.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollYHandle.outerHeight()):this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.height(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var T=(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)*(pos.top/(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight));this.scrollYHandle.css({top:-T}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&this.fixedScrollContent.css({top:pos.top}),this.editorOpend&&this.editor.css({top:pos.top+this.editorOpenTop})}void 0==touch&&this.bigDataSync()},getMousePositionToContentScroll:function(event,contentScrollID){var pos=axdom("#"+contentScrollID).offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPositionToContentScroll:function(event){var x,y,cfg=this.config,touch=event.touches[0];return cfg.touchDirection?(x=touch.pageX.round(10),y=touch.pageY.round(10)):(x=-touch.pageX.round(10),y=-touch.pageY.round(10)),{x:x,y:y}},contentScrollScrollReady:function(event){var cfg=this.config,handleName=event.target.id.split(/_AX_/).last();this.contentScrollAttrs={handleName:handleName},this.contentScrollXAttr=null,this.contentScrollYAttr=null,this.contentScrollAttrs.scrollTrack="scrollYHandle"==handleName?cfg.targetID+"_AX_scrollTrackY":cfg.targetID+"_AX_scrollTrackX",axdom(event.target).addClass("hover");var pos=this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack);this.contentScrollAttrs.x=axdom(event.target).position().left-pos.x,this.contentScrollAttrs.y=axdom(event.target).position().top-pos.y,this.contentScrollAttrs.handleWidth=axdom(event.target).outerWidth(),this.contentScrollAttrs.handleHeight=axdom(event.target).outerHeight(),this.contentScrollAttrs.trackWidth=this.scrollTrackX.width(),this.contentScrollAttrs.trackHeight=this.scrollTrackY.height(),this.contentScrollYAttr?(this.contentScrollYAttr.scrollHeight=this.scrollContent.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrackY.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollYHandle.outerHeight()):this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.outerHeight(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var contentScrollScrollMove=this.contentScrollScrollMove.bind(this);this.contentScrollScrollMoveBind=function(event){contentScrollScrollMove(event)};var contentScrollScrollEnd=this.contentScrollScrollEnd.bind(this);this.contentScrollScrollEndBind=function(event){contentScrollScrollEnd(event)},"scrollYHandle"==handleName&&(this.scrollYTip.show(),this.contentScrollTipOverMove()),axdom(document.body).bind("mousemove.AXGrid",this.contentScrollScrollMoveBind),axdom(document.body).bind("mouseup.AXGrid",this.contentScrollScrollEndBind),axdom(document.body).bind("mouseleave.AXGrid",this.contentScrollScrollEndBind),axdom(document.body).attr("onselectstart","return false"),axdom(document.body).addClass("AXUserSelectNone"),this.contentScrollScrolling=!0},contentScrollScrollMove:function(event){var pos=(this.config,this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack)),handleName=this.contentScrollAttrs.handleName,handleTop=0,handleLeft=0;"scrollYHandle"==handleName?(handleTop=pos.y+this.contentScrollAttrs.y,0>handleTop&&(handleTop=0),handleTop+this.contentScrollAttrs.handleHeight>this.contentScrollAttrs.trackHeight&&(handleTop=this.contentScrollAttrs.trackHeight-this.contentScrollAttrs.handleHeight),this.scrollYHandle.css({top:handleTop}),this.scrollYHandle.data("top",handleTop),this.contentScrollTipOverMove(handleTop)):(handleLeft=pos.x+this.contentScrollAttrs.x,0>handleLeft&&(handleLeft=0),handleLeft+this.contentScrollAttrs.handleWidth>this.contentScrollAttrs.trackWidth&&(handleLeft=this.contentScrollAttrs.trackWidth-this.contentScrollAttrs.handleWidth),this.scrollXHandle.css({left:handleLeft}))},contentScrollScrollEnd:function(){var cfg=this.config;axdom(document.body).unbind("mousemove.AXGrid"),axdom(document.body).unbind("mouseup.AXGrid"),axdom(document.body).unbind("mouseleave.AXGrid"),axdom(document.body).removeAttr("onselectstart"),axdom(document.body).removeClass("AXUserSelectNone"),axdom("#"+cfg.targetID+"_AX_"+this.contentScrollAttrs.handleName).removeClass("hover"),this.contentScrollScrolling=!1,"scrollYHandle"==this.contentScrollAttrs.handleName?(this.contentScrollScrollSync({top:this.scrollYHandle.position().top}),this.contentScrollAttrs.trackHeight-this.contentScrollAttrs.handleHeight==this.scrollYHandle.data("top")&&this.contentScrollEnd(),this.scrollYTip.hide()):this.contentScrollScrollSync({left:this.scrollXHandle.position().left})},contentScrollScrollWheel:function(e){var cfg=this.config;if("auto"!=cfg.height){this.contentScrollAttrs||(this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.height(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()});{var event=window.event||e,delta=event.detail?-20*event.detail:event.wheelDelta/2,bodyHeight=this.body.height(),scrollTop=this.scrollContent.position().top,scrollHeight=this.scrollContent.height();this.scrollYHandle.outerHeight(),this.scrollTrackY.height()}if(!(bodyHeight>scrollHeight)){var eventCancle=!1;if(scrollTop+=delta,scrollTop>0?(scrollTop=0,eventCancle=!0):scrollTop.abs()+bodyHeight>scrollHeight?(scrollTop=bodyHeight-scrollHeight,eventCancle=!0):0==scrollTop&&(scrollTop=0,eventCancle=!0),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}),!eventCancle)return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1;if(0!=scrollTop){var contentScrollEnd=this.contentScrollEnd.bind(this);this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver),this.contentScrollEndObserver=setTimeout(function(){contentScrollEnd()},100)}}}},contentScrollTouchstart:function(e){var cfg=this.config,event=window.event||e;if("mobile"!=cfg.viewMode){this.contentScrollTouchMoved=!0,this.contentScrollIDOffset=this.scrollContent.offset(),this.contentScrollXAttr=null,this.contentScrollYAttr=null;var pos=this.getTouchPositionToContentScroll(event);this.scrollYHandle.addClass("hover"),this.scrollXHandle.addClass("hover"),this.scrollTouchAttr={y:pos.y,h:this.body.outerHeight(),th:this.scrollContent.height(),nt:this.scrollContent.position().top,x:pos.x,w:this.body.outerWidth(),tw:this.scrollContent.width(),nl:this.scrollContent.position().left};var contentScrollTouchEnd=this.contentScrollTouchEnd.bind(this);this.contentScrollTouchEndBind=function(){contentScrollTouchEnd(event)};var contentScrollTouchMove=this.contentScrollTouchMove.bind(this);this.contentScrollTouchMoveBind=function(){contentScrollTouchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.contentScrollTouchEndBind,!1),document.addEventListener("touchmove",this.contentScrollTouchMoveBind,!1))}},contentScrollTouchMove:function(e){var cfg=this.config,event=window.event||e;if(this.contentScrollTouchMoved){var pos=this.getTouchPositionToContentScroll(event),scrollTouchAttr=this.scrollTouchAttr,eventCancle=!1;if(scrollTouchAttr.th>scrollTouchAttr.h&&"auto"!=cfg.height){var scrollTop=scrollTouchAttr.nt-(pos.y-scrollTouchAttr.y);scrollTop>0?(scrollTop=0,eventCancle=!0):scrollTop.abs()+scrollTouchAttr.h>scrollTouchAttr.th?(scrollTop=scrollTouchAttr.h-scrollTouchAttr.th,eventCancle=!0):0==scrollTop&&(scrollTop=0,eventCancle=!0),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop},"touch")}else eventCancle=!0;if(this.show_scrollTrackX&&(pos.x-scrollTouchAttr.x).abs()>8){eventCancle=!1;var scrollLeft=scrollTouchAttr.nl-(pos.x-scrollTouchAttr.x);scrollLeft>0?(scrollLeft=0,eventCancle=!0):scrollLeft.abs()+scrollTouchAttr.w>scrollTouchAttr.tw?(scrollLeft=scrollTouchAttr.w-scrollTouchAttr.tw,eventCancle=!0):0==scrollLeft&&(scrollLeft=0,eventCancle=!0),this.scrollContent.css({left:scrollLeft}),this.contentScrollContentSync({left:scrollLeft},"touch")}if(eventCancle){if(0!=scrollTop){var contentScrollEnd=this.contentScrollEnd.bind(this);this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver),this.contentScrollEndObserver=setTimeout(function(){contentScrollEnd()},100)}}else event.preventDefault&&event.preventDefault()}},contentScrollTouchEnd:function(e){{var cfg=this.config;window.event||e}this.contentScrollTouchMoved&&("auto"!=cfg.height&&this.bigDataSync(),this.scrollXHandle.removeClass("hover"),this.scrollYHandle.removeClass("hover"),document.removeEventListener&&(document.removeEventListener("touchend",this.contentScrollTouchEndBind,!1),document.removeEventListener("touchmove",this.contentScrollTouchMoveBind,!1)),this.contentScrollTouchMoved=!1)},contentScrollEnd:function(){this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver);var cfg=this.config;if(cfg.body.onscrollend)try{cfg.body.onscrollend.call({list:this.list,page:this.page})}catch(e){trace(e)}},contentScrollTipOver:function(){},contentScrollTipOverMove:function(handleTop){var hTop=(this.config,handleTop||this.scrollYHandle.position().top),T=(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight)*(hTop/(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)).number();this.scrollYTipSpan.empty(),this.scrollYTipSpan.append((T.abs()/this.virtualScroll.itemTrHeight).floor().money()+"/"+this.list.length.money()),this.scrollYTip.css({top:hTop})},contentScrollTipOverOut:function(){this.config;this.scrollYHandle.unbind("mousemove"),this.scrollYHandle.unbind("mouseout"),this.scrollYTip.hide()},bigDataSync:function(){this.bigDataSyncObserver&&clearTimeout(this.bigDataSyncObserver),this.bigDataSyncObserver=setTimeout(this.bigDataSyncApply.bind(this),10)},bigDataSyncApply:function(){var scrollContentScrollTop,item,bodyHasMarker=(this.config,this.bodyHasMarker),getItem=this.getItem.bind(this),getItemMarker=this.getItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this),VS=this.virtualScroll,po=[];if(VS.scrollTop!=(scrollContentScrollTop=this.scrollContent.position().top)){var newStartIndex=(scrollContentScrollTop.abs()/VS.itemTrHeight).ceil()-1;0>newStartIndex&&(newStartIndex=0);var newEndIndex=newStartIndex+VS.printListCount;newEndIndex>this.list.length&&(newEndIndex=this.list.length,newStartIndex=newEndIndex-VS.printListCount),po=[];for(var itemIndex=newStartIndex;newEndIndex>itemIndex;itemIndex++)item=this.list[itemIndex],po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"n"));if(this.cachedDom.tbody.empty(),this.cachedDom.tbody.append(po.join("")),this.hasFixed){po=[];for(var itemIndex=newStartIndex;newEndIndex>itemIndex;itemIndex++)item=this.list[itemIndex],po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"fix"));this.cachedDom.fixed_tbody.empty(),this.cachedDom.fixed_tbody.append(po.join(""))}if(this.cachedDom.thpadding.css({height:newStartIndex*VS.itemTrHeight}),this.cachedDom.tfpadding.css({height:(this.list.length-newEndIndex-1)*VS.itemTrHeight}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:newStartIndex*VS.itemTrHeight}),this.cachedDom.ftfpadding.css({height:(this.list.length-newEndIndex-1)*VS.itemTrHeight})),this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOver.bind(this)),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOut.bind(this)),this.body.find(".gridBodyTr").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0){for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".gridBodyTr_"+item).addClass("selected");var itemIndex=this.selectedRow.last();try{var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),bodyHeight=(this.scrollContent.height(),this.body.height());if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+VS.itemTrHeight.number());this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}catch(e){}}VS.startIndex=newStartIndex,VS.endIndex=newEndIndex,VS.scrollTop=scrollContentScrollTop}},scrollTop:function(itemIndex){var cfg=this.config;if("auto"!=cfg.height)try{{var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),scrollHeight=this.scrollContent.height(),bodyHeight=this.body.height();this.scrollYHandle.outerHeight(),this.scrollTrackY.height()}if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+trHeight.number());this.body.height()0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);{var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),bodyHeight=(this.scrollContent.height(),this.body.height());this.scrollYHandle.outerHeight(),this.scrollTrackY.height()}if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+trHeight.number());this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}else if("icon"==cfg.viewMode);else if("mobile"==cfg.viewMode){if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),this.body.find(".bodyViewMobile_"+itemIndex).focus()}},focusMove:function(direction,event){var myIndex=(this.config,this.selectedRow.first()),newIndex=myIndex.number()+direction;return 0>newIndex?newIndex=this.list.length-1:newIndex>this.list.length-1&&(newIndex=0),this.setFocus(newIndex),event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1},getSelectedItem:function(){this.config;return void 0!=this.selectedRow&&null!=this.selectedRow&&this.selectedRow.length>0?{index:this.selectedRow.first(),item:this.list[this.selectedRow.first()]}:{error:"noselected",description:"선택된 item이 없습니다."}},click:function(itemIndex){var cfg=this.config;this.setFocus(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){trace(e)}}return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1},getDataSetFormatterValue:function(formatter,dataSet,value,key){{var result;this.config}if("money"==formatter)result=""==value||"null"==value||void 0==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter)result=value;else{var sendObj={index:null,list:this.list,item:dataSet,dataSet:dataSet,page:this.page,key:key,value:value};try{result=formatter.call(sendObj)}catch(e){trace(e)}}return result},getHeadDataSet:function(dataSet,isfix){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r');var colCount=0;axf.each(cfg.head.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&(void 0==isfix||void 0!=isfix&&colCount1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("'),tpo.push('
    '),tpo.push(hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH):dataSet[CH.key]:" "),tpo.push("
    "),tpo.push("")}}),0==r&&void 0==isfix&&tpo.push('
     
    '),tpo.push("")}return tpo.join("")}},getFootDataSet:function(dataSet,isfix){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r');var colCount=0;axf.each(cfg.foot.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&(void 0==isfix||void 0!=isfix&&colCount1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("'),tpo.push('
    '),tpo.push(hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH):dataSet[CH.key]:" "),tpo.push("
    "),tpo.push("")}}),0==r&&void 0==isfix&&tpo.push('
     
    '),tpo.push("")}return tpo.join("")}},setDataSet:function(obj){var cfg=this.config;obj.ajaxUrl||axdom.isPlainObject(obj)&&(this.dataSet=obj,cfg.head&&this.printHead(),cfg.foot&&this.printFoot(),this.contentScrollResize(!1))},redrawDataSet:function(){var cfg=this.config;this.dataSet&&(cfg.head&&this.printHead(),cfg.foot&&this.printFoot())},printHead:function(){var cfg=this.config,getDataSet=this.getHeadDataSet.bind(this),po=[];po.push(getDataSet(this.dataSet)),axdom("#"+cfg.targetID+"_AX_thead").html(po.join("")),this.hasFixed&&(po=[],po.push(getDataSet(this.dataSet,"fix")),axdom("#"+cfg.targetID+"_AX_fixedThead").html(po.join("")))},printFoot:function(){var cfg=this.config,getDataSet=this.getFootDataSet.bind(this),po=[];po.push(getDataSet(this.dataSet)),axdom("#"+cfg.targetID+"_AX_tfoot").html(po.join("")),this.hasFixed&&(po=[],po.push(getDataSet(this.dataSet,"fix")),axdom("#"+cfg.targetID+"_AX_fixedTfoot").html(po.join("")))},getEditorFormatterValue:function(formatter,dataSet,value,key,CH,idAttr){var result,cfg=this.config;if("money"==formatter)result=""==value||"null"==value||void 0==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter)result=value;else{var sendObj={index:null,list:this.list,item:dataSet,dataSet:dataSet,page:this.page,key:key,value:value};try{result=formatter.call(sendObj)}catch(e){trace(e)}}var formID=cfg.targetID+"_AX_"+key+"_AX_"+idAttr,inputHidden='';return result+inputHidden},getEditorFormValue:function(form,dataSet,value,key,CH,idAttr){var cfg=this.config,paddingRight=cfg.formPaddingRight,result=[],formClass=form.addClass?" "+form.addClass:"",formWidth=form.width?"width:"+form.width+";":"width:100%;",formHeight=form.height?"height:"+form.height+";":"",formStyle=form.style?form.style:"",formID=form.id?form.id:cfg.targetID+"_AX_"+key+"_AX_"+idAttr,getFormValue=function(formvalue,value){if("itemValue"==formvalue||"itemText"==formvalue)return axdom.isArray(value)?value:(value||"").dec();if(axdom.isFunction(formvalue)){var sendObj={key:key,value:value,list:this.list,page:this.page};return formvalue.call(sendObj,key,value)}return formvalue};if("hidden"==form.type)result.push(" "),result.push('');else if("text"==form.type)result.push('
    '),result.push(''),result.push("
    ");else if("textarea"==form.type)result.push('
    '),result.push('"),result.push("
    ");else if("select"==form.type){var formValue=getFormValue(form.value,dataSet[key]);result.push('
    '),result.push('"),result.push("
    ")}else if("radio"==form.type){var formValue=getFormValue(form.value,dataSet[key]);axf.each(form.options,function(oidx){result.push('
    ")})}else if("checkbox"==form.type){var formValue=getFormValue(form.value,dataSet[key]); -axf.each(form.options,function(oidx){if(result.push('
    ")})}return result.join("")},getEditorBody:function(dataSet,isfix){for(var cfg=this.config,getEditorFormatterValue=this.getEditorFormatterValue.bind(this),getEditorFormValue=this.getEditorFormValue.bind(this),tpo=[],hasFixed=this.hasFixed,r=0;r');var colCount=0;axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){if(void 0==isfix||void 0!=isfix&&colCount1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("'),tpo.push('
    '),tpo.push(hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.form?getEditorFormValue(CH.form,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx):CH.formatter?getEditorFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx,CH.form):dataSet[CH.key]:" "),tpo.push("
    "),tpo.push("")}}else tpo.push(''),tpo.push(CH.form?getEditorFormValue(CH.form,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx):CH.formatter?getEditorFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx,CH.form):dataSet[CH.key]),tpo.push("")}),0==r&&void 0==isfix&&tpo.push('
     
    '),tpo.push("")}return tpo.join("")},setEditor:function(item,itemIndex,insertIndex){var itemTrHeight,cfg=this.config,_this=this;if(!this.hasEditor)return void alert("setConfig 에 editor 가 설정 되지 않아 요청을 처리 할 수 없습니다.");this.unbindAXbind();var dataSet={};item&&(dataSet=item),axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});var po=[];if(po.push('
    '),po.push(''),po.push(this.getColGroup("EB")),po.push(''),po.push(this.getEditorBody(dataSet)),po.push(""),po.push("
    "),po.push("
    "),this.hasFixed&&(po.push('
    '),po.push(''),po.push(this.getColGroup("FE")),po.push(''),po.push(this.getEditorBody(dataSet,"fix")),po.push(""),po.push("
    "),po.push("
    ")),po.push('
    '),po.push(' '),po.push(' '),po.push("
    "),this.editor.html(po.join("")),void 0!=itemIndex){var scrollTop=this.scrollContent.position().top,list=this.list;if("auto"==cfg.height){var editorTop=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top;itemTrHeight=function(){if(0==list.length)return 0;if(1==list.length){var p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).height();return p2}if(list.length-1==itemIndex){var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(itemIndex-1)).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top;return p2-p1}var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(itemIndex.number()+1)).position().top;return p2-p1}()}else var editorTop=itemIndex*(itemTrHeight=this.virtualScroll.itemTrHeight);this.editor.css({top:editorTop+scrollTop}),this.editorOpend=!0,this.editorOpenTop=editorTop,this.editorItemIndex=itemIndex,this.editorButtonPosition="bottom";var trTop=-editorTop;trTop.abs()+this.body.height()>this.scrollContent.height()&&(trTop=this.body.height()-this.scrollContent.height(),this.editorButtonPosition="top")}else if(void 0!=insertIndex){var scrollTop=this.scrollContent.position().top,list=this.list;if("auto"==cfg.height){var editorTop=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top,trHeight=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).outerHeight();itemTrHeight=function(){if(0==list.length)return 0;if(1==list.length){var p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).height();return p2}if(list.length-1==itemIndex){var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(insertIndex-1)).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top;return p2-p1}var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top,p2=(axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(insertIndex.number()+1)).position()||0).top;return p2-p1}(),editorTop+=trHeight}else var editorTop=insertIndex*(itemTrHeight=this.virtualScroll.itemTrHeight);this.editor.css({top:editorTop}),this.editorOpend=!0,this.editorOpenTop=editorTop,this.editorInsertIndex=insertIndex,this.editorButtonPosition="bottom";var trTop=-editorTop;trTop.abs()+this.body.height()>this.scrollContent.height()&&(trTop=this.body.height()-this.scrollContent.height(),this.editorButtonPosition="top"),this.body.height()0){var formID="";CH.AXBind&&(formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx,"number"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindNumber(CH.AXBind.config||{}):"money"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindMoney(CH.AXBind.config||{}):"selector"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSelector(CH.AXBind.config||{}):"slider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSlider(CH.AXBind.config||{}):"slider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSlider(CH.AXBind.config||{}):"twinSlider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindTwinSlider(CH.AXBind.config||{}):"date"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindDate(CH.AXBind.config||{}):"twinDate"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindTwinDate(CH.AXBind.config||{}):"dateTime"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindDateTime(CH.AXBind.config||{}):"switch"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSwitch(CH.AXBind.config||{}):"select"==CH.AXBind.type&&"select"==CH.form.type&&axdom("#"+formID).bindSelect(CH.AXBind.config||{})),CH.form&&(formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx,CH.form.onChange&&axdom("#"+formID).bind("change",function(){CH.form.onChange.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val(),text:axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text})}),CH.form.onClick&&axdom("#"+formID).bind("click",function(){CH.form.onClick.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}),CH.form.onBlur&&axdom("#"+formID).bind("blur",function(){CH.form.onBlur.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}),CH.form.onFocus&&axdom("#"+formID).bind("focus",function(){CH.form.onFocus.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}))}});var editorContent=axdom("#"+cfg.targetID+"_AX_editorContent"),fixedEditorContent=axdom("#"+cfg.targetID+"_AX_fixedEditorContent"),editorButtons=axdom("#"+cfg.targetID+"_AX_editorButtons"),editorContentHeight=editorContent.height(),fixedEditorContentHeight=fixedEditorContent.height();fixedEditorContentHeight>editorContentHeight?(editorContentHeight=fixedEditorContentHeight,editorContent.find(".gridBodyTable").css({height:editorContentHeight})):fixedEditorContent.find(".gridFixedBodyTable").css({height:editorContentHeight}),editorButtons.css({top:editorContentHeight});editorContentHeight.number();itemTrHeight>editorContentHeight&&(editorContentHeight=itemTrHeight,editorContent.find(".gridBodyTable").css({height:editorContentHeight}),fixedEditorContent.find(".gridFixedBodyTable").css({height:editorContentHeight}),this.editor.css({height:editorContentHeight.number()}),editorButtons.css({top:editorContentHeight}));var scrollLeft=this.scrollContent.position().left;editorContent.css({left:scrollLeft}),"top"==this.editorButtonPosition&&(this.editor.css(void 0!=insertIndex?{top:this.editor.position().top-editorContentHeight}:{top:this.editor.position().top-editorContentHeight+itemTrHeight}),editorButtons.addClass("top"),editorButtons.css({top:-editorButtons.outerHeight()+1})),axdom("#"+cfg.targetID+"_AX_editorButtons_AX_save").bind("click",this.saveEditor.bind(this)),axdom("#"+cfg.targetID+"_AX_editorButtons_AX_cancel").bind("click",this.cancelEditor.bind(this))},setEditorForm:function(obj){var cfg=this.config,formID=cfg.targetID+"_AX_"+obj.key+"_AX_"+obj.position.join("_AX_");axf.getId(formID)||alert(formID+"로 Element를 찾을 수 없습니다."),axdom("#"+formID).val(obj.value)},focusEditorForm:function(key){this.config;this.editor.find("input[type=text],textarea").each(function(){return this.name==key?(this.focus(),!1):void 0})},saveEditor:function(){var cfg=this.config,editorFormItem={};editorFormItem.requestType=null==this.editorItemIndex?"new":"edit";for(var setEditorFormItemValue=function(k,v,type){editorFormItem[k]&&"checkbox"==type?Object.isArray(editorFormItem[k])?editorFormItem[k].push(v):(editorFormItem[k]=[editorFormItem[k]],editorFormItem[k].push(v)):editorFormItem[k]=v},r=0;r'),po.push('
    '),po.push("
    "),this.editor.html(po.join(""));var saveEditorRequest=this.saveEditorRequest.bind(this),cancelEditor=this.cancelEditor.bind(this),url=cfg.editor.request.ajaxUrl,formPars=[];axf.each(editorFormItem,function(k,v){formPars.push(k+"="+v.enc())});var pars=cfg.editor.request.ajaxPars?cfg.editor.request.ajaxPars+"&"+formPars.join("&"):formPars.join("&");return new AXReq(url,{debug:!1,pars:pars,onsucc:function(res){res.result==AXConfig.AXReq.okCode?saveEditorRequest(res):(toast.push({body:res.msg.dec(),type:"Caution"}),cancelEditor())}}),!0}var saveEditorRequest=this.saveEditorRequest.bind(this),cancelEditor=this.cancelEditor.bind(this);saveEditorRequest({item:editorFormItem})}},saveEditorRequest:function(res){var cfg=this.config;if(this.editorOpend)if(cfg.editor.response){var sendObj={res:res,index:this.editorItemIndex,insertIndex:this.editorInsertIndex,list:this.list,page:this.page};cfg.editor.response.call(sendObj,this.editorItemIndex)}else this.unbindAXbind(),null!=this.editorItemIndex&&void 0!=this.editorItemIndex?(AXUtil.overwriteObject(this.list[this.editorItemIndex],res.item,!0),this.updateList(this.editorItemIndex,this.list[this.editorItemIndex])):null!=this.editorInsertIndex&&void 0!=this.editorInsertIndex?this.pushList(res.item,this.editorInsertIndex):this.pushList(res.item),this.editorItemIndex=null,this.editorInsertIndex=null,this.editor.hide(),this.editorOpend=!1},cancelEditor:function(){this.editor.hide(),this.editorOpend=!1,this.unbindAXbind()},unbindAXbind:function(){var cfg=this.config;try{for(var r=0;r0&&CH.AXBind){var formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx;"number"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"money"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"selector"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"slider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"twinSlider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"date"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"twinDate"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"dateTime"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"switch"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"select"==CH.AXBind.type&&"select"==CH.form.type&&axdom("#"+formID).unbindSelect()}})}catch(e){trace(e)}},appendList:function(item,insertIndex){this.setEditor(item,null,insertIndex)},setMobileTool:function(){var cfg=this.config,toolGroupTop=axdom("#"+cfg.targetID+"_AX_gridToolGroupTop"),toolGroupBottom=axdom("#"+cfg.targetID+"_AX_gridToolGroupBottom"),po=[];po.push(''),po.push('congif'),cfg.page&&cfg.page.paging&&(po.push('
    '),po.push('prev'),po.push('
    '),po.push('next'),po.push("
    ")),po.push('top'),toolGroupTop.empty(),toolGroupTop.append(po.join("")),po=[],po.push(''),po.push('congif'),cfg.page&&cfg.page.paging&&(po.push('
    '),po.push('prev'),po.push('
    '),po.push('next'),po.push("
    ")),po.push('bottom'),toolGroupBottom.empty(),toolGroupBottom.append(po.join(""));var pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number();if(cfg.page){if(cfg.page.paging){if(0==pgCount)po=[],po.push(''),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNoDisplay").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNoDisplay").html(po.join(""));else{axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").html(""),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNoDisplay").html(pageNo);var mySelect=axf.getId(cfg.targetID+"_AX_gridToolTopPageNo");axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").html(""),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNoDisplay").html(pageNo);for(var mySelectBottom=axf.getId(cfg.targetID+"_AX_gridToolBottomPageNo"),p=1;pgCount+1>p;p++)mySelect.options[p]=new Option(p,p.money()),mySelectBottom.options[p]=new Option(p,p.money()),pageNo==p&&(mySelect.options[p].selected=!0,mySelectBottom.options[p].selected=!0)}axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").bind("change",this.onPageChange.bind(this)),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").bind("change",this.onPageChange.bind(this));var goPageMove=this.goPageMove.bind(this);toolGroupTop.find(".tool-prevPage").bind("click",function(){goPageMove(-1)}),toolGroupBottom.find(".tool-prevPage").bind("click",function(){goPageMove(-1)}),toolGroupTop.find(".tool-nextPage").bind("click",function(){goPageMove(1)}),toolGroupBottom.find(".tool-nextPage").bind("click",function(){goPageMove(1)})}var openMobileConfig=this.openMobileConfig.bind(this);toolGroupTop.find(".tool-config").bind("click",function(event){openMobileConfig(event)}),toolGroupBottom.find(".tool-config").bind("click",function(event){openMobileConfig(event)})}},setPaging:function(){var cfg=this.config;if("mobile"==cfg.viewMode)return void this.setMobileTool();axdom("#"+cfg.targetID+"_AX_gridToolGroupTop").empty(),axdom("#"+cfg.targetID+"_AX_gridToolGroupBottom").empty();var pgCount=(axf.getId(cfg.targetID+"_AX_gridPageNo"),this.page.pageCount.number()),pageNo=this.page.pageNo.number();if(0==pgCount){var po=[];po.push(''),axdom("#"+cfg.targetID+"_AX_gridPageNo").html(po.join(""))}else{axdom("#"+cfg.targetID+"_AX_gridPageNo").html("");var mySelect=axf.getId(cfg.targetID+"_AX_gridPageNo");if(pgCount>1e3){var oi=0,pageStart=1,pageEnd=pageNo+49;pageNo>50&&(pageStart=pageNo-50),pageEnd>pgCount&&(pageEnd=pgCount);for(var p=pageStart;pageEnd+1>p;p++)mySelect.options[oi]=new Option(p,p.money()),pageNo==p&&(mySelect.options[oi].selected=!0),oi++}else for(var p=1;pgCount+1>p;p++)mySelect.options[p]=new Option(p,p.money()),pageNo==p&&(mySelect.options[p].selected=!0)}if(axdom("#"+cfg.targetID+"_AX_gridPageCount").html("/ "+pgCount.money()+" "+cfg.pageCountMSG),axdom("#"+cfg.targetID+"_AX_gridStatus").html(cfg.listCountMSG.replace("{listCount}",this.page.listCount.number().money())),this.isMobile)axdom("#"+cfg.targetID+"_AX_gridPageNo").bind("change",this.onPageChange.bind(this));else{var onPageChange=this.onPageChange.bind(this);axdom("#"+cfg.targetID+"_AX_gridPageNo").bindSelect({onChange:function(){onPageChange()}})}},goPageMove:function(pageAdd){var cfg=this.config,pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number();1>pageNo+pageAdd?pageNo=1:pageNo+pageAdd>pgCount?pageNo=pgCount:pageNo+=pageAdd,"mobile"==cfg.viewMode?(axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").val(pageNo),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").val(pageNo),this.onPageChange()):axdom("#"+cfg.targetID+"_AX_gridPageNo").setValueSelect(pageNo)},onPageChange:function(e){var pgCount,pageNo,npageNo,cfg=this.config;if(pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number(),npageNo="mobile"==cfg.viewMode?e?e.target.value:axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").val():axdom("#"+cfg.targetID+"_AX_gridPageNo").val(),this.page.pageNo=npageNo,this.page.onchange)this.page.onchange.call(this.page,npageNo);else if("mobile"!=cfg.viewMode){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}),this.pageActive&&this.ajaxInfo&&(this.setList(this.ajaxInfo,null,null,"paging"),this.contentScrollResize())}else this.pageActive&&this.ajaxInfo&&this.setList(this.ajaxInfo,null,null,"paging")},setStatus:function(listLength){var page,cfg=this.config;this.page&&(page=this.page);var listCount=page.listCount||listLength;axdom("#"+cfg.targetID+"_AX_gridStatus").html(cfg.listCountMSG.replace("{listCount}",listCount.number().money()))},getSortParam:function(ty){var sortObj=(this.config,this.nowSortHeadObj);return sortObj?"one"==ty?"sortBy="+sortObj.key+" "+sortObj.sort:axdom.param({sortKey:sortObj.key,sortWay:sortObj.sort}):""},getExcelColHeadTd:function(arg){var po=(this.config,[]);return("html"==arg.formatter||"checkbox"==arg.formatter)&&(arg.displayLabel||(colHeadTdText=" colHeadTdHtml",toolUse=!1,"checkbox"==arg.formatter&&(colHeadTdText=" colHeadTdCheck",arg.tdHtml=''))),po.push(""),po.push(arg.tdHtml),po.push(""),po.join("")},getExcelItem:function(itemIndex,item){for(var cfg=this.config,tpo=[],getFormatterValue=this.getFormatterValue.bind(this),getTooltipValue=this.getTooltipValue.bind(this),r=0;r");var colCount=0;axf.each(cfg.body.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',tooltipValue="";CH.tooltip&&(tooltipValue=getTooltipValue(CH.tooltip,item,itemIndex,item[CH.key],CH.key,CH)),tpo.push(""),tpo.push(CH.formatter?getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH):item[CH.key]),tpo.push("")}}),tpo.push("")}return tpo.join("")},getExcelItemMarker:function(itemIndex,item){for(var cfg=this.config,tpo=[],getFormatterValue=this.getFormatterValue.bind(this),r=0;r");var colCount=0;axf.each(cfg.body.marker.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"';tpo.push(""),tpo.push(CH.formatter?getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH):item[CH.key]),tpo.push("")}}),tpo.push("")}return tpo.join("")},getExcelHeadDataSet:function(dataSet){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var r=0;r");var colCount=0;axf.each(cfg.head.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push(""),tpo.push(CH.formatter?getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH):dataSet[CH.key]),tpo.push("")}}),tpo.push("")}return tpo.join("")}},getExcelFootDataSet:function(dataSet){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var r=(this.hasFixed,0);r");var colCount=0;axf.each(cfg.foot.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bodyNodeClass=(CH.isLastCell?"":" bodyBottomBorder",CH.isFixedEndCell?" fixedLine":"","");"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push(""),tpo.push(CH.formatter?getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH):dataSet[CH.key]),tpo.push("")}}),tpo.push("")}return tpo.join("")}},getExcelFormat:function(format){var cfg=this.config,getExcelColHeadTd=this.getExcelColHeadTd.bind(this),bodyHasMarker=this.bodyHasMarker,getExcelItem=this.getExcelItem.bind(this),getExcelItemMarker=this.getExcelItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this),getHeadDataSet=this.getExcelHeadDataSet.bind(this),getFootDataSet=this.getExcelFootDataSet.bind(this),po=[];if("html"==format){po.push(""),po.push(" ");for(var r=0;r"),axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"';po.push(getExcelColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,displayLabel:CH.displayLabel}))}}),po.push("")}return po.push(" "),po.push(" "),cfg.head&&po.push(getHeadDataSet(this.dataSet)),axf.each(this.list,function(itemIndex,item){po.push(getExcelItem(itemIndex,item)),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getExcelItemMarker(itemIndex,item))}),cfg.foot&&po.push(getFootDataSet(this.dataSet)),po.push(" "),po.push("
    "),po.join("")}return"json"==format?{colGroup:cfg.colGroup,list:this.list}:void 0},changeGridView:function(JSObject){var cfg=this.config;cfg.viewMode!=JSObject.viewMode&&(cfg.viewMode=JSObject.viewMode,"icon"==JSObject.viewMode?(JSObject.view&&(cfg.view=JSObject.view),this.redrawGrid("changeGridView")):"grid"==JSObject.viewMode?this.redrawGrid("changeGridView"):"mobile"==JSObject.viewMode&&(JSObject.view&&(cfg.view=JSObject.view),this.redrawGrid("changeGridView")))},openMobileConfig:function(event){var cfg=this.config,_this=this,mobileView=cfg.view;if(void 0==mobileView){for(var CG,columns=[],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var col=null,addClass="";CG.widthAstric||CG.width.number()>=200?(col=4,addClass="underLine"):CG.width.number()>=100?col=2:CG.width.number()>=40,columns.push({key:CG.key,label:CG.label,col:col,formatter:CG.formatter,addClass:addClass,sort:CG.sort||"",display:CG.display||!0})}columns=columns.sort(function(pItem,nItem){var v1=pItem.col,v2=nItem.col;return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),mobileView={labelView:!0,column:columns},cfg.view=mobileView}for(var CN,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)(void 0==CN.display||1==CN.display)&&(CN.display=!0,CN.checked=!0);var contextMenu=mobileView.column.concat();try{AXContextMenu.setConfig({responsiveMobile:cfg.mediaQuery.mx.max})}catch(e){AXContextMenu.setConfig({responsiveMobile:640})}AXContextMenu.bind({id:cfg.targetID+"myContextMenu",theme:"AXContextMenu",width:"150",checkbox:"checkbox",sortbox:!0,menu:contextMenu,onchange:function(){for(var CN,cidx=0,__arr=this.menu;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)CN.display=CN.checked;cfg.view.column=axf.copyObject(this.menu),_this.printList()},onsort:function(){return _this.list=_this.sortList(this.sortMenu.sort,this.sortMenu,_this.list),_this.printList(),!0}}),AXContextMenu.open({id:cfg.targetID+"myContextMenu"},event)}}),jQuery.fn.loadHtmlElement=function(arg){void 0==arg&&(arg={});var varObj=new AXHtmlElement;return arg.target=this.get(0).id,varObj.setConfig(arg),this};var AXHtmlElement=Class.create(AXJ,{version:"AXHtmlElement V1.0",author:"tom@axisj.com",logs:["2013-04-17 - mods에서 변환했음 - json@axisj.com"],initialize:function(AXJ_super){AXJ_super(),this.config.defaultValue="",this.config.firstEmpty=!1,this.config.firstChecked=!0},init:function(){var config=this.config;if(config.loadUrl){var url=config.loadUrl,qs=config.loadPars,pars=qs,onLoad=this.onLoad.bind(this);new AXReq(url,{pars:pars,onsucc:function(res){"00"==res.result?onLoad(res):alert(res.msg.dec())}})}else config.options&&this.onLoad({ds:config.options})},onLoad:function(res){var config=this.config;"select"==config.displayType&&(this.setSelectOption({tg:jQuery("#"+config.target)[0],ds:res.ds},config.defaultValue,config.firstEmpty,config.firstEmptyItemName),jQuery("#"+config.target).unbind("change",this.onchange.bind(this)),jQuery("#"+config.target).bind("change",this.onchange.bind(this))),"radio"==config.displayType&&this.setInputOption({tg:jQuery("#"+config.target),ds:res.ds},config.defaultValue),"checkbox"==config.displayType&&this.setInputOption({tg:jQuery("#"+config.target),ds:res.ds},config.defaultValue)},setSelectOption:function(obj,selectValue,firstEmpty,firstEmptyItemName){this.config;try{obj.tg.innerHTML=""}catch(e){return}if(firstEmpty){var opts=document.createElement("option");opts.value="",opts.text=firstEmptyItemName?firstEmptyItemName:"모두",obj.tg.appendChild(opts)}jQuery.each(obj.ds,function(index,n){if(n.optgroup){var oGroup=document.createElement("optgroup");oGroup.label=n.optgroup.dec(),jQuery.each(n.option,function(){if(null!=this.value){var opts=document.createElement("option");opts.value=this.value.dec(),opts.innerText=this.text.dec(),void 0!=selectValue&&selectValue==this.value.dec()&&(opts.selected=!0),oGroup.appendChild(opts) -}}),obj.tg.appendChild(oGroup)}else{var opts=document.createElement("option");opts.value=n.value.dec(),opts.innerText=n.text.dec(),void 0!=selectValue&&selectValue==n.value.dec()&&(opts.selected=!0),obj.tg.appendChild(opts)}});var robj=obj.tg.selectedIndex>-1?{value:obj.tg.options[obj.tg.selectedIndex].value,text:obj.tg.options[obj.tg.selectedIndex].text}:{value:"",text:""};this.loadSucc(robj)},setInputOption:function(obj,selectValue){var config=this.config;obj.tg.empty();var po=[],robj={value:"",text:""};this.ids=obj.ds,jQuery.each(obj.ds,function(index,n){po.push(config.title?'"),po.push(n.text.dec()+" ")}),obj.tg.html(po.join("")),this.loadSucc(robj),jQuery("#"+config.target).find("input").unbind("click",this.onchange2.bind(this)),jQuery("#"+config.target).find("input").bind("click",this.onchange2.bind(this))},loadSucc:function(obj){var config=this.config;config.onLoad&&config.onLoad({target:config.target,value:obj.value,text:obj.text})},onchange:function(event){var tg=event.target,config=this.config;config.onChange&&config.onChange({target:config.target,value:tg.options[tg.selectedIndex].value,text:tg.options[tg.selectedIndex].text})},onchange2:function(event){var tg=event.target,config=this.config,myText="";jQuery.each(this.ids,function(idx,D){D.value.dec()==tg.value&&(myText=D.text.dec())}),config.onChange&&config.onChange({target:config.target,value:tg.value,text:myText})}}),AXInputConverter=Class.create(AXJ,{version:"AXInputConverter v1.47",author:"tom@axisj.com",logs:["2012-11-05 오후 1:23:24","2013-02-21 오후 5:47:22 슬라이드에 터치 이벤트 추가 - root","2013-06-09 오후 10:31:34 bindNumber - onchange ","2013-06-10 오후 1:37:41 unbinddate 메서드 추가","2013-06-13 오후 7:26:49 bindDate - config 에 defaultDate 속성 확장","2013-06-20 오전 12:49:06 twinbindDate - 아이디 체크 버그 픽스","2013-08-28 오후 4:16:01 bindMoney - 성능개선","2013-09-29 오전 12:39:49 bindSlider 연속호출 버그 패치 - tom","2013-11-06 오후 1:13:46 bindMoney min, max, onChange 속성 구현 및 기타 버그 패치 - tom","2013-11-28 오전 10:51:22 : tom - onsearch 옵션 추가 및 CSS 수정","2013-12-09 오후 8:06:17 : tom - bindSelectorOptionsClick 버그픽스","2013-12-16 오후 4:46:14 : tom - bindMoneyCheck","2013-12-25 오후 3:26:54 : tom - bindTwinDate 기본값 초기화 버그픽스","2013-12-27 오후 12:09:20 : tom - obj.inProgressReACT 기능 추가","2014-01-02 오후 12:59:17 : tom - bindSelector AJAX 호출 중지 기능 추가","2014-01-10 오후 5:07:44 : tom - event bind modify, fix","2014-01-14 오후 3:43:06 : tom - bindSelector expandBox close 버그픽스","2014-01-20 오후 4:16:56 : tom - bindDateTime 시간이 선택 해제되는 문제 해결","2014-02-05 오후 4:32:34 : tom - bindSelector blur 이벤트 값 제거 문제 해결 / bindDate 문자열 자동완성 버그 픽스","2014-02-06 오후 7:59:54 tom : jQuery 독립 우회 코드 변경","2014-02-13 오후 5:39:21 tom : bindDate 월 이동 버그 픽스","2014-02-14 오후 1:29:01 tom : bindSelector enter키 입력 후 blur 제거","2014-02-17 오후 7:38:59 tom : bindDate 월선택 도구에서 1월 선택 버그 픽스","2014-02-21 오후 4:52:24 tom : bindMoney 포커스 유지 기능 추가","2014-02-25 오후 9:05:04 tom : earlierThan/ laterThan 설정 버그픽스","2014-03-18 오후 1:58:57 tom : bindSelector 텍스트 변경 안 되었을 때 이벤트 처리 안하기","2014-03-18 오후 9:44:57 tom : 날짜 입력 시 4자리 입력 후 포커스 아웃 시 당해년도 4자리 자동 포함, 날짜 입력 시 6자리 입력 후 포커스 아웃 시 당해년도 앞 2자리 자동 포함","2014-04-03 오후 3:49:21 tom : bindDate ie 10 blur 버그 픽스","2014-04-14 tom : 모바일 너비 지정 방식 변경","2014-04-21 tom : bindDate 다중 오픈 되었을 때 닫기 버그 픽스","2014-04-24 오후 7:33:25 tom : bindDate 개체에 리턴입력시 onBlur 연결"],initialize:function(AXJ_super){AXJ_super(),this.objects=[],this.inputTypes=[{type:"search"},{type:"number"},{type:"money"},{type:"slider"},{type:"twinSlider"},{type:"selector"},{type:"switch"},{type:"segment"},{type:"date"},{type:"dateTime"},{type:"twinDate"},{type:"twinDateTime"}],this.config.anchorClassName="AXanchor",this.config.anchorPlaceHolderClassName="AXanchorPlaceHolder",this.config.anchorSearchClassName="AXanchorSearch",this.config.anchorNumberContainerClassName="AXanchorNumberContainer",this.config.anchorIncreaseClassName="AXanchorIncrease",this.config.anchorDecreaseClassName="AXanchorDecrease",this.config.anchorSelectorHandleContainerClassName="AXanchorSelectorHandleContainer",this.config.anchorSelectorFinderContainerClassName="AXanchorSelectorFinderContainer",this.config.anchorSelectorHandleClassName="AXanchorSelectorHandle",this.config.anchorSelectorFinderClassName="AXanchorSelectorFinder",this.config.anchorSelectorExpandBoxClassName="AXanchorSelectorExpandBox",this.config.anchorSelectorExpandScrollClassName="AXanchorSelectorExpandScroll",this.config.anchorSliderBoxClassName="AXanchorSliderBox",this.config.anchorSwitchBoxClassName="AXanchorSwitchBox",this.config.anchorSegmentBoxClassName="AXanchorSegmentBox",this.config.anchorDateHandleClassName="AXanchorDateHandle",this.config.bindDateExpandBoxClassName="AXbindDateExpandBox",this.config.bindTwinDateExpandBoxClassName="AXbindTwinDateExpandBox",this.config.responsiveMobile=AXConfig.mobile.responsiveWidth},init:function(){axdom(window).resize(this.windowResize.bind(this))},windowResize:function(){this.windowResizeObs&&clearTimeout(this.windowResizeObs),this.windowResizeObs=setTimeout(this.alignAllAnchor.bind(this),10)},alignAllAnchor:function(){var alignAnchor=this.alignAnchor.bind(this);axf.each(this.objects,function(index,O){alignAnchor(O.id,index)})},msgAlert:function(msg){var errorPrintType="toast";AXConfig.AXInput&&(errorPrintType=AXConfig.AXInput.errorPrintType||"toast"),"toast"==errorPrintType?toast.push(msg):"dialog"==errorPrintType?dialog.push(msg):"alert"==errorPrintType&&AXUtil.alert(msg)},bindSetConfig:function(objID,configs){var findIndex=null;if(axf.each(this.objects,function(index,O){return O.id==objID?(findIndex=index,!1):void 0}),null!=findIndex){var _self=this.objects[findIndex];axf.each(configs,function(k,v){_self.config[k]=v})}},bind:function(obj){var cfg=this.config;if(!obj.id)return void trace("bind 대상 ID가 없어 bind 처리할 수 없습니다.");if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");var objID=obj.id,objSeq=null;axf.each(this.objects,function(idx){return this.id==objID?(objSeq=idx,!1):void 0}),void 0==obj.href&&(obj.href=cfg.href),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,anchorID:cfg.targetID+"_AX_"+objID,config:obj,bindType:obj.bindType})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),this.appendAnchor(objID,objSeq,obj.bindType),"placeHolder"==obj.bindType?this.bindPlaceHolder(objID,objSeq):"search"==obj.bindType?this.bindSearch(objID,objSeq):"number"==obj.bindType?this.bindNumber(objID,objSeq):"money"==obj.bindType?this.bindMoney(objID,objSeq):"selector"==obj.bindType?this.bindSelector(objID,objSeq):"slider"==obj.bindType?this.bindSlider(objID,objSeq):"twinSlider"==obj.bindType?this.bindTwinSlider(objID,objSeq):"switch"==obj.bindType?this.bindSwitch(objID,objSeq):"segment"==obj.bindType?this.bindSegment(objID,objSeq):"date"==obj.bindType?this.bindDate(objID,objSeq):"twinDate"==obj.bindType?this.bindTwinDate(objID,objSeq):"twinDateTime"==obj.bindType&&this.bindTwinDate(objID,objSeq,"time")},unbind:function(obj){var removeAnchorId,removeIdx,cfg=this.config;if(axf.each(this.objects,function(idx,O){O.id!=obj.id||1!=O.isDel&&(removeAnchorId=this.anchorID,removeIdx=idx)}),removeAnchorId){this.objects[removeIdx].isDel=!0,axdom("#"+obj.id).removeAttr("data-axbind"),axdom("#"+removeAnchorId).remove();var objID=obj.id,obj=this.objects[removeIdx];obj.documentclickEvent&&axdom(document).unbind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput"),axdom("#"+objID).unbind("keydown.AXInputCheck"),axdom("#"+objID).unbind("change.AXInput"),obj.bindSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindSliderMouseMove),obj.bindSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindSliderMouseUp),obj.bindSliderTouchMove&&document.removeEventListener("touchmove.AXInput",obj.bindSliderTouchMove,!1),obj.bindSliderTouchEnd&&document.removeEventListener("touchend.AXInput",obj.bindSliderTouchEnd,!1),obj.bindTwinSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindTwinSliderMouseMove),obj.bindTwinSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindTwinSliderMouseUp),AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on"))}},appendAnchor:function(objID,objSeq,bindType){var cfg=this.config,obj=this.objects[objSeq];axdom("#"+cfg.targetID+"_AX_"+objID).remove();var anchorNode=axdom(''),iobj=axdom("#"+objID);iobj.attr("data-axbind",bindType),iobj.after(anchorNode),obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=iobj;{var iobjPosition=iobj.position(),l=iobjPosition.left,t=iobjPosition.top,w=0,h=0,marginW=(iobj.css("border-left-width").number(),iobj.css("border-top-width").number(),iobj.css("margin-left").number());iobj.css("margin-top").number()}l+=marginW,w=iobj.outerWidth(),h=iobj.outerHeight();var css={left:l,top:t,width:w,height:0};obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h);var _this=this;setTimeout(function(){_this.alignAnchor(objID,objSeq)},500)},alignAnchor:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];if(AXgetId(objID)){var iobjPosition=obj.bindTarget.position(),l=iobjPosition.left,t=iobjPosition.top,w=obj.bindTarget.outerWidth(),h=obj.bindTarget.outerHeight();if("none"==obj.bindTarget.css("display")){h=obj.bindAnchorTarget.data("height");var css={width:w}}else var css={left:l,top:t,width:w,height:0};if(obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h),"placeHolder"==obj.bindType);else if("search"==obj.bindType);else if("number"==obj.bindType){var UPh=parseInt((h-2)/2)-1,DNh=parseInt((h-2)/2)-2,handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_HandleContainer").css({width:handleWidth,height:h-2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_increase").css({width:handleWidth,height:UPh}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_decrease").css({top:UPh+1,width:handleWidth,height:DNh})}else if("money"==obj.bindType);else if("selector"==obj.bindType)h-=2,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_HandleContainer").css({width:h,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").css({width:h,height:h}),obj.config.finder&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_FinderContainer").css({right:h,width:h,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Finder").css({width:h,height:h}));else if("slider"==obj.bindType);else if("twinSlider"==obj.bindType);else if("switch"==obj.bindType)axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").css({width:w,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").css({height:h,"line-height":h+"px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchHandle").css({height:h}),obj.bindAnchorTarget.css({height:h});else if("segment"==obj.bindType){obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var borderTop=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-top-width").number(),borderBot=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-bottom-width").number();obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css({height:obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px","line-height":obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px"})}else if("date"==obj.bindType){var handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").css({width:h,height:h})}else"twinDate"==obj.bindType||"twinDateTime"==obj.bindType}},bindSetValue:function(objID,value){var objSeq=(this.config,null);if(axf.each(this.objects,function(index,O){return O.id==objID?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq];"search"==obj.bindType||"number"==obj.bindType||"money"==obj.bindType||("selector"==obj.bindType?this.bindSelectorSetValue(objID,objSeq,value):"slider"==obj.bindType?this.bindSliderSetValue(objID,objSeq,value):"twinSlider"==obj.bindType?this.bindTwinSliderSetValue(objID,objSeq,value):"switch"==obj.bindType?this.bindSwitchSetValue(objID,objSeq,value):"segment"==obj.bindType?this.bindSegmentSetValue(objID,objSeq,value):"date"==obj.bindType||"twinDate"==obj.bindType)}},bindPlaceHolder:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];if("ie"==AXUtil.browser.name&&!("ie"==AXUtil.browser.name&&AXUtil.browser.version>9)){var w=axdom("#"+cfg.targetID+"_AX_"+objID).width(),h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),placeholder=axdom("#"+objID).attr("placeholder");"undefined"==placeholder&&(placeholder="");var po=["'+placeholder+""];axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join(""));var bindPlaceHolderKeyup=this.bindPlaceHolderSyncAnchor.bind(this);axdom("#"+objID).unbind("keyup.AXInput").bind("keyup.AXInput",function(){bindPlaceHolderKeyup(objID,objSeq)}),bindPlaceHolderKeyup(objID,objSeq),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").unbind("click.AXInput").bind("click.AXInput",function(){axdom("#"+objID).focus(),bindPlaceHolderKeyup(objID,objSeq)})}},bindPlaceHolderSyncAnchor:function(objID){var cfg=this.config;""==axdom("#"+objID).val().trim()?axdom("#"+cfg.targetID+"_AX_"+objID).show():axdom("#"+cfg.targetID+"_AX_"+objID).hide()},bindSearch:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],w=axdom("#"+cfg.targetID+"_AX_"+objID).width(),h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),placeholder=axdom("#"+objID).attr("placeholder");void 0==placeholder&&(placeholder="");var po=[];"ie"==AXUtil.browser.name&&AXUtil.browser.version<10&&""!=placeholder&&(po.push("'+placeholder+"")),po.push("Search'),axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join(""));var bindSearchKeyup=this.bindSearchSyncAnchor.bind(this);axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",function(){bindSearchKeyup(objID,objSeq)}),bindSearchKeyup(objID,objSeq),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").unbind("click.AXInput").bind("click.AXInput",function(){axdom("#"+objID).val(""),axdom("#"+objID).focus(),bindSearchKeyup(objID,objSeq)})},bindSearchSyncAnchor:function(objID){var cfg=this.config;axdom("#"+cfg.targetID+"_AX_"+objID).show(),""==axdom("#"+objID).val()?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").hide(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").show()):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").show(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").hide())},bindNumber:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=axdom("#"+objID);var h=obj.bindAnchorTarget.data("height"),po=[],UPh=parseInt((h-2)/2)-1,DNh=parseInt((h-2)/2)-2,handleWidth=h-2;handleWidth>20&&(handleWidth=20),po.push('
    '),po.push(" increase'),po.push(" decrease'),po.push("
    "),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindNumberAdd=this.bindNumberAdd.bind(this),bindNumberCheck=this.bindNumberCheck.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_increase").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){bindNumberAdd(objID,1,objSeq),bindNumberCheck(objID,objSeq)}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_decrease").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){bindNumberAdd(objID,-1,objSeq),bindNumberCheck(objID,objSeq)}),obj.bindTarget.unbind("change.AXInput").bind("change.AXInput",function(){bindNumberCheck(objID,objSeq)}),obj.bindTarget.unbind("keydown.AXInput").bind("keydown.AXInput",function(event){event.keyCode==AXUtil.Event.KEY_UP?bindNumberAdd(objID,1,objSeq):event.keyCode==AXUtil.Event.KEY_DOWN&&bindNumberAdd(objID,-1,objSeq)}),obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(){bindNumberCheck(objID,objSeq)})},bindNumberAdd:function(objID,adder,objSeq){var obj=this.objects[objSeq],maxval=obj.config.max,minval=obj.config.min,nval=axdom("#"+objID).val().number();if(adder>0){if(minval>nval+adder&&(nval=minval),void 0!=maxval&&null!=maxval&&nval+adder>maxval)return}else if(void 0!=minval&&null!=minval&&minval>nval+adder)return;axdom("#"+objID).val(nval+adder)},bindNumberCheck:function(objID,objSeq){var nval,obj=this.objects[objSeq],maxval=obj.config.max,minval=obj.config.min;if(nval=""==axdom("#"+objID).val()&&void 0!=minval&&null!=minval?minval:axdom("#"+objID).val().number(),void 0!=maxval&&null!=maxval){if(nval>maxval){axdom("#"+objID).val("");try{this.msgAlert("설정된 최대값을 넘어서는 입력입니다.")}catch(e){}}else if(void 0!=minval&&null!=minval)if(minval>nval){axdom("#"+objID).val("");try{this.msgAlert("설정된 최소값보다 작은 입력입니다.")}catch(e){}}else axdom("#"+objID).val(nval)}else if(void 0!=minval&&null!=minval){if(minval>nval){axdom("#"+objID).val("");try{this.msgAlert("설정된 최소값보다 작은 입력입니다.")}catch(e){}}}else axdom("#"+objID).val(nval);obj.config.onChange&&obj.config.onChange.call({objID:objID,objSeq:objSeq,value:axdom("#"+objID).val()}),obj.config.onchange&&obj.config.onchange.call({objID:objID,objSeq:objSeq,value:axdom("#"+objID).val()})},bindMoney:function(objID,objSeq){var obj=this.objects[objSeq];obj.bindTarget.css({"text-align":"right"});var bindMoneyCheck=this.bindMoneyCheck.bind(this),val=obj.bindTarget.val().trim();""!=val&&(val=obj.bindTarget.val().number().money()),obj.bindTarget.val(val),obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(event){var elemFocusPosition,elem=obj.bindTarget.get(0);if("selectionStart"in elem)elemFocusPosition=elem.selectionStart;else if(document.selection){var sel=document.selection.createRange(),selLen=document.selection.createRange().text.length;sel.moveStart("character",-elem.value.length),elemFocusPosition=sel.text.length-selLen}obj.bindTarget.data("focusPosition",elemFocusPosition),obj.bindTarget.data("prevLen",elem.value.length);var event=window.event||e;event.keyCode&&9!=event.keyCode&&16!=event.keyCode&&17!=event.keyCode&&(event.ctrlKey&&65==event.keyCode||(event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT?bindMoneyCheck(objID,objSeq,"keyup"):(event.keyCode==AXUtil.Event.KEY_DELETE||event.keyCode==AXUtil.Event.KEY_BACKSPACE)&&bindMoneyCheck(objID,objSeq,"keyup")))}),obj.bindTarget.unbind("change.AXInput").bind("change.AXInput",function(){bindMoneyCheck(objID,objSeq,"change")})},bindMoneyCheck:function(objID,objSeq,eventType){var nval,obj=this.objects[objSeq],maxval=obj.config.max,minval=obj.config.min;if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),nval=""==obj.bindTarget.val()&&void 0!=minval&&null!=minval?minval:obj.bindTarget.val().number(),void 0!=maxval&&null!=maxval){if(nval>maxval){obj.bindTarget.val(maxval.money());try{this.msgAlert("설정된 최대값{"+maxval.number().money()+"} 을 넘어서는 입력입니다.")}catch(e){}}else if(void 0!=minval&&null!=minval&&"change"==eventType)if(minval>nval){obj.bindTarget.val(minval.money());try{this.msgAlert("설정된 최소값{"+minval.number().money()+"}보다 작은 입력입니다.")}catch(e){}}else obj.bindTarget.val(nval.money())}else if(void 0!=minval&&null!=minval&&"change"==eventType){if(minval>nval){obj.bindTarget.val(minval.money());try{this.msgAlert("설정된 최소값{"+minval.number().money()+"}보다 작은 입력입니다.")}catch(e){}}}else obj.bindTarget.val(nval.money());axf.isEmpty(obj.bindTarget.data("focusPosition"))||obj.bindTarget.setCaret(obj.bindTarget.data("focusPosition").number()+(obj.bindTarget.val().length-obj.bindTarget.data("prevLen"))),obj.config.onChange&&obj.config.onChange.call({objID:objID,objSeq:objSeq,value:obj.bindTarget.val().number()})},bindSelector:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindTarget.data("val",obj.bindTarget.val());var h=obj.bindAnchorTarget.data("height")-2,po=[];po.push('
    '),po.push(" expand'),po.push("
    "),obj.config.finder&&(po.push('
    '),po.push(" finder'),po.push("
    ")),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindSelectorExpand=this.bindSelectorExpand.bind(this),bindSelectorClose=this.bindSelectorClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").unbind("click.AXInput").bind("click.AXInput",function(event){AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")?bindSelectorClose(objID,objSeq,event):axdom("#"+objID).focus()}),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){try{this.select()}catch(e){}AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")||bindSelectorExpand(objID,objSeq,!1,event)}),obj.bindTarget.unbind("keydown.AXInputCheck").bind("keydown.AXInputCheck",function(event){AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")||bindSelectorExpand(objID,objSeq,!1,event)}),obj.config.finder&&obj.config.finder.onclick&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Finder").unbind("click.AXInput").bind("click.AXInput",function(event){obj.config.finder.onclick.call({targetID:objID,value:axdom("#"+objID).val()},objID),bindSelectorClose(objID,objSeq,event)})},bindSelectorExpand:function(objID,objSeq,isToggle,event){var cfg=this.config,obj=this.objects[objSeq];obj.bindTarget.data("val",obj.bindTarget.val().enc()),this.opendExpandBox&&(this.bindSelectorClose(this.opendExpandBox.objID,this.opendExpandBox.objSeq,event),AXReqAbort());var jqueryTargetObjID=axdom("#"+cfg.targetID+"_AX_"+objID);if(!axdom("#"+cfg.targetID+"_AX_"+objID).data("blurEvent")){if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");var anchorWidth=jqueryTargetObjID.width()-2,anchorHeight=jqueryTargetObjID.data("height")-1,styles=[];styles.push("top:"+anchorHeight+"px"),styles.push("width:"+(obj.config.anchorWidth||anchorWidth)+"px"),styles.push("z-index:5100");var po=[];po.push('
    '),po.push('
    '),po.push('
    '),po.push("
    "),po.push("
    "),axdom(document.body).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").addClass("on");var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox");obj.config.positionFixed&&expandBox.css({position:"fixed"});var offset=(expandBox.outerHeight(),obj.config.positionFixed?jqueryTargetObjID.position():jqueryTargetObjID.offset());obj.config.position&&(offset=jqueryTargetObjID.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top));var css={};if(css.top=offset.top+anchorHeight,css.left=offset.left,expandBox.css(css),this.opendExpandBox={objID:objID,objSeq:objSeq},obj.config.onsearch)this.bindSelectorKeyupChargingUp(objID,objSeq,event);else if(obj.config.ajaxUrl)this.bindSelectorKeyupChargingUp(objID,objSeq,event);else{if(!obj.config.options)return void trace("options 항목이 없어 bind selector 를 완성 할 수 없습니다.");this.bindSelectorSetOptions(objID,objSeq),this.bindSelectorKeyupChargingUp(objID,objSeq,event)}var bindSelectorOptionsClick=this.bindSelectorOptionsClick.bind(this);obj.documentclickEvent=function(event){bindSelectorOptionsClick(objID,objSeq,event)},axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent)}},bindSelectorBlur:function(objID){var objSeq=(this.config,null);axf.each(this.objects,function(idx){this.id==objID&&(objSeq=idx)}),null!=objSeq&&this.bindSelectorClose(objID,objSeq)},bindSelectorClose:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config;if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on"),axdom(document).unbind("click.AXInput"),obj.bindTarget.unbind("keydown.AXInput"),obj.bindTarget.unbind("change.AXInput"),obj.bindTarget.data("val")==obj.bindTarget.val().enc()&&!obj.config.isSelectorClick)return obj.bindTarget.val();if(obj.config.isChangedSelect){var myVal="";if(obj.config.selectedObject&&(myVal=obj.config.selectedObject.optionText.dec()),obj.config.appendable?""!=myVal&&axdom("#"+objID).val(myVal):axdom("#"+objID).val(myVal),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,options:obj.config.options,selectedIndex:obj.config.selectedIndex,selectedOption:obj.config.selectedObject};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.config.isChangedSelect=!1}obj.config.selectedObject?this.bindSelectorInputChange(objID,objSeq):obj.config.appendable||obj.config.selectedObject||obj.inProgress||axdom("#"+objID).val("")}},bindSelectorSetOptions:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config,maxHeight=obj.config.maxHeight||130,optionPrintLength=obj.config.optionPrintLength||100;if(obj.config.options){var po=[];if(axf.each(obj.config.options,function(index,O){if(""!=optionPrintLength&&index>optionPrintLength-1)return!1;var descStr=(O.desc||O.optionDesc||"").dec();""!=descStr&&(descStr=""+descStr+""),po.push("'+O.optionText.dec()+descStr+"")}),0==po.length){var selectorOptionEmpty="";AXConfig.AXInput&&(selectorOptionEmpty=AXConfig.AXInput.selectorOptionEmpty||"empty options"),po.push('
    '+selectorOptionEmpty+"
    ")}axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").html(po.join("")),obj.config.isSelectorClick=!1;var expandScrollHeight=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").outerHeight();expandScrollHeight>maxHeight&&(expandScrollHeight=maxHeight),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").css({height:expandScrollHeight+"px"});var bindSelectorOptionsClick=this.bindSelectorOptionsClick.bind(this);obj.documentclickEvent=function(event){bindSelectorOptionsClick(objID,objSeq,event)};var bindSelectorKeyup=this.bindSelectorKeyup.bind(this);obj.inputKeyup=function(event){bindSelectorKeyup(objID,objSeq,event)},axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup),obj.myUIScroll&&obj.myUIScroll.unbind(),obj.myUIScroll=new AXScroll,obj.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_"+objID+"_AX_expandBox",scrollID:cfg.targetID+"_AX_"+objID+"_AX_expandScroll",touchDirection:!1}),obj.myUIScroll.scrollTop(0),void 0!=obj.config.selectedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option").addClass("on"),obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option"),obj.config.focusedIndex=obj.config.selectedIndex)}},bindSelectorOptionsClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt){return"body"==evt.parentNode.tagName?!0:!1},find:function(evt){return""==evt.id?!1:evt.id==objID||axdom(evt).hasClass("bindSelectorNodes")?!0:!1}}),isSelectorClick=myTarget?!0:!1;if(isSelectorClick){if(eid=myTarget.id.split(/_AX_/g),"option"==eid.last()){var selectedIndex=eid[eid.length-2];obj.config.selectedIndex=selectedIndex,obj.config.focusedIndex=selectedIndex,obj.config.selectedObject=obj.config.options[selectedIndex],obj.config.isChangedSelect=!0,obj.config.isSelectorClick=!0,this.bindSelectorClose(objID,objSeq,event)}}else this.bindSelectorClose(objID,objSeq,event),AXReqAbort()},bindSelectorKeyup:function(objID,objSeq,event){{var obj=this.objects[objSeq];this.config}if(obj.inProgress)return void(obj.inProgressReACT=!0);if(event.keyCode==AXUtil.Event.KEY_TAB)return void this.bindSelectorClose(objID,objSeq,event);if(event.keyCode==AXUtil.Event.KEY_UP){if(!obj.config.options)return;if(0==obj.config.options.length)return;var focusIndex=obj.config.options.length-1;void 0==obj.config.focusedIndex||0==obj.config.focusedIndex||(focusIndex=obj.config.focusedIndex-1),this.bindSelectorSelect(objID,objSeq,focusIndex)}else if(event.keyCode==AXUtil.Event.KEY_DOWN){if(!obj.config.options)return;if(0==obj.config.options.length)return;var focusIndex=0;void 0==obj.config.focusedIndex||obj.config.focusedIndex==obj.config.options.length-1||(focusIndex=obj.config.focusedIndex.number()+1),this.bindSelectorSelect(objID,objSeq,focusIndex)}else{if(event.keyCode==AXUtil.Event.KEY_RETURN)return null==obj.config.focusedIndex?void this.bindSelectorClose(objID,objSeq,event):(obj.config.selectedObject=obj.config.options[obj.config.focusedIndex],obj.config.selectedIndex=obj.config.focusedIndex,obj.config.isChangedSelect=!0,axdom("#"+objID).val(obj.config.selectedObject.optionText.dec()),void this.bindSelectorClose(objID,objSeq,event));var bindSelectorKeyupChargingUp=this.bindSelectorKeyupChargingUp.bind(this);obj.Observer&&clearTimeout(obj.Observer),obj.Observer=setTimeout(function(){bindSelectorKeyupChargingUp(objID,objSeq,event)},500)}},bindSelectorKeyupChargingUp:function(objID,objSeq,event){var obj=this.objects[objSeq],objVal=(this.config,axdom("#"+objID).val()),bindSelectorSearch=this.bindSelectorSearch.bind(this);if(obj.config.onsearch){var res=obj.config.onsearch.call({id:objID,value:objVal},objID,objVal); -res||(res={options:[]}),obj.config.options=res.options,obj.config.focusedIndex=null,this.bindSelectorSetOptions(objID,objSeq)}else if(obj.config.ajaxUrl){obj.inProgress=!0;var bindSelectorSetOptions=this.bindSelectorSetOptions.bind(this),bindSelectorKeyupChargingUp=this.bindSelectorKeyupChargingUp.bind(this),url=obj.config.ajaxUrl,pars=obj.config.ajaxPars,selectorName=obj.config.selectorName||axdom("#"+objID).attr("name");""==pars?pars=selectorName+"="+(objVal||"").enc():"string"==(typeof pars).toLowerCase()?pars+="&"+selectorName+"="+objVal.enc():"object"==(typeof pars).toLowerCase()&&(pars[selectorName]=objVal.enc());var msgAlert=this.msgAlert.bind(this);new AXReq(url,{debug:!1,pars:pars,onsucc:function(res){res.result==AXUtil.ajaxOkCode?(obj.config.options=res.options||[],obj.config.focusedIndex=null,bindSelectorSetOptions(objID,objSeq),bindSelectorSearch(objID,objSeq,objVal),obj.inProgressReACT&&bindSelectorKeyupChargingUp(objID,objSeq,event)):msgAlert(res),obj.inProgress=!1,obj.inProgressReACT=!1}})}else bindSelectorSearch(objID,objSeq,objVal)},bindSelectorInputChange:function(objID,objSeq){{var obj=this.objects[objSeq];this.config}axdom("#"+objID).val()!=obj.config.selectedObject.optionText.dec()&&(obj.config.appendable||axdom("#"+objID).val(""),obj.config.selectedObject=null,obj.config.selectedIndex=null,obj.config.focusedIndex=null,obj.config.onChange?obj.config.onChange(null):obj.config.onchange&&obj.config.onchange(null))},bindSelectorSetValue:function(objID,objSeq,value){{var obj=this.objects[objSeq];this.config}if(obj.config.options){var selectedIndex=null;if(axf.each(obj.config.options,function(oidx,opt){opt.optionValue==value&&(selectedIndex=oidx)}),null!=selectedIndex&&(obj.config.focusedIndex=selectedIndex,obj.config.selectedObject=obj.config.options[selectedIndex],obj.config.isChangedSelect=!0,axdom("#"+objID).val(obj.config.selectedObject.optionText.dec()),obj.config.onChange||obj.config.onchange)){var sendObj={targetID:objID,options:obj.config.options,selectedIndex:obj.config.selectedIndex,selectedOption:obj.config.selectedObject};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}}},bindSelectorSearch:function(objID,objSeq,kword){var obj=this.objects[objSeq],cfg=this.config;if(""==kword)return void this.bindSelectorSelectClear(objID,objSeq);kword=kword.replace(/\//g,"\\/");var sw=AXUtil.consonantKR((kword||"").dec());eval("var reAt= /^"+sw+".*/i");for(var ix=null,a=0;aobj.config.max.number()&&(objVal=obj.config.max),obj.config.unit||(obj.config.unit="");var po=[];po.push('
    '),po.push('
    '+obj.config.min.number().money()+obj.config.unit+"
    "),po.push('
    '),po.push('
    '+objVal.number().money()+obj.config.unit+"
    "),po.push(" handle'),po.push("
    "),po.push('
    '+obj.config.max.number().money()+obj.config.unit+"
    "),po.push("
    "),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var maxTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").outerWidth().number()+10,minTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").outerWidth().number()+10;30>maxTitleWidth&&(maxTitleWidth=30),30>minTitleWidth&&(minTitleWidth=30),axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").css({width:minTitleWidth+"px"}),axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").css({width:maxTitleWidth+"px"});var sliderBarWidth=w-minTitleWidth-maxTitleWidth;obj.bindAnchorTarget.find(".AXanchorSliderBar").css({width:sliderBarWidth+"px",left:minTitleWidth+"px",top:h/2+2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({width:maxTitleWidth}),obj.config._maxTitleWidth=maxTitleWidth,obj.config._handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").width(),obj.config._trackWidth=sliderBarWidth,this.bindSliderSetValue(objID,objSeq);var onmousedown=this.bindSliderMouseDown.bind(this);if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq)}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),document.addEventListener){var ontouchstart=this.sliderTouchStart.bind(this);obj.bindSliderTouchStart=function(){ontouchstart(objID,objSeq)},AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").addEventListener("touchstart",obj.bindSliderTouchStart,!1)}obj.bindAnchorTarget.show(),obj.bindTarget.hide()},bindSliderMouseDown:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if(!obj.config.isMoving){var bindSliderMouseMove=this.bindSliderMouseMove.bind(this);obj.bindSliderMouseMove=function(event){bindSliderMouseMove(objID,objSeq,event)};var bindSliderMouseUp=this.bindSliderMouseUp.bind(this);obj.bindSliderMouseUp=function(event){bindSliderMouseUp(objID,objSeq,event)},axdom(document.body).unbind("mousemove.AXInput").bind("mousemove.AXInput",obj.bindSliderMouseMove),axdom(document.body).unbind("mouseup.AXInput").bind("mouseup.AXInput",obj.bindSliderMouseUp),obj.config.isMoving=!0}},bindSliderMouseMove:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq],eX=event.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),snap>=1?(objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap):(objVal=(objVal.number()+obj.config.min.number()).round(snap.toString().length-2),objVal=(parseFloat(objVal/snap)*snap).round(snap.toString().length-2));var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;objValobj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth);var sX=rX-obj.config._handleWidth/2,stX=rX-obj.config._maxTitleWidth/2;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal)},bindSliderMouseUp:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}axdom(document.body).unbind("mousemove.AXInput"),axdom(document.body).unbind("mouseup.AXInput"),obj.config.isMoving=!1},bindSliderSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq];if(void 0!=value)var objVal=value;else var objVal=axdom("#"+objID).val();objVal.number()obj.config.max.number()&&(objVal=obj.config.max);var valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,pixelLeft=(objVal-obj.config.min)*pixelWidth/valueWidth;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:pixelLeft-obj.config._handleWidth/2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:pixelLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:pixelLeft-obj.config._maxTitleWidth/2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal)},sliderTouchStart:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if(!obj.config.isMoving){var bindSliderTouchMove=this.sliderTouchMove.bind(this);obj.bindSliderTouchMove=function(event){bindSliderTouchMove(objID,objSeq,event)};var bindSliderTouchEnd=this.sliderTouchEnd.bind(this);obj.bindSliderTouchEnd=function(event){bindSliderTouchEnd(objID,objSeq,event)},document.addEventListener&&(document.addEventListener("touchmove",obj.bindSliderTouchMove,!1),document.addEventListener("touchend",obj.bindSliderTouchEnd,!1)),obj.config.isMoving=!0}},sliderTouchMove:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq];event.preventDefault();var touch=event.touches[0],eX=touch.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;objValobj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth);var sX=rX-obj.config._handleWidth/2,stX=rX-obj.config._maxTitleWidth/2;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal),obj.config.onChange?obj.config.onChange(objID,objVal):obj.config.onchange&&obj.config.onchange(objID,objVal)},sliderTouchEnd:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}document.addEventListener&&(document.removeEventListener("touchmove",obj.bindSliderTouchMove,!1),document.removeEventListener("touchend",obj.bindSliderTouchEnd,!1)),obj.config.isMoving=!1},bindTwinSliderGetVals:function(objValString,separator){var objVals=objValString.split(separator),objVal={min:0,max:0};return objVal=objVals.length<2?{min:objVals[0],max:objVals[0]}:{min:objVals[0],max:objVals[1]}},bindTwinSlider:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],w=axdom("#"+cfg.targetID+"_AX_"+objID).width(),h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),objValString=axdom("#"+objID).val(),separator=obj.config.separator||"~",objVal=this.bindTwinSliderGetVals(objValString,separator);obj.vals=objVal,objVal.min.number()obj.config.max.number()&&(objVal.min=obj.config.max),objVal.max.number()obj.config.max.number()&&(objVal.max=obj.config.max),obj.config.unit||(obj.config.unit="");var po=[];po.push('
    '),po.push(" '+obj.config.min.number().money()+obj.config.unit+""),po.push(" '+obj.config.max.number().money()+obj.config.unit+""),po.push('
    '),po.push('
    '),po.push('
    '+objVal.min.number().money()+obj.config.unit+"
    "),po.push('
    '+objVal.max.number().money()+obj.config.unit+"
    "),po.push(" handleMin'),po.push(" handleMax'),po.push("
    "),po.push("
    "),axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID).css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"}),axdom("#"+cfg.targetID+"_AX_"+objID).show(),axdom("#"+objID).hide();var maxTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").outerWidth().number()+10,minTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").outerWidth().number()+10;axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").css({width:minTitleWidth+"px"}),axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").css({width:maxTitleWidth+"px"});var sliderBarWidth=w-minTitleWidth-maxTitleWidth;axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderBar").css({width:sliderBarWidth+"px",left:minTitleWidth+"px",top:h/2+2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({width:maxTitleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({width:maxTitleWidth}),obj.config._maxTitleWidth=maxTitleWidth,obj.config._handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").width(),obj.config._trackWidth=sliderBarWidth,this.bindTwinSliderSetValue(objID,objSeq);var onmousedown=this.bindTwinSliderMouseDown.bind(this);if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq,"min")}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq,"max")}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),document.addEventListener){var ontouchstart=this.twinSliderTouchStart.bind(this);obj.bindTwinSliderTouchStartMin=function(){ontouchstart(objID,objSeq,"min")},obj.bindTwinSliderTouchStartMax=function(){ontouchstart(objID,objSeq,"max")},AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").addEventListener("touchstart",obj.bindTwinSliderTouchStartMin,!1),AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").addEventListener("touchstart",obj.bindTwinSliderTouchStartMax,!1)}},bindTwinSliderMouseDown:function(objID,objSeq,handleName){var obj=(this.config,this.objects[objSeq]);if(!obj.config.isMoving){var bindTwinSliderMouseMove=this.bindTwinSliderMouseMove.bind(this);obj.bindTwinSliderMouseMove=function(event){bindTwinSliderMouseMove(objID,objSeq,event,handleName)};var bindTwinSliderMouseUp=this.bindTwinSliderMouseUp.bind(this);obj.bindTwinSliderMouseUp=function(event){bindTwinSliderMouseUp(objID,objSeq,event,handleName)},axdom(document.body).unbind("mousemove.AXInput").bind("mousemove.AXInput",obj.bindTwinSliderMouseMove),axdom(document.body).unbind("mouseup.AXInput").bind("mouseup.AXInput",obj.bindTwinSliderMouseUp),obj.config.isMoving=!0}},bindTwinSliderMouseMove:function(objID,objSeq,event,handleName){var cfg=this.config,obj=this.objects[objSeq],eX=event.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;if(objValobj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth),"min"==handleName){objVal>obj.vals.max&&(objVal=obj.vals.max,rX=obj.handleMaxLeft);var sX=rX-obj.config._handleWidth,stX=rX-obj.config._maxTitleWidth;obj.handleMinLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.min=objVal}else{objValobj.config.max.number()&&(objVal.min=obj.config.max),objVal.max.number()obj.config.max.number()&&(objVal.max=obj.config.max);var valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,pixelMinLeft=(objVal.min-obj.config.min)*pixelWidth/valueWidth,pixelMaxLeft=(objVal.max-obj.config.min)*pixelWidth/valueWidth;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:pixelMinLeft-obj.config._handleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:pixelMinLeft-obj.config._maxTitleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.min.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").css({left:pixelMaxLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({left:pixelMaxLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").text(objVal.max.number().money()+obj.config.unit),obj.handleMinLeft=pixelMinLeft,obj.handleMaxLeft=pixelMaxLeft,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:pixelMinLeft,width:pixelMaxLeft-pixelMinLeft}),axdom("#"+objID).val(obj.vals.min+separator+obj.vals.max)},twinSliderTouchStart:function(objID,objSeq,handleName){var obj=(this.config,this.objects[objSeq]);if(!obj.config.isMoving){var bindTwinSliderTouchMove=this.twinSliderTouchMove.bind(this);obj.bindTwinSliderTouchMove=function(event){bindTwinSliderTouchMove(objID,objSeq,event,handleName)};var bindTwinSliderTouchEnd=this.twinSliderTouchEnd.bind(this);obj.bindTwinSliderTouchEnd=function(event){bindTwinSliderTouchEnd(objID,objSeq,event,handleName)},document.addEventListener&&(document.addEventListener("touchmove",obj.bindTwinSliderTouchMove,!1),document.addEventListener("touchend",obj.bindTwinSliderTouchEnd,!1)),obj.config.isMoving=!0}},twinSliderTouchMove:function(objID,objSeq,event,handleName){var cfg=this.config,obj=this.objects[objSeq];event.preventDefault();var touch=event.touches[0],eX=touch.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;if(objValobj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth),"min"==handleName){objVal>obj.vals.max&&(objVal=obj.vals.max,rX=obj.handleMaxLeft);var sX=rX-obj.config._handleWidth,stX=rX-obj.config._maxTitleWidth;obj.handleMinLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.min=objVal}else{objVal'),po.push('
    '+switchValue+"
    "),po.push("handle'),po.push(""),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"}),obj.bindTarget_switchBox=obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName),obj.bindTarget_switchDisplay=obj.bindAnchorTarget.find(".AXanchorSwitchDisplay"),obj.bindTarget_switchHandle=obj.bindAnchorTarget.find(".AXanchorSwitchHandle"),"on"==obj.switchValue&&obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName).addClass("on"),obj.bindAnchorTarget.show(),obj.bindTarget.hide();var bindSwitchClick=this.bindSwitchClick.bind(this);obj.bindSwitchClick=function(event){bindSwitchClick(objID,objSeq,event)},obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName).unbind("click.AXInput").bind("click.AXInput",obj.bindSwitchClick)},bindSwitchClick:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];if("on"==obj.switchValue?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").removeClass("on"),obj.switchValue="off",axdom("#"+objID).val(obj.config.off),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.off)):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").addClass("on"),obj.switchValue="on",axdom("#"+objID).val(obj.config.on),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.on)),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,on:obj.config.on,off:obj.config.off,value:axdom("#"+objID).val()};obj.config.onChange&&obj.config.onChange.call(sendObj),obj.config.onchange&&obj.config.onchange.call(sendObj)}},bindSwitchSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq],objVal=value,switchValue=obj.config.on;if(objVal==switchValue?obj.switchValue="on":(switchValue=obj.config.off,obj.switchValue="off"),axdom("#"+objID).val(switchValue),"off"==obj.switchValue?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").removeClass("on"),obj.switchValue="off",axdom("#"+objID).val(obj.config.off),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.off)):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").addClass("on"),obj.switchValue="on",axdom("#"+objID).val(obj.config.on),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.on)),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,on:obj.config.on,off:obj.config.off,value:axdom("#"+objID).val()};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}},bindSwitch_touchstart:function(){},bindSwitch_touchMove:function(){},bindSwitch_touchEnd:function(){},bindSegment:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=axdom("#"+objID);var w=obj.bindAnchorTarget.width(),h=obj.bindAnchorTarget.data("height"),objVal=obj.bindTarget.val(),segmentOptions=obj.config.options;obj.selectedSegmentIndex=null,axf.each(segmentOptions,function(idx,seg){this.optionValue==objVal&&(obj.selectedSegmentIndex=idx,obj.selectedSegment=seg)}),null==obj.selectedSegmentIndex&&(obj.selectedSegmentIndex=0,obj.selectedSegment=segmentOptions[0]),obj.bindTarget.val(obj.selectedSegment.optionValue);var handleWidth=(w/segmentOptions.length).round()-2,po=[],theme=obj.config.theme||cfg.anchorSegmentBoxClassName;po.push('
    '),axf.each(segmentOptions,function(idx,seg){var addClass="";0==idx?addClass=" segmentLeft":idx==segmentOptions.length-1&&(addClass=" segmentRight"),obj.selectedSegmentIndex==idx&&(addClass+=" on"),seg.addClass&&(addClass+=" "+seg.addClass),po.push("'+seg.optionText+"")}),po.push("
    "),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var borderTop=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-top-width").number(),borderBot=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-bottom-width").number();obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css({height:obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px","line-height":obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px"}),obj.bindAnchorTarget.show(),obj.bindTarget.hide();var bindSegmentClick=this.bindSegmentClick.bind(this);obj.bindSegmentClick=function(event){bindSegmentClick(objID,objSeq,event)},axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentBox").find(".AXanchorSegmentHandle").unbind("click.AXInput").bind("click.AXInput",obj.bindSegmentClick)},bindSegmentClick:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq],segmentOptions=obj.config.options;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt){return axdom(evt).hasClass("AXanchorSegmentHandle")?!0:!1}});if(myTarget){var seq=myTarget.id.split(/_AX_/g).last();if(obj.selectedSegmentIndex!=seq&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+obj.selectedSegmentIndex).removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+seq).addClass("on"),obj.selectedSegmentIndex=seq,obj.selectedSegment=segmentOptions[seq]),axdom("#"+objID).val(obj.selectedSegment.optionValue),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,options:segmentOptions,selectedIndex:obj.selectedSegmentIndex,selectedOption:obj.selectedSegment};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}}}},bindSegmentSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq],selectedSegmentIndex=obj.selectedSegmentIndex,objVal=value,segmentOptions=obj.config.options;if(obj.selectedSegmentIndex=null,axf.each(segmentOptions,function(idx,seg){this.optionValue==objVal&&(obj.selectedSegmentIndex=idx,obj.selectedSegment=seg)}),null==obj.selectedSegmentIndex&&(obj.selectedSegmentIndex=0,obj.selectedSegment=segmentOptions[0]),axdom("#"+objID).val(obj.selectedSegment.optionValue),selectedSegmentIndex!=obj.selectedSegmentIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+selectedSegmentIndex).removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+obj.selectedSegmentIndex).addClass("on")),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,options:segmentOptions,selectedIndex:obj.selectedSegmentIndex,selectedOption:obj.selectedSegment}; -obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}},bindDate:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),po=[];po.push("handle'),axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID).show();var bindDateExpand=this.bindDateExpand.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").unbind("click.AXInput").bind("click.AXInput",function(event){bindDateExpand(objID,objSeq,!0,event)}),axdom("#"+objID).unbind("focus.AXInput").bind("focus.AXInput",function(){axdom("#"+objID).select()});var separator=obj.config.separator?obj.config.separator:"-";axdom("#"+objID).unbind("keyup.AXInput").bind("keyup.AXInput",function(event){if(event.keyCode==axf.Event.KEY_RETURN)this.blur();else if(event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT){var va=this.value.replace(/\D/gi,""),_this=this;"y"==obj.config.selectType?va.length>4&&(_this.value=va.left(4)):"m"==obj.config.selectType?4==va.length?(va+=separator,_this.value=va):va.length>4&&(va=va.substr(0,4)+separator+va.substr(4,2),_this.value=va):4==va.length?(va+=separator,_this.value=va):6==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator,_this.value=va):8==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),obj.config.expandTime&&(va+=" "),_this.value=va):10==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":",_this.value=va):va.length>12&&(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":"+va.substr(10,2),_this.value=va)}});var bindDateInputBlur=this.bindDateInputBlur.bind(this);axdom("#"+objID).unbind("blur.AXInput").bind("blur.AXInput",function(event){bindDateInputBlur(objID,objSeq,event)})},bindDateExpand:function(objID,objSeq,isToggle,event){for(var OO,cfg=this.config,oidx=0,__arr=this.objects;oidx<__arr.length&&(OO=__arr[oidx]);oidx++)OO.expandBox_axdom&&(OO.expandBox_axdom.remove(),OO.expandBox_axdom=null);if(AXUtil.clientWidth()'),po.push("
    "),po.push('
    '),po.push(" '+myYear+"년"),po.push(" '+myMonth+"월"),po.push(" P'),po.push(" N'),po.push("
    "),po.push('
    '),obj.config.expandTime&&po.push('
    '),po.push("
    "),po.push(""),axdom(document.body).append(po.join("")),obj.nDate=myDate,obj.mycalendar=new AXCalendar,obj.mycalendar.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox",basicDate:myDate,href:obj.config.href}),obj.config.expandTime){obj.nDate=myDate;var mycalendartimeChange=this.bindDateTimeChange.bind(this);obj.mycalendartimeChange=function(myTime){mycalendartimeChange(objID,objSeq,myTime)},obj.mycalendartime=new AXCalendar,obj.mycalendartime.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox",onChange:obj.mycalendartimeChange});var apm="AM",myTimes=myDate.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy")),printDate=myDate.print("yyyy"),axdom("#"+objID).val(printDate)):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"),axdom("#"+objID).val(printDate)):obj.config.defaultSelectType?("y"==obj.config.defaultSelectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy"))):"m"==obj.config.defaultSelectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate)),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate));var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),expBoxWidth=expandBox.outerWidth(),expBoxHeight=expandBox.outerHeight(),offset=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").offset(),handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").width(),css=(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").height(),{});css.left="left"==obj.config.align?offset.left.number()-expBoxWidth:"center"==obj.config.align?offset.left.number()-expBoxWidth/2+handleWidth:"right"==obj.config.align?offset.left.number()+handleWidth:offset.left.number()+handleWidth,css.top="top"==obj.config.valign?offset.top:"middle"==obj.config.valign?offset.top.number()-expBoxHeight/2+handleWidth/2:"bottom"==obj.config.valign?offset.top.number()-expBoxHeight+handleWidth:offset.top;var pElement=expandBox.offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:expandBox.outerWidth()+10,height:expandBox.outerHeight()+10};_box.height.number()+css.top.number()>pBox.height&&(css.top=css.top-(_box.height.number()+css.top.number()-pBox.height)),css.top<0&&(css.top=0),_box.width.number()+css.left.number()>pBox.width&&(css.left=css.left-(_box.width.number()+css.left.number()-pBox.width)),css.left<0&&(css.left=0),expandBox.css(css),obj.expandBox_axdom=expandBox;var bindDateExpandBoxClick=this.bindDateExpandBoxClick.bind(this);obj.documentclickEvent=function(event){bindDateExpandBoxClick(objID,objSeq,event)};var bindDateKeyup=this.bindDateKeyup.bind(this);obj.inputKeyup=function(event){bindDateKeyup(objID,objSeq,event)},"y"==obj.config.selectType&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth").hide()),axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).bind("keydown.AXInput",obj.inputKeyup)},bindDateExpandMobile:function(objID,objSeq,isToggle){var cfg=this.config,obj=this.objects[objSeq];if(axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup),isToggle&&obj.modal&&obj.modal.opened)return obj.modal.close(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");obj.modal=new AXMobileModal,obj.modal.setConfig({addClass:"",height:obj.config.expandTime?532:388,width:300,head:{},onclose:function(){}});var initBindDateMobileModal=this.initBindDateMobileModal.bind(this),onLoad=function(modalObj){initBindDateMobileModal(objID,objSeq,modalObj)};obj.modal.open(null,onLoad)},initBindDateMobileModal:function(objID,objSeq,modalObj){var cfg=this.config,obj=this.objects[objSeq],separator=obj.config.separator?obj.config.separator:"-",objVal=axdom("#"+objID).val();obj.config.expandTime&&"d"==obj.config.selectType;new Date;"y"==obj.config.selectType?""!=objVal&&(objVal=objVal.left(4)+separator+"01"+separator+"01"):"m"==obj.config.selectType&&""!=objVal&&(objVal=objVal+separator+"01");var dfDate=(obj.config.defaultDate||"").date(),myDate=objVal.date(separator,dfDate),myYear=myDate.getFullYear(),myMonth=(myDate.getMonth()+1).setDigit(2),headPo=[];headPo.push('");var bodyPo=[];bodyPo.push('
    '),bodyPo.push('
    '),obj.config.expandTime&&bodyPo.push('
    '),bodyPo.push("
    ");var footPo=[];if(footPo.push('
    '),footPo.push(' "),footPo.push("
    "),modalObj.modalHead.empty(),modalObj.modalHead.append(headPo.join("")),modalObj.modalBody.empty(),modalObj.modalBody.append(bodyPo.join("")),modalObj.modalFoot.empty(),modalObj.modalFoot.append(footPo.join("")),obj.nDate=myDate,obj.mycalendar=new AXCalendar,obj.mycalendar.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox",basicDate:myDate,href:obj.config.href}),obj.config.expandTime){obj.nDate=myDate;var mycalendartimeChange=this.bindDateTimeChange.bind(this);obj.mycalendartimeChange=function(myTime){mycalendartimeChange(objID,objSeq,myTime)},obj.mycalendartime=new AXCalendar,obj.mycalendartime.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox",onChange:obj.mycalendartimeChange});var apm="AM",myTimes=myDate.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy")),printDate=myDate.print("yyyy"),axdom("#"+objID).val(printDate)):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"),axdom("#"+objID).val(printDate)):obj.config.defaultSelectType?("y"==obj.config.defaultSelectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy"))):"m"==obj.config.defaultSelectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate)),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate));var _this=this;modalObj.modalHead.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalHeadClick(objID,objSeq,event)}),modalObj.modalBody.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalBodyClick(objID,objSeq,event)}),modalObj.modalFoot.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalFootClick(objID,objSeq,event)})},bindDateMobileModalHeadClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXDateControlBox")?!0:!1},find:function(evt){return axdom(evt).hasClass("AXDateControl")?!0:!1}});if(myTarget){var act=myTarget.id.split(/_AX_/g).last(),nDate=obj.nDate;"controlYear"==act?this.bindDateChangePage(objID,objSeq,nDate,"y"):"controlMonth"==act?"y"!=obj.config.selectType&&this.bindDateChangePage(objID,objSeq,nDate,"m"):"expandPrev"==act?"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(-12,"y"),"y"):"expandNext"==act&&("d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(12,"y"),"y"))}},bindDateMobileModalBodyClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXDateContainer")?!0:!1},find:function(evt){return axdom(evt).hasClass("calendarDate")||axdom(evt).hasClass("calendarMonth")?!0:!1}});if(myTarget){var ids=myTarget.id.split(/_AX_/g),act=ids.last(),nDate=obj.nDate,separator=obj.config.separator?obj.config.separator:"-";if("date"==act){obj.nDate=ids[ids.length-2].date();var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate),this.bindDateExpandClose(objID,objSeq,event)}else if("month"==act){var myMonth=ids[ids.length-2].number()-1;if("m"==obj.config.selectType){var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(yy,myMonth,dd),this.bindDateExpandClose(objID,objSeq,event)}else{var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(yy,myMonth,dd),this.bindDateChangePage(objID,objSeq,obj.nDate,"d")}}else if("year"==act){var myYear=ids[ids.length-2];if("y"==obj.config.selectType){var mm=0,dd=1;obj.nDate=new Date(myYear,mm,dd),this.bindDateExpandClose(objID,objSeq,event)}else{var mm=0,dd=1;obj.nDate=new Date(myYear,mm,dd),this.bindDateChangePage(objID,objSeq,obj.nDate,"m")}}}},bindDateMobileModalFootClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("AXDateButtonBox")?!0:!1},find:function(evt){return axdom(evt).hasClass("AXBindDateConfirm")?!0:!1}});if(myTarget){var act=myTarget.id.split(/_AX_/g).last();"confirm"==act&&obj.modal.close()}},bindDateExpandClose:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config;if(!obj)return axdom(document).unbind("click.AXInput"),void axdom("#"+objID).unbind("keydown.AXInput");if(obj.modal&&obj.modal.opened){var objVal=axdom("#"+objID).val();if(""==objVal);else{var separator=obj.config.separator?obj.config.separator:"-";"y"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy")):"m"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm")):(printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate))}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange)if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;if(obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0)return this.msgAlert(obj.config.onChange.err),void axdom("#"+objID).val("");obj.config.onChange.onChange?obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val()}):obj.config.onChange.onchange&&obj.config.onChange.onchange.call({objID:objID,value:axdom("#"+objID).val()})}return obj.modal.close(),axdom("#"+objID).unbind("keydown.AXInput"),axdom(document).unbind("click.AXInput"),void axdom("#"+objID).unbind("keydown.AXInput")}if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){var objVal=axdom("#"+objID).val();if(""==objVal);else{var separator=obj.config.separator?obj.config.separator:"-";"y"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy")):"m"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm")):(printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate))}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange)if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;if(obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0)return this.msgAlert(obj.config.onChange.err),void axdom("#"+objID).val("");obj.config.onChange.onChange?obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val()}):obj.config.onChange.onchange&&obj.config.onChange.onchange.call({objID:objID,value:axdom("#"+objID).val()})}return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),obj.expandBox_axdom=null,axdom(document).unbind("click.AXInput"),axdom("#"+objID).unbind("keydown.AXInput"),void event.stopPropagation()}},bindDateInputBlur:function(objID,objSeq,event){var obj=this.objects[objSeq],objVal=(this.config,axdom("#"+objID).val());if(""==objVal);else{var clearDate=!1,nDate=obj.nDate||new Date,va=axdom("#"+objID).val().replace(/\D/gi,"");if(-1==va.search(/\d+/g)&&(clearDate=!0),clearDate)axdom("#"+objID).val("");else{var separator=obj.config.separator?obj.config.separator:"-";if("y"==obj.config.selectType){var yy=va.left(4).number();0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3);var mm=nDate.getMonth(),dd=nDate.getDate();obj.nDate=new Date(yy,mm,dd,12),axdom("#"+objID).val(obj.nDate.print("yyyy"))}else if("m"==obj.config.selectType){if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=0,dd=1;0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate=new Date(yy,mm,dd,12),axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"))}else{var needAlert=!1;if(va.length>7)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number();else if(va.length>4)var yy="20"+va.substr(0,2),mm=va.substr(2,2).number()-1,dd=va.substr(4,2).number();else var yy=nDate.getFullYear(),mm=va.substr(0,2).number()-1,dd=va.substr(2,2).number();if(0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate=new Date(yy,mm,dd,12),(obj.nDate.getFullYear()!=yy.number()||obj.nDate.getMonth()!=mm.number()||obj.nDate.getDate()!=dd.number())&&(needAlert=!0,obj.nDate=new Date),printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime)try{printDate+=" "+obj.mycalendartime.getTime()}catch(e){if(va.length>11)var hh=va.substr(8,2).number(),mm=va.substr(10,2).number();else if(va.length>9)var hh=va.substr(8,2).number(),mm="00";else var hh="12",mm="00";printDate+=" "+hh+":"+mm}needAlert&&this.msgAlert("날짜 형식이 올바르지 않습니다."),axdom("#"+objID).val(printDate)}}}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&axdom("#"+objID).data("val")!=axdom("#"+objID).val()){if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0&&(this.msgAlert(obj.config.onChange.err),axdom("#"+objID).val("")),obj.config.onChange.onChange?obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val()}):obj.config.onChange.onchange&&obj.config.onChange.onchange.call({objID:objID,value:axdom("#"+objID).val()})}axdom("#"+objID).data("val",axdom("#"+objID).val())}event.stopPropagation()},unbindDate:function(obj){var cfg=this.config,objID=obj.id,objSeq=null;if(axf.each(this.objects,function(oidx){return this.id==objID?(objSeq=oidx,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq];axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom(document).unbind("click.AXInput"),axdom("#"+objID).unbind("keydown.AXInput")}var removeAnchorId,collect=[];axf.each(this.objects,function(){this.id!=obj.id?collect.push(this):removeAnchorId=this.anchorID}),this.objects=collect,axdom("#"+removeAnchorId).remove()},bindDateTimeChange:function(objID,objSeq){var obj=this.objects[objSeq],separator=(this.config,obj.config.separator?obj.config.separator:"-"),printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate)},bindDateExpandBoxClick:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config,isDateClick=!1,eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt){return"BODY"==evt.parentNode.tagName?!0:!1},find:function(evt){if(!evt.id)return!1;var checkID=cfg.targetID+"_AX_"+objID;return evt.id==objID||evt.id.substr(0,checkID.length)==checkID?!0:!1}});if(isDateClick=myTarget?!0:!1){var ids=myTarget.id.split(/_AX_/g),ename=ids.last(),nDate=obj.nDate,separator=obj.config.separator?obj.config.separator:"-";if("expandPrev"==ename)"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(-12,"y"),"y");else if("expandNext"==ename)"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(12,"y"),"y");else if("controlYear"==ename)this.bindDateChangePage(objID,objSeq,nDate,"y");else if("controlMonth"==ename)"y"!=obj.config.selectType&&this.bindDateChangePage(objID,objSeq,nDate,"m");else if("date"==ename){obj.nDate=ids[ids.length-2].date();var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate),this.bindDateExpandClose(objID,objSeq,event)}else if("month"==ename){var myMonth=ids[ids.length-2].number()-1;if("m"==obj.config.selectType){var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(yy,myMonth,dd,12),this.bindDateExpandClose(objID,objSeq,event)}else{var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(yy,myMonth,dd,12),this.bindDateChangePage(objID,objSeq,obj.nDate,"d")}}else if("year"==ename){var myYear=ids[ids.length-2];if("y"==obj.config.selectType){var mm=0,dd=1;obj.nDate=new Date(myYear,mm,dd,12),this.bindDateExpandClose(objID,objSeq,event)}else{var mm=0,dd=1;obj.nDate=new Date(myYear,mm,dd,12),this.bindDateChangePage(objID,objSeq,obj.nDate,"m")}}}else this.bindDateExpandClose(objID,objSeq,event)},bindDateKeyup:function(objID,objSeq){{var obj=this.objects[objSeq];this.config}"y"==obj.config.selectType||"m"==obj.config.selectType},bindDateChangePage:function(objID,objSeq,setDate,pageType){var obj=this.objects[objSeq],cfg=this.config,separator=obj.config.separator?obj.config.separator:"-";if("m"==pageType){obj.mycalendarPageType="m",obj.nDate=setDate,obj.mycalendar.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년")}else if("y"==pageType){obj.mycalendarPageType="y",obj.nDate=setDate,obj.mycalendar.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년")}else{obj.mycalendarPageType="d",obj.nDate=setDate,obj.mycalendar.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth").html(myMonth+"월")}if("y"==obj.config.selectType)axdom("#"+objID).val(obj.nDate.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDate:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),po=[];po.push("handle'),axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID).show();var bindDateExpand=this.bindTwinDateExpand.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").unbind("click.AXInput").bind("click.AXInput",function(event){bindDateExpand(objID,objSeq,!0,event)}),axdom("#"+objID).unbind("click.AXInput").bind("focus.AXInput",function(){axdom("#"+objID).select()}),axdom("#"+obj.config.startTargetID).unbind("focus.AXInput").bind("focus.AXInput",function(){axdom("#"+obj.config.startTargetID).select()});var separator=obj.config.separator?obj.config.separator:"-";axdom("#"+objID+", #"+obj.config.startTargetID).unbind("keyup.AXInput").bind("keyup.AXInput",function(event){if(event.keyCode==axf.Event.KEY_RETURN)this.blur();else if(event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT){var va=this.value.replace(/\D/gi,""),_this=this;"y"==obj.config.selectType?va.length>4&&(_this.value=va.left(4)):"m"==obj.config.selectType?4==va.length?(va+=separator,_this.value=va):va.length>4&&(va=va.substr(0,4)+separator+va.substr(4,2),_this.value=va):4==va.length?(va+=separator,_this.value=va):6==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator,_this.value=va):8==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" ",_this.value=va):10==va.length?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":",_this.value=va):va.length>12&&(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":"+va.substr(10,2),_this.value=va)}});var bindTwinDateInputBlur=this.bindTwinDateInputBlur.bind(this);axdom("#"+objID).unbind("blur.AXInput").bind("blur.AXInput",function(event){bindTwinDateInputBlur(objID,objSeq,event,2)}),axdom("#"+obj.config.startTargetID).unbind("blur.AXInput").bind("blur.AXInput",function(event){bindTwinDateInputBlur(objID,objSeq,event,1)});var objVal1=axdom("#"+obj.config.startTargetID).val(),objVal2=axdom("#"+objID).val(),myDate1=objVal1.date(separator),myDate2=objVal2.date(separator);obj.nDate1=myDate1,obj.nDate2=myDate2},bindTwinDateExpand:function(objID,objSeq,isToggle){for(var OO,cfg=this.config,oidx=0,__arr=this.objects;oidx<__arr.length&&(OO=__arr[oidx]);oidx++)OO.expandBox_axdom&&(OO.expandBox_axdom.remove(),OO.expandBox_axdom=null);var obj=this.objects[objSeq],separator=obj.config.separator?obj.config.separator:"-";if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove();var objVal1=axdom("#"+obj.config.startTargetID).val(),objVal2=axdom("#"+objID).val();obj.config.expandTime&&"d"==obj.config.selectType;var objVal1Empty=(new Date,!1);"y"==obj.config.selectType?(""!=objVal1?objVal1=objVal1.left(4)+separator+"01"+separator+"02":objVal1Empty=!0,""!=objVal2&&(objVal2=objVal2.left(4)+separator+"01"+separator+"02")):"m"==obj.config.selectType&&(""!=objVal1?objVal1=objVal1+separator+"01":objVal1Empty=!0,""!=objVal2&&(objVal2=objVal2+separator+"01")),AXUtil.isEmpty(objVal1)&&(objVal1="",objVal1Empty=!0);var myDate1=objVal1.date(separator),myDate2=objVal2.date(separator),myYear1=myDate1.getFullYear(),myYear2=myDate2.getFullYear(),myMonth1=(myDate1.getMonth()+1).setDigit(2),myMonth2=(myDate2.getMonth()+1).setDigit(2),po=[];if(po.push('
    '),po.push("
    "),po.push(' '),po.push(" "),po.push(" "),po.push(' "),po.push(' "),po.push(" "),po.push(" "),po.push("
    '),po.push('
    START
    '),po.push('
    '),po.push(" '+myYear1+"년"),po.push(" '+myMonth1+"월"),po.push(" P'),po.push(" N'),po.push("
    "),po.push('
    '),obj.config.expandTime&&po.push('
    '),po.push("
    '),po.push('
    END
    '),po.push('
    '),po.push(" '+myYear2+"년"),po.push(" '+myMonth2+"월"),po.push(" P'),po.push(" N'),po.push("
    "),po.push('
    '),obj.config.expandTime&&po.push('
    '),po.push("
    "),po.push("
    "),po.push('
    '),po.push(' '),po.push("
    "),po.push("
    "),axdom(document.body).append(po.join("")),obj.nDate1=myDate1,obj.mycalendar1=new AXCalendar,obj.mycalendar1.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox1",basicDate:myDate1}),obj.nDate2=myDate2,obj.mycalendar2=new AXCalendar,obj.mycalendar2.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox2",basicDate:myDate2}),obj.config.expandTime){obj.nDate1=myDate1; -var mycalendartimeChange1=this.bindTwinDateTimeChange.bind(this);obj.mycalendartimeChange1=function(myTime){mycalendartimeChange1(objID,objSeq,myTime,1)},obj.mycalendartime1=new AXCalendar,obj.mycalendartime1.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox1",onChange:obj.mycalendartimeChange1});var apm="AM",myTimes=myDate1.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime1.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm),obj.nDate2=myDate2;var mycalendartimeChange2=this.bindTwinDateTimeChange.bind(this);obj.mycalendartimeChange2=function(myTime){mycalendartimeChange2(objID,objSeq,myTime,2)},obj.mycalendartime2=new AXCalendar,obj.mycalendartime2.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox2",onChange:obj.mycalendartimeChange2});var apm="AM",myTimes=myDate2.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime2.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate1="",printDate2="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar1.printYearPage(myDate1.print("yyyy")),obj.mycalendar2.printYearPage(myDate2.print("yyyy")),printDate1=myDate1.print("yyyy"),printDate2=myDate2.print("yyyy"),axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2)):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar1.printMonthPage(myDate1),obj.mycalendar2.printMonthPage(myDate2),printDate1=myDate1.print("yyyy"+separator+"mm"),printDate2=myDate2.print("yyyy"+separator+"mm"),axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2)):(obj.mycalendarPageType="d",obj.mycalendar1.printDayPage(myDate1),obj.mycalendar2.printDayPage(myDate2),printDate1=myDate1.print("yyyy"+separator+"mm"+separator+"dd"),printDate2=myDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate1+=" "+myDate1.print("hh:mi"),printDate2+=" "+myDate2.print("hh:mi")),axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2));var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),expBoxWidth=expandBox.outerWidth(),expBoxHeight=expandBox.outerHeight(),offset=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").offset(),handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").width(),css=(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").height(),{});css.left="left"==obj.config.align?offset.left.number()-expBoxWidth:"center"==obj.config.align?offset.left.number()-expBoxWidth/2+handleWidth:"right"==obj.config.align?offset.left.number()+handleWidth:offset.left.number()+handleWidth,css.top="top"==obj.config.valign?offset.top:"middle"==obj.config.valign?offset.top.number()-expBoxHeight/2+handleWidth/2:"bottom"==obj.config.valign?offset.top.number()-expBoxHeight+handleWidth:offset.top;var pElement=expandBox.offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:expandBox.outerWidth()+10,height:expandBox.outerHeight()+10};_box.height.number()+css.top.number()>pBox.height&&(css.top=css.top-(_box.height.number()+css.top.number()-pBox.height)),css.top<0&&(css.top=0),_box.width.number()+css.left.number()>pBox.width&&(css.left=css.left-(_box.width.number()+css.left.number()-pBox.width)),css.left<0&&(css.left=0),expandBox.css(css),obj.expandBox_axdom=expandBox;var bindTwinDateExpandBoxClick=this.bindTwinDateExpandBoxClick.bind(this);obj.documentclickEvent=function(event){bindTwinDateExpandBoxClick(objID,objSeq,event)};var bindTwinDateKeyup=this.bindTwinDateKeyup.bind(this);obj.inputKeyup=function(event){bindTwinDateKeyup(objID,objSeq,event)},"y"==obj.config.selectType&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth1").hide(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth2").hide()),axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup);var bindTwinDateExpandClose=this.bindTwinDateExpandClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_closeButton").unbind("click.AXInput").bind("click.AXInput",function(event){bindTwinDateExpandClose(objID,objSeq,event)})},bindTwinDateTimeChange:function(objID,objSeq,myTime,seq){{var obj=this.objects[objSeq];this.config}if(1==seq){var separator=obj.config.separator?obj.config.separator:"-",printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)}else{var separator=obj.config.separator?obj.config.separator:"-",printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDateExpandClose:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config;if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){var objVal1=axdom("#"+obj.config.startTargetID).val(),objVal2=axdom("#"+objID).val(),separator=obj.config.separator?obj.config.separator:"-";return"y"==obj.config.selectType?(objVal1.length<4?axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy")):(objVal1=objVal1.left(4),axdom("#"+obj.config.startTargetID).val(objVal1)),objVal2.length<4?axdom("#"+objID).val(obj.nDate2.print("yyyy")):(objVal2=objVal2.left(4),axdom("#"+objID).val(objVal2))):"m"==obj.config.selectType?(axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"+separator+"mm")),axdom("#"+objID).val(obj.nDate2.print("yyyy"+separator+"mm"))):(printDate1=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd"),printDate2=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate1+=" "+obj.mycalendartime1.getTime(),printDate2+=" "+obj.mycalendartime2.getTime()),axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2)),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&obj.config.onChange.call({ST_objID:obj.config.startTargetID,ED_objID:objID,ST_value:axdom("#"+obj.config.startTargetID).val(),ED_value:axdom("#"+objID).val()}),obj.expandBox_axdom=null,axdom(document).unbind("click.AXInput"),axdom("#"+objID).unbind("keydown.AXInput"),void event.stopPropagation()}},bindTwinDateExpandBoxClick:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config,isDateClick=!1,eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt){return"body"==evt.parentNode.tagName?!0:!1},find:function(evt){return""==evt.id||null==evt.id||void 0==evt.id?!1:evt.id==objID||evt.id==obj.config.startTargetID||evt.id.substr(0,cfg.targetID.length)==cfg.targetID&&(-1!=evt.id.search(objID)||-1!=evt.id.search(obj.config.startTargetID))?!0:!1}});if(isDateClick=myTarget?!0:!1){var ids=myTarget.id.split(/_AX_/g),ename=ids.last(),boxType=ids[ids.length-3],nDate1=obj.nDate1,nDate2=obj.nDate2,separator=obj.config.separator?obj.config.separator:"-";if("expandPrev1"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-12,"y"),"y");else if("expandPrev2"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-12,"y"),"y");else if("expandNext1"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(12,"y"),"y");else if("expandNext2"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(12,"y"),"y");else if("controlYear1"==ename)this.bindTwinDateChangePage(objID,objSeq,1,nDate1,"y");else if("controlYear2"==ename)this.bindTwinDateChangePage(objID,objSeq,2,nDate2,"y");else if("controlMonth1"==ename)"y"!=obj.config.selectType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1,"m");else if("controlMonth2"==ename)"y"!=obj.config.selectType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2,"m");else if("date"==ename){if("displayBox1"==boxType){obj.nDate1=ids[ids.length-2].date();var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.dayPageSetDay(obj.nDate1)}else{obj.nDate2=ids[ids.length-2].date();var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate),obj.mycalendar2.dayPageSetDay(obj.nDate2)}if(obj.nDate1.diff(obj.nDate2)<0)if("displayBox1"==boxType){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate),obj.mycalendar2.dayPageSetDay(obj.nDate2)}else{obj.nDate1=obj.nDate2;var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.dayPageSetDay(obj.nDate1)}}else if("month"==ename){var myMonth=ids[ids.length-2].number()-1;if("displayBox1"==boxType)if("m"==obj.config.selectType){var yy=nDate1.getFullYear(),dd=nDate1.getDate();obj.nDate1=new Date(yy,myMonth,dd);var printDate=obj.nDate1.print("yyyy"+separator+"mm");axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.monthPageSetMonth(obj.nDate1)}else{var yy=nDate1.getFullYear(),dd=nDate1.getDate();obj.nDate1=new Date(yy,myMonth,dd),this.bindTwinDateChangePage(objID,objSeq,1,obj.nDate1,"d")}else if("m"==obj.config.selectType){var yy=nDate2.getFullYear(),dd=nDate2.getDate();obj.nDate2=new Date(yy,myMonth,dd);var printDate=obj.nDate2.print("yyyy"+separator+"mm");axdom("#"+objID).val(printDate),obj.mycalendar2.monthPageSetMonth(obj.nDate2)}else{var yy=nDate2.getFullYear(),dd=nDate2.getDate();obj.nDate2=new Date(yy,myMonth,dd),this.bindTwinDateChangePage(objID,objSeq,2,obj.nDate2,"d")}if("m"==obj.config.selectType&&obj.nDate1.diff(obj.nDate2)<0){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy"+separator+"mm");axdom("#"+objID).val(printDate),axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar2.monthPageSetMonth(obj.nDate2)}}else if("year"==ename){var myYear=ids[ids.length-2];if("displayBox1"==boxType)if("y"==obj.config.selectType){var mm=nDate1.getMonth(),dd=nDate1.getDate();obj.nDate1=new Date(myYear,mm,dd);var printDate=obj.nDate1.print("yyyy");axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.yearPageSetYear(obj.nDate1)}else{var mm=nDate1.getMonth(),dd=nDate1.getDate();obj.nDate1=new Date(myYear,mm,dd),this.bindTwinDateChangePage(objID,objSeq,1,obj.nDate1,"m")}else if("y"==obj.config.selectType){var mm=nDate2.getMonth(),dd=nDate2.getDate();obj.nDate2=new Date(myYear,mm,dd);var printDate=obj.nDate2.print("yyyy");axdom("#"+objID).val(printDate),obj.mycalendar2.yearPageSetYear(obj.nDate2)}else{var mm=nDate2.getMonth(),dd=nDate2.getDate();obj.nDate2=new Date(myYear,mm,dd),this.bindTwinDateChangePage(objID,objSeq,2,obj.nDate2,"m")}if("y"==obj.config.selectType&&obj.nDate1.print("yyyy").number()>obj.nDate2.print("yyyy").number()){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy");axdom("#"+obj.config.startTargetID).val(printDate),axdom("#"+objID).val(printDate),obj.mycalendar2.yearPageSetYear(obj.nDate2)}}}else this.bindTwinDateExpandClose(objID,objSeq,event)},bindTwinDateKeyup:function(){"y"==obj.config.selectType||"m"==obj.config.selectType},bindTwinDateChangePage:function(objID,objSeq,objType,setDate,pageType){var obj=this.objects[objSeq],cfg=this.config,separator=obj.config.separator?obj.config.separator:"-";if("m"==pageType)if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년")}else{obj.nDate2=setDate,obj.mycalendar2.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년")}else if("y"==pageType)if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년")}else{obj.nDate2=setDate,obj.mycalendar2.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년")}else if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth1").html(myMonth+"월")}else{obj.nDate2=setDate,obj.mycalendar2.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth2").html(myMonth+"월")}if(1==objType)if("y"==obj.config.selectType)axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)}else if("y"==obj.config.selectType)axdom("#"+objID).val(obj.nDate2.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+objID).val(obj.nDate2.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDateInputBlur:function(objID,objSeq,event,seq){{var objVal,targetObjID,obj=this.objects[objSeq];this.config}if(1==seq?(targetObjID=obj.config.startTargetID,objVal=axdom("#"+obj.config.startTargetID).val()):(targetObjID=objID,objVal=axdom("#"+objID).val()),""==objVal);else{var clearDate=!1,nDate=obj["nDate"+seq]||new Date,va=axdom("#"+targetObjID).val().replace(/\D/gi,"");if(-1==va.search(/\d+/g)&&(clearDate=!0),clearDate)axdom("#"+targetObjID).val("");else{var separator=obj.config.separator?obj.config.separator:"-";if("y"==obj.config.selectType){var yy=va.left(4).number();0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3);var mm=nDate.getMonth(),dd=nDate.getDate();obj["nDate"+seq]=new Date(yy,mm,dd,12),axdom("#"+targetObjID).val(obj["nDate"+seq].print("yyyy"))}else if("m"==obj.config.selectType){if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=0,dd=1;0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj["nDate"+seq]=new Date(yy,mm,dd,12),axdom("#"+targetObjID).val(obj["nDate"+seq].print("yyyy"+separator+"mm"))}else{var needAlert=!1;if(va.length>7)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number();else if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=nDate.getMonth(),dd=nDate.getDate();if(0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj["nDate"+seq]=new Date(yy,mm,dd,12),(obj["nDate"+seq].getFullYear()!=yy.number()||obj["nDate"+seq].getMonth()!=mm.number()||obj["nDate"+seq].getDate()!=dd.number())&&(needAlert=!0,obj["nDate"+seq]=new Date),printDate=obj["nDate"+seq].print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj["mycalendartime"+seq].getTime()),needAlert&&this.msgAlert("날짜 형식이 올바르지 않습니다."),axdom("#"+targetObjID).val(printDate),void 0==obj.nDate1){var va=axdom("#"+obj.config.startTargetID).val().replace(/\D/gi,"");if(-1!=va.search(/\d+/g)){if(va.length>7)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number();else if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=nDate.getMonth(),dd=nDate.getDate();0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate1=new Date(yy,mm,dd,12)}}void 0==obj.nDate2&&(obj.nDate2=obj.nDate1,printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)),obj.nDate1.diff(obj.nDate2)<0&&(1==seq?(obj.nDate2=obj.nDate1,printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)):(obj.nDate1=obj.nDate2,printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)))}}}obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&obj.config.onChange.call({event:event,ST_objID:obj.config.startTargetID,ED_objID:objID,ST_value:axdom("#"+obj.config.startTargetID).val(),ED_value:axdom("#"+objID).val()}),event.stopPropagation()}}),AXInput=new AXInputConverter;AXInput.setConfig({targetID:"inputBasic"}),axdom.fn.unbindInput=function(config){axf.each(this,function(){return void 0==config&&(config={}),config.id=this.id,AXInput.unbind(config),this})},axdom.fn.bindSearch=function(config){axf.each(this,function(){return void 0==config&&(config={}),config.id=this.id,config.bindType="search",AXInput.bind(config),this})},axdom.fn.bindNumber=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="number",AXInput.bind(config),this})},axdom.fn.bindMoney=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="money",AXInput.bind(config),this})},axdom.fn.bindSelector=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="selector",AXInput.bind(config),this})},axdom.fn.bindSelectorBlur=function(){axf.each(this,function(){return AXInput.bindSelectorBlur(this.id),this})},axdom.fn.bindSlider=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="slider",AXInput.bind(config),this})},axdom.fn.bindTwinSlider=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="twinSlider",AXInput.bind(config),this})},axdom.fn.bindSwitch=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="switch",AXInput.bind(config),this})},axdom.fn.bindSegment=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="segment",AXInput.bind(config),this})},axdom.fn.bindDate=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="date",AXInput.bind(config),this})},axdom.fn.unbindDate=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,AXInput.unbindDate(config),this})},axdom.fn.bindDateTime=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="date",config.expandTime=!0,AXInput.bind(config),this})},axdom.fn.bindTwinDate=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="twinDate",AXInput.bind(config),this})},axdom.fn.bindTwinDateTime=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="twinDateTime",config.expandTime=!0,AXInput.bind(config),this})},axdom.fn.bindPlaceHolder=function(config){axf.each(this,function(){return config=config||{},config.id=this.id,config.bindType="placeHolder",AXInput.bind(config),this})},axdom.fn.setConfigInput=function(config){axf.each(this,function(){return AXInput.bindSetConfig(this.id,config),this})},axdom.fn.setValueInput=function(value){axf.each(this,function(){return AXInput.bindSetValue(this.id,value),this})};var AXMobileMenu=Class.create(AXJ,{version:"AXMobileMenu V0.4",author:"tom@axisj.com",logs:["2013-12-13 오전 10:53:43","2014-02-26 오전 11:42:23 tom : 각종 버그 픽스","2014-02-26 오후 4:35:05 tom : hasSubMenu 분리"],initialize:function(AXJ_super){AXJ_super(),this.moveSens=0,this.config.moveSens=1,this.touchMode,this.selectedPoi=null,this.config.width=300,this.config.height=388,this.config.reserveKeys={labelKey:"label",urlKey:"url",targetKey:"target",addClassKey:"addClass",subMenuKey:"cn"}},init:function(){var cfg=this.config;cfg.onclick||(cfg.onclick=cfg.onClick),this.modal=new AXMobileModal,this.modal.setConfig({addClass:"AXMobileMenu",height:cfg.height,width:cfg.width,head:{close:{onclick:function(){}}},onclose:function(){}})},open:function(){var onLoad=(this.config,this.initMenu.bind(this));this.modal.open(null,onLoad)},initMenu:function(obj){var cfg=this.config;if(this.modalObj=obj,this.modalID=obj.jQueryModal.get(0).id,this.selectedPoi){var lpoi=this.selectedPoi.last(),apoi=this.selectedPoi.concat();apoi.pop();var menu=cfg.menu;if(axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]}),menu[cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey].length>0){apoi.push(lpoi);var tpl=this.getMenu(this.modalID,menu[cfg.reserveKeys.subMenuKey][lpoi],apoi)}else var tpl=this.getMenu(this.modalID,menu,apoi)}else var tpl=this.getMenu(this.modalID,cfg.menu);if(AXUtil.browser.mobile){var modalBodyID=obj.modalBody.get(0).id,touchstart=this.touchstart.bind(this);this.touchstartBind=function(){touchstart()},document.addEventListener&&AXgetId(modalBodyID).addEventListener("touchstart",this.touchstartBind,!1)}else obj.modalBody.unbind("mousedown.AXMobileMenu").bind("mousedown.AXMobileMenu",this.touchstart.bind(this));obj.modalBody.attr("onselectstart","return false"),obj.modalBody.addClass("AXUserSelectNone"),obj.modalBody.bind("click.AXMobileMenu",this.onclickModalBody.bind(this)),this.printMenu(tpl)},printMenu:function(tpl){var obj=this.modalObj;obj.modalHead.empty(),obj.modalHead.append(tpl.headPo),obj.modalBody.empty(),obj.modalBody.append(tpl.bodyPo),obj.modalFoot.empty(),obj.modalFoot.append(tpl.pagePo),obj.modalHead.find(".mobileMenuHome").bind("click",this.onclickHome.bind(this)),obj.modalHead.find(".mobileMenuPrev").bind("click",this.onclickPrev.bind(this)),this.menuPageWidth=obj.modalBody.find(".mobileMenuBodyPage").width()+9,this.mobileMenuBodyScroll=obj.modalBody.find(".mobileMenuBodyScroll"),obj.modalBody.find(".mobileMenuBodyScroll").css({width:tpl.pageNum*this.menuPageWidth})},getMenu:function(modalID,_menu,poi){var cfg=this.config,countPerBlock=9,menu=_menu,menuTitle="";void 0==poi||0==poi.length?poi=[]:(menuTitle=menu[cfg.reserveKeys.labelKey],menu=menu[cfg.reserveKeys.subMenuKey]);var headPo=[];headPo.push("home'),""!=menuTitle&&headPo.push("',menuTitle,"");var bodyPo=[];bodyPo.push('
    '),bodyPo.push('
    '),bodyPo.push('
    ');var ppoi=poi.join("_");""!=ppoi&&(ppoi+="_");var selectedPoi="";this.selectedPoi&&(selectedPoi=this.selectedPoi.join("_")),axf.each(menu,function(midx){midx%countPerBlock==0&&midx>0&&(bodyPo.push("
    "),bodyPo.push('
    '));var addClass=[];this[cfg.reserveKeys.addClassKey]&&addClass.push(this[cfg.reserveKeys.addClassKey]),selectedPoi==ppoi+midx&&addClass.push("selected"),bodyPo.push("'),bodyPo.push(this[cfg.reserveKeys.labelKey]),this[cfg.reserveKeys.subMenuKey]&&this[cfg.reserveKeys.subMenuKey].length>0&&bodyPo.push(''),bodyPo.push("")}),bodyPo.push("
    "),bodyPo.push("
    "),bodyPo.push("
    ");var pageNum=(menu.length/countPerBlock).ceil();this.pageNo=0,this.pageNum=pageNum;var pagePo=[];return pagePo.push('
    '),axf.each(pageNum.rangeFrom(1),function(pidx){pagePo.push(0==pidx?'')}),pagePo.push("
    "),{headPo:headPo.join(""),bodyPo:bodyPo.join(""),pagePo:pagePo.join(""),pageNum:pageNum}},close:function(){this.config;this.modal.close()},setHighLight:function(menuID){var cfg=this.config,menu=cfg.menu,pois="",treeFn=function(subTree,parentPoi){axf.each(subTree,function(idx,M){return M[cfg.reserveKeys.primaryKey]==menuID?(pois=parentPoi+"_"+idx,!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],parentPoi+"_"+idx))})};axf.each(menu,function(idx,M){return M[cfg.reserveKeys.primaryKey]==menuID?(pois=idx+"",!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],idx))});var poi;""!=pois&&(poi=pois.split(/_/g)),this.selectedPoi=poi},setHighLightMenu:function(menuID){this.setHighLight(menuID)},onclickModalBody:function(event){var cfg=this.config,eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt){return axdom(evt.parentNode).hasClass("mobileMenuBodyScroll")?!0:!1},find:function(evt){return axdom(evt).hasClass("mobileMenuItem")?!0:!1}});if(myTarget){var poi=myTarget.id.split(/_AX_/g).last(),menu=cfg.menu,apoi=poi.split(/_/g);if(axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]}),menu[cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey].length>0){var menuItem=this.modalObj.modalBody.find("#"+myTarget.id);menuItem.css({opacity:0});var menuItemPos=menuItem.position(),mobileMenuBody=this.modalObj.modalBody.find(".mobileMenuBodyScroll"),bodyPos=mobileMenuBody.position(),cloneMenuItem=axdom("
    "+menuItem.html()+"
    ");mobileMenuBody.append(cloneMenuItem),cloneMenuItem.css({position:"absolute",left:menuItemPos.left,top:menuItemPos.top});var getMenuBind=this.getMenu.bind(this),printMenuBind=this.printMenu.bind(this),modalID=this.modalID;return void cloneMenuItem.animate({left:9-bodyPos.left,top:0,width:270,height:270},300,"backInOut").animate({opacity:0},100,"expoOut",function(){var tpl=getMenuBind(modalID,menu,apoi);printMenuBind(tpl)})}cfg.onclick&&cfg.onclick.call(menu,menu)}},onclickHome:function(){var cfg=this.config,tpl=this.getMenu(this.modalID,cfg.menu);this.printMenu(tpl)},onclickPrev:function(event){var cfg=this.config,poi=event.target.id.split(/_AX_/g).last(),menu=cfg.menu,apoi=poi.split(/_/g);apoi.pop(),axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]});var tpl=this.getMenu(this.modalID,menu,apoi);this.printMenu(tpl)},setTree:function(tree){this.config.menu=tree},touchstart:function(e){var touch,event=(this.config,window.event);if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}if(this.touchStartXY={sTime:(new Date).getTime()/1e3,sLeft:this.mobileMenuBodyScroll.position().left,x:touch.pageX,y:touch.pageY},AXUtil.browser.mobile){var event=window.event,touchEnd=this.touchEnd.bind(this);this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1))}else axdom(document.body).bind("mouseup.AXMobileMenu",this.touchEnd.bind(this)),axdom(document.body).bind("mousemove.AXMobileMenu",this.touchMove.bind(this));this.mobileMenuBodyScroll.stop()},touchMove:function(e){this.touhEndObserver&&clearTimeout(this.touhEndObserver);var touch,event=(this.config,window.event);if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs());else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()){if(this.moveBlock(touch.pageX-this.touchStartXY.x),!event.preventDefault)return!1;event.preventDefault()}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5},touchEnd:function(e){this.config,window.event||e;AXUtil.browser.mobile?document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)):(axdom(document.body).unbind("mouseup.AXMobileMenu"),axdom(document.body).unbind("mousemove.AXMobileMenu"));var moveEndBlock=this.moveEndBlock.bind(this);this.touhEndObserver=setTimeout(function(){moveEndBlock()},10)},moveBlock:function(moveX){trace(this.mobileMenuBodyScroll.width());var newLeft=(this.config,this.touchStartXY.sLeft+1*moveX);newLeft>.5*this.menuPageWidth?newLeft=.5*this.menuPageWidth:newLeft<1.5*-this.mobileMenuBodyScroll.width()&&(newLeft=1.5*-this.mobileMenuBodyScroll.width()),this.mobileMenuBodyScroll.css({left:newLeft})},moveEndBlock:function(){if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,eLeft=this.mobileMenuBodyScroll.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocity=Math.ceil(dLeft/dTime/10),endLeft=Math.ceil(eLeft+velocity);endLeft>0&&(endLeft=0);var calLeft=endLeft.abs()%this.menuPageWidth,absPage=(endLeft.abs()/this.menuPageWidth).floor(),newLeft=0;calLeftthis.pageNum-1&&(absPage=this.pageNum-1),newLeft=this.menuPageWidth*absPage,this.touchStartXY.sLeft=-newLeft,this.mobileMenuBodyScroll.animate({left:-newLeft},(this.mobileMenuBodyScroll.position().left+newLeft).abs(),"cubicOut",function(){}),this.modalObj.modalFoot.find("#"+this.modalID+"_AX_pageNav_AX_"+this.pageNo).removeClass("on"),this.modalObj.modalFoot.find("#"+this.modalID+"_AX_pageNav_AX_"+absPage).addClass("on"),this.pageNo=absPage,this.touchStartXY=null}},cancelEvent:function(event){return event.stopPropagation(),!1}}),AXModal=Class.create(AXJ,{version:"AXModal V1.34",author:"tom@axisj.com",logs:["2013-02-13 오전 10:39:17 - axmods 에서 컨버트 : tom ","2013-04-08 오전 12:15:17 - resize 메소스 추가 및 버그 픽스 : tom ","2013-06-20 오후 5:21:24 - open 메소드 속성에 width 조건 추가 : tom ","2013-07-09 오후 4:41:48 - animateDuration 속성 추가 : tom ","2013-08-21 오후 4:46:51 - openNew 버그 픽스 : tom ","2013-08-22 오전 10:56:20 - resize 버그 픽스 : tom ","2013-08-24 - openNew 메소드 기능 확장 : tom ","2013-10-14 오전 6:54:40 - resize 기능 보강 : tom ","2013-11-15 오후 4:01:29 - tom : openDiv scroll 버그 패치","2013-11-18 오후 5:16:02 - tom resize 버그 패치"],initialize:function(AXJ_super){AXJ_super(),this.config.maskCss="AXMask",this.config.windowBoxCss="AXModalBox",this.config.padding="0",this.config.defaultTop=10,this.config.animateDuration=300,this.config.autoHide=!1,this.config.windowID="AXModal"+AXUtil.timekey(),this.config.contentDivClass=AXConfig.AXModal?AXConfig.AXModal.contentDivClass:"bodyHeightDiv",this.config.displayLoading=!0 -},init:function(){var cfg=this.config;this.mask=jQuery('
    ')},setWidth:function(width){var cfg=this.config;width?(cfg.width=width,this.config.fixedWidth=!0):(cfg.width=void 0,this.config.fixedWidth=!1),jQuery("#"+cfg.windowID).css({width:width});var maskWidth=jQuery("#"+cfg.windowID).outerWidth(),maskLeft=jQuery(document.body).width()/2-maskWidth/2;0>maskLeft&&(maskLeft=0),jQuery("#"+cfg.windowID).css({left:maskLeft})},open:function(http){var cfg=this.config;if(!this._windowOpend){if(mask.open(),this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey(),this.config.width){var maskWidth=this.config.width,maskLeft=jQuery(document.body).width()/2-this.config.width/2;this.config.fixedWidth=!0}else{var maskWidth=jQuery(document.body).width()-50,maskLeft=10;this.config.fixedWidth=!1}http.width&&(maskWidth=http.width,maskLeft=jQuery(document.body).width()/2-http.width/2,this.config.fixedWidth=!0);var maskTop=this.config.defaultTop;maskTop=void 0!=http.top?http.top:jQuery(window).scrollTop()+100,0>maskLeft&&(maskLeft=0);var po=[];po.push("
    "),po.push("
    "),cfg.displayLoading&&(po.push("
    "),po.push('
    '),po.push("

    페이지를 로딩 중입니다. 잠시만 기다려 주세요.
    ")),po.push(" 닫기"),po.push("
    "),po.push(" "),isNaN(http.pars.length)?jQuery.each(http.pars,function(key,val){po.push(" ")}):jQuery.each(http.pars,function(){jQuery.each(this,function(key,val){po.push(" ")})}),po.push("
    "),po.push(" "),po.push("
    "),po.push("
    "),this.config.appendTargetID?jQuery("#"+this.config.appendTargetID).append(po.join("")):jQuery(document.body).append(po.join(""));var loadingID=this.config.windowID+"_loading",_winID=this.winID,_frmID=this.frmID;document[_frmID].submit();var keydown=this.keydown.bind(this);jQuery("#"+this.winID).bind("load",function(){var myIframe=window[_winID],bodyHeight=jQuery(myIframe.document).innerHeight();jQuery(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=jQuery(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),jQuery(this).animate({height:bodyHeight},cfg.animateDuration,"cubicInOut"),jQuery("#"+_winID+"_box").animate({height:bodyHeight},cfg.animateDuration,"cubicInOut"),cfg.displayLoading&&jQuery("#"+loadingID).fadeOut("slow"),jQuery("#"+_winID).addClass("loaded"),http.closeByEscKey&&jQuery(myIframe.document.body).bind("keydown.AXModal",keydown)}),jQuery("#"+this.config.windowID+"_close").bind("click",this.close.bind(this)),http.closeByEscKey&&jQuery(document.body).bind("keydown.AXModal",keydown),this._windowOpend=!0,jQuery(window).unbind("resize.AXModal"),jQuery(window).bind("resize.AXModal",this.onDocResize.bind(this))}},openI:function(http){var cfg=this.config;if(!this._windowOpend){if(mask.open(),this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey(),this.config.width){var maskWidth=this.config.width,maskLeft=jQuery(document.body).width()/2-this.config.width/2;this.config.fixedWidth=!0}else{var maskWidth=jQuery(document.body).width()-50,maskLeft=10;this.config.fixedWidth=!1}http.width&&(maskWidth=http.width,maskLeft=jQuery(document.body).width()/2-http.width/2,this.config.fixedWidth=!0);var maskTop=this.config.defaultTop;maskTop=void 0!=http.top?http.top:jQuery(window).scrollTop()+100,0>maskLeft&&(maskLeft=0);var po=[];po.push("
    "),po.push("
    "),po.push("
    "),po.push('
    '),po.push("

    페이지를 로딩 중입니다. 잠시만 기다려 주세요.
    "),po.push(" 닫기"),po.push("
    "),po.push(" "),isNaN(http.pars.length)?jQuery.each(http.pars,function(key,val){po.push(" ")}):jQuery.each(http.pars,function(){jQuery.each(this,function(key,val){po.push(" ")})}),po.push("
    "),po.push(http.maxHeight?" ":" "),po.push("
    "),po.push("
    "),this.config.appendTargetID?jQuery("#"+this.config.appendTargetID).append(po.join("")):jQuery(document.body).append(po.join(""));var loadingID=this.config.windowID+"_loading",_winID=this.winID,_frmID=this.frmID;document[_frmID].submit(),jQuery("#"+this.winID).bind("load",function(){var myIframe=window[_winID],bodyHeight=jQuery(myIframe.document).innerHeight();jQuery(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=jQuery(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),http.maxHeight&&http.maxHeightmaskLeft&&(maskLeft=0);var po=[];po.push("
    "),po.push("
    "),po.push(" 닫기"),po.push("
    "),po.push("
    "),po.push("
    "),jQuery(document.body).append(po.join("")),jQuery("#"+modalID+"_content").append(jQuery("#"+args.targetID));var closeBind=this.close.bind(this),closeModal=function(event){closeBind(event,modalID)};if(jQuery("#"+modalID+"_close").bind("click",closeModal),args.closeByEscKey){var keydown=this.keydown.bind(this),keydownBind=function(){keydown(event,modalID)};jQuery(document.body).bind("keydown.AXModal",keydownBind)}jQuery(window).unbind("resize.AXModal"),jQuery(window).bind("resize.AXModal",this.onDocResize.bind(this))}},openNew:function(http){this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey(),this.openWindow&&this.openWindow.close(),this.openWindow=window.open("",http.name||this.winID,http.options),this.openWindow.focus(),AXgetId(this.config.windowID)&&jQuery("#"+this.config.windowID).remove();var po=[];po.push("
    "),po.push("
    "),po.push(" "),isNaN(http.pars.length)?jQuery.each(http.pars,function(key,val){po.push(" ")}):jQuery.each(http.pars,function(){jQuery.each(this,function(key,val){po.push(" ")})}),po.push("
    "),po.push("
    "),jQuery(document.body).append(po.join("")),document[this.frmID].submit(),jQuery("#"+this.config.windowID).remove()},keydown:function(event,modalID){event.keyCode==AXUtil.Event.KEY_ESC&&this.close(event,modalID)},close:function(event,modalID){if(this.openWindow&&this.openWindow.close(),event&&void 0==event.type&&(modalID=event),modalID)jQuery("#"+modalID).hide(),mask.close();else if(window[this.winID]){window[this.winID].location.href="about:blank";var windowID=this.config.windowID;setTimeout(function(){jQuery("#"+windowID).remove()},1),mask.close(),this._windowOpend=!1}jQuery(document.body).unbind("keydown.AXModal"),this.config.onclose&&this.config.onclose.call({winID:this.winID,windowID:this.config.windowID,modalID:modalID})},remove:function(){var windowID=this.config.windowID;setTimeout(function(){jQuery("#"+windowID).remove()},1),mask.close(),this._windowOpend=!1},resize:function(){var cfg=this.config,_winID=this.winID;setTimeout(function(){var myIframe=window[_winID],bodyHeight=jQuery(myIframe.document).innerHeight();jQuery(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=jQuery(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),jQuery("#"+_winID).animate({height:bodyHeight},cfg.animateDuration,"cubicInOut"),jQuery("#"+_winID+"_box").animate({height:bodyHeight},cfg.animateDuration,"cubicInOut");try{parent.fcObj.contentResetHeight()}catch(e){}try{parent.fnObj.contentResetHeight(null,bodyHeight+100)}catch(e){}},50)},onDocResize:function(){var cfg=this.config;try{if(cfg.fixedWidth){var maskWidth=jQuery("#"+cfg.windowID).outerWidth(),maskLeft=jQuery(document.body).width()/2-maskWidth/2;0>maskLeft&&(maskLeft=0),jQuery("#"+cfg.windowID).css({left:maskLeft})}else{var maskWidth=jQuery(".container").width()-50;jQuery("#"+cfg.windowID).css({width:maskWidth})}}catch(e){}}}),AXModelControl=Class.create(AXJ,{version:"AXModelControl V0.1",author:"tom@axisj.com",logs:["2013-12-03 오후 5:27:18"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="",this.config.collectSelector="",this.config.subModelDetectClassName="AXModelDetect",this.config.excludeClassName="",this.config.cursorFocus=!1,this.returnJSData={}},init:function(){var cfg=this.config;return Object.isUndefined(cfg.targetID)?void trace("need targetID - setConfig({targetID:''})"):void(this.target=jQuery("#"+cfg.targetID))},collectModelItem:function(){var cfg=this.config,finderCSS="";finderCSS=""!=cfg.collectSelector?cfg.collectSelector:"input[type=text], input[type=hidden], input[type=radio], input[type=checkbox], select, textarea";var getParentSubModel=function(ele){for(var result=!1,checkEle=ele,rooping=!0;rooping;){if(!checkEle.get(0)){rooping=!1;break}if(checkEle.get(0).id==cfg.targetID){rooping=!1;break}if(checkEle.parent().hasClass(cfg.subModelDetectClassName)){result=!0,rooping=!1;break}checkEle=checkEle.parent()}return{result:result,parents:ele.parentsUntil("#"+cfg.targetID)}},collectItem=[],oncursorKeyup=this.oncursorKeyup.bind(this);this.target.find(finderCSS).each(function(){var jQueryObj=axdom(this),getSubModel=getParentSubModel(axdom(this));if(getSubModel.result){jQueryObj.attr("data-axisjModelId",collectItem.length);var relationKey=[];jQuery.each(getSubModel.parents,function(){if(""!=this.id&&this.id.left(cfg.subModelDetectClassName.length)==cfg.subModelDetectClassName){var myKey=this.id.substr(this.id.lastIndexOf("_").number()+1);relationKey.push(myKey)}}),relationKey.push(this.name),collectItem.push({keys:relationKey,jQueryObj:jQueryObj,axisjModelId:collectItem.length,name:this.name,type:this.type})}else{var collectOk=!1;collectOk=""!=cfg.excludeClassName?!jQueryObj.hasClass(cfg.excludeClassName):!0,collectOk&&(jQueryObj.attr("data-axisjModelId",collectItem.length),collectItem.push({keys:[this.name],jQueryObj:jQueryObj,axisjModelId:collectItem.length,name:this.name,type:this.type}))}jQueryObj=null}),this.collectItem=collectItem;var returnJSData={};jQuery.each(this.collectItem,function(itemIndex,item){for(var key,keys=item.keys,targetJS=returnJSData,kidx=0;kidx1?[]:""}}),jQuery.each(this.collectItem,function(){for(var key,keys=this.keys,targetJS=returnJSData,kidx=0;kidx1?targetJS[key].push(nVal):targetJS[key]=nVal}}else"radio"==this.type?AXUtil.isEmpty(nVal)||(targetJS[key]=nVal):Object.isArray(targetJS[key])?targetJS[key][this.keySeq]=nVal:targetJS[key]=nVal}),this.returnJSData=returnJSData,Object.clone(this.returnJSData)},setData:function(jsPathObj,val){if(Object.isString(val)||Object.isArray(val)||Object.isNumber(val))this.applyValue(jsPathObj,val);else{var applyValue=this.applyValue.bind(this),fnApplyValue=function(prefixKey,_val,depth){depth>5||(""!=prefixKey&&(prefixKey+="."),axf.each(_val,function(k,v){Object.isString(v)||Object.isArray(v)||AXUtil.isEmpty(v)||Object.isNumber(v)?applyValue({key:prefixKey+k},v):fnApplyValue(prefixKey+k,v,depth+1)}))};fnApplyValue("",val,0)}return!0},applyValue:function(jsPathObj,val){var cfg=this.config;this.getData();var returnJSData=this.returnJSData;if(jsPathObj.key)try{eval("returnJSData = returnJSData."+jsPathObj.key)}catch(e){trace(e)}if(void 0!=returnJSData)if(Object.isString(val)||Object.isNumber(val)){var findedItem=!1;if(jQuery.each(this.collectItem,function(){if(this.keys.join(".")==jsPathObj.key)if(void 0!=jsPathObj.keySeq){if(jsPathObj.keySeq==this.keySeq)return this.jQueryObj.val(val),findedItem=!0,!1}else{if("radio"!=this.type&&"checkbox"!=this.type)return this.jQueryObj.val(val),findedItem=!0,!1;this.jQueryObj.get(0).value==val?(this.jQueryObj.get(0).checked=!0,findedItem=!0):(this.jQueryObj.get(0).checked=!1,findedItem=!0)}}),!findedItem)return{error:"not found keySeq"}}else if(Object.isArray(val)){var findedItem=!1;if(jQuery.each(this.collectItem,function(){if(this.keys.join(".")==jsPathObj.key)if(void 0!=jsPathObj.keySeq){if(jsPathObj.keySeq==this.keySeq)return this.jQueryObj.val(val.join(",")),findedItem=!0,!1}else if("checkbox"==this.type||"radio"==this.type){var jQueryObj=this.jQueryObj;0==val.length?jQueryObj.get(0).checked=!1:(jQueryObj.get(0).checked=!1,axf.each(val,function(){jQueryObj.get(0).value==this&&(jQueryObj.get(0).checked=!0)})),findedItem=!0}else void 0!=val[this.keySeq]&&(this.jQueryObj.val(val[this.keySeq]),findedItem=!0)}),!findedItem)return{error:"not found keySeq"}}return!0},oncursorKeyup:function(jQueryObj,event,itemIndex){var cfg=this.config;if(!event.ctrlKey&&cfg.oncursor){var axbind=jQueryObj.attr("data-axbind"),htmlTag=jQueryObj.get(0).type,direction="";if(event.keyCode==AXUtil.Event.KEY_UP?direction="U":event.keyCode==AXUtil.Event.KEY_DOWN?direction="D":event.keyCode==AXUtil.Event.KEY_LEFT?direction="L":event.keyCode==AXUtil.Event.KEY_RIGHT?direction="R":event.keyCode==AXUtil.Event.KEY_RETURN&&"select"!=axbind&&"textarea"!=htmlTag&&(direction="E"),cfg.oncursor.call({event:event,direction:direction,itemIndex:itemIndex,jQueryObj:jQueryObj})===!1)return!1;if(""==direction)return;if("U"==direction||"D"==direction||"L"==direction||"R"==direction)return;if("E"==direction&&(event.shiftKey||event.metaKey)){if(0==itemIndex)return void(cfg.oncursorEmpty&&cfg.oncursorEmpty({type:"indexOver",index:-1}));this.blurItem(jQueryObj);for(var nextItemIndex=itemIndex-1,ii=nextItemIndex;ii>-1;ii--)if(!this.collectItem[ii].jQueryObj.get(0).disabled){nextItemIndex=ii;break}this.focusItem(this.collectItem[nextItemIndex].jQueryObj)}else if("E"==direction){if(itemIndex>=this.collectItem.length-1)return void(cfg.oncursorEmpty&&cfg.oncursorEmpty({type:"indexOver",index:1}));this.blurItem(jQueryObj);for(var nextItemIndex=itemIndex+1,ii=nextItemIndex;iifocusIndex&&(focusIndex=0),focusIndex>=this.collectItem.length&&(focusIndex=this.collectItem.length-1)),this.focusItem(this.collectItem[focusIndex].jQueryObj)}}),AXModelControlGrid=Class.create(AXJ,{version:"AXModelControlGrid V1.0",author:"tom@axisj.com",logs:["2013-12-03 오후 5:27:18","2013-12-12 오전 10:25:03"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXModelControlGrid"},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");this.target=jQuery("#"+cfg.targetID);var theme=cfg.theme,ol=[];ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push('
    '),ol.push("
    "),this.target.empty(),this.target.append(ol.join("")),this.gridBody=jQuery("#"+cfg.targetID+"_AX_grid"),this.scrollBody=jQuery("#"+cfg.targetID+"_AX_gridScrollBody"),this.colHead=jQuery("#"+cfg.targetID+"_AX_gridColHead"),this.body=jQuery("#"+cfg.targetID+"_AX_gridBody"),this.setColHead(),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:cfg.targetID+"_AX_grid",scrollID:cfg.targetID+"_AX_gridScrollBody",touchDirection:!1,yscroll:!1,xscroll:!0}),jQuery(window).bind("resize",this.windowResize.bind(this))},windowResizeApply:function(){var cfg=this.config,bodyWidth=this.gridBody.width()-2,colWidth=0,astricCount=0;jQuery.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++),colWidth+=(CG._owidth||0).number()}),this.colWidth=colWidth;var newColWidth=0;if(bodyWidth>colWidth+100*astricCount){var remainsWidth=bodyWidth-colWidth;jQuery.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=remainsWidth/astricCount,CG.width=CG._owidth,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()})}else jQuery.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=200,CG.width=200,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()});this.colWidth=newColWidth,jQuery.each(cfg.colGroup,function(cidx){axdom("#"+cfg.targetID+"_AX_col_AX_"+cidx+"_AX_head").attr("width",this.width),axdom("#"+cfg.targetID+"_AX_col_AX_"+cidx+"_AX_body").attr("width",this.width)}),this.scrollBody.css({width:this.colWidth}),this.colHead.find("table").css({width:this.colWidth}),this.body.find("table").css({width:this.colWidth}),this.myUIScroll.resizeScroll(),this.myUIScroll.moveTo(0)},getColGroup:function(subfix){var cfg=this.config,po=[];return po.push(""),jQuery.each(cfg.colGroup,function(cidx,CG){po.push('')}),po.push(""),po.join("")},getHeadItem:function(arg){var po=(this.config,[]);if(po.push(''),po.push('
    '),arg.html){var html=arg.html.call({rowIndex:arg.rowIndex,colIndex:arg.colIndex,data:arg.data});po.push(html)}else po.push(arg.label);return po.push("
    "),po.push(""),po.join("")},setColHead:function(rewrite){var cfg=this.config,bodyWidth=this.gridBody.width()-2,colWidth=0,astricCount=0;jQuery.each(cfg.colGroup,function(cidx,CG){rewrite?CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++):("*"==CG.width&&(CG.width=0,CG.widthAstric=!0,astricCount++),CG._owidth=CG.width),colWidth+=(CG._owidth||0).number()}),this.colWidth=colWidth;var newColWidth=0;if(bodyWidth>colWidth+100*astricCount){var remainsWidth=bodyWidth-colWidth;jQuery.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=remainsWidth/astricCount,CG.width=CG._owidth,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()})}else jQuery.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=200,CG.width=200,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()});this.colWidth=newColWidth,this.scrollBody.css({width:this.colWidth});var getHeadItem=this.getHeadItem.bind(this),po=[];po.push(''),po.push(this.getColGroup("head")),po.push(""),po.push("");var colCount=0;jQuery.each(cfg.colGroup,function(CHidx,CH){po.push(getHeadItem({rowIndex:0,colIndex:CHidx,align:CH.align,label:CH.label,html:CH.html,data:CH.data})),colCount+=CH.colspan}),po.push(""),po.push(""),po.push("
    "),this.colHead.empty(),this.colHead.append(po.join(""))},setList:function(list){this.config;this.list=list,this.printList(),this.myUIScroll.resizeScroll()},appendList:function(item){this.config;this.list.push(item);var lidx=this.list.length-1;this.printItem(lidx,this.list[lidx]),this.printFootItem(),this.myUIScroll.resizeScroll()},getItem:function(arg,update){var po=(this.config,[]);if(void 0==update&&po.push(''),po.push('
    '),arg.html){var html=arg.html.call({rowIndex:arg.rowIndex,colIndex:arg.colIndex,data:arg.data,item:this.list[arg.rowIndex],list:this.list});po.push(html)}else po.push(" ");return po.push("
    "),void 0==update&&po.push(""),po.join("")},printList:function(){var printItem=(this.config,this.printItem.bind(this)),po=[];po.push(''),po.push(this.getColGroup("body")),po.push(""),po.push(""),po.push(""),po.push(""),po.push("
    "),this.body.empty(),this.body.append(po.join("")),jQuery.each(this.list,function(lidx,L){printItem(lidx,L)}),this.printFootItem()},printItem:function(lidx,L,update){var cfg=this.config,getItem=this.getItem.bind(this),AXbindOnchange=this.AXbindOnchange.bind(this),_body=this.body.find("tbody"),tr=[];void 0==update&&tr.push(""),jQuery.each(cfg.body.form,function(fidx,form){tr.push(getItem({rowIndex:lidx,colIndex:fidx,align:form.align,html:form.html,data:form.data}))}),void 0==update&&tr.push(""),void 0==update?_body.append(tr.join()):_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).html(tr.join(""));var oncursorKeyup=this.oncursorKeyup.bind(this);jQuery.each(cfg.body.form,function(fidx,form){if(form.AXBind){var bindID=form.AXBind.id.replace(/@rowIndex/g,lidx),myConfig=AXUtil.copyObject(form.AXBind.config);jQuery.each(myConfig,function(k,v){Object.isString(v)&&(myConfig[k]=v.replace(/@rowIndex/g,lidx))}),myConfig.onchange=function(){AXbindOnchange(lidx,fidx,this)},"TwinDate"==form.AXBind.type?jQuery("#"+bindID).bindTwinDate(myConfig):"Date"==form.AXBind.type?jQuery("#"+bindID).bindDate(myConfig):"Select"==form.AXBind.type?(jQuery("#"+bindID).unbindSelect(),jQuery("#"+bindID).bindSelect(myConfig),cfg.cursorFocus&&jQuery("#"+bindID).bindSelectGetAnchorObject().bind("keydown.AXModelControlGrid",function(event){setTimeout(function(){oncursorKeyup(jQuery("#"+bindID),event,lidx)},10)})):"Selector"==form.AXBind.type?jQuery("#"+bindID).bindSelector(myConfig):"Money"==form.AXBind.type&&jQuery("#"+bindID).bindMoney(myConfig)}}),cfg.cursorFocus&&_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("keydown.AXModelControlGrid").bind("keydown.AXModelControlGrid",function(event){setTimeout(function(){oncursorKeyup(jQuery(event.target),event,lidx)},10)});var printFootItem=this.printFootItem.bind(this),_this=this;_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("change.AXModelControlGrid").bind("change.AXModelControlGrid",function(){_this.list[lidx][this.name]=axdom(this).val(),printFootItem()})},oncursorKeyup:function(jQueryObj,event,lidx){var cfg=this.config;if(event.target&&!(event.shiftKey||event.metaKey||event.ctrlKey)){var eventName=jQueryObj.get(0).name;if(cfg.oncursor){var axbind=jQueryObj.attr("data-axbind"),direction="";if(event.keyCode==AXUtil.Event.KEY_UP?direction="U":event.keyCode==AXUtil.Event.KEY_DOWN?direction="D":event.keyCode==AXUtil.Event.KEY_LEFT?direction="L":event.keyCode==AXUtil.Event.KEY_RIGHT?direction="R":event.keyCode==AXUtil.Event.KEY_RETURN&&"select"!=axbind&&(direction="R"),cfg.oncursor.call({event:event,direction:direction,listIndex:lidx,jQueryObj:jQueryObj})===!1)return!1;if(""==direction)return;if(axbind&&("U"==direction||"D"==direction))return;if(("U"==direction||"D"==direction)&&"SELECT"==jQueryObj.get(0).tagName)return;if("U"==direction){if(0==lidx)return;this.blurItem(jQueryObj);var findItem,nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx-1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");nextItemList.each(function(){this.name==eventName&&(findItem=this)}),this.focusItem(jQuery(findItem))}else if("D"==direction){if(lidx>=this.list.length-1)return;this.blurItem(jQueryObj);var findItem,nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx+1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");nextItemList.each(function(){this.name==eventName&&(findItem=this)}),this.focusItem(jQuery(findItem))}else if("L"==direction){var colIndex,itemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");if(itemList.each(function(cidx){this.name==eventName&&(colIndex=cidx)}),0==colIndex){if(0==lidx)return;this.blurItem(jQueryObj);var nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx-1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");this.focusItem(jQuery(nextItemList.last()))}else this.blurItem(jQueryObj),this.focusItem(jQuery(itemList[colIndex-1]))}else if("R"==direction){var colIndex,itemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");if(itemList.each(function(cidx){this.name==eventName&&(colIndex=cidx)}),colIndex>=itemList.length-1){if(lidx>=this.list.length-1)return;this.blurItem(jQueryObj);var nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx+1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");this.focusItem(jQuery(nextItemList.first()))}else this.blurItem(jQueryObj),this.focusItem(jQuery(itemList[colIndex+1]))}}}},blurItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind&&("select"==axbind?jQueryObj.bindSelectBlur():"selector"==axbind&&jQueryObj.bindSelectorBlur())},focusItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind?"select"==axbind?jQueryObj.bindSelectFocus():("selector"==axbind,jQueryObj.focus()):jQueryObj.focus()},focusIndex:function(rowIndex,colIndex){var cfg=this.config,myTd=this.body.find("tbody tr#"+cfg.targetID+"_tbodyTR_"+rowIndex+" td:nth-child("+(colIndex+1)+")"),item=myTd.find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").get(0);item.focus()},AXbindOnchange:function(lidx,fidx,AXBindThis){var cfg=this.config;if(cfg.body.form[fidx].AXBind.onchange){var sendObj={rowIndex:lidx,colIndex:fidx,data:cfg.body.form[fidx].data,item:this.list[lidx],list:this.list};axf.each(AXBindThis,function(k,v){sendObj[k]=v}),cfg.body.form[fidx].AXBind.onchange.call(sendObj)}},printFootItem:function(){var cfg=this.config;if(cfg.foot&&cfg.foot.form){var _body=this.body.find("tfoot"),_list=this.list,foot=[];foot.push(""),jQuery.each(cfg.foot.form,function(fidx,arg){if(foot.push(''),foot.push('
    '),arg.html){var html=arg.html.call({rowIndex:0,colIndex:fidx,data:arg.data,list:_list}); -foot.push(html)}else foot.push(" ");foot.push("
    "),foot.push("")}),foot.push(""),_body.empty(),_body.append(foot.join(""))}},updateItem:function(lidx,item,onlyDataChane,event){var cfg=this.config,getItem=this.getItem.bind(this);if(this.list[lidx]=AXUtil.overwriteObject(this.list[lidx],item,!0),onlyDataChane){var _body=this.body;jQuery.each(cfg.body.form,function(fidx,form){if(form.updateReload){var td=getItem({rowIndex:lidx,colIndex:fidx,align:form.align,html:form.html,data:form.data},"update"),myTD=jQuery(_body.find("tbody tr#"+cfg.targetID+"_tbodyTR_"+lidx+" td").get(fidx));myTD.html(td)}});var oncursorKeyup=this.oncursorKeyup.bind(this);cfg.cursorFocus&&_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("keyup.AXModelControlGrid").bind("keyup.AXModelControlGrid",function(event){oncursorKeyup(jQuery(event.target),event,lidx)})}else this.printItem(lidx,this.list[lidx],"update",event);this.printFootItem()},removeItem:function(collectIdx){var newList=(this.config,[]);axf.each(this.list,function(lidx,L){if(Object.isArray(collectIdx)){var isOk=!0;axf.each(collectIdx,function(){this==lidx&&(isOk=!1)}),isOk&&newList.push(L)}else collectIdx!=lidx&&newList.push(L)}),this.setList(newList)},getValue:function(name){var returnValues=(this.config,[]);return this.body.find("input[type=checkbox][name="+name+"]").each(function(){returnValues.push(this.value)}),returnValues},getCheckedValue:function(name){var returnValues=(this.config,[]);return this.body.find("input[type=checkbox][name="+name+"]:checked").each(function(){returnValues.push(this.value)}),returnValues},getList:function(){var cfg=this.config,_body=this.body.find("tbody");return axf.each(this.list,function(lidx,L){var item={};_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],select,textarea").each(function(){item[this.name]=axdom(this).val()});var checkNames={};_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=checkbox],input[type=radio]").each(function(){"checkbox"==this.type&&(checkNames[this.name]?checkNames[this.name].count+=1:(checkNames[this.name]={name:this.name,count:1},item[this.name]="")),this.checked&&("checkbox"==this.type?item[this.name]?item[this.name].push(this.value):item[this.name]=[this.value]:item[this.name]=this.value)}),jQuery.each(checkNames,function(k,v){1==v.count&&Object.isArray(item[v.name])&&(item[v.name]=item[v.name].join(","))}),L=AXUtil.overwriteObject(L,item,!0)}),this.list}}),AXMultiSelector=Class.create(AXJ,{version:"AXMultiSelector v1.21",author:"tom@axisj.com",logs:["2013-08-01 오후 3:08:07","2014-03-21 오후 2:19:52 : tom multiselect 기본값 설정 함수 추가"],initialize:function(AXJ_super){AXJ_super()},init:function(){var cfg=this.config;jQuery("#"+cfg.targetID).bind("click",this.expandOptionBox.bind(this))},expandOptionBox:function(){var cfg=this.config;jQuery.each(cfg.optionGroup,function(gidx,G){G.getOptionValue&&jQuery.each(cfg.optionGroup[gidx].options,function(oidx){cfg.optionGroup[gidx].options[oidx].selected=!1})});var po=[];po.push('
    ');var boxWidth=0;jQuery.each(cfg.optionGroup,function(gidx){po.push('
    '),po.push('
    '),jQuery.each(this.options,function(index,O){var selectedClass=O.selected?" on":"";po.push(''+O.optionText+"")}),po.push("
    "),po.push("
    "),boxWidth+=this.width+2}),po.push('
    '),po.push('
    '),po.push(' '),po.push(' '),po.push("
    "),po.push("
    "),axdom(document.body).append(po.join("")),boxWidth=boxWidth+5*cfg.optionGroup.length+5,jQuery("#"+cfg.targetID+"_AX_expandBox").css({width:boxWidth});var css={},offset=jQuery("#"+cfg.targetID).offset();css.top=offset.top,css.left=offset.left,jQuery("#"+cfg.targetID+"_AX_expandBox").css(css),jQuery.each(cfg.optionGroup,function(gidx,G){G.myUIScroll=new AXScroll,G.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_expandScrollBox_AX_"+gidx,scrollID:cfg.targetID+"_AX_expandScroll_AX_"+gidx,touchDirection:!1});var selectedValue="";G.getOptionValue&&(selectedValue=G.getOptionValue.call(G)),jQuery.each(cfg.optionGroup[gidx].options,function(oidx,O){G.getOptionValue?O.optionValue==selectedValue&&(O.selected=!0,axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).addClass("on"),G.myUIScroll.focusElement(cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx)):O.selected?(O.selected=!0,axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).addClass("on"),G.myUIScroll.focusElement(cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx)):cfg.optionGroup[gidx].options[oidx].selected=!1})}),jQuery("#"+cfg.targetID+"_AX_expandScrollBox_AX_confirm").bind("click",function(){if(cfg.onChange){var selectObj={};jQuery.each(cfg.optionGroup,function(gidx,G){selectObj[G.name]={},jQuery.each(cfg.optionGroup[gidx].options,function(oidx,O){O.selected&&(selectObj[G.name]=O)})}),cfg.onChange.call(selectObj)}jQuery("#"+cfg.targetID+"_AX_expandBox").remove()}),jQuery("#"+cfg.targetID+"_AX_expandScrollBox_AX_cancel").bind("click",function(){jQuery("#"+cfg.targetID+"_AX_expandBox").remove()}),jQuery("#"+cfg.targetID+"_AX_expandBox").find(".bindSelectorNodes").bind("click",function(event){var idx=event.target.id.split(/_AX_/g),gidx=idx[idx.length-3],index=idx[idx.length-1];jQuery("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+index).addClass("on"),jQuery.each(cfg.optionGroup[gidx].options,function(oidx,O){O.selected&&(jQuery("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).removeClass("on"),delete O.selected)}),cfg.optionGroup[gidx].options[index].selected=!0})},setValue:function(obj){var cfg=this.config;jQuery.each(cfg.optionGroup,function(gidx,G){jQuery.each(obj,function(k,v){G.name==k&&jQuery.each(G.options,function(){this.optionValue+""==v+""?this.selected=!0:delete this.selected})})})}}),AXProgress=Class.create(AXJ,{version:"AXProgress v1.1",author:"tom@axisj.com",logs:["2012-12-19 오후 5:47:58","2014-02-03 오후 9:29:34 : tom count 표시문제 해결"],initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.config.duration=50,this.config.theme="AXlineProgress"},init:function(){},start:function(callBack,options){var config=this.config;config.callBack=callBack,config.options=options;var totalCount=config.totalCount||100;this.loadedCount=0;var loadedCount=this.loadedCount,loadedRate=(loadedCount/totalCount*100).round(1),progressWidth=config.width||200,progressTitle=config.title||"",progressTop=config.top||0;this.progressID="progress_AX_"+AXUtil.timekey();var progressID=this.progressID;this.progressStop=!1;var theme=config.theme,hasCancel=!1;config.options&&(config.options.totalCount&&(totalCount=config.options.totalCount),config.options.width&&(progressWidth=config.options.width),config.options.top&&(progressTop=config.options.top),config.options.title&&(progressTitle=config.options.title),config.options.cancel&&(hasCancel=config.options.cancel),config.options.theme&&(theme=config.options.theme));var po=[];po.push('
    '),""!=progressTitle&&po.push('
    '+progressTitle+"
    "),po.push('
    '),po.push('
    '),po.push("AXlineProgress"==theme?'
    ':'
    '),po.push("
    "),po.push('
    '+loadedRate+"%
    "),hasCancel&&po.push(' Cancel'),po.push("
    "),po.push("
    "),this.progress=jQuery(po.join("")),jQuery(document.body).append(this.progress),jQuery("#"+progressID+"_AX_cancel").bind("click",this.cancel.bind(this)),this.loadedCount=1,this.update()},update:function(){var config=this.config,theme=config.theme;if(!this.progressStop){var totalCount=config.totalCount||100;config.options&&(config.options.totalCount&&(totalCount=config.options.totalCount),config.options.theme&&(theme=config.options.theme));var loadedCount=this.loadedCount,progressID=this.progressID,loadedRate=((loadedCount-1)/totalCount.number()*100).round(1);loadedRate>100&&(loadedRate=100),jQuery("#"+progressID+"_AX_loadedText").html(loadedRate+"%"+(loadedCount-1).money()+"/"+totalCount.money()+""),"AXlineProgress"==theme?jQuery("#"+progressID+"_AX_bar").animate({width:loadedRate+"%"},config.duration,"",function(){config.callBack&&config.callBack.call({totalCount:totalCount,loadedCount:loadedCount,loadedRate:(loadedCount/(totalCount.number()+1)*100).round(1),isEnd:loadedCount-1==totalCount})}):setTimeout(function(){jQuery("#"+progressID+"_AX_bar").addClass("percent"+5*((loadedCount/totalCount.number()*100).round(0)/5).round()),config.callBack&&config.callBack.call({totalCount:totalCount,loadedCount:loadedCount-1,loadedRate:(loadedCount/(totalCount.number()+1)*100).round(1),isEnd:loadedCount-1==totalCount})},config.duration),this.loadedCount++}},cancel:function(){var config=this.config,cancelMSg=(this.progressID,AXConfig.AXProgress.cancelMsg);if(config.options){var cancel=config.options.cancel;if(cancel.confirmMsg&&(cancelMSg=cancel.confirmMsg),confirm(cancelMSg)){this.progressStop=!0;var totalCount=config.totalCount||100,loadedCount=this.loadedCount;cancel.oncancel.call({totalCount:totalCount,loadedCount:loadedCount,loadedRate:(loadedCount/totalCount*100).round(1),isEnd:loadedCount==totalCount})}}},restart:function(){this.progressStop=!1,this.update()},close:function(){var progressID=(this.config,this.progressID);jQuery("#"+progressID+"_AX_tray").remove()}}),AXSearch=Class.create(AXJ,{version:"AXSearch V1.21",author:"tom@axisj.com",logs:["2013-06-04 오후 2:00:44 - tom@axisj.com","2013-07-29 오전 9:35:19 - expandToggle 버그픽스 - tom","2013-09-16 오후 9:59:52 - inputBox 의 경우 엔터 작동 - tom","2013-11-12 오후 6:13:03 - tom : setItemValue bugFix","2013-12-27 오후 4:55:15 - tom : Checkbox, radio onchange 버그픽스"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXSearch"},init:function(){var cfg=this.config;return Object.isUndefined(cfg.targetID)?void trace("need targetID - setConfig({targetID:''})"):void this.setBody()},getItem:function(gr,itemIndex,item){var cfg=this.config,po=[],itemAddClass=[],itemAddStyles=[];if(item.addClass&&itemAddClass.push(item.addClass),item.style&&itemAddStyles.push(item.style),"label"==item.type)po.push('
    '),po.push(item.value),po.push("
    ");else if("link"==item.type)po.push('");else if("checkBox"==item.type){po.push('
    '),po.push(''),po.push(" "),po.push(" "),item.label&&po.push(' "),po.push(' "),po.push(" "),po.push(" "),po.push("
    ',item.label,"');var values=item.value.split(/,/g);jQuery.each(item.options,function(idx,Opt){var isCheck=!1;jQuery.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),po.push('"),po.push('")}),po.push("
    "),po.push("
    ")}else if("radioBox"==item.type){po.push('
    '),po.push(''),po.push(" "),po.push(" "),item.label&&po.push(' "),po.push(' "),po.push(" "),po.push(" "),po.push("
    ',item.label,"');var values=item.value.split(/,/g);jQuery.each(item.options,function(idx,Opt){var isCheck=!1;jQuery.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),po.push('"),po.push('")}),po.push("
    "),po.push("
    ")}else if("selectBox"==item.type){po.push('
    '),po.push(''),po.push(" "),po.push(" "),item.label&&po.push(' "),po.push(' "),po.push(" "),po.push(" "),po.push("
    ',item.label,"');var selectWidth=item.width?item.width+"px":"auto";po.push(' "),po.push("
    "),po.push("
    ")}else if("inputText"==item.type){po.push('
    '),po.push(''),po.push(" "),po.push(" "),item.label?po.push(' "):item.labelWidth=0,po.push(' "),po.push(" "),po.push(" "),po.push("
    ',item.label,"');var inputWidth=(item.width||100).number();po.push(' '),po.push("
    "),po.push("
    ")}else if("hidden"==item.type)po.push('');else if("button"==item.type||"submit"==item.type){po.push('
    '),po.push(''),po.push(" "),po.push(" "),item.label?po.push(' "):item.labelWidth=0,po.push(' "),po.push(" "),po.push(" "),po.push("
    ',item.label,"');var inputWidth=(item.width||100).number();po.push(' '),po.push("
    "),po.push("
    ")}return po.join("")},setBody:function(){var cfg=this.config,getItem=this.getItem.bind(this),po=[],AXBinds=[];po.push('
    '),po.push('
    ');for(var gr=0,hasHide=!1;gr'),jQuery.each(cfg.rows[gr].list,function(itemIndex,item){po.push(getItem(gr,itemIndex,item)),item.AXBind&&AXBinds.push({display:cfg.rows[gr].display,gr:gr,itemIndex:itemIndex,item:item})}),po.push('
    '),po.push("
    "),gr++}hasHide&&(po.push(''),po.push("상세검색"),po.push("")),po.push(""),po.push("
    "),jQuery("#"+cfg.targetID).html(po.join("")),cfg.onsubmit&&(document[cfg.targetID+"_AX_form"].onsubmit=function(){return cfg.onsubmit(),!1}),jQuery("#"+cfg.targetID+"_AX_expandHandle").bind("click",this.expandToggle.bind(this)),jQuery("#"+cfg.targetID).find(".searchLinkItem").bind("click",this.onclickLinkItem.bind(this)),jQuery("#"+cfg.targetID).find(".searchCheckboxItem").bind("click",this.onclickCheckboxItem.bind(this)),jQuery("#"+cfg.targetID).find(".searchSelectboxItem").bind("change",this.onChangeSelect.bind(this)),jQuery("#"+cfg.targetID).find(".searchInputTextItem").bind("change",this.onChangeInput.bind(this)),jQuery("#"+cfg.targetID).find(".searchButtonItem").bind("click",this.onclickButton.bind(this)),this.AXBinds=AXBinds;var _this=this;setTimeout(function(){_this.AXBindItems()},100)},AXBindItems:function(){var cfg=this.config;jQuery.each(this.AXBinds,function(){var gr=this.gr,itemIndex=this.itemIndex,item=this.item,display=this.display,itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key;if(display)if("selector"==item.AXBind.type)jQuery("#"+itemID).bindSelector(item.AXBind.config);else if("select"==item.AXBind.type)jQuery("#"+itemID).bindSelect(item.AXBind.config);else if("date"==item.AXBind.type)jQuery("#"+itemID).bindDate(item.AXBind.config);else if("twinDate"==item.AXBind.type){var startTargetID=item.AXBind.config.startTargetID,findItemID="";jQuery.each(cfg.rows,function(gidx){jQuery.each(this.list,function(itemIndex,item){item.key==startTargetID&&(findItemID=cfg.targetID+"_AX_"+gidx+"_AX_"+itemIndex+"_AX_"+item.key)})}),item.AXBind.config.startTargetID=findItemID,jQuery("#"+itemID).bindTwinDate(item.AXBind.config)}})},expandToggle:function(){var cfg=this.config;this.expanded?(jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색"),jQuery("#"+cfg.targetID).find(".expandGroup").hide(),this.expanded=!1):(jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색창 닫기"),jQuery("#"+cfg.targetID).find(".expandGroup").show(),this.expanded=!0,jQuery.each(this.AXBinds,function(){var gr=this.gr,itemIndex=this.itemIndex,item=this.item,display=this.display,itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key;if(!display)if("selector"==item.AXBind.type)jQuery("#"+itemID).bindSelector(item.AXBind.config);else if("select"==item.AXBind.type)jQuery("#"+itemID).bindSelect(item.AXBind.config);else if("date"==item.AXBind.type)jQuery("#"+itemID).bindDate(item.AXBind.config);else if("twinDate"==item.AXBind.type){var startTargetID=item.AXBind.config.startTargetID.split(/_AX_/g).last(),findItemID="";jQuery.each(cfg.rows,function(gidx){jQuery.each(this.list,function(itemIndex,item){item.key==startTargetID&&(findItemID=cfg.targetID+"_AX_"+gidx+"_AX_"+itemIndex+"_AX_"+item.key)})}),item.AXBind.config.startTargetID=findItemID,jQuery("#"+itemID).bindTwinDate(item.AXBind.config)}}))},onclickLinkItem:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),index=ids.pop(),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],targetID="";jQuery.each(ids,function(ii){ii>0&&(targetID+="_AX_"),targetID+=this}),void 0!=item.selectedIndex&&jQuery("#"+targetID+"_AX_"+item.selectedIndex).removeClass("on"),item.selectedIndex=index,item.value=item.options[index].optionValue,jQuery("#"+targetID+"_AX_"+index).addClass("on"),jQuery("#"+targetID).val(item.options[index].optionValue),item.onChange&&item.onChange.call(item,item.options[index],item.options[index].optionValue)},onclickCheckboxItem:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),index=ids.pop(),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],selectedValue="";if(isNaN(frm[item.key].length))frm[item.key].checked&&(selectedValue=frm[item.key].value);else for(var i=0;i