From 6c4cad17cfb2e4e206806e557b1fe9a85aeb0cd0 Mon Sep 17 00:00:00 2001 From: ThomasJ Date: Mon, 19 May 2014 11:42:24 +0900 Subject: [PATCH 1/7] =?UTF-8?q?font-awesome=20=EA=B2=BD=EB=A1=9C=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/arongi/font-awesome.css | 4 ++-- ui/arongi/font-awesome.min.css | 2 +- ui/bulldog/font-awesome.css | 4 ++-- ui/bulldog/font-awesome.min.css | 2 +- ui/cocker/font-awesome.css | 4 ++-- ui/cocker/font-awesome.min.css | 2 +- ui/flybasket/font-awesome.css | 4 ++-- ui/flybasket/font-awesome.min.css | 2 +- ui/kakao/font-awesome.css | 4 ++-- ui/kakao/font-awesome.min.css | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ui/arongi/font-awesome.css b/ui/arongi/font-awesome.css index 8093b101..be7e15cb 100644 --- a/ui/arongi/font-awesome.css +++ b/ui/arongi/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3'); - src: url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); + src: url('fonts/fontawesome-webfont.eot?v=4.0.3'); + src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/ui/arongi/font-awesome.min.css b/ui/arongi/font-awesome.min.css index 8403e263..5c959c23 100644 --- a/ui/arongi/font-awesome.min.css +++ b/ui/arongi/font-awesome.min.css @@ -1,4 +1,4 @@ /*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/ui/bulldog/font-awesome.css b/ui/bulldog/font-awesome.css index 8093b101..be7e15cb 100644 --- a/ui/bulldog/font-awesome.css +++ b/ui/bulldog/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3'); - src: url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); + src: url('fonts/fontawesome-webfont.eot?v=4.0.3'); + src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/ui/bulldog/font-awesome.min.css b/ui/bulldog/font-awesome.min.css index 8403e263..5c959c23 100644 --- a/ui/bulldog/font-awesome.min.css +++ b/ui/bulldog/font-awesome.min.css @@ -1,4 +1,4 @@ /*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/ui/cocker/font-awesome.css b/ui/cocker/font-awesome.css index 8093b101..be7e15cb 100644 --- a/ui/cocker/font-awesome.css +++ b/ui/cocker/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3'); - src: url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); + src: url('fonts/fontawesome-webfont.eot?v=4.0.3'); + src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/ui/cocker/font-awesome.min.css b/ui/cocker/font-awesome.min.css index 8403e263..5c959c23 100644 --- a/ui/cocker/font-awesome.min.css +++ b/ui/cocker/font-awesome.min.css @@ -1,4 +1,4 @@ /*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/ui/flybasket/font-awesome.css b/ui/flybasket/font-awesome.css index 8093b101..be7e15cb 100644 --- a/ui/flybasket/font-awesome.css +++ b/ui/flybasket/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3'); - src: url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); + src: url('fonts/fontawesome-webfont.eot?v=4.0.3'); + src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/ui/flybasket/font-awesome.min.css b/ui/flybasket/font-awesome.min.css index 8403e263..5c959c23 100644 --- a/ui/flybasket/font-awesome.min.css +++ b/ui/flybasket/font-awesome.min.css @@ -1,4 +1,4 @@ /*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/ui/kakao/font-awesome.css b/ui/kakao/font-awesome.css index 8093b101..be7e15cb 100644 --- a/ui/kakao/font-awesome.css +++ b/ui/kakao/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3'); - src: url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); + src: url('fonts/fontawesome-webfont.eot?v=4.0.3'); + src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/ui/kakao/font-awesome.min.css b/ui/kakao/font-awesome.min.css index 8403e263..5c959c23 100644 --- a/ui/kakao/font-awesome.min.css +++ b/ui/kakao/font-awesome.min.css @@ -1,4 +1,4 @@ /*! * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../arongi/fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../arongi/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../arongi/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../arongi/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../arongi/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file From 8eaff0520d00ca4e6e44f5b935ed70d19196a607 Mon Sep 17 00:00:00 2001 From: ThomasJ Date: Mon, 19 May 2014 11:54:46 +0900 Subject: [PATCH 2/7] editor sample code AXDomRange --- samples/AXEditor/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/AXEditor/index.html b/samples/AXEditor/index.html index 04245b87..9475d372 100644 --- a/samples/AXEditor/index.html +++ b/samples/AXEditor/index.html @@ -37,6 +37,7 @@ + From 6447b472a6c4c9716e1bf12339cac62a455dfa8b Mon Sep 17 00:00:00 2001 From: ThomasJ Date: Mon, 19 May 2014 14:29:25 +0900 Subject: [PATCH 3/7] install Gruntjs & make minified files dist/AXJ.min.js ui/arongi/AXJ.min.css ui/bulldog/AXJ.min.css ui/cocker/AXJ.min.css ui/flybasket/AXJ.min.css ui/kakao/AXJ.min.css --- Gruntfile.js | 81 + dist/AXJ.all.js | 33328 ++++++++++++++++ dist/AXJ.min.js | 26 + lib/AXCodeArea.js | 137 - lib/AXCodeView.js | 171 - lib/AX_angular.js | 25 - lib/gridEasy.js | 174 - lib/import.js | 16 - node_modules/.bin/bower | 1 + node_modules/grunt-contrib-concat/LICENSE-MIT | 22 + node_modules/grunt-contrib-concat/README.md | 280 + .../node_modules/chalk/index.js | 63 + .../chalk/node_modules/.bin/strip-ansi | 1 + .../node_modules/ansi-styles/ansi-styles.js | 38 + .../node_modules/ansi-styles/package.json | 58 + .../chalk/node_modules/ansi-styles/readme.md | 65 + .../chalk/node_modules/has-color/index.js | 32 + .../chalk/node_modules/has-color/package.json | 54 + .../chalk/node_modules/has-color/readme.md | 30 + .../chalk/node_modules/strip-ansi/cli.js | 27 + .../chalk/node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi/package.json | 64 + .../chalk/node_modules/strip-ansi/readme.md | 46 + .../node_modules/chalk/package.json | 61 + .../node_modules/chalk/readme.md | 158 + .../grunt-contrib-concat/package.json | 57 + .../grunt-contrib-concat/tasks/concat.js | 70 + .../grunt-contrib-concat/tasks/lib/comment.js | 34 + node_modules/grunt-contrib-cssmin/LICENSE-MIT | 22 + node_modules/grunt-contrib-cssmin/README.md | 119 + .../node_modules/.bin/cleancss | 1 + .../node_modules/chalk/index.js | 63 + .../chalk/node_modules/.bin/strip-ansi | 1 + .../node_modules/ansi-styles/ansi-styles.js | 38 + .../node_modules/ansi-styles/package.json | 58 + .../chalk/node_modules/ansi-styles/readme.md | 65 + .../chalk/node_modules/has-color/index.js | 32 + .../chalk/node_modules/has-color/package.json | 54 + .../chalk/node_modules/has-color/readme.md | 30 + .../chalk/node_modules/strip-ansi/cli.js | 27 + .../chalk/node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi/package.json | 64 + .../chalk/node_modules/strip-ansi/readme.md | 46 + .../node_modules/chalk/package.json | 61 + .../node_modules/chalk/readme.md | 158 + .../node_modules/clean-css/History.md | 446 + .../node_modules/clean-css/LICENSE | 19 + .../node_modules/clean-css/README.md | 210 + .../node_modules/clean-css/bin/cleancss | 147 + .../node_modules/clean-css/index.js | 1 + .../node_modules/clean-css/lib/clean.js | 405 + .../clean-css/lib/colors/hsl-to-hex.js | 64 + .../clean-css/lib/colors/long-to-short-hex.js | 12 + .../clean-css/lib/colors/rgb-to-hex.js | 14 + .../clean-css/lib/colors/shortener.js | 174 + .../clean-css/lib/images/url-rebase.js | 32 + .../clean-css/lib/images/url-rewriter.js | 57 + .../clean-css/lib/imports/inliner.js | 308 + .../clean-css/lib/properties/optimizer.js | 244 + .../lib/properties/shorthand-notations.js | 50 + .../clean-css/lib/selectors/empty-removal.js | 30 + .../clean-css/lib/selectors/optimizer.js | 299 + .../clean-css/lib/selectors/tokenizer.js | 169 + .../clean-css/lib/text/comments.js | 59 + .../clean-css/lib/text/escape-store.js | 32 + .../clean-css/lib/text/expressions.js | 69 + .../node_modules/clean-css/lib/text/free.js | 76 + .../node_modules/clean-css/lib/text/urls.js | 41 + .../node_modules/commander/Readme.md | 195 + .../clean-css/node_modules/commander/index.js | 851 + .../node_modules/commander/package.json | 45 + .../node_modules/clean-css/package.json | 78 + .../node_modules/maxmin/index.js | 22 + .../maxmin/node_modules/.bin/gzip-size | 1 + .../maxmin/node_modules/.bin/pretty-bytes | 1 + .../maxmin/node_modules/gzip-size/cli.js | 38 + .../maxmin/node_modules/gzip-size/index.js | 21 + .../node_modules/concat-stream/.npmignore | 1 + .../node_modules/concat-stream/LICENSE | 24 + .../node_modules/concat-stream/index.js | 133 + .../node_modules/inherits/LICENSE | 16 + .../node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 33 + .../node_modules/inherits/test.js | 25 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 944 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 472 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 35 + .../node_modules/core-util-is/util.js | 106 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 36 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 200 + .../node_modules/string_decoder/package.json | 32 + .../node_modules/readable-stream/package.json | 44 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/typedarray/.travis.yml | 4 + .../node_modules/typedarray/LICENSE | 35 + .../node_modules/typedarray/example/tarray.js | 4 + .../node_modules/typedarray/index.js | 630 + .../node_modules/typedarray/package.json | 62 + .../node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + .../node_modules/typedarray/test/tarray.js | 10 + .../node_modules/concat-stream/package.json | 59 + .../node_modules/concat-stream/readme.md | 72 + .../node_modules/concat-stream/test/array.js | 12 + .../node_modules/concat-stream/test/buffer.js | 31 + .../node_modules/concat-stream/test/infer.js | 14 + .../concat-stream/test/nothing.js | 25 + .../concat-stream/test/objects.js | 29 + .../concat-stream/test/server/ls.js | 16 + .../node_modules/concat-stream/test/string.js | 64 + .../concat-stream/test/typedarray.js | 33 + .../node_modules/zlib-browserify/.npmignore | 1 + .../node_modules/zlib-browserify/.travis.yml | 7 + .../node_modules/zlib-browserify/LICENSE | 21 + .../node_modules/zlib-browserify/index.js | 43 + .../node_modules/tape/.npmignore | 1 + .../node_modules/tape/.travis.yml | 4 + .../zlib-browserify/node_modules/tape/LICENSE | 18 + .../node_modules/tape/example/array.js | 35 + .../node_modules/tape/example/fail.js | 35 + .../node_modules/tape/example/nested.js | 51 + .../node_modules/tape/example/nested_fail.js | 51 + .../node_modules/tape/example/not_enough.js | 35 + .../node_modules/tape/example/static/build.sh | 2 + .../tape/example/static/index.html | 21 + .../tape/example/static/server.js | 4 + .../node_modules/tape/example/timing.js | 12 + .../node_modules/tape/example/too_many.js | 35 + .../node_modules/tape/index.js | 124 + .../node_modules/tape/lib/default_stream.js | 30 + .../node_modules/tape/lib/render.js | 100 + .../node_modules/tape/lib/test.js | 342 + .../node_modules/deep-equal/README.markdown | 55 + .../node_modules/deep-equal/example/cmp.js | 11 + .../tape/node_modules/deep-equal/index.js | 84 + .../tape/node_modules/deep-equal/package.json | 43 + .../tape/node_modules/deep-equal/test/cmp.js | 18 + .../tape/node_modules/defined/.travis.yml | 4 + .../tape/node_modules/defined/LICENSE | 18 + .../node_modules/defined/example/defined.js | 4 + .../tape/node_modules/defined/index.js | 5 + .../tape/node_modules/defined/package.json | 44 + .../tape/node_modules/defined/readme.markdown | 51 + .../tape/node_modules/defined/test/def.js | 22 + .../tape/node_modules/jsonify/README.markdown | 34 + .../tape/node_modules/jsonify/index.js | 2 + .../tape/node_modules/jsonify/lib/parse.js | 273 + .../node_modules/jsonify/lib/stringify.js | 154 + .../tape/node_modules/jsonify/package.json | 38 + .../tape/node_modules/jsonify/test/parse.js | 16 + .../node_modules/jsonify/test/stringify.js | 15 + .../node_modules/tape/package.json | 48 + .../node_modules/tape/readme.markdown | 180 + .../node_modules/tape/test/array.js | 68 + .../node_modules/tape/test/child_ordering.js | 51 + .../node_modules/tape/test/exit.js | 108 + .../node_modules/tape/test/exit/fail.js | 35 + .../node_modules/tape/test/exit/ok.js | 35 + .../node_modules/tape/test/exit/too_few.js | 35 + .../node_modules/tape/test/fail.js | 68 + .../node_modules/tape/test/harness.js | 88 + .../node_modules/tape/test/max_listeners.js | 7 + .../tape/test/max_listeners/source.js | 5 + .../node_modules/tape/test/nested.js | 89 + .../node_modules/tape/test/only.js | 48 + .../node_modules/tape/test/order.js | 17 + .../node_modules/tape/test/plan_optional.js | 15 + .../node_modules/tape/test/skip.js | 34 + .../node_modules/tape/test/throw.js | 38 + .../node_modules/tape/test/too_many.js | 69 + .../node_modules/zlib-browserify/package.json | 39 + .../node_modules/zlib-browserify/readme.md | 43 + .../zlib-browserify/test/zlib.test.js | 64 + .../node_modules/zlib-browserify/zlib.js | 54 + .../node_modules/gzip-size/package.json | 55 + .../maxmin/node_modules/gzip-size/readme.md | 84 + .../maxmin/node_modules/pretty-bytes/cli.js | 21 + .../node_modules/pretty-bytes/package.json | 56 + .../node_modules/pretty-bytes/pretty-bytes.js | 40 + .../node_modules/pretty-bytes/readme.md | 53 + .../node_modules/maxmin/package.json | 52 + .../node_modules/maxmin/readme.md | 56 + .../grunt-contrib-cssmin/package.json | 59 + .../grunt-contrib-cssmin/tasks/cssmin.js | 62 + node_modules/grunt-contrib-uglify/LICENSE-MIT | 22 + node_modules/grunt-contrib-uglify/README.md | 416 + .../node_modules/.bin/uglifyjs | 1 + .../node_modules/chalk/index.js | 63 + .../chalk/node_modules/.bin/strip-ansi | 1 + .../node_modules/ansi-styles/ansi-styles.js | 38 + .../node_modules/ansi-styles/package.json | 58 + .../chalk/node_modules/ansi-styles/readme.md | 65 + .../chalk/node_modules/has-color/index.js | 32 + .../chalk/node_modules/has-color/package.json | 54 + .../chalk/node_modules/has-color/readme.md | 30 + .../chalk/node_modules/strip-ansi/cli.js | 27 + .../chalk/node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi/package.json | 64 + .../chalk/node_modules/strip-ansi/readme.md | 46 + .../node_modules/chalk/package.json | 61 + .../node_modules/chalk/readme.md | 158 + .../node_modules/maxmin/index.js | 22 + .../maxmin/node_modules/.bin/gzip-size | 1 + .../maxmin/node_modules/.bin/pretty-bytes | 1 + .../maxmin/node_modules/gzip-size/cli.js | 38 + .../maxmin/node_modules/gzip-size/index.js | 21 + .../node_modules/concat-stream/.npmignore | 1 + .../node_modules/concat-stream/LICENSE | 24 + .../node_modules/concat-stream/index.js | 133 + .../node_modules/inherits/LICENSE | 16 + .../node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 33 + .../node_modules/inherits/test.js | 25 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 944 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 472 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 35 + .../node_modules/core-util-is/util.js | 106 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 36 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 200 + .../node_modules/string_decoder/package.json | 32 + .../node_modules/readable-stream/package.json | 44 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/typedarray/.travis.yml | 4 + .../node_modules/typedarray/LICENSE | 35 + .../node_modules/typedarray/example/tarray.js | 4 + .../node_modules/typedarray/index.js | 630 + .../node_modules/typedarray/package.json | 62 + .../node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + .../node_modules/typedarray/test/tarray.js | 10 + .../node_modules/concat-stream/package.json | 59 + .../node_modules/concat-stream/readme.md | 72 + .../node_modules/concat-stream/test/array.js | 12 + .../node_modules/concat-stream/test/buffer.js | 31 + .../node_modules/concat-stream/test/infer.js | 14 + .../concat-stream/test/nothing.js | 25 + .../concat-stream/test/objects.js | 29 + .../concat-stream/test/server/ls.js | 16 + .../node_modules/concat-stream/test/string.js | 64 + .../concat-stream/test/typedarray.js | 33 + .../node_modules/zlib-browserify/.npmignore | 1 + .../node_modules/zlib-browserify/.travis.yml | 7 + .../node_modules/zlib-browserify/LICENSE | 21 + .../node_modules/zlib-browserify/index.js | 43 + .../node_modules/tape/.npmignore | 1 + .../node_modules/tape/.travis.yml | 4 + .../zlib-browserify/node_modules/tape/LICENSE | 18 + .../node_modules/tape/example/array.js | 35 + .../node_modules/tape/example/fail.js | 35 + .../node_modules/tape/example/nested.js | 51 + .../node_modules/tape/example/nested_fail.js | 51 + .../node_modules/tape/example/not_enough.js | 35 + .../node_modules/tape/example/static/build.sh | 2 + .../tape/example/static/index.html | 21 + .../tape/example/static/server.js | 4 + .../node_modules/tape/example/timing.js | 12 + .../node_modules/tape/example/too_many.js | 35 + .../node_modules/tape/index.js | 124 + .../node_modules/tape/lib/default_stream.js | 30 + .../node_modules/tape/lib/render.js | 100 + .../node_modules/tape/lib/test.js | 342 + .../node_modules/deep-equal/README.markdown | 55 + .../node_modules/deep-equal/example/cmp.js | 11 + .../tape/node_modules/deep-equal/index.js | 84 + .../tape/node_modules/deep-equal/package.json | 43 + .../tape/node_modules/deep-equal/test/cmp.js | 18 + .../tape/node_modules/defined/.travis.yml | 4 + .../tape/node_modules/defined/LICENSE | 18 + .../node_modules/defined/example/defined.js | 4 + .../tape/node_modules/defined/index.js | 5 + .../tape/node_modules/defined/package.json | 44 + .../tape/node_modules/defined/readme.markdown | 51 + .../tape/node_modules/defined/test/def.js | 22 + .../tape/node_modules/jsonify/README.markdown | 34 + .../tape/node_modules/jsonify/index.js | 2 + .../tape/node_modules/jsonify/lib/parse.js | 273 + .../node_modules/jsonify/lib/stringify.js | 154 + .../tape/node_modules/jsonify/package.json | 38 + .../tape/node_modules/jsonify/test/parse.js | 16 + .../node_modules/jsonify/test/stringify.js | 15 + .../node_modules/tape/package.json | 48 + .../node_modules/tape/readme.markdown | 180 + .../node_modules/tape/test/array.js | 68 + .../node_modules/tape/test/child_ordering.js | 51 + .../node_modules/tape/test/exit.js | 108 + .../node_modules/tape/test/exit/fail.js | 35 + .../node_modules/tape/test/exit/ok.js | 35 + .../node_modules/tape/test/exit/too_few.js | 35 + .../node_modules/tape/test/fail.js | 68 + .../node_modules/tape/test/harness.js | 88 + .../node_modules/tape/test/max_listeners.js | 7 + .../tape/test/max_listeners/source.js | 5 + .../node_modules/tape/test/nested.js | 89 + .../node_modules/tape/test/only.js | 48 + .../node_modules/tape/test/order.js | 17 + .../node_modules/tape/test/plan_optional.js | 15 + .../node_modules/tape/test/skip.js | 34 + .../node_modules/tape/test/throw.js | 38 + .../node_modules/tape/test/too_many.js | 69 + .../node_modules/zlib-browserify/package.json | 39 + .../node_modules/zlib-browserify/readme.md | 43 + .../zlib-browserify/test/zlib.test.js | 64 + .../node_modules/zlib-browserify/zlib.js | 54 + .../node_modules/gzip-size/package.json | 55 + .../maxmin/node_modules/gzip-size/readme.md | 84 + .../maxmin/node_modules/pretty-bytes/cli.js | 21 + .../node_modules/pretty-bytes/package.json | 56 + .../node_modules/pretty-bytes/pretty-bytes.js | 40 + .../node_modules/pretty-bytes/readme.md | 53 + .../node_modules/maxmin/package.json | 52 + .../node_modules/maxmin/readme.md | 56 + .../node_modules/uglify-js/.npmignore | 2 + .../node_modules/uglify-js/.travis.yml | 6 + .../node_modules/uglify-js/LICENSE | 29 + .../node_modules/uglify-js/README.md | 640 + .../node_modules/uglify-js/bin/uglifyjs | 458 + .../node_modules/uglify-js/lib/ast.js | 984 + .../node_modules/uglify-js/lib/compress.js | 2374 ++ .../node_modules/uglify-js/lib/mozilla-ast.js | 267 + .../node_modules/uglify-js/lib/output.js | 1300 + .../node_modules/uglify-js/lib/parse.js | 1457 + .../node_modules/uglify-js/lib/scope.js | 567 + .../node_modules/uglify-js/lib/sourcemap.js | 87 + .../node_modules/uglify-js/lib/transform.js | 218 + .../node_modules/uglify-js/lib/utils.js | 302 + .../uglify-js/node_modules/async/LICENSE | 19 + .../uglify-js/node_modules/async/README.md | 1425 + .../node_modules/async/component.json | 11 + .../uglify-js/node_modules/async/lib/async.js | 958 + .../uglify-js/node_modules/async/package.json | 43 + .../node_modules/optimist/.travis.yml | 4 + .../uglify-js/node_modules/optimist/LICENSE | 21 + .../node_modules/optimist/example/bool.js | 10 + .../optimist/example/boolean_double.js | 7 + .../optimist/example/boolean_single.js | 7 + .../optimist/example/default_hash.js | 8 + .../optimist/example/default_singles.js | 7 + .../node_modules/optimist/example/divide.js | 8 + .../optimist/example/line_count.js | 20 + .../optimist/example/line_count_options.js | 29 + .../optimist/example/line_count_wrap.js | 29 + .../node_modules/optimist/example/nonopt.js | 4 + .../node_modules/optimist/example/reflect.js | 2 + .../node_modules/optimist/example/short.js | 3 + .../node_modules/optimist/example/string.js | 11 + .../optimist/example/usage-options.js | 19 + .../node_modules/optimist/example/xup.js | 10 + .../uglify-js/node_modules/optimist/index.js | 478 + .../optimist/node_modules/wordwrap/.npmignore | 1 + .../node_modules/wordwrap/README.markdown | 70 + .../node_modules/wordwrap/example/center.js | 10 + .../node_modules/wordwrap/example/meat.js | 3 + .../optimist/node_modules/wordwrap/index.js | 76 + .../node_modules/wordwrap/package.json | 45 + .../node_modules/wordwrap/test/break.js | 30 + .../node_modules/wordwrap/test/idleness.txt | 63 + .../node_modules/wordwrap/test/wrap.js | 31 + .../node_modules/optimist/package.json | 46 + .../node_modules/optimist/readme.markdown | 487 + .../uglify-js/node_modules/optimist/test/_.js | 71 + .../node_modules/optimist/test/_/argv.js | 2 + .../node_modules/optimist/test/_/bin.js | 3 + .../node_modules/optimist/test/parse.js | 446 + .../node_modules/optimist/test/usage.js | 292 + .../node_modules/source-map/.npmignore | 2 + .../node_modules/source-map/.travis.yml | 4 + .../node_modules/source-map/CHANGELOG.md | 130 + .../uglify-js/node_modules/source-map/LICENSE | 28 + .../source-map/Makefile.dryice.js | 166 + .../node_modules/source-map/README.md | 446 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 20 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 97 + .../source-map/lib/source-map/base64-vlq.js | 144 + .../source-map/lib/source-map/base64.js | 42 + .../lib/source-map/binary-search.js | 81 + .../lib/source-map/source-map-consumer.js | 478 + .../lib/source-map/source-map-generator.js | 397 + .../source-map/lib/source-map/source-node.js | 387 + .../source-map/lib/source-map/util.js | 302 + .../source-map/node_modules/amdefine/LICENSE | 58 + .../node_modules/amdefine/README.md | 171 + .../node_modules/amdefine/amdefine.js | 299 + .../node_modules/amdefine/intercept.js | 36 + .../node_modules/amdefine/package.json | 36 + .../node_modules/source-map/package.json | 126 + .../node_modules/source-map/test/run-tests.js | 62 + .../source-map/test/source-map/test-api.js | 26 + .../test/source-map/test-array-set.js | 104 + .../test/source-map/test-base64-vlq.js | 24 + .../source-map/test/source-map/test-base64.js | 35 + .../test/source-map/test-binary-search.js | 54 + .../test/source-map/test-dog-fooding.js | 84 + .../source-map/test-source-map-consumer.js | 475 + .../source-map/test-source-map-generator.js | 540 + .../test/source-map/test-source-node.js | 439 + .../source-map/test/source-map/test-util.js | 127 + .../source-map/test/source-map/util.js | 161 + .../uglify-to-browserify/.npmignore | 14 + .../uglify-to-browserify/.travis.yml | 3 + .../node_modules/uglify-to-browserify/LICENSE | 19 + .../uglify-to-browserify/README.md | 15 + .../uglify-to-browserify/index.js | 49 + .../uglify-to-browserify/package.json | 30 + .../uglify-to-browserify/test/index.js | 22 + .../node_modules/uglify-js/package.json | 45 + .../uglify-js/test/compress/arrays.js | 74 + .../uglify-js/test/compress/blocks.js | 49 + .../uglify-js/test/compress/concat-strings.js | 22 + .../uglify-js/test/compress/conditionals.js | 234 + .../uglify-js/test/compress/dead-code.js | 89 + .../uglify-js/test/compress/debugger.js | 24 + .../uglify-js/test/compress/drop-unused.js | 165 + .../uglify-js/test/compress/issue-105.js | 25 + .../uglify-js/test/compress/issue-12.js | 11 + .../uglify-js/test/compress/issue-126.js | 24 + .../uglify-js/test/compress/issue-143.js | 48 + .../uglify-js/test/compress/issue-22.js | 17 + .../uglify-js/test/compress/issue-267.js | 11 + .../uglify-js/test/compress/issue-269.js | 66 + .../uglify-js/test/compress/issue-44.js | 31 + .../uglify-js/test/compress/issue-59.js | 30 + .../uglify-js/test/compress/labels.js | 163 + .../uglify-js/test/compress/loops.js | 123 + .../uglify-js/test/compress/negate-iife.js | 76 + .../uglify-js/test/compress/properties.js | 54 + .../uglify-js/test/compress/sequences.js | 163 + .../uglify-js/test/compress/switch.js | 260 + .../uglify-js/test/compress/typeof.js | 25 + .../node_modules/uglify-js/test/run-tests.js | 179 + .../node_modules/uglify-js/tools/node.js | 182 + .../grunt-contrib-uglify/package.json | 55 + .../grunt-contrib-uglify/tasks/lib/uglify.js | 186 + .../grunt-contrib-uglify/tasks/uglify.js | 166 + node_modules/grunt/.npmignore | 7 + node_modules/grunt/CONTRIBUTING.md | 1 + node_modules/grunt/LICENSE-MIT | 22 + node_modules/grunt/README.md | 20 + node_modules/grunt/appveyor.yml | 43 + node_modules/grunt/internal-tasks/bump.js | 151 + node_modules/grunt/internal-tasks/subgrunt.js | 34 + node_modules/grunt/lib/grunt.js | 165 + node_modules/grunt/lib/grunt/cli.js | 128 + node_modules/grunt/lib/grunt/config.js | 124 + node_modules/grunt/lib/grunt/event.js | 16 + node_modules/grunt/lib/grunt/fail.js | 84 + node_modules/grunt/lib/grunt/file.js | 448 + node_modules/grunt/lib/grunt/help.js | 129 + node_modules/grunt/lib/grunt/option.js | 42 + node_modules/grunt/lib/grunt/task.js | 458 + node_modules/grunt/lib/grunt/template.js | 95 + node_modules/grunt/lib/util/task.js | 342 + node_modules/grunt/node_modules/.bin/cake | 1 + node_modules/grunt/node_modules/.bin/coffee | 1 + node_modules/grunt/node_modules/.bin/js-yaml | 1 + node_modules/grunt/node_modules/.bin/nopt | 1 + node_modules/grunt/node_modules/.bin/rimraf | 1 + node_modules/grunt/node_modules/.bin/which | 1 + .../grunt/node_modules/async/.gitmodules | 9 + .../grunt/node_modules/async/.npmignore | 4 + node_modules/grunt/node_modules/async/LICENSE | 19 + .../grunt/node_modules/async/Makefile | 25 + .../grunt/node_modules/async/README.md | 1021 + .../grunt/node_modules/async/index.js | 3 + .../grunt/node_modules/async/lib/async.js | 692 + .../grunt/node_modules/async/package.json | 32 + .../node_modules/coffee-script/.npmignore | 11 + .../grunt/node_modules/coffee-script/CNAME | 1 + .../grunt/node_modules/coffee-script/LICENSE | 22 + .../grunt/node_modules/coffee-script/README | 51 + .../grunt/node_modules/coffee-script/Rakefile | 78 + .../grunt/node_modules/coffee-script/bin/cake | 7 + .../node_modules/coffee-script/bin/coffee | 7 + .../coffee-script/extras/jsl.conf | 44 + .../lib/coffee-script/browser.js | 92 + .../coffee-script/lib/coffee-script/cake.js | 111 + .../lib/coffee-script/coffee-script.js | 167 + .../lib/coffee-script/command.js | 500 + .../lib/coffee-script/grammar.js | 606 + .../lib/coffee-script/helpers.js | 77 + .../coffee-script/lib/coffee-script/index.js | 11 + .../coffee-script/lib/coffee-script/lexer.js | 788 + .../coffee-script/lib/coffee-script/nodes.js | 2986 ++ .../lib/coffee-script/optparse.js | 138 + .../coffee-script/lib/coffee-script/parser.js | 683 + .../coffee-script/lib/coffee-script/repl.js | 261 + .../lib/coffee-script/rewriter.js | 349 + .../coffee-script/lib/coffee-script/scope.js | 146 + .../node_modules/coffee-script/package.json | 47 + .../grunt/node_modules/colors/MIT-LICENSE.txt | 22 + .../grunt/node_modules/colors/ReadMe.md | 77 + .../grunt/node_modules/colors/colors.js | 342 + .../grunt/node_modules/colors/example.html | 76 + .../grunt/node_modules/colors/example.js | 77 + .../grunt/node_modules/colors/package.json | 29 + .../grunt/node_modules/colors/test.js | 70 + .../colors/themes/winston-dark.js | 12 + .../colors/themes/winston-light.js | 12 + .../grunt/node_modules/dateformat/Readme.md | 67 + .../node_modules/dateformat/lib/dateformat.js | 165 + .../node_modules/dateformat/package.json | 20 + .../dateformat/test/test_weekofyear.js | 4 + .../dateformat/test/test_weekofyear.sh | 27 + .../node_modules/eventemitter2/README.md | 212 + .../grunt/node_modules/eventemitter2/index.js | 1 + .../eventemitter2/lib/eventemitter2.js | 561 + .../node_modules/eventemitter2/package.json | 62 + .../grunt/node_modules/exit/.jshintrc | 14 + .../grunt/node_modules/exit/.npmignore | 0 .../grunt/node_modules/exit/.travis.yml | 6 + .../grunt/node_modules/exit/Gruntfile.js | 48 + .../grunt/node_modules/exit/LICENSE-MIT | 22 + .../grunt/node_modules/exit/README.md | 75 + .../grunt/node_modules/exit/lib/exit.js | 41 + .../grunt/node_modules/exit/package.json | 51 + .../grunt/node_modules/exit/test/exit_test.js | 121 + .../exit/test/fixtures/10-stderr.txt | 10 + .../exit/test/fixtures/10-stdout-stderr.txt | 20 + .../exit/test/fixtures/10-stdout.txt | 10 + .../exit/test/fixtures/100-stderr.txt | 100 + .../exit/test/fixtures/100-stdout-stderr.txt | 200 + .../exit/test/fixtures/100-stdout.txt | 100 + .../exit/test/fixtures/1000-stderr.txt | 1000 + .../exit/test/fixtures/1000-stdout-stderr.txt | 2000 + .../exit/test/fixtures/1000-stdout.txt | 1000 + .../exit/test/fixtures/create-files.sh | 8 + .../exit/test/fixtures/log-broken.js | 23 + .../node_modules/exit/test/fixtures/log.js | 25 + .../grunt/node_modules/findup-sync/.jshintrc | 15 + .../grunt/node_modules/findup-sync/.npmignore | 0 .../node_modules/findup-sync/.travis.yml | 5 + .../node_modules/findup-sync/Gruntfile.js | 25 + .../node_modules/findup-sync/LICENSE-MIT | 22 + .../grunt/node_modules/findup-sync/README.md | 45 + .../findup-sync/lib/findup-sync.js | 46 + .../findup-sync/node_modules/glob/.npmignore | 2 + .../findup-sync/node_modules/glob/.travis.yml | 3 + .../findup-sync/node_modules/glob/LICENSE | 27 + .../findup-sync/node_modules/glob/README.md | 250 + .../node_modules/glob/examples/g.js | 9 + .../node_modules/glob/examples/usr-local.js | 9 + .../findup-sync/node_modules/glob/glob.js | 728 + .../glob/node_modules/inherits/LICENSE | 16 + .../glob/node_modules/inherits/README.md | 42 + .../glob/node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../glob/node_modules/inherits/package.json | 33 + .../glob/node_modules/inherits/test.js | 25 + .../node_modules/glob/package.json | 40 + .../node_modules/glob/test/00-setup.js | 176 + .../node_modules/glob/test/bash-comparison.js | 63 + .../node_modules/glob/test/bash-results.json | 351 + .../node_modules/glob/test/cwd-test.js | 55 + .../node_modules/glob/test/globstar-match.js | 19 + .../node_modules/glob/test/mark.js | 118 + .../glob/test/new-glob-optional-options.js | 10 + .../node_modules/glob/test/nocase-nomagic.js | 113 + .../node_modules/glob/test/pause-resume.js | 73 + .../node_modules/glob/test/readme-issue.js | 36 + .../node_modules/glob/test/root-nomount.js | 39 + .../node_modules/glob/test/root.js | 46 + .../node_modules/glob/test/stat.js | 32 + .../node_modules/glob/test/zz-cleanup.js | 11 + .../node_modules/lodash/LICENSE.txt | 22 + .../findup-sync/node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 +++ .../lodash/dist/lodash.underscore.min.js | 39 + .../findup-sync/node_modules/lodash/lodash.js | 7179 ++++ .../node_modules/lodash/package.json | 102 + .../node_modules/findup-sync/package.json | 48 + .../findup-sync/test/findup-sync_test.js | 48 + .../findup-sync/test/fixtures/a.txt | 0 .../findup-sync/test/fixtures/a/b/bar.txt | 0 .../findup-sync/test/fixtures/a/foo.txt | 0 .../findup-sync/test/fixtures/aaa.txt | 0 .../grunt/node_modules/getobject/.jshintrc | 15 + .../grunt/node_modules/getobject/.npmignore | 1 + .../grunt/node_modules/getobject/.travis.yml | 6 + .../grunt/node_modules/getobject/Gruntfile.js | 48 + .../grunt/node_modules/getobject/LICENSE-MIT | 22 + .../grunt/node_modules/getobject/README.md | 20 + .../node_modules/getobject/lib/getobject.js | 60 + .../grunt/node_modules/getobject/package.json | 48 + .../getobject/test/namespace_test.js | 51 + .../grunt/node_modules/glob/.npmignore | 2 + .../grunt/node_modules/glob/.travis.yml | 3 + node_modules/grunt/node_modules/glob/LICENSE | 27 + .../grunt/node_modules/glob/README.md | 233 + .../grunt/node_modules/glob/examples/g.js | 9 + .../node_modules/glob/examples/usr-local.js | 9 + node_modules/grunt/node_modules/glob/glob.js | 643 + .../glob/node_modules/graceful-fs/.npmignore | 1 + .../glob/node_modules/graceful-fs/LICENSE | 27 + .../glob/node_modules/graceful-fs/README.md | 33 + .../node_modules/graceful-fs/graceful-fs.js | 442 + .../node_modules/graceful-fs/package.json | 49 + .../node_modules/graceful-fs/test/open.js | 46 + .../node_modules/graceful-fs/test/ulimit.js | 158 + .../glob/node_modules/inherits/README.md | 51 + .../glob/node_modules/inherits/inherits.js | 29 + .../glob/node_modules/inherits/package.json | 30 + .../grunt/node_modules/glob/package.json | 40 + .../grunt/node_modules/glob/test/00-setup.js | 176 + .../node_modules/glob/test/bash-comparison.js | 63 + .../node_modules/glob/test/bash-results.json | 348 + .../grunt/node_modules/glob/test/cwd-test.js | 55 + .../grunt/node_modules/glob/test/mark.js | 74 + .../node_modules/glob/test/nocase-nomagic.js | 113 + .../node_modules/glob/test/pause-resume.js | 73 + .../node_modules/glob/test/root-nomount.js | 39 + .../grunt/node_modules/glob/test/root.js | 46 + .../node_modules/glob/test/zz-cleanup.js | 11 + .../node_modules/grunt-legacy-log/.jshintrc | 14 + .../node_modules/grunt-legacy-log/.npmignore | 1 + .../node_modules/grunt-legacy-log/.travis.yml | 11 + .../grunt-legacy-log/Gruntfile.js | 30 + .../node_modules/grunt-legacy-log/LICENSE-MIT | 22 + .../node_modules/grunt-legacy-log/README.md | 6 + .../node_modules/grunt-legacy-log/examples.js | 26 + .../node_modules/grunt-legacy-log/index.js | 377 + .../node_modules/lodash/LICENSE.txt | 22 + .../node_modules/lodash/README.md | 163 + .../node_modules/lodash/dist/lodash.compat.js | 7157 ++++ .../lodash/dist/lodash.compat.min.js | 61 + .../node_modules/lodash/dist/lodash.js | 6785 ++++ .../node_modules/lodash/dist/lodash.min.js | 56 + .../lodash/dist/lodash.underscore.js | 4979 +++ .../lodash/dist/lodash.underscore.min.js | 39 + .../node_modules/lodash/lodash.js | 7179 ++++ .../node_modules/lodash/package.json | 102 + .../underscore.string/.travis.yml | 8 + .../node_modules/underscore.string/Gemfile | 4 + .../underscore.string/Gemfile.lock | 17 + .../underscore.string/README.markdown | 814 + .../node_modules/underscore.string/Rakefile | 23 + .../underscore.string/component.json | 11 + .../dist/underscore.string.min.js | 1 + .../lib/underscore.string.js | 673 + .../underscore.string/libpeerconnection.log | 0 .../underscore.string/package.json | 73 + .../underscore.string/test/run-qunit.js | 45 + .../underscore.string/test/speed.js | 148 + .../underscore.string/test/strings.js | 685 + .../test/strings_standalone.js | 12 + .../underscore.string/test/test.html | 31 + .../test/test_standalone.html | 18 + .../test/test_underscore/arrays.js | 200 + .../test/test_underscore/chaining.js | 59 + .../test/test_underscore/collections.js | 426 + .../test/test_underscore/functions.js | 259 + .../test/test_underscore/index.html | 45 + .../test/test_underscore/objects.js | 548 + .../test/test_underscore/speed.js | 75 + .../test/test_underscore/utility.js | 249 + .../test/test_underscore/vendor/jquery.js | 9404 +++++ .../test/test_underscore/vendor/jslitmus.js | 670 + .../test/test_underscore/vendor/qunit.css | 235 + .../test/test_underscore/vendor/qunit.js | 1977 + .../underscore.string/test/underscore.js | 1201 + .../grunt-legacy-log/package.json | 51 + .../grunt-legacy-log/test/index.js | 572 + .../node_modules/grunt-legacy-util/.jshintrc | 14 + .../node_modules/grunt-legacy-util/.npmignore | 1 + .../grunt-legacy-util/.travis.yml | 11 + .../grunt-legacy-util/Gruntfile.js | 30 + .../grunt-legacy-util/LICENSE-MIT | 22 + .../node_modules/grunt-legacy-util/README.md | 31 + .../node_modules/grunt-legacy-util/index.js | 202 + .../grunt-legacy-util/package.json | 54 + .../test/fixtures/Gruntfile-execArgv-child.js | 7 + .../test/fixtures/Gruntfile-execArgv.js | 17 + .../test/fixtures/Gruntfile-print-text.js | 8 + .../grunt-legacy-util/test/fixtures/exec.cmd | 1 + .../grunt-legacy-util/test/fixtures/exec.sh | 2 + .../test/fixtures/spawn-multibyte.js | 17 + .../grunt-legacy-util/test/fixtures/spawn.js | 8 + .../grunt-legacy-util/test/index.js | 554 + .../grunt/node_modules/hooker/LICENSE-MIT | 22 + .../grunt/node_modules/hooker/README.md | 186 + .../grunt/node_modules/hooker/child.js | 101 + .../node_modules/hooker/dist/ba-hooker.js | 169 + .../node_modules/hooker/dist/ba-hooker.min.js | 4 + .../grunt/node_modules/hooker/grunt.js | 47 + .../grunt/node_modules/hooker/lib/hooker.js | 174 + .../grunt/node_modules/hooker/package.json | 45 + .../grunt/node_modules/hooker/parent.js | 17 + .../node_modules/hooker/test/hooker_test.js | 435 + .../grunt/node_modules/iconv-lite/.npmignore | 3 + .../grunt/node_modules/iconv-lite/.travis.yml | 5 + .../grunt/node_modules/iconv-lite/LICENSE | 21 + .../grunt/node_modules/iconv-lite/README.md | 72 + .../node_modules/iconv-lite/encodings/big5.js | 9 + .../node_modules/iconv-lite/encodings/gbk.js | 9 + .../iconv-lite/encodings/singlebyte.js | 340 + .../iconv-lite/encodings/table/big5.js | 1 + .../iconv-lite/encodings/table/gbk.js | 1 + .../generation/generate-big5-table.js | 25 + .../generation/generate-singlebyte.js | 142 + .../grunt/node_modules/iconv-lite/index.js | 231 + .../node_modules/iconv-lite/package.json | 80 + .../node_modules/iconv-lite/test/big5-test.js | 36 + .../node_modules/iconv-lite/test/big5File.txt | 13 + .../iconv-lite/test/cyrillic-test.js | 86 + .../node_modules/iconv-lite/test/gbk-test.js | 38 + .../node_modules/iconv-lite/test/gbkFile.txt | 14 + .../iconv-lite/test/greek-test.js | 79 + .../node_modules/iconv-lite/test/main-test.js | 55 + .../iconv-lite/test/performance.js | 67 + .../iconv-lite/test/turkish-test.js | 90 + .../grunt/node_modules/js-yaml/HISTORY.md | 155 + .../grunt/node_modules/js-yaml/LICENSE | 21 + .../grunt/node_modules/js-yaml/README.md | 249 + .../grunt/node_modules/js-yaml/bin/js-yaml.js | 125 + .../js-yaml/examples/custom_types.js | 104 + .../js-yaml/examples/custom_types.yaml | 18 + .../node_modules/js-yaml/examples/dumper.js | 31 + .../node_modules/js-yaml/examples/dumper.json | 22 + .../js-yaml/examples/sample_document.js | 15 + .../js-yaml/examples/sample_document.yaml | 197 + .../grunt/node_modules/js-yaml/index.js | 1 + .../grunt/node_modules/js-yaml/lib/js-yaml.js | 33 + .../js-yaml/lib/js-yaml/common.js | 60 + .../js-yaml/lib/js-yaml/dumper.js | 437 + .../js-yaml/lib/js-yaml/exception.js | 25 + .../js-yaml/lib/js-yaml/loader.js | 1549 + .../node_modules/js-yaml/lib/js-yaml/mark.js | 78 + .../js-yaml/lib/js-yaml/require.js | 23 + .../js-yaml/lib/js-yaml/schema.js | 103 + .../js-yaml/lib/js-yaml/schema/default.js | 16 + .../js-yaml/lib/js-yaml/schema/minimal.js | 13 + .../js-yaml/lib/js-yaml/schema/safe.js | 25 + .../node_modules/js-yaml/lib/js-yaml/type.js | 82 + .../js-yaml/lib/js-yaml/type/binary.js | 118 + .../js-yaml/lib/js-yaml/type/bool.js | 74 + .../js-yaml/lib/js-yaml/type/float.js | 102 + .../js-yaml/lib/js-yaml/type/int.js | 85 + .../js-yaml/lib/js-yaml/type/js/function.js | 56 + .../js-yaml/lib/js-yaml/type/js/regexp.js | 56 + .../js-yaml/lib/js-yaml/type/js/undefined.js | 28 + .../js-yaml/lib/js-yaml/type/map.js | 11 + .../js-yaml/lib/js-yaml/type/merge.js | 18 + .../js-yaml/lib/js-yaml/type/null.js | 36 + .../js-yaml/lib/js-yaml/type/omap.js | 53 + .../js-yaml/lib/js-yaml/type/pairs.js | 41 + .../js-yaml/lib/js-yaml/type/seq.js | 11 + .../js-yaml/lib/js-yaml/type/set.js | 31 + .../js-yaml/lib/js-yaml/type/str.js | 11 + .../js-yaml/lib/js-yaml/type/timestamp.js | 91 + .../js-yaml/node_modules/.bin/esparse | 1 + .../js-yaml/node_modules/.bin/esvalidate | 1 + .../js-yaml/node_modules/argparse/HISTORY.md | 109 + .../js-yaml/node_modules/argparse/LICENSE | 21 + .../js-yaml/node_modules/argparse/README.md | 239 + .../argparse/examples/arguments.js | 36 + .../node_modules/argparse/examples/choice.js | 22 + .../argparse/examples/constants.js | 59 + .../node_modules/argparse/examples/help.js | 13 + .../node_modules/argparse/examples/nargs.js | 33 + .../node_modules/argparse/examples/parents.js | 28 + .../argparse/examples/prefix_chars.js | 23 + .../argparse/examples/sub_commands.js | 49 + .../node_modules/argparse/examples/sum.js | 35 + .../argparse/examples/testformatters.js | 270 + .../js-yaml/node_modules/argparse/index.js | 1 + .../node_modules/argparse/lib/action.js | 146 + .../argparse/lib/action/append.js | 55 + .../argparse/lib/action/append/constant.js | 47 + .../node_modules/argparse/lib/action/count.js | 40 + .../node_modules/argparse/lib/action/help.js | 48 + .../node_modules/argparse/lib/action/store.js | 50 + .../argparse/lib/action/store/constant.js | 43 + .../argparse/lib/action/store/false.js | 27 + .../argparse/lib/action/store/true.js | 26 + .../argparse/lib/action/subparsers.js | 148 + .../argparse/lib/action/version.js | 50 + .../argparse/lib/action_container.js | 481 + .../node_modules/argparse/lib/argparse.js | 14 + .../argparse/lib/argument/error.js | 50 + .../argparse/lib/argument/exclusive.js | 54 + .../argparse/lib/argument/group.js | 75 + .../argparse/lib/argument_parser.js | 1165 + .../node_modules/argparse/lib/const.js | 18 + .../argparse/lib/help/added_formatters.js | 88 + .../argparse/lib/help/formatter.js | 803 + .../node_modules/argparse/lib/namespace.js | 77 + .../underscore.string/.travis.yml | 8 + .../node_modules/underscore.string/Gemfile | 4 + .../underscore.string/Gemfile.lock | 17 + .../underscore.string/README.markdown | 814 + .../node_modules/underscore.string/Rakefile | 23 + .../underscore.string/component.json | 11 + .../dist/underscore.string.min.js | 1 + .../lib/underscore.string.js | 673 + .../underscore.string/libpeerconnection.log | 0 .../underscore.string/package.json | 74 + .../underscore.string/test/run-qunit.js | 45 + .../underscore.string/test/speed.js | 148 + .../underscore.string/test/strings.js | 685 + .../test/strings_standalone.js | 12 + .../underscore.string/test/test.html | 31 + .../test/test_standalone.html | 18 + .../test/test_underscore/arrays.js | 200 + .../test/test_underscore/chaining.js | 59 + .../test/test_underscore/collections.js | 426 + .../test/test_underscore/functions.js | 259 + .../test/test_underscore/index.html | 45 + .../test/test_underscore/objects.js | 548 + .../test/test_underscore/speed.js | 75 + .../test/test_underscore/utility.js | 249 + .../test/test_underscore/vendor/jquery.js | 9404 +++++ .../test/test_underscore/vendor/jslitmus.js | 670 + .../test/test_underscore/vendor/qunit.css | 235 + .../test/test_underscore/vendor/qunit.js | 1977 + .../underscore.string/test/underscore.js | 1201 + .../node_modules/underscore/.npmignore | 4 + .../node_modules/underscore/.travis.yml | 5 + .../argparse/node_modules/underscore/CNAME | 1 + .../node_modules/underscore/CONTRIBUTING.md | 9 + .../argparse/node_modules/underscore/LICENSE | 22 + .../node_modules/underscore/README.md | 19 + .../node_modules/underscore/favicon.ico | Bin 0 -> 1406 bytes .../node_modules/underscore/index.html | 2467 ++ .../argparse/node_modules/underscore/index.js | 1 + .../node_modules/underscore/package.json | 35 + .../node_modules/underscore/underscore-min.js | 1 + .../node_modules/underscore/underscore.js | 1226 + .../node_modules/argparse/package.json | 50 + .../js-yaml/node_modules/esprima/README.md | 73 + .../node_modules/esprima/bin/esparse.js | 117 + .../node_modules/esprima/bin/esvalidate.js | 177 + .../js-yaml/node_modules/esprima/esprima.js | 3908 ++ .../js-yaml/node_modules/esprima/package.json | 59 + .../node_modules/esprima/test/compat.js | 239 + .../node_modules/esprima/test/reflect.js | 422 + .../js-yaml/node_modules/esprima/test/run.js | 66 + .../node_modules/esprima/test/runner.js | 387 + .../js-yaml/node_modules/esprima/test/test.js | 20238 ++++++++++ .../grunt/node_modules/js-yaml/package.json | 60 + .../grunt/node_modules/lodash/README.md | 140 + .../grunt/node_modules/lodash/lodash.js | 4258 ++ .../grunt/node_modules/lodash/lodash.min.js | 35 + .../node_modules/lodash/lodash.underscore.js | 3688 ++ .../lodash/lodash.underscore.min.js | 28 + .../grunt/node_modules/lodash/package.json | 62 + .../grunt/node_modules/minimatch/.npmignore | 1 + .../grunt/node_modules/minimatch/LICENSE | 23 + .../grunt/node_modules/minimatch/README.md | 218 + .../grunt/node_modules/minimatch/minimatch.js | 1055 + .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../minimatch/node_modules/lru-cache/LICENSE | 23 + .../node_modules/lru-cache/README.md | 97 + .../node_modules/lru-cache/lib/lru-cache.js | 252 + .../node_modules/lru-cache/package.json | 33 + .../node_modules/lru-cache/test/basic.js | 369 + .../node_modules/lru-cache/test/foreach.js | 52 + .../lru-cache/test/memory-leak.js | 50 + .../minimatch/node_modules/sigmund/LICENSE | 27 + .../minimatch/node_modules/sigmund/README.md | 53 + .../minimatch/node_modules/sigmund/bench.js | 283 + .../node_modules/sigmund/package.json | 42 + .../minimatch/node_modules/sigmund/sigmund.js | 39 + .../node_modules/sigmund/test/basic.js | 24 + .../grunt/node_modules/minimatch/package.json | 40 + .../node_modules/minimatch/test/basic.js | 399 + .../minimatch/test/brace-expand.js | 33 + .../node_modules/minimatch/test/caching.js | 14 + .../node_modules/minimatch/test/defaults.js | 274 + .../test/extglob-ending-with-state-char.js | 8 + .../grunt/node_modules/nopt/.npmignore | 0 node_modules/grunt/node_modules/nopt/LICENSE | 23 + .../grunt/node_modules/nopt/README.md | 208 + .../grunt/node_modules/nopt/bin/nopt.js | 44 + .../node_modules/nopt/examples/my-program.js | 30 + .../grunt/node_modules/nopt/lib/nopt.js | 552 + .../nopt/node_modules/abbrev/CONTRIBUTING.md | 3 + .../nopt/node_modules/abbrev/LICENSE | 23 + .../nopt/node_modules/abbrev/README.md | 23 + .../nopt/node_modules/abbrev/abbrev.js | 62 + .../nopt/node_modules/abbrev/package.json | 29 + .../nopt/node_modules/abbrev/test.js | 47 + .../grunt/node_modules/nopt/package.json | 36 + .../grunt/node_modules/rimraf/AUTHORS | 6 + .../grunt/node_modules/rimraf/LICENSE | 23 + .../grunt/node_modules/rimraf/README.md | 30 + node_modules/grunt/node_modules/rimraf/bin.js | 33 + .../grunt/node_modules/rimraf/package.json | 56 + .../grunt/node_modules/rimraf/rimraf.js | 248 + .../grunt/node_modules/rimraf/test/run.sh | 16 + .../grunt/node_modules/rimraf/test/setup.sh | 47 + .../node_modules/rimraf/test/test-async.js | 5 + .../node_modules/rimraf/test/test-sync.js | 3 + .../underscore.string/.travis.yml | 8 + .../node_modules/underscore.string/Gemfile | 5 + .../underscore.string/Gemfile.lock | 34 + .../underscore.string/README.markdown | 668 + .../node_modules/underscore.string/Rakefile | 28 + .../dist/underscore.string.min.js | 1 + .../lib/underscore.string.js | 525 + .../underscore.string/package.json | 72 + .../underscore.string/test/run-qunit.js | 44 + .../underscore.string/test/speed.js | 138 + .../underscore.string/test/strings.js | 438 + .../test/strings_standalone.js | 12 + .../underscore.string/test/test.html | 31 + .../test/test_standalone.html | 18 + .../test/test_underscore/arrays.js | 166 + .../test/test_underscore/chaining.js | 59 + .../test/test_underscore/collections.js | 270 + .../test/test_underscore/functions.js | 198 + .../test/test_underscore/objects.js | 535 + .../test/test_underscore/speed.js | 70 + .../test/test_underscore/temp.js | 27 + .../test/test_underscore/temp_tests.html | 19 + .../test/test_underscore/test.html | 43 + .../test/test_underscore/utility.js | 155 + .../test/test_underscore/vendor/jquery.js | 19 + .../test/test_underscore/vendor/jslitmus.js | 670 + .../test/test_underscore/vendor/qunit.css | 196 + .../test/test_underscore/vendor/qunit.js | 2360 ++ .../underscore.string/test/underscore.js | 999 + node_modules/grunt/node_modules/which/LICENSE | 23 + .../grunt/node_modules/which/README.md | 5 + .../grunt/node_modules/which/bin/which | 14 + .../grunt/node_modules/which/package.json | 31 + .../grunt/node_modules/which/which.js | 104 + node_modules/grunt/package.json | 84 + package.json | 10 + samples/AXButton/index.html | 9 +- samples/AXCore/index.html | 11 +- samples/AXGrid/index.html | 14 +- ui/arongi/AXJ.min.css | 5 + ui/bulldog/AXJ.min.css | 5 + ui/cocker/AXJ.min.css | 5 + ui/flybasket/AXJ.min.css | 5 + ui/kakao/AXJ.min.css | 5 + 994 files changed, 258386 insertions(+), 550 deletions(-) create mode 100644 Gruntfile.js create mode 100644 dist/AXJ.all.js create mode 100644 dist/AXJ.min.js delete mode 100644 lib/AXCodeArea.js delete mode 100644 lib/AXCodeView.js delete mode 100644 lib/AX_angular.js delete mode 100644 lib/gridEasy.js delete mode 100644 lib/import.js create mode 120000 node_modules/.bin/bower create mode 100644 node_modules/grunt-contrib-concat/LICENSE-MIT create mode 100644 node_modules/grunt-contrib-concat/README.md create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/index.js create mode 120000 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/.bin/strip-ansi create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/package.json create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/ansi-styles/readme.md create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/index.js create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/package.json create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/has-color/readme.md create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/cli.js create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/index.js create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/package.json create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/node_modules/strip-ansi/readme.md create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/package.json create mode 100644 node_modules/grunt-contrib-concat/node_modules/chalk/readme.md create mode 100644 node_modules/grunt-contrib-concat/package.json create mode 100644 node_modules/grunt-contrib-concat/tasks/concat.js create mode 100644 node_modules/grunt-contrib-concat/tasks/lib/comment.js create mode 100644 node_modules/grunt-contrib-cssmin/LICENSE-MIT create mode 100644 node_modules/grunt-contrib-cssmin/README.md create mode 120000 node_modules/grunt-contrib-cssmin/node_modules/.bin/cleancss create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/index.js create mode 120000 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/.bin/strip-ansi create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/ansi-styles/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/ansi-styles/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/has-color/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/has-color/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/has-color/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/strip-ansi/cli.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/strip-ansi/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/strip-ansi/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/node_modules/strip-ansi/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/chalk/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/History.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/bin/cleancss create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/clean.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/colors/hsl-to-hex.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/colors/long-to-short-hex.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/colors/rgb-to-hex.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/colors/shortener.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/images/url-rebase.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/images/url-rewriter.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/imports/inliner.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/properties/optimizer.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/properties/shorthand-notations.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/selectors/empty-removal.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/selectors/optimizer.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/selectors/tokenizer.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/text/comments.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/text/escape-store.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/text/expressions.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/text/free.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/lib/text/urls.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/node_modules/commander/Readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/node_modules/commander/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/node_modules/commander/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/clean-css/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/index.js create mode 120000 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/.bin/gzip-size create mode 120000 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/.bin/pretty-bytes create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/cli.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/.npmignore create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/inherits.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/inherits_browser.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/test.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/.npmignore create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/float.patch create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/.travis.yml create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/example/tarray.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/readme.markdown create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/test/tarray.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/array.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/buffer.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/infer.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/nothing.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/objects.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/server/ls.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/string.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/typedarray.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/.npmignore create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/.travis.yml create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/.npmignore create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/.travis.yml create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/array.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/fail.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/nested.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/nested_fail.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/not_enough.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/build.sh create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/index.html create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/server.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/timing.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/too_many.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/default_stream.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/render.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/test.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/README.markdown create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/example/cmp.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/test/cmp.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/.travis.yml create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/LICENSE create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/example/defined.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/readme.markdown create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/test/def.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/README.markdown create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/index.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/lib/parse.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/lib/stringify.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/test/parse.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/test/stringify.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/readme.markdown create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/array.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/child_ordering.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/fail.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/ok.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/too_few.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/fail.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/harness.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/max_listeners.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/max_listeners/source.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/nested.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/only.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/order.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/plan_optional.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/skip.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/throw.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/too_many.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/test/zlib.test.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/zlib.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/pretty-bytes/cli.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/pretty-bytes/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/pretty-bytes/pretty-bytes.js create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/pretty-bytes/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/package.json create mode 100644 node_modules/grunt-contrib-cssmin/node_modules/maxmin/readme.md create mode 100644 node_modules/grunt-contrib-cssmin/package.json create mode 100644 node_modules/grunt-contrib-cssmin/tasks/cssmin.js create mode 100644 node_modules/grunt-contrib-uglify/LICENSE-MIT create mode 100644 node_modules/grunt-contrib-uglify/README.md create mode 120000 node_modules/grunt-contrib-uglify/node_modules/.bin/uglifyjs create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/index.js create mode 120000 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/.bin/strip-ansi create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-color/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-color/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-color/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/cli.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/chalk/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/index.js create mode 120000 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/.bin/gzip-size create mode 120000 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/.bin/pretty-bytes create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/cli.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/inherits.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/inherits_browser.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/test.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/float.patch create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/lib/util.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/util.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/component.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/example/tarray.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/readme.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/test/tarray.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/array.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/buffer.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/infer.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/nothing.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/objects.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/server/ls.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/string.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/test/typedarray.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/array.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/fail.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/nested.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/nested_fail.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/not_enough.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/build.sh create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/index.html create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/static/server.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/timing.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/example/too_many.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/default_stream.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/render.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/lib/test.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/README.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/example/cmp.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/deep-equal/test/cmp.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/example/defined.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/readme.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/defined/test/def.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/README.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/lib/parse.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/lib/stringify.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/test/parse.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/node_modules/jsonify/test/stringify.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/readme.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/array.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/child_ordering.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/fail.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/ok.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/exit/too_few.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/fail.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/harness.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/max_listeners.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/max_listeners/source.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/nested.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/only.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/order.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/plan_optional.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/skip.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/throw.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/node_modules/tape/test/too_many.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/test/zlib.test.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/zlib-browserify/zlib.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/pretty-bytes/cli.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/pretty-bytes/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/pretty-bytes/pretty-bytes.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/pretty-bytes/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/maxmin/readme.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/output.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/async/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/async/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/async/component.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/async/lib/async.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/async/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/bool.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/default_hash.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/default_singles.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/divide.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/line_count.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/nonopt.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/reflect.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/short.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/string.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/usage-options.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/example/xup.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/break.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/test/wrap.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/readme.markdown create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/test/_.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/test/_/argv.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/test/_/bin.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/test/parse.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/optimist/test/usage.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/mini-require.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/run-tests.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/test-util.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/.npmignore create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/.travis.yml create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/LICENSE create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/README.md create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/node_modules/uglify-to-browserify/test/index.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/package.json create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/arrays.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/blocks.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/concat-strings.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/conditionals.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/dead-code.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/debugger.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/drop-unused.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-105.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-12.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-126.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-143.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-22.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-267.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-269.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-44.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/issue-59.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/labels.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/loops.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/negate-iife.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/properties.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/sequences.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/switch.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/compress/typeof.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/test/run-tests.js create mode 100644 node_modules/grunt-contrib-uglify/node_modules/uglify-js/tools/node.js create mode 100644 node_modules/grunt-contrib-uglify/package.json create mode 100644 node_modules/grunt-contrib-uglify/tasks/lib/uglify.js create mode 100644 node_modules/grunt-contrib-uglify/tasks/uglify.js create mode 100644 node_modules/grunt/.npmignore create mode 100644 node_modules/grunt/CONTRIBUTING.md create mode 100644 node_modules/grunt/LICENSE-MIT create mode 100644 node_modules/grunt/README.md create mode 100644 node_modules/grunt/appveyor.yml create mode 100644 node_modules/grunt/internal-tasks/bump.js create mode 100644 node_modules/grunt/internal-tasks/subgrunt.js create mode 100644 node_modules/grunt/lib/grunt.js create mode 100644 node_modules/grunt/lib/grunt/cli.js create mode 100644 node_modules/grunt/lib/grunt/config.js create mode 100644 node_modules/grunt/lib/grunt/event.js create mode 100644 node_modules/grunt/lib/grunt/fail.js create mode 100644 node_modules/grunt/lib/grunt/file.js create mode 100644 node_modules/grunt/lib/grunt/help.js create mode 100644 node_modules/grunt/lib/grunt/option.js create mode 100644 node_modules/grunt/lib/grunt/task.js create mode 100644 node_modules/grunt/lib/grunt/template.js create mode 100644 node_modules/grunt/lib/util/task.js create mode 120000 node_modules/grunt/node_modules/.bin/cake create mode 120000 node_modules/grunt/node_modules/.bin/coffee create mode 120000 node_modules/grunt/node_modules/.bin/js-yaml create mode 120000 node_modules/grunt/node_modules/.bin/nopt create mode 120000 node_modules/grunt/node_modules/.bin/rimraf create mode 120000 node_modules/grunt/node_modules/.bin/which create mode 100644 node_modules/grunt/node_modules/async/.gitmodules create mode 100644 node_modules/grunt/node_modules/async/.npmignore create mode 100644 node_modules/grunt/node_modules/async/LICENSE create mode 100644 node_modules/grunt/node_modules/async/Makefile create mode 100644 node_modules/grunt/node_modules/async/README.md create mode 100644 node_modules/grunt/node_modules/async/index.js create mode 100644 node_modules/grunt/node_modules/async/lib/async.js create mode 100644 node_modules/grunt/node_modules/async/package.json create mode 100644 node_modules/grunt/node_modules/coffee-script/.npmignore create mode 100644 node_modules/grunt/node_modules/coffee-script/CNAME create mode 100644 node_modules/grunt/node_modules/coffee-script/LICENSE create mode 100644 node_modules/grunt/node_modules/coffee-script/README create mode 100644 node_modules/grunt/node_modules/coffee-script/Rakefile create mode 100644 node_modules/grunt/node_modules/coffee-script/bin/cake create mode 100644 node_modules/grunt/node_modules/coffee-script/bin/coffee create mode 100644 node_modules/grunt/node_modules/coffee-script/extras/jsl.conf create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js create mode 100644 node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js create mode 100644 node_modules/grunt/node_modules/coffee-script/package.json create mode 100644 node_modules/grunt/node_modules/colors/MIT-LICENSE.txt create mode 100644 node_modules/grunt/node_modules/colors/ReadMe.md create mode 100644 node_modules/grunt/node_modules/colors/colors.js create mode 100644 node_modules/grunt/node_modules/colors/example.html create mode 100644 node_modules/grunt/node_modules/colors/example.js create mode 100644 node_modules/grunt/node_modules/colors/package.json create mode 100644 node_modules/grunt/node_modules/colors/test.js create mode 100644 node_modules/grunt/node_modules/colors/themes/winston-dark.js create mode 100644 node_modules/grunt/node_modules/colors/themes/winston-light.js create mode 100644 node_modules/grunt/node_modules/dateformat/Readme.md create mode 100644 node_modules/grunt/node_modules/dateformat/lib/dateformat.js create mode 100644 node_modules/grunt/node_modules/dateformat/package.json create mode 100644 node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js create mode 100644 node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh create mode 100644 node_modules/grunt/node_modules/eventemitter2/README.md create mode 100644 node_modules/grunt/node_modules/eventemitter2/index.js create mode 100644 node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js create mode 100644 node_modules/grunt/node_modules/eventemitter2/package.json create mode 100644 node_modules/grunt/node_modules/exit/.jshintrc create mode 100644 node_modules/grunt/node_modules/exit/.npmignore create mode 100644 node_modules/grunt/node_modules/exit/.travis.yml create mode 100644 node_modules/grunt/node_modules/exit/Gruntfile.js create mode 100644 node_modules/grunt/node_modules/exit/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/exit/README.md create mode 100644 node_modules/grunt/node_modules/exit/lib/exit.js create mode 100644 node_modules/grunt/node_modules/exit/package.json create mode 100644 node_modules/grunt/node_modules/exit/test/exit_test.js create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js create mode 100644 node_modules/grunt/node_modules/exit/test/fixtures/log.js create mode 100644 node_modules/grunt/node_modules/findup-sync/.jshintrc create mode 100644 node_modules/grunt/node_modules/findup-sync/.npmignore create mode 100644 node_modules/grunt/node_modules/findup-sync/.travis.yml create mode 100644 node_modules/grunt/node_modules/findup-sync/Gruntfile.js create mode 100644 node_modules/grunt/node_modules/findup-sync/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/findup-sync/README.md create mode 100644 node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/.npmignore create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/.travis.yml create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/LICENSE create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/README.md create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/g.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/usr-local.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/LICENSE create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/README.md create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits_browser.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/package.json create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/test.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/package.json create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/00-setup.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/bash-comparison.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/bash-results.json create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/cwd-test.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/globstar-match.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/mark.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/new-glob-optional-options.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/nocase-nomagic.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/pause-resume.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/readme-issue.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/root-nomount.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/root.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/stat.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/zz-cleanup.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/LICENSE.txt create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/lodash.js create mode 100644 node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json create mode 100644 node_modules/grunt/node_modules/findup-sync/package.json create mode 100644 node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js create mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt create mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt create mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt create mode 100644 node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt create mode 100644 node_modules/grunt/node_modules/getobject/.jshintrc create mode 100644 node_modules/grunt/node_modules/getobject/.npmignore create mode 100644 node_modules/grunt/node_modules/getobject/.travis.yml create mode 100644 node_modules/grunt/node_modules/getobject/Gruntfile.js create mode 100644 node_modules/grunt/node_modules/getobject/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/getobject/README.md create mode 100644 node_modules/grunt/node_modules/getobject/lib/getobject.js create mode 100644 node_modules/grunt/node_modules/getobject/package.json create mode 100644 node_modules/grunt/node_modules/getobject/test/namespace_test.js create mode 100644 node_modules/grunt/node_modules/glob/.npmignore create mode 100644 node_modules/grunt/node_modules/glob/.travis.yml create mode 100644 node_modules/grunt/node_modules/glob/LICENSE create mode 100644 node_modules/grunt/node_modules/glob/README.md create mode 100644 node_modules/grunt/node_modules/glob/examples/g.js create mode 100644 node_modules/grunt/node_modules/glob/examples/usr-local.js create mode 100644 node_modules/grunt/node_modules/glob/glob.js create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/.npmignore create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js create mode 100644 node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js create mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/README.md create mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js create mode 100644 node_modules/grunt/node_modules/glob/node_modules/inherits/package.json create mode 100644 node_modules/grunt/node_modules/glob/package.json create mode 100644 node_modules/grunt/node_modules/glob/test/00-setup.js create mode 100644 node_modules/grunt/node_modules/glob/test/bash-comparison.js create mode 100644 node_modules/grunt/node_modules/glob/test/bash-results.json create mode 100644 node_modules/grunt/node_modules/glob/test/cwd-test.js create mode 100644 node_modules/grunt/node_modules/glob/test/mark.js create mode 100644 node_modules/grunt/node_modules/glob/test/nocase-nomagic.js create mode 100644 node_modules/grunt/node_modules/glob/test/pause-resume.js create mode 100644 node_modules/grunt/node_modules/glob/test/root-nomount.js create mode 100644 node_modules/grunt/node_modules/glob/test/root.js create mode 100644 node_modules/grunt/node_modules/glob/test/zz-cleanup.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/.jshintrc create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/.npmignore create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/.travis.yml create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/Gruntfile.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/README.md create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/examples.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/index.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/LICENSE.txt create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/README.md create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/lodash.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/lodash/package.json create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/.travis.yml create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Gemfile create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Gemfile.lock create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/README.markdown create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Rakefile create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/component.json create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/dist/underscore.string.min.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/lib/underscore.string.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/libpeerconnection.log create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/package.json create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/run-qunit.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/speed.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/strings.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/strings_standalone.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test.html create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_standalone.html create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/arrays.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/chaining.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/collections.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/functions.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/index.html create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/objects.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/speed.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/utility.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/vendor/jquery.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/vendor/qunit.css create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_underscore/vendor/qunit.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/underscore.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/package.json create mode 100644 node_modules/grunt/node_modules/grunt-legacy-log/test/index.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/.jshintrc create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/.npmignore create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/.travis.yml create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/Gruntfile.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/README.md create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/index.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/package.json create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv-child.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-print-text.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.cmd create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.sh create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn-multibyte.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn.js create mode 100644 node_modules/grunt/node_modules/grunt-legacy-util/test/index.js create mode 100644 node_modules/grunt/node_modules/hooker/LICENSE-MIT create mode 100644 node_modules/grunt/node_modules/hooker/README.md create mode 100644 node_modules/grunt/node_modules/hooker/child.js create mode 100644 node_modules/grunt/node_modules/hooker/dist/ba-hooker.js create mode 100644 node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js create mode 100644 node_modules/grunt/node_modules/hooker/grunt.js create mode 100644 node_modules/grunt/node_modules/hooker/lib/hooker.js create mode 100644 node_modules/grunt/node_modules/hooker/package.json create mode 100644 node_modules/grunt/node_modules/hooker/parent.js create mode 100644 node_modules/grunt/node_modules/hooker/test/hooker_test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/.npmignore create mode 100644 node_modules/grunt/node_modules/iconv-lite/.travis.yml create mode 100644 node_modules/grunt/node_modules/iconv-lite/LICENSE create mode 100644 node_modules/grunt/node_modules/iconv-lite/README.md create mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/big5.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/index.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/package.json create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/big5-test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/big5File.txt create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/greek-test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/main-test.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/performance.js create mode 100644 node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js create mode 100644 node_modules/grunt/node_modules/js-yaml/HISTORY.md create mode 100644 node_modules/grunt/node_modules/js-yaml/LICENSE create mode 100644 node_modules/grunt/node_modules/js-yaml/README.md create mode 100644 node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/custom_types.js create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/dumper.js create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/dumper.json create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/sample_document.js create mode 100644 node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml create mode 100644 node_modules/grunt/node_modules/js-yaml/index.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js create mode 100644 node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js create mode 120000 node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse create mode 120000 node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/.npmignore create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/.travis.yml create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js create mode 100644 node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js create mode 100644 node_modules/grunt/node_modules/js-yaml/package.json create mode 100644 node_modules/grunt/node_modules/lodash/README.md create mode 100644 node_modules/grunt/node_modules/lodash/lodash.js create mode 100644 node_modules/grunt/node_modules/lodash/lodash.min.js create mode 100644 node_modules/grunt/node_modules/lodash/lodash.underscore.js create mode 100644 node_modules/grunt/node_modules/lodash/lodash.underscore.min.js create mode 100644 node_modules/grunt/node_modules/lodash/package.json create mode 100644 node_modules/grunt/node_modules/minimatch/.npmignore create mode 100644 node_modules/grunt/node_modules/minimatch/LICENSE create mode 100644 node_modules/grunt/node_modules/minimatch/README.md create mode 100644 node_modules/grunt/node_modules/minimatch/minimatch.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js create mode 100644 node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js create mode 100644 node_modules/grunt/node_modules/minimatch/package.json create mode 100644 node_modules/grunt/node_modules/minimatch/test/basic.js create mode 100644 node_modules/grunt/node_modules/minimatch/test/brace-expand.js create mode 100644 node_modules/grunt/node_modules/minimatch/test/caching.js create mode 100644 node_modules/grunt/node_modules/minimatch/test/defaults.js create mode 100644 node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js create mode 100644 node_modules/grunt/node_modules/nopt/.npmignore create mode 100644 node_modules/grunt/node_modules/nopt/LICENSE create mode 100644 node_modules/grunt/node_modules/nopt/README.md create mode 100644 node_modules/grunt/node_modules/nopt/bin/nopt.js create mode 100644 node_modules/grunt/node_modules/nopt/examples/my-program.js create mode 100644 node_modules/grunt/node_modules/nopt/lib/nopt.js create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/abbrev.js create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json create mode 100644 node_modules/grunt/node_modules/nopt/node_modules/abbrev/test.js create mode 100644 node_modules/grunt/node_modules/nopt/package.json create mode 100644 node_modules/grunt/node_modules/rimraf/AUTHORS create mode 100644 node_modules/grunt/node_modules/rimraf/LICENSE create mode 100644 node_modules/grunt/node_modules/rimraf/README.md create mode 100644 node_modules/grunt/node_modules/rimraf/bin.js create mode 100644 node_modules/grunt/node_modules/rimraf/package.json create mode 100644 node_modules/grunt/node_modules/rimraf/rimraf.js create mode 100644 node_modules/grunt/node_modules/rimraf/test/run.sh create mode 100644 node_modules/grunt/node_modules/rimraf/test/setup.sh create mode 100644 node_modules/grunt/node_modules/rimraf/test/test-async.js create mode 100644 node_modules/grunt/node_modules/rimraf/test/test-sync.js create mode 100644 node_modules/grunt/node_modules/underscore.string/.travis.yml create mode 100644 node_modules/grunt/node_modules/underscore.string/Gemfile create mode 100644 node_modules/grunt/node_modules/underscore.string/Gemfile.lock create mode 100644 node_modules/grunt/node_modules/underscore.string/README.markdown create mode 100644 node_modules/grunt/node_modules/underscore.string/Rakefile create mode 100644 node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js create mode 100644 node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js create mode 100644 node_modules/grunt/node_modules/underscore.string/package.json create mode 100644 node_modules/grunt/node_modules/underscore.string/test/run-qunit.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/speed.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/strings.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test.html create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_standalone.html create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css create mode 100644 node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js create mode 100644 node_modules/grunt/node_modules/underscore.string/test/underscore.js create mode 100644 node_modules/grunt/node_modules/which/LICENSE create mode 100644 node_modules/grunt/node_modules/which/README.md create mode 100644 node_modules/grunt/node_modules/which/bin/which create mode 100644 node_modules/grunt/node_modules/which/package.json create mode 100644 node_modules/grunt/node_modules/which/which.js create mode 100644 node_modules/grunt/package.json create mode 100644 package.json create mode 100644 ui/arongi/AXJ.min.css create mode 100644 ui/bulldog/AXJ.min.css create mode 100644 ui/cocker/AXJ.min.css create mode 100644 ui/flybasket/AXJ.min.css create mode 100644 ui/kakao/AXJ.min.css diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..0f282f01 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,81 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + options: { + stripBanners: true, + separator: ';', + banner: '/*! \n<%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> \n*/\n', + separator: '\n/* ---------------------------- */\n' + }, + dist: { + src: [ + 'lib/AXJ.js', + 'lib/AXDOMRange.js', + 'lib/AXDrag.js', + 'lib/AXEditor.js', + 'lib/AXExcelConvert.js', + //'lib/AXFrameSet.js', + 'lib/AXGrid.js', + 'lib/AXHtmlElement.js', + 'lib/AXInput.js', + 'lib/AXMobileMenu.js', + 'lib/AXModal.js', + 'lib/AXModelControl.js', + 'lib/AXModelControlGrid.js', + 'lib/AXMultiSelector.js', + 'lib/AXProgress.js', + //'lib/AXScheduleCalendar.js', + 'lib/AXSearch.js', + 'lib/AXSelect.js', + //'lib/AXSlidePPT.js', + 'lib/AXSlideViewer.js', + 'lib/AXTab.js', + //'lib/AXTimeTable.js', + 'lib/AXTopDownMenu.js', + 'lib/AXTree.js', + 'lib/AXUpload5.js', + 'lib/AXUserSelect.js', + 'lib/AXValidator.js', + 'lib/AXWaterfall.js' + ], + dest: 'dist/<%= pkg.name %>.all.js', + } + }, + uglify: { + options: { + mangle: false, + preserveComments: false + }, + my_target: { + files: { + 'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.all.js'] + } + } + }, + cssmin: { + add_banner: { + options: { + banner: '/*! \n<%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> \n*/\n' + }, + files: { + 'ui/arongi/AXJ.min.css': ['ui/arongi/*.css', '!ui/arongi/dx-*.css', '!ui/arongi/tx-*.css', '!ui/arongi/mx-*.css', '!ui/arongi/font-*.css', '!ui/arongi/*.min.css', '!ui/arongi/!page.css', '!ui/arongi/preset.css'], + 'ui/bulldog/AXJ.min.css': ['ui/bulldog/*.css', '!ui/bulldog/dx-*.css', '!ui/bulldog/tx-*.css', '!ui/bulldog/mx-*.css', '!ui/bulldog/font-*.css', '!ui/bulldog/*.min.css', '!ui/bulldog/!page.css', '!ui/bulldog/preset.css'], + 'ui/cocker/AXJ.min.css': ['ui/cocker/*.css', '!ui/cocker/dx-*.css', '!ui/cocker/tx-*.css', '!ui/cocker/mx-*.css', '!ui/cocker/font-*.css', '!ui/cocker/*.min.css', '!ui/cocker/!page.css', '!ui/cocker/preset.css'], + 'ui/flybasket/AXJ.min.css': ['ui/flybasket/*.css', '!ui/flybasket/dx-*.css', '!ui/flybasket/tx-*.css', '!ui/flybasket/mx-*.css', '!ui/flybasket/font-*.css', '!ui/flybasket/*.min.css', '!ui/flybasket/!page.css', '!ui/flybasket/preset.css'], + 'ui/kakao/AXJ.min.css': ['ui/kakao/*.css', '!ui/kakao/dx-*.css', '!ui/kakao/tx-*.css', '!ui/kakao/mx-*.css', '!ui/kakao/font-*.css', '!ui/kakao/*.min.css', '!ui/kakao/!page.css', '!ui/kakao/preset.css'] + } + } + } + }); + //grunt.loadTasks('tasks'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + + grunt.registerTask('default', ['concat','uglify','cssmin']); +}; \ No newline at end of file diff --git a/dist/AXJ.all.js b/dist/AXJ.all.js new file mode 100644 index 00000000..f066d91f --- /dev/null +++ b/dist/AXJ.all.js @@ -0,0 +1,33328 @@ +/*! +AXJ - v1.0.3 - 2014-05-19 +*/ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +var AXConfig = { + weekDays: [ + { label: "일" }, + { label: "월" }, + { label: "화" }, + { label: "수" }, + { label: "목" }, + { label: "금" }, + { label: "토" } + ], + AXReq: { + async: true, // AJAX 비동기 처리 여부 + okCode: "ok", // 통신 성공 코드 + responseType: "", // AJAX responseType + dataType: "", // AJAX return Data type + contentType: "application/x-www-form-urlencoded; charset=UTF-8", // AJAX contentType + dataSendMethod: "parameter", // AJAX parameter send type + crossDomain: false, + resultFormatter: function () { // onsucc formatter + return this; + } + }, + AXGrid: { + passiveMode: false, + passiveRemoveHide: false, + fitToWidthRightMargin: 10, + fitToWidth: false, + pageSize: 10, + pageHeight: 400, + keyResult: "result", + keyList: "list", + emptyListMSG: "empty of list", + listCountMSG: "{listCount} count(s)", + pageCountMSG: "page(s)" + }, + AXTree: { + fitToWidthRightMargin: 10, + fitToWidth: false, + 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 + } +}; + +var axf = AXUtil = { + async: true, + ajaxOkCode: "ok", + ajaxResponseType: "", + ajaxDataType: "", + gridPassiveMode: false, + gridPassiveRemoveHide: false, + 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 = length === undefined || Object.isFunction( obj ); + if ( isObj ) { + for ( name in obj ) { + if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { + break; + } + } + } + } + }, + browser: (function () { + var ua = navigator.userAgent.toLowerCase(); + var mobile = (ua.search(/mobile/g) != -1); + if (ua.search(/iphone/g) != -1) { + return { name: "iphone", version: 0, mobile: true } + } else if (ua.search(/ipad/g) != -1) { + return { name: "ipad", version: 0, mobile: true } + } else if (ua.search(/android/g) != -1) { + var match = /(android)[ \/]([\w.]+)/.exec(ua) || + []; + var browserVersion = (match[2] || "0"); + return { name: "android", version: browserVersion, mobile: mobile } + } else { + var browserName = ""; + + 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) || + []; + + var browser = (match[1] || ""); + var browserVersion = (match[2] || "0"); + + if (browser == "msie") browser = "ie"; + return { + name: browser, + version: browserVersion, + mobile: mobile + } + } + })(), + docTD: (function () { + if (!document.compatMode || document.compatMode == 'BackCompat') return "Q"; + else return "S"; + })(), + 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) { + if (rewrite == undefined) rewrite = true; + //trace(tg[k]); + if (obj) AXUtil.each(obj, function (k, v) { + if (rewrite) { tg[k] = v; } + else { + //trace(tg[k]); + if (tg[k] == undefined) tg[k] = v; + } + }); + return tg; + }, + copyObject: function (obj) { + //return Object.clone(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: "[하-힣]" } + ]; + var rword = ""; + var cwords = cword.split(""); + AXUtil.each(cwords, function (i, n) { + var fos = cons.searchObject(function () { + return this.item.c == n; + }); + var fo = fos.first(); + if (fo) rword += fo.re; + else rword += n; + }); + return 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) { var nameOfCookie = name + "="; var x = 0; while (x <= document.cookie.length) { var y = (x + nameOfCookie.length); if (document.cookie.substring(x, y) == nameOfCookie) { if ((endOfCookie = document.cookie.indexOf(";", y)) == -1) endOfCookie = document.cookie.length; return unescape(document.cookie.substring(y, endOfCookie)); } x = document.cookie.indexOf(" ", x) + 1; if (x == 0) break; } return ""; }, + JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, + dayLen: function (y, m) { if ([3, 5, 8, 10].has(function () { return this.item == m; })) { return 30; } else if (m == 1) { return (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) ? 29 : 28; } else { return 31; } }, + clientHeight: function () { return (AXUtil.docTD == "Q") ? document.body.clientHeight : document.documentElement.clientHeight; }, + scrollHeight: function () { return (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; }, + clientWidth: function () { return (AXUtil.docTD == "Q") ? document.body.clientWidth : document.documentElement.clientWidth; }, + scrollWidth: function () { return (AXUtil.docTD == "Q") ? 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 < arguments.length; i++) { + var obji = arguments[i]; + var objStr = ""; + var type = (typeof obji).toLowerCase(); + if (type == "undefined" || type == "function") { + objStr = type; + } else if (type == "boolean" || type == "number" || type == "string") { + objStr = obji; + } else if (type == "object") { + objStr = Object.toJSON(obji); + } + if (po != "") po += ", "; + po += "arg[" + i + "] : " + objStr; + } + } else { + var type = (typeof obj).toLowerCase(); + if (type == "undefined" || type == "function") { + po = type; + } else if (type == "boolean" || type == "number" || type == "string") { + po = obj; + } else if (type == "object") { + po = Object.toJSON(obj); + } + } + + if(axf.mobileConsole){ + axf.mobileConsole.prepend("
" + po + "
"); + }else{ + if (window.console == undefined) { + } else { + try { + console.log( po ); + //+ ":" + axf.console.caller.name + } catch (e) { + alert(e); + } + } + } + }, + alert: function (obj) { + var po = ""; + if (arguments.length > 1) { + for (i = 0; i < arguments.length; i++) { + var obji = arguments[i]; + var objStr = ""; + var type = (typeof obji).toLowerCase(); + if (type == "undefined" || type == "function") { + objStr = type; + } else if (type == "boolean" || type == "number" || type == "string") { + objStr = obji; + } else if (type == "object") { + objStr = Object.toJSON(obji); + } + if (po != "") po += ", "; + po += "arguments[" + i + "] : " + objStr; + } + } else { + var type = (typeof obj).toLowerCase(); + if (type == "undefined" || type == "function") { + po = type; + } else if (type == "boolean" || type == "number" || type == "string") { + po = obj; + } else if (type == "object") { + po = Object.toJSON(obj); + } + } + alert(po); + }, + confirm: function (obj) { + var po = ""; + var type = (typeof obj).toLowerCase(); + if (type == "undefined" || type == "function") { + po = type; + } else if (type == "boolean" || type == "number" || type == "string") { + po = obj; + } else if (type == "object") { + po = Object.toJSON(obj); + } + var result = confirm(po); + return result; + }, + importJS: function (src) { + var scriptElement = document.createElement("script"); + scriptElement.setAttribute("src", src); + scriptElement.setAttribute("type", "text/javascript"); + document.getElementsByTagName("head")[0].appendChild(scriptElement); + }, + bindPlaceholder: function () { + + }, + isEmpty: function (val) { + return (val === "" || val == null || val == undefined) ? true : false; + }, + getUrlInfo: function () { + var url, url_param, param, referUrl, pathName, AXparam, pageProtocol, pageHostName; + url_param = window.location.href; + param = window.location.search; + referUrl = document.referrer; + pathName = window.location.pathname; + url = url_param.replace(param, ''); + param = param.replace(/^\?/, ''); + pageProtocol = window.location.protocol; + pageHostName = window.location.hostname; + AXparam = url_param.replace(pageProtocol + "//", ""); + AXparam = (param) ? AXparam.replace(pageHostName + pathName + "?" + param, "") : AXparam.replace(pageHostName + pathName, ""); + return { + url : url, + param : param, + anchorData : AXparam, + urlParam : url_param, + referUrl : referUrl, + pathName : pathName, + protocol : pageProtocol, + hostName : pageHostName + }; + }, + encParam: function (str) { + var re = new RegExp("[^&?]*?=[^&?]*", "ig"); + var pars = []; + var arr; + while ((arr = re.exec(str)) != null) { + var strContent = arr.toString(); + var dotIndex = strContent.indexOf("="); + pars.push(strContent.substring(0, dotIndex) + "=" + strContent.substring(dotIndex + 1).enc()); + } + return pars.join("&"); + }, + readyMobileConsole: function(){ + AXUtil.mobileConsole = axdom("
"); + axdom(document.body).append(AXUtil.mobileConsole); + }, + parsingTable: function(elemObj, returnType){ + var head = {}, body = []; + elemObj.find("thead tr td").each(function(){ + var elem = axdom( this ); + var 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); + }); + return { + head: head, body: body + }; + } +}; + +try{ + var axdom = jQuery; +}catch(e){ + var axdom = axdomConverter; +} + +/* *** extend implement block ***************************** */ +var Class = (function () { + function subclass() { } + function create() { var parent = null, properties = AX_A(arguments); if (Object.isFunction(properties[0])) parent = properties.shift(); function klass() { this.initialize.apply(this, arguments); } Object.extend(klass, Class.Methods); klass.superclass = parent; klass.subclasses = []; if (parent) { subclass.prototype = parent.prototype; klass.prototype = new subclass; parent.subclasses.push(klass); } for (var i = 0; i < properties.length; i++) klass.addMethods(properties[i]); if (!klass.prototype.initialize) klass.prototype.initialize = Prototype.emptyFunction; klass.prototype.constructor = klass; return klass; } + function addMethods(source) { var ancestor = this.superclass && this.superclass.prototype; var properties = Object.keys(source); if (!Object.keys({ toString: true }).length) { if (source.toString != Object.prototype.toString) properties.push("toString"); if (source.valueOf != Object.prototype.valueOf) properties.push("valueOf"); } for (var i = 0, length = properties.length; i < length; i++) { var property = properties[i], value = source[property]; if (ancestor && Object.isFunction(value) && value.argumentNames().first() == "AXJ_super") { 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 () { + var _toString = Object.prototype.toString; + function extend(destination, source) { for (var property in source) destination[property] = source[property]; return destination; } + function inspect(obj) { try { if (isUndefined(obj)) return 'undefined'; if (obj === null) return 'null'; return obj.inspect ? obj.inspect() : String(obj); } catch (e) { if (e instanceof RangeError) return '...'; throw e; } } + function toJSON(object, qoute) { + var type = typeof object; + var isqoute = qoute; + if (isqoute == undefined) isqoute = true; + switch (type) { + case 'undefined': return "undefined"; + //case 'function': return "\"" + object.toString().replace(/\"/g, "\\\"") + "\""; + case 'function': return; + case 'unknown': return "unknown"; + case 'boolean': return object.toString(); + case 'number': return object.toString(); + case 'string': return object.axtoJSON(true); + } + if (object === null) return 'null'; + if (object.axtoJSON) return object.axtoJSON(isqoute); + if (isElement(object)) return; + var results = []; + for (var property in object) { + if (object.hasOwnProperty(property)) { + var value = toJSON(object[property], isqoute); + if (!isUndefined(value)) results.push(property.axtoJSON(isqoute) + ':' + value); + } + } + return '{' + results.join(', ') + '}'; + } + function toJSONfn(object, qoute) { + var type = typeof object; + var isqoute = qoute; + if (isqoute == undefined) isqoute = true; + switch (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(true); + } + if (object === null) return 'null'; + if (object.axtoJSON) return object.axtoJSON(isqoute); + if (isElement(object)) return; + var results = []; + for (var property in object) { + if (object.hasOwnProperty(property)) { + var value = toJSONfn(object[property], isqoute); + if (!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(true); + } + if (object === null) return 'null'; + if (object.toJSONforMobile) return object.toJSONforMobile(true); + if (isElement(object)) return; + var results = []; + for (var property in object) { + if (object.hasOwnProperty(property)) { + var value = axtoJSON(object[property]); + if (!isUndefined(value)) results.push(property.axtoJSON(true) + ':' + 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 && obj.nodeType == 1); } + function isObject(obj) { return _toString.call(obj) == "[object Object]"; } + function isArray(obj) { return _toString.call(obj) == "[object Array]"; } + function isHash(obj) { return obj instanceof Hash; } + function isFunction(obj) { return typeof obj === "function"; } + function isString(obj) { return _toString.call(obj) == "[object String]"; } + function isNumber(obj) { return _toString.call(obj) == "[object Number]"; } + function isUndefined(obj) { return typeof obj === "undefined"; } + 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 () { + var slice = Array.prototype.slice; + function update(array, args) { var arrayLength = array.length, length = args.length; while (length--) array[arrayLength + length] = args[length]; return array; } + function merge(array, args) { array = slice.call(array, 0); return update(array, args); } + function argumentNames() { var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '').replace(/\s+/g, '').split(','); return names.length == 1 && !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); timeout = timeout * 1000; return window.setTimeout(function () { return __method.apply(__method, args); }, timeout); } + function defer() { var args = update([0.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, i = 0, length = fns.length, isObj = length === undefined || Object.isFunction( fns ); if ( isObj ) { for ( name in fns ) { this.prototype[name] = fns[name]; } } } + 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(this.length == 14){ + 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 (this.length == 10) { + 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 (this.length == 8) { + var separator = (separator || "-"); + var va = this.replace(/\D/g, ""); + return (va.substr(0, 4) + separator + (va.substr(4, 2).number()-1) + separator + va.substr(6, 2)).date(); + } else if (this.length < 10) { + return (defaultDate || new Date()); + } else if (this.length > 15) { + try { + var aDateTime = this.split(/ /g); + var aDate = aDateTime[0].split(separator || "-"); + if (aDateTime[1]) { + var aTime = aDateTime[1]; + } else { + var aTime = "09:00"; + } + var is24 = true; + if (aTime.right(2) == "AM" || aTime.right(2) == "PM") { + is24 = false; + } + var aTimes = aTime.left(5).split(":"); + var hh = aTimes[0]; + var mm = aTimes[1]; + if (!is24) hh += 12; + return 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)); + } + } else { // > 10 + var now = new Date(); + return (defaultDate || new Date(now.getFullYear(), now.getMonth(), now.getDate(), 12)); + } + } + function toNum() { + var pair = this.replace(/,/g, "").split("."); + var isMinus = false; + if (parseFloat(pair[0]) < 0) isMinus = true; + if (pair[0] == "-0") isMinus = true; + var returnValue = 0.0; pair[0] = pair[0].replace(/[-|+]?[\D]/gi, ""); + if (pair[1]) { + pair[1] = pair[1].replace(/\D/gi, ""); + returnValue = parseFloat(pair[0] + "." + pair[1]) || 0; + } else { + returnValue = parseFloat(pair[0]) || 0; + } + return (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; + var RegExpJS = new RegExp("<[ ]*script[^>]*>[^<]*]*>", "gi"); + 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"); + + return cStr; + } + function times(count) { return count < 1 ? '' : 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() + } + ); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "" + escapedString.replace(/'/g, '\\\'') + ""; + } + function axtoJSON(TF) { + return this.inspect(TF || false); + } + function blank() { return /^\s*$/.test(this); } + function isJSON() { var str = this; if (str.isBlank()) return false; str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]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 { if (!sanitize || json.isJSON()) return eval("(" + json + ")"); else return { 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 {}; var rs = match[1].split(separator || '&'); var returnObj = {}; var i = 0; while (i < rs.length) { var pair = rs[i].split("="); var k = pair[0], v = pair[1]; if (returnObj[k] != undefined) { if (!Object.isArray(returnObj[k])) returnObj[k] = [returnObj[k]]; returnObj[k].push(v); } else { returnObj[k] = v; } i++; } return returnObj; } + function queryToObjectDec(separator) { var match = this.trim().match(/([^?#]*)(#.*)?$/); if (!match) return {}; var rs = match[1].split(separator || '&'); var returnObj = {}; var i = 0; while (i < rs.length) { var pair = rs[i].split("="); var k = pair[0], v = pair[1]; if (returnObj[k] != undefined) { if (!Object.isArray(returnObj[k])) returnObj[k] = [returnObj[k]]; returnObj[k].push(v.dec()); } else { returnObj[k] = v.dec(); } i++; } return returnObj; } + function crlf(replaceTarget, replacer) { return this.replace((replaceTarget || /\n/g), (replacer || "
")); } + 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; var reAt = /[\/\\]?([^\/\\]?\.?[^\/\\]+)$/; var reArr = sToMatch.match(reAt); return RegExp.$1; } + function toColor(sharp) { var colorValue = ""; if (this.left(3) == "rgb") { var val = this; var reAt = /rgb\((.+)\)/; val.match(reAt); var vals = RegExp.$1.split(", "); for (var a = 0; a < vals.length; a++) { vals[a] = vals[a].number().setDigit(2, '0', 16); } colorValue = vals.join(""); } else { colorValue = this.replace("#", ""); } var preFix = (sharp) ? "#" : ""; return preFix + colorValue; } + function toMoney() { return this.number().money(); } + function toByte() { return this.number().byte(); } + function lcase() { return this.toLowerCase(); } + function ucase() { return this.toUpperCase(); } + function getByte() { + var valueByte = this.length; + for (i = 0, l = this.length; i < l; i++) if (this.charCodeAt(i) > 128) valueByte++; + return valueByte; + } + function toPhoneString() { + if (this == "") return this; + var _this = this.replace(/\D+/g, ""); + var myLocalNums = ""; + var num1 = "", num2 = ""; + var 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 (_this.left(2) == "02") { + myLocalNums = "02"; + } else { + var localNums = localNum.split(/\//g); + var tempNum = _this.left(3); + AXUtil.each(localNums, function () { + if (this == tempNum) { + myLocalNums = this; + return false; + } + }); + } + + if (myLocalNums == "") { + myLocalNums = "02"; + if (_this.length > 7) { + num1 = _this.substr(0, 4); + num2 = _this.substr(4); + } else { + num1 = _this.substr(0, 3); + num2 = _this.substr(3); + } + } else { + try { + var snum = myLocalNums.length; + if ((_this.length - snum) > 7) { + num1 = _this.substr(snum, 4); + num2 = _this.substr(snum + 4); + } else { + num1 = _this.substr(snum, 3); + num2 = _this.substr(snum + 3); + } + } catch (e) { + //trace(e); + } + } + + var returnString = myLocalNums; + if (num1 != "") returnString += "-" + num1; + if (num2 != "") returnString += "-" + num2; + + return returnString; + + } + function getAnchorData() { + var idx = this.indexOf("#", 0); + if (idx < 0) return ""; + var cnt = this.length; + var 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 ""; } else { var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); var arrNumber = txtNumber.split('.'); arrNumber[0] += '.'; do { arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2'); } while (rxSplit.test(arrNumber[0])); if (arrNumber.length > 1) { return arrNumber.join(''); } else { return arrNumber[0].split('.')[0]; } } } + function toByte() { var n_unit = "KB"; var myByte = this / 1024; if (myByte / 1024 > 1) { n_unit = "MB"; myByte = myByte / 1024; } if (myByte / 1024 > 1) { n_unit = "GB"; myByte = myByte / 1024; } return myByte.round(1) + n_unit; } + function toNum() { return Math.round(this * 100000000000000) / 100000000000000; } + function formatDigit(length, padder, radix) { var string = this.toString(radix || 10); return (padder || '0').times(length - string.length) + string; } + function range(start) { var ra = []; for (var a = (start || 0) ; a < this + 1; a++) ra.push(a); return ra; } + function axtoJSON() { return this; } + function abs() { return Math.abs(this); } + function round(digit) { return Math.round((Math.round(this * 100000000000000) / 100000000000000) * 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) { if (divisor != 0) { return this / divisor; } else { return 0; } } + function none() { return this; } + function times(count) { return count < 1 ? '' : 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(); + var DyMilli = ((1000 * 60) * 60) * 24; + var aDate = new Date(this.getUTCFullYear(), this.getMonth(), this.getDate(), 12); + if (interval == "d") { + aDate.setTime(this.getTime() + (daynum * DyMilli)); + } else if (interval == "m") { + var yy = aDate.getFullYear(); + var mm = aDate.getMonth(); + var dd = aDate.getDate(); + /*if (mm == 0 && dd == 1) yy += 1;*/ + yy = yy + parseInt(daynum / 12); + mm += daynum % 12; + var mxdd = AXUtil.dayLen(yy, mm); + if (mxdd < dd) dd = mxdd; + aDate = new Date(yy, mm, dd, 12); + } else if (interval == "y") { + aDate.setTime(this.getTime() + ((daynum * 365) * DyMilli)); + } else { + + } + return aDate; + } + function dayDiff(edDate, tp) { + var DyMilli = ((1000 * 60) * 60) * 24; + //trace(this.print() +"/"+ edDate.print() + "//" + ((edDate.date() - this) / DyMilli) + "//" + ((edDate.date() - this) / DyMilli).floor()); + var y1 = this.getFullYear(); + var m1 = this.getMonth(); + var d1 = this.getDate(); + var hh1 = this.getHours(); + var mm1 = this.getMinutes(); + var dd1 = new Date(y1, m1, d1, hh1, mm1, this.getSeconds()); + + var day2 = edDate.date(); + var y2 = day2.getFullYear(); + var m2 = day2.getMonth(); + var d2 = day2.getDate(); + var hh2 = day2.getHours(); + var mm2 = day2.getMinutes(); + var dd2 = new Date(y2, m2, d2, hh2, mm2, this.getSeconds()); + + if (tp != undefined) { + if (tp == "D") { + DyMilli = ((1000 * 60) * 60) * 24; + dd2 = new Date(y2, m2, d2, hh1, mm1, this.getSeconds()); + } else if (tp == "H") { + DyMilli = ((1000 * 60) * 60); + } else if (tp == "mm") { + DyMilli = (1000 * 60); + } else { + DyMilli = ((1000 * 60) * 60) * 24; + dd2 = new Date(y2, m2, d2, hh1, mm1, this.getSeconds()); + } + } + + return ((dd2.getTime() - dd1.getTime()) / DyMilli).floor(); + + } + function toString(format) { + if (format == undefined) { + var sSeper = "-"; + return this.getUTCFullYear() + sSeper + (this.getMonth() + 1).setDigit(2) + sSeper + this.getDate().setDigit(2); + } else { + var fStr = format; + var nY, nM, nD, nH, nMM, nS, nDW; + 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; + var mre = /[^m]*(m{2})[^m]*/gi; mre.test(fStr); var regM = RegExp.$1; + var dre = /[^d]*(d{1,2})[^d]*/gi; dre.test(fStr); var regD = RegExp.$1; + var hre = /[^h]*(h{2})[^d]*/gi; hre.test(fStr); var regH = RegExp.$1; + var mire = /[^mi]*(mi)[^mi]*/gi; mire.test(fStr); var regMI = RegExp.$1; + var sre = /[^s]*(s{2})[^s]*/gi; sre.test(fStr); var regS = RegExp.$1; + var dwre = /[^d]*(dw)[^w]*/gi; dwre.test(fStr); var regDW = RegExp.$1; + + if (regY) { + fStr = fStr.replace(regY, nY.right(regY.length)); + } + if (regM) { + if (regM.length == 1) nM = (this.getMonth() + 1); + fStr = fStr.replace(regM, nM); + } + if (regD) { + if (regD.length == 1) nD = this.getDate(); + fStr = fStr.replace(regD, nD); + } + if (regH) { + fStr = fStr.replace(regH, nH); + } + if (regMI) { + fStr = fStr.replace(regMI, nMM); + } + if (regS) { + fStr = fStr.replace(regS, nS); + } + if (regS) { + fStr = fStr.replace(regDW, AXConfig.weekDays[nDW].label); + + } + return fStr; + } + } + function getTimeAgo() { + + var rtnStr = ""; + var nMinute = Math.abs((new Date()).diff(this, "mm")); + + var wknames = []; + wknames.push("일", "월", "화", "수", "목", "금", "토"); + + if (isNaN(nMinute)) { + rtnStr = "알수없음"; + } else { + if (parseInt(nMinute / 60 / 24) >= 1) { + rtnStr = this.print("yyyy년 mm월 dd일") + " " + wknames[this.getDay()]; + } else { + rtnStr = nMinute; + + if ((nMinute / 60) > 1) { + rtnStr = parseInt(nMinute / 60) + "시간 " + (nMinute % 60) + "분 전"; + } else { + rtnStr = nMinute + "분 전"; + } + } + } + return 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){ + if(dayOfStart == undefined) dayOfStart = 0; + var myDay = this.getDay() - dayOfStart; + if(myDay < 0) myDay = 7 + myDay; + return myDay; + } + return { + add: dateAdd, + diff: dayDiff, + print: toString, + date: date, + axtoJSON: axtoJSON, + getTimeAgo: getTimeAgo, + axGetDay: axGetDay + } +})()); + +Object.extend(Error.prototype, (function () { + function print() { + return (this.number & 0xFFFF) + " : " + this; + } + return { + print: print + } +})()); + +Object.extend(Array.prototype, (function () { + function clear() { + this.length = 0; + return this; + } + function first() { + return this[0]; + } + function last() { + return this[this.length - 1]; + } + function getToSeq(seq) { + if (seq > (this.length - 1)) { + return null; + } else { + return this[seq]; + } + } + function axtoJSON(qoute) { + var results = []; + for (var i = 0; i < this.length; i++) results.push(Object.toJSON(this[i], qoute)); + return '[' + results.join(', ') + ']'; + } + function toJSONforMobile() { + var results = []; + for (var i = 0; i < this.length; i++) results.push(Object.toJSONforMobile(this[i])); + return '[' + results.join(', ') + ']'; + } + function remove(callBack) { + var _self = this; + var collect = []; + AXUtil.each(this, function (index, O) { + if (!callBack.call({ index: index, item: O }, index, O)) collect.push(O); + }); + return collect; + } + function search(callBack) { + var _self = this; + var collect = []; + AXUtil.each(this, function (index, O) { + if (callBack.call({ index: index, item: O }, index, O)) collect.push(O); + }); + return collect.length; + } + function getObject(callBack) { + var _self = this; + var collect = []; + AXUtil.each(this, function (index, O) { + if (callBack.call({ index: index, item: O }, index, O)) collect.push(O); + }); + return collect; + } + function hasObject(callBack) { + var _self = this; + var collect = null; + AXUtil.each(this, function (index, O) { + if (callBack.call({ index: index, item: O }, index, O)) { + collect = O; + return false; + } + }); + return collect; + } + /* 13-06-13 메소드 확장 */ + function getMinObject(key) { + var tempArray = this.concat(); + tempArray = tempArray.sort(function (pItem, nItem) { + var v1 = pItem[key]; + var v2 = nItem[key]; + if (v1 < v2) return -1; + else if (v1 > v2) return 1; + else if (v1 == v2) return 0; + }); + return (tempArray.first() || {}); + } + function getMaxObject(key) { + var tempArray = this.concat(); + tempArray = tempArray.sort(function (pItem, nItem) { + var v1 = pItem[key]; + var v2 = nItem[key]; + if (v1 < v2) return 1; + else if (v1 > v2) return -1; + else if (v1 == v2) return 0; + }); + return (tempArray.first() || {}); + } + + function m_notall(context) { + context = context || function (x) { return x; }; + var result = true; + var i = 0; + while (i < this.length) { + result = !Boolean(context(this[i])); + if (!result) break; + i++; + } + return result; + } + function m_any(context) { + context = context || function (x) { return x; }; + var result = false; + var i = 0; + while (i < this.length) { + result = Boolean(context(this[i], i)); + if (result) break; + i++; + } + return result; + } + function m_find(context) { + context = context || function (x) { return false; }; + var myselect; + var i = 0; + while (i < this.length) { + if (context(this[i], i)) { + myselect = this[i]; + break; + } + i++; + } + return myselect; + } + function m_find2(context) { + if (!Object.isFunction(context)) { + findObj = context; + context = function (x) { return (x == findObj); } + } + var myselect, myindex; + var i = 0; + while (i < this.length) { + if (context(this[i], i)) { + myselect = this[i]; + myindex = i; + break; + } + i++; + } + return { obj: myselect, index: myindex }; + } + function m_findAll(context) { + context = context || function (x) { return false; }; + var myselect = [];; + var i = 0; + while (i < this.length) { + if (context(this[i], i)) myselect.push(this[i]); + i++; + } + return myselect; + } + function convertTree(parentKey, childKey, hashDigit) { + var tree = []; + var pointer = {}; + var seq = 0; + var hashDigit = hashDigit || 3; + for (var idx = 0; idx < this.length; idx++) { + var L = this[idx]; + if (!L.isRoot) { + pointer[L[childKey]] = idx; + + if (L[parentKey].number() == 0) { + L["subTree"] = []; + L.__subTreeLength = 0; + L["pHash"] = "0".setDigit(hashDigit); + L["hash"] = "0".setDigit(hashDigit) + "_" + seq.setDigit(hashDigit); + tree.push(AXUtil.copyObject(L)); + seq++; + } else { + L.__subTreeLength = 0; + } + } + } + + for (var idx = 0; idx < this.length; idx++) { + var L = this[idx]; + if (L["pHash"] == undefined && !L.isRoot) { + var pItem = this[pointer[L[parentKey]]]; + var pHash = pItem["hash"]; + var pHashs = pHash.split(/_/g); + var pTree = tree; + var pTreeItem; + axf.each(pHashs, function (idx, T) { + if (idx > 0) { + 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) { + if (!Object.isFunction(context)) { + findObj = context; + context = function (x) { return (x == findObj); } + } + var findObject, findIndex; + var i = 0; + while (i < this.length) { + var sobj = { + index: i, + item: this[i] + }; + if (context.call(sobj, sobj)) { + findObject = this[i]; + findIndex = i; + break; + } + i++; + } + return { item: findObject, index: findIndex }; + } + + return { + clear: clear, + first: first, + last: last, + getToSeq: getToSeq, + axtoJSON: axtoJSON, + toJSONforMobile: toJSONforMobile, + remove: remove, + search: search, + has: hasObject, + searchObject: getObject, + getMinObject: getMinObject, + getMaxObject: getMaxObject, + + not: m_notall, + or: m_any, + get: m_find, + gets: m_findAll, + getObj: m_find2, + getIndex: getIndex, + convertTree: convertTree + } +})()); + +/* **************************** extend implement block ** */ + +//JSON.stringify = Object.toJSON; +function AXgetId(id) { return document.getElementById(id); } +function AX_A(iterable) { if (!iterable) return []; if ('toArray' in Object(iterable)) return iterable.toArray(); var length = iterable.length || 0, results = new Array(length); while (length--) results[length] = iterable[length]; return results; } + +var trace = axf.console; +var getUrlInfo = axf.getUrlInfo; + +/* ** AXJ ********************************************** */ +var AXJ = Class.create({ + version: "AXJ - v1.0", + author: "tom@axisj.com", + logs: [ + "2012-09-28 오후 2:58:32 - 시작" + ], + initialize: function () { + this.config = { + debugMode: false, + hashSpliter: "_", + href: "href=\"javascript:;\"" + }; + }, + init: function () { + trace(Object.toJSON(this.config)); + }, + info: function (dispType) { + if (dispType == undefined || dispType == "console") + trace(this.version + "\n" + this.logs.join("\n")); + else if (dispType == "alert") + AXUtil.alert(this.version + "\n" + this.logs.join("\n")); + else if (dispType == "return") + return this.version + "\n" + this.logs.join("\n"); + }, + echo: function (msg, mtype) { + if (mtype == undefined || mtype == "console") + trace(msg); + else if (mtype == "alert") + AXUtil.alert(msg); + else if (mtype == "toast") + toast.push(msg); + else if (mtype == "dialog") + dialog.push(msg); + }, + setConfig: function (configs) { + var _self = this; + if (configs) AXUtil.each(configs, function (k, v) { _self.config[k] = v; }); + if(_self.config.target) if(_self.config.target.id === undefined || _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; + if (configs) AXUtil.each(configs, function (k, v) { _self.config[k] = v; }); + }, + getEventTarget: function (arg) { + var eventTarget = arg.evt; + var eid = (eventTarget && eventTarget.id && eventTarget.id != "") ? eventTarget.id.split(/_AX_/g) : []; + if (eventTarget) { + while (!arg.find(eventTarget, eid)) { + if (!eventTarget.parentNode) { eventTarget = null; break; } + if (arg.until) { if (arg.until(eventTarget, eid)) { eventTarget = null; break; } } + if (eventTarget.parentNode) { + eventTarget = eventTarget.parentNode; + try { + eid = (eventTarget && eventTarget.id && eventTarget.id != "") ? eventTarget.id.split(/_AX_/g) : []; + } catch (e) { + eid = []; + } + } else { + //trace("break"); + break; + } + } + } + return eventTarget; + }, + getMousePositon: function (event) { + var eventDoc, doc, body; + eventDoc = document; + doc = eventDoc.documentElement; + body = eventDoc.body; + var css = {}; + + //trace({ cy: event.clientY, st: (doc && doc.scrollTop || body && body.scrollTop || 0), ct: (doc && doc.clientTop || body && body.clientTop || 0) }); + 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); + return css; + }, + _GID: function (ids) { + var myid = []; + for (var a = 0; a < ids.length; a++) { + myid.push(ids[a]); + } + return myid.join("_"); + }, + _GPT: function (myid, idx) { + var ids = myid.split(/_/g); + if (idx == undefined) { + return ids.last(); + } else { + return ids[idx]; + } + }, + stopEvent: function (event) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + }, + clearRange: function () { + if (window.getSelection) { + if (window.getSelection().empty) { // Chrome + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { // Firefox + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { // IE? + document.selection.empty(); + } + }, + windowResize: function () { + var windowResizeApply = this.windowResizeApply.bind(this); + if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver); + this.windowResizeObserver = setTimeout(function () { + windowResizeApply(); + }, 100); + }, + windowResizeApply: function () { + + } +}); +/* ********************************************** AXJ ** */ + +/* ** AXReq ********************************************** */ +/** + * AXReqQue + * @class AXReqQue + * @extends + * @version v1.1 + * @author tom@axisj.com + * @logs + "2012-09-28 오후 2:58:32 - 시작" + "2014-04-10 - tom : onbeforesend 옵션 추가 return false 하면 호출 제어됨." + + * @description + * + ```js +var url = "AXReqData.txt"; +var pars = ""; +new AXReq(url, { + debug:false, + pars:pars, + onbeforesend: function(){ + alert("제어"); + return true; + }, + onsucc:function(res){ + AXUtil.alert(res); + }, + onerr:function(res){ + alert("onFail:" + req.responseText); + } +}); + ``` + * + */ +var AXReqQue = Class.create({ + initialize: function () { + this.que = []; + this.busy = false; + }, + add: function (obj) { + this.que.push(obj); + + try { + this.start(); + } catch (e) { + //AXUtil.alert(e); + } + }, + start: function () { + if (this.que.length == 0) return; + if (this.busy) return; + + this.busy = true; + var myQue = this.que.first(); + var _self = this; + var config = { + type: "post", + onsucc: "", + async: AXConfig.AXReq.async, + responseType: AXConfig.AXReq.responseType, + dataType: AXConfig.AXReq.dataType, + contentType: AXConfig.AXReq.contentType, + debug: false + }; + AXUtil.each(myQue.configs, function (k, v) { // update to {this.config} + if (k == "pars") { + + } + else { + config[k] = v; + } + }); + + var onerr = this.onerror.bind(this); + var ontimeout = this.ontimeout.bind(this); + var onsucc = this.onsucc.bind(this); + + if (AXConfig.AXReq.dataSendMethod != "json") { + + } else { + if (typeof myQue.configs.pars == "object") { + myQue.configs.pars.dummy = AXUtil.timekey(); + } else if (typeof myQue.configs.pars == "string") { + if (myQue.configs.pars == "") myQue.configs.pars += "dummy=" + AXUtil.timekey(); + else myQue.configs.pars += "&dummy=" + AXUtil.timekey(); + } + } + + if (config.debug) trace({ url: myQue.url, pars: myQue.configs.pars }); + + var ajaxOption = {}; + AXUtil.each(config, function (k, v) { // update to {this.config} + ajaxOption[k] = v; + }); + ajaxOption.url = myQue.url; + + if (AXConfig.AXReq.dataSendMethod == "json") ajaxOption["data"] = "{queryString:\"" + myQue.configs.pars + "\"}"; + else ajaxOption["data"] = myQue.configs.pars; + + ajaxOption.success = onsucc; + ajaxOption.error = onerr; + ajaxOption.timeout = ontimeout; + + + if (myQue.configs.onbeforesend) { + if(!myQue.configs.onbeforesend.call(ajaxOption)){ + return false; + } + } + + this.que[0]._jQueryAjax = axdom.ajax(ajaxOption); + }, + onsucc: function (req) { + if (req != undefined) { + var myQue = this.que.first(); + try { + if (myQue.configs.debug) trace("onsucc" + req); + if (myQue.configs.responseType == "text/html") { + var res = req; + } else { + if ((typeof req) == "string") { + var res = req.object(); + } else { + var res = AXConfig.AXReq.resultFormatter.call(req); + } + } + + if (res.result == "syntaxerr") { + if (myQue.configs.onerr) myQue.configs.onerr(res); + } else { + if (myQue.configs.onsucc) myQue.configs.onsucc(res); + } + } catch (e) { + if (myQue.configs.responseType == "text/html") { + + } else { + res.e = e; + } + if (myQue.configs.onerr) myQue.configs.onerr(res); + } + + this.que.shift(); + this.busy = false; + this.start(); + } + }, + onerror: function (req) { + var myQue = this.que.first(); + if (myQue.configs.onerr) myQue.configs.onerr(req); + else trace("error : " + Object.toJSON(req)); + + this.que.shift(); + this.busy = false; + try { + mask.close(); + } catch (e) { } + }, + ontimeout: function (req) { + trace("onTimeout:" + req.responseText); + this.que.shift(); + this.busy = false; + try { + mask.close(); + } catch (e) { } + }, + abort: function(){ + try{ + this.que[0]._jQueryAjax.abort(); + }catch(e){ + + } + } +}); +var myAXreqQue = new AXReqQue(); +var AXReqAbort = function(){ + myAXreqQue.abort(); +}; +var AXReq = Class.create({ + version: "AXReq v1.0", + author: "tom@axisj.com", + logs: [ + "2012-09-28 오후 2:58:32 - 시작" + ], + initialize: function (url, configs) { + if (window.location.toString().left(4) != "http") { + //dialog.push("현재 파일시스템으로 샘플 코드를 보고 계십니다. ajax 통신 관련한 기능은 정상 작동하지 않게 됩니다. "); + } + myAXreqQue.add({ url: url, configs: configs }); + } +}); +/* ********************************************** AXReq ** */ + +/* ** AXMask ********************************************** */ +var AXMask = Class.create(AXJ, { + version: "AXMask v1.0", + author: "tom@axisj.com", + logs: [ + "2012-10-06 오후 4:17:59" + ], + initialize: function (AXJ_super) { + AXJ_super(); + this.selects = []; + this.config.maskClassName = "AXMask"; + this.config.maskContentClassName = "AXMaskContent"; + this.config.content = "disable content"; + this.config.maskZindex = "5000"; + this.blinkTrack = []; + }, + init: function () { + this.mask = axdom("
"); + //this.content = axdom("
"); + }, + open: function (configs) { + axdom(document.body).append(this.mask); + var bodyHeight = 0; + (AXUtil.docTD == "Q") ? bodyHeight = document.body.clientHeight : bodyHeight = document.documentElement.clientHeight; + + if(configs){ + if(!configs.onclick) configs.onclick = configs.onClick; + if(configs.onclick){ + this.mask.bind("click.AXMask", configs.onclick); + } + } + }, + close: function (delay) { + if (!delay) { + this.mask.unbind("click.AXMask"); + this.mask.remove(); + } else { + var maskHide = this.hide.bind(this); + setTimeout(maskHide, delay); + } + 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: 0.1 }, time: 1000 }, { css: { opacity: 0.8 }, time: 1000 }]; + if (obj) this.blinkTrack = obj; + this.blinking(0); + }, + stopBlink: function (obj) { + this.blinkTrack.clear(); + }, + blinking: function (blinkIndex) { + if (this.blinkTrack.length > 0) { + var blinkTrack = this.blinkTrack; + var onblink = this.blinking.bind(this); + this.mask.animate(blinkTrack[blinkIndex].css, blinkTrack[blinkIndex].time, 'circInOut', function () { + onblink((blinkIndex + 1) % blinkTrack.length); + }); + } + } +}); +var mask = new AXMask(); +mask.setConfig(); +/* ********************************************** AXMask ** */ + +/* ** AXNotification ********************************************** */ +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; + if (config.type == "toast") { + this.toastTray = axdom("
"); + } else if (config.type == "dialog") { + this.dialogTray = axdom("
"); + //dialog type display center; + } + }, + push: function (obj) { + var config = this.config; + var breadID = config.targetID + "" + this.lasBreadSeq; + this.lasBreadSeq++; + + var po = []; + if ((typeof obj).toLowerCase() != "object") { + po.push("
"); + if (config.type == "dialog") { + po.push("
" + (obj.title || "Dialog Message") + "
"); + } + po.push("
"); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push("
"); + po.push(obj); + po.push("
"); + + if (config.type == "dialog") { + po.push("
"); + po.push(" "); + po.push("
"); + } + + po.push("
"); + po.push("
"); + + } else { + po.push("
"); + if (config.type == "dialog") { + po.push("
" + (obj.title || "Dialog Message") + "
"); + } + po.push("
"); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" "); + if (obj.type == "Caution" && config.type != "dialog") { + if (!obj.buttons) { + po.push(" "); + } + } + po.push(" "); + po.push(" "); + po.push("
"); + po.push(obj.body); + po.push(" "); + po.push(" "); + po.push("
"); + if (obj.buttons) { + po.push("
"); + AXUtil.each(obj.buttons, function (index, B) { + po.push(" "); + }); + po.push("
"); + } else if (config.type == "dialog") { + po.push("
"); + po.push(" "); + po.push("
"); + } + po.push("
"); + po.push("
"); + + } + + if (config.type == "toast") { + if (!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 (config.type == "dialog") { + if (!AXgetId(config.targetID)) axdom(document.body).append(this.dialogTray); + this.dialogTray.prepend(po.join('')); + + mask.open(); + var bodyWidth = (AXUtil.docTD == "Q") ? document.body.clientWidth : document.documentElement.clientWidth; + var l = bodyWidth / 2 - this.dialogTray.width() / 2; + this.dialogTray.css({ left: l + "px" }); + axdom("#bread_AX_" + breadID).fadeIn(); + + var endCheck = this.endCheck.bind(this); + + //Confirm button + axdom("#bread_AX_" + breadID + "_AX_confirm").bind("click", function () { + if (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(); + } + }); + }); + + //AXBUTTON + axdom(".AXNotificationButtons").find(".AXButton").bind("click", function (event) { + var eid = event.target.id.split(/_AX_/g); + var myBreadID = eid[1]; + var buttonSeq = eid.last(); + if (obj.buttons) { + if (obj.buttons[buttonSeq]) { + if (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){ + if(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 (this.bread.length == 0) { + return; + } + if (this.busy) return; + this.busy = true; + + var nextBread = this.nextBread.bind(this); + var endCheck = this.endCheck.bind(this); + + var myQue = this.bread.first(); + var 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(); + //axdom("#msg").html(axdom("#msg").html()+"
"+AXgetId("bread_AX_"+breadID)+"/"+breadID); + if (myQue.type != "Caution") { + 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 = false; + this.insertBread(); + }, + endCheck: function (breadID) { + if (axdom("#" + this.config.targetID).html() == "") { + this.lasBreadSeq = 0; + if (this.config.type == "dialog") { + mask.close(); + if(breadID) axdom(document.body).unbind("keyup."+breadID); + } + } + } +}); + +var toast = new AXNotification(); +toast.setConfig({ targetID: "basicToast", type: "toast" }); + +var dialog = new AXNotification(); +dialog.setConfig({ targetID: "basicDialog", type: "dialog" }); +/* ********************************************** AXNotification ** */ + +/* ** AXScroll ********************************************** */ +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 = false; + this.scrollBarAttr = {}; + this.Observer = null; + this.config.yscroll = true; + this.config.xscroll = false; + + this.minHeightSB = { TF: false, h: 0 }; + this.minWidthSB = { TF: false, w: 0 }; + }, + init: function () { + var config = this.config; + if (Object.isUndefined(config.targetID)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + if (Object.isUndefined(config.scrollID)) { + trace("need scrollID - setConfig({scrollID:''})"); + return; + } + 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(); + this.bindEvent(); + }, + updateScroll: function () { + this.initScroll(); + }, + initScroll: function () { + var cfg = this.config, _this = this; + if (!this.scroll) { + var po = []; + if (cfg.yscroll) { + po.push("
"); + po.push("
"); + } else { + this.scrollTargetID.css({ height: this.scrollScrollID.outerHeight() }); + /* + setTimeout(function(){ + + }, 10); + */ + } + if (cfg.xscroll) { + po.push("
"); + po.push("
"); + } + + this.scrollTargetID.append(po.join('')); + this.scroll = true; + + if (cfg.yscroll) { + this.scrollTrack = axdom("#" + cfg.targetID + "_AX_scrollTrack"); + this.scrollBar = axdom("#" + cfg.targetID + "_AX_scrollBar"); + } + if (cfg.xscroll) { + this.xscrollTrack = axdom("#" + cfg.targetID + "_AX_xscrollTrack"); + this.xscrollBar = axdom("#" + cfg.targetID + "_AX_xscrollBar"); + } + } else { + if (!cfg.yscroll) { + this.scrollTargetID.css({ height: this.scrollScrollID.outerHeight() }); + } + } + + var CTheight = this.scrollTargetID.innerHeight(); + var CTwidth = this.scrollTargetID.innerWidth(); + + if (cfg.yscroll) { + this.scrollTrack.css({ height: CTheight - 4 }); + } + if (cfg.xscroll) { + this.xscrollTrack.css({ width: CTwidth - 4 }); + } else { + this.scrollScrollID.css({ width: CTwidth }); + } + + var Cheight = this.scrollScrollID.outerHeight(); + var Cwidth = this.scrollScrollID.outerWidth(); + + + if (cfg.yscroll) { + var SBheight = CTheight * (CTheight - 4) / Cheight; + this.scrollBar.css({ height: Math.ceil(SBheight) }); + if (SBheight < 10) { + this.minHeightSB.TF = true; + this.minHeightSB.h = SBheight; + } + if (CTheight == Cheight || CTheight > Cheight) { + this.scrollTrack.hide(); + this.scrollBar.hide(); + this.scrollScrollID.css({ top: 0 }); + } else { + this.scrollTrack.show(); + this.scrollBar.show(); + } + } + if (cfg.xscroll) { + var SBwidth = CTwidth * (CTwidth - 4) / Cwidth; + this.xscrollBar.css({ width: Math.ceil(SBwidth) }); + if (SBwidth < 10) { + this.minWidthSB.TF = true; + this.minWidthSB.w = SBwidth; + } + if (CTwidth == Cwidth || CTwidth > Cwidth) { + this.xscrollTrack.hide(); + this.xscrollBar.hide(); + } else { + this.xscrollTrack.show(); + this.xscrollBar.show(); + } + } + }, + resizeScroll: function () { + this.initScroll(); + }, + bindEvent: function () { + var cfg = this.config; + + var CTheight = this.scrollTargetID.innerHeight(); + var Cheight = this.scrollScrollID.outerHeight(); + + if (cfg.xscroll) { + var CTwidth = this.scrollTargetID.innerWidth(); + var Cwidth = this.scrollScrollID.outerWidth(); + } + + /* event 선언자 */ + 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); + this.SBonMouseUpBind = function (event) { + SBonMouseUp(event); + } + this.SBonWheelBind = this.SBonWheel.bind(this); + /* event 선언자 */ + + this.scrollTargetID.bind("mouseover", this.tractActiveBind); + this.scrollTargetID.bind("mouseout", this.tractInActiveBind); + + if (cfg.yscroll) { + this.scrollBar.bind("dragstart", this.cancelEventBind); + this.scrollBar.bind("mousedown", this.SBonMouseDownBind); + } + + if (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) { //if IE (and Opera depending on user setting) + if (AXgetId(cfg.targetID)) AXgetId(cfg.targetID).attachEvent("on" + mousewheelevt, this.SBonWheelBind); + } else if (document.addEventListener) { //WC3 browsers + if (AXgetId(cfg.targetID)) AXgetId(cfg.targetID).addEventListener(mousewheelevt, this.SBonWheelBind, false); + } + if (document.addEventListener) { + var touchstart = this.touchstart.bind(this); + this.touchstartBind = function () { + touchstart(); + }; + if (AXgetId(cfg.targetID)){ + AXgetId(cfg.targetID).addEventListener("touchstart", this.touchstartBind, false); + } + } + }, + tractActive: function (event) { + var cfg = this.config; + + if (cfg.yscroll) { + this.scrollBar.addClass("scrollBar_hover"); + this.scrollTrack.addClass("scrollTrack_hover"); + } + + if (cfg.xscroll) { + this.xscrollBar.addClass("xscrollBar_hover"); + this.xscrollTrack.addClass("xscrollTrack_hover"); + } + + if (this.Observer) clearTimeout(this.Observer); //닫기 명령 제거 + this.initScroll(); + }, + tractInActive: function (event) { + var SBonWheelEnd = this.SBonWheelEnd.bind(this); + this.Observer = setTimeout(function () { + SBonWheelEnd(); + }, 500); + }, + getMousePosition: function (event) { + var config = this.config; + var pos = (this.scrollTrack) ? this.scrollTrack.offset() : { left: 0, top: 0 }; + var posx = (this.xscrollTrack) ? this.xscrollTrack.offset() : { left: 0, top: 0 }; + + var x = (event.pageX - posx.left); + var y = (event.pageY - pos.top); + return { x: x, y: y }; + }, + getTouchPosition: function (event) { + /* 사용안함. 옵션 */ + var config = this.config; + var touch = event.touches[0]; + var pos = this.scrollTrack.offset(); + if (this.config.touchDirection) { + var x = (touch.pageX - pos.left); + var y = (touch.pageY - pos.top); + } else { + var x = (-touch.pageX - pos.left); + var y = (-touch.pageY - pos.top); + } + return { x: x, y: y }; + }, + + + /* touch event init --- s */ + touchstart: function (e) { + if (this.touhEndObserver) clearTimeout(this.touhEndObserver); + if (this.touhMoveObserver) clearTimeout(this.touhMoveObserver); + + var cfg = this.config; + var touch; + var event = window.event; + touch = event.touches[0]; + if (!touch.pageX) return; + + this.touchStartXY = { + sTime: ((new Date()).getTime() / 1000), + 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); + }; + + if (document.removeEventListener) { + document.removeEventListener("touchend", this.touchEndBind, false); + document.removeEventListener("touchmove", this.touchMoveBind, false); + } + if (document.addEventListener) { + document.addEventListener("touchend", this.touchEndBind, false); + document.addEventListener("touchmove", this.touchMoveBind, false); + } + + var minLeft = 0; + var maxLeft = - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + var minTop = 0; + var maxTop = - (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight); + var scrollPosition = this.scrollScrollID.position(); + + if((scrollPosition.left < minLeft && scrollPosition.left > maxLeft) || (scrollPosition.top < minTop && scrollPosition.top > maxTop)){ + this.scrollScrollID.stop(); + if(cfg.yscroll) this.scrollBar.stop(); + if(cfg.xscroll) this.xscrollBar.stop(); + } + + this.tractActive(); + }, + touchMove: function (e) { + if (this.touhEndObserver) clearTimeout(this.touhEndObserver); + if (this.touhMoveObserver) clearTimeout(this.touhMoveObserver); + var cfg = this.config; + + var touch; + var event = window.event; + touch = event.touches[0]; + if (!touch.pageX) return; + + 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; + if(this.moveBlock({top:touch.pageY - this.touchStartXY.y})){ + if (event.preventDefault) event.preventDefault(); + else return false; + } + } + } else if ((this.touchStartXY.x - touch.pageX).abs() > (this.touchStartXY.y - touch.pageY).abs()) { + if (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; + if(this.moveBlock({left: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; + } + var touchMoveAfter = this.touchMoveAfter.bind(this); + this.touhMoveObserver = setTimeout(function () { + touchMoveAfter(touch); + }, 50); + }, + touchMoveAfter: function(touch){ + try{ + this.touchStartXY.sTime = ((new Date()).getTime() / 1000); + 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){ + //trace(e); + } + }, + touchEnd: function (e) { + var cfg = this.config; + var event = window.event || e; + //this.moveSens = 0; + //this.touchMode = false; + + if (document.removeEventListener) { + document.removeEventListener("touchend", this.touchEndBind, false); + document.removeEventListener("touchmove", this.touchMoveBind, false); + } + + var moveEndBlock = this.moveEndBlock.bind(this); + if(this.touchStartXY){ + this.touhEndObserver = setTimeout(function () { + moveEndBlock(); + }, 10); + } + }, + moveBlock: function(moveXY){ + var cfg = this.config; + var returnTF = true; + if(moveXY.left != undefined){ + var newLeft = (this.touchStartXY.sLeft + (moveXY.left)); + var minLeft = 0; + var maxLeft = - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + if(cfg.bounces){ + minLeft = this.touchStartXY.targetWidth * 0.4; + maxLeft = -((this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth) * 1.2); + } + if(newLeft > minLeft){ + newLeft = minLeft; + returnTF = false; + }else if(newLeft < maxLeft){ + newLeft = maxLeft; + returnTF = false; + } + this.scrollScrollID.css({left: newLeft}); + this.setScrollbarPositionForWheel("left"); + }else if(moveXY.top != undefined){ + var newTop = (this.touchStartXY.sTop + (moveXY.top)); + var minTop = 0; + var maxTop = - (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight); + if(cfg.bounces){ + minTop = this.touchStartXY.targetHeight * 0.4; + maxTop = -((this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight) * 1.2); + } + if(newTop > minTop){ + newTop = minTop; + returnTF = false; + }else if(newTop < maxTop){ + newTop = maxTop; + returnTF = false; + } + this.scrollScrollID.css({top: newTop}); + this.setScrollbarPositionForWheel("top"); + } + /*trace(moveXY);*/ + return returnTF; + //return true; + }, + moveEndBlock: function(){ + /* 관성발동여부 체크 */ + if(!this.touchStartXY) return; + var sTime = this.touchStartXY.sTime; + var eTime = ((new Date()).getTime() / 1000); + var dTime = eTime - sTime; + //var setScrollbarPositionForWheel = this.setScrollbarPositionForWheel.bind(this); + var tractInActive = this.tractInActive.bind(this); + + if(this.touchMode == "we"){ /* 좌우 */ + if (this.touchStartXY.scrollWidth <= this.touchStartXY.targetWidth) return; + var eLeft = this.scrollScrollID.position().left; + var dLeft = eLeft - this.touchStartXY.sLeft; + var velocityLeft = Math.ceil((dLeft/dTime)/1); // 속력= 거리/시간 + var endLeft = Math.ceil(eLeft + velocityLeft); //스크롤할때 목적지 + if(endLeft > 0) endLeft = 0; + else if(endLeft < - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth)){ + endLeft = - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + } + var newLeft = endLeft.abs(); + this.touchStartXY.sLeft = -newLeft; + this.scrollScrollID.animate({left: -newLeft}, (eLeft + newLeft).abs(), "circOut", function () { + tractInActive(); + }); + this.setScrollbarPositionForWheel("left", (eLeft + newLeft).abs(), "circOut", {left: -newLeft}); + + if (cfg.yscroll){ + var eTop = this.scrollScrollID.position().top; + var topChange = false; + if(eTop > 0){ + eTop = 0; + topChange = true; + }else if(eTop < - (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight)){ + eTop = (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight); + topChange = true; + } + if(topChange) this.scrollScrollID.css({top: -eTop}); + } + + }else{ /* 위아래 */ + if (this.touchStartXY.scrollHeight <= this.touchStartXY.targetHeight) return; + var eTop = this.scrollScrollID.position().top; + var dTop = eTop - this.touchStartXY.sTop; + var velocityTop = Math.ceil((dTop/dTime)/1); // 속력= 거리/시간 + var endTop = Math.ceil(eTop + velocityTop); //스크롤할때 목적지 + if(endTop > 0) endTop = 0; + else if(endTop < - (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight)){ + endTop = - (this.touchStartXY.scrollHeight - this.touchStartXY.targetHeight); + } + + var newTop = endTop.abs(); + this.touchStartXY.sTop = -newTop; + this.scrollScrollID.animate({top: -newTop}, (eTop + newTop).abs(), "circOut", function () { + tractInActive(); + }); + this.setScrollbarPositionForWheel("top", (eTop + newTop).abs(), "circOut", {top: -newTop}); + + if (cfg.xscroll){ + var eLeft = this.scrollScrollID.position().left; + var leftChange = false; + if(eLeft > 0){ + eLeft = 0; + leftChange = true; + }else if(eLeft < - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth)){ + eLeft = (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + leftChange = true; + } + if(leftChange) this.scrollScrollID.css({left: -eLeft}); + } + } + this.touchStartXY = null; + + }, + /* touch event init --- e */ + + + /* scrollBar event */ + SBonMouseDown: function (event) { + var config = this.config; + this.scrollBarMove = true; + var pos = this.getMousePosition(event); + var SBpos = this.scrollBar.position(); + var SBh = this.scrollBar.height(); + var STh = this.scrollTrack.height(); + var 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 }; + //trace("y:"+SBpos.top +" - "+ pos.y +", h:"+ SBh +", sth:"+STh+", calc y : "+(SBpos.top - pos.y).number()); + + 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) { + var config = this.config; + if (this.scrollBarMove) { + axdom(document.body).attr("onselectstart", "return false"); + axdom(document.body).addClass("AXUserSelectNone"); + var pos = this.getMousePosition(event); + + var SBy = pos.y + this.scrollBarAttr.y; + //trace(SBy +" = "+ pos.y +"+"+ this.scrollBarAttr.y); + + if (SBy < 2) SBy = 2; + if ((SBy + this.scrollBarAttr.h) > this.scrollBarAttr.sth) { + SBy = this.scrollBarAttr.sth - this.scrollBarAttr.h + 2; + //trace(SBy) + } + this.scrollBar.css({ top: SBy }); + this.setContentPosition(); + } + }, + SBonMouseUp: function (event) { + if (this.scrollBarMove) { + var config = this.config; + this.scrollBarMove = false; + 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) { + var config = this.config; + this.scrollBarMove = true; + var pos = this.getMousePosition(event); + var SBpos = this.xscrollBar.position(); + var SBw = this.xscrollBar.width(); + var STw = this.xscrollTrack.width(); + var 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) { + var config = this.config; + if (this.scrollBarMove) { + + axdom(document.body).attr("onselectstart", "return false"); + axdom(document.body).addClass("AXUserSelectNone"); + var pos = this.getMousePosition(event); + + var SBx = pos.x + this.scrollBarAttr.x; + //trace(SBy +" = "+ pos.y +"+"+ this.scrollBarAttr.y); + + if (SBx < 2) SBx = 2; + if ((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 (event) { + if (this.scrollBarMove) { + var config = this.config; + this.scrollBarMove = false; + 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) { + //content top handle + var config = this.config; + + var event = (window.event || e); + var delta = event.detail ? event.detail * (-10) : event.wheelDelta; //check for detail first so Opera uses that instead of wheelDelta + + var Sy = this.scrollScrollID.position().top; + var Sh = this.scrollScrollID.outerHeight(); + var TGh = this.scrollTargetID.height(); + + //trace(Sh+" + "+Sy+" < "+TGh ); + if (Sh < TGh) return; //스크롤 할 대상이 없음 2013-02-08 오후 5:48:07 tom@axmods.com + + var eventCancle = false; + Sy += delta; + if (Sy > 0) { + Sy = 0; + eventCancle = true; + } + + //trace(Sh+" + "+Sy+" < "+TGh ); + + if ((Sh + Sy) < TGh) { + Sy = (TGh - Sh); + eventCancle = true; + } + this.scrollScrollID.css({ top: Sy }); + + //this.setContentPosition(); + this.setScrollbarPositionForWheel("top"); + + if (!eventCancle) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + } + + }, + SBonWheelEnd: function () { + if (this.scrollBarMove) return; + var config = this.config; + + if (config.yscroll) { + this.scrollBar.removeClass("scrollBar_hover"); + this.scrollTrack.removeClass("scrollTrack_hover"); + } + + if (config.xscroll) { + this.xscrollBar.removeClass("xscrollBar_hover"); + this.xscrollTrack.removeClass("xscrollTrack_hover"); + } + + }, + cancelEvent: function (event) { + event.stopPropagation(); // disable event + return false; + }, + setContentPosition: function (xscroll) { + var config = this.config; + + if (xscroll == "xscroll") { + var SBx = this.xscrollBar.position().left; + var STw = this.STw; + var Cw = this.Cw; + + var CTwidth = this.CTwidth; + var Cwidth = this.Cwidth; + var SBwidth = CTwidth * (CTwidth - 4) / Cwidth; + + if (SBwidth < 10) { //스크롤 바가 최소값일 때 + var addLeft, Cleft; + if (SBx == 2) SBx = 0; + addLeft = ((10 - this.minWidthSB.w) / (STw - 10)) * SBx; + addLeft = addLeft == 0 ? addLeft = 0 : addLeft = addLeft - 1; + if (STw - 10 > SBx) { + Cleft = (SBx + addLeft) * Cw / STw; + } else { + Cleft = Cw - CTwidth; + } + if ((SBx) == STw) { + Cleft = Cw - CTwidth; + } + } else { + SBx = SBx == 2 ? SBx = 0 : SBx = SBx - 2; + var Cleft = SBx * Cw / STw; + } + this.scrollScrollID.css({ left: -(Cleft.round()) }); + } else { + var SBy = this.scrollBar.position().top; + var STh = this.STh; + var Ch = this.Ch; + + var CTheight = this.CTheight; + var Cheight = this.Cheight; + var SBheight = CTheight * (CTheight - 4) / Cheight; + + if (SBheight < 10) { //스크롤 바가 최소값일 때 + var addTop, Ctop; + if (SBy == 2) SBy = 0; + addTop = ((10 - this.minHeightSB.h) / (STh - 10)) * SBy; + addTop = addTop == 0 ? addTop = 0 : addTop = addTop - 1; + if (STh - 10 > SBy) { + Ctop = (SBy + addTop) * Ch / STh; + } else { + Ctop = Ch - CTheight; + } + if ((SBy) == STh) { + Ctop = Ch - CTheight; + } + } else { + SBy = SBy == 2 ? SBy = 0 : SBy = SBy - 2; + var Ctop = SBy * Ch / STh; + } + this.scrollScrollID.css({ top: -(Ctop.round()) }); + } + + }, + + setScrollbarPositionForWheel: function (direction, duration, easing, position) { + //scrollbar top position handle for wheel + var config = this.config; + + if(direction == "left"){ + if(position){ + var Sy = position.left; + }else{ + var Sy = this.scrollScrollID.position().left; + } + + var STh = this.xscrollTrack.outerWidth(); + var Sh = this.scrollScrollID.outerWidth(); + var SBh = this.xscrollBar.outerWidth(); + + var SBy = (-Sy * STh) / Sh; + + var addTop = 0; + if (this.minWidthSB.TF) { + addTop = Math.floor(((10 - this.minWidthSB.h) / (STh - 4 - 10)) * SBy); + //addTop = addTop == 0 ? addTop = 0 : addTop = addTop + 1; + } + + var addY = 0; + if (SBy < 2) { + addY = (SBy).abs(); + SBy = 2; + } else { + addY = 0; + SBy = SBy - addTop; + if ((SBy + SBh) > STh) { + addY = (SBy + SBh) - STh; + SBy = STh - SBh + 2; + } + } + if(easing){ + this.xscrollBar.animate({ + left: SBy, + width: Math.ceil(this.scrollTargetID.outerWidth() * (this.scrollTargetID.outerWidth() - 4) / (this.scrollScrollID.outerWidth() + addY)) + }, duration, easing, function () {}); + }else{ + this.xscrollBar.css({ + left: SBy, + width: Math.ceil(this.scrollTargetID.outerWidth() * (this.scrollTargetID.outerWidth() - 4) / (this.scrollScrollID.outerWidth() + addY)) + }); + } + }else{ + if (!config.yscroll) return false; + //wheel control event is not jquery event ! + + if(position){ + var Sy = position.top; + }else{ + var Sy = this.scrollScrollID.position().top; + } + var STh = this.scrollTrack.outerHeight(); + var Sh = this.scrollScrollID.outerHeight(); + var SBh = this.scrollBar.outerHeight(); + + var SBy = (-Sy * STh) / Sh; + + var addTop = 0; + if (this.minHeightSB.TF) { + addTop = Math.floor(((10 - this.minHeightSB.h) / (STh - 4 - 10)) * SBy); + //addTop = addTop == 0 ? addTop = 0 : addTop = addTop + 1; + } + + var addY = 0; + if (SBy < 2) { + addY = (SBy).abs(); + SBy = 2; + } else { + addY = 0; + SBy = SBy - addTop; + if ((SBy + SBh) > STh) { + addY = (SBy + SBh) - STh; + SBy = STh - SBh + 2; + } + } + if(easing){ + //trace({ top: SBy }, duration, easing); + this.scrollBar.animate({ + top: SBy, + height: Math.ceil(this.scrollTargetID.outerHeight() * (this.scrollTargetID.outerHeight() - 4) / (this.scrollScrollID.outerHeight() + addY)) + }, duration, easing, function () {}); + }else{ + this.scrollBar.css({ + top: SBy, + height: Math.ceil(this.scrollTargetID.outerHeight() * (this.scrollTargetID.outerHeight() - 4) / (this.scrollScrollID.outerHeight() + addY)) + }); + } + + } + }, + + + setSBPosition: function () { + var config = this.config; + var Ctop = this.scrollScrollID.position().top; + var CTheight = this.scrollTargetID.innerHeight(); + var STh = this.scrollTrack.height() + 8; + var Ch = this.scrollScrollID.outerHeight(); + + var SBh = this.scrollBar.height(); + + //trace({Ctop:Ctop, CTheight:CTheight, Ch:Ch, STh:STh, SBh:SBh, x:(STh*Ctop)/Ch}); + + var SBtop = -(STh * Ctop) / Ch; + if (SBtop < 0) SBtop; + if ((SBtop + SBh) > STh) SBtop = STh - SBh; + this.scrollBar.css({ top: SBtop }); + + }, + focusElement: function (id) { + var config = this.config; + if (AXgetId(id)) { + //trace(axdom("#"+id).position()); + var pos = axdom("#" + id).position(); + + var myNewTop = pos.top; + var CTheight = this.scrollTargetID.innerHeight(); + var Cheight = this.scrollScrollID.outerHeight(); + if ((Cheight - myNewTop) < CTheight) { + myNewTop = Cheight - CTheight; + } + if (myNewTop < 0) myNewTop = 0; + this.scrollScrollID.css({ top: -myNewTop }); + this.setSBPosition(); + } + }, + scrollTop: function (top) { + var myNewTop = top; + var CTheight = this.scrollTargetID.innerHeight(); + var Cheight = this.scrollScrollID.outerHeight(); + if ((Cheight - myNewTop) < CTheight) { + myNewTop = Cheight - CTheight; + } + if (myNewTop < 0) myNewTop = 0; + this.scrollScrollID.css({ top: -myNewTop }); + this.setSBPosition(); + }, + moveTo: function (x, y) { + + var cfg = this.config; + var css = {}; + if (!AXUtil.isEmpty(x)) { + css.left = -x; + } + if (!AXUtil.isEmpty(y)) { + css.top = -y; + } + + this.scrollScrollID.css(css); + if (cfg.yscroll && !AXUtil.isEmpty(css.top)) { + this.scrollBar.css({ top: css.top }); + } + if (cfg.xscroll && !AXUtil.isEmpty(css.left)) { + this.xscrollBar.css({ left: css.left }); + } + + }, + unbind: function () { + var config = this.config; + this.scroll = false; + + this.scrollTrack.remove(); + this.scrollBar.remove(); + + this.scrollTargetID.unbind("mouseover", this.tractActiveBind); + this.scrollTargetID.unbind("mouseout", this.tractInActiveBind); + + //axdom("#"+config.targetID+"_AX_scrollBar").unbind("dragstart", this.cancelEventBind); + //axdom("#"+config.targetID+"_AX_scrollBar").unbind("mousedown", this.SBonMouseDownBind); + 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"; + if (document.attachEvent) { //if IE (and Opera depending on user setting) + if (AXgetId(config.targetID)) AXgetId(config.targetID).detachEvent("on" + mousewheelevt, this.SBonWheelBind); + } else if (document.addEventListener) { //WC3 browsers + if (AXgetId(config.targetID)) AXgetId(config.targetID).removeEventListener(mousewheelevt, this.SBonWheelBind, false); + } + + if (document.addEventListener) { + if (AXgetId(config.targetID)) AXgetId(config.targetID).removeEventListener("touchstart", this.SBtouchstartBind, false) + } + + } +}); +/* ********************************************** AXScroll ** */ + +/* ** AXCalendar ********************************************** */ +var 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; + if (cfg.basicDate != undefined) { + return cfg.basicDate.date(); + } else { + return new Date(); + } + }, + getCalendarStartDate: function (date) { + var cfg = this.config; + var calendarStartDate, monthStartDate, basicDate; + basicDate = (date) ? date.date() : this.getBasicDate(); + monthStartDate = new Date(basicDate.getFullYear(), basicDate.getMonth(), 1, 12); + var calendarStartDateDay = monthStartDate.getDay(); + if (calendarStartDateDay == 0) calendarStartDateDay = 7; + calendarStartDate = monthStartDate.add(-calendarStartDateDay); + return { calendarStartDate: calendarStartDate, monthStartDate: monthStartDate }; + }, + printDayPage: function (date) { + var cfg = this.config; + + if (Object.isUndefined(cfg.targetID)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + + var calendarDate = this.getCalendarStartDate(date); + var calendarStartDate = calendarDate.calendarStartDate; + var monthStartDate = calendarDate.monthStartDate; + var basicDate = this.getBasicDate(); + var setDate = (date) ? date.date() : new Date(); + // + var po = []; + po.push("
"); + po.push(""); + po.push(""); + po.push(""); + axf.each(cfg.weeks, function (wi, ww) { + po.push(""); + }); + po.push(""); + po.push(""); + po.push(""); + var roopDate = calendarStartDate; + var i = 0; while (i < 6) { + po.push(""); + var k = 0; while (k < 7) { + var dayValue = roopDate.print(this.config.printFormat); + var addClass = []; + var tdClass = []; + if (roopDate.getMonth() != monthStartDate.getMonth()) addClass.push("notThisMonth"); + if (setDate.diff(roopDate, "D") == 0) 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)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + var setDate = (date) ? date.date() : new Date(); + //alert(setDate); + var po = []; + po.push("
"); + po.push(""); + po.push(""); + + var m = 1; + var i = 0; while (i < 4) { + po.push(""); + var k = 0; while (k < 3) { + var tdClass = []; + if (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)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + var po = []; + po.push("
"); + po.push(""); + po.push(""); + + var m = year - 4; + var i = 0; while (i < 4) { + po.push(""); + var k = 0; while (k < 3) { + var tdClass = []; + if (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)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + + if (displayTime) { + var now = displayTime.split(":"); + var hh = now[0].setDigit(2); + var mm = now[1].left(2).setDigit(2); + var apm = now[1].right(2); + if (hh == "00" && mm == "00") { + hh = "12"; + apm = "PM"; + } + if (apm == "00") apm = "AM"; + } else { + var now = new Date(); + var hh = now.getHours(); + var mm = now.getMinutes(); + var apm = "AM"; + if (hh == 0 && mm == 0) { + hh = 24; + } + if (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 (objID, objVal) { + var cfg = this.config; + + if(axdom("#" + cfg.targetID + "_AX_AMPM").val() == "PM"){ + if(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(); + axdom("#" + cfg.targetID + "_AX_box").find(".timeDisplay").html(mytime); + if (cfg.onChange) { + var hh = axdom("#" + cfg.targetID + "_AX_hour").val().number(); + var mi = axdom("#" + cfg.targetID + "_AX_minute").val().number(); + var apm = axdom("#" + cfg.targetID + "_AX_AMPM").val(); + if (apm == "PM") hh += 12; + cfg.onChange(hh.setDigit(2) + ":" + mi.setDigit(2)); + } + }, + getTime: function () { + var cfg = this.config; + var hh = axdom("#" + cfg.targetID + "_AX_hour").val().number(); + var mi = axdom("#" + cfg.targetID + "_AX_minute").val().number(); + var apm = axdom("#" + cfg.targetID + "_AX_AMPM").val(); + if (apm == "PM") hh += 12; + return hh.setDigit(2) + ":" + mi.setDigit(2); + } +}); +/* ********************************************** AXCalendar ** */ + +/* ** AXMultiSelect ********************************************** */ +var 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 = true; + }, + init: function () { + + var mouseClick = this.onmouseClick.bind(this); + this._selectStage = axdom("#" + this.config.selectStage); + this._selectStage.css({ "position": "relative" }); + + /* + if(AXUtil.browser.mobile){ + this._selectStage.css({"overflow":"visible", "min-height":this._selectStage.innerHeight(), "height":"auto"}); + } + */ + + 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) { + if (event.keyCode == AXUtil.Event.KEY_ESC) { + this.clearSelects(); + } + }, + onScrollStage: function (event) { + var cfg = this.config; + if (!AXUtil.browser.mobile) { + if (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 = false; + this.helperAppened = false; + this.helper.remove(); + } + } + + }, + /* ------------------------------------------------------------------------------------------------------------------ */ + /* observe method ~~~~~~ */ + onmouseClick: function (element, 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 (AXgetId(evt.parentNode) == AXgetId(cfg.selectStage)) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass(cfg.selectClassName)) ? true : false; } + }); + //trace("click"); + if (myTarget) { + var selectElement = myTarget; + if (selectElement) { + if (event.shiftKey) { + this.shiftSelects(selectElement); + } else if (event.metaKey || event.ctrlKey) { + this.toggleSelects(selectElement); + } else { + this.clickSelects(selectElement); + } + } + } else { + + if (event.target.id == cfg.selectStage && AXUtil.browser.name != "ie") this.clearSelects(); + return; + } + }, + /* ------------------------------------------------------------------------------------------------------------------ */ + /* class method ~~~~~~ */ + collect: function () { + var cfg = this.config; + this._selectTargets = axdom("#" + cfg.selectStage + " ." + cfg.selectClassName); + this.selectTargets = this._selectTargets.get(); + var scrollLeft = this._selectStage.scrollLeft().number(); + var 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"); + if (selectTarget) { + if (selectTarget.selecting) { + selectTarget.jQueryelement.removeClass(cfg.selectingClassName); + selectTarget.selecting = false; + } + if (selectTarget.selected) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } + } + }); + }, + pushSelects: function (Obj) { + var hasSelect = this.selects.has(function () { + return this.item == Obj; + }); + if (!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 = true; + }, + toggleSelects: function (Obj) { + var cfg = this.config; + + var selectTarget = axdom.data(Obj, "selectableItem"); + if (selectTarget.selected) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } else { + selectTarget.jQueryelement.addClass(cfg.beselectClassName); + selectTarget.selected = true; + } + }, + shiftSelects: function (Obj) { + var cfg = this.config; + + var selectedLength = 0; + var li, si; + this._selectTargets.each(function (stIndex, ST) { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (selectTarget.selected) { + selectedLength++; + li = stIndex; + } + } + if (this === Obj) si = stIndex; + }); + + if (selectedLength == 0) { + this.clickSelects(Obj); + } else { + //마지막 selects 개체를 찾는다. + if (si == li) return; + this.clearSelects(); + var temp; + if (si > li) { + temp = si; + si = li; + li = temp; + } + this._selectTargets.each(function (stIndex, ST) { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (si <= stIndex && li >= stIndex) { + selectTarget.jQueryelement.addClass(cfg.beselectClassName); + selectTarget.selected = true; + } + } + }); + } + }, + + /* mouser helper */ + mousedown: function (event) { + var cfg = 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 = true; + }, + mousemove: function (event) { + var cfg = this.config; + if (!event.pageX) return; + + /*드래그 감도 적용 */ + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) this.selectorHelperMove(event); + }, + mouseup: function (event) { + var cfg = this.config; + + this.helperAppenedReady = false; + 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"); + + if (this.helperAppened) { + this.helperAppened = false; + this.helper.remove(); + + /* selected change */ + this._selectTargets.each(function () { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (selectTarget.selecting) { + selectTarget.jQueryelement.removeClass(cfg.selectingClassName); + selectTarget.selecting = false; + selectTarget.jQueryelement.addClass(cfg.beselectClassName); + selectTarget.selected = true; + } else if (selectTarget.selected) { + + } + } + }); + } + + }, + selectorHelperMove: function (event) { + var cfg = this.config; + + if (!cfg.useHelper) { + return; + } + + if (this.helperAppened) { + + var _helperPos = this.helperPos; + var tmp, + x1 = this.helperPos.x, + y1 = this.helperPos.y, + x2 = event.pageX - _helperPos.bodyLeft, + y2 = event.pageY - _helperPos.bodyTop; + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (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 = false; + /*trace({sl:selectTarget.left, sr:selectTarget.right, st:selectTarget.top, sb:selectTarget.bottom, x1:x1, x2:x2, y1:y1, y2:y2}); */ + if (!selectTarget) return; + + 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 || stR < x1 || stT > y2 || stB < y1)); /* touch */ + /* hit = (selectTarget.left > x1 && selectTarget.right < x2 && selectTarget.top > y1 && selectTarget.bottom < y2); fit */ + if (hit) { + /* SELECT */ + if (selectTarget.selected) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } + if (!selectTarget.selecting) { + selectTarget.jQueryelement.addClass(cfg.selectingClassName); + selectTarget.selecting = true; + } + } else { + /* UNSELECT */ + if (selectTarget.selecting) { + selectTarget.jQueryelement.removeClass(cfg.selectingClassName); + selectTarget.selecting = false; + } + if (selectTarget.selected) { + if (!event.metaKey && !event.shiftKey && !event.ctrlKey) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } + } + } + }); + + } else { + this.helperAppened = true; + 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 + }; + } + }, + + /* touch helper */ + touchstart: function (event) { + var cfg = this.config; + + 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); + } + + this.helperAppenedReady = true; + }, + touchMove: function (event) { + var cfg = this.config; + var event = window.event || e; + var touch = event.touches[0]; + if (!touch.pageX) return; + var offset = this._selectStage.offset(); + var right = offset.left + this._selectStage.width(); + var bottom = offset.top + this._selectStage.height(); + + if (this.moveSens == 0) { + this.touchStartXY = { x: touch.pageX, y: touch.pageY, scrollTop: this._selectStage.scrollTop() }; + } + + /*드래그 감도 적용 */ + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) { + if (this.touchMode == "drag") { + if (bottom < touch.pageY) this._selectStage.scrollTop(this.touchStartXY.scrollTop - (bottom - touch.pageY)); + else if (offset.top > touch.pageY) this._selectStage.scrollTop(this.touchStartXY.scrollTop - (offset.top - touch.pageY)); + if (right < touch.pageX) this._selectStage.scrollLeft(this.touchStartXY.scrollLeft - (right - touch.pageX)); + else if (offset.left > touch.pageX) this._selectStage.scrollLeft(this.touchStartXY.scrollLeft - (offset.left - touch.pageX)); + this.selectorHelperMoveByTouch(event); + } else if (this.touchMode == "scrollTop") { + this._selectStage.scrollTop(this.touchStartXY.scrollTop + (this.touchStartXY.y - touch.pageY)); + } else if (this.touchMode == "scrollLeft") { + this._selectStage.scrollLeft(this.touchStartXY.scrollLeft + (this.touchStartXY.x - touch.pageX)); + } else { + if (((this.touchStartXY.x - touch.pageX).abs() - (this.touchStartXY.y - touch.pageY).abs()).abs() < 5) { + this.touchMode = "drag" + this.selectorHelperMoveByTouch(event); + } else if ((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)); + } else if ((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)); + } + } + } + + if (event.preventDefault) event.preventDefault(); + else return false; + }, + selectorHelperMoveByTouch: function (e) { + var cfg = this.config; + var event = window.event || e; + var touch = event.touches[0]; + + if (this.helperAppened) { + + var _helperPos = this.helperPos; + var tmp, + x1 = this.helperPos.x, + y1 = this.helperPos.y, + x2 = touch.pageX - _helperPos.bodyLeft, + y2 = touch.pageY - _helperPos.bodyTop; + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (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 = false; + /*trace({sl:selectTarget.left, sr:selectTarget.right, st:selectTarget.top, sb:selectTarget.bottom, x1:x1, x2:x2, y1:y1, y2:y2}); */ + if (!selectTarget) return; + + 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 || stR < x1 || stT > y2 || stB < y1)); /* touch */ + /* hit = (selectTarget.left > x1 && selectTarget.right < x2 && selectTarget.top > y1 && selectTarget.bottom < y2); fit */ + if (hit) { + /* SELECT */ + if (selectTarget.selected) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } + if (!selectTarget.selecting) { + selectTarget.jQueryelement.addClass(cfg.selectingClassName); + selectTarget.selecting = true; + } + } else { + /* UNSELECT */ + if (selectTarget.selecting) { + selectTarget.jQueryelement.removeClass(cfg.selectingClassName); + selectTarget.selecting = false; + } + if (selectTarget.selected) { + if (!event.metaKey && !event.shiftKey && !event.ctrlKey) { + selectTarget.jQueryelement.removeClass(cfg.beselectClassName); + selectTarget.selected = false; + } + } + } + }); + + } else { + this.helperAppened = true; + 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; + var event = window.event || e; + this.helperAppenedReady = false; + this.moveSens = 0; + + this.touchMode = false; + + if (document.removeEventListener) { + document.removeEventListener("touchend", this.touchEndBind, false); + document.removeEventListener("touchmove", this.touchMoveBind, false); + } + + if (this.helperAppened) { + this.helperAppened = false; + this.helper.remove(); + + /* selected change */ + this._selectTargets.each(function () { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (selectTarget.selecting) { + selectTarget.jQueryelement.removeClass(cfg.selectingClassName); + selectTarget.selecting = false; + selectTarget.jQueryelement.addClass(cfg.beselectClassName); + selectTarget.selected = true; + } else if (selectTarget.selected) { + + } + } + }); + } + }, + getSelects: function () { + var cfg = this.config; + var selects = []; + this._selectTargets.each(function () { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (selectTarget.selected) { + selects.push(selectTarget.element); + } + } + }); + return selects; + }, + size: function () { + var cfg = this.config; + var selects = []; + this._selectTargets.each(function () { + var selectTarget = axdom.data(this, "selectableItem"); + if (selectTarget) { + if (selectTarget.selected) { + selects.push(selectTarget.element); + } + } + }); + return selects.length; + } +}); +/* ********************************************** AXMultiSelect ** */ + +/* ** AXResizable ********************************************** */ +var 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) { + var cfg = this.config; + if (!obj.id) { + trace("bind 대상 ID가 없어 bind 처리할 수 없습니다."); + return; + } + if (!AXgetId(obj.id)) { + trace("bind 대상이 없어 bind 처리할 수 없습니다."); + return; + } + var objID = obj.id; + var objSeq = null; + + AXUtil.each(this.objects, function (idx, O) { + /*if (this.id == objID && this.isDel == true) objSeq = idx;*/ + if (this.id == objID) { + objSeq = idx; + } + }); + if (objSeq == null) { + objSeq = this.objects.length; + this.objects.push({ + id: objID, + element: AXgetId(objID), + jQueryElement: axdom("#" + objID), + config: obj + }); + } else { + this.objects[objSeq].isDel = undefined; + this.objects[objSeq].config = obj; + } + this.bindResizer(objID, objSeq); + }, + unbind: function (obj) { + var cfg = this.config; + var removeIdx; + AXUtil.each(this.objects, function (idx, O) { + if (O.id != obj.id) { + } else { + if (O.isDel != true) { + removeIdx = idx; + } + } + }); + if (removeIdx != undefined) { + this.objects[removeIdx].isDel = true; + /* unbind 구문 */ + } + }, + bindResizer: function (objID, objSeq) { + var _this = this; + var cfg = this.config; + + var obj = this.objects[objSeq]; + + var po = []; + po.push("
"); + obj.jQueryElement.addClass(cfg.bindResiableContainer); + obj.jQueryElement.append(po.join('')); + + //obj.jQueryElement.bind("mousedown.AXResizable", function(){_this.mousedown(objID, objSeq, event)}); + obj.jQueryElement.bind("mousedown.AXResizable", this.mousedown.bind(this, objID, objSeq)); + }, + mousedown: function (objID, objSeq, event) { + var _this = this; + var cfg = 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).bind("mouseleave.AXResizable", this.mouseup.bind(this, objID, objSeq));*/ + + axdom(document.body).attr("onselectstart", "return false"); + axdom(document.body).addClass("AXUserSelectNone"); + + this.helperAppenedReady = true; + }, + mousemove: function (objID, objSeq, event) { + var cfg = this.config; + if (!event.pageX) return; + + /*드래그 감도 적용 */ + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) this.selectorHelperMove(objID, objSeq, event); + }, + mouseup: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + this.helperAppenedReady = false; + this.moveSens = 0; + + axdom(window).unbind("mousemove.AXResizable"); + axdom(window).unbind("mouseup.AXResizable"); + /*axdom(document.body).unbind("mouseleave.AXResizable");*/ + + axdom(document.body).removeAttr("onselectstart"); + axdom(document.body).removeClass("AXUserSelectNone"); + + if (this.helperAppened) { + this.helperAppened = false; + + var newWidth = this.helper.width(); + var newHeight = this.helper.height(); + + var paddingLeft = obj.jQueryElement.css("padding-left"); + var paddingRight = obj.jQueryElement.css("padding-right"); + var paddingTop = obj.jQueryElement.css("padding-top"); + var paddingBottom = obj.jQueryElement.css("padding-bottom"); + var paddingW = paddingLeft.number() + paddingRight.number(); + var paddingH = paddingTop.number() + paddingBottom.number(); + + if (obj.config.animate) { + obj.jQueryElement.animate( + { width: newWidth - paddingW, height: newHeight - paddingH }, + (obj.config.animate.duration || 300), (obj.config.animate.easing || "liner"), + function () { + if (obj.config.onChange) { + obj.config.onChange.call(obj, obj); + } + } + ); + } else { + obj.jQueryElement.css({ width: newWidth - paddingW, height: newHeight - paddingH }); + if (obj.config.onChange) { + obj.config.onChange.call(obj, obj); + } + } + + this.helper.remove(); + } + }, + selectorHelperMove: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + if (this.helperAppened) { + + var _helperPos = this.helperPos; + var tmp, + x1 = this.helperPos.x, + y1 = this.helperPos.y, + x2 = event.pageX - _helperPos.bodyLeft, + y2 = event.pageY - _helperPos.bodyTop; + + var minWidth = (obj.config.minWidth || 0), + minHeight = (obj.config.minHeight || 0), + maxWidth = (obj.config.maxWidth || 0), + maxHeight = (obj.config.maxHeight || 0); + + var myWidth = x2 - x1, myHeight = y2 - y1; + + if (minWidth != 0 && myWidth < minWidth) myWidth = minWidth; + if (minHeight != 0 && myHeight < minHeight) myHeight = minHeight; + if (maxWidth != 0 && myWidth > maxWidth) myWidth = maxWidth; + if (maxHeight != 0 && myHeight > maxHeight) myHeight = maxHeight; + + if (obj.config.aspectRatio) { + myWidth = myHeight * obj.config.aspectRatio; + } + + if (obj.config.snap) { + myWidth = obj.config.snap * (myWidth / obj.config.snap).ceil(); + myHeight = obj.config.snap * (myHeight / obj.config.snap).ceil(); + } + //trace({width: myWidth, height: myHeight}); + this.helper.css({ width: myWidth, height: myHeight }); + + } else { + this.helperAppened = true; + axdom(document.body).append(this.helper); + + var bodyLeft = axdom(document.body).offset().left; + var bodyTop = axdom(document.body).offset().top; + + var pos = obj.jQueryElement.offset(); + var 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 + }; + } + } +}); +var AXResizableBinder = new AXResizable(); +AXResizableBinder.setConfig({ targetID: "defaultResiable" }); + +axdom.fn.bindAXResizable = function (config) { + AXUtil.each(this, function () { + config = config || {}; config.id = this.id; + AXResizableBinder.bind(config); + return this; + }); +}; + +axdom.fn.unbindAXResizable = function (config) { + AXUtil.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXResizableBinder.unbind(config); + return this; + }); +}; +/* ********************************************** AXResizable ** */ + +/* ** AXContextMenu ********************************************** */ +/** + * AXContextMenuClass + * @class AXContextMenuClass + * @extends AXJ + * @version v1.22 + * @author tom@axisj.com + * @logs + "2013-03-22 오후 6:08:57", + "2013-09-03 오후 7:10:14 메뉴확장 위치 제어 버그 픽스", + "2013-12-16 href=javascript 설정했을 때 onbeforeunload 이벤트 충돌문제 해결", + "2013-12-26 오후 4:27:00 tom, left, top position ", + "2014-02-11 오전 11:06:13 root, subMenu underLine, upperLine add", + "2014-04-07 오전 9:55:57 tom, extent checkbox, sortbox" + * @description + * + ```js + AXContextMenu.bind({ + id:"myContextMenu", + theme:"AXContextMenu", // 선택항목 + width:"150", // 선택항목 + checkbox:"checkbox", // [checkbox|radio] + sortbox:true, + menu:[ + {label:'선택 1', checked:true, onclick:function(){ + return false; + }}, + {label:'선택 2', checked:true, + subMenu:[ + {label:"하위메뉴1"}, + {label:"하위메뉴2", + subMenu:[ + {label:"하위메뉴21"}, + {label:"하위메뉴22"} + ] + }, + {label:"하위메뉴3"}, + {label:"하위메뉴3"}, + {label:"하위메뉴3"} + ] + }, + {label:'선택 3', checked:true}, + {label:'선택 4', checked:false, sort:"asc"} // config 에 checkbox 가 있는데. menu에 onclick 가 없으면 체크박스 액션이 작동합니다. + ], + onchange: function(){ // 체크박스 선택값이 변경 된 경우 호출 됩니다. + trace(this.menu); + + // return true; 메뉴 창이 닫히지 않게 합니다. + }, + onsort: function(){ // 정렬이 변경 된 경우 호출 됩니다. + trace(this.sortMenu); + + // return true; 메뉴 창이 닫히지 않게 합니다. + } + }); + AXContextMenu.open({id:'myContextMenu'}, window.event); + ``` + * + */ + +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; + AXUtil.each(this.objects, function (index, O) { + if (O.id == objID) { + findIndex = index; + return false; + } + }); + if (findIndex == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } else { + var _self = this.objects[findIndex]; + AXUtil.each(configs, function (k, v) { + _self.config[k] = v; + }); + } + }, + bind: function (obj) { + var cfg = this.config; + if (!obj.id) { + trace("ID가 없어 bind 처리할 수 없습니다. AXContentMenu.bind({id:'idValue'});"); + return; + } + var objSeq = null; + AXUtil.each(this.objects, function (idx, O) { + if (this.id == obj.id) { + objSeq = idx; + return false; + } + }); + if (objSeq != null) { + this.objects[objSeq] = obj; + return; + }else{ + this.objects[objSeq] = obj; + } + var objID = obj.id; + objSeq = this.objects.length; + this.objects.push(obj); + }, + filter: function (objSeq, objID, myobj, menu) { + var cfg = this.config; + var obj = this.objects[objSeq]; + if (myobj.filter) { + var sendObj = { + menu: menu, + sendObj: obj.sendObj + } + return myobj.filter.call(sendObj, objID); + } else { + return true; + } + }, + getSubMenu: function (parentID, objSeq, objID, myobj, subMenu, depth) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var theme = obj.theme || cfg.theme; + var width = obj.width || cfg.width; + + var filter = this.filter.bind(this); + var getSubMenu = this.getSubMenu.bind(this); + var subMenuID = parentID + "_AX_subMenu"; + + var href = (obj.href == undefined) ? cfg.href : obj.href; + var po = []; + po.push("
"); + AXUtil.each(subMenu, function (idx, menu) { + if (filter(objSeq, objID, myobj, menu)) { + if (menu.upperLine) po.push("
"); + var className = (menu.className) ? menu.className : ""; + var hasSubMenu = (menu.subMenu) ? " hasSubMenu" : ""; + po.push(""); + var checked = ""; + if(obj.checkbox){ + if(menu.checked) checked = " on"; + po.push("
"); + } + + po.push("" + menu.label + ""); + + po.push("
"); + if (menu.subMenu && menu.subMenu.length > 0) po.push("
"); + po.push("
"); + po.push("
"); + menu.__axdomId = subMenuID + "_AX_" + depth + "_AX_" + idx; + + if (menu.subMenu && menu.subMenu.length > 0) po.push(getSubMenu(subMenuID + "_AX_" + depth + "_AX_" + idx, objSeq, objID, myobj, menu.subMenu, (depth + 1))); + if (menu.underLine) po.push("
"); + } + }); + po.push("
"); + return po.join(''); + }, + open: function (myobj, position) { + var cfg = this.config; + if(axf.clientWidth() < cfg.responsiveMobile){ + this.mobileOpen(myobj, position); + }else{ + this.deskTopOpen(myobj, position); + } + }, + mobileOpen: function(myobj, position){ + var cfg = this.config; + var objSeq = null; + AXUtil.each(this.objects, function (index, O) { + if (O.id == myobj.id) { + objSeq = index; + return false; + } + }); + if (objSeq == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } + var obj = this.objects[objSeq]; + var objID = obj.id; + + this.modal = new AXMobileModal(); + this.modal.setConfig({ + addClass:"", + height: 388, + width: 300, + head:{ + //title:(myobj.title||AXConfig.AXContextMenu.title), + close:{ + onclick:function(){} + } + }, + onclose: function(){} + }); + + var initMobileModalBind = this.initMobileModal.bind(this); + var onLoad = function(modalObj){ + initMobileModalBind(objID, objSeq, myobj, modalObj); + }; + this.modal.open(null, onLoad); + this.mobileMode = true; + }, + initMobileModal: function(objID, objSeq, myobj, modalObj){ // 현재 선택된 모바일 메뉴를 오픈합니다. + var cfg = this.config, _this = this; + var obj = this.objects[objSeq]; + this.mobileModalObj = { + myobj:myobj, + modalObj:modalObj + }; // memo mobileModal + if (myobj.sendObj) { + obj.sendObj = myobj.sendObj; + } + var href = (obj.href == undefined) ? cfg.href : obj.href; + var filter = this.filter.bind(this); + + var headPo = []; + /* 현재 선택된 메뉴 선택 하는 기능구현 필요 */ + headPo.push('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; + var po = []; + po.push("
"); + po.push("
"); + axf.each(menuList, function (idx, menu) { + if (filter(objSeq, objID, myobj, menu)) { + //if (menu.upperLine) po.push("
"); + var className = (menu.className) ? " " + menu.className : ""; + var hasSubMenu = (menu.subMenu) ? " hasSubMenu" : ""; + po.push(""); + + var checked = ""; + if(obj.checkbox){ + if(menu.checked) checked = " on"; + po.push("
"); + } + + po.push("" + menu.label + ""); + + po.push("
"); + if (menu.subMenu && menu.subMenu.length > 0) po.push("
"); + if (obj.sortbox){ + var sortdirect = ""; + if(menu.sort){ + sortdirect = " " + menu.sort.toString().lcase(); + } + po.push("
"); + } + po.push("
"); + + po.push("
"); + + menu.__axdomId = objID + "_AX_contextMenu_AX_0_AX_" + idx; + //if (menu.underLine) po.push("
"); + } + }); + 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); + var closeMobileModal = this.closeMobileModal.bind(this); + this.contextMenuItemClickBind = function (event) { + contextMenuItemClick(event, objSeq, objID); + //closeMobileModal(); + }; + modalObj.modalBody.find(".contextMenuItem").bind("click", this.contextMenuItemClickBind); + }, + + mobileModalSubMenu: function (parentID, objSeq, objID, myobj, modalObj, pMenu, depth) { + var cfg = this.config, _this = this; + var obj = this.objects[objSeq]; + var theme = obj.theme || cfg.theme; + var width = obj.width || cfg.width; + + var filter = this.filter.bind(this); + var mobileModalSubMenu = this.mobileModalSubMenu.bind(this); + var subMenuID = parentID + "_AX_subMenu"; + + var href = (obj.href == undefined) ? cfg.href : obj.href; + + var poi = parentID.split(/_AX_/g); + var pdepth = poi[poi.length - 2].number(); + /* + if(pdepth == 0) { + this.mobileModalObj.previousMenu = "root"; + this.mobileModalObj.nowMenu = pMenu.__axdomId; + }else{ + this.mobileModalObj.previousMenu = this.mobileModalObj.nowMenu; + this.mobileModalObj.nowMenu = pMenu.__axdomId; + } + */ + //trace(axdom("#" + objID + "_AX_mobileMenuPrevBox").get(0)); + axdom("#" + objID + "_AX_mobileMenuPrevBox").html(''+pMenu.label+''); + + axdom("#"+objID+'_AX_prev_AX_'+poi.join("_")).bind("click", function(){ + if(pdepth == 0) { + _this.initMobileModal(objID, objSeq, myobj, modalObj); + }else{ + var poi = pMenu.__axdomId.split(/_AX_/g); + var _depth = poi[poi.length - 2].number(); + var hashs = []; + + var mystrPosition = poi.length - 1; + for (var r = 0; r < depth + 1; r++) { + if(!isNaN(poi[mystrPosition])) hashs.push(poi[mystrPosition]); + mystrPosition -= 3; + } + hashs = hashs.reverse(); + hashs.pop(); + var menu = obj.menu; + for (var hash, idx= 0, __arr = hashs; (idx < __arr.length && (hash = __arr[idx])); idx++) { + if (idx == 0) menu = menu[hash]; + else menu = 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; + var po = []; + po.push("
"); + po.push("
"); + axf.each(menuList, function (idx, menu) { + if (filter(objSeq, objID, myobj, menu)) { + var className = (menu.className) ? " " + menu.className : ""; + var hasSubMenu = (menu.subMenu) ? " hasSubMenu" : ""; + po.push(""); + + var checked = ""; + if(obj.checkbox){ + if(menu.checked) checked = " on"; + po.push("
"); + } + + po.push("" + menu.label + ""); + + po.push("
"); + if (menu.subMenu && menu.subMenu.length > 0) po.push("
"); + if (obj.sortbox){ + var sortdirect = ""; + if(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); + var closeMobileModal = this.closeMobileModal.bind(this); + this.contextMenuItemClickBind = function (event) { + contextMenuItemClick(event, objSeq, objID); + //closeMobileModal(); + }; + modalObj.modalBody.find(".contextMenuItem").bind("click", this.contextMenuItemClickBind); + }, + + closeMobileModal: function(){ + var cfg = this.config; + this.modal.close(); + }, + deskTopOpen: function (myobj, position) { + var cfg = this.config; + var objSeq = null; + this.mobileMode = false; + AXUtil.each(this.objects, function (index, O) { + if (O.id == myobj.id) { + objSeq = index; + return false; + } + }); + if (objSeq == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } + var obj = this.objects[objSeq]; + var objID = obj.id; + + if (myobj.sendObj) { + obj.sendObj = myobj.sendObj; + } + + if (AXgetId(objID)) return; + + var theme = obj.theme || cfg.theme; + var width = obj.width || cfg.width; + + axdom("#" + objID).remove(); + + var href = (obj.href == undefined) ? cfg.href : obj.href; + + var filter = this.filter.bind(this); + var getSubMenu = this.getSubMenu.bind(this); + var po = []; + po.push("
"); + AXUtil.each(obj.menu, function (idx, menu) { + if (filter(objSeq, objID, myobj, menu)) { + if (menu.upperLine) { + po.push("
"); + } + var className = (menu.className) ? " " + menu.className : ""; + var hasSubMenu = (menu.subMenu) ? " hasSubMenu" : ""; + po.push(""); + var checked = ""; + if(obj.checkbox){ + if(menu.checked) checked = " on"; + po.push("
"); + } + + po.push("" + menu.label + ""); + + po.push("
"); + if (menu.subMenu && menu.subMenu.length > 0) po.push("
"); + if (obj.sortbox) po.push("
"); + po.push("
"); + po.push("
"); + + menu.__axdomId = objID + "_AX_contextMenu_AX_0_AX_" + idx; + + if (menu.subMenu) { + if (menu.subMenu.length > 0) { + po.push(getSubMenu(objID + "_AX_contextMenu_AX_0_AX_" + idx, objSeq, objID, myobj, menu.subMenu, 1)); + } + } + if (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) { + if (position.left != undefined) css.left = position.left; + else css.right = position.right; + css.top = position.top; + } else { + var mouse = this.getMousePositon(position); + css.left = mouse.pageX; + css.top = mouse.pageY; + } + + // -- 부모박스 정보와 박스 정보 + var pElement = axdom("#" + objID).offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + var clientHeight = (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; + var clienWidth = (AXUtil.docTD == "Q") ? document.body.scrollWidth : document.documentElement.scrollWidth; + if (clienWidth > pBox.width) pBox.width = clienWidth; + if (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"; + if(css.top < 0) css.top = 0; + } + + if (css.left != undefined) { + + 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 { + if ((_box.width.number() * 2 + css.left.number()) > pBox.width) { + this.openLR = "left"; + } + } + + /* + if((_box.width.number() + css.left.number()) > pBox.width){ + css.left -= ((_box.width.number() + css.left.number()) - pBox.width) + 5; + this.openLR = "left"; + } + */ + } else { + css.left = "auto"; + this.openLR = "right"; + } + axdom("#" + objID).css(css); + + this.eventBind(objSeq, objID); + }, + eventBind: function (objSeq, objID) { + var cfg = this.config; + /* closeEvent bind */ + var contextMenuItemDown = this.contextMenuItemDown.bind(this); + var 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){ + + } + }); + + /* closeEvent bind ~~~~~~~~~~~~~~~~~~~ */ + //click + 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) { + var cfg = this.config; + + if(this.mobileMode){ + this.closeMobileModal(); + }else{ + 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 cfg = this.config; + var objSeq = null; + AXUtil.each(this.objects, function (index, O) { + if (O.id == myobj.id) { + objSeq = index; + return false; + } + }); + if (objSeq == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } + var obj = this.objects[objSeq]; + var 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, objID) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var menuWidth = obj.width || cfg.width; + // event target search - + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("contextMenuItem")) ? true : false; } + }); + // event target search ------------------------ + if (myTarget) { + var poi = myTarget.id.split(/_AX_/g); + var depth = poi[poi.length - 2]; + if (this.showedItem[depth]) { + axdom("#" + this.showedItem[depth]).hide(); + } + if (axdom(myTarget).hasClass("hasSubMenu")) { + + // -- 부모박스 정보와 박스 정보 + var pElement = axdom("#" + myTarget.id + "_AX_subMenu").offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + var clientHeight = (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; + var clienWidth = (AXUtil.docTD == "Q") ? document.body.scrollWidth : document.documentElement.scrollWidth; + if (clienWidth > pBox.width) pBox.width = clienWidth; + if (clientHeight > pBox.height) pBox.height = clientHeight; + var _box = { width: axdom("#" + myTarget.id + "_AX_subMenu").outerWidth(), height: axdom("#" + myTarget.id + "_AX_subMenu").outerHeight() }; + // -- 부모박스 정보와 박스 정보 + + var subMenuTop = axdom("#" + myTarget.id).position().top; + + var css; + if (this.openTB == "up") { + var ph = axdom("#" + myTarget.id).offsetParent().height(); + var h = axdom("#" + myTarget.id).height(); + var bottom = ph - subMenuTop - h; + css = { top: "auto", bottom: bottom }; + } else { + css = { top: subMenuTop }; + } + if (this.openLR == "left") { + //css.left = -(menuWidth - 15); + 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) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + if (event.keyCode == AXUtil.Event.KEY_ESC) { + this._close(objSeq, objID); + return; + } + + // event target search - + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("contextMenuItem")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + + } else { + this._close(objSeq, objID); + } + }, + contextMenuItemClick: function (event, objSeq, objID) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + // event target search - + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("contextMenuItem") || axdom(evt).hasClass("tool-checkbox") || axdom(evt).hasClass("tool-sort")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + + var poi = myTarget.id.split(/_AX_/g); + var depth = poi[poi.length - 2].number(); + var hashs = []; + + var mystrPosition = poi.length - 1; + for (var r = 0; r < depth + 1; r++) { + hashs.push(poi[mystrPosition]); + mystrPosition -= 3; + } + hashs = hashs.reverse(); + + var menu = obj.menu; + for (var hash, idx= 0, __arr = hashs; (idx < __arr.length && (hash = __arr[idx])); idx++) { + if (idx == 0) menu = menu[hash]; + else menu = menu.subMenu[hash]; + } + + if (menu.subMenu && this.mobileMode){ + //this.initMobileModal(objID, objSeq, this.mobileModalObj.myobj, this.mobileModalObj.modalObj, (depth+1), menu.subMenu); + this.mobileModalSubMenu(myTarget.id, objSeq, objID, this.mobileModalObj.myobj, this.mobileModalObj.modalObj, menu, (depth+1)); + return false; + } + + if (axdom(myTarget).hasClass("tool-checkbox")){ + menu.checked = !menu.checked; + axdom("#" + menu.__axdomId).find(".tool-checkbox").toggleClass("on"); + + if (obj.onchange) { + obj.onchange.call({ menu: obj.menu, clickMenu: menu, sendObj: obj.sendObj }, objID); + } + return true; + } + + if (axdom(myTarget).hasClass("tool-sort")){ + + // 다른 메뉴들은 모두 정렬 헤제 + for (var M, midx= 0, __arr = obj.menu; (midx < __arr.length && (M = __arr[midx])); midx++) { + if(menu != M){ + M.sort = undefined; + axdom("#" + M.__axdomId).find(".tool-sort").removeClass("asc").removeClass("desc"); + } + } + + + if(menu.sort == undefined) menu.sort = ""; + if(menu.sort.toString().lcase() == "asc"){ + axdom("#" + menu.__axdomId).find(".tool-sort").removeClass("asc").addClass("desc"); + menu.sort = "desc"; + }else if(menu.sort.toString().lcase() == "desc"){ + axdom("#" + menu.__axdomId).find(".tool-sort").removeClass("desc").addClass("asc"); + menu.sort = "asc"; + }else{ + axdom("#" + menu.__axdomId).find(".tool-sort").addClass("desc"); + menu.sort = "desc"; + } + + if (obj.onsort) { + if(obj.onsort.call({ menu: obj.menu, sortMenu: menu, sendObj: obj.sendObj }, objID) != true){ + this._close(objSeq, objID); + } + } + return true; + } + + if (menu.onclick) { + if(menu.onclick.call({ menu: menu, sendObj: obj.sendObj }, objID) != true){ + this._close(objSeq, objID); + } + return true; + }else if (obj.onchange) { // 라벨 선택 할 때. 정렬항목도 없는 경우만 체크 모드로 연결 + menu.checked = !menu.checked; + axdom("#" + menu.__axdomId).find(".tool-checkbox").toggleClass("on"); + + if (obj.onchange) { + if (obj.onchange.call({ menu: obj.menu, clickMenu: menu, sendObj: obj.sendObj }, objID) != true){ + this._close(objSeq, objID); + } + } + return true; + } + } + } +}); +var 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; + var objSeq = null; + AXUtil.each(this.objects, function (index, O) { + if (O.id == myobj.id) { + objSeq = index; + //return false; + } else { + axdom("#" + O.id).remove(); + } + }); + if (objSeq == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } + + var obj = this.objects[objSeq]; + var objID = obj.id; + + if (myobj.sendObj) { + obj.sendObj = myobj.sendObj; + } + + if (this.observer) clearTimeout(this.observer); //닫기 명령 제거 + var direction = obj.direction || "top"; + + if (AXgetId(objID)) { + if (position.clientX) { + this.contentMenuSetCss(event, position, objSeq, objID); + } + return; + } + + var theme = obj.theme || cfg.theme; + var width = obj.width || cfg.width; + + //컨텍스트 메뉴의 위치 지정 + + var arrowStyle = ""; + if (position.clientX) { + arrowStyle = "background-position:10px 0px;" + } else { + if (position.arrowLeft) arrowStyle = "background-position:" + position.arrowLeft + "px 0px;" + } + + axdom("#" + objID).remove(); + + var href = (obj.href == undefined) ? cfg.href : obj.href; + + var filter = this.filter.bind(this); + var getSubMenu = this.getSubMenu.bind(this); + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + if (obj.menu) { + AXUtil.each(obj.menu, function (idx, menu) { + if (!menu) return false; + if (filter(objSeq, objID, myobj, menu)) { + if (menu.upperLine) { + po.push("
"); + } + var className = (menu.className) ? " " + menu.className : ""; + var hasSubMenu = (menu.subMenu) ? " hasSubMenu" : ""; + po.push(""); + po.push(menu.label); + if (menu.subMenu) { + if (menu.subMenu.length > 0) { + po.push("
"); + } + } + po.push("
"); + if (menu.subMenu) { + if (menu.subMenu.length > 0) { + po.push(getSubMenu(objID + "_AX_contextMenu_AX_0_AX_" + idx, objSeq, objID, myobj, menu.subMenu, 1)); + } + } + if (menu.underLine) { + po.push("
"); + } + } + }); + } else if (obj.body) { + po.push("
"); + po.push(obj.body); + po.push("
"); + } + po.push("
"); + po.push("
"); + axdom(document.body).append(po.join('')); + + if (direction == "top") { + axdom("#" + objID).find(".arrowTop").show(); + axdom("#" + objID).find(".arrowBottom").hide(); + } else if (direction == "bottom") { + axdom("#" + objID).find(".arrowTop").hide(); + axdom("#" + objID).find(".arrowBottom").show(); + } else { + 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 () { + if (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); + + //var eventBind = this.eventBind.bind(this); + this.eventBind(objSeq, objID); + //setTimeout(function(){}, 1); + }, + contentMenuSetCss: function (event, position, objSeq, objID) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var direction = obj.direction || "top"; + var css = {}; + + if (!position.clientX) { + if (position.left != undefined) { + css.left = position.left; + } else { + css.left = "auto"; + css.right = position.right; + } + css.top = position.top; + } else { + var mouse = this.getMousePositon(position); + obj.eventPosition = true; + css.left = mouse.pageX; + css.left -= 20; + css.top = mouse.pageY; + } + // -- 부모박스 정보와 박스 정보 + var pElement = axdom("#" + objID).offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + var clientHeight = (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; + var clienWidth = (AXUtil.docTD == "Q") ? document.body.scrollWidth : document.documentElement.scrollWidth; + if (clienWidth > pBox.width) pBox.width = clienWidth; + if (clientHeight > pBox.height) pBox.height = clientHeight; + var _box = { width: axdom("#" + objID).outerWidth(), height: axdom("#" + objID).outerHeight() }; + // -- 부모박스 정보와 박스 정보 + var openTB = ""; + if (direction == "top") { + openTB = "top"; + } else if (direction == "bottom") { + css.top -= axdom("#" + objID).outerHeight(); + openTB = "bottom"; + } else { + if ((_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(); + //css.top -= ((_box.height.number() + css.top.number()) - pBox.height) + 5; + openTB = "bottom"; + } else { + axdom("#" + objID).find(".arrowTop").show(); + axdom("#" + objID).find(".arrowBottom").hide(); + openTB = "top"; + } + } + + if (css.left != undefined) { + if ((_box.width.number() + css.left.number()) > pBox.width) { + var moveLeft = ((_box.width.number() + css.left.number()) - pBox.width) + 5; + css.left -= moveLeft; + if (openTB == "top") { + axdom("#" + objID).find(".arrowTop").css({ "background-position": (moveLeft + 5) + "px 0px;" }); + } else { + axdom("#" + objID).find(".arrowBottom").css({ "background-position": (moveLeft + 5) + "px 0px;" }); + } + } else { + + } + } else { + + } + axdom("#" + objID).css(css); + }, + contextMenuItemMouseOver: function (event, objSeq, objID) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + if (this.observer) clearTimeout(this.observer); //닫기 명령 제거 + + var menuWidth = obj.width || cfg.width; + // event target search - + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("contextMenuItem")) ? true : false; } + }); + // event target search ------------------------ + if (myTarget) { + var poi = myTarget.id.split(/_AX_/g); + var depth = poi[poi.length - 2]; + if (this.showedItem[depth]) { + axdom("#" + this.showedItem[depth]).hide(); + } + if (axdom(myTarget).hasClass("hasSubMenu")) { + var subMenuTop = axdom("#" + myTarget.id).position().top; + var css; + if (this.openTB == "up") { + var ph = axdom("#" + myTarget.id).offsetParent().height(); + var h = axdom("#" + myTarget.id).height(); + var bottom = ph - subMenuTop - h; + css = { top: "auto", bottom: bottom }; + } else { + css = { top: subMenuTop }; + } + if (this.openLR == "left") { + //css.left = -(menuWidth - 15); + 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); + } +}); +var AXPopOver = new AXPopOverClass(); +AXPopOver.setConfig({ theme: "AXPopOver" }); + +axdom.fn.bindTooltip = function (config) { + if (config == undefined) config = {}; + AXUtil.each(this, function () { + var tooltipContent = axdom("#" + this.id + "_AX_tooltip").html(); + 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(); + var direction = (config.direction || "top"); + var posTop = pos.top; + if (direction == "bottom") { + posTop -= 3; + } else { + posTop += axdom(this).outerHeight() + 3; + } + AXPopOver.open({ id: this.id + "_AX_tooltipobj", sendObj: {} }, { left: pos.left, top: posTop, handleHeight: (axdom(this).outerHeight().number() + 3) }); // event 직접 연결 방식 + }); + return this; + }); +}; +/* ********************************************** AXContextMenu ** */ + +/* ** AXMobileModal ********************************************** */ +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; + + if (!cfg.head) { + cfg.head = {}; + } + }, + open: function (configs, onLoad) { + var cfg = this.config; + if (!configs) configs = {}; + var theme = (configs.theme || cfg.theme); + if (cfg.addClass) { + theme += " " + cfg.addClass; + } + this.modalId = "AXMobileModal" + AXUtil.timekey(); + var modalId = this.modalId; + var clientWidth = (configs.clientWidth || AXUtil.clientWidth()); + + var po = []; + po.push('
'); + po.push('
'); + po.push('
'); + po.push('
' + (cfg.head.title || "") + '
'); + po.push('
'); + if (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 = true; + + return { + jQueryModal: this.jQueryModal, + modalPanel: this.modalPanel, + modalHead: this.modalHead, + modalBody: this.modalBody, + modalFoot: this.modalFoot + }; + }, + setSizeModal: function (configs, onLoad) { + var cfg = this.config; + var cssStyles = {}; + var clientWidth, width, height, left, top, margin, align, valign; + var modalWidth, modalHeight; + var clientWidth = this.jQueryModal.innerWidth(); + var clientHeight = AXUtil.clientHeight(); + var width = (configs.width || cfg.width); + var height = (configs.height || cfg.height); + var margin = (configs.margin || cfg.margin); + var align = (configs.align || cfg.align); + var valign = (configs.valign || cfg.valign); + + this.openModalAttr = { + width:width, height:height, margin:margin, align:align, valign:valign + }; + + if (width == "auto") { + if (margin.right(1) == "%") { + modalWidth = clientWidth * (100 - margin.number() * 2) / 100; + } else { + modalWidth = clientWidth - margin.number() * 2; + } + } else { + modalWidth = width; + } + left = (clientWidth - modalWidth) / 2; + + if (height == "auto") { + if (margin.right(1) == "%") { + modalHeight = clientHeight * (100 - margin.number() * 2) / 100; + } else { + modalHeight = clientHeight - margin.number() * 2; + } + } else { + modalHeight = height; + } + top = (clientHeight - modalHeight) / 2; + + if (left < 0) left = margin; + if (top < 0) top = margin; + + var cssStylesStart = { + left: (axf.clientWidth() - (modalWidth*0.8)) / 2, + top: (axf.clientHeight() - (modalHeight*0.8)) / 2 + axf.scrollTop(), + width: (modalWidth*0.8), + height: (modalHeight*0.8) + }; + 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 + }; + + if(AXUtil.browser.name == "android"){ + //alert(AXUtil.browser.version); + this.modalPanel.css(cssStyles); + if(onLoad){ + onLoad.call(returnObj, returnObj); + } + }else{ + this.modalPanel.animate(cssStyles, 300, "expoOut", function () { + if(onLoad){ + onLoad.call(returnObj, returnObj); + } + }); + } + }, + modalClick: function(event){ + var cfg = this.config; + if(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() - (modalWidth*0.8)) / 2, + top: (AXUtil.clientHeight() - (modalHeight*0.8)) / 2, + width: (modalWidth*0.8), + height: (modalHeight*0.8), + opacity:0 + }; + var remove = this.remove.bind(this); + this.modalPanel.animate(cssStylesStart, 300, "expoOut", function () { + remove(); + if (cfg.onclose) { + cfg.onclose(); + } + }); + this.modalPanel.empty(); + //this.jQueryModal.fadeOut(); + //this.remove(); + /* + + remove.delay(0.01); + */ + this.opened = false; + axdom(window).unbind("resize.AXMobileModal"); + }, + remove: function () { + var cfg = this.config; + this.jQueryModal.remove(); + }, + reposition: function(){ + var cfg = this.config; + + var clientWidth = AXUtil.clientWidth(); + var clientHeight = AXUtil.clientHeight(); + this.jQueryModal.css({width:clientWidth, height:clientHeight}); + + var modalWidth, modalHeight, left, top; + var width = this.openModalAttr.width; + var height = this.openModalAttr.height; + var margin = this.openModalAttr.margin; + var align = this.openModalAttr.align; + var valign = this.openModalAttr.valign; + var cssStyles = {}; + + if (width == "auto") { + if (margin.right(1) == "%") { + modalWidth = clientWidth * (100 - margin.number() * 2) / 100; + } else { + modalWidth = clientWidth - margin.number() * 2; + } + } else { + modalWidth = width; + } + left = (clientWidth - modalWidth) / 2; + + if (height == "auto") { + if (margin.right(1) == "%") { + modalHeight = clientHeight * (100 - margin.number() * 2) / 100; + } else { + modalHeight = clientHeight - margin.number() * 2; + } + } else { + modalHeight = height; + } + top = (clientHeight - modalHeight) / 2; + + if (left < 0) left = margin; + if (top < 0) top = margin; + + cssStyles.left = left; + cssStyles.top = top; + cssStyles.width = modalWidth; + cssStyles.height = modalHeight; + + this.modalPanel.css(cssStyles); + } +}); +/* ********************************************** AXMobileModal ** */ + +/* ** jQuery easing plugin ********************************************** */ +axdom.extend(true, { + easing: { + backIn: function (p, n, f, d) { var c = f + d; var s = 1.70158; return c * (p /= 1) * p * ((s + 1) * p - s) + f; }, + backOut: function (p, n, f, d) { var c = f + d; var 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; var s = 1.70158; if ((p /= 0.5) < 1) return c / 2 * (p * p * (((s *= (1.525)) + 1) * p - s)) + f; else return c / 2 * ((p -= 2) * p * (((s *= (1.525)) + 1) * p + s) + 2) + f; }, + bounceIn: function (p, n, f, d) { var c = f + d; var inv = this.bounceOut(1 - p, 1, 0, d); return c - inv + f; }, + bounceOut: function (p, n, f, d) { var c = f + d; if (p < (1 / 2.75)) return c * (7.5625 * p * p) + f; else if (p < (2 / 2.75)) return c * (7.5625 * (p -= (1.5 / 2.75)) * p + .75) + f; else if (p < (2.5 / 2.75)) return c * (7.5625 * (p -= (2.25 / 2.75)) * p + .9375) + f; else return 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; if ((p /= 0.5) < 1) return -c / 2 * (Math.sqrt(1 - p * p) - 1) + f; else return 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; if ((p /= 0.5) < 1) return c / 2 * p * p * p + f; else return c / 2 * ((p -= 2) * p * p + 2) + f; }, + elasticIn: function (p, n, f, d) { var c = f + d; if (p == 0) return f; if (p == 1) return c; var peroid = 0.25; var s; var amplitude = c; if (amplitude < Math.abs(c)) { amplitude = c; s = peroid / 4; } else { s = peroid / (2 * Math.PI) * Math.asin(c / amplitude); } return -(amplitude * Math.pow(2, 10 * (p -= 1)) * Math.sin((p * 1 - s) * (2 * Math.PI) / peroid)) + f; }, + elasticOut: function (p, n, f, d) { var c = f + d; if (p == 0) return f; if (p == 1) return c; var peroid = 0.25; var s; var amplitude = c; if (amplitude < Math.abs(c)) { amplitude = c; s = peroid / 4; } else { s = peroid / (2 * Math.PI) * Math.asin(c / amplitude); } return -(amplitude * Math.pow(2, -10 * p) * Math.sin((p * 1 - s) * (2 * Math.PI) / peroid)) + c; }, + expoIn: function (p, n, f, d) { var c = f + d; return (p == 0) ? f : c * Math.pow(2, 10 * (p - 1)) + f - c * 0.001; }, + expoOut: function (p, n, f, d) { var c = f + d; return (p == 1) ? c : d * 1.001 * (-Math.pow(2, -10 * p) + 1) + f; }, + expoInOut: function (p, n, f, d) { var c = f + d; if (p == 0) return f; if (p == 1) return c; if ((p /= 0.5) < 1) return c / 2 * Math.pow(2, 10 * (p - 1)) + f - c * 0.0005; else return c / 2 * 1.0005 * (-Math.pow(2, -10 * --p) + 2) + f; }, + quadIn: function (p, n, f, d) { var c = f + d; return c * (p /= 1) * p + f; }, + quadOut: function (p, n, f, d) { var c = f + d; return -c * (p /= 1) * (p - 2) + f; }, + quadInOut: function (p, n, f, d) { var c = f + d; if ((p /= 0.5) < 1) return c / 2 * p * p + f; else return -c / 2 * ((--p) * (p - 2) - 1) + f; }, + quartIn: function (p, n, f, d) { var c = f + d; return c * (p /= 1) * p * p * p + f; }, + quartOut: function (p, n, f, d) { var c = f + d; return -c * ((p = p / 1 - 1) * p * p * p - 1) + f; }, + quartInOut: function (p, n, f, d) { var c = f + d; if ((p /= 0.5) < 1) return c / 2 * p * p * p * p + f; else return -c / 2 * ((p -= 2) * p * p * p - 2) + f; }, + quintIn: function (p, n, f, d) { var c = f + d; return c * (p /= 1) * p * p * p * p + f; }, + quintOut: function (p, n, f, d) { var c = f + d; return c * ((p = p / 1 - 1) * p * p * p * p + 1) + f; }, + quintInOut: function (p, n, f, d) { var c = f + d; if ((p /= 0.5) < 1) return c / 2 * p * p * p * p * p + f; else return c / 2 * ((p -= 2) * p * p * p * p + 2) + f; }, + sineIn: function (p, n, f, d) { var c = f + d; return -c * Math.cos(p * (Math.PI / 2)) + c + f; }, + sineOut: function (p, n, f, d) { var c = f + d; return c * Math.sin(p * (Math.PI / 2)) + f; }, + sineInOut: function (p, n, f, d) { var c = f + d; return -c / 2 * (Math.cos(Math.PI * p) - 1) + f; } + } +}); +/* ********************************************** jQuery easing plugin ** */ + +/* ** jQuery misc plugin ***********************************************/ +axdom.fn.scrollToDiv = function (margin, boxDim, leftScroll) { + var pElement = this.offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + if (boxDim) { + if (boxDim.width > 0) pBox.width = boxDim.width; + if (boxDim.height > 0) pBox.height = boxDim.height; + } + var pos = this.position(); + if (!pos) return; + 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() }; + var pEbox = { width: pBox.width - m.right, height: pBox.height - m.bottom } + var pES = { left: pElement.scrollLeft(), top: pElement.scrollTop() } + + if (ePos.top > pEbox.height) { + pElement.scrollTop(ePos.top - pEbox.height + pES.top + 1); + } else if ((ePos.top - this.outerHeight() - m.top) < 0) { + pElement.scrollTop(pES.top + (ePos.top - this.outerHeight() - m.top)); + } else { + if (pElement[0].tagName == "BODY") + window.scroll(0, pES.top + (ePos.top - m.top)); + } + if (leftScroll) { + if (ePos.left > pEbox.width) { + pElement.scrollLeft(ePos.left - pEbox.width + pES.left + 1); + } else if ((ePos.left - this.outerWidth() - m.left) < 0) { + pElement.scrollLeft(pES.left + (ePos.left - this.outerWidth() - m.left)); + } + } + return this; +}; +/* *********************************************** jQuery misc plugin **/ + +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(); + //(elem.title || elem.placeholder || "") //ie에서는 placeholder를 인식하지못함 + var label = (axdom(elem).attr("title") || axdom(elem).attr("placeholder") || ""); + return val == null ? + null : + axdom.isArray(val) ? + axdom.map(val, function (val, i) { + 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; + var elemLen = elem.val().length; + if (elemLen == 0) { + elem.focus(); + return; + } + // For IE Only + if (document.selection) { + // Set focus + elem.focus(); + elem.val(elem.val()); + } + else if (document.selection == undefined || elem.selectionStart || elem.selectionStart == '0') { + // Firefox/Chrome + elem.focus().val(elem.val()); + } // if +}; + +/* *** jquery event extend for mobile ***************************** */ +var rkeyEvent = /^key/; +var rmouseEvent = /^(?:mouse|contextmenu)|click/; +axf.each(("touchstart touchmove touchend").split(" "), function (i, name) { + axdom.fn[name] = function (data, fn) { + if (fn == null) { fn = data; data = null; } + return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); + }; + if (rkeyEvent.test(name)) { axdom.event.fixHooks[name] = axdom.event.keyHooks; } + if (rmouseEvent.test(name)) { axdom.event.fixHooks[name] = axdom.event.mouseHooks; } +}); +/* + axdom.fn.longpress = function (fn) { + AXUtil.each(this, function () { + return this; + }); + }; + */ +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(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } else if(input.selectionStart){ + input.focus(); + input.selectionStart = pos; + input.selectionEnd = pos; + } +}; +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + /* + 아래 코드는 husky_framework 의 HuskyRange.js 코드를 참조하여 개발 되었습니다. + */ + +var DOMfix = { + DF_parentNode: function(node){ + if(AXUtil.browser.name == "ie" || AXUtil.browser.name == "op"){ + if(!node) return node; + while(node.previousSibling){node = node.previousSibling;} + return node.parentNode; + }else{ + return node.parentNode; + } + }, + DF_childNode: function(node){ + if(AXUtil.browser.name == "ie" || AXUtil.browser.name == "op"){ + var result = null; + var ni = 0; + if(node){ + var result = []; + node = node.firstChild; + while(node){ + result[ni++] = node; + node = node.nextSibling; + } + } + return result; + }else{ + return node.childNodes; + } + } +} + +var 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 = true; + 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(); + var oTmpContainer = this._doc.createDocumentFragment(); + var aNodes = this._getNodesInRange(); + if(aNodes.length < 1) return oClonedContents; + var oClonedContainers = this.DF_constructClonedTree(aNodes, oTmpContainer); + var oTopContainer = oTmpContainer.firstChild; + if(oTopContainer){ + var elCurNode = oTopContainer.firstChild; + var elNextNode; + while(elCurNode){ + elNextNode = elCurNode.nextSibling; + oClonedContents.appendChild(elCurNode); + elCurNode = elNextNode; + } + } + oClonedContainers = this._splitTextEndNodes({oStartContainer: oClonedContainers.oStartContainer, iStartOffset: this.startOffset, + oEndContainer: oClonedContainers.oEndContainer, iEndOffset: this.endOffset}); + if(oClonedContainers.oStartContainer && oClonedContainers.oStartContainer.previousSibling) + DOMfix.DF_parentNode(oClonedContainers.oStartContainer).removeChild(oClonedContainers.oStartContainer.previousSibling); + + if(oClonedContainers.oEndContainer && oClonedContainers.oEndContainer.nextSibling) + DOMfix.DF_parentNode(oClonedContainers.oEndContainer).removeChild(oClonedContainers.oEndContainer.nextSibling); + + return oClonedContents; + }, + DF_constructClonedTree : function(aNodes, oClonedParentNode){ + var oClonedStartContainer = null; + var oClonedEndContainer = null; + + var oStartContainer = this.startContainer; + var oEndContainer = this.endContainer; + + recurConstructClonedTree = function(aAllNodes, iCurIdx, oParentNode, oClonedParentNode){ + if(iCurIdx < 0) return iCurIdx; + var iChildIdx = iCurIdx-1; + var oCurNodeCloneWithChildren = aAllNodes[iCurIdx].cloneNode(false); + if(aAllNodes[iCurIdx] == oStartContainer) oClonedStartContainer = oCurNodeCloneWithChildren; + if(aAllNodes[iCurIdx] == oEndContainer) oClonedEndContainer = oCurNodeCloneWithChildren; + while(iChildIdx >= 0 && DOMfix.DF_parentNode(aAllNodes[iChildIdx]) == aAllNodes[iCurIdx]){ + iChildIdx = this.recurConstructClonedTree(aAllNodes, iChildIdx, aAllNodes[iCurIdx], oCurNodeCloneWithChildren, oClonedStartContainer, oClonedEndContainer); + } + oClonedParentNode.insertBefore(oCurNodeCloneWithChildren, oClonedParentNode.firstChild); + return iChildIdx; + }; + + aNodes[aNodes.length] = DOMfix.DF_parentNode(aNodes[aNodes.length-1]); + recurConstructClonedTree(aNodes, aNodes.length-1, aNodes[aNodes.length-1], oClonedParentNode); + + return {oStartContainer: oClonedStartContainer, oEndContainer: oClonedEndContainer}; + }, + cloneRange : function(){ + return this.DF_copyRange(new AXDOMRange(this._doc)); + }, + DF_copyRange : function(oClonedRange){ + 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; + + return oClonedRange; + }, + collapse : function(toStart){ + if(toStart){ + this.endContainer = this.startContainer; + this.endOffset = this.startOffset; + }else{ + 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; + while(node){ + if(node.tagName == "BODY") return node; + node = DOMfix.DF_parentNode(node); + } + return null; + }, + _compareEndPoint : function(oContainerA, iOffsetA, oContainerB, iOffsetB){ + var iIdxA, iIdxB; + + if(!oContainerA || this.DF_getBody(oContainerA) != this._doc.body){ + oContainerA = this._doc.body; + iOffsetA = 0; + } + + if(!oContainerB || this.DF_getBody(oContainerB) != this._doc.body){ + oContainerB = this._doc.body; + iOffsetB = 0; + } + + var compareIdx = function(iIdxA, iIdxB){ + if(iIdxB == -1) iIdxB = iIdxA+1; + if(iIdxA < iIdxB) return -1; + if(iIdxA == iIdxB) return 0; + return 1; + }; + + var oCommonAncestor = this._getCommonAncestorContainer(oContainerA, oContainerB); + + var nodeA = oContainerA; + if(nodeA != oCommonAncestor){ + while((oTmpNode = DOMfix.DF_parentNode(nodeA)) != oCommonAncestor){nodeA = oTmpNode;} + iIdxA = this._getPosIdx(nodeA)+0.5; + }else iIdxA = iOffsetA; + + var nodeB = oContainerB; + if(nodeB != oCommonAncestor){ + while((oTmpNode = DOMfix.DF_parentNode(nodeB)) != oCommonAncestor){nodeB = oTmpNode;} + iIdxB = this._getPosIdx(nodeB)+0.5; + }else iIdxB = iOffsetB; + + return compareIdx(iIdxA, iIdxB); + }, + _getCommonAncestorContainer : function(node1, node2){ + var oComparingNode = node2; + + while(node1){ + while(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) return; + + this._splitTextEndNodesOfTheRange(); + + var aNodes = this._getNodesInRange(); + + if(aNodes.length < 1) return; + + var oPrevNode = aNodes[0].previousSibling; + while(oPrevNode && this._isBlankTextNode(oPrevNode)) oPrevNode = oPrevNode.previousSibling; + + var oNewStartContainer, iNewOffset; + if(!oPrevNode){ + oNewStartContainer = DOMfix.DF_parentNode(aNodes[0]); + iNewOffset = 0; + } + + for(var i=0; i node.nodeValue.length) iOffset = node.nodeValue.length; + }else{ + if(iOffset > DOMfix.DF_childNode(node).length) iOffset = DOMfix.DF_childNode(node).length; + } + return iOffset; + }, + setEnd : function(refNode, offset){ + offset = this._endsNodeValidation(refNode, offset); + this.endContainer = refNode; + this.endOffset = offset; + if(!this.startContainer || this._compareEndPoint(this.startContainer, this.startOffset, this.endContainer, this.endOffset) != -1) this.collapse(false); + this._updateRangeInfo(); + }, + setEndAfter : function(refNode){ + if(!refNode) throw new Error("setEndAfter"); + if(refNode.tagName == "BODY"){ + this.setEnd(refNode, DOMfix.DF_childNode(refNode).length); + return; + } + this.setEnd(DOMfix.DF_parentNode(refNode), this._getPosIdx(refNode)+1); + }, + setEndBefore : function(refNode){ + if(!refNode) throw new Error("setEndBefore"); + if(refNode.tagName == "BODY"){ + this.setEnd(refNode, 0); + return; + } + this.setEnd(DOMfix.DF_parentNode(refNode), this._getPosIdx(refNode)); + }, + setStart : function(refNode, offset){ + offset = this._endsNodeValidation(refNode, offset); + this.startContainer = refNode; + this.startOffset = offset; + if(!this.endContainer || this._compareEndPoint(this.startContainer, this.startOffset, this.endContainer, this.endOffset) != -1) this.collapse(true); + this._updateRangeInfo(); + }, + setStartAfter : function(refNode){ + if(!refNode) throw new Error("setStartAfter"); + if(refNode.tagName == "BODY"){ + this.setStart(refNode, DOMfix.DF_childNode(refNode).length); + return; + } + this.setStart(DOMfix.DF_parentNode(refNode), this._getPosIdx(refNode)+1); + }, + + setStartBefore : function(refNode){ + if(!refNode) throw new Error("setStartBefore"); + if(refNode.tagName == "BODY"){ + this.setStart(refNode, 0); + return; + } + 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"); + oTmpContainer.appendChild(this.cloneContents()); + return oTmpContainer.textContent || oTmpContainer.innerText || ""; + }, + _isBlankTextNode : function(node){ + if(node.nodeType == 3 && node.nodeValue == "") return true; + return false; + }, + _getPosIdx : function(refNode){ + var idx = 0; + for(var node = refNode.previousSibling; node; node = node.previousSibling) idx++; + + return idx; + }, + _updateRangeInfo : function(){ + if(!this.startContainer){ + this.init(this._doc); + return; + } + this.collapsed = this._isCollapsed(this.startContainer, this.startOffset, this.endContainer, this.endOffset); + this.commonAncestorContainer = this._getCommonAncestorContainer(this.startContainer, this.endContainer); + }, + _isCollapsed : function(oStartContainer, iStartOffset, oEndContainer, iEndOffset){ + var bCollapsed = false; + if(oStartContainer == oEndContainer && iStartOffset == iEndOffset){ + bCollapsed = true; + }else{ + var oActualStartNode = this._getActualStartNode(oStartContainer, iStartOffset); + var oActualEndNode = this._getActualEndNode(oEndContainer, iEndOffset); + oActualStartNode = this._getNextNode(this._getPrevNode(oActualStartNode)); + oActualEndNode = this._getPrevNode(this._getNextNode(oActualEndNode)); + if(oActualStartNode && oActualEndNode && oActualEndNode.tagName != "BODY" && + (this._getNextNode(oActualEndNode) == oActualStartNode || (oActualEndNode == oActualStartNode && this._isBlankTextNode(oActualEndNode))) + ) + bCollapsed = true; + } + 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){ + oEndPoints = this._splitStartTextNode(oEndPoints); + oEndPoints = this._splitEndTextNode(oEndPoints); + + return oEndPoints; + }, + + _splitStartTextNode : function(oEndPoints){ + var oStartContainer = oEndPoints.oStartContainer; + var iStartOffset = oEndPoints.iStartOffset; + + var oEndContainer = oEndPoints.oEndContainer; + var iEndOffset = oEndPoints.iEndOffset; + + if(!oStartContainer) return oEndPoints; + if(oStartContainer.nodeType != 3) return oEndPoints; + if(iStartOffset == 0) return oEndPoints; + + if(oStartContainer.nodeValue.length <= iStartOffset) return oEndPoints; + + var oLastPart = oStartContainer.splitText(iStartOffset); + + if(oStartContainer == oEndContainer){ + iEndOffset -= iStartOffset; + oEndContainer = oLastPart; + } + oStartContainer = oLastPart; + iStartOffset = 0; + + return {oStartContainer: oStartContainer, iStartOffset: iStartOffset, oEndContainer: oEndContainer, iEndOffset: iEndOffset}; + }, + + _splitEndTextNode : function(oEndPoints){ + var oStartContainer = oEndPoints.oStartContainer; + var iStartOffset = oEndPoints.iStartOffset; + + var oEndContainer = oEndPoints.oEndContainer; + var iEndOffset = oEndPoints.iEndOffset; + + if(!oEndContainer) return oEndPoints; + if(oEndContainer.nodeType != 3) return oEndPoints; + + if(iEndOffset >= oEndContainer.nodeValue.length) return oEndPoints; + if(iEndOffset == 0) return oEndPoints; + + oEndContainer.splitText(iEndOffset); + + return {oStartContainer: oStartContainer, iStartOffset: iStartOffset, oEndContainer: oEndContainer, iEndOffset: iEndOffset}; + }, + + _getNodesInRange : function(){ + if(this.collapsed) return []; + + var oStartNode = this._getActualStartNode(this.startContainer, this.startOffset); + var oEndNode = this._getActualEndNode(this.endContainer, this.endOffset); + + return this._getNodesBetween(oStartNode, oEndNode); + }, + + _getActualStartNode : function(oStartContainer, iStartOffset){ + var oStartNode = oStartContainer;; + + if(oStartContainer.nodeType == 3){ + if(iStartOffset >= oStartContainer.nodeValue.length){ + oStartNode = this._getNextNode(oStartContainer); + if(oStartNode.tagName == "BODY") oStartNode = null; + }else{ + oStartNode = oStartContainer; + } + }else{ + if(iStartOffset < DOMfix.DF_childNode(oStartContainer).length){ + oStartNode = DOMfix.DF_childNode(oStartContainer)[iStartOffset]; + }else{ + oStartNode = this._getNextNode(oStartContainer); + if(oStartNode.tagName == "BODY") oStartNode = null; + } + } + + return oStartNode; + }, + + _getActualEndNode : function(oEndContainer, iEndOffset){ + var oEndNode = oEndContainer; + + if(iEndOffset == 0){ + oEndNode = this._getPrevNode(oEndContainer); + if(oEndNode.tagName == "BODY") oEndNode = null; + }else if(oEndContainer.nodeType == 3){ + oEndNode = oEndContainer; + }else{ + oEndNode = DOMfix.DF_childNode(oEndContainer)[iEndOffset-1]; + } + + return oEndNode; + }, + + _getNextNode : function(node){ + if(!node || node.tagName == "BODY") return this._doc.body; + + if(node.nextSibling) return node.nextSibling; + + return this._getNextNode(DOMfix.DF_parentNode(node)); + }, + + _getPrevNode : function(node){ + if(!node || node.tagName == "BODY") return this._doc.body; + + if(node.previousSibling) return node.previousSibling; + + return this._getPrevNode(DOMfix.DF_parentNode(node)); + }, + + // includes partially selected + // for
, _getNodesBetween(b, c) will yield to b, "a" and c + _getNodesBetween : function(oStartNode, oEndNode){ + var aNodesBetween = []; + + if(!oStartNode || !oEndNode) return aNodesBetween; + + this._recurGetNextNodesUntil(oStartNode, oEndNode, aNodesBetween); + return aNodesBetween; + }, + + _recurGetNextNodesUntil : function(node, oEndNode, aNodesBetween){ + if(!node) return false; + + if(!this._recurGetChildNodesUntil(node, oEndNode, aNodesBetween)) return false; + + var oNextToChk = node.nextSibling; + + while(!oNextToChk){ + if(!DOMfix.DF_parentNode(node)) return false; + node = DOMfix.DF_parentNode(node); + + aNodesBetween[aNodesBetween.length] = node; + + if(node == oEndNode) return false; + + oNextToChk = node.nextSibling; + } + + return this._recurGetNextNodesUntil(oNextToChk, oEndNode, aNodesBetween); + }, + + _recurGetChildNodesUntil : function(node, oEndNode, aNodesBetween){ + if(!node) return false; + + var bEndFound = false; + var oCurNode = node; + if(oCurNode.firstChild){ + oCurNode = oCurNode.firstChild; + while(oCurNode){ + if(!this._recurGetChildNodesUntil(oCurNode, oEndNode, aNodesBetween)){ + bEndFound = true; + break; + } + oCurNode = oCurNode.nextSibling; + } + } + + aNodesBetween[aNodesBetween.length] = node; + + if(bEndFound) return false; + if(node == oEndNode) return false; + + return true; + }, + getNodes : function(bSplitTextEndNodes, fnFilter){ + if(bSplitTextEndNodes) this._splitTextEndNodesOfTheRange(); + + var aAllNodes = this._getNodesInRange(); + var aFilteredNodes = []; + + if(!fnFilter) return aAllNodes; + + for(var i=0; i[A]BCD

---paste O---> O

BCD

+ clone.moveToBookmark(sBM); + clone.deleteContents(); + clone.removeStringBookmark(sBM); + } +}); + +SSelection = function(win){ + this.init = function(win){ + this._window = win || window; + this._document = this._window.document; + }; + this.init(win); + + if(AXUtil.browser.name == "ie") + SSelectionImpl_IE.apply(this); + else + SSelectionImpl_FF.apply(this); + + this.selectRange = function(oRng){ + this.selectNone(); + this.addRange(oRng); + }; + + this.selectionLoaded = true; + if(!this._oSelection) this.selectionLoaded = false; +}; + +SSelectionImpl_FF = function(){ + this._oSelection = this._window.getSelection(); + + this.getRangeAt = function(iNum){ + iNum = iNum || 0; + + try{ + var oFFRange = this._oSelection.getRangeAt(iNum); + }catch(e){return new AXDOMRange(this._document);} + return this._FFRange2W3CRange(oFFRange); + }; + + this.addRange = function(oW3CRange){ + var oFFRange = this._W3CRange2FFRange(oW3CRange); + this._oSelection.addRange(oFFRange); + }; + + this.selectNone = function(){ + this._oSelection.removeAllRanges(); + }; + + this._FFRange2W3CRange = function(oFFRange){ + var oW3CRange = new AXDOMRange(this._document); + oW3CRange.setStart(oFFRange.startContainer, oFFRange.startOffset); + oW3CRange.setEnd(oFFRange.endContainer, oFFRange.endOffset); + return oW3CRange; + }; + + this._W3CRange2FFRange = function(oW3CRange){ + var oFFRange = this._document.createRange(); + oFFRange.setStart(oW3CRange.startContainer, oW3CRange.startOffset); + oFFRange.setEnd(oW3CRange.endContainer, oW3CRange.endOffset); + + return oFFRange; + }; +}; + +SSelectionImpl_IE = function(){ + this._oSelection = this._document.selection; + + this.getRangeAt = function(iNum){ + iNum = iNum || 0; + + if(this._oSelection.type == "Control"){ + var oW3CRange = new AXDOMRange(this._document); + + var oSelectedNode = this._oSelection.createRange().item(iNum); + + // if the selction occurs in a different document, ignore + if(!oSelectedNode || oSelectedNode.ownerDocument != this._document) return oW3CRange; + + oW3CRange.selectNode(oSelectedNode); + + return oW3CRange; + }else{ + this._document.body.focus(); + + var oSelectedNode = this._oSelection.createRangeCollection().item(iNum).parentElement(); + + // if the selction occurs in a different document, ignore + if(!oSelectedNode || oSelectedNode.ownerDocument != this._document){ + var oW3CRange = new AXDOMRange(this._document); + return oW3CRange; + } + return this._IERange2W3CRange(this._oSelection.createRangeCollection().item(iNum)); + } + }; + + this.addRange = function(oW3CRange){ + var oIERange = this._W3CRange2IERange(oW3CRange); + oIERange.select(); + }; + + this.selectNone = function(){ + this._oSelection.empty(); + }; + + this._W3CRange2IERange = function(oW3CRange){ + var oStartIERange = this._getIERangeAt(oW3CRange.startContainer, oW3CRange.startOffset); + var oEndIERange = this._getIERangeAt(oW3CRange.endContainer, oW3CRange.endOffset); + oStartIERange.setEndPoint("EndToEnd", oEndIERange); + + return oStartIERange; + }; + + this._getIERangeAt = function(oW3CContainer, iW3COffset){ + var oIERange = this._document.body.createTextRange(); + + var oEndPointInfoForIERange = this._getSelectableNodeAndOffsetForIE(oW3CContainer, iW3COffset); + + var oSelectableNode = oEndPointInfoForIERange.oSelectableNodeForIE; + var iIEOffset = oEndPointInfoForIERange.iOffsetForIE; + + oIERange.moveToElementText(oSelectableNode); + oIERange.collapse(oEndPointInfoForIERange.bCollapseToStart); + oIERange.moveStart("character", iIEOffset); + + return oIERange; + }; + + this._getSelectableNodeAndOffsetForIE = function(oW3CContainer, iW3COffset){ + var oIERange = this._document.body.createTextRange(); + + var oNonTextNode = null; + var aChildNodes = null; + var iNumOfLeftNodesToCount = 0; + + if(oW3CContainer.nodeType == 3){ + oNonTextNode = DOMfix.DF_parentNode(oW3CContainer); + aChildNodes = DOMfix.DF_childNode(oNonTextNode); + iNumOfLeftNodesToCount = aChildNodes.length; + }else{ + oNonTextNode = oW3CContainer; + aChildNodes = DOMfix.DF_childNode(oNonTextNode); + iNumOfLeftNodesToCount = iW3COffset; + } + + var oNodeTester = null; + + var iResultOffset = 0; + + var bCollapseToStart = true; + + for(var i=0; i=0) break; + + oPrevNonTextNode = aChildNodes[i]; + } + + var pointRangeIdx = i; + + if(pointRangeIdx != 0 && aChildNodes[pointRangeIdx-1].nodeType == 3){ + var oRgTextStart = this._document.body.createTextRange(); + var oCurTextNode = null; + if(oPrevNonTextNode){ + oRgTextStart.moveToElementText(oPrevNonTextNode); + oRgTextStart.collapse(false); + oCurTextNode = oPrevNonTextNode.nextSibling; + }else{ + oRgTextStart.moveToElementText(oContainer); + oRgTextStart.collapse(true); + oCurTextNode = oContainer.firstChild; + } + + var oRgTextsUpToThePoint = oRgOrigPoint.duplicate(); + oRgTextsUpToThePoint.setEndPoint("StartToStart", oRgTextStart); + + var textCount = oRgTextsUpToThePoint.text.length + + while(textCount > oCurTextNode.nodeValue.length && oCurTextNode.nextSibling){ + textCount -= oCurTextNode.nodeValue.length; + oCurTextNode = oCurTextNode.nextSibling; + } + + // this will enforce IE to re-reference oCurTextNode + var oTmp = oCurTextNode.nodeValue; + + if(bStartPt && oCurTextNode.nextSibling && oCurTextNode.nextSibling.nodeType == 3 && 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}; + }; +} +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +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 = false; + this.sortOn = false; + this.config.moveSens = 5; + this.moveSens = 0; + this.config.scrollPos = true; + }, + /* ------------------------------------------------------------------------------------------------------------------ */ + /* init ~~~~~~ */ + init: function() { + this.draged = false; + //this.dragBox = new Element('div', { 'class':this.config.dragBoxClassName}); + this.dragBox = jQuery("
"); + this.dragBox.html("
0
"); + + if (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 = []; + //ready dragBox + + if (this.config.multiSelector) { //AXJMselect init + this.mselector = new AXMultiSelect(); + this.config.multiSelector.useHelper = false; + 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) { + if (power) { + this.draging(false); + 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"); + //alert("x"); + } else { + if (this.mouseMove) jQuery("#" + this.config.dragStage).unbind('mousemove', this.mouseMove); + if (this.mouseOver) jQuery("#" + this.config.dragStage).unbind('mouseover', this.mouseOver); + if (this.mouseUp) jQuery(document).unbind("mouseup", this.mouseup); + if (this.selectstart) jQuery(document).unbind("selectstart", this.selectstart); + if (this.keyUp) jQuery(document).unbind("keyup", this.keyup); + jQuery("#" + this.config.dragStage).removeClass("AXJSelectNone"); + //alert("y"); + } + }, + inactive: function() { + if (this.mouseDown) jQuery("#" + this.config.dragStage).unbind('mousedown', this.mouseDown); + if (this.dragStart) jQuery("#" + this.config.dragStage).unbind('dragstart', this.dragStart); + }, + /* ------------------------------------------------------------------------------------------------------------------ */ + /* on observe method ~~~~~~ */ + onmouseDown: function(event) { + + if (event.button == 2) return; + var eventTarget = event.target; + + if (eventTarget) { + while (!axdom(eventTarget).hasClass(this.config.dragClassName)) { + if (eventTarget.parentNode) eventTarget = eventTarget.parentNode; + else break; + } + } + if (!jQuery(eventTarget).hasClass(this.config.dragClassName)) return; + + var dragElement = eventTarget; + if (dragElement) { + if (AXUtil.browser.name == "moz") { + this.dragParent = jQuery(dragElement).parent(); + if (this.dragParent.css("overflow") == "visible") { + this.dragParent = null; + } + } + + if (this.config.multiSelector) { + if (event.shiftKey || event.metaKey || event.ctrlKey) { + + }else{ + this.mselector.clickSelects(dragElement); + } + this.dragReady(); + } else { + this.dragReady([dragElement]); + } + } + }, + ondragStart: function(event) { + event.stopPropagation(); // disable event + return false; + }, + onselectStart: function(event) { + event.stopPropagation(); + return false; + }, + onmouseUp: function(event) { + var dropElement; + var eventTarget; + + if (this.config.sort) { + eventTarget = event.target; + if (eventTarget) { + while (!axdom(eventTarget).hasClass(this.config.dragClassName)) { + + if (eventTarget.parentNode) eventTarget = eventTarget.parentNode; + else break; + } + } + var isSort = jQuery(eventTarget).hasClass(this.config.dragClassName); + } + + if (!isSort) { //소트타입이 아니라면 + eventTarget = event.target; + var isDrop = jQuery(eventTarget).hasClass(this.config.dropClassName); + } + + if (isSort) { + if (eventTarget && this.draged) { + if (this.config.onSort) this.config.onSort({ dragItem: this.dragItem, sortItem: eventTarget }); + this.endSort(); + } + } else if (isDrop) { + if (eventTarget && this.draged) { + jQuery(eventTarget).removeClass(this.config.bedropClassName); + if (this.config.onDrop) this.config.onDrop({ dragItem: this.dragItem, dropItem: eventTarget }); + } + } + + this.draging(false); + this.endDrag(); + }, + onkeyUp: function(event) { + + }, + onmouseMove: function(event) { + if (!event.pageX) return; + + if (this.config.scrollPos) { + if (document.body.scrollTop == 0) { + var st = document.documentElement.scrollTop; + var sl = document.documentElement.scrollLeft; + } else { + var st = document.body.scrollTop; + var sl = document.body.scrollLeft; + } + this.mouse = { x: (event.pageX - sl) || 0, y: (event.pageY - st) || 0 }; //Event.pointer(event); + } else { + this.mouse = { x: event.pageX || 0, y: event.pageY || 0 }; //Event.pointer(event); + } + //드래그 감도 적용 + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) this.dragboxMove(); + }, + onmouseOver: function(event) { + var eventTarget; + + if (this.config.sort) { + eventTarget = event.target; + if (eventTarget) { + while (!axdom(eventTarget).hasClass(this.config.dragClassName)) { + + if (eventTarget.parentNode) eventTarget = eventTarget.parentNode; + else break; + } + } + var isSort = jQuery(eventTarget).hasClass(this.config.dragClassName); + } + + if (!isSort) { //소트타입이 아니라면 + eventTarget = event.target; + var isDrop = jQuery(eventTarget).hasClass(this.config.dropClassName); + } + + if (isDrop) { + if (eventTarget) jQuery(eventTarget).addClass(this.config.bedropClassName); + this.endSort(); + } else if (isSort) { + if (eventTarget) this.startSort(eventTarget); + } else { + if (this.sortOn) this.endSort(); + } + }, + onmouseOut: function(event) { + if (!jQuery(event.target).hasClass(this.config.dropClassName)) return; + var dropElement = event.target; + if (dropElement) { + jQuery(dropElement).removeClass(this.config.bedropClassName); + } + }, + startSort: function(target) { + jQuery(target).before(this.sorter); + this.sortOn = true; + }, + endSort: function() { + if (this.sortOn) { + jQuery(this.sorter).detach(); + } + if (this.config.onStopDrag) this.config.onStopDrag({ dragItem: this.dragItem }); + }, + dragboxMove: function() { + if (!this.draged) { + this.draged = true; + if (this.dragParent) this.dragParent.css({ "overflow": "hidden" }); + var bedragClassName = this.config.bedragClassName; + if (this.config.appendTarget) + jQuery("#" + this.config.appendTarget).append(this.dragBox); + else + jQuery("#" + this.config.dragStage).after(this.dragBox); + + this.dragBoxDim = { width: this.dragBox.width(), height: this.dragBox.height() }; //.getDimensions(); + this.dragCount.html(this.dragItem.length); + this.dragTrigger(); + //draged dragItem + 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) { + if (this.dragParent) this.dragParent.css({ "overflow": "auto" }); + + var bedragClassName = this.config.bedragClassName; + this.draged = false; + this.dragBox.detach(); + this.endSort(); + //undraged dragItem + jQuery(this.dragItem).removeClass(bedragClassName); + if (this.config.multiSelector) this.mselector.clearSelects(); + else this.dragItem.clear(); + this.moveSens = 0; + } + }, + /* ------------------------------------------------------------------------------------------------------------------ */ + /* class method ~~~~~~ */ + dragReady: function(dragItems) { + if (this.config.multiSelector) this.dragItem = this.mselector.getSelects(); + else this.dragItem = dragItems; + this.draging(true); + }, + dragTrigger: function() { + if (this.config.onDrag) this.config.onDrag({ dragItem: this.dragItem }); + }, + collectItem: function() { + if (this.config.multiSelector) { + if (this.observer) clearTimeout(this.observer); + this.observer = setTimeout(this.collectItemAct.bind(this), 100); + } + }, + collectItemAct: function() { + this.mselector.collect(); + }, + nothing: function() { + + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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" + } +}; + +/* + +2014-04-17 : tom - insert image & remove image 아이디 문제 해결 + +*/ + +var AXEditor = Class.create(AXJ, { + version : "AXEditor V1.1", + author : "SQUALL", + createDate : "2010.11.23", + lastModifyDate: "2014.04.17", + initialize: function(AXJ_super){ + AXJ_super(); + this.moveSens = 0; + this.contentMode = "editor"; + this.panelNum = 0; + this.attchFiles = []; + this.readyFiles = []; + with(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 = false; + config.tabTableUsed = false; + config.tabLayoutUsed = false; + config.tabOptionUsed = false; + config.tabExternalUsed = false; + 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.0, 1.2, 1.5, 1.8, 2.0, 2.5]; + config.swfUploader = ""; + config.uploadUrl = ""; + config.uploadPars = ["p1=1","p2=2"]; + config.deleteUrl = "", + config.deletePars = [], + config.uploadVolume = (5 * 1024 * 1024); + config.uploadFilterName = "All,Image"; + config.uploadFilterValue = "*.*,*.jpg; *.gif; *.png"; + config.uploadCallBack = "mmuCall"; + config.tabExternals = []; + config.readyTofocus = true; + } + + + 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 + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + this._self.append(po.join('')); + + // define element + this.container= jQuery("#"+config.targetID+"_container"); + this.head = jQuery("#"+config.targetID+"_head"); + this.body = jQuery("#"+config.targetID+"_body"); + this.foot = jQuery("#"+config.targetID+"_foot"); + + //init head + this.initHead(); + + //init foot + this.initFoot(); + + //init body + this.initBody(); + }, + initHead: function(){ + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + var po = []; + /*메뉴탭과 패널*/ + /*po.push("
");*/ + po.push("
"); + this.head.append(po.join('')); + /*메뉴 내용 구성*/ + + this.initPanel(); + }, + initPanel: function(){ + var config = this.config; + var re = config.targetID; + var 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; + var re = config.targetID; + var items = ["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"]; + jQuery("#"+re+"_"+items[this.panelNum]).parent().removeClass("me___itemOn"); + if(this.panelNum == 0) return; + if(this.panelNum == 1) this.initFlashButtonMoveTo(jQuery("#"+re+"_"+items[this.panelNum]).parent()); + + /*this.closeFileStatus();*/ + this.divPanel.remove(); + jQuery("#"+config.targetID+"_head").removeClass("editorHeadExt"); + }, + openPanel: function(){ + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + var items = ["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"]; + jQuery("#"+re+"_"+items[this.panelNum]).parent().addClass("me___itemOn"); + + if(this.panelNum == 0) return; + if(this.panelNum == 1){ + 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){ + if(fo.checked){ + po.push("
"); + }else{ + po.push("
"); + } + po.push("
"+fo.ti.dec()+"
"); + po.push("
"); + var ty = fo.ty.dec().toLowerCase(); + if(ty == ".gif" | ty == ".jpg" | ty == ".png" | ty == ".bmp"){ + po.push("") + } + po.push("
"); + po.push("
"); + }); + + po.push("
 
"); + po.push("
"); + this.divPanel.html(po.join('')); + + this.openFileStatus(); + } + if(this.panelNum == 5){ + 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("
"); + if(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"); + if(this.panelNum == 1){ + 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)); + } + if(this.panelNum == 5){ + jQuery("#"+re+"_divPanel_external").find(".componentItem").bind("click", this.onClickComponent.bind(this)); + } + }, + setAttchItem: function(arg){ + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + if(!arg) return; + + /*file size check*/ + var useByte = 0; + var volumeByte = config.uploadVolume; + jQuery.each(this.attchFiles, function(){ + useByte += this.size.number(); + }); + jQuery.each(arg, function(index){ + useByte += this.size.number(); + }); + if(useByte > volumeByte){ + /*alert( lg.volumeOverMsg + "\n\n(" + useByte.byte() + "/" + volumeByte.byte() +")" );*/ + /*AXFlash.requestFn(re+"_attched_swf","uploadCancel");*/ + /*return;*/ + } + this.readyFiles = arg; + this.readyUpload(); + /*업로드 시작*/ + /*AXFlash.requestFn(re+"_attched_swf", "uploadStart");*/ + }, + readyUpload: function(){ + if(this.readyFiles.length == 0) return; + var config = this.config; + var re = config.targetID; + /*ready file*/ + var startIndex = this.attchFiles.length; + var po = []; + po.push("
"); + po.push("
.....
"); + po.push("
"); + po.push("
"); + jQuery("#"+re+"_divPanel_attchItemEnd").before(po.join('')); + }, + uploadedFile: function(arg){ + var config = this.config; + var re = config.targetID; + var 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(ty == ".gif" | ty == ".jpg" | ty == ".png" | ty == ".bmp"){ + 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); + var canvasWidth = this.canvas.width() - 40; + imgObj.onload = function(){ + var ow = imgObj.width; + var oh = imgObj.height; + if(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){ + + /*trace(file);*/ + + /*{id:"", ti:"", nm:"", ty:"", sz:"", path:"", thumb:""}*/ + var config = this.config; + var re = config.targetID; + var ty = file.ty.dec().toLowerCase(); + var 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); + var canvasWidth = this.canvas.width() - 40; + imgObj.onload = function(){ + var ow = imgObj.width; + var oh = imgObj.height; + if(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; + var 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)); + }, + /* initFoot sub functions */ + 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){ + if(!event.pageX) return; + this.mouse = {x:event.pageX||0, y:event.pageY||0}; + if(this.config.moveSens > this.moveSens) this.moveSens++; + if(this.moveSens == this.config.moveSens) this.footMove(); + }, + footMove: function(){ + if(!this.draged){ + this.draged = true; + this.canvasTop = (this.contentMode == "html") ? this.htmlArea.offset().top : this.canvas.offset().top; + } + if( (this.mouse.y - this.canvasTop) > 100 ) this.config.height = (this.mouse.y - this.canvasTop - 2); + if(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 = false; + }, + footSetCanvasHeight: function(){ + this.canvas.css({height:this.config.height+"px"}); + if(this.contentMode == "html"){ + this.htmlArea.css({height:this.canvas.height()+"px"}); + } + }, + /* initFoot sub functions */ + 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(power == "on"){ + var config = this.config; + var 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; + if(AXUtil.browser.name == "ie") editorBody.body.contentEditable = true; + else if(AXUtil.browser.name == "webkit"){ + editorBody.body.contentEditable = true; + editorBody.designMode = "On"; + }else if(AXUtil.browser.name == "mozilla") editorBody.designMode = "On"; + else editorBody.designMode = "On"; + try{ + jQuery(editorBody.body).css({"font-size":config.editorFontSize}); + jQuery(editorBody.body).css({"font-family":config.editorFontFamily}); + }catch(e){ + } + + this.bindFocusFrame(); + if(this.config.onReady) this.config.onReady(); + }, + focusFrame: function(){ + /* close all menu*/ + this.closeColorPicker(); + this.closeffPicker(); + this.closefsPicker(); + this.closelhPicker(); + + this.closeicPicker(); + }, + unbindFocusFrame: function(){ + var editorBody = this.myEDT.document; + if(AXUtil.browser.name == "mozilla") jQuery(editorBody).unbind("focus", this.focusFrame.bind(this)); + else jQuery(editorBody.body).unbind("focus", this.focusFrame.bind(this)); + }, + bindFocusFrame: function(){ + var editorBody = this.myEDT.document; + if(AXUtil.browser.name == "mozilla") jQuery(editorBody).bind("focus", this.focusFrame.bind(this)); + else jQuery(editorBody.body).bind("focus", this.focusFrame.bind(this)); + }, + onselectStart: function(event){ + event.stopPropagation(); + return false; + }, + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + __command: function(sCommand, bUserInterface, vValue){ + var myEDT = this.myEDT.document; + myEDT.execCommand(sCommand, bUserInterface, vValue); + }, + __pasteHTML: function(sHTML){ + var myEDT = this.myEDT.document; + var oTmpDiv = myEDT.createElement("DIV"); + var oTmpP = myEDT.createElement("P"); + oTmpDiv.appendChild(oTmpP); + if(typeof(sHTML) == "string") oTmpDiv.innerHTML = sHTML; + else oTmpP.appendChild(sHTML); + + if(this.contentMode == "editor"){ + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + rng.insertNode(oTmpDiv.lastChild); + }else{ + jQuery("#"+this.config.targetID+"_html").val(jQuery("#"+this.config.targetID+"_html").val()+oTmpDiv.innerHTML); + } + }, + /* click event */ + onHeadClick: function(event){ + if(typeof(event) == "object"){ + var myID = event.target.id; + if(!myID) return; + var ids = myID.split(/_/g); + var headNM = ids[1]; + var headCMD = ids[2]; + }else{ + var headNM = event; + var headCMD = ""; + } + if(headNM == "home"){ + this.closePanel(); + this.panelNum = 0; + this.openPanel(); + }else if(headNM == "attch"){ + if(this.panelNum == 1) return; + this.closePanel(); + this.panelNum = 1; + this.openPanel(); + }else if(headNM == "external"){ + if(this.panelNum == 5) return; + this.closePanel(); + this.panelNum = 5; + this.openPanel(); + } + }, + onAttchPanelOpen: function(arg){ + if(this.panelNum == 1){ + if(arg) this.setAttchItem(arg); + return; + } + this.closePanel(); + this.panelNum = 1; + this.openPanel(); + if(arg) this.setAttchItem(arg); + }, + onSimpleCommandClick: function(event){ + var myID = event.target.id; + if(!myID) return; + var command = this._GPT(myID); + this.__command(command); + }, + onColorCommandClick: function(event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var myID = event.target.id; + if(!myID) return; + var myCommand = this._GPT(myID); + var myColor = jQuery("#"+myID+"Val").css("background-color").toColor(); + this.__command(myCommand, false, myColor); + + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + var nodes = rng.getNodes(); + if(nodes.length){ + for(var a=0;a"); + } + }, + onSelectCommandClick: function(event){ + var myEDT = this.myEDT.document; + var myID = event.target.id; + if(!myID) return; + var command = this._GPT(myID); + /*alert("select Command : " + command);*/ + if(command == "foreColorExt" || command == "backColorExt") this.openColorPicker(command); + if(command == "fontname") this.fontFamilyPicker(command); + if(command == "fontsize") this.fontSizePicker(command); + if(command == "lineHeight") this.lineHeightPicker(command); + if(command == "url") this.urlPicker(command); + if(command == "imoticon") this.icoPicker(command); + }, + onAttbtnsClick: function(event){ + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + var myID = event.target.id; + if(!myID) return; + var cmd = myID.split(/_/g).last(); + if(cmd == "selectAll"){ + jQuery.each(this.attchFiles, function(idx, f){ + f.checked = true; + jQuery("#"+re+"_attchItem_"+idx).addClass("attchItemON"); + }); + } + if(cmd == "delete"){ + var delFiles = []; + jQuery.each(this.attchFiles, function(idx, f){ + if(f.checked){ + delFiles.push("file="+f.nm+"&path="+f.path) + } + }); + if(delFiles.length == 0){ + alert(lg.noSelectedFileMsg); + return; + } + if(!confirm(lg.fileDeleteConfirm)) return; + var url = config.deleteUrl; + var pars = config.deletePars.join("&"); + if(pars != "") pars += "&"; + pars += delFiles.join("&")+"&dummy="+AXUtil.timekey(); + /*new AXreq(url, {pars:pars, onsucc:this.onFileDelete.bind(this)});*/ + } + if(cmd == "insertDoc"){ + var insertFiles = jQuery.map(this.attchFiles, function(f){ + if(f.checked) return f; + }); + if(insertFiles.length == 0){ + alert(lg.noSelectedFileMsg); + return; + } + + try{ + this.myEDT.document.body.focus(); + }catch(e){} + + for(var si = 0;si canvasWidth){ + imgObj.width = canvasWidth; + imgObj.height = oh * (imgObj.width / ow); + } + try{ + pasteHTML(imgObj); + }catch(e){ + alert(e.print()); + } + } + + }else{ + this.__pasteHTML(""+fo.ti.dec()+""); + } + } + /*img resize*/ + } + }, + onFeilDeleteInFrame: function(rid){ + var editorBody = this.myEDT.document; + if(AXUtil.browser.name == "mozilla"){ + jQuery(editorBody).find(rid).remove(); + }else{ + jQuery(editorBody.body).find(rid).remove(); + } + }, + onFileDelete: function(res){ + if(res.result == "ok"){ + var config = this.config; + var re = config.targetID; + + var removeInFrame = this.onFeilDeleteInFrame.bind(this); + this.attchFiles = jQuery.map(this.attchFiles, function(f, i){ + jQuery("#"+re+"_attchItem_"+i).remove(); + if(f.checked){ + removeInFrame("#MF_"+f.nm.replace(f.ty, "").dec()); + }else{ + return f; + } + }); + + this.updateFileStatus(); + + if(this.attchFiles.length == 0) 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(); + if(ty == ".gif" | ty == ".jpg" | ty == ".png" | ty == ".bmp") + 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; + var re = config.targetID; + var 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); + if(this.attchFiles[fidx].checked){ + jQuery("#"+re+"_attchItem_"+fidx).addClass("attchItemON"); + }else{ + 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; + }; + if(this.config.onTabExternals) this.config.onTabExternals(myID); + }, + /* ~~ colorPicker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + openColorPicker: function(command){ + if(this.colorPicker) this.colorPicker.remove(); + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + var po = []; + po.push("
"); + po.push("
"); + if(command == "foreColorExt") po.push("
"+lg.textColor+"
"); + if(command == "backColorExt") po.push("
"+lg.textBgColor+"
"); + jQuery.each(config.colors, function(index, n){ + po.push(""+n+""); + }); + po.push("
"); + this.colorPicker = jQuery(po.join('')); + var myHeight = (config.colors.length / 7).ceil() * 21 + 28; + if(command == "foreColorExt") this.colorPicker.css({width:150, height:myHeight, left:249, top:25}); + if(command == "backColorExt") this.colorPicker.css({width:150, height:myHeight, left:287, top:25}); + jQuery("#"+re+"_headPanel").append(this.colorPicker); + + /*other click observer init*/ + this.clickToClose = this.closeColorPicker.bind(this); + jQuery(document).bind("click", this.clickToClose); + this.keyDownToClose = this.closeColorPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToClose); + /*color select*/ + this.colorPicker.find(".colorItem").bind("click", this.clickColor.bind(this, command)); + }, + closeColorPicker: function(event){ + if(event){ + if(!jQuery(event.target).hasClass("me_picker")){ + if(this.clickToClose) jQuery(document).unbind('click', this.clickToClose); + if(this.keyDownToClose) jQuery(document).unbind('keydown', this.keyDownToClose); + if(this.colorPicker) this.colorPicker.remove(); + } + }else{ + if(this.clickToClose) jQuery(document).unbind('click', this.clickToClose); + if(this.keyDownToClose) jQuery(document).unbind('keydown', this.keyDownToClose); + if(this.colorPicker) this.colorPicker.remove(); + } + }, + closeColorPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToClose) jQuery(document).unbind('click', this.clickToClose); + if(this.keyDownToClose) jQuery(document).unbind('keydown', this.keyDownToClose); + if(this.colorPicker) this.colorPicker.remove(); + } + }, + clickColor: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + + var myColor = jQuery(event.target).css("background-color").toColor(); + var myCommand = command.replace("Ext", ""); + this.__command(myCommand, false, myColor); + + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + var 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 = config.fonts.length * 25 + 30; + this.ffPicker.css({width:150, height:myHeight, left:3, top:25}); + jQuery("#"+re+"_headPanel").append(this.ffPicker); + + /*other click observer init*/ + this.clickToCloseFF = this.closeffPicker.bind(this); + jQuery(document).bind("click", this.clickToCloseFF); + this.keyDownToCloseFF = this.closeffPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToCloseFF); + /*color select*/ + this.ffPicker.find(".ffItem").bind("click", this.clickff.bind(this, command)); + }, + closeffPicker: function(event){ + if(event){ + if(!jQuery(event.target).hasClass("me_ffs")){ + if(this.clickToCloseFF) jQuery(document).unbind('click', this.clickToCloseFF); + if(this.keyDownToCloseFF) jQuery(document).unbind('keydown', this.keyDownToCloseFF); + if(this.ffPicker) this.ffPicker.remove(); + } + }else{ + if(this.clickToCloseFF) jQuery(document).unbind('click', this.clickToCloseFF); + if(this.keyDownToCloseFF) jQuery(document).unbind('keydown', this.keyDownToCloseFF); + if(this.ffPicker) this.ffPicker.remove(); + } + }, + closeffPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToCloseFF) jQuery(document).unbind('click', this.clickToCloseFF); + if(this.keyDownToCloseFF) jQuery(document).unbind('keydown', this.keyDownToCloseFF); + if(this.ffPicker) this.ffPicker.remove(); + } + }, + clickff: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var myfont = jQuery(event.target).css("font-family"); + + this.__command(command, false, myfont); + + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + var 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 = config.fontsizes.length * 25 + 30; + this.fsPicker.css({width:150, height:myHeight, left:95, top:25}); + jQuery("#"+re+"_headPanel").append(this.fsPicker); + + /*other click observer init*/ + this.clickToCloseFS = this.closefsPicker.bind(this); + jQuery(document).bind("click", this.clickToCloseFS); + this.keyDownToCloseFS = this.closefsPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToCloseFS); + /*color select*/ + this.fsPicker.find(".ffItem").bind("click", this.clickfs.bind(this, command)); + }, + closefsPicker: function(event){ + if(event){ + if(!jQuery(event.target).hasClass("me_fss")){ + if(this.clickToCloseFS) jQuery(document).unbind('click', this.clickToCloseFS); + if(this.keyDownToCloseFS) jQuery(document).unbind('keydown', this.keyDownToCloseFS); + if(this.fsPicker) this.fsPicker.remove(); + } + }else{ + if(this.clickToCloseFS) jQuery(document).unbind('click', this.clickToCloseFS); + if(this.keyDownToCloseFS) jQuery(document).unbind('keydown', this.keyDownToCloseFS); + if(this.fsPicker) this.fsPicker.remove(); + } + }, + closefsPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToCloseFS) jQuery(document).unbind('click', this.clickToCloseFS); + if(this.keyDownToCloseFS) jQuery(document).unbind('keydown', this.keyDownToCloseFS); + if(this.fsPicker) this.fsPicker.remove(); + } + }, + clickfs: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var mysize = jQuery(event.target).css("font-size"); + this.__command(command, false, 1); + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + var 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 = config.lineHeights.length * 25 + 30; + this.lhPicker.css({width:100, height:myHeight, left:491, top:25}); + jQuery("#"+re+"_headPanel").append(this.lhPicker); + + /*other click observer init*/ + this.clickToCloseLH = this.closelhPicker.bind(this); + jQuery(document).bind("click", this.clickToCloseLH); + this.keyDownToCloseLH = this.closelhPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToCloseLH); + /*color select*/ + this.lhPicker.find(".ffItem").bind("click", this.clicklh.bind(this, command)); + }, + closelhPicker: function(event){ + if(event){ + if(!jQuery(event.target).hasClass("me_lhs")){ + if(this.clickToCloseLH) jQuery(document).unbind('click', this.clickToCloseLH); + if(this.keyDownToCloseLH) jQuery(document).unbind('keydown', this.keyDownToCloseLH); + if(this.lhPicker) this.lhPicker.remove(); + } + }else{ + if(this.clickToCloseLH) jQuery(document).unbind('click', this.clickToCloseLH); + if(this.keyDownToCloseLH) jQuery(document).unbind('keydown', this.keyDownToCloseLH); + if(this.lhPicker) this.lhPicker.remove(); + } + }, + closelhPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToCloseLH) jQuery(document).unbind('click', this.clickToCloseLH); + if(this.keyDownToCloseLH) jQuery(document).unbind('keydown', this.keyDownToCloseLH); + if(this.lhPicker) this.lhPicker.remove(); + } + }, + clicklh: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var mylh = jQuery(event.target).text(); + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + var 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); + + /* url find */ + this.myRange = new SSelection(this.myEDT); + this.oSelection = this.myRange.getRangeAt(0); + var oNode = this.oSelection.commonAncestorContainer; + while(oNode && oNode.tagName != "A") oNode = DOMfix.DF_parentNode(oNode); + if(oNode){ + var sTarget = oNode.target; + if(sTarget && sTarget == "_blank") jQuery("#"+target_blank)[0].checked = true; + jQuery("#"+inpID).val( oNode.href?oNode.href:"http://" ); + }else{ + jQuery("#"+inpID).val("http://"); + } + jQuery("#"+inpID).select(); + + /*other click observer init*/ + this.clickToCloseUL = this.closeulPicker.bind(this); + jQuery(document).bind("click", this.clickToCloseUL); + this.keyDownToCloseUL = this.closeulPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToCloseUL); + /*color select*/ + this.ulPicker.find(".me___inputBtnOK").bind("click", this.clickul.bind(this, command)); + /*this.bindFocusFrame();*/ + }, + closeulPicker: function(event){ + if(event){ + if(!jQuery(event.target).hasClass("me_url")){ + if(this.clickToCloseUL) jQuery(document).unbind('click', this.clickToCloseUL); + if(this.keyDownToCloseUL) jQuery(document).unbind('keydown', this.keyDownToCloseUL); + if(this.ulPicker) this.ulPicker.remove(); + } + }else{ + if(this.clickToCloseUL) jQuery(document).unbind('click', this.clickToCloseUL); + if(this.keyDownToCloseUL) jQuery(document).unbind('keydown', this.keyDownToCloseUL); + if(this.ulPicker) this.ulPicker.remove(); + } + }, + closeulPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToCloseUL) jQuery(document).unbind('click', this.clickToCloseUL); + if(this.keyDownToCloseUL) jQuery(document).unbind('keydown', this.keyDownToCloseUL); + if(this.ulPicker) this.ulPicker.remove(); + } + }, + clickul: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var lg = AXEditorLang[config.lang]; + var inpID = this._GID([re, command, "input"]); + var target_blank = this._GID([re, command, "target_blank"]); + var target_self = this._GID([re, command, "target_self"]); + + var sURL = jQuery("#"+inpID).val(); + this.myRange.selectRange(this.oSelection); + + if(this._validateURL(sURL)){ + var sTarget = (jQuery("#"+target_blank)[0].checked) ? "_blank" : "_self"; + if(this.oSelection.collapsed){ + this.__pasteHTML(""+sURL+""); + }else{ + this.__command("CreateLink", false, sURL); + this.myRange = new SSelection(this.myEDT); + this.oSelection = this.myRange.getRangeAt(0); + var oNode = this.oSelection.commonAncestorContainer; + while(oNode && oNode.tagName != "A") oNode = DOMfix.DF_parentNode(oNode); + if(oNode) oNode.target = sTarget; + } + }else{ + alert(lg.invalidUrlMsg); + } + this.closeulPicker(); + }, + _validateURL : function(sURL){ + return /^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(sURL); + }, + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + /* ~~ imoticon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + icoPicker: function(command){ + if(this.icPicker) this.icPicker.remove(); + var config = this.config; + var re = config.targetID; + var lg = AXEditorLang[config.lang]; + if(this.icoCategoryIndex == undefined) this.icoCategoryIndex = 0; + var icoCategoryIndex = this.icoCategoryIndex; + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + jQuery.each(config.AXEditorIcons, function(idx, ca){ + if(icoCategoryIndex == idx) + po.push(""+ca.categoryNM+""); + else + po.push(""+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; + var myHeight = 180; + this.icPicker.css({width:myWidth, height:myHeight, left:214, top:25}); + jQuery("#"+re+"_headPanel").append(this.icPicker); + + + /*other click observer init*/ + this.clickToCloseIC = this.closeicPicker.bind(this); + jQuery(document).bind("click", this.clickToCloseIC); + this.keyDownToCloseIC = this.closeicPickerKey.bind(this); + jQuery(document).bind("keydown", this.keyDownToCloseIC); + + /*select*/ + 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){ + if(event){ + if(!jQuery(event.target).hasClass("me_ico")){ + if(this.clickToCloseIC) jQuery(document).unbind('click', this.clickToCloseIC); + if(this.keyDownToCloseIC) jQuery(document).unbind('keydown', this.keyDownToCloseIC); + if(this.icPicker) this.icPicker.remove(); + } + }else{ + if(this.clickToCloseIC) jQuery(document).unbind('click', this.clickToCloseIC); + if(this.keyDownToCloseIC) jQuery(document).unbind('keydown', this.keyDownToCloseIC); + if(this.icPicker) this.icPicker.remove(); + } + }, + closeicPickerKey: function(){ + if(event.keyCode == AXUtil.Event.KEY_ESC){ + if(this.clickToCloseIC) jQuery(document).unbind('click', this.clickToCloseIC); + if(this.keyDownToCloseIC) jQuery(document).unbind('keydown', this.keyDownToCloseIC); + if(this.icPicker) this.icPicker.remove(); + } + }, + clickic: function(command, event){ + var config = this.config; + var re = config.targetID; + var myEDT = this.myEDT.document; + var sHTML = "" + var oTmpDiv = myEDT.createElement("DIV"); + oTmpDiv.innerHTML = sHTML; + var myRange = new SSelection(this.myEDT); + var rng = myRange.getRangeAt(0); + rng.insertNode(oTmpDiv.lastChild); + this.closeicPicker(); + }, + changeCategory: function(event){ + var config = this.config; + var re = config.targetID; + var idx = event.target.id.split("_").last(); + if(this.icoCategoryIndex != undefined){ + jQuery("#"+re+"_icoCategory_"+this.icoCategoryIndex).removeClass("on"); + } + this.icoCategoryIndex = idx; + icoCategoryIndex = idx; + jQuery("#"+re+"_icoCategory_"+idx).addClass("on"); + + var po = []; + var 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; + if(event.target.id == config.targetID+"_contentMode_0"){ + if(this.contentMode != "editor"){ + this.contentMode = "editor"; + jQuery("#"+config.targetID+"_contentMode_0").addClass("me____tabOn"); + jQuery("#"+config.targetID+"_contentMode_1").removeClass("me____tabOn"); + this.setHtmlMode("off"); + } + }else{ + if(this.contentMode != "html"){ + this.contentMode = "html"; + jQuery("#"+config.targetID+"_contentMode_0").removeClass("me____tabOn"); + jQuery("#"+config.targetID+"_contentMode_1").addClass("me____tabOn"); + this.setHtmlMode("on"); + } + } + /*goto home*/ + /*this.onHeadClick("home");*/ + }, + /* ~~ get&set content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + __getContent: function(){ + var myEDT = this.myEDT.document; + return myEDT.body.innerHTML; + }, + getContentCheck: function(){ + var myEDT = this.myEDT.document; + var editorContent = ""; + if(this.contentMode == "editor"){ + editorContent = myEDT.body.innerHTML; + }else{ + editorContent = this.htmlArea.val(); + } + + if (editorContent.trim() != ""){ + return true; + }else{ + return false; + } + + }, + + getContent: function(){ + var myEDT = this.myEDT.document; + var ff = myEDT.body.style.fontFamily; + var fs = myEDT.body.style.fontSize; + var cl = myEDT.body.style.color; + var bc = myEDT.body.style.backgroundColor; + var lh = myEDT.body.style.lineHeight; + + if(lh == ""){ + lh = "1.5em"; + } + + var sts = []; + if(ff) sts.push("font-family:"+ff); + if(fs) sts.push("font-size:"+fs); + if(cl) sts.push("color:"+cl); + if(bc) sts.push("background-color:"+bc); + if(lh) sts.push("line-height:"+lh); + + if(this.contentMode == "editor"){ + return "
"+myEDT.body.innerHTML+"
"; + }else{ + return "
"+this.htmlArea.val()+"
"; + } + }, + setContent: function(content){ + var myEDT = this.myEDT.document; + if(typeof content == "string"){ + if(content == "") content = "

"; + myEDT.body.innerHTML = content; + }else{ + var myBody = content.find(".AXEditorContentBody"); + if(myBody.html() == null){ + jQuery(myEDT.body).html(content.html()); + }else{ + content.children().each(function(){ + if(!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(){} +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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; + var 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; + var tStr = jQuery("#"+re+"_TEXT").val().trim(); + if(tStr == ""){ + alert("변환할 내용이 없습니다. 내용을 입력하세요."); + return; + } + var codeR = tStr.split(/\n/g); + + for(var a=0;a"); + copt.push(" "); + jQuery.each(colnames, function(){ + if(nm == this.nm){ + copt.push(" "); + }else{ + copt.push(" "); + } + }); + copt.push(""); + return copt.join(''); + } + + var 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, C){ + 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(){ + var re = this.config.targetID; + var frm = document[re+"_frm"]; + var cols = []; + for(var a=0;a (colWidth + 100 * astricCount)) { + var remainsWidth = (bodyWidth - cfg.fitToWidthRightMargin) - colWidth; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (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++) { + if (CG.display && CG.widthAstric) { + CG._owidth = 100; + CG.width = 100; + colWidth += (CG._owidth || 0).number(); + } + } + } + /* width * 예외처리 구문 ------------ e */ + } else { + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display && CG.widthAstric) { + CG.width = 100; + CG._owidth = 100; + colWidth += (CG._owidth || 0).number(); + } + } + } + this.colWidth = colWidth; + + if (cfg.fitToWidth) { /*너비 자동 맞춤버전의 경우 */ + if (bodyWidth > this.colWidth) { + var _bodyWidth = bodyWidth - cfg.fitToWidthRightMargin; + var 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(); + if (_bodyWidth > CG.width) _bodyWidth -= CG.width; + else CG.width = _bodyWidth; + if (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++) { + if (CG._owidth == undefined) CG._owidth = (CG.width || 0).number(); + CG.width = CG._owidth.number(); + if (CG.display) colWidth += CG.width.number(); + } + this.colWidth = colWidth; + } + } + + this.showColLen = showColLen; + /* col너비 합계 구하기 ~~~~~~~~~~~~~~ 구해진 너비합은 그리드 head, body 의 너비로 지정됨. */ + + if (!cfg.colHead) cfg.colHead = {}; + if (!cfg.body) cfg.body = {}; + if (!cfg.page) cfg.page = { display: false, paging: false, status: { formatter: null } }; + if (cfg.colHead.rowsEmpty) cfg.colHead.rows = undefined; + if (cfg.body.rowsEmpty) cfg.body.rows = undefined; + + /* colHead rows ----------------------------------------------------------------------------------------------------- */ + if (cfg.colHead.rows) { + /* colHeadRow 정해진 경우 */ + cfg.colHead._maps = new Array(cfg.colHead.rows.length); + var colMaxLen = 0; + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.colHead.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) { + CH._colspan = CH.colspan; + } else { + CH.colspan = CH._colspan; + } + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + if (cfg.colHeadAlign) CH.align = "center"; + colLen += CH.colspan.number(); + } + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.colHead._maps.length; _m++) { + cfg.colHead._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToColHeadMap = function (r, c, posR, position) { + var nC = position.c; + /*시작 컬럼 위치 */ + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + if (r > 1) if (rr > 0 && startPosition != null) nC = startPosition; + var tC = c; + /*컬럼 루프횟수 */ + var isWhile = true; + /* 루프유지변수 */ + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.colHead._maps[rr][nC] == undefined) { + cfg.colHead._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + return startPosition; + }; + for (var r = 0; r < cfg.colHead.rows.length; r++) { + //var startPosition = null; + //var isMultiRow = false; + for (var CH, CHidx = 0, __arr = cfg.colHead.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return CH.key == this.item.key; + }).first(); + } + if (myCG != null) { + if (rewrite) AXUtil.overwriteObject(CH, myCG, true); + else AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToColHeadMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + } + /*colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 */ + for (var m, midx = 0, __arr = cfg.colHead._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.colHead.rows[m.r][m.c].isLastCell = true; + } + + if (hasHiddenCell) { /* colGroup 중에 숨겨진 col 이 존재하는 경우 */ + /* colspan 감소 시키기 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + var rowPosition = null; + for (var a = 0; a < cfg.colHead._maps.length; a++) { + if (rowPosition != cfg.colHead._maps[a][cidx]) { + rowPosition = cfg.colHead._maps[a][cidx]; + cfg.colHead.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + } + } + /*trace(cfg.colHead._maps); //_maps check */ + + /* colHeadRow 정해진 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + } else { + /* colHeadRow 정해지지 않은 경우 */ + + cfg.colHead._maps = [ + [] + ]; + var colHeadRows = [ + [] + ]; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + var adder = { + key: CG.key, + colSeq: CG.colSeq, + label: CG.label, + align: (cfg.colHeadAlign || CG.align || "left"), + rowspan: 1, colspan: 1, + valign: "bottom", isLastCell: true, display: CG.display, formatter: CG.formatter, checked: CG.checked, disabled: CG.disabled, + sort: CG.sort, + tooltip: CG.tooltip, + displayLabel: (CG.displayLabel || false) + }; + colHeadRows[0].push(adder); + cfg.colHead._maps[0].push({ r: 0, c: cidx }); + } + cfg.colHead.rows = colHeadRows; + cfg.colHead.rowsEmpty = true; + /* colHeadRow 정해지지 않은 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + } + /* colHead rows ----------------------------------------------------------------------------------------------------- */ + + /* body rows ------------------------------------------------------------------------------------------------------- */ + if (cfg.body.rows) { + /* bodyRow 정해진 경우 */ + cfg.body._maps = new Array(cfg.body.rows.length); + var colMaxLen = 0; + for (var r = 0; r < cfg.body.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.body.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.valign == undefined || CH.valign == null) CH.valign = "middle"; + /* if(CH.align == undefined || CH.align == null) CH.align = "left"; */ + colLen += CH.colspan.number(); + } + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.body._maps.length; _m++) { + cfg.body._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToBodyMap = function (r, c, posR, position) { + var nC = position.c; + /*시작 컬럼 위치 */ + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + if (r > 1) if (rr > 0 && startPosition != null) nC = startPosition; + var tC = c; + /*컬럼 루프횟수 */ + var isWhile = true; + /* 루프유지변수 */ + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.body._maps[rr][nC] == undefined) { + cfg.body._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.body.rows.length; r++) { + for (var CH, CHidx = 0, __arr = cfg.body.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + + if (myCG != null) { + AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToBodyMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + } + /*body._maps 마지막 줄에 해당하는 cfg.body.rows 에 속성부여 */ + for (var m, midx = 0, __arr = cfg.body._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.body.rows[m.r][m.c].isLastCell = true; + } + + if (hasHiddenCell) { /* colGroup 중에 숨겨진 col 이 존재하는 경우 */ + /* colspan 감소 시키기 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + for (var a = 0; a < cfg.body._maps.length; a++) { + var rowPosition = cfg.body._maps[a][cidx]; + cfg.body.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + } + + /* bodyRow 정해진 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + } else { + /* bodyRow 정해지지 않은 경우 */ + cfg.body._maps = [ + [] + ]; + var bodyRows = [ + [] + ]; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + var adder = { + key: CG.key, colSeq: CG.colSeq, label: CG.label, align: (CG.align || "left"), rowspan: 1, colspan: 1, valign: "middle", isLastCell: true, + display: CG.display, checked: CG.checked, disabled: CG.disabled, formatter: CG.formatter, + tooltip: CG.tooltip + }; + bodyRows[0].push(adder); + cfg.body._maps[0].push({ r: 0, c: cidx }); + } + cfg.body.rows = bodyRows; + cfg.body.rowsEmpty = true; + /* bodyRow 정해지지 않은 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + } + /* body rows ------------------------------------------------------------------------------------------------------- */ + + /*marker 관련 데이터 정리 */ + if (cfg.body.marker) { + if (cfg.body.marker.rows) { + this.bodyHasMarker = true; + cfg.body.marker._maps = new Array(cfg.body.marker.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.body.marker.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + } + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.body.marker._maps.length; _m++) { + cfg.body.marker._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToMarkerMap = function (r, c, posR, position) { + var nC = position.c; + /*시작 컬럼 위치 */ + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + if (r > 1) if (rr > 0 && startPosition != null) nC = startPosition; + var tC = c; + /*컬럼 루프횟수 */ + var isWhile = true; + /* 루프유지변수 */ + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.body.marker._maps[rr][nC] == undefined) { + cfg.body.marker._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + for (var CH, CHidx = 0, __arr = cfg.body.marker.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + + if (myCG != null) { + AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToMarkerMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + + } + /*colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 */ + for (var m, midx = 0, __arr = cfg.body.marker._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.body.marker.rows[m.r][m.c].isLastCell = true; + } + + + if (hasHiddenCell) { /* colGroup 중에 숨겨진 col 이 존재하는 경우 */ + /* colspan 감소 시키기 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + for (var a = 0; a < cfg.body.marker._maps.length; a++) { + var rowPosition = cfg.body.marker._maps[a][cidx]; + cfg.body.marker.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + + } + } + } + /*marker 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + + /*head 관련 데이터 정리 */ + if (cfg.head) { + cfg.head._maps = new Array(cfg.head.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.head.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.head.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + /*if(CH.align == undefined || CH.align == null) CH.align = "left"; */ + colLen += CH.colspan.number(); + } + + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.head._maps.length; _m++) { + cfg.head._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToHeadMap = function (r, c, posR, position) { + var nC = position.c; + /*시작 컬럼 위치 */ + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + if (r > 1) if (rr > 0 && startPosition != null) nC = startPosition; + var tC = c; + /*컬럼 루프횟수 */ + var isWhile = true; + /* 루프유지변수 */ + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.head._maps[rr][nC] == undefined) { + cfg.head._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.head.rows.length; r++) { + for (var CH, CHidx = 0, __arr = cfg.head.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + + if (myCG != null) { + AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToHeadMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + + } + + /*colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 */ + for (var m, midx = 0, __arr = cfg.head._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.head.rows[m.r][m.c].isLastCell = true; + } + + + if (hasHiddenCell) { /* colGroup 중에 숨겨진 col 이 존재하는 경우 */ + /* colspan 감소 시키기 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + for (var a = 0; a < cfg.head._maps.length; a++) { + var rowPosition = cfg.head._maps[a][cidx]; + cfg.head.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + } + } + /*head 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + /*foot 관련 데이터 정리 */ + if (cfg.foot) { + cfg.foot._maps = new Array(cfg.foot.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.foot.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.foot.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + } + + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.foot._maps.length; _m++) { + cfg.foot._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToFootMap = function (r, c, posR, position) { + var nC = position.c; + /*시작 컬럼 위치 */ + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + if (r > 1) if (rr > 0 && startPosition != null) nC = startPosition; + var tC = c; + var isWhile = true; + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.foot._maps[rr][nC] == undefined) { + cfg.foot._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.foot.rows.length; r++) { + for (var CH, CHidx = 0, __arr = cfg.foot.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + + if (myCG != null) { + AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToFootMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + + } + /*colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 */ + for (var m, midx = 0, __arr = cfg.foot._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.foot.rows[m.r][m.c].isLastCell = true; + } + + + if (hasHiddenCell) { /* colGroup 중에 숨겨진 col 이 존재하는 경우 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + for (var a = 0; a < cfg.foot._maps.length; a++) { + var rowPosition = cfg.foot._maps[a][cidx]; + cfg.foot.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + + } + } + /*foot 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + /*editor 관련 데이터 정리 */ + if (cfg.editor) { + if (cfg.editor.rows) { + this.hasEditor = true; + cfg.editor._maps = new Array(cfg.editor.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.editor.rows.length; r++) { + var colLen = 0; + for (var CH, CHidx = 0, __arr = cfg.editor.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + } + } + + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.editor._maps.length; _m++) { + cfg.editor._maps[_m] = new Array(colMaxLen); + } + /* colEndPosition 관련 처리 함수 */ + var appendPosToEditorMap = function (r, c, posR, position) { + var nC = position.c; + var startPosition = null; + for (var rr = posR; rr < (posR + r); rr++) { + var tC = c; + var isWhile = true; + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (cfg.editor._maps[rr][nC] == undefined) { + cfg.editor._maps[rr][nC] = position; + if (startPosition == null) startPosition = nC; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.editor.rows.length; r++) { + for (var CH, CHidx = 0, __arr = cfg.editor.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) { + AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToEditorMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + } + } + + } + + for (var m, midx = 0, __arr = cfg.editor._maps.last(); (midx < __arr.length && (m = __arr[midx])); midx++) { + if (m) cfg.editor.rows[m.r][m.c].isLastCell = true; + } + + + if (hasHiddenCell) { + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + for (var a = 0; a < cfg.editor._maps.length; a++) { + var rowPosition = cfg.editor._maps[a][cidx]; + cfg.editor.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + } + + } + } + } + + /*editor 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + /*fixedColSeq가 설정된 경우 */ + if (cfg.fixedColSeq != undefined && cfg.fixedColSeq != null) { + + var fixedColSeq = this.fixedColSeq; + + for (var m, midx = 0, __arr = cfg.colHead._maps; (midx < __arr.length && (m = __arr[midx])); midx++) { + for (var c, cidx = 0, __arr2 = m; (cidx < __arr2.length && (c = __arr2[cidx])); cidx++) { + if (c) { + if ((fixedColSeq + 1) > cidx) cfg.colHead.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + + 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++) { + if (c) { + if (fixedColSeq == cidx) cfg.body.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.body.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + 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++) { + if (c) { + if (fixedColSeq == cidx) cfg.head.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.head.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + } + 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++) { + if (c) { + if (fixedColSeq == cidx) cfg.foot.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.foot.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + } + + if (cfg.body.marker) { + if (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++) { + if (c) { + if (fixedColSeq == cidx) cfg.body.marker.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.body.marker.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + } + } + + if (cfg.editor) { + if (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++) { + if (c) { + if (fixedColSeq == cidx) cfg.editor.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.editor.rows[c.r][c.c].isFixedCell = true; + } + } + + } + + } + } + this.hasFixed = true; + if (hasHiddenCell) { + var minusFixedCol = 0; + var fixedColSeq = this.fixedColSeq; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (!CG.display) { + if ((fixedColSeq + 1) > cidx) minusFixedCol++; + } + } + + cfg.fixedColSeq = this.fixedColSeq - minusFixedCol; + } else { + cfg.fixedColSeq = this.fixedColSeq; + } + + if (cfg.fixedColSeq == -1) { + /*fixed 제거*/ + this.hasFixed = false; + } + + var fixedColSeq = this.fixedColSeq, fixedColWidth = 0, fixedColLen = 0; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display && cidx < (fixedColSeq + 1)) { + fixedColWidth += CG.width.number(); + fixedColLen++; + } + } + this.showFixedColLen = fixedColLen; + this.fixedColWidth = fixedColWidth; + } + }, + init: function () { + var cfg = this.config; + + if (Object.isUndefined(cfg.targetID)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + if (!cfg.colGroup) { + trace("need colGroup - setConfig({colGroup:[]})"); + return; + } + + cfg.emptyListMSG = cfg.emptyListMSG || AXConfig.AXGrid.emptyListMSG; + cfg.listCountMSG = cfg.listCountMSG || AXConfig.AXGrid.listCountMSG || "전체 {listCount}개의 목록이 있습니다."; + cfg.pageCountMSG = cfg.pageCountMSG || AXConfig.AXGrid.pageCountMSG; + + /* + cfg.viewMode 결정 구간. + */ + + 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") ? "grid" : "mobile"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "grid" : "mobile"; + return false; + } + } + } + }); + if (_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(); + if (targetInnerHeight == 0) targetInnerHeight = (AXConfig.AXGrid.pageHeight || 400); + this.theme = (cfg.theme) ? cfg.theme : "AXGrid"; + /* 테마기본값 지정*/ + cfg.height = (cfg.height) ? cfg.height : targetInnerHeight + "px"; + /* 그리드 높이 지정 */ + + + var theme = this.theme; + var gridCss = []; + if (cfg.width) gridCss.push("width:" + cfg.width + ";"); + if (cfg.height) gridCss.push("height:" + cfg.height + ";"); + + /* grid 뼈대 그리기 ----------------------------------------------------------------------------------------------------- */ + 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('')); + /* grid 뼈대 그리기 ----------------------------------------------------------------------------------------------------- */ + + /* 주요 타깃 설정 */ + 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.scroller = axdom("#" + cfg.targetID + "_AX_gridScroller"); + + /* define part --------------------------------- */ + this.defineConfig(); + /* config object define */ + /* define part --------------------------------- */ + + if (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; + } + + /*colHead setting */ + this.setColHead(); + + /*body setting */ + this.setBody(); + + /*editor setting */ + this.editor.hide(); + + this.gridTargetSetSize(); + + this.contentScrollResize(); + + /* body event bind */ + 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"; + if (document.attachEvent) { /*if IE (and Opera depending on user setting) */ + /*axf.getId(cfg.targetID+"_AX_gridBody").detachEvent("on"+mousewheelevt, this.contentScrollScrollWheelBind); */ + if (axf.getId(cfg.targetID + "_AX_gridBody")) axf.getId(cfg.targetID + "_AX_gridBody").attachEvent("on" + mousewheelevt, contentScrollScrollWheel); + } else if (document.addEventListener) { /*WC3 browsers */ + /*axf.getId(cfg.targetID+"_AX_gridBody").removeEventListener(mousewheelevt, this.contentScrollScrollWheelBind, false); */ + if (axf.getId(cfg.targetID + "_AX_gridBody")) axf.getId(cfg.targetID + "_AX_gridBody").addEventListener(mousewheelevt, contentScrollScrollWheel, false); + } + + if (document.addEventListener) { + /*axf.getId(cfg.targetID+"_AX_gridBody").removeEventListener("touchstart", this.contentScrollTouchstartBind, false); */ + if (axf.getId(cfg.targetID + "_AX_gridBody")) axf.getId(cfg.targetID + "_AX_gridBody").addEventListener("touchstart", contentScrollTouchstart, false); + } + + this.target.bind("keydown", this.onKeydown.bind(this)); + + if (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)); + } + + /* body event bind */ + + /* page event bind */ + var goPageMove = this.goPageMove.bind(this); + this.pagingUnit.find(".AXgridPagingPrev").bind("click", function (event) { + goPageMove(-1); + }); + this.pagingUnit.find(".AXgridPagingNext").bind("click", function (event) { + goPageMove(1); + }); + /* page event bind */ + + axdom(window).bind("resize", this.windowResize.bind(this)); + + //this.printList(); printList는 setBody 에서 자동 실행 됨 + }, + windowResize: function () { + var windowResizeApply = this.windowResizeApply.bind(this); + if (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(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "grid" : "mobile"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "grid" : "mobile"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; + } + } + + this.redrawGrid(""); + }, + gridTargetSetSize: function (react) { /* AXgridScrollBody 안쪽의 높이와 관련된 요소 설정 */ + var cfg = this.config; + /*cfg.height */ + + if (cfg.viewMode == "mobile") { + + 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 { + + /*page setting */ + if (!cfg.page) { + this.pageBody.hide(); + this.pageBody.data("display", "hide"); + } else { + + if (cfg.page.display == false) { + this.pageBody.hide(); + this.pageBody.data("display", "hide"); + } else { + this.pageBody.show(); + this.pageBody.data("display", "show"); + + if (cfg.page.paging) { + this.setPaging(); + } else { + this.pagingUnit.hide(); + } + if (cfg.page.status == false) { + this.status.hide(); + } + } + } + + this.gridBody.removeClass("AXGridMobile"); + + if (cfg.height == "auto") { + var colHeadHeight = this.colHead.outerHeight(); + if (colHeadHeight == 1) colHeadHeight = 0; + var scrollBodyHeight = this.scrollContent.height(); + this.scrollBody.css({ height: scrollBodyHeight + colHeadHeight }); + /*colhead + body height */ + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight) }); + /* body Height */ + } else { + + if (cfg.height) this.gridBody.css({height: cfg.height}); + + var pageBodyHeight = (this.pageBody.data("display") == "show") ? this.pageBody.outerHeight() : 0; + if (cfg.page.display == false) pageBodyHeight = 0; + var scrollBodyHeight = cfg.height.number() - pageBodyHeight - 2; + this.scrollBody.css({ height: scrollBodyHeight }); + /*colhead + body height */ + var colHeadHeight = this.colHead.outerHeight(); + if (colHeadHeight == 1) colHeadHeight = 0; + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight - colHeadHeight) }); + /* body Height */ + } + if (react) this.contentScrollResize(false); + } + }, + getColGroup: function (suffix) { + var cfg = this.config; + var fixedColSeq = this.fixedColSeq; + /*{colID:0, key:"no", label:"번호", width:"100", align:"left", addClassNames:"", style:"", display:true, sort:null} */ + var po = []; + po.push(""); + if (suffix != "FC" && suffix != "FB" && suffix != "FE") { + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display) { + po.push(""); + } + } + + if (suffix == "CB") po.push(""); + } else { + /*fixedCol 존재 */ + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display && cidx < (fixedColSeq + 1)) { + po.push(""); + } + } + + } + po.push(""); + return po.join(''); + }, + getColSeqToHead: function (r, c) { + /*trace("getColSeqToHead:"+r+","+c); */ + var cfg = this.config; + var colSeq = null; + for (var 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; + }, + /** + * 그리드의 모든 요소를 재 정렬 해 줍니다. + * grid elements align + * + * @name AXGrid.redrawGrid + * @param {String} changeGridView 옵션 + * @description + * + '''js + var myGrid = new AXGrid(); + ... + myGrid.redrawGrid(); + * + */ + redrawGrid: function (changeGridView) { + var cfg = this.config; + /* + 모바일 모드로 요청 하면 뼈대 변경. + */ + if (changeGridView) { + if (cfg.viewMode == "grid") { + this.pageBody.show(); + this.pageBody.data("display", "show"); + } else if (cfg.viewMode == "icon") { + this.pageBody.show(); + this.pageBody.data("display", "show"); + } else if (cfg.viewMode == "mobile") { + this.pageBody.hide(); + this.pageBody.data("display", "hide"); + } + } + + this.defineConfig(true); + this.setColHead(); + + this.setBody(undefined, true); + + if (cfg.viewMode == "grid") { + if (this.list.length > 0) { + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + } + } + this.gridTargetSetSize(true); + this.contentScrollResize(); + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 바디 재구성 기능 포함 */ + }, + checkedColSeq: function (colSeq, checked, itemIndex) { + var cfg = this.config; + var _list = this.list; + + if (itemIndex == undefined) { + 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); + 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); + } + } + }); + } else { + + this.body.find(".gridBodyTr_" + itemIndex + " .gridCheckBox_body_colSeq" + colSeq).each(function () { + if (checked == null) { + this.checked = !this.checked; + } 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); + } + }); + + } + }, + getCheckedList: function (colSeq) { + var cfg = this.config; + var collect = []; + var list = this.list; + + 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 = {}; + if (item.___disabled[colSeq] != true && item.___checked[colSeq] == true) { + collect.push(item); + } + } + + return collect; + }, + getCheckedListWithIndex: function (colSeq) { + var cfg = this.config; + var collect = []; + var list = this.list; + + 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 = {}; + if (item.___disabled[colSeq] != true && item.___checked[colSeq] == true) { + collect.push({ index: itemIndex, item: item }); + } + } + return collect; + }, + onKeydown: function (event) { + if (event.keyCode == 67 && event.ctrlKey) { + /*this.copyData(); */ + } + if (this.editorOpend) return; + + //trace("onKeydown" + event.keyCode); + + if (event.keyCode == axf.Event.KEY_UP) { /* */ + this.focusMove(-1, event); + } else if (event.keyCode == axf.Event.KEY_DOWN) { /* */ + this.focusMove(1, event); + } + }, + onContextmenu: function (event) { + var cfg = this.config; + + if (this.readyMoved) return false; + + /* event target search - */ + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + if (eventTarget.tagName.toLowerCase() == "input") return; + /*input 인 경우 제외 */ + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + until: function (evt, evtIDs) { + return (axdom(evt.parentNode).hasClass("gridBodyTr")) ? true : false; + }, + find: function (evt, evtIDs) { + return (axdom(evt).hasClass("bodyTd") || axdom(evt).hasClass("bodyNodeIndent")) ? true : false; + } + }); + /* event target search ------------------------ */ + + if (myTarget) { + /*colHeadTool ready */ + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + + if (this.selectedCells.length > 0) { + axf.each(this.selectedCells, function () { + axdom("#" + this).removeClass("selected"); + }); + this.selectedCells.clear(); + } + if (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); + /* event 직접 연결 방식 */ + } else { + AXContextMenu.open({ id: cfg.targetID + "ContextMenu", filter: cfg.contextMenu.filter, sendObj: null }, event); + /* event 직접 연결 방식 */ + } + return false; + }, + copyData: function () { + var cfg = this.config; + var copyOut = []; + axf.each(this.selectedCells, function (index, n) { + var html = axdom("#" + n).find(".bodyNode").html(); + copyOut.push(html + '\t'); + }); + + if (window.clipboardData) { + window.clipboardData.setData('Text', copyOut.join('')); + toast.push("데이터가 복사되었습니다. 원하시는 곳에 붙여넣기 하세요."); + } else { + dialog.push({ title: "Copy Data", body: copyOut.join(''), type: "alert" }); + } + }, + /* 공통 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + /* colHead 영역 */ + getHeadMousePosition: function (event) { + var pos = this.colHead.offset(); + var x = (event.pageX - pos.left); + var y = (event.pageY - pos.top); + return { x: x, y: y }; + }, + getColHeadTd: function (arg) { + var cfg = this.config; + var po = []; + + if (arg.ghost) { + po.push(""); + po.push("
"); + po.push("
 
"); + po.push("
"); + po.push(""); + } else { + + var colHeadTdText = " colHeadTdText"; + var toolUse = true; + + if (arg.formatter == "html" || arg.formatter == "checkbox") { + if (!arg.displayLabel) { + colHeadTdText = " colHeadTdHtml"; + toolUse = false; + if (arg.formatter == "checkbox") { + colHeadTdText = " colHeadTdCheck"; + arg.tdHtml = ""; + } + } + } + + var sortClass = ""; + if (arg.sort) sortClass = (arg.sort == "desc") ? " sortDesc" : " sortAsc"; + + po.push(""); + po.push("
"); + po.push("
"); + po.push(arg.tdHtml); + po.push("
"); + if (toolUse && arg.colSeq != null && arg.colSeq != undefined) po.push("T"); + po.push("
"); + po.push("
"); + po.push(""); + + if (arg.sort) { + var myColHead = cfg.colHead.rows[arg.r][arg.CHidx]; + var 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; + var po = []; + + if (cfg.viewMode == "grid") { + this.colHead.show(); + var getColHeadTd = this.getColHeadTd.bind(this); + + if (!this.hasFixed) { /* 일반 colHead 구현 */ + + var tableWidth = this.colWidth; + po.push(""); + po.push(this.getColGroup("CH")); + /*colGroup 삽입 */ + po.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + po.push(""); + for (var CH, CHidx = 0, __arr = cfg.colHead.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.display && CH.colspan > 0) { + /*radio, check exception */ + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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: false, displayLabel: CH.displayLabel + })); + } + } + po.push(""); + } + po.push(""); + po.push("
"); + + } else { /* fixedCol 구현 */ + + po.push(""); + po.push(this.getColGroup("CH")); + /*colGroup 삽입 */ + po.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + po.push(""); + var colCount = 0; + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + /*radio, check exception */ + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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 < (cfg.fixedColSeq + 1)) + })); + + colCount += CH.colspan; + } + }); + po.push(""); + } + po.push(""); + po.push("
"); + + var fpo = []; + fpo.push("
"); + fpo.push(""); + fpo.push(this.getColGroup("FC")); + /*colGroup 삽입 */ + fpo.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + fpo.push(""); + var colCount = 0; + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.isFixedCell && CH.colspan > 0) { + /*trace({CHidx:CHidx, fixedColSeq:(cfg.fixedColSeq+1)}); */ + /*radio, check exception */ + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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: false + })); + } + colCount += CH.colspan; + }); + fpo.push(""); + } + fpo.push(""); + fpo.push("
"); + fpo.push("
"); + } + /* fixedCol 구현 */ + + this.colHead.html(po.join('')); + axdom("#" + cfg.targetID + "_AX_fixedColHead").remove(); + if (fpo) this.colHead.after(fpo.join('')); + + /*resizer 를 찾아 resizer의 부모와 같은 높이값을 가지도록 변경 합니다. */ + /*또 그와 관련된 개체의 높이와 패딩을 지정합니다. */ + this.colHead.find(".colHeadResizer").each(function () { + var resizerID = this.id; + var tdID = resizerID.replace("colHeadResizer", "colHead"); + var txtID = resizerID.replace("colHeadResizer", "colHeadText"); + var toolID = resizerID.replace("colHeadResizer", "colHeadTool"); + var rowspan = axdom("#" + tdID).attr("rowspan"); + var valign = axdom("#" + tdID).attr("valign"); + if (!rowspan) rowspan = 1; + var tdHeight = axdom("#" + tdID).height(); + axdom(this).css({ height: tdHeight }); + axdom(this).parent().css({ height: tdHeight }); + if (rowspan > 1) { + var cellMarginTop = 0; + if (valign == "bottom") cellMarginTop = (tdHeight - axdom("#" + txtID).outerHeight()) + 5; + if (valign == "middle") 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)); + + if (this.hasFixed) { /*fixedColHead에 대한 바인딩 및 처리 */ + this.fixedColHead = axdom("#" + cfg.targetID + "_AX_fixedColHead"); + + this.fixedColHead.find(".colHeadResizer").each(function () { + var resizerID = this.id; + var tdID = resizerID.replace("colHeadResizer", "colHead"); + var txtID = resizerID.replace("colHeadResizer", "colHeadText"); + var toolID = resizerID.replace("colHeadResizer", "colHeadTool"); + var rowspan = axdom("#" + tdID).attr("rowspan"); + var valign = axdom("#" + tdID).attr("valign"); + if (!rowspan) rowspan = 1; + var tdHeight = axdom("#" + tdID).height(); + axdom(this).css({ height: tdHeight }); + axdom(this).parent().css({ height: tdHeight }); + if (rowspan > 1) { + var cellMarginTop = 0; + if (valign == "bottom") cellMarginTop = (tdHeight - axdom("#" + txtID).outerHeight()) + 5; + if (valign == "middle") 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 if (cfg.viewMode == "icon") { + this.colHead.empty(); + this.colHead.hide(); + } else if (cfg.viewMode == "mobile") { /* 모바일에서는 헤드 제거 또는 모바일용 헤드 재구성 */ + this.colHead.empty(); + this.colHead.hide(); + } + }, + /* colHead events */ + colHeadMouseOver: function (event) { + var cfg = this.config; + /* event target search - */ + if (event.target.id == "") return; + 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("AXGridColHead")) ? true : false; + }, + find: function (evt, evtIDs) { + return (axdom(evt).hasClass("colHeadTd")) ? true : false; + } + }); + /* event target search ------------------------ */ + + if (myTarget) { + /*colHeadTool ready */ + var targetID = myTarget.id; + var toolID = targetID.replace("colHead", "colHeadTool"); + axdom("#" + toolID).addClass("readyTool"); + } + }, + colHeadMouseOut: function (event) { + var cfg = this.config; + /* event target search - */ + if (event.target.id == "") return; + 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("AXGridColHead")) ? true : false; + }, + find: function (evt, evtIDs) { + return (axdom(evt).hasClass("colHeadTd")) ? true : false; + } + }); + /* event target search ------------------------ */ + + if (myTarget) { + /*colHeadTool unready */ + var targetID = myTarget.id; + var toolID = targetID.replace("colHead", "colHeadTool"); + axdom("#" + toolID).removeClass("readyTool"); + } + }, + colHeadResizerMouseDown: function (event) { + var cfg = this.config; + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + + /*trace({colHeadR:colHeadR, colHeadC:colHeadC}); */ + + var colSeq = this.getColSeqToHead(colHeadR, colHeadC); + if (colSeq == null) return; + /* 예상할 수 없는 오류 */ + /*resize 상태 해제 */ + if (this.colResizing) { + this.colHeadResizerEnd(); + } + var offset = axdom("#" + cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC).find(".tdRelBlock").position(); + var relBlockWidth = axdom("#" + cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC).find(".tdRelBlock").width(); + var rightPosition = offset.left.number() + relBlockWidth.number(); + var blockWidth = axdom("#" + cfg.targetID + "_AX_col_AX_" + colSeq + "_AX_CH").attr("width"); + this.colResizeTarget = { colSeq: colSeq, leftPosition: (rightPosition - blockWidth), blockWidth: blockWidth, newWidth: blockWidth }; + /*trace(this.colResizeTarget); */ + + /* resize event bind */ + 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"); + /* resize event bind ~~~~~~~~~~~~~~~~~~~ */ + }, + colHeadResizerMouseMove: function (event) { + if (!event.pageX) return; + /*드래그 감도 적용 */ + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) this.colHeadResizerMove(event); + }, + colHeadResizerMove: function (event) { + var cfg = this.config; + var mouse = this.getHeadMousePosition(event); + var newWidth = (this.colResizeTarget.leftPosition - mouse.x).abs(); + if (newWidth < 31) return; + /* colHead/colBody colGroup width 조정 */ + 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; + if (!cfg.colGroup[this.colResizeTarget.colSeq].widthAstric) { + cfg.colGroup[this.colResizeTarget.colSeq]._owidth = newWidth; + } + + if (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); + + /*if(this.colResizeTarget.colSeq < fixedColSeq+1){ */ + + var fixedColWidth = 0; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display && cidx < (fixedColSeq + 1)) { + 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) { + var colSeq = this.colResizeTarget.colSeq; + /* */ + for (var _m = 0; _m < cfg.editor._maps.length; _m++) { + var rc = cfg.editor._maps[_m][colSeq]; + var CH = cfg.editor.rows[rc.r][rc.c]; + var formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + rc.r + "_AX_" + rc.c; + /*trace(formID); */ + if (axf.getId(formID)) if (axf.getId(formID).tagName == "INPUT") AXInput.alignAnchor(formID); + } + } + + + /* colHead colGroup width 조정 ------------------------------ */ + this.colResizeTarget.newWidth = newWidth; + var newColWidth = this.colWidth - (this.colResizeTarget.blockWidth - this.colResizeTarget.newWidth); + this.colHead.find(".colHeadTable").css({ "width": newColWidth + "px" }); + /*this.body.find(".gridBodyTable").css({"width":newColWidth+"px"}); */ + }, + colHeadResizerMouseUp: function (event) { + if (this.colResizeTarget.blockWidth != this.colResizeTarget.newWidth) { + this.colWidth = this.colWidth - (this.colResizeTarget.blockWidth - this.colResizeTarget.newWidth); + } + this.colHeadResizerEnd(); + this.contentScrollResize(false); + }, + colHeadResizerEnd: function () { + this.moveSens = 0; + this.colResizing = false; + 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"); + }, + colHeadNodeClick: function (event) { + var cfg = this.config; + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (this.editorOpend) { + toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다."); + return; + /* 에디터가 오픈된 상태이면 비활성화 */ + } + + if (axdom(eventTarget).hasClass("colHeadTdCheck")) { + this.colHeadCheckBoxClick(event); + return; + /* checkbox block click */ + } + if (axdom(eventTarget).hasClass("gridCheckBox")) return; + /* checkbox click */ + + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + + try { + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + } catch (e) { + return; + } + + if (myColHead.sort == false) { + return; + } + + var tdID = cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC; + + if (myColHead.colSeq == undefined || myColHead.colSeq == null) { + trace("정렬할 수 없는 컬럼 입니다."); + } else { + if (this.nowSortHeadID) { + if (this.nowSortHeadID != tdID) { + axdom("#" + this.nowSortHeadID).removeClass("sortDesc"); + axdom("#" + this.nowSortHeadID).removeClass("sortAsc"); + this.nowSortHeadObj.sort = undefined; + } + } + /*trace(myColHead); */ + if (cfg.colHead.rows[colHeadR][colHeadC].sort == "desc") axdom("#" + tdID).removeClass("sortDesc"); + else axdom("#" + tdID).removeClass("sortAsc"); + + var nsort = ""; + if (myColHead.sort == "desc") nsort = "asc"; + else nsort = "desc"; + cfg.colHead.rows[colHeadR][colHeadC].sort = nsort; + + /*sort 처리하기 */ + if (nsort == "desc") { + axdom("#" + tdID).addClass("sortDesc"); + } else { + axdom("#" + tdID).addClass("sortAsc"); + } + + this.list = this.sortList(nsort, myColHead, this.list); + this.printList(); + + this.nowSortHeadID = tdID; + this.nowSortHeadObj = myColHead; + } + + if (cfg.colHead.onclick) { /* onclick bind */ + var sendObj = { + index: null, + r: colHeadR, + c: colHeadC, + list: this.list, + colHead: myColHead, + page: this.page + }; + cfg.colHead.onclick.call(sendObj); + } + + }, + colHeadToolClick: function (event) { + var cfg = this.config; + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (this.editorOpend) { + toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다."); + return; + /* 에디터가 오픈된 상태이면 비활성화 */ + } + + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + /*toast.push("클릭된 colGroup seq : " + myColHead.colSeq); */ + + axdom("#" + cfg.targetID + "_AX_colHeadMenu").remove(); + + var po = []; + po.push("
"); + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + var addClass = (CG.display) ? " on" : ""; + var 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(); + var css = {}; + css.top = offset.top - 5; + css.left = offset.left - 20; + axdom("#" + cfg.targetID + "_AX_colHeadMenu").css(css); + + /* colGroup click event bind */ + var colGroupListClick = this.colGroupListClick.bind(this); + this.colGroupListClickBind = function (event) { + colGroupListClick(event); + }; + axdom(document).bind("click", this.colGroupListClickBind); + axdom(document).bind("keydown", this.colGroupListClickBind); + /* colGroup click bind ~~~~~~~~~~~~~~~~~~~ */ + }, + colGroupListClick: function (event) { + var cfg = this.config; + + if (event.keyCode == AXUtil.Event.KEY_ESC) { + axdom("#" + cfg.targetID + "_AX_colHeadMenu").remove(); + axdom(document).unbind("keydown", this.colGroupListClickBind); + axdom(document).unbind("click", this.colGroupListClickBind); + return; + } + + /* event target search - */ + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { + return (axdom(evt).hasClass("AXGridColGroupListBoxItem") || axdom(evt).hasClass("colHeadTool")) ? true : false; + } + }); + /* event target search ------------------------ */ + + if (myTarget) { + if (axdom(myTarget).hasClass("colHeadTool")) return; + /*colHeadTool ready */ + var targetID = myTarget.id; + var colSeq = targetID.split(/_AX_/g).last(); + /*trace(cfg.colGroup[colSeq]); */ + if (cfg.colGroup[colSeq].display) { + cfg.colGroup[colSeq].display = false; + axdom("#" + targetID).removeClass("on"); + } else { + cfg.colGroup[colSeq].display = true; + axdom("#" + targetID).addClass("on"); + } + /*redraw grid */ + 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 == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (axdom(eventTarget).hasClass("colHeadTdCheck")) { + eventTarget = axdom(eventTarget).find("input").get(0); + eventTarget.checked = !eventTarget.checked; + } + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + + this.checkedColSeq(myColHead.colSeq, eventTarget.checked); + }, + /* colHead events ~~~~~~~~~~~~~~~~~*/ + /* colHead 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* body 영역 */ + needBindDBLClick: function () { + return ((axf.browser.name == "ie") && (axf.docTD === "Q" || axf.browser.version < 9)); + }, + sortList: function (nsort, myColHead, list) { + var cfg = this.config; + var _this = this; + var getValueForSort = function (item, itemIndex) { + if (myColHead.formatter) { + var result; + if (myColHead.formatter == "money") { + result = item[myColHead.key]; + } else if (myColHead.formatter == "dec") { + result = (item[myColHead.key] == undefined) ? "" : item[myColHead.key].dec(); + } else if (myColHead.formatter == "html") { + result = item[myColHead.key]; + } else if (myColHead.formatter == "checkbox" || myColHead.formatter == "radio") { + result = item[myColHead.key]; + } else { + var sendObj = { + index: itemIndex, + list: list, + item: item, + page: _this.page + }; + result = myColHead.formatter.call(sendObj, itemIndex, item); + /*result 값이 money 형식인지 체크 합니다. */ + var moneyCheck = (Object.isString(result)) ? result.replace(/,/g, "") : result; + if (axdom.isNumeric(moneyCheck)) result = result.number(); + } + return result; + } else { + return item[myColHead.key]; + } + }; + + if (nsort == "desc") { + var listIndex = 0; + list = list.sort(function (prevItem, nowItem) { + var v1 = getValueForSort(prevItem, listIndex); + var v2 = getValueForSort(nowItem, listIndex); + listIndex++; + if (v1 < v2) return 1; + else if (v1 > v2) return -1; + else if (v1 == v2) return 0; + }); + } else { + var listIndex = 0; + list = list.sort(function (prevItem, nowItem) { + var v1 = getValueForSort(prevItem, listIndex); + var v2 = getValueForSort(nowItem, listIndex); + listIndex++; + if (v1 < v2) return -1; + else if (v1 > v2) return 1; + else if (v1 == v2) return 0; + }); + } + + return list; + }, + setBody: function (list, rewrite) { + var cfg = this.config; + if (list) { + this.list = list; + } + var po = []; + po.push("
"); + if (cfg.viewMode == "grid") { + po.push(""); + po.push(this.getColGroup("CB")); + /*colGroup 삽입 */ + 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("
 
"); + } else if (cfg.viewMode == "icon") { + po.push("
"); + } else if (cfg.viewMode == "mobile") { + po.push("
"); + } + po.push("
"); + + if (cfg.viewMode == "grid" && this.hasFixed && ((rewrite && this.list.length > 0) || !rewrite)) { + po.push("
"); + po.push(""); + po.push(this.getColGroup("FB")); + /*colGroup 삽입 */ + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push(""); + po.push("
"); + po.push("
"); + } + + if (cfg.viewMode == "grid" || cfg.viewMode == "icon") { + //po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + } + this.body.html(po.join('')); + + this.scrollContent = axdom("#" + cfg.targetID + "_AX_scrollContent"); + + // tbody, fixedTbody dom cached + if(cfg.viewMode == "grid"){ + // TODO: this.cachedDom.tbody, this.cachedDom.fixed_tbody, this.cachedDom.thpadding, this.cachedDom.tfpadding 윗마진 아래마진 + this.cachedDom.tbody = axdom("#" + cfg.targetID + "_AX_tbody"); + if(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"); + if(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.scrollTrackXY = axdom("#" + cfg.targetID + "_AX_scrollTrackXY"); + 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"); + + if (this.list.length > 0) { + var _this = this; + if(list == undefined){ + _this.setList(_this.list); + }else{ + setTimeout(function(){ + _this.setList(_this.list); + }, 100); + } + } + + if (cfg.viewMode == "grid" || cfg.viewMode == "icon") { + /* scroll event bind */ + // TODO : bind scroll tip + 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)); + /* scroll event bind ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + } + }, + listLoadingDisplay: function () { + var cfg = this.config; + var po = []; + + if (cfg.viewMode != "mobile") { + 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('')); + } else { + if (cfg.viewMode == "grid") { + 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; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + this.listLoadingDisplay(); + + /*this.selectedCells.clear(); */ + /*this.selectedRow.clear(); */ + + if (obj.ajaxUrl) { + /*trace("hear"); */ + this.ajaxInfo = obj; + this.ajax_sortDisable = sortDisable; + this.pageActive = true; + + var url = obj.ajaxUrl; + var appendPars = [ + "pageNo=" + ((exts == "paging") ? this.page.pageNo : 1), + "pageSize=" + this.page.pageSize + ]; + + var pars = (obj.ajaxPars) ? obj.ajaxPars + "&" + appendPars.join('&') : appendPars.join('&'); + + var _method = "post"; + var _contentType = AXConfig.AXReq.contentType; + var _headers = {}; + + if (obj.method) _method = obj.method; + if (obj.contentType) _contentType = obj.contentType; + if (obj.headers) _headers = obj.headers; + + var ajaxGetList = this.ajaxGetList.bind(this); + new AXReq(url, { + type: _method, + contentType: _contentType, + headers: _headers, + debug: false, + pars: pars, + onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + res._sortDisable = sortDisable; + if (obj.response) { + obj.response.call(res); + } else { + ajaxGetList(res); + } + if (obj.onLoad) obj.onLoad.call(res); + } else { + if(obj.onError) obj.onError.call(res); + else AXUtil.alert(res); + } + } + }); + + } else { + + if (axdom.isArray(obj)) { + if (sortDisable || !cfg.sort) { + this.list = obj; + } else { + if (nowSortHeadID) { + this.list = this.sortList(nowSortHeadObj.sort, nowSortHeadObj, obj); + } else { + this.list = obj; + } + } + + this.printList(); + this.scrollTop(0); + + if (!cfg.page.paging) { + this.setStatus(this.list.length); + this.pagingUnit.hide(); + this.pageActive = false; + } + + } + } + }, + reloadList: function () { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + this.selectedCells.clear(); + this.selectedRow.clear(); + + if (this.ajaxInfo) { + var obj = this.ajaxInfo; + var sortDisable = this.ajax_sortDisable; + this.pageActive = true; + + this.listLoadingDisplay(); + + var url = obj.ajaxUrl; + var appendPars = [ + "pageNo=" + this.page.pageNo, + "pageSize=" + this.page.pageSize + ]; + var pars = (obj.ajaxPars) ? obj.ajaxPars + "&" + appendPars.join('&') : appendPars.join('&'); + + var scrollTop = function () { + this.scrollTop(0); + }; + var scrollTopBind = scrollTop.bind(this); + var ajaxGetList = this.ajaxGetList.bind(this); + + var userResponseSetPaging = function (res) { + axf.overwriteObject(this.page, res.page, true); + this.setPaging(); + }; + var userResponse = userResponseSetPaging.bind(this); + + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + res._sortDisable = sortDisable; + if (obj.response) { + obj.response.call(res); + userResponse(res); + } else { + ajaxGetList(res); + } + scrollTopBind(); + } else { + AXUtil.alert(res); + } + } + }); + + } + }, + ajaxGetList: function (res) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + if (res._sortDisable || !cfg.sort) { + this.list = res.list; + } else { + if (nowSortHeadID) { + this.list = this.sortList(nowSortHeadObj.sort, nowSortHeadObj, res.list); + } else { + this.list = res.list; + } + } + AXUtil.overwriteObject(this.page, res.page, true); + + this.printList(); + + this.scrollTop(0); + this.setPaging(); + }, + + /** + * 그리드 데이터를 페이지까지 포함하여 정의해 줍니다. ajax를 사용하지 않는 방법 + * + * @name AXGrid.setData + * + * @param {Array} gridData.list list of grid + * @param {JSObject} gridData.page pageing data + * + * @description + '''js + var gridData = { + list: _obj.document_list, + page:{ + pageNo: _obj.page_navigation.cur_page, + pageSize: 20, + pageCount: _obj.page_navigation.page_count, + listCount: _obj.page_navigation.total_count, + onchange: function(pageNo){ + dialog.push(Object.toJSON(this)); + trace(this, pageNo); + } + } + }; + myGrid.setData(gridData); + ``` + * @param res + */ + setData: function (res) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + if (res._sortDisable || !cfg.sort) { + this.list = res.list; + } else { + if (nowSortHeadID) { + this.list = this.sortList(nowSortHeadObj.sort, nowSortHeadObj, res.list); + } else { + this.list = res.list; + } + } + if(!this.page.onchange) this.page.onchange = this.page.onChange; + axf.overwriteObject(this.page, res.page, true); + + this.printList(); + this.scrollTop(0); + this.setPaging(); + }, + getFormatterValue: function (formatter, item, itemIndex, value, key, CH, CHidx) { + var cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null" || value == null || value == undefined) { + result = "0"; + } else { + result = (value || 0).number().money(); + } + } else if (formatter == "dec") { + result = (value == undefined) ? "" : value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox" || formatter == "radio") { + var checked = ""; + var disabled = ""; + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page, + key: key, + value: value + }; + + if(this.list[itemIndex].___checked){ + checked = ((this.list[itemIndex].___checked[CHidx])) ? " checked=\"checked\" " : " "; + }else{ + if (CH.checked) { + if (CH.checked.call(sendObj)) { + checked = " checked=\"checked\" "; + if(!this.list[itemIndex].___checked) this.list[itemIndex].___checked = {}; + this.list[itemIndex].___checked[CHidx] = true; + } + } + } + + if (CH.disabled) { + if (CH.disabled.call(sendObj)) { + disabled = " disabled=\"disabled\" "; + if(!this.list[itemIndex].___checked) this.list[itemIndex].___disabled = {}; + this.list[itemIndex].___disabled[CHidx] = true; + } + } + + 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 cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null") { + result = "0"; + } else { + result = value.number().money(); + } + } else if (formatter == "dec") { + result = (value == undefined) ? "" : value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox" || formatter == "radio") { + var checked = ""; + if (CH.checked) { + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page, + key: key, + value: value + }; + var callResult = CH.checked.call(sendObj); + if (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; + var tpo = []; + var evenClassName = "line" + (itemIndex % 2); + var getFormatterValue = this.getFormatterValue.bind(this); + var getTooltipValue = this.getTooltipValue.bind(this); + var hasFixed = this.hasFixed; + var hasTrValue = (hasTr === undefined); + var 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 < cfg.body.rows.length; r++) { + var isLastTR = (cfg.body.rows.length - 1 == r); + if (hasTrValue) tpo.push(""); + var colCount = 0; + + for (var CH, CHidx = 0; (CHidx < cfg.body.rows[r].length && (CH = cfg.body.rows[r][CHidx])); CHidx++) { + if (CH.display && CH.colspan > 0) { + var printOk = false; + if (isfix == "n") printOk = true; + if (isfix == "fix" && colCount < (cfg.fixedColSeq + 1)) printOk = true; + + if (printOk) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + /*trace({r:r, CHidx:CHidx, fixedColSeq:cfg.fixedColSeq, colCount:colCount}); */ + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + var tooltipValue = ""; + if (CH.tooltip) { + tooltipValue = getTooltipValue(CH.tooltip, item, itemIndex, item[CH.key], CH.key, CH); + } + + tpo.push(""); + /*tpo.push("
");*/ + tpo.push("
"); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH, CHidx)); + } else { + tpo.push(item[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
"); + /*tpo.push("
");*/ + tpo.push(""); + } + } + } + + if (r == 0 && isfix == "n") { + tpo.push("
 
"); + } + if (hasTrValue) tpo.push(""); + } + return tpo.join(''); + }, + getIconItem: function (itemIndex, item, viewIconObj, cssObj) { + var cfg = this.config; + var tpo = []; + var getFormatterValue = this.getFormatterValue.bind(this); + var getTooltipValue = this.getTooltipValue.bind(this); + + var format; + try { + format = viewIconObj.format.call({ index: itemIndex, item: item }); + } catch (e) { + trace(e); + } + tpo.push("
"); + + if (format.imgsrc) { + tpo.push("\"""); + } + + if (format.label) { + tpo.push("
"); + tpo.push(format.label); + tpo.push("
"); + } + + if (format.description) { + tpo.push("
"); + tpo.push(format.description); + tpo.push("
"); + } + if (viewIconObj.buttons) { + if (viewIconObj.buttons.items) { + tpo.push("
"); + for (var B, bidx = 0; (bidx < viewIconObj.buttons.items.length && (B = viewIconObj.buttons.items[bidx])); bidx++) { + tpo.push(" "); + } + ; + tpo.push("
"); + } + } + + tpo.push("
"); + + return tpo.join(''); + }, + getMobileItem: function (itemIndex, item, mobileView) { + var cfg = this.config; + var tpo = []; + var evenClassName = "line" + (itemIndex % 2); + var getFormatterValue = this.getFormatterValue.bind(this); + var getTooltipValue = this.getTooltipValue.bind(this); + var 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); + } + } + + tpo.push("
"); + + var __memoCol = null, displayColumnCount = 0; + for (var CN, cidx = 0, __arr = mobileView.column; (cidx < __arr.length && (CN = __arr[cidx])); cidx++) { + if (CN.display == true || CN.display == undefined) displayColumnCount++; + } + for (var CN, cidx = 0, __arr = mobileView.column; (cidx < __arr.length && (CN = __arr[cidx])); cidx++) { + if (CN.display == true || CN.display == undefined) { + var colClass = "", colAddClass = (CN.addClass || ""); + if(displayColumnCount === 1) colAddClass = ""; // show column 1 + if (CN.col) colClass = "col" + CN.col; + else colClass = "colNone"; + + if (__memoCol != null && !CN.col) tpo.push("
"); + + tpo.push("
"); + if (mobileView.label != false) { + tpo.push("" + CN.label + ""); + tpo.push(""); + } else { + tpo.push(""); + } + if (CN.formatter) { + tpo.push(getFormatterValue(CN.formatter, item, itemIndex, item[CN.key], CN.key, CN)); + } else { + tpo.push(item[CN.key]); + } + tpo.push(""); + tpo.push("
"); + __memoCol = CN.col; + } + } + + tpo.push("
"); + tpo.push("
"); + if(mobileView.buttons){ + for (var B, bidx = 0, __arr = mobileView.buttons; (bidx < __arr.length && (B = __arr[bidx])); bidx++){ + tpo.push(""); + tpo.push(""); + } + } + tpo.push("
"); + tpo.push("
"); + + return tpo.join(''); + }, + getItemMarker: function (itemIndex, item, isfix) { + var cfg = this.config; + var tpo = []; + var evenClassName = "gridBodyMarker"; + var getFormatterValue = this.getFormatterValue.bind(this); + var hasFixed = this.hasFixed; + var 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 < cfg.body.marker.rows.length; r++) { + var isLastTR = (cfg.body.marker.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + for (var CH, CHidx = 0, __arr = cfg.body.marker.rows[r]; (CHidx < __arr.length && (CH = __arr[CHidx])); CHidx++) { + if (CH.display && CH.colspan > 0) { + + if (isfix == "n" || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + /*trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); */ + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + /*tpo.push("
");*/ + tpo.push("
"); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH)); + } else { + tpo.push(item[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
"); + /*tpo.push("
");*/ + tpo.push(""); + } + } + } + ; + if (r == 0 && isfix == "n") { + tpo.push("
 
"); + } + tpo.push(""); + } + return tpo.join(''); + }, + getMarkerDisplay: function (itemIndex, item) { + var cfg = this.config; + var bodyHasMarker = this.bodyHasMarker; + + if (!bodyHasMarker) return false; + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page + }; + + var markerDisplay; + try { + markerDisplay = cfg.body.marker.display.call(sendObj, itemIndex, item); + } catch (e) { + trace(e); + } + return markerDisplay; + }, + printList: function () { + + var cfg = this.config; + var bodyHasMarker = this.bodyHasMarker; + var getItem = this.getItem.bind(this); + var getItemMarker = this.getItemMarker.bind(this); + var getMarkerDisplay = this.getMarkerDisplay.bind(this); + + if (this.editorOpend) this.cancelEditor(); + + /* icon view */ + var getIconItem = this.getIconItem.bind(this); + /* --------------------------- icon view */ + /* mobile view */ + var getMobileItem = this.getMobileItem.bind(this); + /* --------------------------- icon view */ + + var po = []; + /* 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)) { + po.push(getItemMarker(itemIndex, item, "n")); + } + } + }else{ + if (this.list.length > 0) { + var firstItem = this.list[0]; + po.push(getItem(0, firstItem, "n")); + if (bodyHasMarker && getMarkerDisplay(0, firstItem)) { + po.push(getItemMarker(0, firstItem, "n")); + } + } + } + + if (this.list.length == 0) { /* empty tags */ + 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('')); + + if (this.hasFixed) { + po = []; + if(cfg.height == "auto") { + for (var item, itemIndex = 0, __arr = this.list; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + po.push(getItem(itemIndex, item, "fix")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "fix")); + } + } + }else{ + if (this.list.length > 0) { + po.push(getItem(0, firstItem, "fix")); + if (bodyHasMarker && getMarkerDisplay(0, firstItem)) { + po.push(getItemMarker(itemIndex, firstItem, "fix")); + } + } + } + + this.cachedDom.fixed_tbody.empty(); + this.cachedDom.fixed_tbody.append(po.join('')); + } + + if(cfg.height != "auto" && 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(); + if(this.list.length > (printListCount + 10)) printListCount += 10; + else printListCount = this.list.length; + for (var item, itemIndex = 1, __arr = this.list; (itemIndex < printListCount && (item = __arr[itemIndex])); itemIndex++) { + po.push(getItem(itemIndex, item, "n")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "n")); + } + } + this.cachedDom.tbody.append(po.join('')); + + if (this.hasFixed) { + po = []; + for (var item, itemIndex = 1, __arr = this.list; (itemIndex < printListCount && (item = __arr[itemIndex])); itemIndex++) { + po.push(getItem(itemIndex, item, "fix")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "fix")); + } + } + this.cachedDom.fixed_tbody.append(po.join('')); + } + + // TODO : init virtualScroll & control height thpadding + 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) }); + if(this.hasFixed) { + this.cachedDom.fthpadding.css({ height: 0 }); + this.cachedDom.ftfpadding.css({ height: (this.list.length - printListCount - 1) * (itemTrHeight) }); + } + + // 스크롤 y 포지션 초기화 + this.scrollContent.css({ top: 0 }); + this.contentScrollContentSync({ top: 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)); + + if (this.selectedRow && this.selectedRow.length > 0) { + + 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 itemIndex = this.selectedRow.last(); + try { + var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; + + var scrollHeight = this.scrollContent.height(); + var bodyHeight = 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 (trTop.number() == 0) { + var scrollTop = 0; + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } + } + } catch (e) { + + } + + } + + } else if (cfg.viewMode == "icon") { + + var viewIconObj = cfg.view; + + var viewIconCss = []; + viewIconCss.push("width:" + viewIconObj.width.number() + "px"); + viewIconCss.push("height:" + viewIconObj.height.number() + "px"); + if (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"); + if (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"); + if (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"); + if (viewIconObj.description.style) viewIconDescriptionCss.push(viewIconObj.description.style); + + var viewIconButtonsCss = []; + if (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"); + if (viewIconObj.buttons.style) viewIconButtonsCss.push(viewIconObj.buttons.style); + } + + var cssObj = { + box: viewIconCss.join(";"), + img: viewIconImgCss.join(";"), + label: viewIconLabelCss.join(";"), + description: viewIconDescriptionCss.join(";"), + buttons: viewIconButtonsCss.join(";") + }; + + for (var item, 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"); + gridBodyDiv.empty(); + gridBodyDiv.append(po.join('')); + + this.body.find(".bodyViewIcon").bind("click", this.gridBodyClick.bind(this)); + if (this.needBindDBLClick()) this.body.find(".bodyViewIcon").bind("dblclick", this.gridBodyDBLClick.bind(this)); + + if (this.selectedRow && this.selectedRow.length > 0) { + var body = this.body; + for (var item, itemIndex = 0, __arr = this.selectedRow; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + body.find(".bodyViewIcon_" + item).addClass("selected"); + } + } + + var _list = this.list; + var iconButtonClick = function (event) { + var ids = event.target.id.split(/_AX_/g); + var itemIndex = ids[ids.length - 2]; + var buttonIndex = ids[ids.length - 1]; + + if (viewIconObj.buttons.items[buttonIndex].onclick) { + viewIconObj.buttons.items[buttonIndex].onclick.call({ + index: itemIndex, + list: _list, + item: _list[itemIndex], + buttonItem: viewIconObj.buttons.items[buttonIndex] + }); + } + }; + var iconButtonClickBind = iconButtonClick.bind(this); + + this.body.find(".bodyViewIcon .viewIconButtonsItem").bind("click", function (event) { + iconButtonClickBind(event); + }); + + } else if (cfg.viewMode == "mobile") { + + var mobileView = cfg.view; + if (mobileView == undefined) { + var columns = []; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + var col = null, addClass = ""; + if (CG.widthAstric || CG.width.number() >= 200) { + col = 4; + addClass = "underLine"; + } else if (CG.width.number() >= 100) { + col = 2; + } else if (CG.width.number() >= 40) { + //col = 1; + } + columns.push( + {key: CG.key, label: CG.label, col: col, formatter: CG.formatter, addClass: addClass, sort: (CG.sort || ""), display: (CG.display || true)} + ); + } + columns = columns.sort(function (pItem, nItem) { + var v1 = pItem.col; + var v2 = nItem.col; + if (v1 < v2) return 1; + else if (v1 > v2) return -1; + else if (v1 == v2) return 0; + }); + mobileView = { + labelView: true, + column: columns + }; + } + + for (var item, itemIndex = 0, __arr = this.list; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + po.push(getMobileItem(itemIndex, item, mobileView)); + } + + if (this.list.length == 0) { /* empty tags */ + 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)); + if (this.needBindDBLClick()) this.body.find(".bodyViewMobile").bind("dblclick", this.gridBodyDBLClick.bind(this)); + + if (this.selectedRow && this.selectedRow.length > 0) { + var body = this.body; + for (var item, itemIndex = 0, __arr = this.selectedRow; (itemIndex < __arr.length && (item = __arr[itemIndex])); itemIndex++) { + body.find(".bodyViewMobile_" + item).addClass("selected"); + } + } + + var _list = this.list; + var mobileButtonClick = function (event) { + var ids = event.target.id.split(/_AX_/g); + var itemIndex = ids[ids.length - 2]; + var buttonIndex = ids[ids.length - 1]; + + if (mobileView.buttons[buttonIndex].onclick) { + mobileView.buttons[buttonIndex].onclick.call({ + index: itemIndex, + list: _list, + item: _list[itemIndex], + buttonItem: mobileView.buttons[buttonIndex] + }); + } + }; + var mobileButtonClickBind = mobileButtonClick.bind(this); + + this.body.find(".bodyViewMobile").find(".buttonGroupItem").bind("click", function (event) { + mobileButtonClick(event); + }); + } + + this.selectedCells.clear(); + /* selectedCells clear */ + this.contentScrollResize(); + + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + }, + updateList: function (itemIndex, item) { + var cfg = this.config; + this.cancelEditor(); + + if (item._CUD == "C") { + + } else if (item._CUD == "D") { + toast.push("삭제된 아이템 입니다. 수정할 수 없습니다."); + return; + /*삭제된 개체 수정 금지 */ + } else { + 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); + if (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); + if (this.hasFixed) { + axdom("#" + cfg.targetID + "_AX_fixedTbody").find(".gridBodyTr_" + itemIndex).addClass(trAddClass); + } + this.redrawDataSet(); + }, + pushList: function (pushItem, insertIndex) { + var cfg = this.config; + + this.cancelEditor(); + + pushItem._CUD = "C"; + if (insertIndex != null && insertIndex != undefined) { + + var itemIndex = insertIndex; + var newList = []; + for (var L, listIndex = 0, __arr = this.list; (listIndex < __arr.length && (L = __arr[listIndex])); listIndex++) { + if (listIndex == itemIndex) { + newList.push(pushItem); + } + newList.push(L); + } + ; + this.list = newList; + var item = this.list[itemIndex]; + + var npo = this.getItem(itemIndex, item, "n"); + if (this.hasFixed) { + var fpo = this.getItem(itemIndex, item, "fix"); + } + + this.printList(); + this.contentScrollResize(false); + this.setFocus(itemIndex); + + } else { + + var itemIndex = this.list.length; + this.list.push(pushItem); + + if (itemIndex == 0) { + this.printList(); + } else { + + var item = this.list[itemIndex]; + var 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, O) { + if (idx == trlen) axdom(this).after(npo); + }); + if (this.hasFixed) { + axdom("#" + cfg.targetID + "_AX_fixedTbody").find(".gridBodyTr_" + (itemIndex - 1)).each(function (idx, O) { + if (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)); + if (this.needBindDBLClick()) axdom("#" + cfg.targetID + "_AX_tbody").find(".gridBodyTr_" + itemIndex).bind("dblclick", this.gridBodyDBLClick.bind(this)); + + if (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)); + if (this.needBindDBLClick()) axdom("#" + cfg.targetID + "_AX_fixedTbody").find(".gridBodyTr_" + itemIndex).bind("dblclick", this.gridBodyDBLClick.bind(this)); + } + + this.contentScrollResize(false); + this.setFocus(itemIndex); + } + } + + if (!this.pageActive) this.setStatus(this.list.length); + this.redrawDataSet(); + }, + removeList: function (removeList) { + var cfg = this.config; + + if (cfg.passiveMode) { + + var _list = this.list; + var collect = []; + axf.each(removeList, function (ridx, r) { + axf.each(_list, function (lidx, l) { + var isDel = false; + axf.each(r, function (k, v) { + if (l[k] == v) { + isDel = true; + } else { + isDel = false; + return false; + } + }); + if (isDel) { + if (l._CUD != "C") { + l._CUD = "D"; + collect.push(l); + } + } else { + collect.push(l); + } + }); + }); + this.list = collect; + } else { + var collect = []; + axf.each(this.list, function (lidx, l) { + var isPush = true; + axf.each(removeList, function (ridx, r) { + axf.each(r, function (k, v) { + if (l[k] == v) { + isPush = false; + return false; + } + }); + if (!isPush) return false; + }); + if (isPush) collect.push(l); + }); + this.list = collect; + } + + this.printList(); + if (!this.pageActive) this.setStatus(this.list.length); + this.redrawDataSet(); + }, + removeListIndex: function (removeList) { + var cfg = this.config; + + var _list = this.list; + + if (cfg.passiveMode) { + + axf.each(removeList, function (ridx, r) { + if(_list[r.index]){ + if (cfg.passiveRemoveHide) { + _list[r.index]._isDel = true; + } else { + if (_list[r.index]._CUD != "C") { + _list[r.index]._CUD = "D"; + } else { + _list[r.index]._isDel = true; + } + } + } + }); + + var collect = []; + var removeCollect = this.removedList; + axf.each(_list, function () { + if (!this._isDel) collect.push(this); + else { + if (this._CUD != "C") { + removeCollect.push(this); + } + } + }); + this.list = collect; + this.removedList = removeCollect; + + } else { + + var collect = []; + axf.each(removeList, function (ridx, r) { + if(_list[r.index]) { + _list[r.index]._isDel = true; + } + }); + + var collect = []; + var removeCollect = this.removedList; + axf.each(_list, function () { + if (!this._isDel) collect.push(this); + else removeCollect.push(this); + }); + this.list = collect; + this.removedList = removeCollect; + + } + + this.selectedCells.clear(); + this.selectedRow.clear(); + + this.printList(); + if (!this.pageActive) this.setStatus(this.list.length); + this.redrawDataSet(); + }, + restoreList: function (restoreList) { + var cfg = this.config; + + var _list = this.list; + var collect = []; + axf.each(restoreList, function (ridx, r) { + axf.each(_list, function (lidx, l) { + var isDel = false; + axf.each(r, function (k, v) { + if (l[k] == v) { + isDel = true; + } else { + isDel = false; + return false; + } + }); + if (isDel) { + if (l._CUD == "D") { + l._CUD = ""; + } + collect.push(l); + } else { + collect.push(l); + } + }); + }); + this.list = collect; + + this.printList(); + if (!this.pageActive) this.setStatus(this.list.length); + this.redrawDataSet(); + }, + gridBodyOver: function (event) { + var cfg = this.config; + + if (this.overedItemIndex) { + this.body.find(".gridBodyTr_" + this.overedItemIndex).removeClass("hover"); + } + var itemIndex = (event.target.id).split(/_AX_/g).last(); + if (itemIndex != "") { + this.body.find(".gridBodyTr_" + itemIndex).addClass("hover"); + this.overedItemIndex = itemIndex; + } + + }, + gridBodyOut: function (event) { + var cfg = this.config; + + if (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) { + clearTimeout(this.bodyClickObserver); + this.gridBodyDBLClick(event); + this.bodyClickObserver = null; + return; + } + 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; + var eventTarget = event.target; + if (event.target.id != "") { + var eid = event.target.id.split(/_AX_/g); + var isoncheck = false, checkedValue; + if (eventTarget.tagName.toLowerCase() == "input" || eventTarget.tagName.toLowerCase() == "button") { + if(eventTarget.tagName.toLowerCase() == "input"){ + if(eventTarget.type.toLowerCase() == "checkbox" || eventTarget.type.toLowerCase() == "radio"){ + isoncheck = true; + checkedValue = eventTarget.checked; + } + } + if (cfg.body.oncheck) { + isoncheck = true; + } else if(!isoncheck) { + return; + /*input 인 경우 제외 */ + } + var ieid = event.target.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: 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, evtIDs) { + var edom = axdom(evt); + return (axdom(evt.parentNode).hasClass("AXGridBody") || edom.hasClass("buttonGroupItem")); + }, + find: function (evt, evtIDs) { + var edom = axdom(evt); + return ((edom.hasClass("bodyTd") || edom.hasClass("bodyViewIcon") || edom.hasClass("bodyViewMobile")) && !edom.hasClass("buttonGroupItem")); + } + }); + /* event target search ------------------------ */ + if (isoncheck) { /*체크박스 구현 */ + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + var item = this.list[itemIndex]; + var r = ids[ids.length - 3]; + var c = ids[ids.length - 2]; + + if(!this.list[itemIndex].___checked) this.list[itemIndex].___checked = {}; + this.list[itemIndex].___checked[c] = checkedValue; + + var target = event.target; + var checked = event.target.checked; + var sendObj = { + index: itemIndex, + target: event.target, + checked: event.target.checked, + r: r, + c: c, + list: this.list, + item: item, + page: this.page + }; + try { + if(cfg.body.oncheck) cfg.body.oncheck.call(sendObj, itemIndex, item); + } catch (e) { + trace(e); + } + } else if (cfg.viewMode == "grid") { + if (myTarget) { + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var 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 = false; + var collect = []; + axf.each(this.selectedCells, function () { + if (this == targetID) { + hasID = true; + } else { + collect.push(this); + } + }); + if (hasID) { + axdom("#" + targetID).removeClass("selected"); + this.selectedCells = collect; + } else { + 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(); + } + if (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]; + var c = ids[ids.length - 2]; + var 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); + } + } + /*if(this.hasEditor) this.setEditor(item, itemIndex); */ + } + } + } else if (cfg.viewMode == "icon") { + if (myTarget) { + var targetID = myTarget.id; + var 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 (cfg.viewMode == "mobile") { + if (myTarget) { + var targetID = myTarget.id; + var 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 == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + if (eventTarget.tagName.toLowerCase() == "input" || eventTarget.tagName.toLowerCase() == "button") return; + /*input, button 인 경우 제외 */ + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + until: function (evt, evtIDs) { + return (axdom(evt.parentNode).hasClass("AXGridBody")) ? true : false; + }, + find: function (evt, evtIDs) { + return (axdom(evt).hasClass("bodyTd") || axdom(evt).hasClass("bodyViewIcon") || axdom(evt).hasClass("bodyViewMobile")) ? true : false; + } + }); + /* event target search ------------------------ */ + if (cfg.viewMode == "grid") { + if (myTarget) { + /*colHeadTool ready */ + /*trace({tagName:myTarget.tagName, id:myTarget.id}); */ + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var 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"); + }); + } + this.selectedRow.clear(); + this.body.find(".gridBodyTr_" + itemIndex).addClass("selected"); + this.selectedRow.push(itemIndex); + + if (cfg.body.ondblclick) { + var r = ids[ids.length - 3]; + var c = ids[ids.length - 2]; + var item = this.list[itemIndex]; + var 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 (cfg.viewMode == "icon") { + if (myTarget) { + /*colHeadTool ready */ + /*trace({tagName:myTarget.tagName, id:myTarget.id}); */ + var targetID = myTarget.id; + var 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"); + }); + } + this.selectedRow.clear(); + this.body.find(".bodyViewIcon_" + itemIndex).addClass("selected"); + this.selectedRow.push(itemIndex); + + if (cfg.body.ondblclick) { + var item = this.list[itemIndex]; + var 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 (cfg.viewMode == "mobile") { + if (myTarget) { + /*colHeadTool ready */ + /*trace({tagName:myTarget.tagName, id:myTarget.id}); */ + var targetID = myTarget.id; + var 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"); + }); + } + this.selectedRow.clear(); + this.body.find(".bodyViewMobile_" + itemIndex).addClass("selected"); + this.selectedRow.push(itemIndex); + + if (cfg.body.ondblclick) { + var item = this.list[itemIndex]; + var 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; + if (cfg.viewMode == "mobile") return; // 모바일이면 scroll이 없음. + if (this.contentScrollResize_timer) clearTimeout(this.contentScrollResize_timer); + this.contentScrollResize_timer = setTimeout(function () { + //trace("contentScrollResize_timer"); + var bodyHeight = _this.body.height(); + var scrollHeight = _this.scrollContent.height(); + + var bodyWidth = _this.body.width(); + var _colWidth = (_this.colWidth.number() + cfg.fitToWidthRightMargin); + var scrollWidth = (_colWidth > bodyWidth) ? _colWidth : bodyWidth; + + _this.scrollContent.css({ width: scrollWidth }); + _this.colHead.css({ width: scrollWidth }); + /* colHead width 재정의 */ + + if (_this.hasEditor) _this.editor.css({ width: scrollWidth }); + + if (resetLeft != false) { + _this.scrollContent.css({ left: 0 }); + axdom("#" + cfg.targetID + "_AX_gridColHead").css({ left: 0 }); + _this.scrollXHandle.css({ left: 0 }); + if (_this.hasEditor) axdom("#" + cfg.targetID + "_AX_editorContent").css({ left: 0 }); + } else { + if ((_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 }); + } + } + + if (bodyHeight < scrollHeight && cfg.height != "auto") { + //_this.scrollTrackXY.show(); + _this.scrollTrackY.show(); + + var scrollTrackYHeight = bodyHeight; + _this.scrollTrackY.css({ height: scrollTrackYHeight }); + + var scrollYHandleHeight = ((bodyHeight) * scrollTrackYHeight) / scrollHeight; + // TODO : scrollYHandleHeight 최소 사이즈 예외 처리 최소 높이 = 30 + _this.scrollYHandle.data("height", scrollYHandleHeight); + if(scrollYHandleHeight < 30) scrollYHandleHeight = 30; + _this.scrollYHandle.css({ height: scrollYHandleHeight }); + } else { + //_this.scrollTrackXY.hide(); + _this.scrollTrackY.hide(); + } + + if (scrollWidth > (bodyWidth+4) && cfg.xscroll) { + _this.show_scrollTrackX = true; + + //_this.scrollTrackXY.show(); + _this.scrollTrackX.show(); + + var scrollTrackXWidth = bodyWidth; + _this.scrollTrackX.css({ width: scrollTrackXWidth }); + var scrollXHandleWidth = ((bodyWidth) * scrollTrackXWidth) / scrollWidth; + _this.scrollXHandle.data("width", scrollXHandleWidth); + if(scrollXHandleWidth < 30) scrollXHandleWidth = 30; + _this.scrollXHandle.css({ width: scrollXHandleWidth }); + + /* cfg.height == "auto" 길이 늘이기 */ + if (cfg.height == "auto") { + var colHeadHeight = _this.colHead.outerHeight(); + var scrollBodyHeight = _this.scrollContent.height(); + //var scrollTrackXYHeight = _this.scrollTrackXY.outerHeight(); + _this.scrollBody.css({ height: (scrollBodyHeight + colHeadHeight) }); + /*colhead + body height */ + _this.body.css({ top: colHeadHeight, height: (scrollBodyHeight) }); + /* body Height */ + } + } else { + _this.show_scrollTrackX = false; + _this.scrollTrackX.hide(); + //if (cfg.height == "auto") _this.scrollTrackXY.hide(); + + if (cfg.height == "auto") { + var colHeadHeight = _this.colHead.outerHeight(); + var scrollBodyHeight = _this.scrollContent.height(); + + _this.scrollBody.css({ height: (scrollBodyHeight + colHeadHeight) }); + /*colhead + body height */ + _this.body.css({ top: colHeadHeight, height: (scrollBodyHeight) }); + /* body Height */ + } + } + }, 10); + }, + contentScrollScrollSync: function (pos) { + var cfg = this.config; + + if (pos.left != undefined) { + + 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 }); + if (this.hasEditor) axdom("#" + cfg.targetID + "_AX_editorContent").css({ left: -L }); + + } else { + if (cfg.height == "auto") return; + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: this.scrollContent.outerHeight(), + scrollTrackYHeight: this.scrollTrackY.height(), + scrollYHandleHeight: this.scrollYHandle.outerHeight() + }; + }else{ + // scrollContent height update + this.contentScrollYAttr.scrollHeight = this.scrollContent.height(); + } + + + //var T = (this.contentScrollYAttr.scrollHeight * (pos.top) / this.contentScrollYAttr.scrollTrackYHeight).floor(); + var T = (this.contentScrollYAttr.scrollHeight - this.contentScrollYAttr.bodyHeight) * ( (pos.top) / (this.contentScrollYAttr.scrollTrackYHeight - this.contentScrollYAttr.scrollYHandleHeight) ).number(); + this.scrollContent.css({ top: -T }); + if (axf.getId(cfg.targetID + "_AX_fixedScrollContent")) this.fixedScrollContent.css({ top: -T }); + if (this.editorOpend) { + this.editor.css({ top: -T + this.editorOpenTop }); + } + this.bigDataSync(); + } + }, + contentScrollContentSync: function (pos, touch) { + + var cfg = this.config; + if (pos.left != undefined) { + + if (!this.contentScrollXAttr) { + var scrollWidth = (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 }); + if (this.hasEditor) axdom("#" + cfg.targetID + "_AX_editorContent").css({ left: pos.left }); + + } else { + + if (cfg.height == "auto") return; + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: this.scrollContent.height(), + scrollTrackYHeight: this.scrollTrackY.height(), + scrollYHandleHeight: this.scrollYHandle.outerHeight() + }; + }else{ + // scrollContent height update + this.contentScrollYAttr.scrollHeight = this.scrollContent.height(); + this.contentScrollYAttr.scrollTrackYHeight = this.scrollTrackY.height(); + this.contentScrollYAttr.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 }); + if (axf.getId(cfg.targetID + "_AX_fixedScrollContent")) this.fixedScrollContent.css({ top: pos.top }); + if (this.editorOpend) { + this.editor.css({ top: pos.top + this.editorOpenTop }); + } + } + + if(touch == undefined) this.bigDataSync(); + }, + getMousePositionToContentScroll: function (event, contentScrollID) { + var pos = axdom("#" + contentScrollID).offset(); + var x = (event.pageX - pos.left); + var y = (event.pageY - pos.top); + return { x: x, y: y }; + }, + getTouchPositionToContentScroll: function (event) { + var cfg = this.config; + var touch = event.touches[0], x, y; + + if (cfg.touchDirection) { + x = touch.pageX.round(10); + y = touch.pageY.round(10); + } else { + x = -touch.pageX.round(10); + y = -touch.pageY.round(10); + } + /* + var pos = this.contentScrollIDOffset; + if (cfg.touchDirection) { + var x = (touch.pageX.round(1) - pos.left); + var y = (touch.pageY.round(1) - pos.top); + } else { + var x = (-touch.pageX.round(1) - pos.left); + var y = (-touch.pageY.round(1) - pos.top); + } + */ + return { x: x, y: y }; + }, + contentScrollScrollReady: function (event) { + var cfg = this.config; + var handleName = (event.target.id).split(/_AX_/).last(); + /*trace(handleName); */ + this.contentScrollAttrs = { handleName: handleName }; + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + + if (handleName == "scrollYHandle") { + this.contentScrollAttrs.scrollTrack = cfg.targetID + "_AX_scrollTrackY"; + } else { + this.contentScrollAttrs.scrollTrack = 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(); + + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: this.scrollContent.outerHeight(), + scrollTrackYHeight: this.scrollTrackY.height(), + scrollYHandleHeight: this.scrollYHandle.outerHeight() + }; + }else{ + // scrollContent height update + this.contentScrollYAttr.scrollHeight = this.scrollContent.height(); + this.contentScrollYAttr.scrollTrackYHeight = this.scrollTrackY.height(); + this.contentScrollYAttr.scrollYHandleHeight = this.scrollYHandle.outerHeight(); + } + + /* srcoll event bind */ + var contentScrollScrollMove = this.contentScrollScrollMove.bind(this); + this.contentScrollScrollMoveBind = function (event) { + contentScrollScrollMove(event); + }; + var contentScrollScrollEnd = this.contentScrollScrollEnd.bind(this); + this.contentScrollScrollEndBind = function (event) { + contentScrollScrollEnd(event); + }; + + if (handleName == "scrollYHandle") { + 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 = true; + /* scroll event bind ~~~~~~~~~~~~~~~~~~~ */ + }, + contentScrollScrollMove: function (event) { + var cfg = this.config; + var pos = this.getMousePositionToContentScroll(event, this.contentScrollAttrs.scrollTrack); + var handleName = this.contentScrollAttrs.handleName; + /*trace(this.contentScrollAttrs); */ + var handleTop = 0; + var handleLeft = 0; + if (handleName == "scrollYHandle") { + handleTop = (pos.y + this.contentScrollAttrs.y); + if (handleTop < 0) handleTop = 0; + if ((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); + } else { + handleLeft = pos.x + this.contentScrollAttrs.x; + if (handleLeft < 0) handleLeft = 0; + if ((handleLeft + this.contentScrollAttrs.handleWidth) > this.contentScrollAttrs.trackWidth) handleLeft = this.contentScrollAttrs.trackWidth - this.contentScrollAttrs.handleWidth; + this.scrollXHandle.css({ left: handleLeft }); + } + }, + contentScrollScrollEnd: function (event) { + 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 = false; + + if(this.contentScrollAttrs.handleName == "scrollYHandle"){ + this.contentScrollScrollSync({ top: this.scrollYHandle.position().top }); + + if(this.contentScrollAttrs.trackHeight - this.contentScrollAttrs.handleHeight == this.scrollYHandle.data("top")){ + this.contentScrollEnd(); + } + + this.scrollYTip.hide(); + + }else{ + this.contentScrollScrollSync({ left: this.scrollXHandle.position().left }); + } + }, + contentScrollScrollWheel: function (e) { + var cfg = this.config; + + if (cfg.height == "auto") return; + + if(!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; + var delta = event.detail ? event.detail * (-20) : event.wheelDelta / 2; + /*check for detail first so Opera uses that instead of wheelDelta */ + + var bodyHeight = this.body.height(); + var scrollTop = this.scrollContent.position().top; + var scrollHeight = this.scrollContent.height(); + + var handleHeight = this.scrollYHandle.outerHeight(); + var trackHeight = this.scrollTrackY.height(); + + if (scrollHeight < bodyHeight) return; + + var eventCancle = false; + scrollTop += delta; + + if (scrollTop > 0) { + scrollTop = 0; + eventCancle = true; + } else if (scrollTop.abs() + bodyHeight > scrollHeight) { + scrollTop = bodyHeight - scrollHeight; + eventCancle = true; + } else if (scrollTop == 0) { + scrollTop = 0; + eventCancle = true; + } + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + + + if (!eventCancle) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + } else { + if (scrollTop != 0) { + var contentScrollEnd = this.contentScrollEnd.bind(this); + if (this.contentScrollEndObserver) clearTimeout(this.contentScrollEndObserver); + this.contentScrollEndObserver = setTimeout(function () { + contentScrollEnd(); + }, 100); + } + } + + }, + contentScrollTouchstart: function (e) { + var cfg = this.config; + var event = window.event || e; + + if(cfg.viewMode == "mobile") return; + + this.contentScrollTouchMoved = true; + 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); + }; + + if (document.addEventListener) { + document.addEventListener("touchend", this.contentScrollTouchEndBind, false); + document.addEventListener("touchmove", this.contentScrollTouchMoveBind, false); + } + }, + contentScrollTouchMove: function (e) { + var cfg = this.config; + var event = window.event || e; + if (this.contentScrollTouchMoved) { + + var pos = this.getTouchPositionToContentScroll(event); + var scrollTouchAttr = this.scrollTouchAttr; + + var eventCancle = false; + + if (scrollTouchAttr.th > scrollTouchAttr.h && cfg.height != "auto") { + var scrollTop = scrollTouchAttr.nt - (pos.y - scrollTouchAttr.y); + //trace(scrollTop); + if (scrollTop > 0) { + scrollTop = 0; + eventCancle = true; + } else if (scrollTop.abs() + scrollTouchAttr.h > scrollTouchAttr.th) { + scrollTop = scrollTouchAttr.h - scrollTouchAttr.th; + eventCancle = true; + } else if (scrollTop == 0) { + scrollTop = 0; + eventCancle = true; + } + + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }, "touch"); + }else{ + eventCancle = true; + } + + if (this.show_scrollTrackX && (pos.x - scrollTouchAttr.x).abs() > 8) { + eventCancle = false; + var scrollLeft = scrollTouchAttr.nl - (pos.x - scrollTouchAttr.x); + + if (scrollLeft > 0) { + scrollLeft = 0; + eventCancle = true; + } else if (scrollLeft.abs() + scrollTouchAttr.w > scrollTouchAttr.tw) { + scrollLeft = scrollTouchAttr.w - scrollTouchAttr.tw; + eventCancle = true; + } else if (scrollLeft == 0) { + scrollLeft = 0; + eventCancle = true; + } + this.scrollContent.css({ left: scrollLeft }); + this.contentScrollContentSync({ left: scrollLeft }, "touch"); + } + + if (!eventCancle) { + if (event.preventDefault) event.preventDefault(); + //if (event.stopPropagation) event.stopPropagation(); + //event.cancelBubble = true; + //return false; + } else { + if (scrollTop != 0) { + var contentScrollEnd = this.contentScrollEnd.bind(this); + if (this.contentScrollEndObserver) clearTimeout(this.contentScrollEndObserver); + this.contentScrollEndObserver = setTimeout(function () { + contentScrollEnd(); + }, 100); + } + } + } + }, + contentScrollTouchEnd: function (e) { + var cfg = this.config; + var event = window.event || e; + if (this.contentScrollTouchMoved) { + + if(cfg.height != "auto") this.bigDataSync(); + + //TODO : 관성법칙 적용 해야함. + this.scrollXHandle.removeClass("hover"); + this.scrollYHandle.removeClass("hover"); + + if (document.removeEventListener) { + document.removeEventListener("touchend", this.contentScrollTouchEndBind, false); + document.removeEventListener("touchmove", this.contentScrollTouchMoveBind, false); + } + this.contentScrollTouchMoved = false; + } + }, + contentScrollEnd: function () { + if (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(event){ + // TODO : contentScrollTipOver + /* + var cfg = this.config; + this.scrollYHandle.bind("mousemove"); + this.scrollYHandle.bind("mouseout"); + */ + }, + contentScrollTipOverMove: function(handleTop){ + var cfg = this.config; +/* + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: this.scrollContent.outerHeight(), + scrollTrackYHeight: this.scrollTrackY.height(), + scrollYHandleHeight: this.scrollYHandle.outerHeight() + }; + }else{ + // scrollContent height update + this.contentScrollYAttr.scrollHeight = this.scrollContent.height(); + this.contentScrollYAttr.scrollTrackYHeight = this.scrollTrackY.height(); + this.contentScrollYAttr.scrollYHandleHeight = this.scrollYHandle.outerHeight(); + } +*/ + var hTop = handleTop || this.scrollYHandle.position().top; + var 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(event){ + var cfg = this.config; + this.scrollYHandle.unbind("mousemove"); + this.scrollYHandle.unbind("mouseout"); + this.scrollYTip.hide(); + }, + + bigDataSync: function(){ + if(this.bigDataSyncObserver) clearTimeout(this.bigDataSyncObserver); + this.bigDataSyncObserver = setTimeout(this.bigDataSyncApply.bind(this), 10); + }, + bigDataSyncApply: function(){ + var cfg = this.config; + var bodyHasMarker = this.bodyHasMarker; + var getItem = this.getItem.bind(this); + var getItemMarker = this.getItemMarker.bind(this); + var getMarkerDisplay = this.getMarkerDisplay.bind(this); + + // TODO : bigDataSyncApply + var scrollContentScrollTop, VS = this.virtualScroll, po = [], item; + if(VS.scrollTop != (scrollContentScrollTop = this.scrollContent.position().top)){ + + var newStartIndex = (scrollContentScrollTop.abs() / VS.itemTrHeight).ceil() - 1; + if(newStartIndex < 0) newStartIndex = 0; + var newEndIndex = newStartIndex + VS.printListCount; + + //trace(newStartIndex, newEndIndex, VS.printListCount, this.list.length); + if(newEndIndex > this.list.length) { + newEndIndex = this.list.length; + newStartIndex = newEndIndex - VS.printListCount; + } + //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 (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.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) }); + } + + 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)); + + if (this.selectedRow && this.selectedRow.length > 0) { + + 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 itemIndex = this.selectedRow.last(); + try { + var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; + var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); + + 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) { + + } + + } + + VS.startIndex = newStartIndex; + VS.endIndex = newEndIndex; + VS.scrollTop = scrollContentScrollTop; + } + }, + + scrollTop: function (itemIndex) { + var cfg = this.config; + if (cfg.height == "auto") return; + try { + var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; + var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); + + var scrollHeight = this.scrollContent.height(); + var bodyHeight = this.body.height(); + var handleHeight = this.scrollYHandle.outerHeight(); + var trackHeight = this.scrollTrackY.height(); + + if (trTop.number() + trHeight.number() > bodyHeight) { + var scrollTop = bodyHeight - (trTop.number() + trHeight.number()); + if (this.body.height() < scrollHeight) { + 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) { + var scrollTop = 0; + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } + }, + setFocus: function (itemIndex) { + var cfg = this.config; + + if (cfg.viewMode == "grid") { + + if (this.selectedCells.length > 0) { + axf.each(this.selectedCells, function () { + axdom("#" + this).removeClass("selected"); + }); + this.selectedCells.clear(); + } + if (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; + var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); + + var scrollHeight = this.scrollContent.height(); + var bodyHeight = this.body.height(); + var handleHeight = this.scrollYHandle.outerHeight(); + var trackHeight = 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 (trTop.number() == 0) { + var scrollTop = 0; + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } + } + } else if (cfg.viewMode == "icon") { + + } else if (cfg.viewMode == "mobile") { + + if (this.selectedCells.length > 0) { + axf.each(this.selectedCells, function () { + axdom("#" + this).removeClass("selected"); + }); + this.selectedCells.clear(); + } + 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); + + this.body.find(".bodyViewMobile_" + itemIndex).focus(); + } + }, + focusMove: function (direction, event) { + var cfg = this.config; + var myIndex = this.selectedRow.first(); + var newIndex = myIndex.number() + direction; + if (newIndex < 0) newIndex = this.list.length - 1; + else if (newIndex > (this.list.length - 1)) newIndex = 0; + this.setFocus(newIndex); + + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + }, + getSelectedItem: function () { + var cfg = this.config; + if (this.selectedRow != undefined && this.selectedRow != null && this.selectedRow.length > 0) { + return { index: this.selectedRow.first(), item: this.list[this.selectedRow.first()] }; + } else { + return { 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); + } + } + + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + }, + /* body 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head & foot 영역 */ + getDataSetFormatterValue: function (formatter, dataSet, value, key, CH) { + var cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null" || value == undefined) { + result = "0"; + } else { + result = value.number().money(); + } + } else if (formatter == "dec") { + result = (value == undefined) ? "" : value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox" || formatter == "radio") { + 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 (dataSet == undefined) return; + var tpo = []; + var getDataSetFormatterValue = this.getDataSetFormatterValue.bind(this); + /*dataSet 빈 Key 채우기 */ + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + /*dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ */ + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.head.rows.length; r++) { + var isLastTR = (cfg.head.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.head.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == undefined || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + /*trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); */ + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + /*tpo.push("
");*/ + tpo.push("
"); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
"); + /*tpo.push("
");*/ + tpo.push(""); + } + } + }); + if (r == 0 && isfix == undefined) { + tpo.push("
 
"); + } + tpo.push(""); + } + return tpo.join(''); + }, + getFootDataSet: function (dataSet, isfix) { + var cfg = this.config; + if (dataSet == undefined) return; + var tpo = []; + var getDataSetFormatterValue = this.getDataSetFormatterValue.bind(this); + /*dataSet 빈 Key 채우기 */ + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + /*dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ */ + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.foot.rows.length; r++) { + var isLastTR = (cfg.foot.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.foot.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == undefined || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + /*trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); */ + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + /*tpo.push("
");*/ + tpo.push("
"); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
"); + /*tpo.push("
");*/ + tpo.push(""); + } + } + }); + if (r == 0 && isfix == undefined) { + tpo.push("
 
"); + } + tpo.push(""); + } + return tpo.join(''); + }, + setDataSet: function (obj) { + var cfg = this.config; + if (obj.ajaxUrl) { + + } else { + if (axdom.isPlainObject(obj)) { + this.dataSet = obj; + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + this.contentScrollResize(false); + } + } + }, + redrawDataSet: function () { + var cfg = this.config; + if (this.dataSet) { + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + } + }, + printHead: function () { + var cfg = this.config; + var getDataSet = this.getHeadDataSet.bind(this); + var po = []; + po.push(getDataSet(this.dataSet)); + axdom("#" + cfg.targetID + "_AX_thead").html(po.join('')); + if (this.hasFixed) { + po = []; + po.push(getDataSet(this.dataSet, "fix")); + axdom("#" + cfg.targetID + "_AX_fixedThead").html(po.join('')); + } + }, + printFoot: function () { + var cfg = this.config; + var getDataSet = this.getFootDataSet.bind(this); + var po = []; + po.push(getDataSet(this.dataSet)); + axdom("#" + cfg.targetID + "_AX_tfoot").html(po.join('')); + if (this.hasFixed) { + po = []; + po.push(getDataSet(this.dataSet, "fix")); + axdom("#" + cfg.targetID + "_AX_fixedTfoot").html(po.join('')); + } + }, + /* head & foot 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ editor 영역 */ + getEditorFormatterValue: function (formatter, dataSet, value, key, CH, idAttr) { + var cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null" || value == undefined) { + result = "0"; + } else { + result = value.number().money(); + } + } else if (formatter == "dec") { + result = (value == undefined) ? "" : value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox" || formatter == "radio") { + 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; + var inputHidden = ""; + + return result + inputHidden; + }, + getEditorFormValue: function (form, dataSet, value, key, CH, idAttr) { + var cfg = this.config; + var paddingRight = cfg.formPaddingRight; + var result = []; + + var formClass = (form.addClass) ? " " + form.addClass : ""; + var formWidth = (form.width) ? "width:" + form.width + ";" : "width:100%;"; + var formHeight = (form.height) ? "height:" + form.height + ";" : ""; + var formStyle = (form.style) ? form.style : ""; + var formID = (form.id) ? form.id : cfg.targetID + "_AX_" + key + "_AX_" + idAttr; + + var getFormValue = function (formvalue, value) { + if (formvalue == "itemValue" || formvalue == "itemText") { + if (axdom.isArray(value)) { + return value; + } else { + return (value || "").dec(); + } + } else if (axdom.isFunction(formvalue)) { + var sendObj = { + key: key, + value: value, + list: this.list, + page: this.page + }; + return formvalue.call(sendObj, key, value); + } else { + return formvalue; + } + }; + + if (form.type == "hidden") { + /*result.push("
"); */ + result.push(" "); + result.push(""); + /*result.push("
"); */ + } else if (form.type == "text") { + result.push("
"); + result.push(""); + result.push("
"); + } else if (form.type == "textarea") { + result.push("
"); + result.push(""); + result.push("
"); + } else if (form.type == "select") { + var formValue = getFormValue(form.value, dataSet[key]); + /*trace({key:key, dataSet_key:dataSet[key], formValue:formValue}); */ + result.push("
"); + result.push(""); + result.push("
"); + } else if (form.type == "radio") { + var formValue = getFormValue(form.value, dataSet[key]); + axf.each(form.options, function (oidx, opt) { + result.push("
"); + }); + } else if (form.type == "checkbox") { + var formValue = getFormValue(form.value, dataSet[key]); + axf.each(form.options, function (oidx, opt) { + result.push("
"); + }); + } + return result.join(''); + }, + getEditorBody: function (dataSet, isfix) { + var cfg = this.config; + var getEditorFormatterValue = this.getEditorFormatterValue.bind(this); + var getEditorFormValue = this.getEditorFormValue.bind(this); + var tpo = []; + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.editor.rows.length; r++) { + var isLastTR = (cfg.editor.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + if (isfix == undefined || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + /*tpo.push("
");*/ + tpo.push("
"); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.form) { + tpo.push(getEditorFormValue(CH.form, dataSet, dataSet[CH.key], CH.key, CH, r + "_AX_" + CHidx)); + } else if (CH.formatter) { + tpo.push(getEditorFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH, r + "_AX_" + CHidx, CH.form)); + } else { + tpo.push(dataSet[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
"); + /*tpo.push("
");*/ + tpo.push(""); + } + } else { + tpo.push(""); + if (CH.form) { + tpo.push(getEditorFormValue(CH.form, dataSet, dataSet[CH.key], CH.key, CH, r + "_AX_" + CHidx)); + } else if (CH.formatter) { + tpo.push(getEditorFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH, r + "_AX_" + CHidx, CH.form)); + } else { + tpo.push(dataSet[CH.key]); + } + tpo.push(""); + } + }); + if (r == 0 && isfix == undefined) { + tpo.push("
 
"); + } + tpo.push(""); + } + return tpo.join(''); + }, + setEditor: function (item, itemIndex, insertIndex) { + // TODO : 에디터 출력위치 결정 + var cfg = this.config, _this = this, itemTrHeight; + + if (!this.hasEditor) { + alert("setConfig 에 editor 가 설정 되지 않아 요청을 처리 할 수 없습니다."); + return; + } + this.unbindAXbind(); + + var dataSet = {}; + if (item) { + dataSet = item; + } + /*dataSet 빈 Key 채우기 */ + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + /*dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ */ + + /*setEditor */ + var po = []; + po.push("
"); + po.push(""); + po.push(this.getColGroup("EB")); + /*colGroup 삽입 */ + po.push(""); + po.push(this.getEditorBody(dataSet)); + po.push(""); + po.push("
"); + po.push("
"); + if (this.hasFixed) { + po.push("
"); + po.push(""); + po.push(this.getColGroup("FE")); + /*colGroup 삽입 */ + 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('')); + + if (itemIndex != undefined) { + + var scrollTop = this.scrollContent.position().top, list = this.list; + + if(cfg.height == "auto"){ + var editorTop = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + itemIndex).position().top; + itemTrHeight = (function () { + if (list.length == 0) { + return 0; + } else if (list.length == 1) { + var p2 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + itemIndex).height(); + return p2; + } else if ((list.length - 1) == itemIndex) { + var p1 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + (itemIndex - 1)).position().top; + var p2 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + itemIndex).position().top; + return p2 - p1; + } else { + var p1 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + (itemIndex)).position().top; + var 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 = true; + this.editorOpenTop = editorTop; + this.editorItemIndex = itemIndex; + this.editorButtonPosition = "bottom"; + + var trTop = -editorTop; + + if (trTop.abs() + this.body.height() > this.scrollContent.height()) { + trTop = this.body.height() - this.scrollContent.height(); + // 에디터 위로 들기 + this.editorButtonPosition = "top"; + } + + } else if (insertIndex != undefined) { + + var scrollTop = this.scrollContent.position().top, list = this.list;; + + if(cfg.height == "auto") { + var editorTop = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + insertIndex).position().top; + var trHeight = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + insertIndex).outerHeight(); + itemTrHeight = (function () { + if (list.length == 0) { + return 0; + } else if (list.length == 1) { + var p2 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + insertIndex).height(); + return p2; + } else if ((list.length - 1) == itemIndex) { + var p1 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + (insertIndex - 1)).position().top; + var p2 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + insertIndex).position().top; + return p2 - p1; + } else { + var p1 = axdom("#" + cfg.targetID + "_AX_tr_0_AX_n_AX_" + (insertIndex)).position().top; + var 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 = true; + this.editorOpenTop = editorTop; + this.editorInsertIndex = insertIndex; + this.editorButtonPosition = "bottom"; + + var trTop = -editorTop; + + if (trTop.abs() + this.body.height() > this.scrollContent.height()) { + trTop = this.body.height() - this.scrollContent.height(); + // 에디터 위로 들기 + this.editorButtonPosition = "top"; + } + + if (this.body.height() < this.scrollContent.height()) { + this.scrollContent.css({ top: trTop }); + this.contentScrollContentSync({ top: trTop }); + } + + } else { + + var editorTop = 0, itemTrHeight = this.virtualScroll.itemTrHeight; + + this.editor.css({ top: editorTop }); + this.editorOpend = true; + this.editorOpenTop = editorTop; + this.editorItemIndex = null; + + if (this.body.height() < this.scrollContent.height()) { + this.scrollContent.css({ top: 0 }); + this.contentScrollContentSync({ top: 0 }); + } + + } + + this.scrollTrackY.before(this.editor); + this.editor.show(); + this.editor.find("input[type=text],textarea").bind("mousedown.AXGrid", function () { + this.focus(); + }); + + if (cfg.editor.onkeyup) { + this.editor.find("input[type=text],textarea").unbind("keyup.AXGrid").bind("keyup.AXGrid", function (event) { + cfg.editor.onkeyup.call({ + list: _this.list, + item: item, + element: this + }, event, this); + }); + } + + /* form item bind AX */ + for (var r = 0; r < cfg.editor.rows.length; r++) { + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + var formID = ""; + if (CH.AXBind) { + formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + if (CH.AXBind.type == "number" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindNumber((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "money" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindMoney((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "selector" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindSelector((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "slider" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindSlider((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "slider" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindSlider((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "twinSlider" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindTwinSlider((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "date" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindDate((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "twinDate" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindTwinDate((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "dateTime" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindDateTime((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "switch" && CH.form.type == "text") { + /*axdom("#"+formID).unbindInput(); */ + axdom("#" + formID).bindSwitch((CH.AXBind.config || {})); + } else if (CH.AXBind.type == "select" && CH.form.type == "select") { + /*axdom("#"+formID).unbindSelect(); */ + axdom("#" + formID).bindSelect((CH.AXBind.config || {})); + } + } + if (CH.form) { + formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + if (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 + }); + }); + } + if (CH.form.onClick) { + axdom("#" + formID).bind("click", function () { + CH.form.onClick.call({ + key: CH.key, + position: CHidx, + value: axdom("#" + formID).val() + }); + }); + } + if (CH.form.onBlur) { + axdom("#" + formID).bind("blur", function () { + CH.form.onBlur.call({ + key: CH.key, + position: CHidx, + value: axdom("#" + formID).val() + }); + }); + } + if (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"); + var editorContentHeight = editorContent.height(); + var fixedEditorContentHeight = fixedEditorContent.height(); + if (editorContentHeight < fixedEditorContentHeight) { + editorContentHeight = fixedEditorContentHeight; + editorContent.find(".gridBodyTable").css({ height: editorContentHeight }); + } else { + fixedEditorContent.find(".gridFixedBodyTable").css({ height: editorContentHeight }); + } + + editorButtons.css({ top: editorContentHeight }); + var editorBoxHeight = editorContentHeight.number(); + + if (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 }); + + if(this.editorButtonPosition == "top"){ + if(insertIndex != undefined) this.editor.css({top: this.editor.position().top - editorContentHeight }); + else this.editor.css({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; + var formID = cfg.targetID + "_AX_" + obj.key + "_AX_" + obj.position.join("_AX_"); + if (!axf.getId(formID)) alert(formID + "로 Element를 찾을 수 없습니다."); + axdom("#" + formID).val(obj.value); + }, + focusEditorForm: function (key) { /* editor 활성화 된 폼의 특정 요소에 포커스 주기 */ + var cfg = this.config; + this.editor.find("input[type=text],textarea").each(function () { + if (this.name == key) { + this.focus(); + return false; + } + }); + }, + saveEditor: function () { + var cfg = this.config; + + var editorFormItem = {}; + if (this.editorItemIndex == null) { + editorFormItem.requestType = "new"; + } else { + editorFormItem.requestType = "edit"; + } + + var setEditorFormItemValue = function (k, v, type) { + if (editorFormItem[k]) { + if (type == "checkbox") { + if (Object.isArray(editorFormItem[k])) { + editorFormItem[k].push(v); + } else { + editorFormItem[k] = [editorFormItem[k]]; + editorFormItem[k].push(v); + } + } else { + editorFormItem[k] = v; + } + } else { + editorFormItem[k] = v; + } + }; + + for (var r = 0; r < cfg.editor.rows.length; r++) { + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.form) { + var formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + if (CH.form.type == "radio") { + var checkedValue = []; + axf.each(CH.form.options, function (oidx, opt) { + var opt_formID = formID + "_AX_" + oidx; + if (axdom("#" + opt_formID).get(0).checked) setEditorFormItemValue(CH.key, axdom("#" + opt_formID).val(), "radio"); + //editorFormItem.push(CH.key + "=" + axdom("#" + opt_formID).val().enc()); + }); + } else if (CH.form.type == "checkbox") { + var checkedValue = []; + axf.each(CH.form.options, function (oidx, opt) { + var opt_formID = formID + "_AX_" + oidx; + if (axdom("#" + opt_formID).get(0).checked) setEditorFormItemValue(CH.key, axdom("#" + opt_formID).val(), "checkbox"); + else setEditorFormItemValue(CH.key, "", "checkbox"); + }); + } else if (CH.form.type == "select") { + if (CH.form.value == "itemText") { + setEditorFormItemValue(CH.key, axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text, "select"); + } else { + setEditorFormItemValue(CH.key, axdom("#" + formID).val(), "select"); + } + } else { + setEditorFormItemValue(CH.key, axdom("#" + formID).val(), "text"); + } + } else { + var formID = cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + if (axf.getId(formID)) { + setEditorFormItemValue(CH.key, axdom("#" + formID).val(), "text"); + } + } + }); + } + + /* form validate -- s */ + var validate = function (formID, CH) { + var checkedValues = []; + var value; + + if (CH.form.type == "radio") { + axf.each(CH.form.options, function (oidx, opt) { + var opt_formID = formID + "_AX_" + oidx; + if (axdom("#" + opt_formID).get(0).checked) checkedValues.push(axdom("#" + opt_formID).val()); + }); + value = checkedValue.join(","); + } else if (CH.form.type == "checkbox") { + axf.each(CH.form.options, function (oidx, opt) { + var opt_formID = formID + "_AX_" + oidx; + if (axdom("#" + opt_formID).get(0).checked) checkedValues.push(axdom("#" + opt_formID).val()); + else checkedValues.push(CH.key + "="); + }); + value = checkedValue.join(","); + } else if (CH.form.type == "select") { + if (CH.form.value == "itemText") { + value = axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text; + } else { + value = axdom("#" + formID).val(); + } + } else { + value = axdom("#" + formID).val().trim(); + } + var sendObj = { + formID: formID, + value: value, + checkedValues: checkedValues, + form: CH.form + }; + return CH.form.validate.call(sendObj, formID, value); + }; + + var validateError = false; + for (var r = 0; r < cfg.editor.rows.length; r++) { + /*trace(cfg.editor.rows[r]);*/ + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.form) { + if (CH.form.validate) { + var formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + var result = validate(formID, CH); + if (!result) { + validateError = true; + axdom("#" + formID).focus(); + } + } + } + }); + } + + if (validateError) { + return; + } + /* form validate -- e */ + + if (cfg.editor.request) { + this.unbindAXbind(); + + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + this.editor.html(po.join('')); + + var saveEditorRequest = this.saveEditorRequest.bind(this); + var cancelEditor = this.cancelEditor.bind(this); + var url = cfg.editor.request.ajaxUrl; + var 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('&'); + + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + saveEditorRequest(res); + } else { + toast.push({ body: res.msg.dec(), type: "Caution" }); + cancelEditor(); + } + } + }); + + return true; + + } else { + + /* + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + this.editor.append(po.join('')); + */ + + // -------------- editor response 에서 return false 가 오는 상황을 고려 하면 사용 + //this.editor.hide(); + //this.editorOpend = false; + + var saveEditorRequest = this.saveEditorRequest.bind(this); + var cancelEditor = this.cancelEditor.bind(this); + saveEditorRequest({ item: editorFormItem }); + + } + }, + + saveEditorRequest: function (res) { + var cfg = this.config; + + if (this.editorOpend) { + /*this.editorItemIndex */ + /* this.list[n] 에 서버로 부터 받은 값 덮어쓰기 */ + if (cfg.editor.response) { /* */ + + var sendObj = { + res: res, + index: this.editorItemIndex, + insertIndex: this.editorInsertIndex, + list: this.list, + page: this.page + }; + var callResult = cfg.editor.response.call(sendObj, this.editorItemIndex); + + /* + // -------------- editor response 에서 return false 가 오는 상황을 고려 하면 사용 + if(callResult === true){ + this.editorOpend = false; + this.unbindAXbind(); + }else{ + this.editor.show(); + this.editorOpend = true; + } + */ + + } else { + + this.unbindAXbind(); + if (this.editorItemIndex != null && this.editorItemIndex != undefined) { + AXUtil.overwriteObject(this.list[this.editorItemIndex], res.item, true); + this.updateList(this.editorItemIndex, this.list[this.editorItemIndex]); + } else if (this.editorInsertIndex != null && this.editorInsertIndex != undefined) { + this.pushList(res.item, this.editorInsertIndex); + } else { + this.pushList(res.item); + } + this.editorItemIndex = null; + this.editorInsertIndex = null; + this.editor.hide(); + this.editorOpend = false; + } + + } + }, + cancelEditor: function () { + this.editor.hide(); + this.editorOpend = false; + this.unbindAXbind(); + }, + unbindAXbind: function () { + var cfg = this.config; + /* form item bind AX */ + + try { + for (var r = 0; r < cfg.editor.rows.length; r++) { + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (CH.AXBind) { + var formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + r + "_AX_" + CHidx; + /*trace(formID); */ + if (CH.AXBind.type == "number" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "money" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "selector" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "slider" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "twinSlider" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "date" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "twinDate" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "dateTime" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "switch" && CH.form.type == "text") { + axdom("#" + formID).unbindInput(); + } else if (CH.AXBind.type == "select" && CH.form.type == "select") { + axdom("#" + formID).unbindSelect(); + } + } + } + }); + } + } catch (e) { + trace(e); + } + }, + appendList: function (item, insertIndex) { + this.setEditor(item, null, insertIndex); + }, + /* editor 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + setMobileTool: function () { + var cfg = this.config, _this = this; + + var toolGroupTop = axdom("#" + cfg.targetID + "_AX_gridToolGroupTop"); + var toolGroupBottom = axdom("#" + cfg.targetID + "_AX_gridToolGroupBottom"); + + var po = []; + po.push(''); + po.push('congif'); + if (cfg.page) { + if (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'); + if (cfg.page) { + if (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(); + var pageNo = this.page.pageNo.number(); + + if (cfg.page) { + if (cfg.page.paging) { + if (pgCount == 0) { + 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); + var mySelectBottom = axf.getId(cfg.targetID + "_AX_gridToolBottomPageNo"); + for (var p = 1; p < pgCount + 1; p++) { + mySelect.options[p] = new Option(p, p.money()); + mySelectBottom.options[p] = new Option(p, p.money()); + if (pageNo == p) { + mySelect.options[p].selected = true; + mySelectBottom.options[p].selected = true; + } + } + } + + axdom("#" + cfg.targetID + "_AX_gridToolTopPageNo").bind("change", this.onPageChange.bind(this)); + axdom("#" + cfg.targetID + "_AX_gridToolBottomPageNo").bind("change", this.onPageChange.bind(this)); + + /* page event bind */ + + var goPageMove = this.goPageMove.bind(this); + toolGroupTop.find(".tool-prevPage").bind("click", function (event) { + goPageMove(-1); + }); + toolGroupBottom.find(".tool-prevPage").bind("click", function (event) { + goPageMove(-1); + }); + toolGroupTop.find(".tool-nextPage").bind("click", function (event) { + goPageMove(1); + }); + toolGroupBottom.find(".tool-nextPage").bind("click", function (event) { + goPageMove(1); + }); + + /* page event bind */ + + } + + 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 (cfg.viewMode == "mobile") { + this.setMobileTool(); + return; + }else{ + axdom("#" + cfg.targetID + "_AX_gridToolGroupTop").empty(); + axdom("#" + cfg.targetID + "_AX_gridToolGroupBottom").empty(); + } + /* apply page vars */ + var pageNos = axf.getId(cfg.targetID + "_AX_gridPageNo"); + var pgCount = this.page.pageCount.number(); + var pageNo = this.page.pageNo.number(); + + if (pgCount == 0) { + 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 > 1000) { + var oi = 0; + var pageStart = 1; + var pageEnd = pageNo + 49; + if (pageNo > 50) pageStart = pageNo - 50; + if (pageEnd > pgCount) pageEnd = pgCount; + for (var p = pageStart; p < pageEnd + 1; p++) { + mySelect.options[oi] = new Option(p, p.money()); + if (pageNo == p) mySelect.options[oi].selected = true; + oi++; + } + } else { + for (var p = 1; p < pgCount + 1; p++) { + mySelect.options[p] = new Option(p, p.money()); + if (pageNo == p) mySelect.options[p].selected = true; + } + } + /*alert(axf.getId(cfg.targetID + "_AX_gridPageNo").options[axf.getId(cfg.targetID + "_AX_gridPageNo").options.selectedIndex].value); */ + } + 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())); + + + if (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 (arg) { + onPageChange(); + } + }); + } + }, + goPageMove: function (pageAdd) { + var cfg = this.config; + var pgCount = this.page.pageCount.number(); + var pageNo = this.page.pageNo.number(); + + if (pageNo + pageAdd < 1) pageNo = 1; + else if (pageNo + pageAdd > pgCount) pageNo = pgCount; + else pageNo += pageAdd; + + if (cfg.viewMode == "mobile") { + axdom("#" + cfg.targetID + "_AX_gridToolTopPageNo").val(pageNo); + axdom("#" + cfg.targetID + "_AX_gridToolBottomPageNo").val(pageNo); + this.onPageChange(); + } else { + axdom("#" + cfg.targetID + "_AX_gridPageNo").setValueSelect(pageNo); + } + /*this.page.pageNo = pageNo; */ + /*this.onPageChange(); bindSelectSetValue 시 자동 호출되는 구조 */ + }, + onPageChange: function (e) { + var cfg = this.config; + var pgCount, pageNo, npageNo; + pgCount = this.page.pageCount.number(); + pageNo = this.page.pageNo.number(); + + if (cfg.viewMode == "mobile") { + npageNo = (e) ? e.target.value : axdom("#" + cfg.targetID + "_AX_gridToolTopPageNo").val(); + } else { + npageNo = axdom("#" + cfg.targetID + "_AX_gridPageNo").val(); + } + this.page.pageNo = npageNo; + + if(this.page.onchange){ + this.page.onchange.call(this.page, npageNo); + }else{ + + /*스크롤 위치 변경 */ + if (cfg.viewMode != "mobile") { + var scrollTop = 0; + this.scrollContent.css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + + if (this.pageActive && this.ajaxInfo) { + this.setList(this.ajaxInfo, null, null, "paging"); + this.contentScrollResize(); + } + } else { + if (this.pageActive && this.ajaxInfo) { + this.setList(this.ajaxInfo, null, null, "paging"); + } + } + } + }, + setStatus: function (listLength) { + var cfg = this.config; + var page; + if (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 cfg = this.config; + var sortObj = this.nowSortHeadObj; + if (sortObj) { + if (ty == "one") { + return "sortBy=" + sortObj.key + " " + sortObj.sort; + } else { + return axdom.param({ sortKey: sortObj.key, sortWay: sortObj.sort }); + } + } else { + return ""; + } + }, + getExcelColHeadTd: function (arg) { + var cfg = this.config; + var po = []; + + if (arg.formatter == "html" || arg.formatter == "checkbox") { + if (!arg.displayLabel) { + colHeadTdText = " colHeadTdHtml"; + toolUse = false; + if (arg.formatter == "checkbox") { + colHeadTdText = " colHeadTdCheck"; + arg.tdHtml = ""; + } + } + } + + po.push(""); + po.push(arg.tdHtml); + po.push(""); + + return po.join(''); + }, + getExcelItem: function (itemIndex, item) { + var cfg = this.config; + var tpo = []; + var evenClassName = "line" + (itemIndex % 2); + var getFormatterValue = this.getFormatterValue.bind(this); + var getTooltipValue = this.getTooltipValue.bind(this); + var trAddClass = ""; + + for (var r = 0; r < cfg.body.rows.length; r++) { + + tpo.push(""); + var colCount = 0; + axf.each(cfg.body.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + colCount += CH.colspan; + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + + var bodyNodeClass = ""; + + var tooltipValue = ""; + if (CH.tooltip) { + tooltipValue = getTooltipValue(CH.tooltip, item, itemIndex, item[CH.key], CH.key, CH); + } + + tpo.push(""); + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH)); + } else { + tpo.push(item[CH.key]); + } + tpo.push(""); + } + }); + tpo.push(""); + } + return tpo.join(''); + }, + getExcelItemMarker: function (itemIndex, item, isfix) { + var cfg = this.config; + var tpo = []; + var evenClassName = "gridBodyMarker"; + var getFormatterValue = this.getFormatterValue.bind(this); + + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + var isLastTR = (cfg.body.marker.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + axf.each(cfg.body.marker.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + + tpo.push(""); + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH)); + } else { + tpo.push(item[CH.key]); + } + tpo.push(""); + + } + }); + tpo.push(""); + } + return tpo.join(''); + }, + getExcelHeadDataSet: function (dataSet, isfix) { + var cfg = this.config; + if (dataSet == undefined) return; + var tpo = []; + var getDataSetFormatterValue = this.getDataSetFormatterValue.bind(this); + /*dataSet 빈 Key 채우기 */ + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + /*dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ */ + + for (var r = 0; r < cfg.head.rows.length; r++) { + var isLastTR = (cfg.head.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.head.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + tpo.push(""); + } + }); + tpo.push(""); + } + return tpo.join(''); + }, + getExcelFootDataSet: function (dataSet, isfix) { + var cfg = this.config; + if (dataSet == undefined) return; + var tpo = []; + var getDataSetFormatterValue = this.getDataSetFormatterValue.bind(this); + /*dataSet 빈 Key 채우기 */ + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + /*dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ */ + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.foot.rows.length; r++) { + var isLastTR = (cfg.foot.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.foot.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + colCount += CH.colspan; + + /*radio, check exception */ + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox" || CH.formatter == "radio") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + tpo.push(""); + } + }); + tpo.push(""); + } + return tpo.join(''); + }, + getExcelFormat: function (format) { + var cfg = this.config; + var getExcelColHeadTd = this.getExcelColHeadTd.bind(this); + + var bodyHasMarker = this.bodyHasMarker; + var getExcelItem = this.getExcelItem.bind(this); + var getExcelItemMarker = this.getExcelItemMarker.bind(this); + var getMarkerDisplay = this.getMarkerDisplay.bind(this); + var getHeadDataSet = this.getExcelHeadDataSet.bind(this); + var getFootDataSet = this.getExcelFootDataSet.bind(this); + + var po = []; + + if (format == "html") { + + po.push(""); + po.push(" "); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + po.push(""); + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var 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(""); + } + po.push(" "); + po.push(" "); + + if (cfg.head) po.push(getHeadDataSet(this.dataSet)); + + axf.each(this.list, function (itemIndex, item) { + po.push(getExcelItem(itemIndex, item)); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getExcelItemMarker(itemIndex, item)); + } + }); + + if (cfg.foot) po.push(getFootDataSet(this.dataSet)); + + po.push(" "); + po.push("
"); + + return po.join(''); + + } else if (format == "json") { + return { + colGroup: cfg.colGroup, + list: this.list + } + } + + }, + + /** + * 그리드의 뷰모드를 체인지 합니다. + * change viewMode + * + * @name AXGrid.changeGridView + * @description + * + '''js + myGrid.changeGridView({ + viewMode:"grid" + }); + myGrid.changeGridView({ + viewMode:"icon", + view: { + width:"200", // icon width + height:"300", // icon height + img: {left:"10", top:"10", width:"179", height:"180",style:"border:1px solid #ccc;"}, + label:{left:"10", top:"200", width:"180", height:"20"}, + description: {left:"10", top:"225", width:"180", height:"65", style:"color:#888;"}, + buttons: { + left:"5", top:"5", width:"180", height:"20", style:"", + items:[ + {label:"but1", style:"", addClass:"AXButton Green", onclick:function(){ + fnObj.otherFunction(this); + }}, + {label:"but2", style:"", addClass:"AXButton", onclick:function(){ + fnObj.otherFunction(this); + }} + ] + }, + format: function(){ + return { + imgsrc : this.item.img, + label : this.item.title, + description : this.item.writer+", "+this.item.no+" / " + (this.item.desc || "") + } + } + } + }); + myGrid.changeGridView({ + viewMode:"mobile" + }); + * + */ + changeGridView: function (JSObject) { + var cfg = this.config; + + if (cfg.viewMode != JSObject.viewMode) { + cfg.viewMode = JSObject.viewMode; + if (JSObject.viewMode == "icon") { + if (JSObject.view) cfg.view = JSObject.view; + this.redrawGrid("changeGridView"); + } else if (JSObject.viewMode == "grid") { + //if(JSObject.view) cfg.view = JSObject.view; + this.redrawGrid("changeGridView"); + } else if (JSObject.viewMode == "mobile") { + if (JSObject.view) cfg.view = JSObject.view; + this.redrawGrid("changeGridView"); + + } + } + }, + /** + * 모바일 툴바가 클릭되었을 때 이벤트 함수 + * p[en mobile tool + * + * @name AXGrid.openMobileConfig + * + */ + openMobileConfig: function (event) { + var cfg = this.config, _this = this; + //trace(cfg.view.column); + + var mobileView = cfg.view; + if (mobileView == undefined) { + var columns = []; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + var col = null, addClass = ""; + if (CG.widthAstric || CG.width.number() >= 200) { + col = 4; + addClass = "underLine"; + } else if (CG.width.number() >= 100) { + col = 2; + } else if (CG.width.number() >= 40) { + //col = 1; + } + columns.push( + {key: CG.key, label: CG.label, col: col, formatter: CG.formatter, addClass: addClass, sort: (CG.sort || ""), display: (CG.display || true)} + ); + } + columns = columns.sort(function (pItem, nItem) { + var v1 = pItem.col; + var v2 = nItem.col; + if (v1 < v2) return 1; + else if (v1 > v2) return -1; + else if (v1 == v2) return 0; + }); + mobileView = { + labelView: true, + column: columns + }; + cfg.view = mobileView; + } + + for (var CN, cidx = 0, __arr = mobileView.column; (cidx < __arr.length && (CN = __arr[cidx])); cidx++) { + if (CN.display == undefined || CN.display == true) { + CN.display = true; + CN.checked = true; + } + } + + 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", // [checkbox|radio] + sortbox: true, + 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 () { // 정렬이 변경 된 경우 호출 됩니다. + //trace(this.sortMenu); + _this.list = _this.sortList(this.sortMenu.sort, this.sortMenu, _this.list); + _this.printList(); + + return true;// 메뉴 창이 닫히지 않게 합니다. + } + }); + AXContextMenu.open({id: cfg.targetID + "myContextMenu"}, event); + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +jQuery.fn.loadHtmlElement = function(arg) { + if(arg == undefined) arg = {} + var varObj = new AXHtmlElement(); + arg.target = this.get(0).id; + varObj.setConfig(arg); + return 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 = false; + this.config.firstChecked = true; + }, + init: function() { + var config = this.config; + + if (config.loadUrl) { + var url = config.loadUrl; + var qs = config.loadPars; + var pars = qs; + var onLoad = this.onLoad.bind(this); + new AXReq(url, { pars: pars, onsucc: function(res) { + if (res.result == "00") { + onLoad(res); + } else { + alert(res.msg.dec()); + } + } + }); + } else if (config.options) { + this.onLoad({ ds: config.options }); + } + }, + onLoad: function(res) { + var config = this.config; + if (config.displayType == "select") { + // firstItemName 추가했음 by raniel, 2013-04-30 + 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)); + } + if (config.displayType == "radio") { + this.setInputOption( + { tg: jQuery("#" + config.target), ds: res.ds }, config.defaultValue + ); + } + if (config.displayType == "checkbox") { + this.setInputOption( + { tg: jQuery("#" + config.target), ds: res.ds }, config.defaultValue + ); + } + }, + setSelectOption: function (obj, selectValue, firstEmpty, firstEmptyItemName) { + var config = this.config; + + /* + for (var a = obj.tg.length - 1; a > -1; a--) { + //obj.tg.options[a] = null; + alert(a); + } + */ + try{ + obj.tg.innerHTML = ""; + }catch(e){ + return; + } + + + if (firstEmpty) { + var opts = document.createElement('option'); + opts.value = ""; + if (firstEmptyItemName) { + opts.text = firstEmptyItemName; + } else { + opts.text = "모두"; + } + 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 ( this.value != null ) { + var opts = document.createElement('option'); + opts.value = this.value.dec(); + opts.innerText = this.text.dec(); + if (selectValue != undefined) if (selectValue == this.value.dec()) opts.selected = true; + oGroup.appendChild(opts); + } + }); + + obj.tg.appendChild(oGroup); + + } else { + + var opts = document.createElement('option'); + opts.value = n.value.dec(); + opts.innerText = n.text.dec(); + if (selectValue != undefined) if (selectValue == n.value.dec()) opts.selected = true; + 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 = []; + var robj = { value: "", text: "" }; + this.ids = obj.ds; + jQuery.each(obj.ds, function(index, n) { + //alert(Object.toJSON(n)); + + if (config.title) { + po.push(""); + + 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; + if (config.onLoad) { + config.onLoad({ + target: config.target, + value: obj.value, + text: obj.text + }); + } + }, + onchange: function(event) { + var tg = event.target; + var config = this.config; + if (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; + var config = this.config; + + var myText = ""; + jQuery.each(this.ids, function(idx, D) { + if (D.value.dec() == tg.value) { + myText = D.text.dec(); + } + }); + + if (config.onChange) { + config.onChange({ + target: config.target, + value: tg.value, + text: myText + }); + } + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +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 = []; + 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 () { + if (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"; + if (AXConfig.AXInput) { + errorPrintType = (AXConfig.AXInput.errorPrintType || "toast"); + } + if (errorPrintType == "toast") toast.push(msg); + else if (errorPrintType == "dialog") dialog.push(msg); + else if (errorPrintType == "alert") AXUtil.alert(msg); + }, + bindSetConfig: function (objID, configs) { + var findIndex = null; + axf.each(this.objects, function (index, O) { + if (O.id == objID) { + findIndex = index; + return false; + } + }); + if (findIndex == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } else { + 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) { + trace("bind 대상 ID가 없어 bind 처리할 수 없습니다."); + return; + } + if (!AXgetId(obj.id)) { + trace("bind 대상이 없어 bind 처리할 수 없습니다."); + return; + } + + var objID = obj.id; + var objSeq = null; + + axf.each(this.objects, function (idx, O) { + //if (this.id == objID && this.isDel == true) objSeq = idx; + if (this.id == objID) { + objSeq = idx; + return false; + } + }); + + if (obj.href == undefined) obj.href = cfg.href; + + if (objSeq == null) { + objSeq = this.objects.length; + this.objects.push({ id: objID, anchorID: cfg.targetID + "_AX_" + objID, config: obj, bindType: obj.bindType }); + } else { + this.objects[objSeq].isDel = undefined; + this.objects[objSeq].config = obj; + } + + this.appendAnchor(objID, objSeq, obj.bindType); + + if (obj.bindType == "placeHolder") { + this.bindPlaceHolder(objID, objSeq); + } else if (obj.bindType == "search") { + this.bindSearch(objID, objSeq); + } else if (obj.bindType == "number") { + this.bindNumber(objID, objSeq); + } else if (obj.bindType == "money") { + this.bindMoney(objID, objSeq); + } else if (obj.bindType == "selector") { + this.bindSelector(objID, objSeq); + } else if (obj.bindType == "slider") { + this.bindSlider(objID, objSeq); + } else if (obj.bindType == "twinSlider") { + this.bindTwinSlider(objID, objSeq); + } else if (obj.bindType == "switch") { + this.bindSwitch(objID, objSeq); + } else if (obj.bindType == "segment") { + this.bindSegment(objID, objSeq); + } else if (obj.bindType == "date") { + this.bindDate(objID, objSeq); + } else if (obj.bindType == "twinDate") { + this.bindTwinDate(objID, objSeq); + } else if (obj.bindType == "twinDateTime") { + this.bindTwinDate(objID, objSeq, "time"); + } + }, + unbind: function (obj) { + var cfg = this.config; + var removeAnchorId; + var removeIdx; + axf.each(this.objects, function (idx, O) { + if (O.id != obj.id) { + // collect.push(this); + } else { + if (O.isDel != true) { + removeAnchorId = this.anchorID; + removeIdx = idx; + } + } + }); + + if (removeAnchorId) { + this.objects[removeIdx].isDel = true; + axdom("#" + obj.id).removeAttr("data-axbind"); + axdom("#" + removeAnchorId).remove(); + var objID = obj.id; + var obj = this.objects[removeIdx]; + if (obj.documentclickEvent) axdom(document).unbind("click.AXInput", obj.documentclickEvent); + axdom("#" + objID).unbind("keydown.AXInput"); + axdom("#" + objID).unbind("keydown.AXInputCheck"); + + axdom("#" + objID).unbind("change.AXInput"); + + if (obj.bindSliderMouseMove) axdom(document.body).unbind("mousemove.AXInput", obj.bindSliderMouseMove); + if (obj.bindSliderMouseUp) axdom(document.body).unbind("mouseup.AXInput", obj.bindSliderMouseUp); + if (obj.bindSliderTouchMove) document.removeEventListener("touchmove.AXInput", obj.bindSliderTouchMove, false); + if (obj.bindSliderTouchEnd) document.removeEventListener("touchend.AXInput", obj.bindSliderTouchEnd, false); + if (obj.bindTwinSliderMouseMove) axdom(document.body).unbind("mousemove.AXInput", obj.bindTwinSliderMouseMove); + if (obj.bindTwinSliderMouseUp) axdom(document.body).unbind("mouseup.AXInput", obj.bindTwinSliderMouseUp); + + if (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; + var obj = this.objects[objSeq]; + //trace("appendAnchor"); + axdom("#" + cfg.targetID + "_AX_" + objID).remove(); + var anchorNode = axdom("
"); + var iobj = axdom("#" + objID); + iobj.attr("data-axbind", bindType); + iobj.after(anchorNode); + + obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + obj.bindTarget = iobj; + + //var offSetParent = iobj.offsetParent(); + var iobjPosition = iobj.position(); + var l = iobjPosition.left, t = iobjPosition.top, w = 0, h = 0; + + var borderW = iobj.css("border-left-width").number(); + var borderH = iobj.css("border-top-width").number(); + var marginW = iobj.css("margin-left").number(); + var marginH = iobj.css("margin-top").number(); + l = l + marginW; + /*t = t;*/ + w = iobj.outerWidth(); + h = iobj.outerHeight(); + + var css = { left: l, top: t, width: w, height: 0 }; + //trace(css); + 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; + var obj = this.objects[objSeq]; + + if (!AXgetId(objID)) return; /* 엘리먼트 존재 여부 확인 */ + + var iobjPosition = obj.bindTarget.position(); + var l = iobjPosition.left, t = iobjPosition.top; + var w = obj.bindTarget.outerWidth(); + var h = obj.bindTarget.outerHeight(); + if (obj.bindTarget.css("display") == "none") { + h = obj.bindAnchorTarget.data("height"); + var css = { width: w }; + } else { + var css = { left: l, top: t, width: w, height: 0 }; + } + //trace(css); + obj.bindAnchorTarget.css(css); + obj.bindAnchorTarget.data("height", h); + + if (obj.bindType == "placeHolder") { + + } else if (obj.bindType == "search") { + + } else if (obj.bindType == "number") { + var UPh = parseInt((h - 2) / 2) - 1; + var DNh = parseInt((h - 2) / 2) - 2; + var handleWidth = h - 2; + if (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 }); + //trace({top:(UPh+1), width:h, height:DNh}); + } else if (obj.bindType == "money") { + + } else if (obj.bindType == "selector") { + 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 }); + + if (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 (obj.bindType == "slider") { + + } else if (obj.bindType == "twinSlider") { + + } else if (obj.bindType == "switch") { + 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 (obj.bindType == "segment") { + 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(); + var 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 (obj.bindType == "date") { + var handleWidth = h - 2; + if (handleWidth > 20) handleWidth = 20; + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").css({ width: h, height: h }); + } else if (obj.bindType == "twinDate") { + + } else if (obj.bindType == "twinDateTime") { + + } + }, + bindSetValue: function (objID, value) { + var cfg = this.config; + var objSeq = null; + axf.each(this.objects, function (index, O) { + if (O.id == objID) { + objSeq = index; + return false; + } + }); + if (objSeq == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } else { + var obj = this.objects[objSeq]; + + if (obj.bindType == "search") { + // this.bindSearch(objID, objSeq); + } else if (obj.bindType == "number") { + // this.bindNumber(objID, objSeq); + } else if (obj.bindType == "money") { + // this.bindMoney(objID, objSeq); + } else if (obj.bindType == "selector") { + this.bindSelectorSetValue(objID, objSeq, value); + } else if (obj.bindType == "slider") { + this.bindSliderSetValue(objID, objSeq, value); + } else if (obj.bindType == "twinSlider") { + this.bindTwinSliderSetValue(objID, objSeq, value); + } else if (obj.bindType == "switch") { + this.bindSwitchSetValue(objID, objSeq, value); + } else if (obj.bindType == "segment") { + this.bindSegmentSetValue(objID, objSeq, value); + } else if (obj.bindType == "date") { + // this.bindDate(objID, objSeq); + } else if (obj.bindType == "twinDate") { + // this.bindTwinDate(objID, objSeq); + } + } + }, + /* onlyHolder ~~~~~~~~~~~~~~~ */ + bindPlaceHolder: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + // 브라우저 체크 + if (AXUtil.browser.name != "ie") return; + if (AXUtil.browser.name == "ie" && AXUtil.browser.version > 9) return; + + var w = axdom("#" + cfg.targetID + "_AX_" + objID).width(); + var h = axdom("#" + cfg.targetID + "_AX_" + objID).data("height"); + + var placeholder = axdom("#" + objID).attr("placeholder"); + if (placeholder == "undefined") placeholder = ""; + + var po = ["" + placeholder + ""]; + //append to anchor + axdom("#" + cfg.targetID + "_AX_" + objID).append(po.join('')); + //bind handle + 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).val(""); + axdom("#" + objID).focus(); + bindPlaceHolderKeyup(objID, objSeq); + }); + //------------------------------------ + }, + bindPlaceHolderSyncAnchor: function (objID, objSeq) { + var cfg = this.config; + if (axdom("#" + objID).val().trim() == "") { + //if(AXgetId(cfg.targetID+"_AX_"+objID).style.display == "none") + axdom("#" + cfg.targetID + "_AX_" + objID).show(); + } else { + //if(AXgetId(cfg.targetID+"_AX_"+objID).style.display != "none") + axdom("#" + cfg.targetID + "_AX_" + objID).hide(); + } + }, + /* onlyHolder ~~~~~~~~~~~~~~~ */ + + /* search ~~~~~~~~~~~~~~~ */ + bindSearch: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var w = axdom("#" + cfg.targetID + "_AX_" + objID).width(); + var h = axdom("#" + cfg.targetID + "_AX_" + objID).data("height"); + var placeholder = axdom("#" + objID).attr("placeholder"); + if (placeholder == undefined) placeholder = ""; + var po = []; + + if (AXUtil.browser.name == "ie" && AXUtil.browser.version < 10 && placeholder != "") { + po.push("" + placeholder + ""); + } + po.push("Search"); + //append to anchor + axdom("#" + cfg.targetID + "_AX_" + objID).append(po.join('')); + //bind handle + 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, objSeq) { + var cfg = this.config; + axdom("#" + cfg.targetID + "_AX_" + objID).show(); + + if (axdom("#" + objID).val() == "") { + //if(AXgetId(cfg.targetID+"_AX_"+objID).style.display != "none") axdom("#"+cfg.targetID+"_AX_"+objID).hide(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Search").hide(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_PlaceHolder").show(); + } else { + //if(AXgetId(cfg.targetID+"_AX_"+objID).style.display == "none") axdom("#"+cfg.targetID+"_AX_"+objID).fadeIn(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Search").show(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_PlaceHolder").hide(); + } + }, + /* number ~~~~~~~~~~~~~~~ */ + bindNumber: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + obj.bindTarget = axdom("#" + objID); + + var h = obj.bindAnchorTarget.data("height"); + //trace(objID+"//"+h); + var po = []; + var UPh = parseInt((h - 2) / 2) - 1; + var DNh = parseInt((h - 2) / 2) - 2; + //trace(UPh+"//"+DNh); + var handleWidth = h - 2; + if (handleWidth > 20) handleWidth = 20; + + po.push("
"); + po.push(" increase"); + po.push(" decrease"); + po.push("
"); + obj.bindAnchorTarget.append(po.join('')); + obj.bindAnchorTarget.show(); + //alert("show"); + + var bindNumberAdd = this.bindNumberAdd.bind(this); + var 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) { + if (event.keyCode == AXUtil.Event.KEY_UP) bindNumberAdd(objID, 1, objSeq); + else if (event.keyCode == AXUtil.Event.KEY_DOWN) bindNumberAdd(objID, -1, objSeq); + }); + obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput", function (event) { + bindNumberCheck(objID, objSeq); + }); + }, + bindNumberAdd: function (objID, adder, objSeq) { + var obj = this.objects[objSeq]; + var maxval = obj.config.max; + var minval = obj.config.min; + var nval = axdom("#" + objID).val().number(); + if (adder > 0) { + //max 를 초과 하는지 확인 + if ((nval + adder) < minval) nval = minval; + if (maxval != undefined && maxval != null) { + if ((nval + adder) > maxval) return; + } + } else { + //min 를 초과 하는지 확인 + if (minval != undefined && minval != null) { + if ((nval + adder) < minval) return; + } + } + axdom("#" + objID).val(nval + adder); + }, + bindNumberCheck: function (objID, objSeq) { + var obj = this.objects[objSeq]; + var maxval = obj.config.max; + var minval = obj.config.min; + var nval; + if (axdom("#" + objID).val() == "") { + if (minval != undefined && minval != null) { + nval = minval; + } else { + nval = axdom("#" + objID).val().number(); + } + } else { + nval = axdom("#" + objID).val().number(); + } + + if (maxval != undefined && maxval != null) { + if ((nval) > maxval) { + axdom("#" + objID).val(""); + try { + this.msgAlert("설정된 최대값을 넘어서는 입력입니다."); + } catch (e) { } + } else { + if (minval != undefined && minval != null) { + if ((nval) < minval) { + axdom("#" + objID).val(""); + try { + this.msgAlert("설정된 최소값보다 작은 입력입니다."); + } catch (e) { } + } else { + axdom("#" + objID).val(nval); + } + } + } + } else { + if (minval != undefined && minval != null) { + if ((nval) < minval) { + axdom("#" + objID).val(""); + try { + this.msgAlert("설정된 최소값보다 작은 입력입니다."); + } catch (e) { } + } + } else { + axdom("#" + objID).val(nval); + } + } + + if (obj.config.onChange) { + obj.config.onChange.call({ objID: objID, objSeq: objSeq, value: axdom("#" + objID).val() }); + } + if (obj.config.onchange) { + obj.config.onchange.call({ objID: objID, objSeq: objSeq, value: axdom("#" + objID).val() }); + } + }, + /* money ~~~~~~~~~~~~~~~ */ + bindMoney: function (objID, objSeq) { + var obj = this.objects[objSeq]; + obj.bindTarget.css({ "text-align": "right" }); + var bindMoneyCheck = this.bindMoneyCheck.bind(this); + var val = obj.bindTarget.val().trim(); + if (val != "") val = obj.bindTarget.val().number().money() + obj.bindTarget.val(val); + obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput", function (event) { + + var elem = obj.bindTarget.get(0); + var elemFocusPosition; + if ('selectionStart' in elem) { + // Standard-compliant browsers + elemFocusPosition = elem.selectionStart; + } else if (document.selection) { + // IE + //elem.focus(); + var sel = document.selection.createRange(); + var selLen = document.selection.createRange().text.length; + sel.moveStart('character', -elem.value.length); + elemFocusPosition = sel.text.length - selLen; + } + //trace(elemFocusPosition); + + // 계산된 포커스 위치 앞에 쉼표 갯수를 구합니다. + + obj.bindTarget.data("focusPosition", elemFocusPosition); + obj.bindTarget.data("prevLen", elem.value.length); + + var event = window.event || e; + // ignore tab & shift key 스킵 & ctrl + if (!event.keyCode || event.keyCode == 9 || event.keyCode == 16 || event.keyCode == 17) return; + if (event.ctrlKey && event.keyCode == 65) return; + if (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"); + } else if (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 (event) { + bindMoneyCheck(objID, objSeq, "change"); + }); + }, + bindMoneyCheck: function (objID, objSeq, eventType) { + var obj = this.objects[objSeq]; + var maxval = obj.config.max; + var minval = obj.config.min; + var nval; + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + + if (obj.bindTarget.val() == "") { + if (minval != undefined && minval != null) { + nval = minval; + } else { + nval = obj.bindTarget.val().number(); + } + } else { + nval = obj.bindTarget.val().number(); + } + if (maxval != undefined && maxval != null) { + if ((nval) > maxval) { + obj.bindTarget.val(maxval.money()); + try { + this.msgAlert("설정된 최대값{" + maxval.number().money() + "} 을 넘어서는 입력입니다."); + } catch (e) { } + } else { + if (minval != undefined && minval != null && eventType == "change") { + if ((nval) < minval) { + obj.bindTarget.val(minval.money()); + try { + this.msgAlert("설정된 최소값{" + minval.number().money() + "}보다 작은 입력입니다."); + } catch (e) { } + } else { + obj.bindTarget.val(nval.money()); + } + } + } + } else { + if (minval != undefined && minval != null && eventType == "change") { + if ((nval) < minval) { + obj.bindTarget.val(minval.money()); + try { + this.msgAlert("설정된 최소값{" + minval.number().money() + "}보다 작은 입력입니다."); + } catch (e) { } + } + } else { + obj.bindTarget.val(nval.money()); + } + } + + if( !axf.isEmpty( obj.bindTarget.data("focusPosition") ) ){ + obj.bindTarget.setCaret( obj.bindTarget.data("focusPosition").number() + ( obj.bindTarget.val().length - obj.bindTarget.data("prevLen") ) ); + } + + if (obj.config.onChange) { + obj.config.onChange.call({ objID: objID, objSeq: objSeq, value: obj.bindTarget.val().number() }); + } + }, + + /* selector ~~~~~~~~~~~~~~~ */ + bindSelector: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + //obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + //obj.bindTarget = axdom("#" + objID); + + obj.bindTarget.data("val", obj.bindTarget.val()); + + var h = obj.bindAnchorTarget.data("height") - 2; + var po = []; + po.push("
"); + po.push(" expand"); + po.push("
"); + if (obj.config.finder) { + po.push("
"); + po.push(" finder"); + po.push("
"); + } + + obj.bindAnchorTarget.append(po.join('')); + obj.bindAnchorTarget.show(); + + var bindSelectorExpand = this.bindSelectorExpand.bind(this); + var bindSelectorClose = this.bindSelectorClose.bind(this); + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").unbind("click.AXInput").bind("click.AXInput", function (event) { + if (!AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + axdom("#" + objID).focus(); + } else { + //bindSelectorExpand(objID, objSeq, true, event); + bindSelectorClose(objID, objSeq, event); + } + }); + obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput", function (event) { + try { + this.select(); + } catch (e) { + } + if (!AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + bindSelectorExpand(objID, objSeq, false, event); + } + }); + obj.bindTarget.unbind("keydown.AXInputCheck").bind("keydown.AXInputCheck", function(event){ + if (!AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + bindSelectorExpand(objID, objSeq, false, event); + } + }); + + if (obj.config.finder) { + if (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); + }); + } + } + + /* + var bindSelectorInputChange = this.bindSelectorInputChange.bind(this); + obj.inputChange = function(event){ + bindSelectorInputChange(objID, objSeq, event); + } + axdom("#"+objID).bind("change.AXInput", obj.inputChange); + */ + }, + bindSelectorExpand: function (objID, objSeq, isToggle, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + obj.bindTarget.data("val", obj.bindTarget.val().enc()); + + //alert(obj.bindTarget.data("val").end()); + + if (this.opendExpandBox) { + this.bindSelectorClose(this.opendExpandBox.objID, this.opendExpandBox.objSeq, event); // 셀럭터 외의 영역이 므로 닫기 + AXReqAbort(); /* AJAX 호출 중지 하기 */ + } + + var jqueryTargetObjID = axdom("#" + cfg.targetID + "_AX_" + objID); + //trace({objID:objID, objSeq:objSeq}); + + if (axdom("#" + cfg.targetID + "_AX_" + objID).data("blurEvent")) { + //blur event 발생 상태 메소드 작동 중지 + return; + } + + //Selector Option box Expand + if (isToggle) { // 활성화 여부가 토글 이면 + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").removeClass("on"); + //비활성 처리후 메소드 종료 + return; + } + } + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 활성화 전에 개체 삭제 처리 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").removeClass("on"); + //Expand Box 생성 구문 작성 + var anchorWidth = jqueryTargetObjID.width() - 2; // anchor width + var anchorHeight = jqueryTargetObjID.data("height") - 1; + var 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"); + if (obj.config.positionFixed) { + expandBox.css({ "position": "fixed" }); + } + var expBoxHeight = expandBox.outerHeight(); + var offset = (obj.config.positionFixed) ? jqueryTargetObjID.position() : jqueryTargetObjID.offset(); + if (obj.config.position) { + offset = jqueryTargetObjID.offset(); + if (obj.config.position.top != undefined) { + offset.top = obj.config.position.top; + } + } + var css = {}; + css.top = offset.top + anchorHeight; + css.left = offset.left; + expandBox.css(css); + + this.opendExpandBox = { objID: objID, objSeq: objSeq }; + + //_AX_expandBox set options + //trace(obj.config.ajaxUrl); + if (obj.config.onsearch) { + this.bindSelectorKeyupChargingUp(objID, objSeq, event); + } else if (obj.config.ajaxUrl) { + // AJAX호출 + this.bindSelectorKeyupChargingUp(objID, objSeq, event); + } else { + if (!obj.config.options) { + trace("options 항목이 없어 bind selector 를 완성 할 수 없습니다."); + return; + } + 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 cfg = this.config; + var objSeq = null; + axf.each(this.objects, function (idx, O) { + //if (this.id == objID && this.isDel == true) objSeq = idx; + if (this.id == objID) { + objSeq = idx; + } + }); + if (objSeq != null) this.bindSelectorClose(objID, objSeq); + }, + bindSelectorClose: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + + var cfg = this.config; + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + 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"); + + if(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(); + } + + if (obj.config.appendable) { + //trace(myVal); + if (myVal != "") axdom("#" + objID).val(myVal); + } else { + axdom("#" + objID).val(myVal); + } + + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + options: obj.config.options, + selectedIndex: obj.config.selectedIndex, + selectedOption: obj.config.selectedObject + } + if (obj.config.onChange) obj.config.onChange.call(sendObj); + else if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + obj.config.isChangedSelect = false; + } + //trace(obj.config.selectedObject); + if (obj.config.selectedObject) this.bindSelectorInputChange(objID, objSeq); + else { + if (!obj.config.appendable) { + if (!obj.config.selectedObject && !obj.inProgress) axdom("#" + objID).val(""); + } + } + //if(event) event.stopPropagation(); // disableevent + //return; + } + }, + bindSelectorSetOptions: function (objID, objSeq) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var maxHeight = obj.config.maxHeight || 130; + var optionPrintLength = obj.config.optionPrintLength || 100; + if (!obj.config.options) return; + + var po = []; + axf.each(obj.config.options, function (index, O) { + if (optionPrintLength != "") { + if (index > optionPrintLength - 1) return false; + } + var descStr = (O.desc || O.optionDesc || "").dec(); + if (descStr != "") descStr = "" + descStr + ""; + po.push("" + O.optionText.dec() + descStr + ""); + }); + if (po.length == 0) { + var selectorOptionEmpty = ""; + if (AXConfig.AXInput) selectorOptionEmpty = (AXConfig.AXInput.selectorOptionEmpty || "empty options"); + po.push("
" + selectorOptionEmpty + "
"); + } + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandScroll").html(po.join('')); + obj.config.isSelectorClick = false; + + var expandScrollHeight = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandScroll").outerHeight(); + if (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); + + if (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: false + }); + obj.myUIScroll.scrollTop(0); + + if (obj.config.selectedIndex != undefined) { + 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"); //focus + obj.config.focusedIndex = obj.config.selectedIndex; + } + + }, + bindSelectorOptionsClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + var myTarget = this.getEventTarget({ + evt: eventTarget, + until: function (evt, evtIDs) { + return (evt.parentNode.tagName == "body") ? true : false; + }, + find: function (evt, evtIDs) { + if (evt.id == "") return false; + if (evt.id == objID || axdom(evt).hasClass("bindSelectorNodes")) { + return true; + } else { + return false; + } + } + }); + var isSelectorClick = (myTarget) ? true : false; + if (!isSelectorClick) { + this.bindSelectorClose(objID, objSeq, event); // 셀럭터 외의 영역이 므로 닫기 + AXReqAbort(); /* AJAX 호출 중지 하기 */ + } else { + eid = myTarget.id.split(/_AX_/g); + + if (eid.last() == "option") { + var selectedIndex = eid[eid.length - 2]; + obj.config.selectedIndex = selectedIndex; + obj.config.focusedIndex = selectedIndex; + obj.config.selectedObject = obj.config.options[selectedIndex]; + obj.config.isChangedSelect = true; + obj.config.isSelectorClick = true; + this.bindSelectorClose(objID, objSeq, event); // 값 전달 후 닫기 + } + } + }, + bindSelectorKeyup: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + + if (obj.inProgress) { + obj.inProgressReACT = true; + return; + } + + if (event.keyCode == AXUtil.Event.KEY_TAB) { + this.bindSelectorClose(objID, objSeq, event); // 닫기 + return; + } + + if (event.keyCode == AXUtil.Event.KEY_UP) { + if (!obj.config.options) return; + if (obj.config.options.length == 0) return; + var focusIndex = obj.config.options.length - 1; + if (obj.config.focusedIndex == undefined || obj.config.focusedIndex == 0) { + //trace(obj.config.selectedIndex+"//"+focusIndex); + } else { + focusIndex = (obj.config.focusedIndex) - 1; + //trace(obj.config.selectedIndex+"//"+focusIndex); + } + this.bindSelectorSelect(objID, objSeq, focusIndex); + } else if (event.keyCode == AXUtil.Event.KEY_DOWN) { + if (!obj.config.options) return; + if (obj.config.options.length == 0) return; + var focusIndex = 0; + if (obj.config.focusedIndex == undefined || obj.config.focusedIndex == obj.config.options.length - 1) { + //trace(obj.config.selectedIndex+"//"+focusIndex); + } else { + focusIndex = (obj.config.focusedIndex).number() + 1; + //trace(obj.config.selectedIndex+"//"+focusIndex); + } + this.bindSelectorSelect(objID, objSeq, focusIndex); + } else if (event.keyCode == AXUtil.Event.KEY_RETURN) { + if (obj.config.focusedIndex == null) { + /*axdom("#" + objID).blur();*/ + this.bindSelectorClose(objID, objSeq, event); // 닫기 + return; + } else { + //trace(obj.config.focusedIndex); + obj.config.selectedObject = obj.config.options[obj.config.focusedIndex]; + obj.config.selectedIndex = obj.config.focusedIndex; + obj.config.isChangedSelect = true; + axdom("#" + objID).val(obj.config.selectedObject.optionText.dec()); + /*axdom("#" + objID).blur();*/ + this.bindSelectorClose(objID, objSeq, event); // 닫기 + return; + } + } else { + //1. 반복입력 제어 하기 + var bindSelectorKeyupChargingUp = this.bindSelectorKeyupChargingUp.bind(this); + if (obj.Observer) clearTimeout(obj.Observer); //명령 제거 + obj.Observer = setTimeout(function () { + bindSelectorKeyupChargingUp(objID, objSeq, event); + }, 500); + } + }, + bindSelectorKeyupChargingUp: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + + var objVal = axdom("#" + objID).val(); + var bindSelectorSearch = this.bindSelectorSearch.bind(this); + + if (obj.config.onsearch) { + + var res = obj.config.onsearch.call({ + id: objID, + value: objVal + }, objID, objVal); + + if (!res) { + res = { options: [] }; + } + obj.config.options = res.options; + //obj.config.selectedIndex = null; + obj.config.focusedIndex = null; + //obj.config.selectedObject = null; + //obj.config.isChangedSelect = true; + this.bindSelectorSetOptions(objID, objSeq); + + } else if (obj.config.ajaxUrl) { + // AJAX호출 + // 2. AJAX request + // 3. AJAX 결과로 bindSelectorSetOptions 처리하기 + //this.bindSelectorSetOptions(objID, objSeq); + // 4. 입력어로 bindSelectorSearch 실행하기 + obj.inProgress = true; //진행중 상태 변경 + var bindSelectorSetOptions = this.bindSelectorSetOptions.bind(this); + var bindSelectorKeyupChargingUp = this.bindSelectorKeyupChargingUp.bind(this); + var url = obj.config.ajaxUrl; + var pars = obj.config.ajaxPars; + var selectorName = obj.config.selectorName || axdom("#" + objID).attr("name"); + if (pars == "") { + pars = selectorName + "=" + (objVal||"").enc(); + } else if ((typeof pars).toLowerCase() == "string") { + pars += "&" + selectorName + "=" + objVal.enc(); + } else if ((typeof pars).toLowerCase() == "object") { + pars[selectorName] = objVal.enc(); + } + var msgAlert = this.msgAlert.bind(this); + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXUtil.ajaxOkCode) { + + obj.config.options = (res.options || []); + //obj.config.selectedIndex = null; + obj.config.focusedIndex = null; + //obj.config.selectedObject = null; + //obj.config.isChangedSelect = true; + bindSelectorSetOptions(objID, objSeq); + bindSelectorSearch(objID, objSeq, objVal); + + if (obj.inProgressReACT) { + bindSelectorKeyupChargingUp(objID, objSeq, event); + } + } else { + msgAlert(res); + } + obj.inProgress = false; + obj.inProgressReACT = false; + } + }); + } else { + // 입력어로 bindSelectorSearch 실행하기 + //alert(objVal); + bindSelectorSearch(objID, objSeq, objVal); + } + }, + bindSelectorInputChange: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (axdom("#" + objID).val() != obj.config.selectedObject.optionText.dec()) { + if (!obj.config.appendable) axdom("#" + objID).val(""); + obj.config.selectedObject = null; + obj.config.selectedIndex = null; + obj.config.focusedIndex = null; + if (obj.config.onChange) { + obj.config.onChange(null); + } else if (obj.config.onchange) { + obj.config.onchange(null); + } + } + }, + bindSelectorSetValue: function (objID, objSeq, value) { + var obj = this.objects[objSeq]; + var cfg = this.config; + + if (!obj.config.options) return; + //trace(obj.config.options); + + var selectedIndex = null; + axf.each(obj.config.options, function (oidx, opt) { + if (opt.optionValue == value) selectedIndex = oidx; + }); + + if (selectedIndex != null) { + obj.config.focusedIndex = selectedIndex; + obj.config.selectedObject = obj.config.options[selectedIndex]; + obj.config.isChangedSelect = true; + axdom("#" + objID).val(obj.config.selectedObject.optionText.dec()); + + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + options: obj.config.options, + selectedIndex: obj.config.selectedIndex, + selectedOption: obj.config.selectedObject + } + if (obj.config.onChange) obj.config.onChange.call(sendObj); + else if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + } + }, + bindSelectorSearch: function (objID, objSeq, kword) { // 입력된 값으로 검색 하기 + var obj = this.objects[objSeq]; + var cfg = this.config; + if (kword == "") { + this.bindSelectorSelectClear(objID, objSeq); + return; + } + kword = kword.replace(/\//g, "\\\/"); + var sw = AXUtil.consonantKR((kword || "").dec()); + //trace(sw); + eval("var reAt= /^" + sw + ".*/i"); + var ix = null; + for (var a = 0; a < obj.config.options.length; a++) { + if (reAt.test((obj.config.options[a].optionText || "").dec())) { + ix = a; + break; + } + } + if (ix != null) { + this.bindSelectorSelect(objID, objSeq, ix, "dont change value"); + } else { + this.bindSelectorSelectClear(objID, objSeq); + } + }, + bindSelectorSelect: function (objID, objSeq, index, changeValue) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (obj.config.focusedIndex != undefined) { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_" + obj.config.focusedIndex + "_AX_option").removeClass("on"); + } + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_" + index + "_AX_option").addClass("on"); + obj.config.focusedIndex = index; + //obj.config.selectedObject = obj.config.options[index]; + //obj.config.isChangedSelect = true; + //if(!changeValue) axdom("#"+objID).val(obj.config.selectedObject.optionText.dec()); + obj.myUIScroll.focusElement(cfg.targetID + "_AX_" + objID + "_AX_" + index + "_AX_option"); //focus + }, + bindSelectorSelectClear: function (objID, objSeq) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (obj.config.selectedIndex != undefined) { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_" + obj.config.selectedIndex + "_AX_option").removeClass("on"); + } + obj.config.selectedIndex = null; + obj.config.focusedIndex = null; + obj.config.selectedObject = null; + obj.config.isChangedSelect = true; + }, + /* slider ~~~~~~~~~~~~~~~ */ + bindSlider: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + obj.bindTarget = axdom("#" + objID); + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderBox").remove(); + + var w = obj.bindAnchorTarget.width(); + var h = obj.bindAnchorTarget.data("height"); + //trace(h); + var objVal = obj.bindTarget.val().number().money(); + if (objVal.number() < obj.config.min.number()) objVal = obj.config.min; + else if (objVal.number() > obj.config.max.number()) objVal = obj.config.max; + + if (!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("
"); + + //append to anchor + obj.bindAnchorTarget.append(po.join('')); + //obj.bindAnchorTarget.css({ height: h + "px", "position": "relative", display: "inline-block", left: "auto", top: "auto" }); + obj.bindAnchorTarget.css({ height: h + "px", "position": "relative", display: "inline-block", left: "auto", top: "auto" }); + //, background:"#eee" + + + var maxTitleWidth = axdom("#" + cfg.targetID + "_AX_" + objID).find(".AXanchorSliderMaxTitle").outerWidth().number() + 10; + var minTitleWidth = axdom("#" + cfg.targetID + "_AX_" + objID).find(".AXanchorSliderMinTitle").outerWidth().number() + 10; + if (maxTitleWidth < 30) maxTitleWidth = 30; + if (minTitleWidth < 30) 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); + 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) { + event.stopPropagation(); // disable event + return false; + }); + + //add touch event + if (document.addEventListener) { + var ontouchstart = this.sliderTouchStart.bind(this); + obj.bindSliderTouchStart = function (event) { ontouchstart(objID, objSeq); } + + AXgetId(cfg.targetID + "_AX_" + objID + "_AX_SliderHandle").addEventListener("touchstart", obj.bindSliderTouchStart, false); + } + + obj.bindAnchorTarget.show(); + obj.bindTarget.hide(); + + }, + bindSliderMouseDown: function (objID, objSeq) { + var cfg = this.config; + var obj = 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 = true; + } + + }, + bindSliderMouseMove: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var eX = event.pageX; + var cX = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderBar").offset().left; + + var rX = eX - cX; + + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var objVal = (rX * valueWidth) / pixelWidth; + var snap = obj.config.snap; + if (!snap) snap = 1; + + if (snap >= 1) { + objVal = (objVal.number() + obj.config.min.number()).round(); + objVal = (parseInt(objVal / (snap)) * (snap)); + } else { + 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; + + if (objVal < obj.config.min) { + objVal = obj.config.min; + rX = 0; + } else if (objVal > obj.config.max) { + objVal = obj.config.max; + rX = pixelWidth; + } + if (rX > pixelWidth) rX = pixelWidth; + + var sX = rX - (obj.config._handleWidth / 2); + var stX = rX - (obj.config._maxTitleWidth / 2); + + //trace({rX:rX, pixelWidth:pixelWidth, objVal:objVal, valueWidth:valueWidth}); + 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, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var 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 = false; + }, + bindSliderSetValue: function (objID, objSeq, value) { + + var cfg = this.config; + var obj = this.objects[objSeq]; + + + if (value != undefined) { + var objVal = value; + } else { + var objVal = axdom("#" + objID).val(); + } + + if (objVal.number() < obj.config.min.number()) objVal = obj.config.min; + else if (objVal.number() > obj.config.max.number()) objVal = obj.config.max; + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var 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) { + //alert(objID+"_"+ objSeq); + var cfg = this.config; + var obj = 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); + }; + + if (document.addEventListener) { + document.addEventListener("touchmove", obj.bindSliderTouchMove, false); + document.addEventListener("touchend", obj.bindSliderTouchEnd, false); + + } + obj.config.isMoving = true; + + } + + }, + sliderTouchMove: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + event.preventDefault(); + var touch = event.touches[0]; + + var eX = touch.pageX; + var cX = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderBar").offset().left; + var rX = eX - cX; + + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var objVal = (rX * valueWidth) / pixelWidth; + var snap = obj.config.snap; + if (!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 (objVal < obj.config.min) { + objVal = obj.config.min; + rX = 0; + } else if (objVal > obj.config.max) { + objVal = obj.config.max; + rX = pixelWidth; + } + if (rX > pixelWidth) rX = pixelWidth; + + var sX = rX - (obj.config._handleWidth / 2); + var stX = rX - (obj.config._maxTitleWidth / 2); + + //trace({rX:rX, pixelWidth:pixelWidth, objVal:objVal, valueWidth:valueWidth}); + 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); + if (obj.config.onChange) obj.config.onChange(objID, objVal); + else if (obj.config.onchange) obj.config.onchange(objID, objVal); + }, + sliderTouchEnd: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var 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); + } + + if (document.addEventListener) { + document.removeEventListener("touchmove", obj.bindSliderTouchMove, false); + document.removeEventListener("touchend", obj.bindSliderTouchEnd, false); + } + obj.config.isMoving = false; + }, + + + /* twinSlider ~~~~~~~~~~~~~~~ */ + bindTwinSliderGetVals: function (objValString, separator) { + var objVals = objValString.split(separator); + var objVal = { min: 0, max: 0 }; + if (objVals.length < 2) { + objVal = { min: objVals[0], max: objVals[0] }; + } else { + objVal = { min: objVals[0], max: objVals[1] }; + } + return objVal; + }, + bindTwinSlider: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var w = axdom("#" + cfg.targetID + "_AX_" + objID).width(); + var h = axdom("#" + cfg.targetID + "_AX_" + objID).data("height"); + var objValString = axdom("#" + objID).val(); + var separator = obj.config.separator || "~"; + var objVal = this.bindTwinSliderGetVals(objValString, separator); + obj.vals = objVal; + + if (objVal.min.number() < obj.config.min.number()) objVal.min = obj.config.min; + else if (objVal.min.number() > obj.config.max.number()) objVal.min = obj.config.max; + if (objVal.max.number() < obj.config.min.number()) objVal.max = obj.config.min; + else if (objVal.max.number() > obj.config.max.number()) objVal.max = obj.config.max; + + if (!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("
"); + + //append to anchor + 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" }); + //, background:"#eee" + axdom("#" + cfg.targetID + "_AX_" + objID).show(); + axdom("#" + objID).hide(); + + var maxTitleWidth = axdom("#" + cfg.targetID + "_AX_" + objID).find(".AXanchorSliderMaxTitle").outerWidth().number() + 10; + var 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); + 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) { + event.stopPropagation(); // disable event + return false; + }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMax").unbind("dragstart.AXInput").bind("dragstart.AXInput", function (event) { + event.stopPropagation(); // disable event + return false; + }); + + //add touch event + if (document.addEventListener) { + var ontouchstart = this.twinSliderTouchStart.bind(this); + obj.bindTwinSliderTouchStartMin = function (event) { ontouchstart(objID, objSeq, "min"); } + obj.bindTwinSliderTouchStartMax = function (event) { ontouchstart(objID, objSeq, "max"); } + + AXgetId(cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMin").addEventListener("touchstart", obj.bindTwinSliderTouchStartMin, false); + AXgetId(cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMax").addEventListener("touchstart", obj.bindTwinSliderTouchStartMax, false); + } + + }, + bindTwinSliderMouseDown: function (objID, objSeq, handleName) { + var cfg = this.config; + var obj = 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 = true; + } + + }, + bindTwinSliderMouseMove: function (objID, objSeq, event, handleName) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var eX = event.pageX; + var cX = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderBar").offset().left; + + var rX = eX - cX; + + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var objVal = (rX * valueWidth) / pixelWidth; + var snap = obj.config.snap; + if (!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 (objVal < obj.config.min) { + objVal = obj.config.min; + rX = 0; + } else if (objVal > obj.config.max) { + objVal = obj.config.max; + rX = pixelWidth; + } + if (rX > pixelWidth) rX = pixelWidth; + + //trace({rX:rX, pixelWidth:pixelWidth, objVal:objVal, valueWidth:valueWidth}); + if (handleName == "min") { + if (objVal > obj.vals.max) { + objVal = obj.vals.max; + rX = obj.handleMaxLeft; + } + var sX = rX - (obj.config._handleWidth); + var 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 }); + //axdom("#"+objID).val(objVal); + obj.vals.min = objVal; + } else { + if (objVal < obj.vals.min) { + objVal = obj.vals.min; + rX = obj.handleMinLeft; + } + var sX = rX; + var stX = rX; + obj.handleMaxLeft = rX; + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMax").css({ left: sX }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMaxTitle").css({ left: stX }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMaxTitle").text(objVal.number().money() + obj.config.unit); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderInside").css({ left: obj.handleMinLeft, width: obj.handleMaxLeft - obj.handleMinLeft }); + //axdom("#"+objID).val(objVal); + obj.vals.max = objVal; + } + var separator = obj.config.separator || "~"; + axdom("#" + objID).val(obj.vals.min + separator + obj.vals.max); + + }, + bindTwinSliderMouseUp: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var 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 = false; + }, + bindTwinSliderSetValue: function (objID, objSeq, value) { + var cfg = this.config; + var obj = this.objects[objSeq]; + if (value != undefined) { + var objValString = value; + } else { + var objValString = axdom("#" + objID).val(); + } + + var separator = obj.config.separator || "~"; + var objVal = this.bindTwinSliderGetVals(objValString, separator); + obj.vals = objVal; + + if (objVal.min.number() < obj.config.min.number()) objVal.min = obj.config.min; + else if (objVal.min.number() > obj.config.max.number()) objVal.min = obj.config.max; + if (objVal.max.number() < obj.config.min.number()) objVal.max = obj.config.min; + else if (objVal.max.number() > obj.config.max.number()) objVal.max = obj.config.max; + + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var pixelMinLeft = ((objVal.min - obj.config.min) * pixelWidth) / valueWidth; + var 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); + }, + + //add touch event + twinSliderTouchStart: function (objID, objSeq, handleName) { + var cfg = this.config; + var obj = 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); + }; + + if (document.addEventListener) { + document.addEventListener("touchmove", obj.bindTwinSliderTouchMove, false); + document.addEventListener("touchend", obj.bindTwinSliderTouchEnd, false); + + } + obj.config.isMoving = true; + + } + + }, + twinSliderTouchMove: function (objID, objSeq, event, handleName) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + event.preventDefault(); + var touch = event.touches[0]; + + //var eX = event.pageX; + var eX = touch.pageX; + var cX = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderBar").offset().left; + var rX = eX - cX; + + var valueWidth = obj.config.max.number() - obj.config.min.number(); + var pixelWidth = obj.config._trackWidth; + var objVal = (rX * valueWidth) / pixelWidth; + var snap = obj.config.snap; + if (!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 (objVal < obj.config.min) { + objVal = obj.config.min; + rX = 0; + } else if (objVal > obj.config.max) { + objVal = obj.config.max; + rX = pixelWidth; + } + if (rX > pixelWidth) rX = pixelWidth; + + //trace({rX:rX, pixelWidth:pixelWidth, objVal:objVal, valueWidth:valueWidth}); + + if (handleName == "min") { + if (objVal > obj.vals.max) { + objVal = obj.vals.max; + rX = obj.handleMaxLeft; + } + var sX = rX - (obj.config._handleWidth); + var 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 }); + //axdom("#"+objID).val(objVal); + obj.vals.min = objVal; + } else { + if (objVal < obj.vals.min) { + objVal = obj.vals.min; + rX = obj.handleMinLeft; + } + var sX = rX; + var stX = rX; + obj.handleMaxLeft = rX; + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMax").css({ left: sX }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMaxTitle").css({ left: stX }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderHandleMaxTitle").text(objVal.number().money() + obj.config.unit); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SliderInside").css({ left: obj.handleMinLeft, width: obj.handleMaxLeft - obj.handleMinLeft }); + //axdom("#"+objID).val(objVal); + obj.vals.max = objVal; + } + var separator = obj.config.separator || "~"; + axdom("#" + objID).val(obj.vals.min + separator + obj.vals.max); + if (obj.config.onChange) obj.config.onChange(objID, obj.vals.min + separator + obj.vals.max); + else if (obj.config.onchange) obj.config.onchange(objID, obj.vals.min + separator + obj.vals.max); + }, + twinSliderTouchEnd: function (objID, objSeq, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var 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.removeEventListener("touchmove", obj.bindTwinSliderTouchMove, false); + document.removeEventListener("touchend", obj.bindTwinSliderTouchEnd, false); + + obj.config.isMoving = false; + }, + + /* switch ~~~~~~~~~~~~~~~ */ + bindSwitch: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + obj.bindTarget = axdom("#" + objID); + + var w = obj.bindAnchorTarget.width(); + var h = obj.bindAnchorTarget.data("height"); + var objVal = obj.bindTarget.val(); + var switchValue = obj.config.on; + if (objVal == switchValue) { + obj.switchValue = "on"; + } else { + switchValue = obj.config.off; + obj.switchValue = "off"; + } + obj.bindTarget.val(switchValue); + + var po = []; + po.push("
"); + po.push("
" + switchValue + "
"); + po.push("handle"); + po.push("
"); + + //append to anchor + 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"); + + if (obj.switchValue == "on") { + obj.bindAnchorTarget.find("." + cfg.anchorSwitchBoxClassName).addClass("on"); + } + + //, background:"#eee" + 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, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + if (obj.switchValue == "on") { + 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); + } else { + 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); + } + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + on: obj.config.on, + off: obj.config.off, + value: axdom("#" + objID).val() + } + if (obj.config.onChange) obj.config.onChange.call(sendObj); + if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + }, + bindSwitchSetValue: function (objID, objSeq, value) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var objVal = value; + var switchValue = obj.config.on; + if (objVal == switchValue) { + obj.switchValue = "on"; + } else { + switchValue = obj.config.off; + obj.switchValue = "off"; + } + axdom("#" + objID).val(switchValue); + + if (obj.switchValue == "off") { + 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); + } else { + 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); + } + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + on: obj.config.on, + off: obj.config.off, + value: axdom("#" + objID).val() + } + if (obj.config.onChange) obj.config.onChange.call(sendObj); + else if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + }, + bindSwitch_touchstart: function () { + + }, + bindSwitch_touchMove: function () { + + }, + bindSwitch_touchEnd: function () { + + }, + /* segment ~~~~~~~~~~~~~~~ */ + bindSegment: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + obj.bindAnchorTarget = axdom("#" + cfg.targetID + "_AX_" + objID); + obj.bindTarget = axdom("#" + objID); + + var w = obj.bindAnchorTarget.width(); + var h = obj.bindAnchorTarget.data("height"); + var objVal = obj.bindTarget.val(); + var segmentOptions = obj.config.options; + obj.selectedSegmentIndex = null; + axf.each(segmentOptions, function (idx, seg) { + //trace({optionValue:this.optionValue, objVal:objVal}); + if (this.optionValue == objVal) { + obj.selectedSegmentIndex = idx; + obj.selectedSegment = seg; + } + }); + if (obj.selectedSegmentIndex == null) { + obj.selectedSegmentIndex = 0; + obj.selectedSegment = segmentOptions[0]; + } + obj.bindTarget.val(obj.selectedSegment.optionValue); + + var handleWidth = (w / segmentOptions.length).round() - 2; + var po = []; + var theme = obj.config.theme || cfg.anchorSegmentBoxClassName; + po.push("
"); + axf.each(segmentOptions, function (idx, seg) { + var addClass = ""; + if (idx == 0) addClass = " segmentLeft"; + else if (idx == segmentOptions.length - 1) addClass = " segmentRight"; + if (obj.selectedSegmentIndex == idx) addClass += " on"; + if (seg.addClass) addClass += " " + seg.addClass; + po.push("" + seg.optionText + ""); + }); + po.push("
"); + + //append to anchor + 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(); + var 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" }); + + //, background:"#eee" + 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; + var obj = this.objects[objSeq]; + var segmentOptions = obj.config.options; + + if (event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("AXanchorSegmentHandle")) ? true : false; } + }); + + 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]; + } + //strace(obj.selectedSegment.optionValue); + axdom("#" + objID).val(obj.selectedSegment.optionValue); + //trace(axdom("#"+objID).val()); + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + options: segmentOptions, + selectedIndex: obj.selectedSegmentIndex, + selectedOption: obj.selectedSegment + }; + if (obj.config.onChange) obj.config.onChange.call(sendObj); + else if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + + } + }, + bindSegmentSetValue: function (objID, objSeq, value) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + var selectedSegmentIndex = obj.selectedSegmentIndex; + + var objVal = value; + var segmentOptions = obj.config.options; + obj.selectedSegmentIndex = null; + axf.each(segmentOptions, function (idx, seg) { + if (this.optionValue == objVal) { + obj.selectedSegmentIndex = idx; + obj.selectedSegment = seg; + } + }); + if (obj.selectedSegmentIndex == null) { + obj.selectedSegmentIndex = 0; + obj.selectedSegment = segmentOptions[0]; + } + axdom("#" + objID).val(obj.selectedSegment.optionValue); + + if (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"); + } + + if (obj.config.onChange || obj.config.onchange) { + var sendObj = { + targetID: objID, + options: segmentOptions, + selectedIndex: obj.selectedSegmentIndex, + selectedOption: obj.selectedSegment + }; + if (obj.config.onChange) obj.config.onChange.call(sendObj); + else if (obj.config.onchange) obj.config.onchange.call(sendObj); + } + + }, + /* date ~~~~~~~~~~~~~~~~~ */ + bindDate: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var h = axdom("#" + cfg.targetID + "_AX_" + objID).data("height"); + var 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, true, event); + }); + axdom("#" + objID).unbind("focus.AXInput").bind("focus.AXInput", function (event) { + axdom("#" + objID).select(); + /* 포거스 되었을 때 달력 도구 오픈 처리 방식 변경 2013-07-10 오전 11:09:40 + if(!AXgetId(cfg.targetID + "_AX_"+objID+"_AX_expandBox")){ + bindDateExpand(objID, objSeq, false, event); + } + */ + }); + + 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){ + //bindDateInputBlur(objID, objSeq, event); + 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, ""); //숫자 이외의 문자를 제거 합니다. + var _this = this; + + if (obj.config.selectType == "y") { + if (va.length > 4) _this.value = va.left(4); + } else if (obj.config.selectType == "m") { + if (va.length == 4) { + va = va + separator; + _this.value = va; + } else if (va.length > 4) { + va = va.substr(0, 4) + separator + va.substr(4, 2); + _this.value = va; + } + } else { + if (va.length == 4) { + va = va + separator; + _this.value = va; + } else if (va.length == 6) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator; + _this.value = va; + } else if (va.length == 8) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator + va.substr(6, 2); + if (obj.config.expandTime) va += " "; + _this.value = va; + } else if (va.length == 10) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator + va.substr(6, 2) + " " + va.substr(8, 2) + ":"; + _this.value = va; + } else if (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) { + var cfg = this.config; + //alert(cfg.responsiveMobile); + + for (var OO, oidx = 0, __arr = this.objects; (oidx < __arr.length && (OO = __arr[oidx])); oidx++) { + if(OO.expandBox_axdom){ + OO.expandBox_axdom.remove(); + OO.expandBox_axdom = null; + } + } + + if (AXUtil.clientWidth() < cfg.responsiveMobile) { + this.bindDateExpandMobile(objID, objSeq, isToggle, event); + return; + /* 클라이언트 너비가 모바일 너비이면 프로세스 중지 */ + } + var obj = this.objects[objSeq]; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + //Selector Option box Expand + if (isToggle) { // 활성화 여부가 토글 이면 + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").removeClass("on"); + //비활성 처리후 메소드 종료 + return; + } + } + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 활성화 전에 개체 삭제 처리 + + //Expand Box 생성 구문 작성 + var objVal = axdom("#" + objID).val(); + if (obj.config.expandTime) obj.config.selectType == "d"; //시간 확장 시 selectType : d 로 고정 + + var today = new Date(); + if (obj.config.selectType == "y") { + if (objVal != "") { + objVal = objVal.left(4) + separator + "01" + separator + "01"; + } + } else if (obj.config.selectType == "m") { + if (objVal != "") { + objVal = objVal + separator + "01"; + } + } + + var dfDate = (obj.config.defaultDate || "").date(); + var myDate = objVal.date(separator, dfDate); + + var myYear = myDate.getFullYear(); + var myMonth = (myDate.getMonth() + 1).setDigit(2); + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + po.push(" " + myYear + "년"); + po.push(" " + myMonth + "월"); + po.push(" P"); + po.push(" N"); + po.push("
"); + po.push("
"); + if (obj.config.expandTime) { //시간 선택 기능 확장시 + po.push("
"); + } + po.push("
"); + po.push("
"); + + axdom(document.body).append(po.join('')); // bindDateExpandBox append + //axdom("#"+cfg.targetID + "_AX_" + objID+"_AX_Handle").addClass("on"); + + // AXCalendar display + obj.nDate = myDate; + obj.mycalendar = new AXCalendar(); + obj.mycalendar.setConfig({ + targetID: cfg.targetID + "_AX_" + objID + "_AX_displayBox", + basicDate: myDate, + href: obj.config.href + }); + if (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"; + var myTimes = myDate.print("hh:mi").split(":"); + var myHH = myTimes[0].number(); + var myMI = myTimes[1]; + if (myHH > 12) { + apm = "PM"; + myHH -= 12; + } + obj.mycalendartime.printTimePage(myHH.setDigit(2) + ":" + myMI.setDigit(2) + " " + apm); + } + + var printDate = ""; + if (obj.config.selectType == "y") { + obj.mycalendarPageType = "y"; + obj.mycalendar.printYearPage(myDate.print("yyyy")); + printDate = myDate.print("yyyy"); + axdom("#" + objID).val(printDate); + } else if (obj.config.selectType == "m") { + obj.mycalendarPageType = "m"; + obj.mycalendar.printMonthPage(myDate); + printDate = myDate.print("yyyy" + separator + "mm"); + axdom("#" + objID).val(printDate); + } else { + if (obj.config.defaultSelectType) { + if (obj.config.defaultSelectType == "y") { + obj.mycalendarPageType = "y"; + obj.mycalendar.printYearPage(myDate.print("yyyy")); + } else if (obj.config.defaultSelectType == "m") { + obj.mycalendarPageType = "m"; + obj.mycalendar.printMonthPage(myDate); + } else { + obj.mycalendarPageType = "d"; + obj.mycalendar.printDayPage(myDate); + } + printDate = myDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + myDate.print("hh:mi"); + } + axdom("#" + objID).val(printDate); + + } else { + obj.mycalendarPageType = "d"; + obj.mycalendar.printDayPage(myDate); + printDate = myDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + myDate.print("hh:mi"); + } + + axdom("#" + objID).val(printDate); + } + } + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AXCalendar display + + // expandBox set Position ~~~~~~~~~~~~~~~~~~~~~~~~~ + var expandBox = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox"); + var expBoxWidth = expandBox.outerWidth(); + var expBoxHeight = expandBox.outerHeight(); + var offset = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").offset(); + var handleWidth = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").width(); + var handleHeight = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").height(); + + var css = {}; + if (obj.config.align == "left") { + css.left = offset.left.number() - expBoxWidth; + } else if (obj.config.align == "center") { + css.left = offset.left.number() - expBoxWidth / 2 + handleWidth; + } else if (obj.config.align == "right") { + css.left = offset.left.number() + handleWidth; + } else { + css.left = offset.left.number() + handleWidth; + } + if (obj.config.valign == "top") { + css.top = offset.top; + } else if (obj.config.valign == "middle") { + css.top = offset.top.number() - expBoxHeight / 2 + handleWidth / 2; + } else if (obj.config.valign == "bottom") { + css.top = offset.top.number() - expBoxHeight + handleWidth; + } else { + css.top = offset.top; + } + + var pElement = expandBox.offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + + var clientHeight = (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; + var clienWidth = (AXUtil.docTD == "Q") ? document.body.scrollWidth : document.documentElement.scrollWidth; + if (clienWidth > pBox.width) pBox.width = clienWidth; + if (clientHeight > pBox.height) pBox.height = clientHeight; + var _box = { width: expandBox.outerWidth() + 10, height: expandBox.outerHeight() + 10 }; + + if ((_box.height.number() + css.top.number()) > pBox.height) { + css.top = css.top - ((_box.height.number() + css.top.number()) - pBox.height); + } + if (css.top < 0) { + css.top = 0; + } + + if ((_box.width.number() + css.left.number()) > pBox.width) { + css.left = css.left - ((_box.width.number() + css.left.number()) - pBox.width); + } + if (css.left < 0) { + css.left = 0; + } + + expandBox.css(css); + obj.expandBox_axdom = expandBox; + + // ~~~~~~~~~~~~~~~~~~~~~~~~~ expandBox set Position ~~~~~~~~~~~~~~~~~~~~~~~~~ + + var bindDateExpandBoxClick = this.bindDateExpandBoxClick.bind(this); + obj.documentclickEvent = function (event) { + //trace(objID); + bindDateExpandBoxClick(objID, objSeq, event); + } + var bindDateKeyup = this.bindDateKeyup.bind(this); + obj.inputKeyup = function (event) { + bindDateKeyup(objID, objSeq, event); + } + if (obj.config.selectType == "y") { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlYear").css({ left: "70px" }); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlMonth").hide(); + } + + //trace("event bind"); + axdom(document).unbind("click.AXInput").bind("click.AXInput", obj.documentclickEvent); + axdom("#" + objID).bind("keydown.AXInput", obj.inputKeyup); + + }, + /* bindDate for mobile --------- s */ + bindDateExpandMobile: function (objID, objSeq, isToggle, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + + axdom("#" + objID).unbind("keydown.AXInput").bind("keydown.AXInput", obj.inputKeyup); + + //Selector Option box Expand + if (isToggle) { // 활성화 여부가 토글 이면 + if (obj.modal && obj.modal.opened) { + obj.modal.close(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").removeClass("on"); + //비활성 처리후 메소드 종료 + return; + } + } + + /* mobile modal ready */ + 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); + var onLoad = function (modalObj) { + initBindDateMobileModal(objID, objSeq, modalObj); + }; + obj.modal.open(null, onLoad); + }, + initBindDateMobileModal: function (objID, objSeq, modalObj) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + //Expand Box 생성 구문 작성 + var objVal = axdom("#" + objID).val(); + if (obj.config.expandTime) obj.config.selectType == "d"; //시간 확장 시 selectType : d 로 고정 + + var today = new Date(); + if (obj.config.selectType == "y") { + if (objVal != "") { + objVal = objVal.left(4) + separator + "01" + separator + "01"; + } + } else if (obj.config.selectType == "m") { + if (objVal != "") { + objVal = objVal + separator + "01"; + } + } + + var dfDate = (obj.config.defaultDate || "").date(); + var myDate = objVal.date(separator, dfDate); + + var myYear = myDate.getFullYear(); + var myMonth = (myDate.getMonth() + 1).setDigit(2); + + /* head 만들기 */ + var headPo = []; + /* 현재 선택된 메뉴 선택 하는 기능구현 필요 */ + headPo.push(""); + + var bodyPo = []; + bodyPo.push('
'); + bodyPo.push('
'); + if (obj.config.expandTime) { //시간 선택 기능 확장시 + bodyPo.push('
'); + } + bodyPo.push('
'); + + var footPo = []; + footPo.push('
'); + footPo.push(' '); + footPo.push('
'); + + /* modal에 캘린더 장착 */ + modalObj.modalHead.empty(); + modalObj.modalHead.append(headPo.join('')); + modalObj.modalBody.empty(); + modalObj.modalBody.append(bodyPo.join('')); + modalObj.modalFoot.empty(); + modalObj.modalFoot.append(footPo.join('')); + + /* 캘린더 클래스 로드 */ + // AXCalendar display + obj.nDate = myDate; + obj.mycalendar = new AXCalendar(); + obj.mycalendar.setConfig({ + targetID: cfg.targetID + "_AX_" + objID + "_AX_displayBox", + basicDate: myDate, + href: obj.config.href + }); + if (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"; + var myTimes = myDate.print("hh:mi").split(":"); + var myHH = myTimes[0].number(); + var myMI = myTimes[1]; + if (myHH > 12) { + apm = "PM"; + myHH -= 12; + } + obj.mycalendartime.printTimePage(myHH.setDigit(2) + ":" + myMI.setDigit(2) + " " + apm); + } + + var printDate = ""; + if (obj.config.selectType == "y") { + obj.mycalendarPageType = "y"; + obj.mycalendar.printYearPage(myDate.print("yyyy")); + printDate = myDate.print("yyyy"); + axdom("#" + objID).val(printDate); + } else if (obj.config.selectType == "m") { + obj.mycalendarPageType = "m"; + obj.mycalendar.printMonthPage(myDate); + printDate = myDate.print("yyyy" + separator + "mm"); + axdom("#" + objID).val(printDate); + } else { + if (obj.config.defaultSelectType) { + if (obj.config.defaultSelectType == "y") { + obj.mycalendarPageType = "y"; + obj.mycalendar.printYearPage(myDate.print("yyyy")); + } else if (obj.config.defaultSelectType == "m") { + obj.mycalendarPageType = "m"; + obj.mycalendar.printMonthPage(myDate); + } else { + obj.mycalendarPageType = "d"; + obj.mycalendar.printDayPage(myDate); + } + printDate = myDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + myDate.print("hh:mi"); + } + axdom("#" + objID).val(printDate); + + } else { + obj.mycalendarPageType = "d"; + obj.mycalendar.printDayPage(myDate); + printDate = myDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + myDate.print("hh:mi"); + } + axdom("#" + objID).val(printDate); + } + } + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AXCalendar display + + // control event bind + var _this = this; + /*var bindDateMobileModalHeadClick = this.bindDateMobileModalHeadClick.bind(this);*/ + modalObj.modalHead.unbind("click.AXInput").bind("click.AXInput", function (event) { + _this.bindDateMobileModalHeadClick(objID, objSeq, event); + }); + /*var bindDateMobileModalBodyClick = this.bindDateMobileModalBodyClick.bind(this);*/ + modalObj.modalBody.unbind("click.AXInput").bind("click.AXInput", function (event) { + _this.bindDateMobileModalBodyClick(objID, objSeq, event); + }); + /*var bindDateMobileModalFootClick = this.bindDateMobileModalFootClick.bind(this);*/ + modalObj.modalFoot.unbind("click.AXInput").bind("click.AXInput", function (event) { + _this.bindDateMobileModalFootClick(objID, objSeq, event); + }); + // control event bind + }, + bindDateMobileModalHeadClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + 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("AXDateControlBox")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("AXDateControl")) ? true : false; } + }); + if (myTarget) { + var act = myTarget.id.split(/_AX_/g).last(); + var nDate = obj.nDate; + + if (act == "controlYear") { + this.bindDateChangePage(objID, objSeq, nDate, "y"); + } else if (act == "controlMonth") { + if (obj.config.selectType != "y") { + this.bindDateChangePage(objID, objSeq, nDate, "m"); + } + } else if (act == "expandPrev") { + if (obj.mycalendarPageType == "d") { + this.bindDateChangePage(objID, objSeq, nDate.add(-1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindDateChangePage(objID, objSeq, nDate.add(-1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindDateChangePage(objID, objSeq, nDate.add(-12, "y"), "y"); + } + } else if (act == "expandNext") { + if (obj.mycalendarPageType == "d") { + this.bindDateChangePage(objID, objSeq, nDate.add(1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindDateChangePage(objID, objSeq, nDate.add(1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindDateChangePage(objID, objSeq, nDate.add(12, "y"), "y"); + } + } + } + }, + bindDateMobileModalBodyClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + 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("AXDateContainer")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("calendarDate") || axdom(evt).hasClass("calendarMonth")) ? true : false; } + }); + if (myTarget) { + var ids = myTarget.id.split(/_AX_/g); + var act = ids.last(); + var nDate = obj.nDate; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (act == "date") { + //trace(ids[ids.length-2]); + obj.nDate = ids[ids.length - 2].date(); + var printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + //obj.modal.close(); + this.bindDateExpandClose(objID, objSeq, event); + } else if (act == "month") { + var myMonth = ids[ids.length - 2].number() - 1; + if (obj.config.selectType == "m") { + var yy = nDate.getFullYear(); + var dd = 1; + obj.nDate = new Date(yy, myMonth, dd); + //obj.modal.close(); + this.bindDateExpandClose(objID, objSeq, event); + } else { + var yy = nDate.getFullYear(); + var dd = 1; + obj.nDate = new Date(yy, myMonth, dd); + this.bindDateChangePage(objID, objSeq, obj.nDate, "d"); + } + } else if (act == "year") { + var myYear = ids[ids.length - 2]; + if (obj.config.selectType == "y") { + var mm = 0; + var dd = 1; + obj.nDate = new Date(myYear, mm, dd); + //obj.modal.close(); + this.bindDateExpandClose(objID, objSeq, event); + } else { + var mm = 0; + var 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]; + 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("AXDateButtonBox")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("AXBindDateConfirm")) ? true : false; } + }); + if (myTarget) { + var act = myTarget.id.split(/_AX_/g).last(); + if (act == "confirm") { + obj.modal.close(); + } + } + }, + /* bindDate for mobile --------- e */ + bindDateExpandClose: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + + if (!obj){ + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + return; + } + + if (obj.modal && obj.modal.opened) { /* mobile modal close */ + var objVal = axdom("#" + objID).val(); + if (objVal == "") { + + } else { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (obj.config.selectType == "y") { + axdom("#" + objID).val(obj.nDate.print("yyyy")); + } else if (obj.config.selectType == "m") { + axdom("#" + objID).val(obj.nDate.print("yyyy" + separator + "mm")); + } else { + //axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"+separator+"dd")); + printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + } + } + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + + if (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(); + } else if (obj.config.onChange.laterThan) { + ed_date = axdom("#" + objID).val(); + st_date = axdom("#" + obj.config.onChange.laterThan).val(); + } + if (st_date != "" && ed_date != "") { + if (st_date.date().diff(ed_date) < 0) { + this.msgAlert(obj.config.onChange.err); + axdom("#" + objID).val(""); + return; + } + } + if (obj.config.onChange.onChange) { + obj.config.onChange.onChange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } else if (obj.config.onChange.onchange) { + obj.config.onChange.onchange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } + } + } + + obj.modal.close(); + axdom("#" + objID).unbind("keydown.AXInput"); + + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + return; + } + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + var objVal = axdom("#" + objID).val(); + + if (objVal == "") { + + } else { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (obj.config.selectType == "y") { + axdom("#" + objID).val(obj.nDate.print("yyyy")); + } else if (obj.config.selectType == "m") { + axdom("#" + objID).val(obj.nDate.print("yyyy" + separator + "mm")); + } else { + //axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"+separator+"dd")); + printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + } + } + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + + if (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(); + } else if (obj.config.onChange.laterThan) { + ed_date = axdom("#" + objID).val(); + st_date = axdom("#" + obj.config.onChange.laterThan).val(); + } + if (st_date != "" && ed_date != "") { + if (st_date.date().diff(ed_date) < 0) { + this.msgAlert(obj.config.onChange.err); + axdom("#" + objID).val(""); + return; + } + } + if (obj.config.onChange.onChange) { + obj.config.onChange.onChange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } else if (obj.config.onChange.onchange) { + obj.config.onChange.onchange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } + } + } + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + obj.expandBox_axdom = null; + + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + + event.stopPropagation(); // disableevent + return; + } + }, + bindDateInputBlur: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var objVal = axdom("#" + objID).val(); + + if (objVal == "") { + + } else { + var clearDate = false; + var nDate = (obj.nDate || new Date()); + var va = axdom("#" + objID).val().replace(/\D/gi, ""); //숫자 이외의 문자를 제거 합니다. + if (va.search(/\d+/g) == -1) { + clearDate = true; + } + + if (clearDate) { + axdom("#" + objID).val(""); + } else { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (obj.config.selectType == "y") { + + var yy = va.left(4).number(); + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + var mm = nDate.getMonth(); + var dd = nDate.getDate(); + obj.nDate = new Date(yy, mm, dd, 12); + + axdom("#" + objID).val(obj.nDate.print("yyyy")); + + } else if (obj.config.selectType == "m") { + + if (va.length > 5) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = 1; + } else { + var yy = va.left(4).number(); + var mm = 0; + var dd = 1; + } + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + obj.nDate = new Date(yy, mm, dd, 12); + + axdom("#" + objID).val(obj.nDate.print("yyyy" + separator + "mm")); + + } else { + var needAlert = false; + if (va.length > 7) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = va.substr(6, 2).number(); + } else if (va.length > 4) { + var yy = "20" + va.substr(0, 2); + var mm = va.substr(2, 2).number() - 1; + var dd = va.substr(4, 2).number(); + } else { + var yy = nDate.getFullYear(); //va.left(4).number(); + var mm = va.substr(0, 2).number() - 1; + var dd = va.substr(2, 2).number(); + } + if (yy == 0) needAlert = true; + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + obj.nDate = new Date(yy, mm, dd, 12); + /* + trace(obj.nDate.getFullYear() != yy.number()); + trace(obj.nDate.getMonth() != mm.number()); + trace(obj.nDate.getDate() != dd.number()); + */ + if (obj.nDate.getFullYear() != yy.number() + || obj.nDate.getMonth() != mm.number() + || obj.nDate.getDate() != dd.number()) { + needAlert = true; + obj.nDate = new Date(); + } + + printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + try { + printDate += " " + obj.mycalendartime.getTime(); + } catch (e) { + if (va.length > 11) { // hh,mm + var hh = va.substr(8, 2).number(); + var mm = va.substr(10, 2).number(); + } else if (va.length > 9) { + var hh = va.substr(8, 2).number(); + var mm = "00"; + } else { + var hh = "12"; + var mm = "00"; + } + printDate += " " + hh + ":" + mm; + } + } + + if (needAlert) { + this.msgAlert("날짜 형식이 올바르지 않습니다."); + } + axdom("#" + objID).val(printDate); + } + } + } + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + if (obj.config.onChange) { + if (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; + if (obj.config.onChange.earlierThan) { + st_date = axdom("#" + objID).val(); + ed_date = axdom("#" + obj.config.onChange.earlierThan).val(); + } else if (obj.config.onChange.laterThan) { + ed_date = axdom("#" + objID).val(); + st_date = axdom("#" + obj.config.onChange.laterThan).val(); + } + if (st_date != "" && ed_date != "") { + if (st_date.date().diff(ed_date) < 0) { + this.msgAlert(obj.config.onChange.err); + axdom("#" + objID).val(""); + } + } + if (obj.config.onChange.onChange) { + obj.config.onChange.onChange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } else if (obj.config.onChange.onchange) { + obj.config.onChange.onchange.call({ + objID: objID, + value: axdom("#" + objID).val() + }); + } + } + axdom("#" + objID).data("val", axdom("#" + objID).val()); + + } + } + + /* ie10 버그 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + */ + + event.stopPropagation(); // disableevent + return; + }, + unbindDate: function (obj) { + var cfg = this.config; + var objID = obj.id; + var objSeq = null; + + axf.each(this.objects, function (oidx, O) { + if (this.id == objID) { + objSeq = oidx; + return false; + } + }); + + if (objSeq != null) { + var obj = this.objects[objSeq]; + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + } + + var collect = []; + var removeAnchorId; + axf.each(this.objects, function () { + if (this.id != obj.id) collect.push(this); + else { + removeAnchorId = this.anchorID; + } + }); + this.objects = collect; + + axdom("#" + removeAnchorId).remove(); + + }, + bindDateTimeChange: function (objID, objSeq, myTime) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + var printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + }, + bindDateExpandBoxClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var isDateClick = false; + + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, + until: function (evt, evtIDs) { + return (evt.parentNode.tagName == "BODY") ? true : false; + }, + find: function (evt, evtIDs) { + if (!evt.id) return false; + var checkID = cfg.targetID + "_AX_" + objID; + if (evt.id == objID || evt.id.substr(0, checkID.length) == checkID) { + return true; + } else { + return false; + } + } + }); + + isDateClick = (myTarget) ? true : false; + if (!isDateClick) { + this.bindDateExpandClose(objID, objSeq, event); + } else { + + var ids = myTarget.id.split(/_AX_/g); + var ename = ids.last(); + + var nDate = obj.nDate; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (ename == "expandPrev") { + if (obj.mycalendarPageType == "d") { + this.bindDateChangePage(objID, objSeq, nDate.add(-1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindDateChangePage(objID, objSeq, nDate.add(-1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindDateChangePage(objID, objSeq, nDate.add(-12, "y"), "y"); + } + } else if (ename == "expandNext") { + if (obj.mycalendarPageType == "d") { + this.bindDateChangePage(objID, objSeq, nDate.add(1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindDateChangePage(objID, objSeq, nDate.add(1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindDateChangePage(objID, objSeq, nDate.add(12, "y"), "y"); + } + } else if (ename == "controlYear") { + this.bindDateChangePage(objID, objSeq, nDate, "y"); + } else if (ename == "controlMonth") { + if (obj.config.selectType != "y") { + this.bindDateChangePage(objID, objSeq, nDate, "m"); + } + } else if (ename == "date") { + //trace(ids[ids.length-2]); + obj.nDate = ids[ids.length - 2].date(); + var printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + this.bindDateExpandClose(objID, objSeq, event); + } else if (ename == "month") { + var myMonth = ids[ids.length - 2].number() - 1; + if (obj.config.selectType == "m") { + var yy = nDate.getFullYear(); + var dd = 1; + obj.nDate = new Date(yy, myMonth, dd, 12); + this.bindDateExpandClose(objID, objSeq, event); + } else { + var yy = nDate.getFullYear(); + var dd = 1; + obj.nDate = new Date(yy, myMonth, dd, 12); + this.bindDateChangePage(objID, objSeq, obj.nDate, "d"); + } + } else if (ename == "year") { + var myYear = ids[ids.length - 2]; + if (obj.config.selectType == "y") { + var mm = 0; + var dd = 1; + obj.nDate = new Date(myYear, mm, dd, 12); + this.bindDateExpandClose(objID, objSeq, event); + } else { + var mm = 0; + var dd = 1; + obj.nDate = new Date(myYear, mm, dd, 12); + this.bindDateChangePage(objID, objSeq, obj.nDate, "m"); + } + } + } + }, + bindDateKeyup: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (obj.config.selectType == "y") { + + } else if (obj.config.selectType == "m") { + + } else { + + } + }, + bindDateChangePage: function (objID, objSeq, setDate, pageType) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + if (pageType == "m") { + //alert(setDate); + 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 (pageType == "y") { + 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(); + var 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 (obj.config.selectType == "y") { + axdom("#" + objID).val(obj.nDate.print("yyyy")); + } else if (obj.config.selectType == "m") { + axdom("#" + objID).val(obj.nDate.print("yyyy" + separator + "mm")); + } else { + //axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"+separator+"dd")); + var printDate = obj.nDate.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime.getTime(); + } + axdom("#" + objID).val(printDate); + } + }, + /* twinDate ~~~~~~~~~~~~~~~~~ */ + bindTwinDate: function (objID, objSeq, option) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var h = axdom("#" + cfg.targetID + "_AX_" + objID).data("height"); + var 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, true, event); + }); + axdom("#" + objID).unbind("click.AXInput").bind("focus.AXInput", function (event) { + axdom("#" + objID).select(); + /* + if(!AXgetId(cfg.targetID + "_AX_"+objID+"_AX_expandBox")){ + bindDateExpand(objID, objSeq, false, event); + } + */ + }); + axdom("#" + obj.config.startTargetID).unbind("focus.AXInput").bind("focus.AXInput", function (event) { + axdom("#" + obj.config.startTargetID).select(); + /* + if(!AXgetId(cfg.targetID + "_AX_"+objID+"_AX_expandBox")){ + bindDateExpand(objID, objSeq, false, event); + } + */ + }); + + + var separator = (obj.config.separator) ? obj.config.separator : "-"; + axdom("#" + objID + ", #" + obj.config.startTargetID).unbind("keyup.AXInput").bind("keyup.AXInput", function (event) { + //alert(this.value); + if(event.keyCode == axf.Event.KEY_RETURN){ + //bindDateInputBlur(objID, objSeq, event); + 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, ""); //숫자 이외의 문자를 제거 합니다. + var _this = this; + + if (obj.config.selectType == "y") { + if (va.length > 4) _this.value = va.left(4); + } else if (obj.config.selectType == "m") { + if (va.length == 4) { + va = va + separator; + _this.value = va; + } else if (va.length > 4) { + va = va.substr(0, 4) + separator + va.substr(4, 2); + _this.value = va; + } + } else { + if (va.length == 4) { + va = va + separator; + _this.value = va; + } else if (va.length == 6) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator; + _this.value = va; + } else if (va.length == 8) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator + va.substr(6, 2) + " "; + _this.value = va; + } else if (va.length == 10) { + va = va.substr(0, 4) + separator + va.substr(4, 2) + separator + va.substr(6, 2) + " " + va.substr(8, 2) + ":"; + _this.value = va; + } else if (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(); + var objVal2 = axdom("#" + objID).val(); + var myDate1 = objVal1.date(separator); + var myDate2 = objVal2.date(separator); + obj.nDate1 = myDate1; + obj.nDate2 = myDate2; + }, + bindTwinDateExpand: function (objID, objSeq, isToggle, event) { + var cfg = this.config; + + for (var OO, oidx = 0, __arr = this.objects; (oidx < __arr.length && (OO = __arr[oidx])); oidx++) { + if(OO.expandBox_axdom){ + OO.expandBox_axdom.remove(); + OO.expandBox_axdom = null; + } + } + + var obj = this.objects[objSeq]; + + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + //Selector Option box Expand + if (isToggle) { // 활성화 여부가 토글 이면 + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_Handle").removeClass("on"); + //비활성 처리후 메소드 종료 + return; + } + } + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 활성화 전에 개체 삭제 처리 + //axdom("#"+cfg.targetID + "_AX_" + objID+"_AX_Handle").removeClass("on"); + + //Expand Box 생성 구문 작성 + var objVal1 = axdom("#" + obj.config.startTargetID).val(); + var objVal2 = axdom("#" + objID).val(); + + if (obj.config.expandTime) obj.config.selectType == "d"; //시간 확장 시 selectType : d 로 고정 + + var today = new Date(); + var objVal1Empty = false; + if (obj.config.selectType == "y") { + if (objVal1 != "") { + objVal1 = objVal1.left(4) + separator + "01" + separator + "02"; + } else { + objVal1Empty = true; + } + if (objVal2 != "") { + objVal2 = objVal2.left(4) + separator + "01" + separator + "02"; + } + } else if (obj.config.selectType == "m") { + if (objVal1 != "") { + objVal1 = objVal1 + separator + "01"; + } else { + objVal1Empty = true; + } + if (objVal2 != "") { + objVal2 = objVal2 + separator + "01"; + } + } + if (AXUtil.isEmpty(objVal1)) { + objVal1 = ""; + objVal1Empty = true; + } + + /*var myDate1 = (objVal1Empty) ? objVal1.date(separator).add(-1, "m") : objVal1.date(separator);*/ + var myDate1 = objVal1.date(separator); + var myDate2 = objVal2.date(separator); + var myYear1 = myDate1.getFullYear(); + var myYear2 = myDate2.getFullYear(); + var myMonth1 = (myDate1.getMonth() + 1).setDigit(2); + var myMonth2 = (myDate2.getMonth() + 1).setDigit(2); + var po = []; + 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("
"); + if (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("
"); + if (obj.config.expandTime) { //시간 선택 기능 확장시 + po.push("
"); + } + po.push("
"); + po.push("
"); + po.push("
"); + po.push(" "); + po.push("
"); + po.push("
"); + axdom(document.body).append(po.join('')); // bindDateExpandBox append + //axdom("#"+cfg.targetID + "_AX_" + objID+"_AX_Handle").addClass("on"); + + // AXCalendar display + 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 + }); + + if (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"; + var myTimes = myDate1.print("hh:mi").split(":"); + var myHH = myTimes[0].number(); + var myMI = myTimes[1]; + if (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"; + var myTimes = myDate2.print("hh:mi").split(":"); + var myHH = myTimes[0].number(); + var myMI = myTimes[1]; + if (myHH > 12) { + apm = "PM"; + myHH -= 12; + } + obj.mycalendartime2.printTimePage(myHH.setDigit(2) + ":" + myMI.setDigit(2) + " " + apm); + } + + var printDate1 = ""; + var printDate2 = ""; + if (obj.config.selectType == "y") { + 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); + } else if (obj.config.selectType == "m") { + 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); + } else { + 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"); + if (obj.config.expandTime) { + printDate1 += " " + myDate1.print("hh:mi"); + printDate2 += " " + myDate2.print("hh:mi"); + } + axdom("#" + obj.config.startTargetID).val(printDate1); + axdom("#" + objID).val(printDate2); + } + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AXCalendar display + + // expandBox set Position ~~~~~~~~~~~~~~~~~~~~~~~~~ + var expandBox = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox"); + var expBoxWidth = expandBox.outerWidth(); + var expBoxHeight = expandBox.outerHeight(); + var offset = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").offset(); + var handleWidth = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").width(); + var handleHeight = axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_dateHandle").height(); + + + + var css = {}; + if (obj.config.align == "left") { + css.left = offset.left.number() - expBoxWidth; + } else if (obj.config.align == "center") { + css.left = offset.left.number() - expBoxWidth / 2 + handleWidth; + } else if (obj.config.align == "right") { + css.left = offset.left.number() + handleWidth; + } else { + css.left = offset.left.number() + handleWidth; + } + if (obj.config.valign == "top") { + css.top = offset.top; + } else if (obj.config.valign == "middle") { + css.top = offset.top.number() - expBoxHeight / 2 + handleWidth / 2; + } else if (obj.config.valign == "bottom") { + css.top = offset.top.number() - expBoxHeight + handleWidth; + } else { + css.top = offset.top; + } + + var pElement = expandBox.offsetParent(); + var pBox = { width: pElement.width(), height: pElement.height() }; + + var clientHeight = (AXUtil.docTD == "Q") ? document.body.scrollHeight : document.documentElement.scrollHeight; + var clienWidth = (AXUtil.docTD == "Q") ? document.body.scrollWidth : document.documentElement.scrollWidth; + if (clienWidth > pBox.width) pBox.width = clienWidth; + if (clientHeight > pBox.height) pBox.height = clientHeight; + var _box = { width: expandBox.outerWidth() + 10, height: expandBox.outerHeight() + 10 }; + + if ((_box.height.number() + css.top.number()) > pBox.height) { + css.top = css.top - ((_box.height.number() + css.top.number()) - pBox.height); + } + if (css.top < 0) { + css.top = 0; + } + + if ((_box.width.number() + css.left.number()) > pBox.width) { + css.left = css.left - ((_box.width.number() + css.left.number()) - pBox.width); + } + if (css.left < 0) { + css.left = 0; + } + + expandBox.css(css); + obj.expandBox_axdom = expandBox; + + // ~~~~~~~~~~~~~~~~~~~~~~~~~ expandBox set Position ~~~~~~~~~~~~~~~~~~~~~~~~~ + + 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); + } + + if (obj.config.selectType == "y") { + 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]; + var cfg = this.config; + if (seq == 1) { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + var printDate = obj.nDate1.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime1.getTime(); + } + axdom("#" + obj.config.startTargetID).val(printDate); + } else { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + var printDate = obj.nDate2.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime2.getTime(); + } + axdom("#" + objID).val(printDate); + } + }, + bindTwinDateExpandClose: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + //trace("bindTwinDateExpandClose"); + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + + //axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on"); + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// + var objVal1 = axdom("#" + obj.config.startTargetID).val(); + var objVal2 = axdom("#" + objID).val(); + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + if (obj.config.selectType == "y") { + if (objVal1.length < 4) axdom("#" + obj.config.startTargetID).val(obj.nDate1.print("yyyy")); + else { + objVal1 = objVal1.left(4); + axdom("#" + obj.config.startTargetID).val(objVal1); + } + if (objVal2.length < 4) axdom("#" + objID).val(obj.nDate2.print("yyyy")); + else { + objVal2 = objVal2.left(4); + axdom("#" + objID).val(objVal2); + } + } else if (obj.config.selectType == "m") { + axdom("#" + obj.config.startTargetID).val(obj.nDate1.print("yyyy" + separator + "mm")); + axdom("#" + objID).val(obj.nDate2.print("yyyy" + separator + "mm")); + } else { + printDate1 = obj.nDate1.print("yyyy" + separator + "mm" + separator + "dd"); + printDate2 = obj.nDate2.print("yyyy" + separator + "mm" + separator + "dd"); + if (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(); // 개체 삭제 처리 + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + if (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"); + + event.stopPropagation(); // disableevent + return; + } + }, + bindTwinDateExpandBoxClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var isDateClick = false; + + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, + until: function (evt, evtIDs) { + return (evt.parentNode.tagName == "body") ? true : false; + }, + find: function (evt, evtIDs) { + if (evt.id == "" || evt.id == null || evt.id == undefined) return false; + if (evt.id == objID || evt.id == obj.config.startTargetID || (evt.id.substr(0, cfg.targetID.length) == cfg.targetID && (evt.id.search(objID) != -1 || evt.id.search(obj.config.startTargetID) != -1))) { + return true; + } else { + return false; + } + } + }); + + isDateClick = (myTarget) ? true : false; + if (!isDateClick) { + this.bindTwinDateExpandClose(objID, objSeq, event); + } else { + var ids = myTarget.id.split(/_AX_/g); + var ename = ids.last(); + var boxType = ids[ids.length - 3]; + var nDate1 = obj.nDate1; + var nDate2 = obj.nDate2; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (ename == "expandPrev1") { + if (obj.mycalendarPageType == "d") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(-1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(-1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(-12, "y"), "y"); + } + } else if (ename == "expandPrev2") { + if (obj.mycalendarPageType == "d") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(-1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(-1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(-12, "y"), "y"); + } + } else if (ename == "expandNext1") { + if (obj.mycalendarPageType == "d") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1.add(12, "y"), "y"); + } + } else if (ename == "expandNext2") { + if (obj.mycalendarPageType == "d") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(1, "m"), "d"); + } else if (obj.mycalendarPageType == "m") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(1, "y"), "m"); + } else if (obj.mycalendarPageType == "y") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2.add(12, "y"), "y"); + } + } else if (ename == "controlYear1") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1, "y"); + } else if (ename == "controlYear2") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2, "y"); + } else if (ename == "controlMonth1") { + if (obj.config.selectType != "y") { + this.bindTwinDateChangePage(objID, objSeq, 1, nDate1, "m"); + } + } else if (ename == "controlMonth2") { + if (obj.config.selectType != "y") { + this.bindTwinDateChangePage(objID, objSeq, 2, nDate2, "m"); + } + } else if (ename == "date") { + if (boxType == "displayBox1") { + obj.nDate1 = ids[ids.length - 2].date(); + var printDate = obj.nDate1.print("yyyy" + separator + "mm" + separator + "dd"); + if (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"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime2.getTime(); + } + axdom("#" + objID).val(printDate); + obj.mycalendar2.dayPageSetDay(obj.nDate2); + } + + if (obj.nDate1.diff(obj.nDate2) < 0) { + if (boxType == "displayBox1") { + obj.nDate2 = obj.nDate1; + var printDate = obj.nDate2.print("yyyy" + separator + "mm" + separator + "dd"); + if (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"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime1.getTime(); + } + axdom("#" + obj.config.startTargetID).val(printDate); + obj.mycalendar1.dayPageSetDay(obj.nDate1); + } + } + + } else if (ename == "month") { + var myMonth = ids[ids.length - 2].number() - 1; + if (boxType == "displayBox1") { + if (obj.config.selectType == "m") { + var yy = nDate1.getFullYear(); + var dd = nDate1.getDate(); + obj.nDate1 = new Date(yy, myMonth, dd); + var printDate = obj.nDate1.print("yyyy" + separator + "mm"); + axdom("#" + obj.config.startTargetID).val(printDate); + //this.bindTwinDateExpandClose(objID, objSeq, event); + obj.mycalendar1.monthPageSetMonth(obj.nDate1); + } else { + var yy = nDate1.getFullYear(); + var dd = nDate1.getDate(); + obj.nDate1 = new Date(yy, myMonth, dd); + //trace("start ----"); + this.bindTwinDateChangePage(objID, objSeq, 1, obj.nDate1, "d"); + } + } else { + if (obj.config.selectType == "m") { + var yy = nDate2.getFullYear(); + var 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(); + var dd = nDate2.getDate(); + obj.nDate2 = new Date(yy, myMonth, dd); + this.bindTwinDateChangePage(objID, objSeq, 2, obj.nDate2, "d"); + } + } + + if (obj.config.selectType == "m") { + if (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 (ename == "year") { + var myYear = ids[ids.length - 2]; + if (boxType == "displayBox1") { + if (obj.config.selectType == "y") { + var mm = nDate1.getMonth(); + var dd = nDate1.getDate(); + obj.nDate1 = new Date(myYear, mm, dd); + var printDate = obj.nDate1.print("yyyy"); + axdom("#" + obj.config.startTargetID).val(printDate); + //this.bindTwinDateExpandClose(objID, objSeq, event); + obj.mycalendar1.yearPageSetYear(obj.nDate1); + } else { + var mm = nDate1.getMonth(); + var dd = nDate1.getDate(); + obj.nDate1 = new Date(myYear, mm, dd); + this.bindTwinDateChangePage(objID, objSeq, 1, obj.nDate1, "m"); + } + } else { + if (obj.config.selectType == "y") { + var mm = nDate2.getMonth(); + var dd = nDate2.getDate(); + obj.nDate2 = new Date(myYear, mm, dd); + var printDate = obj.nDate2.print("yyyy"); + axdom("#" + objID).val(printDate); + //this.bindTwinDateExpandClose(objID, objSeq, event); + obj.mycalendar2.yearPageSetYear(obj.nDate2); + } else { + var mm = nDate2.getMonth(); + var dd = nDate2.getDate(); + obj.nDate2 = new Date(myYear, mm, dd); + this.bindTwinDateChangePage(objID, objSeq, 2, obj.nDate2, "m"); + } + } + + if (obj.config.selectType == "y") { + if (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); + } + } + } + } + }, + bindTwinDateKeyup: function (objID, objSeq, event) { + //trace(event.keyCode); + if (obj.config.selectType == "y") { + + } else if (obj.config.selectType == "m") { + + } else { + + } + }, + bindTwinDateChangePage: function (objID, objSeq, objType, setDate, pageType) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var separator = (obj.config.separator) ? obj.config.separator : "-"; + + if (pageType == "m") { + if (objType == 1) { + //obj.mycalendarPageType = "m"; + obj.nDate1 = setDate; + obj.mycalendar1.printMonthPage(setDate); + var myYear = setDate.getFullYear(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlYear1").html(myYear + "년"); + } else { + //obj.mycalendarPageType = "m"; + obj.nDate2 = setDate; + obj.mycalendar2.printMonthPage(setDate); + var myYear = setDate.getFullYear(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlYear2").html(myYear + "년"); + } + } else if (pageType == "y") { + if (objType == 1) { + //obj.mycalendarPageType = "y"; + obj.nDate1 = setDate; + obj.mycalendar1.printYearPage(setDate.getFullYear()); + var myYear = setDate.getFullYear(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlYear1").html(myYear + "년"); + } else { + //obj.mycalendarPageType = "y"; + obj.nDate2 = setDate; + obj.mycalendar2.printYearPage(setDate.getFullYear()); + var myYear = setDate.getFullYear(); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_controlYear2").html(myYear + "년"); + } + } else { + //obj.mycalendarPageType = "d"; + + //trace({objID:objID, objSeq:objSeq, objType:objType, setDate:setDate, pageType:pageType}); + + if (objType == 1) { + obj.nDate1 = setDate; + obj.mycalendar1.printDayPage(setDate); + var myYear = setDate.getFullYear(); + var 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(); + var 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 (objType == 1) { + if (obj.config.selectType == "y") { + axdom("#" + obj.config.startTargetID).val(obj.nDate1.print("yyyy")); + } else if (obj.config.selectType == "m") { + axdom("#" + obj.config.startTargetID).val(obj.nDate1.print("yyyy" + separator + "mm")); + } else { + var printDate = obj.nDate1.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime1.getTime(); + } + axdom("#" + obj.config.startTargetID).val(printDate); + } + } else { + if (obj.config.selectType == "y") { + axdom("#" + objID).val(obj.nDate2.print("yyyy")); + } else if (obj.config.selectType == "m") { + axdom("#" + objID).val(obj.nDate2.print("yyyy" + separator + "mm")); + } else { + var printDate = obj.nDate2.print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj.mycalendartime2.getTime(); + } + axdom("#" + objID).val(printDate); + } + } + }, + bindTwinDateInputBlur: function (objID, objSeq, event, seq) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var objVal, targetObjID; + if (seq == 1) { + targetObjID = obj.config.startTargetID; + objVal = axdom("#" + obj.config.startTargetID).val(); + } else { + targetObjID = objID; + objVal = axdom("#" + objID).val(); + } + + if (objVal == "") { + + } else { + var clearDate = false; + var nDate = (obj["nDate" + seq] || new Date()); + var va = axdom("#" + targetObjID).val().replace(/\D/gi, ""); //숫자 이외의 문자를 제거 합니다. + if (va.search(/\d+/g) == -1) { + clearDate = true; + } + + if (clearDate) { + axdom("#" + targetObjID).val(""); + } else { + var separator = (obj.config.separator) ? obj.config.separator : "-"; + if (obj.config.selectType == "y") { + + var yy = va.left(4).number(); + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + var mm = nDate.getMonth(); + var dd = nDate.getDate(); + obj["nDate" + seq] = new Date(yy, mm, dd, 12); + + axdom("#" + targetObjID).val(obj["nDate" + seq].print("yyyy")); + + } else if (obj.config.selectType == "m") { + + if (va.length > 5) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = 1; + } else { + var yy = va.left(4).number(); + var mm = 0; + var dd = 1; + } + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + obj["nDate" + seq] = new Date(yy, mm, dd, 12); + + axdom("#" + targetObjID).val(obj["nDate" + seq].print("yyyy" + separator + "mm")); + + } else { + var needAlert = false; + if (va.length > 7) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = va.substr(6, 2).number(); + } else if (va.length > 5) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = 1; + } else { + var yy = va.left(4).number(); + var mm = nDate.getMonth(); + var dd = nDate.getDate(); + } + if (yy == 0) needAlert = true; + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + obj["nDate" + seq] = new Date(yy, mm, dd, 12); + + if (obj["nDate" + seq].getFullYear() != yy.number() + || obj["nDate" + seq].getMonth() != mm.number() + || obj["nDate" + seq].getDate() != dd.number()) { + needAlert = true; + obj["nDate" + seq] = new Date(); + } + + printDate = obj["nDate" + seq].print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj["mycalendartime" + seq].getTime(); + } + + if (needAlert) { + this.msgAlert("날짜 형식이 올바르지 않습니다."); + } + axdom("#" + targetObjID).val(printDate); + + if (obj.nDate1 == undefined) { + var va = axdom("#" + obj.config.startTargetID).val().replace(/\D/gi, ""); //숫자 이외의 문자를 제거 합니다. + if (va.search(/\d+/g) != -1) { + if (va.length > 7) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = va.substr(6, 2).number(); + } else if (va.length > 5) { + var yy = va.left(4).number(); + var mm = va.substr(4, 2).number() - 1; + var dd = 1; + } else { + var yy = va.left(4).number(); + var mm = nDate.getMonth(); + var dd = nDate.getDate(); + } + if (yy == 0) needAlert = true; + if (yy == 0) yy = nDate.getFullYear(); + if (yy < 1000) yy += 2000; + obj.nDate1 = new Date(yy, mm, dd, 12); + } + } + if (obj.nDate2 == undefined) { + obj.nDate2 = obj.nDate1; + printDate = obj["nDate" + 2].print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj["mycalendartime" + 2].getTime(); + } + axdom("#" + objID).val(printDate); + } + + if (obj.nDate1.diff(obj.nDate2) < 0) { + if (seq == 1) { + obj.nDate2 = obj.nDate1; + printDate = obj["nDate" + 2].print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj["mycalendartime" + 2].getTime(); + } + axdom("#" + objID).val(printDate); + } else { + obj.nDate1 = obj.nDate2; + printDate = obj["nDate" + 1].print("yyyy" + separator + "mm" + separator + "dd"); + if (obj.config.expandTime) { + printDate += " " + obj["mycalendartime" + 1].getTime(); + } + axdom("#" + obj.config.startTargetID).val(printDate); + } + } + } + } + } + + if (!obj.config.onChange) obj.config.onChange = obj.config.onchange; + if (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() + }); + } + + /* ie10 버그 픽스 + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + + //비활성 처리후 메소드 종료 + axdom(document).unbind("click.AXInput"); + axdom("#" + objID).unbind("keydown.AXInput"); + */ + event.stopPropagation(); // disableevent + return; + } +}); + +var AXInput = new AXInputConverter(); +AXInput.setConfig({ targetID: "inputBasic" }); + +axdom.fn.unbindInput = function (config) { + axf.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXInput.unbind(config); + return this; + }); +}; + +axdom.fn.bindSearch = function (config) { + axf.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + config.bindType = "search"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindNumber = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "number"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindMoney = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "money"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindSelector = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "selector"; + AXInput.bind(config); + return this; + }); +}; +axdom.fn.bindSelectorBlur = function (config) { + axf.each(this, function () { + AXInput.bindSelectorBlur(this.id); + return this; + }); +}; + +axdom.fn.bindSlider = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "slider"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindTwinSlider = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "twinSlider"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindSwitch = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "switch"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindSegment = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "segment"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindDate = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "date"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.unbindDate = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + AXInput.unbindDate(config); + return this; + }); +}; + +axdom.fn.bindDateTime = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "date"; + config.expandTime = true; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindTwinDate = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "twinDate"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindTwinDateTime = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "twinDateTime"; + config.expandTime = true; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.bindPlaceHolder = function (config) { + axf.each(this, function () { + config = config || {}; config.id = this.id; + config.bindType = "placeHolder"; + AXInput.bind(config); + return this; + }); +}; + +axdom.fn.setConfigInput = function (config) { + axf.each(this, function () { + AXInput.bindSetConfig(this.id, config); + return this; + }); +}; + +axdom.fn.setValueInput = function (value) { + axf.each(this, function () { + AXInput.bindSetValue(this.id, value); + return this; + }); +}; + +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +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; + + this.touchStartXY = null; + }, + /* 메뉴 터치 이동관련 함수 - e */ + + cancelEvent: function (event) { + event.stopPropagation(); // disable event + return false; + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +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"; + this.config.windowBoxCss = "AXModalBox"; + this.config.padding = "0"; + this.config.defaultTop = 10; + this.config.animateDuration = 300; + this.config.autoHide = false; + this.config.windowID = "AXModal" + AXUtil.timekey(); + this.config.contentDivClass = (AXConfig.AXModal) ? AXConfig.AXModal.contentDivClass : "bodyHeightDiv"; + this.config.displayLoading = true; + }, + init: function () { + var cfg = this.config; + this.mask = jQuery("
"); + }, + setWidth: function (width) { + var cfg = this.config; + if (width) { + cfg.width = width; + this.config.fixedWidth = true; + } else { + cfg.width = undefined; + this.config.fixedWidth = false; + } + + jQuery("#" + cfg.windowID).css({ width: width }); + 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 }); + }, + open: function (http) { + var cfg = this.config; + + if (this._windowOpend) return; + + mask.open(); + this.winID = "mdw" + AXUtil.timekey(); + this.frmID = "frm" + AXUtil.timekey(); + + if (this.config.width) { + var maskWidth = this.config.width; + var maskLeft = (jQuery(document.body).width() / 2) - (this.config.width / 2); + this.config.fixedWidth = true; + } else { + var maskWidth = jQuery(document.body).width() - 50; + var maskLeft = 10; + this.config.fixedWidth = false; + } + + if (http.width) { + maskWidth = http.width; + maskLeft = (jQuery(document.body).width() / 2) - (http.width / 2); + this.config.fixedWidth = true; + } + + var maskTop = this.config.defaultTop; + if (http.top != undefined) { + maskTop = http.top; + } else { + maskTop = jQuery(window).scrollTop() + 100; + } + if (maskLeft < 0) maskLeft = 0; + + var po = []; + po.push("
"); + po.push("
"); + if (cfg.displayLoading) { + po.push("
"); + po.push("
"); + po.push("

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

페이지를 로딩 중입니다. 잠시만 기다려 주세요.
"); + po.push(" 닫기"); + + po.push("
"); + po.push(" "); + + if (isNaN(http.pars.length)) { + jQuery.each(http.pars, function (key, val) { + po.push(" "); + }); + } else { + jQuery.each(http.pars, function () { + jQuery.each(this, function (key, val) { + po.push(" "); + }); + }); + } + po.push("
"); + + if (http.maxHeight) { + po.push(" "); + } else { + po.push(" "); + } + + po.push("
"); + po.push("
"); + + + if (this.config.appendTargetID) { + jQuery("#" + this.config.appendTargetID).append(po.join('')); + } else { + jQuery(document.body).append(po.join('')); + } + + var loadingID = this.config.windowID + "_loading"; + var _winID = this.winID; + var _frmID = this.frmID; + + document[_frmID].submit(); + + jQuery("#" + this.winID).bind("load", function () { + var myIframe = window[_winID]; + + var bodyHeight = jQuery(myIframe.document).innerHeight(); + if (jQuery(myIframe.document.body).find("." + cfg.contentDivClass).get(0)) { + bodyHeight = jQuery(myIframe.document.body).find("." + cfg.contentDivClass).outerHeight(); + } + if (http.maxHeight) { + if (http.maxHeight < (bodyHeight.number() + maskTop.number() + 10)) { + bodyHeight = http.maxHeight - maskTop.number() - 10; + } + } + + jQuery(this).animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + _winID + "_box").animate({ height: (bodyHeight) }, cfg.animateDuration, "cubicInOut"); + jQuery("#" + loadingID).fadeOut("slow"); + jQuery("#" + _winID).addClass("loaded"); + }); + jQuery("#" + this.config.windowID + "_close").bind("click", this.close.bind(this)); + + /* + if (this.mask) { + if (this.config.autoHide) this.mask.bind("click", this.close.bind(this)); + } + */ + //window.scroll(0, 0); + this._windowOpend = true; + + jQuery(window).unbind("resize.AXModal"); + jQuery(window).bind("resize.AXModal", this.onDocResize.bind(this)); + }, + openDiv: function (args) { + mask.open(); + + var modalID = 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; + } else { + maskTop = jQuery(window).scrollTop() + 50; + } + + jQuery("#" + modalID).css({ "top": maskTop }); + + if (args.closeByEscKey) { + var keydown = this.keydown.bind(this); + var keydownBind = function () { + keydown(event, modalID); + }; + jQuery(document.body).bind("keydown.AXModal", keydownBind); + } + + return; + } + + var maskWidth, maskLeft; + if (this.config.width) { + maskWidth = this.config.width; + maskLeft = (jQuery(document.body).width() / 2) - (this.config.width / 2); + this.config.fixedWidth = true; + } else { + maskWidth = jQuery(document.body).width() - 50; + maskLeft = 10; + this.config.fixedWidth = false; + } + + if (args.width) { + maskWidth = args.width; + maskLeft = (jQuery(document.body).width() / 2) - (args.width / 2); + this.config.fixedWidth = true; + } + + var maskTop = this.config.defaultTop; + if (args.top != undefined) { + maskTop = jQuery(window).scrollTop() + args.top; + } else { + maskTop = jQuery(window).scrollTop() + 50; + } + + + if (maskLeft < 0) 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 loadingID = modalID + "_loading"; + + var closeBind = this.close.bind(this); + var closeModal = function (event) { + closeBind(event, modalID); + }; + jQuery("#" + modalID + "_close").bind("click", closeModal); + + if (args.closeByEscKey) { + var keydown = this.keydown.bind(this); + var keydownBind = function () { + keydown(event, modalID); + }; + jQuery(document.body).bind("keydown.AXModal", keydownBind); + } + + /* + if (this.mask) { + if (this.config.autoHide) this.mask.bind("click", close); + } + */ + + 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(); + + if (this.openWindow) { + //top.mask.close(); + this.openWindow.close(); + } + + this.openWindow = window.open("", (http.name || this.winID), http.options); + this.openWindow.focus(); + + if (AXgetId(this.config.windowID)) jQuery("#" + this.config.windowID).remove(); + + var po = []; + po.push("
"); + po.push("
"); + po.push(" "); + + if (isNaN(http.pars.length)) { + jQuery.each(http.pars, function (key, val) { + po.push(" "); + }); + } else { + 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) { + if (event.keyCode == AXUtil.Event.KEY_ESC) { + this.close(event, modalID); + } + }, + close: function (event, modalID) { + if (this.openWindow) { + this.openWindow.close(); + } + + if (event) { + if (event.type == undefined) { + modalID = event; + } + } + + if (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 = false; + } + } + + jQuery(document.body).unbind("keydown.AXModal"); + + if(this.config.onclose){ + this.config.onclose.call( + { + winID: this.winID, + windowID: this.config.windowID, + modalID: modalID + } + ); + } + }, + remove: function (event) { + var windowID = this.config.windowID; + setTimeout(function () { + jQuery("#" + windowID).remove(); + }, 1); + mask.close(); + this._windowOpend = false; + /* + try { + this.mask.remove(); + } catch (e) { } + */ + }, + resize: function (event) { + var cfg = this.config; + var _winID = this.winID; + setTimeout(function () { + var myIframe = window[_winID]; + var bodyHeight = jQuery(myIframe.document).innerHeight(); + 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"); + + //trace({ h: jQuery(myIframe.document.body).find("." + cfg.contentDivClass).height() }); + //trace(bodyHeight); + try { + parent.fcObj.contentResetHeight(); + } catch (e) { + //trace(e); + } + + try { + parent.fnObj.contentResetHeight(null, bodyHeight + 100); + } catch (e) { + //trace(e); + } + }, 50); + }, + 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 }); + } + } catch (e) { + + } + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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 = false; + this.returnJSData = {}; + }, + init: function() { + var cfg = this.config; + if(Object.isUndefined(cfg.targetID)){ + trace("need targetID - setConfig({targetID:''})"); + return; + } + this.target = jQuery("#"+cfg.targetID); + //trace(this.collectItem); + + }, + collectModelItem: function(){ + var cfg = this.config; + var finderCSS = ""; + if(cfg.collectSelector != ""){ + finderCSS = cfg.collectSelector; + }else{ + finderCSS = "input[type=text], input[type=hidden], input[type=radio], input[type=checkbox], select, textarea"; + } + var _this = this; + var getParentSubModel = function(ele){ + var result = false; + var checkEle = ele; + var rooping = true; + while (rooping) { + if(!checkEle.get(0)){ + rooping = false; + break; + } + if(checkEle.get(0).id == cfg.targetID){ + rooping = false; + break; + }else if(checkEle.parent().hasClass(cfg.subModelDetectClassName)){ + result = true; + rooping = false; + break; + }else{ + checkEle = checkEle.parent(); + } + } + return { + result:result, + parents:ele.parentsUntil("#"+cfg.targetID) + }; + }; + + var collectItem = []; + var oncursorKeyup = this.oncursorKeyup.bind(this); + + /*trace(finderCSS);*/ + this.target.find(finderCSS).each(function(){ + var jQueryObj = axdom(this); + var getSubModel = getParentSubModel(axdom(this)); + if(!getSubModel.result){ + var collectOk = false; + if(cfg.excludeClassName != ""){ + collectOk = !jQueryObj.hasClass(cfg.excludeClassName); + }else{ + collectOk = true; + } + + if(collectOk){ + jQueryObj.attr("data-axisjModelId", collectItem.length); + collectItem.push({ + keys:[this.name], + jQueryObj:jQueryObj, + axisjModelId:collectItem.length, + name:this.name, + type:this.type + }); + } + }else{ + + jQueryObj.attr("data-axisjModelId", collectItem.length); + + var relationKey = []; + jQuery.each(getSubModel.parents, function(){ + if(this.id != ""){ + if(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 + }); + } + jQueryObj = null; + }); + + this.collectItem = collectItem; + + + + var returnJSData = {}; + jQuery.each(this.collectItem, function(itemIndex, item){ + var keys = item.keys; + var targetJS = returnJSData; + + var key; + for(var kidx=0;kidx 1) targetJS[key] = []; + else targetJS[key] = ""; + } + }); + + jQuery.each(this.collectItem, function(){ + var keys = this.keys; + var targetJS = returnJSData; + + var key; + for(var kidx=0;kidx 1) targetJS[key].push(nVal); + else targetJS[key] = nVal; + } + }else if(this.type == "radio"){ + if(!AXUtil.isEmpty(nVal)){ + targetJS[key] = nVal; + } + }else{ + if(Object.isArray(targetJS[key])){ + targetJS[key][this.keySeq] = nVal; + }else{ + targetJS[key] = nVal; + } + } + }); + this.returnJSData = returnJSData; + return 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); + var fnApplyValue = function(prefixKey, _val, depth){ + if(depth > 5) return; /* 만약의 경우를 대비하여 10 뎁스 이상 연산 처리 하지 않습니다. 무한 루프를 방지 */ + if(prefixKey != "") prefixKey += "."; + axf.each(_val, function(k, v){ + if(Object.isString(v) || Object.isArray(v) || AXUtil.isEmpty(v) || Object.isNumber(v) ){ + applyValue({key:prefixKey + k}, v); + }else{ + fnApplyValue(prefixKey+k, v, (depth+1)); + } + }); + }; + fnApplyValue("", val, 0); + } + return true; + }, + 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(returnJSData != undefined){ + if(Object.isString(val) || Object.isNumber(val)){ + + var findedItem = false; + jQuery.each(this.collectItem, function(){ + if(this.keys.join(".") == jsPathObj.key){ + if(jsPathObj.keySeq != undefined){ + if(jsPathObj.keySeq == this.keySeq){ + this.jQueryObj.val(val); + findedItem = true; + return false; + } + }else{ + if(this.type == "radio" || this.type == "checkbox"){ + if(this.jQueryObj.get(0).value == val){ + this.jQueryObj.get(0).checked = true; + findedItem = true; + }else{ + this.jQueryObj.get(0).checked = false; + findedItem = true; + } + }else{ + this.jQueryObj.val(val); + findedItem = true; + return false; + } + } + } + }); + + if(!findedItem){ + return {error:"not found keySeq"}; + } + + }else if(Object.isArray(val)){ + + var findedItem = false; + jQuery.each(this.collectItem, function(){ + if(this.keys.join(".") == jsPathObj.key){ + if(jsPathObj.keySeq != undefined){ + if(jsPathObj.keySeq == this.keySeq){ + this.jQueryObj.val(val.join(",")); + findedItem = true; + return false; + }else{ + + } + }else{ + if(this.type == "checkbox" || this.type == "radio"){ + var jQueryObj = this.jQueryObj; + if(val.length == 0){ + jQueryObj.get(0).checked = false; + }else{ + jQueryObj.get(0).checked = false; + axf.each(val, function(){ + if(jQueryObj.get(0).value == this){ + jQueryObj.get(0).checked = true; + } + }); + } + findedItem = true; + }else{ + + if(val[this.keySeq] != undefined){ + this.jQueryObj.val(val[this.keySeq]); + findedItem = true; + } + //return false; + } + } + } + }); + + if(!findedItem){ + return {error:"not found keySeq"}; + } + + } + } + + return true; + }, + + /* cursorFocus */ + oncursorKeyup: function(jQueryObj, event, itemIndex){ + var cfg = this.config; + if(event.ctrlKey) return; + if(cfg.oncursor){ + // AXBind 된 경우에는 위아래 사용을 제한 해야함. 2014-01-04 오후 5:57:24 + var axbind = jQueryObj.attr("data-axbind"); + var htmlTag = jQueryObj.get(0).type; + var direction = ""; + if(event.keyCode == AXUtil.Event.KEY_UP) direction = "U"; + else if(event.keyCode == AXUtil.Event.KEY_DOWN) direction = "D"; + else if(event.keyCode == AXUtil.Event.KEY_LEFT) direction = "L"; + else if(event.keyCode == AXUtil.Event.KEY_RIGHT) direction = "R"; + else if(event.keyCode == AXUtil.Event.KEY_RETURN && axbind != "select" && htmlTag != "textarea") direction = "E"; + if(cfg.oncursor.call( + { + event:event, + direction:direction, + itemIndex:itemIndex, + jQueryObj:jQueryObj + } + ) === false) return false; + if(direction == "") return; + + //trace(jQueryObj.get(0).tagName); + //if(axbind) return; + if(direction == "U" || direction == "D" || direction == "L" || direction == "R") return; + else if(direction == "E" && (event.shiftKey || event.metaKey)){ + if(itemIndex == 0){ + if(cfg.oncursorEmpty){ + cfg.oncursorEmpty({type:"indexOver", index:-1}); + } + return; + } + this.blurItem(jQueryObj); + //this.focusItem(this.collectItem[(itemIndex-1)].jQueryObj); + + var nextItemIndex = itemIndex-1; + for(var ii=nextItemIndex;ii>-1;ii--){ + if(!this.collectItem[ii].jQueryObj.get(0).disabled){ + nextItemIndex = ii; + break; + } + } + this.focusItem(this.collectItem[nextItemIndex].jQueryObj); + }else if(direction == "E"){ + if(itemIndex >= this.collectItem.length-1){ + if(cfg.oncursorEmpty){ + cfg.oncursorEmpty({type:"indexOver", index:1}); + } + return; + } + this.blurItem(jQueryObj); + + var nextItemIndex = itemIndex+1; + for(var ii=nextItemIndex;ii= this.collectItem.length) focusIndex = this.collectItem.length-1; + } + this.focusItem(this.collectItem[focusIndex].jQueryObj); + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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)){ + trace("need targetID - setConfig({targetID:''})"); + return; + } + this.target = jQuery("#"+cfg.targetID); + + var theme = cfg.theme; + /* grid 뼈대 그리기 ----------------------------------------------------------------------------------------------------- */ + var ol = []; + ol.push("
"); + ol.push("
"); + ol.push("
"); + ol.push("
"); + //ol.push("
"); + ol.push("
"); + this.target.empty(); + this.target.append(ol.join('')); + /* grid 뼈대 그리기 ----------------------------------------------------------------------------------------------------- */ + + 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"); + + /*colHead setting */ + this.setColHead(); + //this.scrollBody.css({height:this.scrollBody.outerHeight()+13}); + + this.myUIScroll = new AXScroll(); // 스크롤 인스턴스 선언 + this.myUIScroll.setConfig({ + targetID : cfg.targetID + "_AX_grid", + scrollID : cfg.targetID + "_AX_gridScrollBody", + touchDirection : false, + yscroll:false, + xscroll:true + }); + + jQuery(window).bind("resize", this.windowResize.bind(this)); + }, + windowResizeApply: function () { + var cfg = this.config; + var bodyWidth = this.gridBody.width() - 2; + var colWidth = 0; + var astricCount = 0; + + jQuery.each(cfg.colGroup, function (cidx, CG) { + if(CG.widthAstric){ + CG.width = 0; + CG._owidth = CG.width; + astricCount++; + } + colWidth += (CG._owidth||0).number(); + }); + this.colWidth = colWidth; + + var newColWidth = 0; + /* width * 예외처리 구문 ------------ s */ + if ((bodyWidth) > (colWidth + 100 * astricCount)) { + var remainsWidth = (bodyWidth) - colWidth; + jQuery.each(cfg.colGroup, function (cidx, CG) { + if (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) { + if (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, CG) { + 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; + var po = []; + po.push(""); + jQuery.each(cfg.colGroup, function (cidx, CG) { + po.push(""); + }); + po.push(""); + return po.join(''); + }, + getHeadItem: function (arg) { + + var cfg = this.config; + var po = []; + po.push(""); + po.push("
"); + + if(arg.html){ + var html = arg.html.call({ + rowIndex: arg.rowIndex, + colIndex: arg.colIndex, + data: arg.data + }); + po.push(html); + }else{ + po.push(arg.label); + } + + po.push("
"); + po.push(""); + + return po.join(''); + }, + setColHead: function(rewrite){ + var cfg = this.config; + var bodyWidth = this.gridBody.width()-2; + var colWidth = 0; + var astricCount = 0; + + jQuery.each(cfg.colGroup, function (cidx, CG) { + if (!rewrite){ + if(CG.width == "*"){ + CG.width = 0; + CG.widthAstric = true; + astricCount++; + } + CG._owidth = CG.width; /* 최초의 너비값 기억 하기 */ + }else{ + if(CG.widthAstric){ + CG.width = 0; + CG._owidth = CG.width; + astricCount++; + } + } + colWidth += (CG._owidth||0).number(); + }); + this.colWidth = colWidth; + + var newColWidth = 0; + /* width * 예외처리 구문 ------------ s */ + if ((bodyWidth) > (colWidth + 100 * astricCount)) { + var remainsWidth = (bodyWidth) - colWidth; + jQuery.each(cfg.colGroup, function (cidx, CG) { + if (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) { + if (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); + + var po = []; + po.push(""); + po.push(this.getColGroup("head")); /*colGroup 삽입 */ + 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){ + var cfg = this.config; + this.list = list; + this.printList(); + //this.scrollBody.css({height:this.scrollBody.outerHeight()+13}); + + this.myUIScroll.resizeScroll(); + }, + appendList: function(item){ + var cfg = 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 cfg = this.config; + var po = []; + if(update == undefined) po.push(""); + po.push("
"); + + if(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(" "); + } + + po.push("
");; + if(update == undefined) po.push(""); + + return po.join(''); + }, + printList: function(){ + var cfg = this.config; + var printItem = this.printItem.bind(this); + + var po = []; + po.push(""); + po.push(this.getColGroup("body")); /*colGroup 삽입 */ + 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, event){ + var cfg = this.config; + var getItem = this.getItem.bind(this); + var AXbindOnchange = this.AXbindOnchange.bind(this); + var _body = this.body.find("tbody"); + + var tr = []; + if(update == undefined) 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 + })); + }); + if(update == undefined) tr.push(""); + if(update == undefined){ + _body.append(tr.join()); + }else{ + _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); + var myConfig = AXUtil.copyObject(form.AXBind.config); + jQuery.each(myConfig, function(k, v){ + if(Object.isString(v)) myConfig[k] = v.replace(/@rowIndex/g, lidx); + }); + + myConfig.onchange = function(){ + AXbindOnchange(lidx, fidx, this); + }; + + if(form.AXBind.type == "TwinDate"){ + jQuery("#"+bindID).bindTwinDate(myConfig); + }else if(form.AXBind.type == "Date"){ + jQuery("#"+bindID).bindDate(myConfig); + }else if(form.AXBind.type == "Select"){ + jQuery("#"+bindID).unbindSelect(); + jQuery("#"+bindID).bindSelect(myConfig); + if(cfg.cursorFocus){ + jQuery("#"+bindID).bindSelectGetAnchorObject().bind("keydown.AXModelControlGrid", function(event){ + setTimeout(function(){ + oncursorKeyup(jQuery("#"+bindID), event, lidx); + }, 10); + }); + } + }else if(form.AXBind.type == "Selector"){ + jQuery("#"+bindID).bindSelector(myConfig); + }else if(form.AXBind.type == "Money"){ + jQuery("#"+bindID).bindMoney(myConfig); + } + } + }); + + if(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); + var _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(); + }); + //_body.find("#" + cfg.targetID + "_tbodyTR_" + lidx).find("input[type=checkbox],input[type=radio]") + + if(update == "update"){ + //printFootItem(); + } + }, + oncursorKeyup: function(jQueryObj, event, lidx){ + var cfg = this.config; + + if(!event.target) return; + if(event.shiftKey || event.metaKey || event.ctrlKey) return; + var eventName = jQueryObj.get(0).name; + if(cfg.oncursor){ + var axbind = jQueryObj.attr("data-axbind"); + var direction = ""; + if(event.keyCode == AXUtil.Event.KEY_UP) direction = "U"; + else if(event.keyCode == AXUtil.Event.KEY_DOWN) direction = "D"; + else if(event.keyCode == AXUtil.Event.KEY_LEFT) direction = "L"; + else if(event.keyCode == AXUtil.Event.KEY_RIGHT) direction = "R"; + else if(event.keyCode == AXUtil.Event.KEY_RETURN && axbind != "select") direction = "R"; + if(cfg.oncursor.call( + { + event:event, + direction:direction, + listIndex:lidx, + jQueryObj:jQueryObj + } + ) === false) return false; + if(direction == "") return; + + if(axbind && (direction == "U" || direction == "D")) return; + if((direction == "U" || direction == "D") && jQueryObj.get(0).tagName == "SELECT") return; + if(direction == "U"){ + + if(lidx == 0) 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"); + var findItem; + nextItemList.each(function(){ + if(this.name == eventName) findItem = this; + }); + this.focusItem(jQuery(findItem)); + }else if(direction == "D"){ + + 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"); + var findItem; + nextItemList.each(function(){ + if(this.name == eventName) findItem = this; + }); + this.focusItem(jQuery(findItem)); + + }else if(direction == "L"){ + + var colIndex; + var itemList = this.body.find("#" + cfg.targetID + "_tbodyTR_" + lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea"); + itemList.each(function(cidx, item){ + if(this.name == eventName) colIndex = cidx; + }); + + if(colIndex == 0){ + if(lidx == 0) 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(direction == "R"){ + + var colIndex; + var itemList = this.body.find("#" + cfg.targetID + "_tbodyTR_" + lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea"); + itemList.each(function(cidx, item){ + if(this.name == eventName) colIndex = cidx; + }); + + if(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])); + } + } + + + } + //trace(event.target.name, lidx); + }, + blurItem: function(jQueryObj){ + var cfg = this.config; + var axbind = jQueryObj.attr("data-axbind"); + if(axbind){ + if(axbind == "select"){ + jQueryObj.bindSelectBlur(); + }else if(axbind == "selector"){ + jQueryObj.bindSelectorBlur(); + }else{ + + } + } + }, + focusItem: function(jQueryObj){ + var cfg = this.config; + + var axbind = jQueryObj.attr("data-axbind"); + if(axbind){ + if(axbind == "select") jQueryObj.bindSelectFocus(); + else if(axbind == "selector") jQueryObj.focus(); + else jQueryObj.focus(); + }else{ + jQueryObj.focus(); + } + }, + focusIndex: function(rowIndex, colIndex){ + var cfg = this.config; + //trace(rowIndex, colIndex); + var myTd = this.body.find("tbody tr#" + cfg.targetID + "_tbodyTR_" + rowIndex + " td:nth-child(" + (colIndex+1) + ")"); + //trace(myTd.html()); + var 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); + } + }, + + /* foot */ + printFootItem: function(){ + var cfg = this.config; + + if(!cfg.foot) return; + if(!cfg.foot.form) return; + + var _body = this.body.find("tfoot"); + var _list = this.list; + var foot = []; + foot.push(""); + + jQuery.each(cfg.foot.form, function(fidx, arg){ + foot.push(""); + foot.push("
"); + + if(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; + var getItem = this.getItem.bind(this); + + this.list[lidx] = AXUtil.overwriteObject(this.list[lidx], item, true); + if(!onlyDataChane) this.printItem(lidx, this.list[lidx], "update", event); + else{ + + + 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"); + var myTD = jQuery(_body.find("tbody tr#" + cfg.targetID + "_tbodyTR_" + lidx + " td").get(fidx)); + myTD.html(td); + } + }); + + var oncursorKeyup = this.oncursorKeyup.bind(this); + if(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); + }); + } + + } + + + this.printFootItem(); + }, + removeItem: function(collectIdx){ + var cfg = this.config; + + var newList = []; + axf.each(this.list, function(lidx, L){ + if(Object.isArray(collectIdx)){ + var isOk = true; + axf.each(collectIdx, function(){ + if(this == lidx) isOk = false; + }); + if(isOk) newList.push(L); + }else{ + if(collectIdx != lidx) newList.push(L); + } + }); + + this.setList(newList); + }, + getValue: function(name){ + var cfg = this.config; + var returnValues = []; + this.body.find("input[type=checkbox][name="+name+"]").each(function(){ + returnValues.push(this.value); + }); + return returnValues; + }, + getCheckedValue: function(name){ + var cfg = this.config; + var returnValues = []; + this.body.find("input[type=checkbox][name="+name+"]:checked").each(function(){ + returnValues.push(this.value); + }); + return returnValues; + }, + getList: function(){ + var cfg = this.config; + + var _body = this.body.find("tbody"); + 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(){ + if(this.type == "checkbox"){ + if(checkNames[this.name]){ + checkNames[this.name].count += 1; + }else{ + checkNames[this.name] = {name:this.name, count:1}; + item[this.name] = ""; + } + } + if(this.checked){ + if(this.type == "checkbox"){ + if(item[this.name]){ + item[this.name].push(this.value); + }else{ + item[this.name] = [this.value]; + } + }else{ + item[this.name] = this.value; + } + } + }); + + jQuery.each(checkNames, function(k, v){ + if(v.count == 1){ + if(Object.isArray(item[v.name])){ + item[v.name] = item[v.name].join(","); + } + } + }); + + L = AXUtil.overwriteObject(L, item, true); + }); + + return this.list; + + /* + this.body.find("tr.modelControlTR").each(function(trIndex, TR){ + trace(trIndex); + }); + */ + } +}); + + +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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) { + if (G.getOptionValue) { + jQuery.each(cfg.optionGroup[gidx].options, function (oidx, O) { + cfg.optionGroup[gidx].options[oidx].selected = false; + }); + } + }); + + var po = []; + po.push("
"); + var boxWidth = 0; + jQuery.each(cfg.optionGroup, function(gidx, G){ + 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 + (cfg.optionGroup.length * 5) + 5; + jQuery("#"+cfg.targetID + "_AX_expandBox").css({width:boxWidth}); + + var css = {}; + var offset = jQuery("#"+cfg.targetID).offset(); + css.top = offset.top; + //css.left = offset.left - boxWidth + jQuery("#"+cfg.targetID).outerWidth(); + 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:false + }); + + var selectedValue = ""; + if (G.getOptionValue) selectedValue = G.getOptionValue.call(G); + + jQuery.each(cfg.optionGroup[gidx].options, function (oidx, O) { + if (G.getOptionValue) { + if (O.optionValue == selectedValue) { + O.selected = true; + axdom("#" + cfg.targetID + "_AX_" + gidx + "_AX_option_AX_" + oidx).addClass("on"); + G.myUIScroll.focusElement(cfg.targetID + "_AX_" + gidx + "_AX_option_AX_" + oidx); //focus + } + }else if(O.selected){ + O.selected = true; + axdom("#" + cfg.targetID + "_AX_" + gidx + "_AX_option_AX_" + oidx).addClass("on"); + G.myUIScroll.focusElement(cfg.targetID + "_AX_" + gidx + "_AX_option_AX_" + oidx); //focus + } else { + cfg.optionGroup[gidx].options[oidx].selected = false; + } + }); + + }); + + 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){ + if(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); + var gidx = idx[idx.length-3]; + var 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){ + if(O.selected){ + jQuery("#"+cfg.targetID + "_AX_"+gidx+"_AX_option_AX_"+oidx).removeClass("on"); + delete O.selected; + } + }); + cfg.optionGroup[gidx].options[index].selected = true; + + }); + }, + setValue: function(obj){ + var cfg = this.config; + jQuery.each(cfg.optionGroup, function(gidx, G){ + jQuery.each(obj, function(k, v){ + if(G.name == k){ + jQuery.each(G.options, function(){ + if(this.optionValue+"" == v+""){ + this.selected = true; + }else{ + delete this.selected; + } + }); + + } + }); + }); + + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var 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.easing = {duration:10, easing:""}; + 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; + var loadedRate = (loadedCount / totalCount * 100).round(1); + var progressWidth = config.width || 200; + var progressTitle = config.title || ""; + var progressTop = config.top || 0; + this.progressID = "progress_AX_"+AXUtil.timekey(); + var progressID = this.progressID; + this.progressStop = false; + var theme = config.theme; + + var hasCancel = false; + + if(config.options){ + if(config.options.totalCount) totalCount = config.options.totalCount; + if(config.options.width) progressWidth = config.options.width; + if(config.options.top) progressTop = config.options.top; + if(config.options.title) progressTitle = config.options.title; + if(config.options.cancel) hasCancel = config.options.cancel; + if(config.options.theme) theme = config.options.theme; + } + + var po = []; + po.push("
"); + if(progressTitle != ""){ + po.push("
"+progressTitle+"
"); + } + po.push("
"); + po.push("
"); + if(theme == "AXlineProgress") po.push("
"); + else po.push("
"); + + po.push("
"); + + po.push("
"+loadedRate+"%
"); + + if(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; + var theme = config.theme; + + if(this.progressStop) return; + + var totalCount = config.totalCount || 100; + + if(config.options){ + if(config.options.totalCount) totalCount = config.options.totalCount; + if(config.options.theme) theme = config.options.theme; + } + + var loadedCount = this.loadedCount; + + var progressID = this.progressID; + var loadedRate = ((loadedCount-1) / (totalCount.number()) * 100).round(1); + if(loadedRate > 100) loadedRate = 100; + jQuery("#"+progressID+"_AX_loadedText").html(loadedRate+"%"+(loadedCount-1).money()+"/"+totalCount.money()+""); + + if(theme == "AXlineProgress"){ + jQuery("#"+progressID+"_AX_bar").animate( + {width:loadedRate+"%"}, + config.duration, "", + function(){ + if(config.callBack){ + config.callBack.call({ + totalCount:totalCount, + loadedCount:loadedCount, + loadedRate:(loadedCount / (totalCount.number()+1) * 100).round(1), + isEnd:((loadedCount-1) == totalCount) + }); + } + } + ); + }else{ + //circle + setTimeout(function(){ + jQuery("#"+progressID+"_AX_bar").addClass("percent"+((loadedCount / (totalCount.number()) * 100).round(0) / 5).round() * 5); + if(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; + var progressID = this.progressID; + var cancelMSg = AXConfig.AXProgress.cancelMsg; + if(config.options){ + var cancel = config.options.cancel; + if(cancel.confirmMsg) cancelMSg = cancel.confirmMsg; + if(confirm(cancelMSg)){ + this.progressStop = true; + var totalCount = config.totalCount || 100; + var loadedCount = this.loadedCount; + cancel.oncancel.call({ + totalCount:totalCount, + loadedCount:loadedCount, + loadedRate:(loadedCount / totalCount * 100).round(1), + isEnd:(loadedCount == totalCount) + }); + }else{ + + } + } + }, + restart: function(){ + this.progressStop = false; + this.update(); + }, + close: function(){ + var config = this.config; + var progressID = this.progressID; + jQuery("#"+progressID+"_AX_tray").remove(); + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +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"; + }, + init: function() { + var cfg = this.config; + if(Object.isUndefined(cfg.targetID)){ + trace("need targetID - setConfig({targetID:''})"); + return; + } + this.setBody(); + }, + getItem: function(gr, itemIndex, item){ + var cfg = this.config; + var po = []; + var itemAddClass = []; + var itemAddStyles = []; + if(item.addClass) itemAddClass.push(item.addClass); + if(item.style) itemAddStyles.push(item.style); + if(item.type == "label"){ + 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("
"); + }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("
"); + }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("
"); + }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("
"); + }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("
"); + }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("
"); + } + return po.join(''); + }, + setBody: function(){ + var cfg = this.config; + 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("
"); + + jQuery("#"+cfg.targetID).html(po.join('')); + + if(cfg.onsubmit){ + document[cfg.targetID+"_AX_form"].onsubmit = function(){ + cfg.onsubmit(); + return false; + }; + } + + 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; + var display = this.display; + var itemID = cfg.targetID + "_AX_" + gr + "_AX_" + itemIndex + "_AX_" + item.key; + + if(display){ + if(item.AXBind.type == "selector"){ + jQuery("#"+itemID).bindSelector(item.AXBind.config); + }else if(item.AXBind.type == "select"){ + jQuery("#"+itemID).bindSelect(item.AXBind.config); + }else if(item.AXBind.type == "date"){ + jQuery("#"+itemID).bindDate(item.AXBind.config); + }else if(item.AXBind.type == "twinDate"){ + var startTargetID = item.AXBind.config.startTargetID; + var findItemID = ""; + jQuery.each(cfg.rows, function(gidx, G){ + jQuery.each(this.list, function(itemIndex, item){ + if(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; + if(this.expanded){ + jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색"); + jQuery("#"+cfg.targetID).find(".expandGroup").hide(); + this.expanded = false; + }else{ + jQuery("#"+cfg.targetID+"_AX_expandHandle").html("상세검색창 닫기"); + jQuery("#"+cfg.targetID).find(".expandGroup").show(); + this.expanded = true; + + jQuery.each(this.AXBinds, function(){ + var gr = this.gr, itemIndex = this.itemIndex, item = this.item; + var display = this.display; + var itemID = cfg.targetID + "_AX_" + gr + "_AX_" + itemIndex + "_AX_" + item.key; + if(!display){ + if(item.AXBind.type == "selector"){ + jQuery("#"+itemID).bindSelector(item.AXBind.config); + }else if(item.AXBind.type == "select"){ + jQuery("#"+itemID).bindSelect(item.AXBind.config); + }else if(item.AXBind.type == "date"){ + jQuery("#"+itemID).bindDate(item.AXBind.config); + }else if(item.AXBind.type == "twinDate"){ + + var startTargetID = item.AXBind.config.startTargetID.split(/_AX_/g).last(); + var findItemID = ""; + jQuery.each(cfg.rows, function(gidx, G){ + jQuery.each(this.list, function(itemIndex, item){ + if(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; + var ids = (event.target.id).split(/_AX_/g); + var index = ids.pop(); + var gr = ids[ids.length-3]; + var itemIndex = ids[ids.length-2]; + var item = cfg.rows[gr].list[itemIndex]; + //trace({itemIndex:itemIndex, item:item}); + + var targetID = ""; + jQuery.each(ids, function(ii, io){ + if(ii > 0) targetID += "_AX_"; + targetID += this; + }); + //trace(item.options[index].optionValue); + + if(item.selectedIndex != undefined){ + 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); + + if(item.onChange){ + item.onChange.call(item, item.options[index], item.options[index].optionValue); + } + }, + onclickCheckboxItem: function(event){ + var cfg = this.config; + var ids = (event.target.id).split(/_AX_/g); + var index = ids.pop(); + var gr = ids[ids.length-3]; + var itemIndex = ids[ids.length-2]; + var item = cfg.rows[gr].list[itemIndex]; + + var frm = document[cfg.targetID+"_AX_form"]; + var selectedIndex = 0; + var selectedValue = ""; + + if(isNaN(frm[item.key].length)){ + if(frm[item.key].checked){ + selectedValue = frm[item.key].value; + } + }else{ + for(var i=0;i"); + var iobj = jQuery("#" + objID); + iobj.attr("data-axbind", "select"); + if(this.isMobile) iobj.before(anchorNode); + else iobj.after(anchorNode); + + var iobjPosition = iobj.position(); + var l = iobjPosition.left, t = iobjPosition.top, w = 0, h = 0; + +/* + var borderW = iobj.css("border-left-width").number(); + var borderT = iobj.css("border-top-width").number(); + var borderB = iobj.css("border-bottom-width").number(); + var marginW = iobj.css("margin-left").number(); + var marginH = iobj.css("margin-top").number(); +*/ + //l = l + marginW; + //t = t; + w = iobj.outerWidth(); + h = iobj.outerHeight(); + + var css = { left: l, top: t, width: w, height: h }, objDom = axdom("#" + cfg.targetID + "_AX_" + objID); + objDom.css(css); + objDom.data("height", h); + + }, + alignAnchor: function (objID){ + var cfg = this.config; + //trace(objID); + var iobj = axdom("#" + objID); + //iobj.show(); + var iobjPosition = iobj.position(); + var l = iobjPosition.left, t = iobjPosition.top, w = 0, h = 0; + + var borderW = iobj.css("border-left-width").number(); + var borderT = iobj.css("border-top-width").number(); + var borderB = iobj.css("border-bottom-width").number(); + var marginW = iobj.css("margin-left").number(); + var marginH = iobj.css("margin-top").number(); + l = l + marginW; + + //t = t; + w = iobj.outerWidth(); + h = iobj.outerHeight(); + + var css = { left: l, top: t, width: w, height: h }; + axdom("#" + cfg.targetID + "_AX_" + objID).css(css); + axdom("#" + cfg.targetID + "_AX_" + objID).data("height", h); + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBox").css({width:w, height:h}); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").css({height:(h-(borderT+borderB))+"px"}); + + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectText").css({"line-height":(h-(borderT+borderB))+"px"}); + axdom("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBoxArrow").css({height:h}); + + //iobj.hide(); + + }, + bindSelect: function (objID, objSeq) { + var cfg = this.config, _this = this; + var obj = this.objects[objSeq]; + var iobj = axdom("#" + objID); + var objDom = axdom("#" + cfg.targetID + "_AX_" + objID); + if(!obj.config.onChange) obj.config.onChange = obj.config.onchange; + + var w = jQuery("#" + cfg.targetID + "_AX_" + objID).width(); + var h = jQuery("#" + cfg.targetID + "_AX_" + objID).data("height"); + var borderT = iobj.css("border-top-width").number(); + var borderB = iobj.css("border-bottom-width").number(); + //trace(obj.config); + + var fontSize = jQuery("#" + objID).css("font-size").number(); + var tabIndex = jQuery("#" + objID).attr("tabindex"); + + var po = []; + po.push(""); + + //append to anchor + jQuery("#" + cfg.targetID + "_AX_" + objID).empty(); + jQuery("#" + cfg.targetID + "_AX_" + objID).append(po.join('')); + //jQuery("#" + cfg.targetID + "_AX_" + objID).css({ height: h + "px", "position": "relative", display: "inline-block", left: "auto", top: "auto", "vertical-align": "middle" }); + //jQuery("#" + cfg.targetID + "_AX_" + objID).css({ height: h + "px", "position": "relative", display: "inline-block", left: "auto", top: "auto", "vertical-align": "middle" }); + + jQuery("#" + cfg.targetID + "_AX_" + objID).show(); + + + //alert(AXgetId(objID).options.selectedIndex); + obj.selectedIndex = AXgetId(objID).options.selectedIndex; + var options = []; + for (var oi = 0; oi < AXgetId(objID).options.length; oi++) { + options.push({ optionValue: AXgetId(objID).options[oi].value, optionText: AXgetId(objID).options[oi].text.enc() }); + } + obj.options = AXUtil.copyObject(options); + + if (this.isMobile) { + + // mobile 브라우저인 경우 + jQuery("#" + objID).css({opacity:0}); + var bindSelectChange = this.bindSelectChange.bind(this); + obj.objOnChange = function () { + bindSelectChange(objID, objSeq); + } + //jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBox").append(jQuery("#" + objID)); // 사용안함. + + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").bind("click.AXSelect", function (event) { + jQuery("#" + objID).click(); + }); + + jQuery("#" + objID).addClass("rootSelectBox"); + jQuery("#" + objID).bind("change.AXSelect", obj.objOnChange); + + } else { + //AXUtil.alert(obj.options); + + // PC 브라우저인 경우 + jQuery("#" + objID).css({opacity:0}); + var bindSelectExpand = this.bindSelectExpand.bind(this); + var bindSelectClose = this.bindSelectClose.bind(this); + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").bind("click.AXSelect", function (event) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").focus(); + bindSelectExpand(objID, objSeq, true, event); + }); + + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").bind("keydown.AXSelect", function (event) { + if(event.keyCode == AXUtil.Event.KEY_SPACE) bindSelectExpand(objID, objSeq, true, event); + if(event.keyCode == AXUtil.Event.KEY_TAB || event.keyCode == AXUtil.Event.KEY_RETURN) return; + //trace(String.fromCharCode(event.keyCode)); + + if(_this.selectTextBox_onkeydown_obj){ + clearTimeout(_this.selectTextBox_onkeydown_obj); + _this.selectTextBox_onkeydown_data += String.fromCharCode(event.keyCode); + }else{ + _this.selectTextBox_onkeydown_data = String.fromCharCode(event.keyCode); + } + + _this.selectTextBox_onkeydown_obj = setTimeout(function(){ + _this.selectTextBox_onkeydown(objID, objSeq, event); + }, 300); + }); + } + + if (obj.config.ajaxUrl) { + + var bindSelectChangeBind = this.bindSelectChange.bind(this); + var bindSelectChange = function () { + bindSelectChangeBind(objID, objSeq); + }; + + var url = obj.config.ajaxUrl; + var pars = obj.config.ajaxPars; + obj.selectedIndex = null; + + jQuery("#" + objID).empty(); + + obj.inProgress = true; //진행중 상태 변경 + + var async = (obj.config.ajaxAsync == undefined) ? true : obj.config.ajaxAsync; + new AXReq(url, { + debug: false, async: async, pars: pars, onsucc: function (res) { + if (res.result == AXUtil.ajaxOkCode) { + + //trace(res); + var po = []; + if (obj.config.isspace) { + po.push(""); + } + for (var opts, oidx = 0; (oidx < res.options.length && (opts = res.options[oidx])); oidx++) { + po.push(""); + }; + jQuery("#" + objID).html(po.join('')); + + var options = []; + for (var oi = 0; oi < AXgetId(objID).options.length; oi++) { + options.push({ optionValue: AXgetId(objID).options[oi].value, optionText: AXgetId(objID).options[oi].text.enc() }); + } + obj.options = AXUtil.copyObject(options); + obj.selectedIndex = AXgetId(objID).options.selectedIndex; + + if (obj.config.onChange) { + obj.config.focusedIndex = obj.selectedIndex; + obj.config.selectedObject = obj.options[obj.selectedIndex]; + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + + bindSelectChange(); + + if (obj.config.onLoad) { + obj.config.onLoad.call(res); + } + + } else { + //trace(res); + } + obj.inProgress = false; + } + }); + + } else if (obj.config.options) { + + var po = []; + if (obj.config.isspace) { + po.push(""); + } + + for (var opts, oidx = 0; (oidx < obj.config.options.length && (opts = obj.config.options[oidx])); oidx++) { + var optionText = (opts.optionText||"").dec(); + po.push(""); + }; + jQuery("#" + objID).html(po.join('')); + + var options = []; + for (var oi = 0; oi < AXgetId(objID).options.length; oi++) { + options.push({ optionValue: AXgetId(objID).options[oi].value, optionText: AXgetId(objID).options[oi].text.enc() }); + } + obj.options = AXUtil.copyObject(options); + obj.selectedIndex = AXgetId(objID).options.selectedIndex; + + this.bindSelectChange(objID, objSeq); + /* + if (obj.config.onChange) { + obj.config.focusedIndex = obj.selectedIndex; + obj.config.selectedObject = obj.options[obj.selectedIndex]; + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + */ + + } else { + this.bindSelectChange(objID, objSeq); + + /* + if (obj.config.onChange) { + var selectedOption = this.getSelectedOption(objID, objSeq); + if (selectedOption) { + var sendObj = {optionValue:selectedOption.value, optionText:selectedOption.text}; + obj.config.onChange.call(sendObj, sendObj); + } + } + */ + + } + }, + selectTextBox_onkeydown: function(objID, objSeq, event){ + var cfg = this.config, _this = this; + var obj = this.objects[objSeq]; + + var bindSelectClose = this.bindSelectClose.bind(this); + var chkVal = (_this.selectTextBox_onkeydown_data || ""), chkIndex = null; + + for (var O, index = 0; (index < obj.options.length && (O = obj.options[index])); index++) { + if(O.optionValue.left(chkVal.length).lcase() == chkVal.lcase() || O.optionText.left(chkVal.length).lcase() == chkVal.lcase()){ + chkIndex = index; + break; + } + }; + if(chkIndex != null){ + obj.selectedIndex = chkIndex; + obj.config.focusedIndex = chkIndex; + obj.config.selectedObject = obj.options[chkIndex]; + obj.config.isChangedSelect = true; + bindSelectClose(objID, objSeq, event); // 값 전달 후 닫기 + } + _this.selectTextBox_onkeydown_data = ""; + }, + getSelectedOption: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + if(AXgetId(objID).options.selectedIndex > -1){ + try{ + if(obj.selectedIndex != AXgetId(objID).options.selectedIndex) obj.selectedIndex = AXgetId(objID).options.selectedIndex; + }catch(e){ + + } + return AXgetId(objID).options[AXgetId(objID).options.selectedIndex]; + }else{ + return AXgetId(objID).options[0]; + } + }, + bindSelectChange: function (objID, objSeq) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var selectedOption = this.getSelectedOption(objID, objSeq); + if (selectedOption) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectText").html(selectedOption.text); + } + }, + bindSelectExpand: function (objID, objSeq, isToggle, event) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var jqueryTargetObjID = jQuery("#"+ cfg.targetID + "_AX_" + objID); + //Selector Option box Expand + + if(jqueryTargetObjID.data("disabled")) return; + + if (isToggle) { // 활성화 여부가 토글 이면 + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + if (obj.config.isChangedSelect) { + this.bindSelectClose(objID, objSeq, event); // 닫기 + } else { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBoxArrow").removeClass("on"); + //비활성 처리후 메소드 종료 + jQuery(document).unbind("click.AXSelect"); + jQuery(document).unbind("keydown.AXSelect"); + } + return; + } + } + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 활성화 전에 개체 삭제 처리 + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBoxArrow").removeClass("on"); + + //Expand Box 생성 구문 작성 + var anchorWidth = jQuery("#" + cfg.targetID + "_AX_" + objID).width() - 2; // anchor width + var anchorHeight = jQuery("#" + cfg.targetID + "_AX_" + objID).data("height") - 1; + var styles = []; + //styles.push("top:"+anchorHeight+"px"); + styles.push("width:" + anchorWidth + "px"); + + var po = []; + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + po.push("
"); + jQuery(document.body).append(po.join('')); + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBoxArrow").addClass("on"); + + var expandBox = jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox"); + if(obj.config.positionFixed){ + expandBox.css({"position":"fixed"}); + } + var expBoxHeight = expandBox.outerHeight(); + var offset = (obj.config.positionFixed) ? jqueryTargetObjID.position() : jqueryTargetObjID.offset(); + + if(obj.config.position){ + offset = jqueryTargetObjID.offset(); + if(obj.config.position.top != undefined){ + offset.top = obj.config.position.top; + } + } + var css = {}; + css.top = offset.top + anchorHeight; + //css.top = offset.top; + css.left = offset.left; + + var bodyHeight; + (AXUtil.docTD == "Q") ? bodyHeight = document.body.scrollHeight : bodyHeight = document.documentElement.scrollHeight; + //trace({bodyHeight:bodyHeight, top:css.top}); + + if(!obj.config.positionFixed){ + if (bodyHeight < css.top.number() + expBoxHeight) { + css = { + top: offset.top - expBoxHeight, + left: offset.left + } + } + } + + expandBox.css(css); + + this.bindSelectSetOptions(objID, objSeq); + }, + bindSelectClose: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + //trace("bindSelectorClose"); + var cfg = this.config; + if (AXgetId(cfg.targetID + "_AX_" + objID + "_AX_expandBox")) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").remove(); // 개체 삭제 처리 + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectBoxArrow").removeClass("on"); + + //비활성 처리후 메소드 종료 + jQuery(document).unbind("click", obj.documentclickEvent); + jQuery(document).unbind("keydown", obj.documentKeyup); + + if (obj.config.isChangedSelect) { + + AXgetId(objID).options[obj.selectedIndex].selected = true; + if (obj.config.onChange) { + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + obj.config.isChangedSelect = false; + + this.bindSelectChange(objID, objSeq); + + } + + if(event) event.stopPropagation(); // disableevent + return; + }else{ + if (obj.config.isChangedSelect) { + + AXgetId(objID).options[obj.selectedIndex].selected = true; + if (obj.config.onChange) { + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + obj.config.isChangedSelect = false; + + this.bindSelectChange(objID, objSeq); + + } + } + }, + bindSelectSetOptions: function (objID, objSeq) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var jqueryTargetObjID = jQuery("#" + cfg.targetID + "_AX_" + objID); + var maxHeight = obj.config.maxHeight || 200; + + if (!obj.options) return; + if (obj.options.length == 0) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").hide(); + } + + var po = []; + for (var O, index = 0; (index < obj.options.length && (O = obj.options[index])); index++) { + po.push("" + O.optionText.dec() + ""); + }; + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandScroll").html(po.join('')); + + var expandScrollHeight = jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandScroll").height(); + if (expandScrollHeight > maxHeight) expandScrollHeight = maxHeight; + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox").css({ height: expandScrollHeight + "px" }); + + var bindSelectOptionsClick = this.bindSelectOptionsClick.bind(this); + obj.documentclickEvent = function (event) { + bindSelectOptionsClick(objID, objSeq, event); + } + var bindSelectKeyup = this.bindSelectKeyup.bind(this); + obj.documentKeyup = function (event) { + bindSelectKeyup(objID, objSeq, event); + } + jQuery(document).bind("click.AXSelect", obj.documentclickEvent); + jQuery(document).bind("keydown.AXSelect", obj.documentKeyup); + + if (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: false + }); + + if (obj.selectedIndex != undefined) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_" + obj.selectedIndex + "_AX_option").addClass("on"); + obj.myUIScroll.focusElement(cfg.targetID + "_AX_" + objID + "_AX_" + obj.selectedIndex + "_AX_option"); //focus + obj.config.focusedIndex = obj.selectedIndex; + } + + // 위치 재 정의 필요하면 정의 할 것 ---------------------------------- + var bodyHeight; + (AXUtil.docTD == "Q") ? bodyHeight = document.body.clientHeight : bodyHeight = document.documentElement.clientHeight; + //trace({bodyHeight:bodyHeight, top:css.top}); + + var anchorHeight = jqueryTargetObjID.data("height") - 1; + var expandBox = jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_expandBox"); + var expBoxHeight = expandBox.outerHeight(); + + var offset = (obj.config.positionFixed) ? jqueryTargetObjID.position() : jqueryTargetObjID.offset(); + + if(obj.config.position){ + offset = jqueryTargetObjID.offset(); + if(obj.config.position.top != undefined){ + offset.top = obj.config.position.top; + } + } + + var css = {}; + css.top = offset.top + anchorHeight; + if(!obj.config.positionFixed){ + if (bodyHeight < css.top.number() + expBoxHeight) { + css = { + top: offset.top - expBoxHeight, + left: offset.left + } + expandBox.css(css); + } + } + // 위치 재 정의 필요하면 정의 할 것 ---------------------------------- + + }, + bindSelectOptionsClick: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + var isSelectorClick = false; + var eid = event.target.id.split(/_AX_/g); + var tgid = event.target.id; + //trace(tgid.substr(eid[0].length, objID.length)+"///"+objID); + if (event.target.id == "") isSelectorClick = false; + else { + if (event.target.id == objID || (eid[0] == cfg.targetID && tgid.substr(eid[0].length + 4, objID.length) == objID)) { + isSelectorClick = true; + } + } + + if (!isSelectorClick) { + this.bindSelectClose(objID, objSeq, event); // 셀럭터 외의 영역이 므로 닫기 + } else { + if (eid.last() == "option") { + var selectedIndex = eid[eid.length - 2]; + obj.selectedIndex = selectedIndex; + obj.config.focusedIndex = selectedIndex; + obj.config.selectedObject = obj.options[selectedIndex]; + + obj.config.isChangedSelect = true; + this.bindSelectClose(objID, objSeq, event); // 값 전달 후 닫기 + } + } + }, + bindSelectKeyup: function (objID, objSeq, event) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (event.keyCode == AXUtil.Event.KEY_TAB || event.keyCode == AXUtil.Event.KEY_ESC) { + this.bindSelectClose(objID, objSeq, event); // 닫기 + return; + } else if (event.keyCode == AXUtil.Event.KEY_UP) { + if (!obj.options) return; + if (obj.options.length == 0) return; + var focusIndex = obj.options.length - 1; + if (obj.config.focusedIndex == undefined || obj.config.focusedIndex == 0) { + + } else { + focusIndex = (obj.config.focusedIndex) - 1; + } + this.bindSelectorSelect(objID, objSeq, focusIndex); + } else if (event.keyCode == AXUtil.Event.KEY_DOWN) { + if (!obj.options) return; + if (obj.options.length == 0) return; + var focusIndex = 0; + if (obj.config.focusedIndex == undefined || obj.config.focusedIndex == obj.options.length - 1) { + + } else { + focusIndex = (obj.config.focusedIndex).number() + 1; + } + this.bindSelectorSelect(objID, objSeq, focusIndex); + } else if (event.keyCode == AXUtil.Event.KEY_RETURN) { + //alert("RETURN"); + /* + jQuery(document).unbind("click", obj.documentclickEvent); + jQuery(document).unbind("keydown", obj.documentKeyup); + */ + /* + var selectedIndex = eid[eid.length - 2]; + obj.selectedIndex = selectedIndex; + obj.config.focusedIndex = selectedIndex; + obj.config.selectedObject = obj.options[selectedIndex]; + + obj.config.isChangedSelect = true; + this.bindSelectClose(objID, objSeq, event); // 값 전달 후 닫기 + */ + + } + }, + /* ~~~~~~~~~~~~~ */ + + bindSelectorSelect: function (objID, objSeq, index, changeValue) { + var obj = this.objects[objSeq]; + var cfg = this.config; + if (obj.config.focusedIndex != undefined) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_" + obj.config.focusedIndex + "_AX_option").removeClass("on"); + } + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_" + index + "_AX_option").addClass("on"); + obj.config.focusedIndex = index; + obj.selectedIndex = index; + obj.config.selectedObject = obj.options[index]; + obj.config.isChangedSelect = true; + obj.myUIScroll.focusElement(cfg.targetID + "_AX_" + objID + "_AX_" + index + "_AX_option"); //focus + }, + bindSelectorSelectClear: function (objID, objSeq) { + + var obj = this.objects[objSeq]; + var cfg = this.config; + if (obj.selectedIndex != undefined) { + jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_" + obj.selectedIndex + "_AX_option").removeClass("on"); + } + obj.selectedIndex = null; + obj.config.focusedIndex = null; + obj.config.selectedObject = null; + obj.config.isChangedSelect = true; + }, + + /* ~~~~~~~~~~~~~ */ + bindSelectChangeValue: function (objID, value, onEnd) { + var findIndex = null; + + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + + if (findIndex == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } else { + var obj = this.objects[findIndex]; + var cfg = this.config; + + if (this.isMobile) { + for (var oi = 0; oi < AXgetId(objID).options.length; oi++) { + if (AXgetId(objID).options[oi].value == value) { + var selectedIndex = oi; + AXgetId(objID).options[oi].selected = true; + obj.config.selectedObject = { optionValue: AXgetId(objID).options[oi].value, optionText: AXgetId(objID).options[oi].text.enc() }; + this.bindSelectChange(objID, findIndex); + if (obj.config.onChange) { + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + break; + } + } + } else { + var selectedIndex = null; + for (var O, oidx = 0; (oidx < obj.options.length && (O = obj.options[oidx])); oidx++) { + if ((O.optionValue || O.value || "") == value) { + selectedIndex = oidx; + break; + } + }; + + if (selectedIndex != null) { + + obj.selectedIndex = selectedIndex; + obj.config.focusedIndex = selectedIndex; + + AXgetId(objID).options[obj.selectedIndex].selected = true; + obj.config.selectedObject = obj.options[selectedIndex]; + this.bindSelectChange(objID, selectedIndex); + + if (obj.config.onChange) { + obj.config.onChange.call(obj.config.selectedObject, obj.config.selectedObject); + } + + } else { + //trace("일치하는 값을 찾을 수 없습니다."); + } + } + } + }, + bindSelectDisabled: function(objID, disabled){ + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + + if (findIndex == null) { + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + } else { + var obj = this.objects[findIndex]; + var cfg = this.config; + + if (this.isMobile) { + AXgetId(objID).disabled = disabled; + } else { + AXgetId(objID).disabled = disabled; + if(AXgetId(objID).disabled){ + jQuery("#"+ cfg.targetID + "_AX_" + objID).find(".AXanchorSelect").addClass("disabled"); + jQuery("#"+ cfg.targetID + "_AX_" + objID).data("disabled", AXgetId(objID).disabled); + }else{ + jQuery("#"+ cfg.targetID + "_AX_" + objID).find(".AXanchorSelect").removeClass("disabled"); + jQuery("#"+ cfg.targetID + "_AX_" + objID).data("disabled", AXgetId(objID).disabled); + } + + } + } + }, + bindSelectUpdate: function(objID){ + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + if(findIndex != null){ + this.bindSelectChange(objID, findIndex); + } + }, + bindSelectFocus: function(objID){ + var cfg = this.config; + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + if(findIndex != null){ + AXgetId(cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox").focus(); + } + }, + bindSelectBlur: function(objID){ + var cfg = this.config; + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + if(findIndex != null){ + this.bindSelectClose(objID, findIndex); + } + }, + bindSelectGetAnchorObject: function(objID){ + var cfg = this.config; + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + if(findIndex != null){ + return jQuery("#" + cfg.targetID + "_AX_" + objID + "_AX_SelectTextBox"); + } + }, + bindSelectGetValue: function(objID, onEnd){ + var findIndex = null; + for (var O, index = 0; (index < this.objects.length && (O = this.objects[index])); index++) { + if (O.id == objID && O.isDel != true) { + findIndex = index; + break; + } + }; + + if (findIndex == null) { + return { optionValue: null, optionText: null, error:"바인드 된 오브젝트를 찾을 수 없습니다." }; + } else { + var obj = this.objects[findIndex]; + var cfg = this.config; + + if (obj.selectedIndex != undefined) { + return { optionValue: AXgetId(objID).options[ obj.selectedIndex ].value, optionText: AXgetId(objID).options[ obj.selectedIndex ].text }; + }else{ + return { optionValue: null, optionText: null }; + } + } + } +}); + +var AXSelect = new AXSelectConverter(); +AXSelect.setConfig({ targetID: "AXselect" }); + +jQuery.fn.unbindSelect = function (config) { + jQuery.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXSelect.unbind(config); + return this; + }); +}; + +jQuery.fn.bindSelect = function (config) { + jQuery.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXSelect.bind(config); + return this; + }); +}; + +jQuery.fn.setConfigSelect = function (config) { + jQuery.each(this, function () { + AXSelect.bindSetConfig(this.id, config); + return this; + }); +}; + +jQuery.fn.bindSelectSetValue = function (value, onEnd) { + jQuery.each(this, function () { + AXSelect.bindSelectChangeValue(this.id, value, onEnd); + return this; + }); +}; + +jQuery.fn.bindSelectGetValue = function (onEnd) { + return AXSelect.bindSelectGetValue(this[0].id, onEnd); +}; + +//SetText +//getText + +jQuery.fn.setValueSelect = function (value, onEnd) { + jQuery.each(this, function () { + AXSelect.bindSelectChangeValue(this.id, value, onEnd); + return this; + }); +}; + +jQuery.fn.bindSelectDisabled = function (Disabled) { + jQuery.each(this, function () { + AXSelect.bindSelectDisabled(this.id, Disabled); + return this; + }); +}; + +jQuery.fn.bindSelectUpdate = function () { + jQuery.each(this, function () { + AXSelect.bindSelectUpdate(this.id); + return this; + }); +}; + +jQuery.fn.bindSelectFocus = function () { + jQuery.each(this, function () { + AXSelect.bindSelectFocus(this.id); + return this; + }); +}; + +jQuery.fn.bindSelectBlur = function () { + jQuery.each(this, function () { + AXSelect.bindSelectBlur(this.id); + return this; + }); +}; + +jQuery.fn.bindSelectGetAnchorObject = function(){ + var returnObj; + jQuery.each(this, function () { + returnObj = AXSelect.bindSelectGetAnchorObject(this.id); + return this; + }); + return returnObj; +}; +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +var AXSlideViewer = Class.create(AXJ, { + version: "AXSlideViewer V1.1", + author: "tom@axisj.com", + logs: [ + "2014-03-23 오후 3:33:35 - tom: start", + "2014-03-28 오전 8:35:50 - tom: Beta 완성", + "2014-04-24 - tom: onClose 추가" + ], + initialize: function(AXJ_super) { + AXJ_super(); + this.config.theme = "AXSlideViewer"; + /*this.uniqueId = axf.getUniqueId();*/ + this.config.id = axf.getUniqueId(); + this.config.fitToHeight = false; + var _parent = this, cfg = this.config; + this.touchUpdater = { + firstTouch:{}, firstBoxModel:{}, moveType:"", item:{}, lastTouch:{}, + watch: function(){ + var _this = this; + + if(axf.browser.mobile){ + axdom(document.body).bind("touchmove.axsliderviewer", function(){ + _this.update(window.event); + }); + axdom(document.body).bind("touchend.axsliderviewer", function(){ + _this.watchEnd(window.event); + }); + }else{ + axdom(document.body).bind("mousemove.axsliderviewer", function(event){ + _this.update(event); + }); + axdom(document.body).bind("mouseup.axsliderviewer", function(event){ + _this.watchEnd(event); + }); + axdom(document.body).bind("mouseleave.axsliderviewer", function(event){ + _this.watchEnd(event); + }); + } + }, + update: function(event){ + var touch = {}; + + if(axf.browser.mobile){ + touch.pageX1 = event.touches[0].pageX - this.item._boxModel.dL; + touch.pageY1 = event.touches[0].pageY - this.item._boxModel.dT; + + if(event.touches.length == 2){ + touch.pageX2 = event.touches[1].pageX - this.item._boxModel.dL; + touch.pageY2 = event.touches[1].pageY - this.item._boxModel.dT; + touch.centerX = (touch.pageX2 + touch.pageX1) / 2; + touch.centerY = (touch.pageY2 + touch.pageY1) / 2; + }else{ + touch.centerX = touch.pageX1; + touch.centerY = touch.pageY1; + } + + + this.lastTouch = touch; + _parent.imgTouchUpdate( {firstTouch:this.firstTouch, firstBoxModel:this.firstBoxModel, touch:touch, moveType:this.moveType, item:this.item}, event ); + + if (event.stopPropagation) event.stopPropagation(); + if (event.preventDefault) event.preventDefault(); + return false; + + }else{ + touch.pageX1 = event.pageX - this.item._boxModel.dL; + touch.pageY1 = event.pageY - this.item._boxModel.dT; + touch.centerX = touch.pageX1; + touch.centerY = touch.pageY1; + + this.lastTouch = touch; + _parent.imgTouchUpdate( {firstTouch:this.firstTouch, firstBoxModel:this.firstBoxModel, touch:touch, moveType:this.moveType, item:this.item}, event ); + + } + + }, + watchEnd: function(event){ + if(axf.browser.mobile){ + axdom(document.body).unbind("touchmove.axsliderviewer"); + axdom(document.body).unbind("touchend.axsliderviewer"); + }else{ + axdom(document.body).unbind("mousemove.axsliderviewer"); + axdom(document.body).unbind("mouseup.axsliderviewer"); + axdom(document.body).unbind("mouseleave.axsliderviewer"); + } + //관성 적용 법칙... + _parent.imgTouchEnd( {firstTouch:this.firstTouch, firstBoxModel:this.firstBoxModel, moveType:this.moveType, item:this.item}, event ); + } + }; + this.touchClicked = false; + this.touchDblClicked = false; + this.touchAndMoved = false; + }, + init: function() { + var cfg = this.config; + var reserveKeys = { + title: "title", + description: "description", + url: "url" + }; + if (cfg.reserveKeys) { + axf.overwriteObject(reserveKeys, cfg.reserveKeys, true); + cfg.reserveKeys = reserveKeys; + } else { + cfg.reserveKeys = reserveKeys; + } + }, + open: function(jsObject){ // jsArray, jsObject + var cfg = this.config, _this = this; + + this.isOpend = true; + + axdom(document.body).data("scrollTop", axdom(document.body).scrollTop()); + axdom(document.body).children().hide(); + //this.bodyElement = axdom(document.body).children().not("script"); + //axdom(document.body).children().not("script").remove(); + + this.screenSize = { + width:axf.clientWidth(), + height:axf.clientHeight() + }; + var po = []; + po.push('
'); + + po.push('
'); + + po.push('
'); + po.push('
'); + + po.push('
'); + + po.push('
'); + po.push('

'); + po.push(''); + po.push('
'); + + po.push(''); + + po.push('
'); + po.push('Toggle'); + po.push(''); + po.push(''); + po.push('Next'); + po.push('Next'); + po.push('
'); + + po.push('Close'); + po.push('
'); + + po.push('
'); + + axdom(document.body).append( po.join('') ); + + this.target = axdom( '#' + cfg.id +'_AX_viewer' ); + this.background = axdom( '#' + cfg.id +'_AX_background' ); + this.slideItemGrop = axdom( '#' + cfg.id +'_AX_slideItemGrop' ); + this.controller = axdom( '#' + cfg.id +'_AX_controller' ); + + this.controller.find(".Close").bind("click.AXSlideViewer", function(event){ + _this.close(); + }); + + this.controller.find(".ToggleHandle").bind("click.AXSlideViewer", function(event){ + _this.controller.find(".buttonGroup").toggleClass("open"); + }); + this.controller.find(".Prev").bind("click.AXSlideViewer", function(event){ + _this.prev(); + }); + this.controller.find(".Next").bind("click.AXSlideViewer", function(event){ + _this.next(); + }); + + this.controller.find(".ZoomIn").bind("click.AXSlideViewer", function(event){ + _this.zoomIn(); + }); + this.controller.find(".ZoomOut").bind("click.AXSlideViewer", function(event){ + _this.zoomOut(); + }); + + this.list = jsObject.list; + this.selectedIndex = (jsObject.selectedIndex || 0); + + this.openImage(this.selectedIndex); + axdom(window).bind("resize.AXSliderViewer", this.windowResize.bind(this)); + + if(axf.browser.mobile){ + + var eventBodyID = cfg.id +'_AX_slideItemGrop'; + if (document.addEventListener) { // 터치 이벤트 시작 + AXgetId(eventBodyID).addEventListener("touchstart", function(event){ + var touch = {}; + var item = _this.list[_this.selectedIndex]; + + if (_this.touhEndObserver) clearTimeout(_this.touhEndObserver); + _this.velocityDX = 0; + _this.velocityDY = 0; + touch.pageX1 = event.touches[0].pageX - item._boxModel.dL; + touch.pageY1 = event.touches[0].pageY - item._boxModel.dT; + if(event.touches.length == 2){ + touch.pageX2 = event.touches[1].pageX - item._boxModel.dL; + touch.pageY2 = event.touches[1].pageY - item._boxModel.dT; + touch.centerX = (touch.pageX2 + touch.pageX1) / 2; + touch.centerY = (touch.pageY2 + touch.pageY1) / 2; + _this.touchUpdater.moveType = "zoom"; + }else{ + touch.centerX = touch.pageX1; + touch.centerY = touch.pageY1; + _this.touchUpdater.moveType = "move"; + } + _this.touchUpdater.firstTouch = touch; + _this.touchUpdater.firstBoxModel = axf.copyObject(item._boxModel); + _this.touchUpdater.item = item; + _this.touchUpdater.watch(); + }, false); + } + + }else{ // deskTop + + var eventBodyID = cfg.id +'_AX_slideItemGrop'; + + axdom("#" +eventBodyID).bind("mousedown.axsliderviewer", function(event){ + var touch = {}; + var item = _this.list[_this.selectedIndex]; + + if (_this.touhEndObserver) clearTimeout(_this.touhEndObserver); + _this.velocityDX = 0; + _this.velocityDY = 0; + touch.pageX1 = event.pageX - item._boxModel.dL; + touch.pageY1 = event.pageY - item._boxModel.dT; + + touch.centerX = touch.pageX1; + touch.centerY = touch.pageY1; + + _this.touchUpdater.moveType = "move"; + + _this.touchUpdater.firstTouch = touch; + _this.touchUpdater.firstBoxModel = axf.copyObject(item._boxModel); + _this.touchUpdater.item = item; + _this.touchUpdater.watch(); + }); + + var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; + var contentScrollScrollWheel = function(){ + if (_this.wheelEndObserver) clearTimeout(_this.wheelEndObserver); + var event = window.event; + var delta = event.detail ? event.detail * (-1) : event.wheelDelta; + var item = _this.list[_this.selectedIndex]; + + var cx = event.pageX - item._boxModel.dL; + var cy = event.pageY - item._boxModel.dT; + var dLen = (delta > 0) ? 50 : -50; + _this.imgResize(item, item._boxModel, dLen, cx, cy); + _this.wheelEndObserver = setTimeout(function(){ + var pos = item._axdom.position(); + var sL = 0, eL = 0, sT = 0, eT = 0, scW = _this.screenSize.width, scH = _this.screenSize.height, iW = item._axdom.width(), iH = item._axdom.height(); + + var imgAnmate = false; + var css = {left:pos.left, top:pos.top, opacity:1}; + var __left = css.left, __top = css.top; + + if(iW < scW && iH < scH){ + iW = css.width = item._boxModel.width; + iH = css.height = item._boxModel.height; + } + + if(iW < scW){ + sL = (scW - iW) / 2; + eL = sL; + }else{ + sL = 0; + eL = scW - iW; + } + if(iH < scH){ + sT = (scH - iH) / 2; + eT = sT; + }else{ + sT = 0; + eT = scH - iH; + } + + if(css.left > sL ){ + css.left = sL; + imgAnmate = true; + }else if(css.left < eL ){ + css.left = eL; + imgAnmate = true; + } + if(css.top > sT ){ + css.top = sT;imgAnmate = true; + }else if(css.top < eT ){ + css.top = eT;imgAnmate = true; + } + if(imgAnmate){ + item._axdom.stop(); + item._axdom.animate(css); + if(!isNaN(css.left)) item._boxModel.dL = css.left; + if(!isNaN(css.top)) item._boxModel.dT = css.top; + + if(!isNaN(css.width)) item._boxModel.dW = css.width; + if(!isNaN(css.height)) item._boxModel.dH = css.height; + } + + + }, 300); + }; + if (document.attachEvent) { /*if IE (and Opera depending on user setting) */ + AXgetId(eventBodyID).attachEvent("on" + mousewheelevt, contentScrollScrollWheel); + } else if (document.addEventListener) { /*WC3 browsers */ + AXgetId(eventBodyID).addEventListener(mousewheelevt, contentScrollScrollWheel, false); + } + + + } + }, + windowResizeApply: function () { + var cfg = this.config, _this = this; + this.screenSize = { + width:axf.clientWidth(), + height:axf.clientHeight() + }; + + var selectedIndex = this.selectedIndex; + if(selectedIndex > 0){ + axdom('#' + cfg.id +'_AX_slide_AX_' + (selectedIndex-1)).css({left:-this.screenSize.width}); + } + if(selectedIndex < this.list.length-1){ + axdom('#' + cfg.id +'_AX_slide_AX_' + (selectedIndex.number()+1)).css({left:this.screenSize.width}); + } + + var item = this.list[selectedIndex]; + _this.renderImage( axdom('#' + cfg.id +'_AX_slide_AX_' + selectedIndex), item); + }, + openImage: function(selectedIndex){ + var cfg = this.config, _this = this; + selectedIndex = selectedIndex.number(); + var item = this.list[selectedIndex]; + + //this.slideItemGrop + var slides = []; + if(selectedIndex > 0) slides.push( {id:cfg.id +'_AX_slide_AX_' + (selectedIndex-1), index:(selectedIndex-1), left:-this.screenSize.width} ); + slides.push( {id:cfg.id +'_AX_slide_AX_' + (selectedIndex), index:(selectedIndex), left:0} ); + if(selectedIndex < this.list.length-1) slides.push( {id:cfg.id +'_AX_slide_AX_' + (selectedIndex.number()+1), index:(selectedIndex.number()+1), left:this.screenSize.width} ); + + this.slideItemGrop.find(".slideItem").each(function(){ + for (var ii, i = 0; (i < slides.length && (ii = slides[i])); i++) { + if(ii.id != this.id) axdom(this).remove(); + } + }); + + for (var ii, i = 0; (i < slides.length && (ii = slides[i])); i++) { + if( !AXgetId(ii.id) ) this.slideItemGrop.append( '
' ); + } + + var hgroup = this.controller.find(".hgroup"); + hgroup.find("h1").html( item[cfg.reserveKeys.title] ); + hgroup.find("span").html( item[cfg.reserveKeys.description] ); + + if(selectedIndex == 0){ + this.controller.find(".Prev").addClass("disabled"); + this.controller.find(".Next").removeClass("disabled"); + }else if(selectedIndex == this.list.length-1){ + this.controller.find(".Prev").removeClass("disabled"); + this.controller.find(".Next").addClass("disabled"); + }else{ + this.controller.find(".Prev").removeClass("disabled"); + this.controller.find(".Next").removeClass("disabled"); + } + + this.controller.find(".navigation").html( (selectedIndex+1) + " / " + this.list.length ); + + var mySlide = axdom('#' + cfg.id +'_AX_slide_AX_' + (selectedIndex)); + var myImg = new Image(); + myImg.src = item[cfg.reserveKeys.url]; + if(!item._boxModel){ + myImg.onload = function(){ + item._boxModel = {originalWidth:this.width, originalHeight:this.height}; + _this.renderImage( mySlide , item); + } + }else{ + _this.renderImage( mySlide, item); + } + }, + renderImage: function( target, item ){ + + var cfg = this.config, _this = this; + var imgRatio = (item._boxModel.originalHeight / item._boxModel.originalWidth).round(2); + var imgWidth = item._boxModel.originalWidth; imgHeight = item._boxModel.originalHeight; + + if(cfg.fitToHeight == true){ + imgHeight = this.screenSize.height; imgWidth = imgHeight / imgRatio; + if(this.screenSize.width > imgWidth){ + imgWidth = this.screenSize.width; imgHeight = imgWidth * imgRatio; + } + }else{ + if(imgRatio < 1){ + if(this.screenSize.width < imgWidth){ + imgWidth = this.screenSize.width; imgHeight = imgWidth * imgRatio; + } + if(this.screenSize.height < imgHeight){ + imgHeight = this.screenSize.height; imgWidth = imgHeight / imgRatio; + } + }else{ + if(this.screenSize.height < imgHeight){ + imgHeight = this.screenSize.height; imgWidth = imgHeight / imgRatio; + } + if(this.screenSize.width < imgWidth){ + imgWidth = this.screenSize.width; imgHeight = imgWidth * imgRatio; + } + } + } + + item._boxModel.width = item._boxModel.dW = imgWidth; + item._boxModel.height = item._boxModel.dH = imgHeight; + + var styles = []; + styles.push("width:"+imgWidth+"px"); + styles.push("height:"+imgHeight+"px"); + + item._boxModel.left = item._boxModel.dL = (this.screenSize.width / 2 - imgWidth / 2); + item._boxModel.top = item._boxModel.dT = (this.screenSize.height / 2 - imgHeight / 2); + + styles.push("left:"+ item._boxModel.left +"px"); + styles.push("top:"+ item._boxModel.top +"px"); + + var po = []; + po.push('
'); + po.push(''); + po.push('
'); + + target.empty(); + target.append( po.join('') ); + + target.find(".img").fadeIn(); + target.removeClass("AXLoadingBlack"); + + item._axdom = target.find(".img"); + }, + close: function(){ + var cfg = this.config, _this = this; + axdom(document.body).children().show(); //테스트 필요 + axdom(document.body).scrollTop( axdom(document.body).data("scrollTop") ); + if(cfg.onClose) cfg.onClose.call(cfg); + this.target.fadeOut(function(){ + _this.target.remove(); + + }); + this.isOpend = false; + axdom(window).unbind("resize.AXSliderViewer"); + }, + prev: function(){ + var cfg = this.config, _this = this; + var screenWidth = this.screenSize.width; + var selectedIndex = this.selectedIndex; + if(selectedIndex <= 0) return false; + var prevIndex = selectedIndex.number() - 1; + + var nowDomTarget = axdom('#' + cfg.id +'_AX_slide_AX_' + selectedIndex); + var prevDomTarget = axdom('#' + cfg.id +'_AX_slide_AX_' + prevIndex); + + nowDomTarget.animate({left:screenWidth}, 500, "expoOut", function(){ + + }); + prevDomTarget.animate({left:0}, 300, "expoOut", function(){ + _this.selectedIndex = prevIndex; + _this.openImage(prevIndex); + }); + return true; + }, + next: function(){ + var cfg = this.config, _this = this; + var screenWidth = this.screenSize.width; + var selectedIndex = this.selectedIndex; + if(selectedIndex >= this.list.length-1) return false; + var nextIndex = selectedIndex.number() + 1; + + var nowDomTarget = axdom('#' + cfg.id +'_AX_slide_AX_' + selectedIndex); + var nextDomTarget = axdom('#' + cfg.id +'_AX_slide_AX_' + nextIndex); + + nowDomTarget.animate({left:-screenWidth}, 500, "expoOut", function(){ + + }); + nextDomTarget.animate({left:0}, 300, "expoOut", function(){ + _this.selectedIndex = nextIndex; + _this.openImage(nextIndex); + }); + return true; + }, + zoomIn: function(){ + var cfg = this.config, _this = this; + var item = this.list[this.selectedIndex]; + + var cx = this.screenSize.width/2 - item._boxModel.dL; + var cy = this.screenSize.height/2 - item._boxModel.dT; + var dLen = (this.screenSize.width>this.screenSize.height) ? this.screenSize.height : this.screenSize.width; + this.imgResize(item, item._boxModel, dLen, cx, cy, "animate"); + }, + zoomOut: function(){ + var cfg = this.config, _this = this; + var item = this.list[this.selectedIndex]; + var cx = this.screenSize.width/2 - item._boxModel.dL; + var cy = this.screenSize.height/2 - item._boxModel.dT; + var dLen = (this.screenSize.width>this.screenSize.height) ? this.screenSize.height : this.screenSize.width; + this.imgResize(item, item._boxModel, -dLen, cx, cy, "animate"); + }, + + imgResize: function(item, firstBoxModel, dLen, cx, cy, animate){ + //trace(firstBoxModel.dW); + //trace(item._boxModel.dW, item._boxModel.dH, item._boxModel.dL, item._boxModel.dT); 조작해야할 변수들 + var cfg = this.config, _this = this; + var css = {}, newW, newH, newL, newT, imgRatio = (item._boxModel.originalHeight / item._boxModel.originalWidth).round(3); + + if(dLen == null){ + + newL = item._boxModel.left + newT = item._boxModel.top + newW = item._boxModel.width + newH = item._boxModel.height + + }else{ + newW = firstBoxModel.dW + dLen; + newH = newW * imgRatio; + + //firstBoxModel.dW : newW = cx : newL + if(cx == null){ + newL = (this.screenSize.width/2); + mewT = (this.screenSize.width/2); + //newL = -(newW * cx / firstBoxModel.dW - cx) + firstBoxModel.dL; + //newT = -(newH * cy / firstBoxModel.dH - cy) + firstBoxModel.dT; + }else{ + newL = -(newW * cx / firstBoxModel.dW - cx) + firstBoxModel.dL; + newT = -(newH * cy / firstBoxModel.dH - cy) + firstBoxModel.dT; + } + } + + // 영역을 벗어나는 변경에 대해서 감지 + + css = {left:newL, top:newT, width:newW, height:newH, opacity:1}; + if( this.changeImgCss(item._axdom, css, animate) ){ + //현재아이템에 이동정보 기록 + item._boxModel.dL = newL; + item._boxModel.dT = newT; + item._boxModel.dW = newW; + item._boxModel.dH = newH; + } + }, + imgTouchUpdate: function(args){ + var cfg = this.config; + this.touchAndMoved = true; + if (this.touhEndObserver) clearTimeout(this.touhEndObserver); + if(args.moveType == "zoom"){ + var l1dx, l1dy, l2dx, l2dy, l1, l2, dLen; + l1dx = (args.firstTouch.pageX2 > args.firstTouch.pageX1) ? args.firstTouch.pageX2 - args.firstTouch.pageX1 : args.firstTouch.pageX1 - args.firstTouch.pageX2; + l1dy = (args.firstTouch.pageY2 > args.firstTouch.pageY1) ? args.firstTouch.pageY2 - args.firstTouch.pageY1 : args.firstTouch.pageY1 - args.firstTouch.pageY2; + + l2dx = (args.touch.pageY2 > args.touch.pageY1) ? args.touch.pageY2 - args.touch.pageY1 : args.touch.pageY1 - args.touch.pageY2; + l2dy = (args.touch.pageY2 > args.touch.pageY1) ? args.touch.pageY2 - args.touch.pageY1 : args.touch.pageY1 - args.touch.pageY2; + + l1 = Math.sqrt(Math.pow(l1dx, 2) + Math.pow(l1dy, 2)); // 첫번째 터치의 선분의 길이 + l2 = Math.sqrt(Math.pow(l2dx, 2) + Math.pow(l2dy, 2)); // 이동중인 터치의 선분의 길이 + + dLen = ((l2-l1)*1.2).round(3); // 크기 변화량 + if(!isNaN(dLen)){ + //이동량 만큼 이미지를 크게 하거나 줄이기. + //trace(args.firstTouch.centerX, args.firstTouch.centerY); + this.imgResize(args.item, args.firstBoxModel, dLen, args.firstTouch.centerX, args.firstTouch.centerY); + } + }else{ + var mx, my, newL, newT; + mx = (args.firstTouch.centerX - args.touch.centerX).round(); + my = (args.firstTouch.centerY - args.touch.centerY).round(); + + if(this._mx == null){ + this.velocityDX = 0; + this.velocityDY = 0; + }else{ + this.velocityDX = this._mx - mx; + this.velocityDY = this._my - my; + } + + this._mx = mx; + this._my = my; + + if(args.item._boxModel.width == args.item._boxModel.dW){ // zoom 이 되지 않았을 때 + if(mx.abs() > my.abs()){ + newL = args.firstBoxModel.dL - mx; + newT = args.firstBoxModel.dT; + }else{ + newL = args.firstBoxModel.dL; + newT = args.firstBoxModel.dT - my; + } + }else{ + newL = args.firstBoxModel.dL - mx; + newT = args.firstBoxModel.dT - my; + } + + if( this.changeImgCss(args.item._axdom, {left:newL, top:newT}) ){ + + } + } + }, + imgTouchEnd: function(args, event){ + var cfg = this.config, _this = this; + var pos = args.item._axdom.position(); + + args.item._boxModel.dL = pos.left; + args.item._boxModel.dT = pos.top; + + var sL = 0, eL = 0, sT = 0, eT = 0, scW = this.screenSize.width, scH = this.screenSize.height, iW = args.item._axdom.width(), iH = args.item._axdom.height(); + + //trace(pos.left, this.velocityDX); + + var imgAnmate = false; + if(args.moveType == "move"){ + var css = {left:pos.left + (this.velocityDX||0)*10, top:pos.top + (this.velocityDY||0)*10, opacity:1}; + }else{ + var css = {left:pos.left, top:pos.top, opacity:1}; + } + var __left = css.left, __top = css.top; + + if(iW < scW && iH < scH){ + iW = css.width = args.item._boxModel.width; + iH = css.height = args.item._boxModel.height; + } + + if(iW < scW){ + sL = (scW - iW) / 2; + eL = sL; + }else{ + sL = 0; + eL = scW - iW; + } + if(iH < scH){ + sT = (scH - iH) / 2; + eT = sT; + }else{ + sT = 0; + eT = scH - iH; + } + + if(css.left > sL ){ + if(args.moveType == "move"){ + if( (css.left + iW) - scW > scW * 0.35 ){ + if(this.prev()) return "prev"; + } + } + css.left = sL; + imgAnmate = true; + }else if(css.left < eL ){ + if(args.moveType == "move"){ + if( (css.left + iW) < scW * 0.35 ){ + if(this.next()) return "next"; + } + } + css.left = eL; + imgAnmate = true; + } + if(css.top > sT ){ + if(args.moveType == "move" && args.item._boxModel.width == args.item._boxModel.dW){ + if( (css.top + iH) - scH > scH * 0.35 ){ + this.close(); + return "close"; + } + } + css.top = sT;imgAnmate = true; + }else if(css.top < eT ){ + if(args.moveType == "move" && args.item._boxModel.width == args.item._boxModel.dW){ + if( (css.top + iH) < scH * 0.35 ){ + this.close(); + return "close"; + } + } + css.top = eT;imgAnmate = true; + } + if(imgAnmate){ + args.item._axdom.stop(); + args.item._axdom.animate(css); + if(!isNaN(css.left)) args.item._boxModel.dL = css.left; + if(!isNaN(css.top)) args.item._boxModel.dT = css.top; + if(args.moveType == "zoom"){ + if(!isNaN(css.width)) args.item._boxModel.dW = css.width; + if(!isNaN(css.height)) args.item._boxModel.dH = css.height; + } + } + + this._mx = null; + this._my = null; + + if( !this.touchAndMoved ){ + if(this.touchClicked){ + //trace("dbl click"); + this.imgDblClick(args.item, event); + this.touchDblClicked = true; + }else{ + this.touchClicked = true; + } + } + + this.touhEndObserver = setTimeout(function () { + if( !_this.touchAndMoved && !_this.touchDblClicked && _this.touchClicked){ + _this.imgClick(args.item, event); + } + _this.touchClicked = false; // 0.3후에 이전 터치 상태 해제 + _this.touchDblClicked = false; + _this.touchAndMoved = false; + }, 200); + }, + changeImgCss: function(img, css, animate){ + if(css.width != undefined && css.width < 100) return; + //img.stop(); + if(animate){ + img.animate(css); + }else{ + img.css(css); + } + return css; + }, + imgClick: function(item, event){ + //trace("imgClick"); + var cfg = this.config; + this.controller.toggle(); + this.touchClicked = false; // 0.3후에 이전 터치 상태 해제 + this.touchDblClicked = false; + }, + imgDblClick: function(item, event){ + //trace("imgDblClick"); + var cfg = this.config; + + if(item._boxModel.dW > this.screenSize.width){ + this.imgResize(item, this.touchUpdater.firstBoxModel, null, this.touchUpdater.firstTouch.centerX, this.touchUpdater.firstTouch.centerY, "animate"); + //this.renderImage( axdom('#' + cfg.id +'_AX_slide_AX_' + this.selectedIndex), item); + }else{ + var dLen = this.screenSize.width * 2; + this.imgResize(item, this.touchUpdater.firstBoxModel, dLen, this.touchUpdater.firstTouch.centerX, this.touchUpdater.firstTouch.centerY, "animate"); + } + this.touchClicked = false; // 0.3후에 이전 터치 상태 해제 + this.touchDblClicked = false; + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +var AXTabClass = Class.create(AXJ, { + version: "AXTabClass V0.5", + author: "tom@axisj.com", + logs: [ + "2013-07-05 오후 1:16:16", + "2014-04-14 : tom 모바일 반응 너비 지정 방식 변경 & ff 타이밍 버그 픽스 " + ], + initialize: function(AXJ_super) { + AXJ_super(); + this.objects = []; + this.config.handleWidth = 22; + this.config.responsiveMobile = AXConfig.mobile.responsiveWidth; + this.config.bounces = true; + }, + init: function(){ + axdom(window).bind("resize", this.windowResize.bind(this)); + }, + windowResize: function () { + var windowResizeApply = this.windowResizeApply.bind(this); + if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver); + this.windowResizeObserver = setTimeout(function () { + windowResizeApply(); + }, 500); + }, + windowResizeApply: function(){ + this.resizeCheck(); + }, + bind: function (obj) { + var cfg = this.config; + + if (!obj.id) { + trace("bind 대상 ID가 없어 bind 처리할 수 없습니다."); + return; + } + if (!AXgetId(obj.id)) { + trace("bind 대상이 없어 bind 처리할 수 없습니다."); + return; + } + + var objID = obj.id; + var objSeq = null; + + obj.theme = (obj.theme || "AXTabs"); + obj.overflow = (obj.overflow || "visible"); + obj.scrollAmount = (obj.scrollAmount || 5); + obj.options = (obj.options || [{optionValue:"null", optionText:"빈 탭"}]); + + jQuery.each(this.objects, function (idx, O) { + if (this.id == objID){ + objSeq = idx; + return false; + } + }); + if (objSeq == null) { + objSeq = this.objects.length; + this.objects.push({ id: objID, config: obj}); + }else{ + this.objects[objSeq].isDel = undefined; + this.objects[objSeq].config = obj; + } + + if(objSeq != null){ + this.initTab(objID, objSeq); + }else{ + trace("object find error"); + } + }, + initTab: function(objID, objSeq){ + //trace({objID:objID, objSeq:objSeq}); + var cfg = this.config, _this = this; + var obj = this.objects[objSeq]; + + var po = []; + po.push("
"); + + po.push("
"); + if(obj.config.overflow != "visible"){ + po.push("
"); + } + + var selectedIndex = null; + jQuery.each(obj.config.options, function(oidx, O){ + po.push(""); + po.push(O.optionText.dec() + ""); + //if(AXUtil.browser.mobile){ + po.push(""); + //} + }); + + obj.config.selectedIndex = selectedIndex; + po.push("
"); + if(obj.config.overflow != "visible"){ + po.push("
"); + po.push(" "); + po.push(" "); + po.push(" "); + } + po.push("
"); + po.push("
"); + + obj.jQueryObjID = jQuery("#"+objID); + obj.jQueryObjID.html(po.join('')); + obj.jQueryObjID.data("objSeq", objSeq); /* memory objSeq */ + + obj.tabTray = jQuery("#" + objID + "_AX_tabTray"); + obj.tabScroll = jQuery("#" + objID + "_AX_tabScroll"); + obj.tabContainer = jQuery("#" + objID + "_AX_tabContainer"); + + var setValueTab = this.setValueTab.bind(this); + var myMenu = []; + jQuery.each(obj.config.options, function(oidx, O){ + myMenu.push({label:O.optionText, value:O.optionValue, className:"", onclick:function(){ + //trace(this); + setValueTab(objID, this.menu.value); + }}); + }); + + AXContextMenu.bind({ + id:objID + "_AX_tabMore", + theme:"AXContextMenu", // 선택항목 + width:"200", // 선택항목 + menu:myMenu + }); + + var bindTabClick = this.bindTabClick.bind(this); + obj.tabContainer.find(".AXTab").bind("click", function(event){ + bindTabClick(objID, objSeq, event); + }); + var bindTabMove = this.bindTabMove.bind(this); + var bindTabMoveClick = this.bindTabMoveClick.bind(this); + var bindTabMoreClick = this.bindTabMoreClick.bind(this); + + jQuery("#" + objID + "_AX_Arrow_AX_Left").bind("mouseover", function(event){ + bindTabMove(objID, objSeq, "left", event); + }); + jQuery("#" + objID + "_AX_Arrow_AX_Right").bind("mouseover", function(event){ + bindTabMove(objID, objSeq, "right", event); + }); + jQuery("#" + objID + "_AX_Arrow_AX_Left, #" + objID + "_AX_Arrow_AX_Right").bind("mouseout", function(event){ + if(obj.moveobj) clearTimeout(obj.moveobj); + }); + jQuery("#" + objID + "_AX_Arrow_AX_Left").bind("mousedown", function(event){ + bindTabMoveClick(objID, objSeq, "left", event); + }); + jQuery("#" + objID + "_AX_Arrow_AX_Right").bind("mousedown", function(event){ + bindTabMoveClick(objID, objSeq, "right", event); + }); + jQuery("#" + objID + "_AX_Arrow_AX_More").bind("click", function(event){ + bindTabMoreClick(objID, objSeq, "right", event); + }); + + if(obj.overflow != "visible"){ + setTimeout(function(){ + var tabsWidth = (axf.clientWidth() < cfg.responsiveMobile) ? 40 : 30; + var tabsMargin = (axf.clientWidth() < cfg.responsiveMobile) ? 5 : 5; + obj.tabContainer.find(".AXTab").each(function(){ + tabsWidth += (jQuery(this).outerWidth().number() + jQuery(this).css("marginLeft").number() + jQuery(this).css("marginRight").number() + tabsMargin); + }); + + obj.tabScroll.css({width:tabsWidth, left:cfg.handleWidth}); + obj.tabTray.css({height:obj.tabScroll.outerHeight()}); + + var trayWidth = obj.tabTray.outerWidth(); + var scrollWidth = obj.tabScroll.outerWidth(); + + if(trayWidth > scrollWidth){ + obj.tabContainer.find(".leftArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowMoreBox").hide(); + obj.tabScroll.css({left:0}); + }else if(obj.config.selectedIndex != null){ + obj.tabContainer.find(".leftArrowHandleBox").show(); + obj.tabContainer.find(".rightArrowHandleBox").show(); + obj.tabContainer.find(".rightArrowMoreBox").show(); + _this.focusingItem(objID, objSeq, obj.config.selectedIndex); + } + + if(trayWidth < scrollWidth && AXUtil.clientWidth() < cfg.responsiveMobile){ + obj.tabContainer.find(".leftArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowHandleBox").hide(); + obj.tabScroll.css({left:0}); + }else{ + + } + + /* touch event */ + var touchstart = _this.touchstart.bind(_this); + if(AXUtil.browser.mobile){ + var touchBodyID = obj.tabTray.get(0).id; + _this.touchstartBind = function () { touchstart(objID, objSeq); }; + if (document.addEventListener) AXgetId(touchBodyID).addEventListener("touchstart", _this.touchstartBind, false); + }else{ + _this.touchstartBind = function (event) { touchstart(objID, objSeq, event); }; + obj.tabTray.unbind("mousedown.AXMobileTouch").bind("mousedown.AXMobileTouch", _this.touchstartBind); + } + obj.tabTray.attr("onselectstart", "return false"); + obj.tabTray.addClass("AXUserSelectNone"); + + obj.tabTray.unbind("dragstart.AXMobileTouch").bind("dragstart.AXMobileTouch", _this.cancelEvent.bind(_this)); + /* touch event */ + }, 100); + } + }, + bindTabClick: function(objID, objSeq, event){ + //trace({objID:objID, objSeq:objSeq, e:event.target.id}); + var cfg = this.config; + var obj = this.objects[objSeq]; + + // event target search - + 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 (jQuery(evt.parentNode).hasClass("AXTabsTray")) ? true : false; }, + find: function (evt, evtIDs) { return (jQuery(evt).hasClass("AXTab")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + //colHeadTool ready + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + + //trace(obj.config.options[itemIndex]); + + var selectedObject = obj.config.options[itemIndex]; + if(obj.config.value != selectedObject.optionValue){ + + jQuery("#" + objID + "_AX_Tabs_AX_"+obj.config.selectedIndex).removeClass("on"); + jQuery("#" + objID + "_AX_Tabs_AX_"+itemIndex).addClass("on"); + + obj.config.value = selectedObject.optionValue; + obj.config.selectedIndex = itemIndex; + + this.focusingItem(objID, objSeq, obj.config.selectedIndex); + + if(obj.config.onchange){ + obj.config.onchange.call({ + options:obj.config.options, + item:obj.config.options[itemIndex], + index:itemIndex + }, obj.config.options[itemIndex], obj.config.options[itemIndex].optionValue); + } + } + } + }, + setValueTab: function(objID, value){ + //trace({objID:objID, value:value}); + var cfg = this.config; + var objSeq = null; + jQuery.each(this.objects, function(index, O){ + if(O.id == objID){ + objSeq = index; + return false; + } + }); + if(objSeq == null){ + //trace("바인드 된 오브젝트를 찾을 수 없습니다."); + return; + }else{ + + var obj = this.objects[objSeq]; + + var itemIndex = null; + jQuery.each(obj.config.options, function(oidx, O){ + if(O.optionValue == value){ + itemIndex = oidx; + return false; + } + }); + + if(itemIndex == null) return; + + var selectedObject = obj.config.options[itemIndex]; + if(obj.config.value != selectedObject.optionValue){ + + jQuery("#" + objID + "_AX_Tabs_AX_"+obj.config.selectedIndex).removeClass("on"); + jQuery("#" + objID + "_AX_Tabs_AX_"+itemIndex).addClass("on"); + /* */ + this.focusingItem(objID, objSeq, itemIndex); + + obj.config.value = selectedObject.optionValue; + obj.config.selectedIndex = itemIndex; + + if(obj.config.onchange){ + obj.config.onchange.call({ + options:obj.config.options, + item:obj.config.options[itemIndex], + index:itemIndex + }, obj.config.options[itemIndex], obj.config.options[itemIndex].optionValue); + } + } + + } + }, + bindTabMove: function(objID, objSeq, direction, event){ + //trace({objID:objID, objSeq:objSeq}); + var cfg = this.config; + var obj = this.objects[objSeq]; + + var trayWidth = obj.tabTray.outerWidth(); + if(AXUtil.clientWidth() < cfg.responsiveMobile){ + var rightMargin = 40; + }else{ + var rightMargin = 29 + cfg.handleWidth; + } + trayWidth -= rightMargin; + var scrollWidth = obj.tabScroll.outerWidth(); + var scrollLeft = obj.tabScroll.position().left; + + //trace({trayWidth:trayWidth, scrollWidth:scrollWidth, scrollLeft:scrollLeft}); + + var animateStyles = {}; + if(direction == "left"){ + if(scrollLeft < cfg.handleWidth){ + scrollLeft += obj.config.scrollAmount; + animateStyles = {left:scrollLeft}; + }else{ + return; + } + if(scrollLeft > cfg.handleWidth){ + //trace({trayWidth:(trayWidth - cfg.handleWidth), scrollWidth:scrollWidth, scrollLeft:scrollLeft}); + scrollLeft = cfg.handleWidth; + animateStyles = {left:scrollLeft}; + } + }else{ + if(trayWidth < (scrollWidth + scrollLeft)){ + scrollLeft -= obj.config.scrollAmount; + animateStyles = {left:scrollLeft}; + }else{ + + } + + if((trayWidth) > (scrollWidth + scrollLeft)){ + /*trace({trayWidth:(trayWidth - cfg.handleWidth), scrollWidth:scrollWidth, scrollLeft:scrollLeft}); */ + scrollLeft = trayWidth - scrollWidth - cfg.handleWidth; + animateStyles = {left:scrollLeft}; + }else{ + //return; + } + + } + + obj.tabScroll.css(animateStyles); + + var bindTabMove = this.bindTabMove.bind(this); + + if(obj.moveobj) clearTimeout(obj.moveobj); + + //trace("move"); + + obj.moveobj = setTimeout(function(){ + bindTabMove(objID, objSeq, direction, event); + }, 20); + + + /* + obj.tabScroll.animate( + animateStyles, + 500, + "sineInOut", + function(){ + } + ); + */ + + }, + bindTabMoveClick: function(objID, objSeq, direction, event){ + var cfg = this.config; + var obj = this.objects[objSeq]; + + if(obj.moveobj) clearTimeout(obj.moveobj); + + var scrollAmount = 500; + + var trayWidth = obj.tabTray.outerWidth(); + if(AXUtil.clientWidth() < cfg.responsiveMobile){ + var rightMargin = 40; + }else{ + var rightMargin = 29 + cfg.handleWidth; + } + trayWidth -= rightMargin; + var scrollWidth = obj.tabScroll.outerWidth(); + var scrollLeft = obj.tabScroll.position().left; + + //trace({trayWidth:trayWidth, scrollWidth:scrollWidth, scrollLeft:scrollLeft}); + + var animateStyles = {}; + if(direction == "left"){ + if(scrollLeft < cfg.handleWidth){ + scrollLeft += scrollAmount; + animateStyles = {left:scrollLeft}; + }else{ + return; + } + if(scrollLeft > cfg.handleWidth){ + scrollLeft = cfg.handleWidth; + animateStyles = {left:scrollLeft}; + } + }else{ + if(trayWidth < (scrollWidth + scrollLeft)){ + scrollLeft -= scrollAmount; + animateStyles = {left:scrollLeft}; + }else{ + + } + + if((trayWidth-cfg.handleWidth) > (scrollWidth + scrollLeft)){ + //trace({trayWidth:(trayWidth - cfg.handleWidth), scrollWidth:scrollWidth, scrollLeft:scrollLeft}); + scrollLeft = trayWidth - scrollWidth - cfg.handleWidth; + animateStyles = {left:scrollLeft}; + }else{ + //return; + } + + } + + obj.tabScroll.stop(); + obj.tabScroll.animate( + animateStyles, + 500, + "sineInOut", + function(){ + } + ); + + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + }, + bindTabMoreClick: function(objID, objSeq, direction, event){ + var cfg = this.config; + var obj = this.objects[objSeq]; + if(axf.clientWidth() < cfg.responsiveMobile) { + AXContextMenu.setConfig({responsiveMobile: 640}); + /* mobile 너비 지정 */ + } + AXContextMenu.open({id:objID + "_AX_tabMore", title:AXConfig.AXContextMenu.title}, event); + }, + resizeCheck: function(){ + var cfg = this.config; + var focusingItem = this.focusingItem.bind(this); + + jQuery.each(this.objects, function(objSeq, O){ + var objID = this.id; + var obj = this; + var trayWidth = obj.tabTray.outerWidth(); + var scrollWidth = obj.tabScroll.outerWidth(); + if(trayWidth > scrollWidth){ + obj.tabContainer.find(".leftArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowMoreBox").hide(); + obj.tabScroll.css({left:0}); + }else{ + if(AXUtil.clientWidth() < cfg.responsiveMobile){ + obj.tabContainer.find(".leftArrowHandleBox").hide(); + obj.tabContainer.find(".rightArrowHandleBox").hide(); + }else{ + obj.tabContainer.find(".leftArrowHandleBox").show(); + obj.tabContainer.find(".rightArrowHandleBox").show(); + } + obj.tabContainer.find(".rightArrowMoreBox").show(); + if(!AXUtil.isEmpty(obj.config.selectedIndex)) focusingItem(objID, objSeq, obj.config.selectedIndex); + } + obj.tabTray.css({height:obj.tabScroll.outerHeight()}); + }); + }, + focusingItem: function(objID, objSeq, optionIndex){ + var cfg = this.config; + var obj = this.objects[objSeq]; + + if(obj.tabTray.outerWidth() > obj.tabScroll.outerWidth()){ + return; + } + + if(AXUtil.clientWidth() < cfg.responsiveMobile){ + var scrollLeft = (jQuery("#" + objID + "_AX_Tabs_AX_" + optionIndex).position().left); + var itemWidth = (jQuery("#" + objID + "_AX_Tabs_AX_" + optionIndex).outerWidth()); + var handleWidth = 0; + var rightMargin = 40; + }else{ + var scrollLeft = (jQuery("#" + objID + "_AX_Tabs_AX_" + optionIndex).position().left - cfg.handleWidth); + var itemWidth = (jQuery("#" + objID + "_AX_Tabs_AX_" + optionIndex).outerWidth()); + var handleWidth = cfg.handleWidth; + var rightMargin = 29 + cfg.handleWidth; + } + + /*trace({scrollLeft:scrollLeft, tsLeft:obj.tabScroll.position().left.abs(), trayWidth:obj.tabTray.outerWidth(), itemWidth:itemWidth, tt:(obj.tabScroll.position().left.abs() + obj.tabTray.outerWidth() - rightMargin - handleWidth )});*/ + if(scrollLeft > (obj.tabScroll.position().left).abs() && (scrollLeft + itemWidth) <= (obj.tabScroll.position().left.abs() + obj.tabTray.outerWidth() - rightMargin - handleWidth)){ + //trace(11); + }else{ + //trace(obj.tabTray.outerWidth(), handleWidth, obj.tabScroll.outerWidth(), scrollLeft); + if(obj.tabTray.outerWidth() - handleWidth > (obj.tabScroll.outerWidth() - scrollLeft)){ + //trace(scrollLeft); + scrollLeft = (obj.tabScroll.outerWidth() - obj.tabTray.outerWidth()) + rightMargin; + } + //trace({left:-scrollLeft}); + setTimeout(function(){ + obj.tabScroll.css({left:-scrollLeft}); + }, 10); + } + }, + + /* 터치 이동관련 함수 - s */ + touchstart: function (objID, objSeq, e) { + if (this.touhEndObserver) clearTimeout(this.touhEndObserver); + if (this.touhMoveObserver) clearTimeout(this.touhMoveObserver); + + var cfg = this.config; + var obj = this.objects[objSeq]; + + var trayWidth = obj.tabTray.outerWidth(); + var scrollWidth = obj.tabScroll.outerWidth(); + + if(trayWidth > scrollWidth){ + return; + } + + 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: obj.tabScroll.position().left, + x: touch.pageX, + y: touch.pageY + }; + + var touchEnd = this.touchEnd.bind(this); + var touchMove = this.touchMove.bind(this); + + if(AXUtil.browser.mobile){ + var event = window.event; + this.touchEndBind = function () { + touchEnd(objID, objSeq); + }; + this.touchMoveBind = function () { + touchMove(objID, objSeq); + }; + if (document.addEventListener) { + document.addEventListener("touchend", this.touchEndBind, false); + document.addEventListener("touchmove", this.touchMoveBind, false); + } + }else{ + + this.touchEndBind = function (event) { + touchEnd(objID, objSeq, event); + }; + this.touchMoveBind = function (event) { + touchMove(objID, objSeq, event); + }; + + jQuery(document.body).bind("mouseup.AXMobileTouch", this.touchEndBind); + jQuery(document.body).bind("mousemove.AXMobileTouch", this.touchMoveBind); + } + + var minLeft = 0; + var maxLeft = - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + var scrollPosition = obj.tabScroll.position(); + + if(scrollPosition.left < minLeft && scrollPosition.left > maxLeft){ + obj.tabScroll.stop(); + } + }, + touchMove: function (objID, objSeq, e) { + if (this.touhEndObserver) clearTimeout(this.touhEndObserver); + if (this.touhMoveObserver) clearTimeout(this.touhMoveObserver); + + var cfg = this.config; + var obj = this.objects[objSeq]; + + 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(objID, objSeq, 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; + } + + var touchMoveAfter = this.touchMoveAfter.bind(this); + this.touhMoveObserver = setTimeout(function () { + touchMoveAfter(touch, objID, objSeq); + }, 50); + }, + touchMoveAfter: function(touch, objID, objSeq){ + var cfg = this.config; + var obj = this.objects[objSeq]; + try{ + this.touchStartXY.sTime = ((new Date()).getTime() / 1000); + this.touchStartXY.sLeft = obj.tabScroll.position().left; + this.touchStartXY.x = touch.pageX; + this.touchStartXY.y = touch.pageY; + }catch(e){ + //trace(e); + } + }, + touchEnd: function (objID, objSeq, e) { + var cfg = this.config; + var obj = this.objects[objSeq]; + var event = window.event || e; + + if(AXUtil.browser.mobile){ + if (document.removeEventListener) { + document.removeEventListener("touchend", this.touchEndBind, false); + document.removeEventListener("touchmove", this.touchMoveBind, false); + } + }else{ + jQuery(document.body).unbind("mouseup.AXMobileTouch"); + jQuery(document.body).unbind("mousemove.AXMobileTouch"); + } + + var moveEndBlock = this.moveEndBlock.bind(this); + this.touhEndObserver = setTimeout(function () { + moveEndBlock(objID, objSeq); + }, 10); + }, + /* 터치 이동관련 함수 - e */ + + moveBlock: function(objID, objSeq, moveX){ + var cfg = this.config; + var obj = this.objects[objSeq]; + + var newLeft = (this.touchStartXY.sLeft + (moveX)); + /* + obj.tabTray + obj.tabScroll + */ + //trace(newLeft); + + var newLeft = (this.touchStartXY.sLeft + (moveX)); + var minLeft = 0; + var maxLeft = - (this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth); + if(cfg.bounces){ + minLeft = this.touchStartXY.targetWidth * 0.4; + maxLeft = -((this.touchStartXY.scrollWidth - this.touchStartXY.targetWidth) * 1.2); + } + + if(newLeft > minLeft){ + newLeft = minLeft; + }else if(newLeft < maxLeft){ + newLeft = maxLeft; + } + obj.tabScroll.css({left: newLeft}); + }, + moveEndBlock: function(objID, objSeq){ + var cfg = this.config; + var obj = this.objects[objSeq]; + + /* 관성발동여부 체크 */ + if(!this.touchStartXY) return; + var sTime = this.touchStartXY.sTime; + var eTime = ((new Date()).getTime() / 1000); + var dTime = eTime - sTime; + var eLeft = obj.tabScroll.position().left; + var dLeft = eLeft - this.touchStartXY.sLeft; + + var velocity = Math.ceil((dLeft/dTime)/5); // 속력= 거리/시간 + var endLeft = Math.ceil(eLeft + velocity); //스크롤할때 목적지 + /*trace({eLeft: eLeft, velocity:velocity, endLeft:endLeft});*/ + if(endLeft > 0) endLeft = 0; + var newLeft = endLeft.abs(); + if(AXUtil.clientWidth() < cfg.responsiveMobile){ + var handleWidth = 0; + var rightMargin = 40; + }else{ + var handleWidth = cfg.handleWidth; + var rightMargin = 29 + cfg.handleWidth; + } + if(obj.tabTray.outerWidth() - handleWidth > (obj.tabScroll.outerWidth() - newLeft)){ + newLeft = (obj.tabScroll.outerWidth() - obj.tabTray.outerWidth()) + rightMargin; + } + + //trace(absPage); + this.touchStartXY.sLeft = -newLeft; + obj.tabScroll.animate({left: -newLeft}, (obj.tabScroll.position().left + newLeft).abs(), "cubicOut", function () {}); + //trace({left: -newLeft}); + + this.touchStartXY = null; + }, + cancelEvent: function (event) { + event.stopPropagation(); // disable event + return false; + } +}); + +var AXTab = new AXTabClass(); +AXTab.setConfig({}); + +jQuery.fn.unbindTab = function (config) { + jQuery.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXTab.unbind(config); + return this; + }); +}; + +jQuery.fn.bindTab = function (config) { + jQuery.each(this, function () { + if (config == undefined) config = {}; + config.id = this.id; + AXTab.bind(config); + return this; + }); +}; + +jQuery.fn.setValueTab = function (value) { + jQuery.each(this, function () { + AXTab.setValueTab(this.id, value); + return this; + }); +}; +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +var AXTopDownMenu = Class.create(AXJ, { + version : "AXTopDownMenu v1.2", + author : "tom@axisj.com", + logs: [ + "2013-03-12 오후 8:21:23", + "2013-11-22 오후 6:03:35 - tom : parent item Addclass 추가", + "2013-12-31 오후 2:06:06 - root : setTree 시 child node count check 추가", + "2014-04-14 - tom : setTree 메소드 엘리먼트 준비전에 박스모델 가져오는 문제 딜레이로 해결" + ], + initialize: function(AXJ_super){ + AXJ_super(); + + this.tree = []; + this.poi = ""; + this.config.easing = { + open:{duraing:200, easing:"expoOut"}, + close:{duration:200, easing:"expoOut"} + }; + //this.config.menuBoxID = "menuBox"; + this.config.parentMenu = { + className:"parentMenu" + }; + this.config.childMenu = { + className:"childMenu", + arrowClassName:"varrow", + align:"center", + valign:"top", + margin:{top:10, left:0, bottom:0}, + arrowMargin:{top:10, left:0, bottom:0} + }; + this.config.childsMenu = { + className:"childsMenu", + arrowClassName:"harrow", + align:"left", + valign:"top", + margin:{top:10, left:0, bottom:0}, + arrowMargin:{top:10, left:0, bottom:0} + }; + this.config.parentOutResetChild = true; + this.config.childOutClose = true; + this.config.childOutCloseTime = 700; + }, + init: function(){ + var cfg = this.config; + + if(cfg.menuBoxID){ + //서브 메뉴를 숨김 처리 합니다. + jQuery("#"+cfg.menuBoxID).find("."+cfg.childMenu.className).hide(); + jQuery("#"+cfg.menuBoxID).find("."+cfg.childsMenu.className).hide(); + + this.initParents(); + this.initChild(); + }else if(cfg.targetID){ + + } + }, + setTree: function(tree){ + var cfg = this.config; + cfg.menuBoxID = cfg.targetID, _this = this; + + 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 + ""); + if(T.cn && T.cn.length > 0 ){ + po.push("
    "); + po.push("
      "); + po.push(treeFn(T.cn)); + po.push("
    "); + po.push("
    "); + } + po.push("
  • "); + }); + }; + + po.push("
      "); + jQuery.each(tree, function(pi, T){ + var addClass = []; + if(T.addClass){ + addClass.push(T.addClass); + } + po.push("
    • "); + po.push("
      "); + var addClass = (T.cn) ? " class = \"" + cfg.childMenu.hasChildClassName + "\"" : ""; + po.push(""+ T.label + ""); + if(T.cn){ + po.push("
      "); + po.push("
        "); + po.push(treeFn(T.cn)); + po.push("
      "); + po.push("
      "); + } + po.push("
      "); + po.push("
    • "); + }); + po.push("
    "); + po.push("
    "); + + jQuery("#"+cfg.menuBoxID).empty(); + jQuery("#"+cfg.menuBoxID).append(po.join('')); + + //서브 메뉴를 숨김 처리 합니다. + jQuery("#"+cfg.menuBoxID).find("."+cfg.childMenu.className).hide(); + jQuery("#"+cfg.menuBoxID).find("."+cfg.childsMenu.className).hide(); + + setTimeout(function(){ + _this.initParents(); + _this.initChild(); + }, 300); + }, + initParents: function(){ + var cfg = this.config; + var parents = []; + jQuery("#"+cfg.menuBoxID).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; + jQuery(EL).children("A").get(0).id = cfg.menuBoxID + "_PMA_" + pi; + parents.push({ + _id:_id, + id:EL.id, + width:axdom(EL).outerWidth(), + height:axdom(EL).outerHeight(), + cn:[], + coi:"" + }); + }); + 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)); + + if(cfg.childOutClose){ + var onoutChild = this.onoutChild.bind(this); + jQuery("#"+cfg.menuBoxID).find("." + cfg.parentMenu.className + ">a").bind("mouseout", onoutChild); + } + }, + onoverParent: function(event){ + if (this.childObserver) clearTimeout(this.childObserver); //닫기 명령 제거 + var cfg = this.config; + var poi = event.target.id.split(/\_/g).last(); + if(this.poi != "" && this.poi != poi){ + jQuery("#" + cfg.menuBoxID + "_PMA_" + this.poi).removeClass("on"); + jQuery("#" + cfg.menuBoxID + "_PMC_" + this.poi).slideUp( + { + duration:cfg.easing.close.duration, + easing:cfg.easing.close.easing, + complete:function(){ + + } + } + ); + if(cfg.parentOutResetChild) this.closeSubMenu(this.tree[this.poi]); + } + + //slideDown check + if(this.dfPoi != undefined) jQuery("#" + cfg.menuBoxID + "_PMA_" + this.dfPoi).removeClass("on"); + jQuery("#" + cfg.menuBoxID + "_PMA_" + poi).addClass("on"); + //trace("#" + cfg.menuBoxID + "_PMC_" + poi); + + var tgDiv = jQuery("#" + cfg.menuBoxID + "_PMC_" + poi); + if(!this.tree[poi].divDim){ + tgDiv.show(); + this.tree[poi].divDim = {width:tgDiv.outerWidth(), height:tgDiv.outerHeight()}; + var topDim = {width:this.tree[poi].width, height:this.tree[poi].height}; + + /* subMenu positioning */ + if(cfg.childMenu.align == "center"){ + var posLeft = topDim.width / 2 - this.tree[poi].divDim.width / 2 + cfg.childMenu.margin.left; + }else if(cfg.childMenu.align == "left"){ + var posLeft = 0 + cfg.childMenu.margin.left; + }else if(cfg.childMenu.align == "right"){ + var posLeft = topDim.width - this.tree[poi].divDim.width + cfg.childMenu.margin.left; + } + if(cfg.childMenu.valign == "top"){ + var posTop = topDim.height + cfg.childMenu.margin.top; + if(cfg.childMenu.float){ + tgDiv.css({top:posTop, left:posLeft}); + }else{ + tgDiv.css({top:posTop, left:posLeft, width:this.tree[poi].divDim.width}); + } + }else if(cfg.childMenu.valign == "bottom"){ + var posTop = topDim.height + cfg.childMenu.margin.bottom; + if(cfg.childMenu.float){ + tgDiv.css({top:posTop, left:posLeft}); + }else{ + tgDiv.css({top:"auto", bottom:posTop, left:posLeft, width:this.tree[poi].divDim.width}); + } + } + /* -------------------- */ + + /* subMenu Arrow positioning */ + if(cfg.childMenu.arrowClassName){ + var arrow = tgDiv.find("."+cfg.childMenu.arrowClassName); + if(cfg.childMenu.align == "center"){ + var aLeft = tgDiv.outerWidth() / 2 - arrow.outerWidth() / 2 + cfg.childMenu.arrowMargin.left; + }else if(cfg.childMenu.align == "left"){ + var aLeft = 0 + cfg.childMenu.arrowMargin.left; + }else if(cfg.childMenu.align == "right"){ + var aLeft = tgDiv.outerWidth() - arrow.outerWidth() + cfg.childMenu.arrowMargin.left; + } + if(cfg.childMenu.valign == "top"){ + var aTop = -arrow.outerHeight() + cfg.childMenu.arrowMargin.top; + arrow.css({top:aTop, left:aLeft}); + }else if(cfg.childMenu.valign == "bottom"){ + var aTop = -arrow.outerHeight() + cfg.childMenu.arrowMargin.bottom; + arrow.css({bottom:aTop, left:aLeft}); + } + } + /* -------------------- */ + + tgDiv.hide(); + topDim = null; + posTop = null; + posLeft = null; + } + + tgDiv.fadeIn( + { + duration:cfg.easing.open.duration, + easing:cfg.easing.open.easing, + complete:function(){ + } + } + ); + + this.poi = poi; + }, + initChild: function(){ + 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){ + var child = jQuery(EL).children("."+cfg.childMenu.className).get(0); + if(child){ + child.id = cfg.menuBoxID + "_PMC_" + pi; + if(cfg.childMenu.arrowClassName){ + var arrow = jQuery("
    "); + jQuery(child).prepend(arrow); + } + initChilds(child.id, tree[pi]); + }else{ + + } + }); + }, + initChilds: function(cid, rTree){ + var initChilds = this.initChilds.bind(this); + var cfg = this.config; + var tree = rTree.cn; + + var onoverChild = this.onoverChild.bind(this); + var onoutChild = this.onoutChild.bind(this); + //trace(cid); + jQuery("#"+cid+">ul>li").each(function(pi, EL){ + var linkA = jQuery(EL).children("A"); + var _id = ""; + if(linkA.get(0).id) _id = linkA.get(0).id; + linkA.get(0).id = cid.replace("PMC", "PMA") + "_" + pi; + linkA.bind("mouseover", onoverChild); + if(cfg.childOutClose){ + linkA.bind("mouseout", onoutChild); + } + + //jQuery(EL).children("A").html(cid.replace("PMC", "PMA") + "_" + pi); + var childDiv = jQuery(EL).children("."+cfg.childsMenu.className).get(0); + if(childDiv){ + childDiv.id = cid+"_"+pi; + + if(cfg.childsMenu.arrowClassName){ + var arrow = jQuery("
    "); + jQuery(childDiv).prepend(arrow); + } + + tree.push({ + _id:_id, + id: cid+"_"+pi, + cn:[], + coi:"" + }); + initChilds(cid+"_"+pi, tree[pi]); + }else{ + tree.push({ + _id:_id, + id: cid+"_"+pi, + cn:[], + coi:"" + }); + } + }); + }, + closeSubMenu: function(pitem){ + if(!pitem) return; + if(pitem.coi == "") return; + var cfg = this.config; + jQuery("#" + pitem.coi).slideUp( + { + duration:cfg.easing.close.duration, + easing:cfg.easing.close.easing, + complete:function(){ + } + } + ); + pitem.coi = ""; + //하위 자식들의 poi 모두 닫기 + + var closeAllSubMenu = function(stree){ + jQuery.each(stree, function(){ + if(this.coi != ""){ + jQuery("#" + this.coi).hide(); + } + closeAllSubMenu(this.cn); + }); + }; + closeAllSubMenu(pitem.cn); + }, + onoverChild: function(event){ + if (this.childObserver) clearTimeout(this.childObserver); //닫기 명령 제거 + var cfg = this.config; + var eid = event.target.id; + var ids = event.target.id.split(/\_/g); + var tree = this.tree; + var item = {}; + var pitem = {}; + for(var a=2;a 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; + + this.touchStartXY = null; + }, + /* 메뉴 터치 이동관련 함수 - e */ + + cancelEvent: function (event) { + event.stopPropagation(); // disable event + return false; + } +}); + +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +/** + * AXTree + * @class AXTree + * @extends AXJ + * @version v1.45 + * @author tom@axisj.com + * @logs + "2013-02-14 오후 2:36:35", + "2013-04-19 ajax setList 버그픽스 - tom", + "2013-06-02 updateList 버그픽스 - tom", + "2013-06-04 오전 11:26:31 headCheck 버그픽스 - tom", + "2013-06-20 오전 12:49:55 control method 수정 및 버그 픽스 - tom", + "2013-06-21 오전 10:41:47 fitToWidth 속성 추가 - tom", + "2013-07-04 오후 1:12:05 tooltip 속성 추가 - tom", + "2013-07-08 오전 9:13:19 스크롤 버그 / appendTree 버그픽스 - tom", + "2013-07-14 오전 1:53:59 appenTree 기능 개선 - tom ", + "2013-07-15 오전 10:36:15 contentScrollScrollWheel 버그 픽스 - tom", + "2013-08-29 오후 2:35:13 width : auto 지원", + "2013-09-02 오후 2:03:10 scroll 중 마우스 오버 아웃 버그 픽스 - tom ", + "2013-09-04 오후 2:49:54 AXConfig에서 설정값 바인딩 구조로 변경 처리 - tom", + "2013-09-04 오후 9:46:17 checkboxRelationFixed 속성 추가 / 체크 박스 부모자식 관계 처리 - tom ", + "2013-10-03 오후 9:24:42 AXTreeSplit 속성 추가 ui 클래스 포함 - tom", + "2013-10-18 오전 8:30:50 dblclick 이벤트 개선 / click(index) 메서드 추가 - tom", + "2013-11-26 오후 1:48:19 tom : appendTree 버그픽스", + "2013-11-26 오후 2:07:40 tom : body.oncontract 기능 추가", + "2014-02-06 오후 8:43:42 tom : jQuery 독립을 위한 문자열 변경", + "2014-05-02 tom : colGroup width * 지원", + "2014-05-12 tom : item nodeName 에 formatter 를 이용하여 태그를 삽입 했을 때 click 이벤트가 발생하도록 픽스" + * + * @description + * + ```js + var myTree = new AXTree(); + myTree.setConfig(classConfig:JSObject); + ``` + */ + +var AXTree = Class.create(AXJ, { + initialize: function (AXJ_super) { + AXJ_super(); + this.Observer = null; + this.tree = []; + this.list = []; + + this.pageActive = false; + this.page = {}; /*{pageNo:0, pageSize:100, pageCount:"", listCount:0};*/ + + this.moveSens = 0; + + this.config.moveSens = 1; + this.config.formPaddingRight = "11px"; + this.config.sort = true; + this.config.xscroll = true; + this.config.showConnectionLine = false; + this.config.iconWidth = 23; + this.config.indentWidth = 20; + this.config.indentRatio = 1; + + this.config.fitToWidth = (AXConfig.AXTree.fitToWidth || false); + this.config.fitToWidthRightMargin = (AXConfig.AXTree.fitToWidthRightMargin || 10); + this.config.checkboxRelationFixed = true; + + this.selectedCells = []; + this.selectedRow = []; + this.config.hashDigit = 3; + + this.isMobile = AXUtil.browser.mobile; + }, + /* 공통 영역 */ + defineConfig: function (rewrite) { + var cfg = this.config; + if (cfg.colGroup.length == 0) { + trace("colGrpup is empty)"); + return; + } + + /* col너비 합계 구하기 */ + var colWidth = 0; + var hasHiddenCell = false; + var showColLen = 0; + if (!rewrite) this.fixedColSeq = cfg.fixedColSeq; + var bodyWidth = this.body.width(); + var astricCount = 0; + + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.colSeq == undefined) CG.colSeq = cidx; + if (CG.display == undefined) CG.display = true; + if (CG.display) { + if (!rewrite) { + if (CG.width == "*") { + CG.width = 0; + CG.widthAstric = true; + astricCount++; + } + CG._owidth = CG.width; + /* 최초의 너비값 기억 하기 */ + } else { + if (CG.widthAstric) { + CG.width = 0; + CG._owidth = CG.width; + astricCount++; + } + } + + colWidth += (CG._owidth || 0).number(); + showColLen += 1; + } else { + hasHiddenCell = true; + } + } + if (!cfg.fitToWidth) { + /* width * 예외처리 구문 ------------ s */ + if ((bodyWidth - cfg.fitToWidthRightMargin) > (colWidth + 100 * astricCount)) { + var remainsWidth = (bodyWidth - cfg.fitToWidthRightMargin) - colWidth; + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (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++) { + if (CG.display && CG.widthAstric) { + CG._owidth = 100; + CG.width = 100; + colWidth += (CG._owidth || 0).number(); + } + } + } + /* width * 예외처리 구문 ------------ e */ + } else { + for (var CG, cidx = 0, __arr = cfg.colGroup; (cidx < __arr.length && (CG = __arr[cidx])); cidx++) { + if (CG.display && CG.widthAstric) { + CG.width = 100; + CG._owidth = 100; + colWidth += (CG._owidth || 0).number(); + } + } + } + this.colWidth = colWidth; + + if (cfg.fitToWidth) { /*너비 자동 맞춤버전의 경우 */ + if (bodyWidth > this.colWidth) { + var _bodyWidth = bodyWidth - cfg.fitToWidthRightMargin; + var 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(); + if (_bodyWidth > CG.width) _bodyWidth -= CG.width; + else CG.width = _bodyWidth; + if (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++) { + if (CG._owidth == undefined) CG._owidth = (CG.width || 0).number(); + CG.width = CG._owidth.number(); + if (CG.display) colWidth += CG.width.number(); + } + this.colWidth = colWidth; + } + } + + this.showColLen = showColLen; + /* col너비 합계 구하기 ~~~~~~~~~~~~~~ 구해진 너비합은 그리드 head, body 의 너비로 지정됨. */ + + if (!cfg.colHead) cfg.colHead = { display: false }; + if (!cfg.body) cfg.body = {}; + + if (cfg.colHead.rowsEmpty) cfg.colHead.rows = undefined; + if (cfg.body.rowsEmpty) cfg.body.rows = undefined; + + // colHead rows ----------------------------------------------------------------------------------------------------- + if (cfg.colHead.rows) { + // colHeadRow 정해진 경우 + cfg.colHead._maps = new Array(cfg.colHead.rows.length); + var colMaxLen = 0; + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var colLen = 0; + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) { + CH._colspan = CH.colspan; + } else { + CH.colspan = CH._colspan; + } + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + if (cfg.colHeadAlign) CH.align = "center"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.colHead._maps.length; _m++) { cfg.colHead._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToColHeadMap = function (r, c, posR, position) { // + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (!cfg.colHead._maps[rr][nC]) { + cfg.colHead._maps[rr][nC] = position; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + } + for (var r = 0; r < cfg.colHead.rows.length; r++) { + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) { + if (rewrite) AXUtil.overwriteObject(CH, myCG, true); + else AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToColHeadMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + //colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 + axf.each(cfg.colHead._maps.last(), function (midx, m) { + if (m) cfg.colHead.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.colHead._maps.length; a++) { + var rowPosition = cfg.colHead._maps[a][cidx]; + cfg.colHead.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + //trace(cfg.colHead._maps); _maps check + + // colHeadRow 정해진 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } else { + // colHeadRow 정해지지 않은 경우 + cfg.colHead._maps = [[]]; + var colHeadRows = [[]]; + axf.each(cfg.colGroup, function (cidx, CG) { + var adder = { + key: CG.key, + colSeq: CG.colSeq, + label: CG.label, + align: (CG.align || (cfg.colHeadAlign || "left")), rowspan: 1, colspan: 1, + valign: "bottom", isLastCell: true, display: CG.display, formatter: CG.formatter, checked: CG.checked, + sort: CG.sort, + tooltip: CG.tooltip + }; + colHeadRows[0].push(adder); + cfg.colHead._maps[0].push({ r: 0, c: cidx }); + }); + cfg.colHead.rows = colHeadRows; + cfg.colHead.rowsEmpty = true; + // colHeadRow 정해지지 않은 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + // colHead rows ----------------------------------------------------------------------------------------------------- + + // body rows ----------------------------------------------------------------------------------------------------- + if (cfg.body.rows) { + // bodyRow 정해진 경우 + + cfg.body._maps = new Array(cfg.body.rows.length); + var colMaxLen = 0; + for (var r = 0; r < cfg.body.rows.length; r++) { + var colLen = 0; + axf.each(cfg.body.rows[r], function (CHidx, CH) { + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.valign == undefined || CH.valign == null) CH.valign = "middle"; + //if(CH.align == undefined || CH.align == null) CH.align = "left"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.body._maps.length; _m++) { cfg.body._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToBodyMap = function (r, c, posR, position) { + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { isWhile = false; } else { + if (!cfg.body._maps[rr][nC]) { + cfg.body._maps[rr][nC] = position; + tC--; + } else { + nC++; + } + } + } catch (e) { isWhile = false; } + } + } + }; + for (var r = 0; r < cfg.body.rows.length; r++) { + axf.each(cfg.body.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) { + if (rewrite) AXUtil.overwriteObject(CH, myCG, true); + else AXUtil.overwriteObject(CH, myCG, false); + } else { + AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + } + appendPosToBodyMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + //body._maps 마지막 줄에 해당하는 cfg.body.rows 에 속성부여 + axf.each(cfg.body._maps.last(), function (midx, m) { + if (m) cfg.body.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.body._maps.length; a++) { + var rowPosition = cfg.body._maps[a][cidx]; + cfg.body.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + + // bodyRow 정해진 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } else { + // bodyRow 정해지지 않은 경우 + cfg.body._maps = [[]]; + var bodyRows = [[]]; + axf.each(cfg.colGroup, function (cidx, CG) { + var adder = { + key: CG.key, colSeq: CG.colSeq, label: CG.label, align: (CG.align || "left"), rowspan: 1, colspan: 1, valign: "middle", isLastCell: true, + display: CG.display, formatter: CG.formatter, checked: CG.checked, disabled: CG.disabled, indent: CG.indent, getIconClass: CG.getIconClass, + tooltip: CG.tooltip + }; + bodyRows[0].push(adder); + cfg.body._maps[0].push({ r: 0, c: cidx }); + }); + cfg.body.rows = bodyRows; + cfg.body.rowsEmpty = true; + // bodyRow 정해지지 않은 경우 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + // body rows ----------------------------------------------------------------------------------------------------- + + //marker 관련 데이터 정리 + if (cfg.body.marker) { + if (cfg.body.marker.rows) { + this.bodyHasMarker = true; + cfg.body.marker._maps = new Array(cfg.body.marker.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + var colLen = 0; + axf.each(cfg.body.marker.rows[r], function (CHidx, CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.body.marker._maps.length; _m++) { cfg.body.marker._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToEditorMap = function (r, c, posR, position) { // + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (!cfg.body.marker._maps[rr][nC]) { + cfg.body.marker._maps[rr][nC] = position; + tC--; + } else { nC++; } + } + } catch (e) { isWhile = false; } + } + } + }; + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + axf.each(cfg.body.marker.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) AXUtil.overwriteObject(CH, myCG, false); + else AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + appendPosToEditorMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + //colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 + axf.each(cfg.body.marker._maps.last(), function (midx, m) { + if (m) cfg.body.marker.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.body.marker._maps.length; a++) { + var rowPosition = cfg.body.marker._maps[a][cidx]; + cfg.body.marker.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + } + } + //marker 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + //head 관련 데이터 정리 + if (cfg.head) { + cfg.head._maps = new Array(cfg.head.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.head.rows.length; r++) { + var colLen = 0; + axf.each(cfg.head.rows[r], function (CHidx, CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + //if(CH.align == undefined || CH.align == null) CH.align = "left"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.head._maps.length; _m++) { cfg.head._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToHeadMap = function (r, c, posR, position) { // + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (!cfg.head._maps[rr][nC]) { + cfg.head._maps[rr][nC] = position; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.head.rows.length; r++) { + axf.each(cfg.head.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) AXUtil.overwriteObject(CH, myCG, false); + else AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + appendPosToHeadMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + + //colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 + axf.each(cfg.head._maps.last(), function (midx, m) { + if (m) cfg.head.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.head._maps.length; a++) { + var rowPosition = cfg.head._maps[a][cidx]; + cfg.head.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + } + //head 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + //foot 관련 데이터 정리 + if (cfg.foot) { + cfg.foot._maps = new Array(cfg.foot.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.foot.rows.length; r++) { + var colLen = 0; + axf.each(cfg.foot.rows[r], function (CHidx, CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.foot._maps.length; _m++) { cfg.foot._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToFootMap = function (r, c, posR, position) { // + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (!cfg.foot._maps[rr][nC]) { + cfg.foot._maps[rr][nC] = position; + tC--; + } else { + nC++; + } + } + } catch (e) { + isWhile = false; + } + } + } + }; + for (var r = 0; r < cfg.foot.rows.length; r++) { + axf.each(cfg.foot.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) AXUtil.overwriteObject(CH, myCG, false); + else AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + appendPosToFootMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + //colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 + axf.each(cfg.foot._maps.last(), function (midx, m) { + if (m) cfg.foot.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.foot._maps.length; a++) { + var rowPosition = cfg.foot._maps[a][cidx]; + cfg.foot.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + } + //foot 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + //editor 관련 데이터 정리 + if (cfg.editor) { + if (cfg.editor.rows) { + this.hasEditor = true; + cfg.editor._maps = new Array(cfg.editor.rows.length); + colMaxLen = 0; + for (var r = 0; r < cfg.editor.rows.length; r++) { + var colLen = 0; + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.rowspan == undefined || CH.rowspan == null) CH.rowspan = 1; + if (CH.colspan == undefined || CH.colspan == null) { + CH.colspan = 1; + CH._colspan = 1; + } else { + if (!rewrite) CH._colspan = CH.colspan; + else CH.colspan = CH._colspan; + } + if (CH.valign == undefined || CH.valign == null) CH.valign = "bottom"; + colLen += CH.colspan.number(); + }); + if (colMaxLen < colLen) colMaxLen = colLen; + } + for (var _m = 0; _m < cfg.editor._maps.length; _m++) { cfg.editor._maps[_m] = new Array(colMaxLen); } + // colEndPosition 관련 처리 함수 + var appendPosToEditorMap = function (r, c, posR, position) { // + var nC = position.c; //시작 컬럼 위치 + for (var rr = posR; rr < (posR + r) ; rr++) { + var tC = c; //컬럼 루프횟수 + var isWhile = true; // 루프유지변수 + while (isWhile) { + try { + if (tC == 0) { + isWhile = false; + } else { + if (!cfg.editor._maps[rr][nC]) { + cfg.editor._maps[rr][nC] = position; + tC--; + } else { nC++; } + } + } catch (e) { isWhile = false; } + } + } + }; + for (var r = 0; r < cfg.editor.rows.length; r++) { + axf.each(cfg.editor.rows[r], function (CHidx, CH) { + if (CH.colSeq != undefined) { + var myCG = cfg.colGroup.getToSeq(CH.colSeq); + } else { + var myCG = cfg.colGroup.searchObject(function () { + return this.item.key == CH.key; + }).first(); + } + if (myCG != null) AXUtil.overwriteObject(CH, myCG, false); + else AXUtil.overwriteObject(CH, { align: "left", valign: "bottom", display: true, rowspan: 1, colspan: 1 }, false); + appendPosToEditorMap(CH.rowspan, CH.colspan, r, { r: r, c: CHidx }); + }); + } + //colHead._maps 마지막 줄에 해당하는 cfg.colHead.rows 에 속성부여 + axf.each(cfg.editor._maps.last(), function (midx, m) { + if (m) cfg.editor.rows[m.r][m.c].isLastCell = true; + }); + + if (hasHiddenCell) { // colGroup 중에 숨겨진 col 이 존재하는 경우 + // colspan 감소 시키기 + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + for (var a = 0; a < cfg.editor._maps.length; a++) { + var rowPosition = cfg.editor._maps[a][cidx]; + cfg.editor.rows[rowPosition.r][rowPosition.c].colspan--; + } + } + }); + } + } + } + //editor 관련 데이터 정리 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + //fixedColSeq가 설정된 경우 + if (cfg.fixedColSeq != undefined && cfg.fixedColSeq != null) { + + var fixedColSeq = this.fixedColSeq; + axf.each(cfg.colHead._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if ((fixedColSeq + 1) > cidx) cfg.colHead.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + axf.each(cfg.body._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if (fixedColSeq == cidx) cfg.body.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.body.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + if (cfg.head) { + axf.each(cfg.head._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if (fixedColSeq == cidx) cfg.head.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.head.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + } + if (cfg.foot) { + axf.each(cfg.foot._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if (fixedColSeq == cidx) cfg.foot.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.foot.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + } + + if (cfg.body.marker) { + if (cfg.body.marker.rows) { + axf.each(cfg.body.marker._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if (fixedColSeq == cidx) cfg.body.marker.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.body.marker.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + } + } + + if (cfg.editor) { + if (cfg.editor.rows) { + axf.each(cfg.editor._maps, function (midx, m) { + axf.each(m, function (cidx, c) { + if (c) { + if (fixedColSeq == cidx) cfg.editor.rows[c.r][c.c].isFixedEndCell = true; + if ((fixedColSeq + 1) > cidx) cfg.editor.rows[c.r][c.c].isFixedCell = true; + } + }); + }); + } + } + this.hasFixed = true; + if (hasHiddenCell) { + var minusFixedCol = 0; + var fixedColSeq = this.fixedColSeq; + axf.each(cfg.colGroup, function (cidx, CG) { + if (!CG.display) { + if ((fixedColSeq + 1) > cidx) minusFixedCol++; + } + }); + cfg.fixedColSeq = this.fixedColSeq - minusFixedCol; + } else { + cfg.fixedColSeq = this.fixedColSeq; + } + + if (cfg.fixedColSeq == -1) { + //fixed 제거 + this.hasFixed = false; + } + + var fixedColSeq = this.fixedColSeq; + fixedColWidth = 0; + axf.each(cfg.colGroup, function (cidx, CG) { + if (CG.display && cidx < (fixedColSeq + 1)) { + fixedColWidth += CG.width.number(); + } + }); + this.fixedColWidth = fixedColWidth; + } + + + }, + init: function () { + var cfg = this.config; + + if (Object.isUndefined(cfg.targetID)) { + trace("need targetID - setConfig({targetID:''})"); + return; + } + if (!cfg.colGroup) { + trace("need colGroup - setConfig({colGroup:[]})"); + return; + } + + var reserveKeys = { + parentHashKey: "pHash", // 부모 트리 포지션 + hashKey: "hash", // 트리 포지션 + openKey: "open", // 확장여부 + subTree: "subTree", // 자식개체키 + displayKey: "display" // 표시여부 + }; + var relation = { + parentKey: "pno", + childKey: "no" + } + if (cfg.reserveKeys) { + AXUtil.overwriteObject(reserveKeys, cfg.reserveKeys, true); + } else { + cfg.reserveKeys = reserveKeys; + } + if (cfg.relation) { + AXUtil.overwriteObject(relation, cfg.relation, true); + } else { + cfg.relation = relation; + } + + var targetInnerHeight = axdom("#" + cfg.targetID).innerHeight(); + if (targetInnerHeight == 0) targetInnerHeight = 400; + this.theme = (cfg.theme) ? cfg.theme : "AXTree"; // 테마기본값 지정 + cfg.height = (cfg.height) ? cfg.height : targetInnerHeight + "px"; // 그리드 높이 지정 + + this.target = axdom("#" + cfg.targetID); + var theme = this.theme; + var treeCss = []; + + if (cfg.width) treeCss.push("width:" + cfg.width + ";"); + if (cfg.height) treeCss.push("height:" + cfg.height + ";"); + + // tree 뼈대 그리기 ----------------------------------------------------------------------------------------------------- + var ol = []; + ol.push("
    "); + ol.push("
    "); + ol.push("
    "); + ol.push("
    "); + ol.push("
    "); + ol.push("
    "); + ol.push("
    "); + this.target.html(ol.join('')); + // tree 뼈대 그리기 ----------------------------------------------------------------------------------------------------- + + // 주요 타깃 설정 + this.gridBody = axdom("#" + cfg.targetID + "_AX_tree"); + this.scrollBody = axdom("#" + cfg.targetID + "_AX_treeScrollBody"); + this.colHead = axdom("#" + cfg.targetID + "_AX_treeColHead"); + this.body = axdom("#" + cfg.targetID + "_AX_treeBody"); + this.editor = axdom("#" + cfg.targetID + "_AX_treeEditor"); + + /// define part ----------------------------------------------------------------------------------------------------- + this.defineConfig(); // config object define + /// define part ----------------------------------------------------------------------------------------------------- + + if (cfg.colHead.display) { + //colHead setting + this.setColHead(); + } else { + this.colHead.hide(); + } + + //body setting + this.setBody(); + + //editor setting + this.editor.hide(); + + this.treeTargetSetSize(); + + /* body event bind */ + if (cfg.height != "auto") { + + 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"; + if (document.attachEvent) { //if IE (and Opera depending on user setting) + //axf.getId(cfg.targetID+"_AX_treeBody").detachEvent("on"+mousewheelevt, this.contentScrollScrollWheelBind); + if (axf.getId(cfg.targetID + "_AX_treeBody")) axf.getId(cfg.targetID + "_AX_treeBody").attachEvent("on" + mousewheelevt, contentScrollScrollWheel); + } else if (document.addEventListener) { //WC3 browsers + ///axf.getId(cfg.targetID+"_AX_treeBody").removeEventListener(mousewheelevt, this.contentScrollScrollWheelBind, false); + if (axf.getId(cfg.targetID + "_AX_treeBody")) axf.getId(cfg.targetID + "_AX_treeBody").addEventListener(mousewheelevt, contentScrollScrollWheel, false); + } + + if (document.addEventListener) { + //axf.getId(cfg.targetID+"_AX_treeBody").removeEventListener("touchstart", this.contentScrollTouchstartBind, false); + if (axf.getId(cfg.targetID + "_AX_treeBody")) axf.getId(cfg.targetID + "_AX_treeBody").addEventListener("touchstart", contentScrollTouchstart, false); + } + } + + axdom("#" + cfg.targetID).bind("keydown", this.onKeydown.bind(this)); + + if (cfg.contextMenu) { + + AXContextMenu.bind({ + id: cfg.targetID + "ContextMenu", + theme: cfg.contextMenu.theme, // 선택항목 + width: cfg.contextMenu.width, // 선택항목 + menu: cfg.contextMenu.menu + }); + + axdom("#" + cfg.targetID).bind("contextmenu", this.onContextmenu.bind(this)); + + } + /* body event bind */ + + axdom(window).bind("resize", this.windowResize.bind(this)); + + }, + windowResize: function () { + var windowResizeApply = this.windowResizeApply.bind(this); + if (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(v.min != undefined && v.max != undefined){ + if (v.min <= clientWidth && clientWidth <= v.max) { + _viewMode = (k == "dx") ? "grid" : "mobile"; + return false; + } + }else{ + if (v.min <= clientWidth) { + _viewMode = (k == "dx") ? "grid" : "mobile"; + return false; + } + } + } + }); + if (_viewMode != "") { + cfg.viewMode = _viewMode; + } + } + + this.redrawGrid(); + }, + treeTargetSetSize: function (react) { + var cfg = this.config; + //cfg.height + if (cfg.height == "auto") { + this.target.css({ height: "auto", "max-height": "auto" }); + var colHeadHeight = this.colHead.outerHeight(); + var scrollBodyHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + this.scrollBody.css({ height: scrollBodyHeight + colHeadHeight }); //colhead + body height + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight) }); // body Height + } else { + var colHeadHeight = (cfg.colHead.display) ? this.colHead.outerHeight() : 0; + var scrollBodyHeight = cfg.height.number(); + //trace({top:colHeadHeight, scrollBodyHeight:scrollBodyHeight}); + this.scrollBody.css({ height: scrollBodyHeight }); //colhead + body height + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight - colHeadHeight) }); // body Height + } + if (!react) axdom(window).bind("resize", this.contentScrollResize.bind(this)); + }, + resetHeight: function () { + var cfg = this.config; + + var targetInnerHeight = axdom("#" + cfg.targetID).innerHeight(); + if (targetInnerHeight == 0) targetInnerHeight = 400; + cfg.height = targetInnerHeight + "px"; // 그리드 높이 지정 + + var colHeadHeight = 0; + try { + colHeadHeight = ((cfg.colHead || {}).display) ? this.colHead.outerHeight() : 0; + } catch (e) { + } + + + var scrollBodyHeight = cfg.height.number(); + + try { + + this.scrollBody.css({ height: scrollBodyHeight }); //colhead + body height + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight - colHeadHeight) }); // body Height + + var bodyHeight = this.body.height(); + var scrollHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + + var scrollTrackYHeight = (cfg.xscroll) ? bodyHeight - axdom("#" + cfg.targetID + "_AX_scrollTrackX").outerHeight() : bodyHeight; + axdom("#" + cfg.targetID + "_AX_scrollTrackY").css({ height: scrollTrackYHeight }); + + var scrollYHandleHeight = ((bodyHeight) * scrollTrackYHeight) / scrollHeight; + axdom("#" + cfg.targetID + "_AX_scrollYHandle").css({ height: scrollYHandleHeight - 2 }); + + } catch (e) { + //trace(e); + } + }, + getColGroup: function (suffix) { + var cfg = this.config; + var fixedColSeq = this.fixedColSeq; + //{colID:0, key:"no", label:"번호", width:"100", align:"left", addClassNames:"", style:"", display:true, sort:null} + var po = []; + po.push(""); + if (suffix != "FC" && suffix != "FB" && suffix != "FE") { + axf.each(cfg.colGroup, function (cidx, CG) { + if (CG.display) { + if (cfg.width == "auto" || cfg.width == "*") { + po.push(""); + } else { + po.push(""); + } + } + }); + po.push(""); + //if (suffix == "CB") po.push(""); + } else { + //fixedCol 존재 + axf.each(cfg.colGroup, function (cidx, CG) { + if (CG.display && cidx < (fixedColSeq + 1)) { + if (cfg.width == "auto" || cfg.width == "*") { + po.push(""); + } else { + po.push(""); + } + } + }); + } + po.push(""); + return po.join(''); + }, + getColSeqToHead: function (r, c) { + //trace("getColSeqToHead:"+r+","+c); + var cfg = this.config; + var colSeq = null; + for (var 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 () { + var cfg = this.config; + this.defineConfig(true); + if (cfg.colHead.display) this.setColHead(); + this.setBody(); + + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + + this.treeTargetSetSize(true); + this.contentScrollResize(); + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 바디 재구성 기능 포함 + }, + checkedColSeq: function (colSeq, checked) { + var cfg = this.config; + + this.colHead.find(".treeCheckBox_colHead_colSeq" + colSeq).each(function () { + this.checked = checked; + }); + + axdom("#" + cfg.targetID + "_AX_fixedColHead").find(".treeCheckBox_colHead_colSeq" + colSeq).each(function () { + this.checked = checked; + }); + + this.body.find(".treeCheckBox_body_colSeq" + colSeq).each(function () { + this.checked = checked; + }); + }, + getCheckedList: function (colSeq) { + var cfg = this.config; + var collect = []; + var list = this.list; + this.body.find(".treeCheckBox_body_colSeq" + colSeq).each(function () { + if (this.checked) { + var itemIndex = this.id.split(/_AX_/g).last(); + collect.push(list[itemIndex]); + } + }); + return collect; + }, + onKeydown: function (event) { + if (event.keyCode == 67 && event.ctrlKey) { + //this.copyData(); + } + }, + onBodyKeydown: function (event) { + //this.readyMoved = true; + //this.moveTarget = {itemIndex:itemIndex}; + if (event.keyCode == AXUtil.Event.KEY_ESC) { + if (this.readyMoved) { + this.cancelMove(); + } + } + }, + onContextmenu: function (event) { + var cfg = this.config; + + if (this.readyMoved) return false; + + // event target search - + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + if (eventTarget.tagName.toLowerCase() == "input") return; //input 인 경우 제외 + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + until: function (evt, evtIDs) { return (axdom(evt.parentNode).hasClass("gridBodyTr")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("bodyTd") || axdom(evt).hasClass("bodyNodeIndent")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + //colHeadTool ready + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + + if (this.selectedCells.length > 0) { + axf.each(this.selectedCells, function () { + axdom("#" + this).removeClass("selected"); + }); + this.selectedCells.clear(); + } + if (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 }, event); // event 직접 연결 방식 + } + return false; + }, + copyData: function () { + var cfg = this.config; + var copyOut = []; + axf.each(this.selectedCells, function (index, n) { + var html = axdom("#" + n).find(".bodyNode").html(); + copyOut.push(html + '\t'); + }); + + if (window.clipboardData) { + window.clipboardData.setData('Text', copyOut.join('')); + toast.push("데이터가 복사되었습니다. 원하시는 곳에 붙여넣기 하세요."); + } else { + dialog.push({ title: "Copy Data", body: copyOut.join(''), type: "alert" }); + } + }, + /* 공통 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + + /* colHead 영역 */ + getHeadMousePosition: function (event) { + var pos = this.colHead.offset(); + var x = (event.pageX - pos.left); + var y = (event.pageY - pos.top); + return { x: x, y: y }; + }, + getColHeadTd: function (arg) { + var cfg = this.config; + var po = []; + + if (arg.ghost) { + po.push(""); + po.push("
    "); + po.push("
     
    "); + po.push("
    "); + po.push(""); + } else { + + var colHeadTdText = " colHeadTdText"; + var toolUse = true; + + if (arg.formatter == "html" || arg.formatter == "checkbox" || arg.formatter == "radio") { + colHeadTdText = " colHeadTdHtml"; + toolUse = false; + if (arg.formatter == "checkbox") { + colHeadTdText = " colHeadTdCheck"; + arg.tdHtml = ""; + } + } + + var sortClass = ""; if (arg.sort) sortClass = (arg.sort == "desc") ? " sortDesc" : " sortAsc"; + + po.push(""); + po.push("
    "); + po.push("
    "); + po.push(arg.tdHtml); + po.push("
    "); + if (toolUse && arg.colSeq != null && arg.colSeq != undefined) po.push("T"); + po.push("
    "); + po.push("
    "); + po.push(""); + + if (arg.sort) { + var myColHead = cfg.colHead.rows[arg.r][arg.CHidx]; + var 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; + var po = []; + + //trace("fixedCol : " + cfg.fixedColSeq); + + var getColHeadTd = this.getColHeadTd.bind(this); + if (!this.hasFixed) { ////////////////////////////////////////////////////////////////////////////////////////////// 일반 colHead 구현 + + po.push(""); + po.push(this.getColGroup("CH")); //colGroup 삽입 + po.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + po.push(""); + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + //radio, check exception + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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: false + })); + } + }); + po.push(""); + } + po.push(""); + po.push("
    "); + + } else { ////////////////////////////////////////////////////////////////////////////////////////////// fixedCol 구현 + + po.push(""); + po.push(this.getColGroup("CH")); //colGroup 삽입 + po.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + po.push(""); + var colCount = 0; + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + //radio, check exception + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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 < (cfg.fixedColSeq + 1)) + })); + + colCount += CH.colspan; + } + }); + po.push(""); + } + po.push(""); + po.push("
    "); + + var fpo = []; + fpo.push("
    "); + fpo.push(""); + fpo.push(this.getColGroup("FC")); //colGroup 삽입 + fpo.push(""); + for (var r = 0; r < cfg.colHead.rows.length; r++) { + var isLastTR = (cfg.colHead.rows.length - 1 == r); + fpo.push(""); + var colCount = 0; + axf.each(cfg.colHead.rows[r], function (CHidx, CH) { + if (CH.display && CH.isFixedCell && CH.colspan > 0) { + //trace({CHidx:CHidx, fixedColSeq:(cfg.fixedColSeq+1)}); + //radio, check exception + var tdHtml = CH.label || "untitle"; + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\""; + var 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: false + })); + } + colCount += CH.colspan; + }); + fpo.push(""); + } + fpo.push(""); + fpo.push("
    "); + fpo.push("
    "); + } + ////////////////////////////////////////////////////////////////////////////////////////////// fixedCol 구현 + + this.colHead.html(po.join('')); + axdom("#" + cfg.targetID + "_AX_fixedColHead").remove(); + if (fpo) this.colHead.after(fpo.join('')); + + //resizer 를 찾아 resizer의 부모와 같은 높이값을 가지도록 변경 합니다. + //또 그와 관련된 개체의 높이와 패딩을 지정합니다. + this.colHead.find(".colHeadResizer").each(function () { + var resizerID = this.id; + var tdID = resizerID.replace("colHeadResizer", "colHead"); + var txtID = resizerID.replace("colHeadResizer", "colHeadText"); + var toolID = resizerID.replace("colHeadResizer", "colHeadTool"); + var rowspan = axdom("#" + tdID).attr("rowspan"); + var valign = axdom("#" + tdID).attr("valign"); + if (!rowspan) rowspan = 1; + var tdHeight = axdom("#" + tdID).height(); + axdom(this).css({ height: tdHeight }); + axdom(this).parent().css({ height: tdHeight }); + if (rowspan > 1) { + var cellMarginTop = 0; + if (valign == "bottom") cellMarginTop = (tdHeight - axdom("#" + txtID).outerHeight()) + 5; + if (valign == "middle") 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)); + + if (this.hasFixed) { //fixedColHead에 대한 바인딩 및 처리 + this.fixedColHead = axdom("#" + cfg.targetID + "_AX_fixedColHead"); + + this.fixedColHead.find(".colHeadResizer").each(function () { + var resizerID = this.id; + var tdID = resizerID.replace("colHeadResizer", "colHead"); + var txtID = resizerID.replace("colHeadResizer", "colHeadText"); + var toolID = resizerID.replace("colHeadResizer", "colHeadTool"); + var rowspan = axdom("#" + tdID).attr("rowspan"); + var valign = axdom("#" + tdID).attr("valign"); + if (!rowspan) rowspan = 1; + var tdHeight = axdom("#" + tdID).height(); + axdom(this).css({ height: tdHeight }); + axdom(this).parent().css({ height: tdHeight }); + if (rowspan > 1) { + var cellMarginTop = 0; + if (valign == "bottom") cellMarginTop = (tdHeight - axdom("#" + txtID).outerHeight()) + 5; + if (valign == "middle") 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)); + } + }, + /* colHead events */ + colHeadMouseOver: function (event) { + var cfg = this.config; + // event target search - + if(event.target.id == "") return; + 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("AXGridColHead")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("colHeadTd")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + //colHeadTool ready + var targetID = myTarget.id; + var toolID = targetID.replace("colHead", "colHeadTool"); + axdom("#" + toolID).addClass("readyTool"); + } + }, + colHeadMouseOut: function (event) { + var cfg = this.config; + // event target search - + if(event.target.id == "") return; + 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("AXGridColHead")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("colHeadTd")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + //colHeadTool unready + var targetID = myTarget.id; + var toolID = targetID.replace("colHead", "colHeadTool"); + axdom("#" + toolID).removeClass("readyTool"); + } + }, + colHeadResizerMouseDown: function (event) { + var cfg = this.config; + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var colSeq = this.getColSeqToHead(colHeadR, colHeadC); + if (colSeq == null) return; // 예상할 수 없는 오류 + //resize 상태 해제 + if (this.colResizing) { + this.colHeadResizerEnd(); + } + var offset = axdom("#" + cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC).find(".tdRelBlock").position(); + var relBlockWidth = axdom("#" + cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC).find(".tdRelBlock").width(); + var rightPosition = offset.left.number() + relBlockWidth.number(); + var blockWidth = axdom("#" + cfg.targetID + "_AX_col_AX_" + colSeq + "_AX_CH").attr("width"); + this.colResizeTarget = { colSeq: colSeq, leftPosition: (rightPosition - blockWidth), blockWidth: blockWidth, newWidth: blockWidth }; + //trace(this.colResizeTarget); + + /* resize event bind */ + 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.AXTree", this.colHeadResizerMouseMoveBind); + axdom(document.body).bind("mouseup.AXTree", this.colHeadResizerMouseUpBind); + axdom(document.body).bind("mouseleave.AXTree", this.colHeadResizerMouseUpBind); + axdom("iframe").bind("mouseover.AXTree", this.colHeadResizerMouseUpBind); + + axdom(document.body).attr("onselectstart", "return false"); + axdom(document.body).addClass("AXUserSelectNone"); + /* resize event bind ~~~~~~~~~~~~~~~~~~~ */ + }, + colHeadResizerMouseMove: function (event) { + if (!event.pageX) return; + //드래그 감도 적용 + if (this.config.moveSens > this.moveSens) this.moveSens++; + if (this.moveSens == this.config.moveSens) this.colHeadResizerMove(event); + }, + colHeadResizerMove: function (event) { + var cfg = this.config; + var mouse = this.getHeadMousePosition(event); + var newWidth = (this.colResizeTarget.leftPosition - mouse.x).abs(); + if (newWidth < 31) return; + /* colHead/colBody colGroup width 조정 */ + 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; + + if (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); + + //if(this.colResizeTarget.colSeq < fixedColSeq+1){ + + var fixedColWidth = 0; + axf.each(cfg.colGroup, function (cidx, CG) { + if (CG.display && cidx < (fixedColSeq + 1)) { + 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 }); + axdom("#" + cfg.targetID + "_AX_fixedScrollContent").css({ width: fixedColWidth }); + axdom("#" + cfg.targetID + "_AX_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) { + var colSeq = this.colResizeTarget.colSeq; + // + for (var _m = 0; _m < cfg.editor._maps.length; _m++) { + var rc = cfg.editor._maps[_m][colSeq]; + var CH = cfg.editor.rows[rc.r][rc.c]; + var formID = (CH.form.id) ? CH.form.id : cfg.targetID + "_AX_" + CH.key + "_AX_" + rc.r + "_AX_" + rc.c; + //trace(formID); + if (axf.getId(formID)) if (axf.getId(formID).tagName == "INPUT") AXInput.alignAnchor(formID); + } + } + + + /* colHead colGroup width 조정 ------------------------------ */ + this.colResizeTarget.newWidth = newWidth; + var newColWidth = this.colWidth - (this.colResizeTarget.blockWidth - this.colResizeTarget.newWidth); + this.colHead.find(".colHeadTable").css({ "width": newColWidth + "px" }); + //this.body.find(".gridBodyTable").css({"width":newColWidth+"px"}); + }, + colHeadResizerMouseUp: function (event) { + if (this.colResizeTarget.blockWidth != this.colResizeTarget.newWidth) { + this.colWidth = this.colWidth - (this.colResizeTarget.blockWidth - this.colResizeTarget.newWidth); + } + this.colHeadResizerEnd(); + this.contentScrollResize(false); + }, + colHeadResizerEnd: function () { + this.moveSens = 0; + this.colResizing = false; + axdom(document.body).unbind("mousemove.AXTree"); + axdom(document.body).unbind("mouseup.AXTree"); + axdom(document.body).unbind("mouseleave.AXTree"); + axdom("iframe").unbind("mouseover.AXTree"); + + axdom(document.body).removeAttr("onselectstart"); + axdom(document.body).removeClass("AXUserSelectNone"); + }, + colHeadNodeClick: function (event) { + var cfg = this.config; + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (this.editorOpend) { + toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다."); + return; // 에디터가 오픈된 상태이면 비활성화 + } + + if (axdom(eventTarget).hasClass("colHeadTdCheck")) { + this.colHeadCheckBoxClick(event); + return; // checkbox block click + } + if (axdom(eventTarget).hasClass("gridCheckBox")) return; // checkbox click + + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + var tdID = cfg.targetID + "_AX_colHead_AX_" + colHeadR + "_AX_" + colHeadC; + //trace(myColHead); + + if (myColHead.colSeq == undefined || myColHead.colSeq == null) { + trace("정렬할 수 없는 컬럼 입니다."); + } else { + /* -- 현재 기술로는 정렬 지원 어려움 + if(this.nowSortHeadID){ + if(this.nowSortHeadID != tdID){ + axdom("#"+this.nowSortHeadID).removeClass("sortDesc"); + axdom("#"+this.nowSortHeadID).removeClass("sortAsc"); + this.nowSortHeadObj.sort = undefined; + } + } + //trace(myColHead); + if(cfg.colHead.rows[colHeadR][colHeadC].sort == "desc") axdom("#"+tdID).removeClass("sortDesc"); + else axdom("#"+tdID).removeClass("sortAsc"); + + var nsort = ""; + if(myColHead.sort == "desc") nsort = "asc"; + else nsort = "desc"; + cfg.colHead.rows[colHeadR][colHeadC].sort = nsort; + + //sort 처리하기 + if(nsort == "desc"){ + axdom("#"+tdID).addClass("sortDesc"); + }else{ + axdom("#"+tdID).addClass("sortAsc"); + } + + this.list = this.sortList(nsort, myColHead, this.list); + this.printList(); + + this.nowSortHeadID = tdID; + this.nowSortHeadObj = myColHead; + */ + } + + if (cfg.colHead.onclick) { // onclick bind + var sendObj = { + index: null, + r: colHeadR, + c: colHeadC, + list: this.list, + colHead: myColHead, + page: this.page + } + cfg.colHead.onclick.call(sendObj); + } + + }, + colHeadToolClick: function (event) { + var cfg = this.config; + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (this.editorOpend) { + toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다."); + return; // 에디터가 오픈된 상태이면 비활성화 + } + + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + //toast.push("클릭된 colGroup seq : " + myColHead.colSeq); + + axdom("#" + cfg.targetID + "_AX_colHeadMenu").remove(); + + var po = []; + po.push("
    "); + axf.each(cfg.colGroup, function (cidx, CG) { + var addClass = (CG.display) ? " on" : ""; + var 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(); + var css = {}; + css.top = offset.top - 5; + css.left = offset.left - 20; + axdom("#" + cfg.targetID + "_AX_colHeadMenu").css(css); + + /* colGroup click event bind */ + var colGroupListClick = this.colGroupListClick.bind(this); + this.colGroupListClickBind = function (event) { + colGroupListClick(event); + } + axdom(document).bind("click", this.colGroupListClickBind); + axdom(document).bind("keydown", this.colGroupListClickBind); + /* colGroup click bind ~~~~~~~~~~~~~~~~~~~ */ + }, + colGroupListClick: function (event) { + var cfg = this.config; + + if (event.keyCode == AXUtil.Event.KEY_ESC) { + axdom("#" + cfg.targetID + "_AX_colHeadMenu").remove(); + axdom(document).unbind("keydown", this.colGroupListClickBind); + axdom(document).unbind("click", this.colGroupListClickBind); + return; + } + + // event target search - + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("AXTreeColGroupListBoxItem") || axdom(evt).hasClass("colHeadTool")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + if (axdom(myTarget).hasClass("colHeadTool")) return; + //colHeadTool ready + var targetID = myTarget.id; + var colSeq = targetID.split(/_AX_/g).last(); + //trace(cfg.colGroup[colSeq]); + if (cfg.colGroup[colSeq].display) { + cfg.colGroup[colSeq].display = false; + axdom("#" + targetID).removeClass("on"); + } else { + cfg.colGroup[colSeq].display = true; + axdom("#" + targetID).addClass("on"); + } + //redraw grid + 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 == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + + if (axdom(eventTarget).hasClass("colHeadTdCheck")) { + eventTarget = axdom(eventTarget).find("input").get(0); + eventTarget.checked = !eventTarget.checked; + } + var lastIdx = eid.length - 1; + var colHeadR = eid[lastIdx - 1]; + var colHeadC = eid[lastIdx]; + var myColHead = cfg.colHead.rows[colHeadR][colHeadC]; + + this.checkedColSeq(myColHead.colSeq, eventTarget.checked); + }, + /* colHead events ~~~~~~~~~~~~~~~~~*/ + /* colHead 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* body */ + sortList: function (nsort, myColHead, list) { + var cfg = this.config; + + var getValueForSort = function (item, itemIndex) { + if (myColHead.formatter) { + var result; + if (myColHead.formatter == "money") { + result = item[myColHead.key]; + } else if (myColHead.formatter == "dec") { + result = item[myColHead.key].dec(); + } else if (myColHead.formatter == "html") { + result = item[myColHead.key]; + } else if (myColHead.formatter == "checkbox") { + result = item[myColHead.key]; + } else { + var sendObj = { + index: itemIndex, + list: list, + item: item, + page: this.page + } + result = myColHead.formatter.call(sendObj); + //result 값이 money 형식인지 체크 합니다. + var moneyCheck = result.replace(/,/g, ""); + if (axdom.isNumeric(moneyCheck)) result = result.number(); + } + return result; + } else { + return item[myColHead.key]; + } + }; + + if (nsort == "desc") { + var listIndex = 0; + list = list.sort(function (prevItem, nowItem) { + if (prevItem[cfg.reserveKeys.hashKey].length == nowItem[cfg.reserveKeys.hashKey].length) { + var v1 = getValueForSort(prevItem, listIndex); + var v2 = getValueForSort(nowItem, listIndex); + listIndex++; + if (v1 < v2) return 1; + else if (v1 > v2) return -1; + else if (v1 == v2) return 0; + } else { + return 0; + } + }); + } else { + var listIndex = 0; + list = list.sort(function (prevItem, nowItem) { + if (prevItem[cfg.reserveKeys.hashKey].length == nowItem[cfg.reserveKeys.hashKey].length) { + var v1 = getValueForSort(prevItem, listIndex); + var v2 = getValueForSort(nowItem, listIndex); + listIndex++; + if (v1 < v2) return -1; + else if (v1 > v2) return 1; + else if (v1 == v2) return 0; + } else { + return 0; + } + }); + } + + return list; + }, + setBody: function (list) { + var cfg = this.config; + if (list) { + this.list = list; + } + + var po = []; + po.push("
    "); + po.push(""); + po.push(this.getColGroup("CB")); //colGroup 삽입 + 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("
    "); + po.push("
     
    "); + po.push("
    "); + if (this.hasFixed) { + po.push("
    "); + po.push(""); + po.push(this.getColGroup("FB")); //colGroup 삽입 + 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("
    "); + po.push("
    "); + po.push("
    "); + this.body.html(po.join('')); + + if (this.list.length > 0) { + this.setList(this.list, false); + } + + // scroll event bind + axdom("#" + cfg.targetID + "_AX_scrollYHandle").bind("mousedown", this.contentScrollScrollReady.bind(this)); + axdom("#" + cfg.targetID + "_AX_scrollXHandle").bind("mousedown", this.contentScrollScrollReady.bind(this)); + // scroll event bind ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }, + listLoadingDisplay: function () { + var cfg = this.config; + var po = []; + 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('')); + }, + getAXTreeSplit: function(isFix){ + var cfg = this.config; + var po = []; + if(isFix == "n"){ + po.push(""); + po.push(""); + po.push(""); + po.push("
     
    "); + po.push(""); + }else{ + po.push(""); + po.push(""); + po.push(""); + po.push(""); + } + return po.join(''); + }, + setList: function (obj, positioning) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + this.listLoadingDisplay(); + + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ width: "auto" }); + + if (obj.ajaxUrl) { + this.ajaxInfo = obj; + this.ajax_sortDisable = positioning; + var sortDisable = positioning; + this.pageActive = true; + + var url = obj.ajaxUrl; + var appendPars = [ + "pageNo=" + this.page.pageNo, + "pageSize=" + this.page.pageSize + ]; + var pars = (obj.ajaxPars) ? obj.ajaxPars + "&" + appendPars.join('&') : appendPars.join('&'); + + var ajaxGetList = this.ajaxGetList.bind(this); + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + res._sortDisable = sortDisable; + if (obj.response) { + obj.response.call(res); + } else { + ajaxGetList(res, positioning); + } + if (obj.onLoad) obj.onLoad.call(res); + } else { + AXUtil.alert(res); + } + } + }); + + } else { + + this.ajaxInfo = null; + if (axdom.isArray(obj)) { + if (obj.length == 0) { + + /* + var po = []; + po.push("
    "); + po.push("목록이 없습니다."); + po.push("
    "); + axdom("#" + cfg.targetID + "_AX_tbody").html(po.join('')); + */ + //return; + } + + if (positioning == undefined) { + try{ + this.list = this.positioningHashList(obj); + this.list = this.list.sort(function (prevItem, nowItem) { + var v1 = prevItem[cfg.reserveKeys.hashKey]; + var v2 = nowItem[cfg.reserveKeys.hashKey]; + if (v1 < v2) return -1; + else if (v1 > v2) return 1; + else if (v1 == v2) return 0; + }); + }catch(e){ + trace(e); + } + } else { + this.list = obj; + } + + this.printList(); + this.pageActive = false; + } + } + }, + reloadList: function () { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + if (this.ajaxInfo) { + var obj = this.ajaxInfo; + var sortDisable = this.ajax_sortDisable; + this.pageActive = true; + + this.listLoadingDisplay(); + + var url = obj.ajaxUrl; + var appendPars = [ + "pageNo=" + this.page.pageNo, + "pageSize=" + this.page.pageSize + ]; + var pars = (obj.ajaxPars) ? obj.ajaxPars + "&" + appendPars.join('&') : appendPars.join('&'); + + var ajaxGetList = this.ajaxGetList.bind(this); + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + res._sortDisable = sortDisable; + if (obj.response) { + obj.response.call(res); + } else { + ajaxGetList(res); + } + } else { + AXUtil.alert(res); + } + } + }); + + } + }, + ajaxGetList: function (res, positioning) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + + + + if (res._sortDisable || !cfg.sort) { + this.list = res[AXConfig.AXTree.keyList]; + } else { + if (nowSortHeadID) { + this.list = this.sortList(nowSortHeadObj.sort, nowSortHeadObj, res[AXConfig.AXTree.keyList]); + } else { + this.list = res[AXConfig.AXTree.keyList]; + } + } + //trace(this.list); + if (positioning == undefined) { + this.list = this.positioningHashList(this.list); + } else { + //this.list = obj; + } + + //AXUtil.overwriteObject(this.page, res.page, true); + this.printList(); + }, + getFormatterValue: function (formatter, item, itemIndex, value, key, CH) { + var cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null") { + result = ""; + } else { + result = value.number().money(); + } + } else if (formatter == "dec") { + result = value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox") { + var checked = ""; + var disabled = ""; + var sendObj = { + index: itemIndex, + list: this.list, + item: item + } + if (CH.checked) { + var callCheckedResult = CH.checked.call(sendObj); + if (callCheckedResult) { + checked = " checked=\"checked\" "; + this.list[itemIndex].__checked = true; + } else { + this.list[itemIndex].__checked = false; + } + } + if (CH.disabled) { + var callDisabledResult = CH.disabled.call(sendObj); + if (callDisabledResult) { + disabled = " disabled=\"disabled\" "; + } + } + result = ""; + } else { + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page + }; + result = formatter.call(sendObj); + } + return result; + }, + getIconClassValue: function (getIconClass, item, itemIndex, value, key, CH) { + var cfg = this.config; + var iconClass; + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page + } + iconClass = getIconClass.call(sendObj, itemIndex, item); + return iconClass; + }, + getTooltipValue: function (formatter, item, itemIndex, value, key, CH) { + var cfg = this.config; + var result; + if (formatter == "money") { + if (value == "" || value == "null") { + result = ""; + } else { + result = value.number().money(); + } + } else if (formatter == "dec") { + result = value.dec(); + } else if (formatter == "html") { + result = value; + } else if (formatter == "checkbox") { + var checked = ""; + var disabled = ""; + + var sendObj = { + index: itemIndex, + list: this.list, + item: item + } + + if (CH.checked) { + var callCheckedResult = CH.checked.call(sendObj); + if (callCheckedResult) { + checked = " checked=\"checked\" "; + } + } + + if (CH.disabled) { + var callDisabledResult = CH.disabled.call(sendObj); + if (callDisabledResult) { + disabled = " disable=\"disable\" "; + } + } + result = ""; + } else { + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page + } + result = formatter.call(sendObj); + } + return result; + }, + getItem: function (itemIndex, item, isfix, hasTr) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var tpo = []; + var evenClassName = "line" + (itemIndex % 2); + var hashClassName = "parentHash" + item[cfg.reserveKeys.parentHashKey]; + + var getFormatterValue = this.getFormatterValue.bind(this); + var getTooltipValue = this.getTooltipValue.bind(this); + var getIconClassValue = this.getIconClassValue.bind(this); + var hasFixed = this.hasFixed; + var hasTrValue = (hasTr == undefined) ? true : false; + var trAddClass = ""; + if (cfg.body.addClass) { + try { + trAddClass = cfg.body.addClass.call({ + index: itemIndex, + item: item, + list: this.list + }); + } catch (e) { + trace(e); + } + } + var trStyles = []; + var isDisplay = item[reserveKeys.displayKey]; + if (!isDisplay) trStyles.push("display:none;"); + + var _tree = this.tree; + + for (var r = 0; r < cfg.body.rows.length; r++) { + var isLastTR = (cfg.body.rows.length - 1 == r); + if (hasTrValue) tpo.push(""); + var colCount = 0; + axf.each(cfg.body.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == "n" || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + //radio, check exception + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + var bodyNodeStyles = []; + var indentWidth = 0; + var iconWidth = 0; + if (CH.indent) { + var hash = item[cfg.reserveKeys.hashKey]; + var re = new RegExp(cfg.hashSpliter, "g"); + indentWidth = ((hash.split(re).length - 1) * cfg.indentWidth) + 3; + + if (indentWidth > (cfg.indentWidth.number() + 3)) { + indentWidth = indentWidth * cfg.indentRatio; + } + + if (CH.getIconClass) { + iconWidth = cfg.iconWidth; + } + if (CH.align == "left") { + bodyNodeStyles.push("padding-left:" + (indentWidth + iconWidth) + "px;"); + } else { + bodyNodeStyles.push("padding-right:" + (indentWidth + iconWidth) + "px;text-align:right;"); + } + } + /*trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount});*/ + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + var expandNodeClass = ""; + if (item[cfg.reserveKeys.openKey]) expandNodeClass = " expand"; + + var iconClass = ""; + var tooltipValue = ""; + if (CH.tooltip) { + tooltipValue = getTooltipValue(CH.tooltip, item, itemIndex, item[CH.key], CH.key, CH); + } + tpo.push(""); + tpo.push("
    "); + tpo.push("
    "); + + if (CH.indent) { + + /*CH.align : left*/ + /*indentWidth : left position;*/ + if(cfg.showConnectionLine){ + /* line 표시 박스 구현 */ + tpo.push(""); + var hashPosition = item[cfg.reserveKeys.hashKey].split(/_/g); + for(var hp=2;hp"); + } + tpo.push(""); + + if (item.__subTreeLength == 0){ + expandNodeClass += " noChild"; + } + + tpo.push(""); + }else{ + tpo.push(""); + } + } + if (CH.getIconClass) { + iconClass = getIconClassValue(CH.getIconClass, item, itemIndex, item[CH.key], CH.key, CH); + tpo.push(""); + } + + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH)); + } else { + tpo.push(item[CH.key]); + } + } else { + tpo.push(" "); + } + + tpo.push("
    "); + tpo.push("
    "); + tpo.push(""); + } + } + }); + if (r == 0 && isfix == "n") { + tpo.push("
     
    "); + } + if (hasTrValue) tpo.push(""); + } + return tpo.join(''); + }, + getItemMarker: function (itemIndex, item, isfix) { + var cfg = this.config; + var tpo = []; + var evenClassName = "gridBodyMarker"; + var getFormatterValue = this.getFormatterValue.bind(this); + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.body.marker.rows.length; r++) { + var isLastTR = (cfg.body.marker.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + axf.each(cfg.body.marker.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == "n" || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + //radio, check exception + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + //trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + tpo.push("
    "); + tpo.push("
    "); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getFormatterValue(CH.formatter, item, itemIndex, item[CH.key], CH.key, CH)); + } else { + tpo.push(item[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
    "); + tpo.push("
    "); + tpo.push(""); + } + } + }); + if (r == 0 && isfix == "n") { + tpo.push("
     
    "); + } + tpo.push(""); + } + return tpo.join(''); + }, + getMarkerDisplay: function (itemIndex, item) { + var cfg = this.config; + var bodyHasMarker = this.bodyHasMarker; + + if (!bodyHasMarker) return false; + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + page: this.page + } + var markerDisplay = cfg.body.marker.display.call(sendObj); + return markerDisplay; + }, + printList: function () { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var bodyHasMarker = this.bodyHasMarker; + var getItem = this.getItem.bind(this); + var getItemMarker = this.getItemMarker.bind(this); + var getMarkerDisplay = this.getMarkerDisplay.bind(this); + + this.gridBodyOverBind = this.gridBodyOver.bind(this); + this.gridBodyOutBind = this.gridBodyOut.bind(this); + this.gridBodyClickBind = this.gridBodyClick.bind(this); + this.gridBodyDBLClickBind = this.gridBodyDBLClick.bind(this); + + var getAXTreeSplit = this.getAXTreeSplit.bind(this); + + var po = []; + axf.each(this.list, function (itemIndex, item) { + if (!item.isRoot && !item._isDel) { + if(item.AXTreeSplit){ + po.push(getAXTreeSplit("n")); + }else{ + po.push(getItem(itemIndex, item, "n")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "n")); + } + } + } + }); + axdom("#" + cfg.targetID + "_AX_tbody").empty(); + axdom("#" + cfg.targetID + "_AX_tbody").append(po.join('')); + + if (this.hasFixed) { + po = []; + axf.each(this.list, function (itemIndex, item) { + if (!item.isRoot && item[cfg.reserveKeys.displayKey] && !item._isDel) { + if(item.AXTreeSplit){ + po.push(getAXTreeSplit("fix")); + }else{ + po.push(getItem(itemIndex, item, "fix")); + if (bodyHasMarker && getMarkerDisplay(itemIndex, item)) { + po.push(getItemMarker(itemIndex, item, "fix")); + } + } + } + }); + axdom("#" + cfg.targetID + "_AX_fixedTbody").empty(); + axdom("#" + cfg.targetID + "_AX_fixedTbody").append(po.join('')); + } + + this.selectedCells.clear(); // selectedCells clear + + //trace(this.list); + //trace(this.tree); + + var _tree = this.tree; + var list_pointer = {}; + axf.each(this.list, function (lidx, L) { + list_pointer[L.hash] = lidx; + }); + //trace(list_pointer); + + var _list = this.list; + axf.each(this.list, function (lidx, L) { + if(L.__checked){ + var hashs = L.hash.split(/_/g); + hashs.shift(); + //trace(hashs); + for (var l = hashs.length - 1; l > -1; l--) { + //trace(l); + var subTreeStr = ""; + var checkHash = []; + + for (var i = 0; i < l + 1; i++) { + checkHash.push(hashs[i]); + if (i == 0) { + subTreeStr += "[" + hashs[i].number() + "]"; + } else { + subTreeStr += "[reserveKeys.subTree][" + hashs[i].number() + "]"; + } + } + //trace(checkHash); + //trace(checkHash.join("_")); + //trace(subTreeStr); + var myTree = null; + try{ + eval("myTree = _tree" + subTreeStr); + }catch(e){ + + } + + if(myTree != null){ + myTree.__checked = true; + var findHash = "0".setDigit(cfg.hashDigit)+"_"+checkHash.join("_"); + //trace(findHash); + if(list_pointer[findHash] != undefined){ + _list[list_pointer[findHash]].__checked = true; + } + } + + }; + } + }); + + this.body.find(".gridBodyTr").bind("mouseover", this.gridBodyOverBind); + this.body.find(".gridBodyTr").bind("mouseout", this.gridBodyOutBind); + this.body.find(".gridBodyTr").bind("click", this.gridBodyClickBind); + if (AXUtil.browser.name == "ie" && AXUtil.browser.version == 8) this.body.find(".gridBodyTr").bind("dblclick", this.gridBodyDBLClickBind); + this.contentScrollResize(); + + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + }, + updateList: function (itemIndex, item) { + var cfg = this.config; + 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); + if (this.hasFixed) { + axdom("#" + cfg.targetID + "_AX_fixedTbody").find(".gridBodyTr_" + itemIndex).html(npo); + } + + this.body.find(".gridBodyTr").unbind("mouseover", this.gridBodyOverBind); + this.body.find(".gridBodyTr").unbind("mouseout", this.gridBodyOutBind); + this.body.find(".gridBodyTr").unbind("click", this.gridBodyClickBind); + if (AXUtil.browser.name == "ie" && AXUtil.browser.version == 8) this.body.find(".gridBodyTr").unbind("dblclick", this.gridBodyDBLClickBind); + + this.body.find(".gridBodyTr").bind("mouseover", this.gridBodyOverBind); + this.body.find(".gridBodyTr").bind("mouseout", this.gridBodyOutBind); + this.body.find(".gridBodyTr").bind("click", this.gridBodyClickBind); + if (AXUtil.browser.name == "ie" && AXUtil.browser.version == 8) this.body.find(".gridBodyTr").bind("dblclick", this.gridBodyDBLClickBind); + + this.redrawDataSet(); + }, + expandToggleList: function (itemIndex, item, r, c) { + var cfg = this.config; + + this.gridBodyOverBind; + this.gridBodyOutBind; + this.gridBodyClickBind; + this.gridBodyDBLClickBind; + + if (item[cfg.reserveKeys.openKey]) { + + //자식 개체 모두 닫기 체크하기 + var pHash = item[cfg.reserveKeys.hashKey]; + var hashs = item[cfg.reserveKeys.hashKey].split(/_/g); + var lastR = cfg.body.rows.length - 1; + for (var r = 0; r < cfg.body.rows.length; r++) { + axdom("#" + cfg.targetID + "_AX_tr_" + r + "_AX_n_AX_" + itemIndex).find(".bodyNodeIndent").removeClass("expand"); + } + + //trace(pHash); + var removepHashs = []; + axf.each(this.list, function (itemIndex, item) { + if(!item.AXTreeSplit){ + if (pHash == item[cfg.reserveKeys.parentHashKey].left(pHash.length)) { + removepHashs.push(item[cfg.reserveKeys.parentHashKey]); + item[cfg.reserveKeys.displayKey] = false; + } + } + }); + + var _body = this.body; + axf.each(removepHashs, function () { + _body.find(".gridBodyTr.parentHash" + this).hide(); + }); + item[cfg.reserveKeys.openKey] = false; + + var myTree = this.tree; + axf.each(hashs, function (hidx, HH) { + if (hidx == 0) { + + } else if (hidx == 1) { + myTree = myTree[HH.number()]; + } else { + myTree = myTree.subTree[HH.number()]; + } + }); + myTree[cfg.reserveKeys.openKey] = false; + + this.contentScrollResize(); + + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + + //clear select + + this.clearFocus(); + + if (cfg.body.oncontract) { + //itemIndex, item, subTree + //dialog.push(Object.toJSON(subTree)); + var sendObj = { + index: itemIndex, + list: this.list, + list: this.tree, + item: item, + subTree: subTree, + itemID: this.body.find(".gridBodyTr_" + itemIndex).attr("id") + }; + cfg.body.oncontract.call(sendObj, itemIndex, item); + } + + } else { // 자식개체 열기 + + item[cfg.reserveKeys.openKey] = true; + + for (var r = 0; r < cfg.body.rows.length; r++) { + axdom("#" + cfg.targetID + "_AX_tr_" + r + "_AX_n_AX_" + itemIndex).find(".bodyNodeIndent").addClass("expand"); + } + + var hashs = item[cfg.reserveKeys.hashKey].split(/_/g); + + //findTree Position + + + var myTree = this.tree; + axf.each(hashs, function (hidx, HH) { + if (hidx == 0) { + + } else if (hidx == 1) { + myTree = myTree[HH.number()]; + } else { + myTree = myTree.subTree[HH.number()]; + } + }); + + var addHashs = []; + var preFixHash = hashs.join("_"); + var getAddHashs = function (_tree, pfHash) { + addHashs.push(pfHash); + axf.each(_tree, function (treeIndex, nTree) { + if (nTree.subTree.length > 0 && nTree[cfg.reserveKeys.openKey]) getAddHashs(nTree.subTree, pfHash + "_" + treeIndex.setDigit(cfg.hashDigit)); + }); + }; + getAddHashs(myTree.subTree, preFixHash); + + myTree[cfg.reserveKeys.openKey] = true; + + var subTree = []; + var _list = this.list; + var itemChangeDisplay = this.itemChangeDisplay.bind(this); + var _body = this.body; + axf.each(addHashs, function () { + _body.find(".gridBodyTr.parentHash" + this).each(function () { + var trIndex = this.id.split(/_AX_/g).last(); + itemChangeDisplay(trIndex, true); + subTree.push(_list[trIndex]); + }); + _body.find(".gridBodyTr.parentHash" + this).show(); + }); + + this.contentScrollResize(); + + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + + if (cfg.body.onexpand) { + //itemIndex, item, subTree + //dialog.push(Object.toJSON(subTree)); + var sendObj = { + index: itemIndex, + list: this.list, + list: this.tree, + item: item, + subTree: subTree, + itemID: this.body.find(".gridBodyTr_" + itemIndex).attr("id") + }; + cfg.body.onexpand.call(sendObj, itemIndex, item); + } + + } + + }, + itemChangeDisplay: function (itemIndex, status) { // 입력받은 인덱스의 display 상태변경 함수 + var cfg = this.config; + this.list[itemIndex][cfg.reserveKeys.displayKey] = status; + }, + gridBodyOver: function (event) { + var cfg = this.config; + if (this.overedItemIndex) { + this.body.find(".gridBodyTr_" + this.overedItemIndex).removeClass("hover"); + } + var itemIndex = (event.target.id).split(/_AX_/g).last(); + if (itemIndex != "") { + this.body.find(".gridBodyTr_" + itemIndex).addClass("hover"); + this.overedItemIndex = itemIndex; + } + }, + gridBodyOut: function (event) { + var cfg = this.config; + if (this.overedItemIndex) { + this.body.find(".gridBodyTr_" + this.overedItemIndex).removeClass("hover"); + } + }, + gridBodyClick: function(event){ + var cfg = this.config; + if (cfg.body.ondblclick) { + if (AXUtil.browser.name == "ie" && AXUtil.browser.version == 8) { + this.gridBodyClickAct(event); + } else { + if (this.bodyClickObserver){ + clearTimeout(this.bodyClickObserver); + this.gridBodyDBLClick(event); + this.bodyClickObserver = null; + return; + } + var gridBodyClickAct = this.gridBodyClickAct.bind(this); + this.bodyClickObserver = setTimeout(function () { + gridBodyClickAct(event); + }, 250); + } + }else{ + this.gridBodyClickAct(event); + } + }, + gridBodyClickAct: function (event) { + this.bodyClickObserver = null; + var cfg = this.config; + // event target search - + if(event.target.id == "" && event.target.tagName.toLowerCase() != "span") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + var isoncheck = false; + if (eventTarget.tagName.toLowerCase() == "input") { + this.gridCheckClick(event); + if (cfg.body.oncheck) { + isoncheck = true; + } else { + // checkbox event bind + return; //input 인 경우 제외 + } + } + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + until: function (evt, evtIDs) { return (axdom(evt.parentNode).hasClass("gridBodyTr")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("bodyTd") || axdom(evt).hasClass("bodyNodeIndent")) ? true : false; } + }); + // event target search ------------------------ + + if (isoncheck) { //체크박스 구현 + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + var item = this.list[itemIndex]; + var r = ids[ids.length - 3]; + var c = ids[ids.length - 2]; + var target = event.target; + var checked = event.target.checked; + var sendObj = { + index: itemIndex, + target: event.target, + checked: event.target.checked, + r: r, + c: c, + list: this.list, + item: item, + page: this.page + } + //trace(sendObj); + cfg.body.oncheck.call(sendObj, itemIndex, item); + } else { + if (myTarget) { + + //colHeadTool ready + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + + var clickNodeType = ids[(ids.length - 1) - 3]; + + if (clickNodeType == "bodyNodeIndent") { + var item = this.list[itemIndex]; + var r = ids[ids.length - 3]; + var c = ids[ids.length - 2]; + this.expandToggleList(itemIndex, item, r, c); + } else if (this.readyMoved) { + //이동명령 대기중 상태인경우 이동 처리 + //this.moveTarget = {itemIndex:itemIndex}; + this.moveTreeExec(this.moveTarget.itemIndex, itemIndex); + } else { + + //trace({tagName:myTarget.tagName, id:myTarget.id, clickNodeType:clickNodeType}); + if (clickNodeType == "nbody" || clickNodeType == "fbody") { + if (event.shiftKey) { + + } else if (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 = false; + var collect = []; + axf.each(this.selectedCells, function () { + if (this == targetID) { + hasID = true; + } else { + collect.push(this); + } + }); + if (hasID) { + axdom("#" + targetID).removeClass("selected"); + this.selectedCells = collect; + } else { + 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(); + } + if (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]; + var c = ids[ids.length - 2]; + + var hashs = item.hash.split(/_/g); + var subTree = this.tree; + axf.each(hashs, function (idx, arg) { + if (idx == 1) { + subTree = subTree[this.number()]; + } else if (idx > 1) { + subTree = subTree.subTree[this.number()]; + } + }); + + var sendObj = { + index: itemIndex, + r: r, + c: c, + list: this.list, + item: item, + subTree: subTree, + page: this.page + } + //trace(sendObj); + + cfg.body.onclick.call(sendObj, itemIndex, item); + } + //2013-01-23 오후 12:26:52 에디트 이벤트 변경 + //if(this.hasEditor) this.setEditor(item, itemIndex); + } + } + } + } + } + }, + gridBodyDBLClick: function (event) { + + //trace(event.type); + + var cfg = this.config; + // event target search - + if(event.target.id == "") return; + var eid = event.target.id.split(/_AX_/g); + var eventTarget = event.target; + if (eventTarget.tagName.toLowerCase() == "input") return; //input 인 경우 제외 + var myTarget = this.getEventTarget({ + evt: eventTarget, evtIDs: eid, + until: function (evt, evtIDs) { return (axdom(evt.parentNode).hasClass("gridBodyTr")) ? true : false; }, + find: function (evt, evtIDs) { return (axdom(evt).hasClass("bodyTd")) ? true : false; } + }); + // event target search ------------------------ + + if (myTarget) { + //colHeadTool ready + //trace({tagName:myTarget.tagName, id:myTarget.id}); + var targetID = myTarget.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var 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"); + }); + } + this.selectedRow.clear(); + this.body.find(".gridBodyTr_" + itemIndex).addClass("selected"); + this.selectedRow.push(itemIndex); + + if (cfg.body.ondblclick) { + var r = ids[ids.length - 3]; + var c = ids[ids.length - 2]; + var item = this.list[itemIndex]; + var sendObj = { + index: itemIndex, + r: r, + c: c, + list: this.list, + item: item, + page: this.page + } + cfg.body.ondblclick.call(sendObj); + } + } + + this.stopEvent(event); + this.clearRange(); + }, + gridCheckClick: function (event) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + var checkboxRelationFixed = cfg.checkboxRelationFixed; + var target = event.target; + var targetID = target.id; + var itemIndex = targetID.split(/_AX_/g).last(); + var ids = targetID.split(/_AX_/g); + var item = this.list[itemIndex]; + var colSeq = ids[ids.length - 2]; + var checked = event.target.checked; + var _body = this.body; + + if (checked) { // 체크박스가 체크 된경우 + // 자식 개체를 찾아 체크 처리 합니다. + var phash = item[reserveKeys.hashKey]; + + var childIndex = []; + axf.each(this.list, function (lidx, list) { + if (!this.isRoot) { + if (this[reserveKeys.hashKey].left(phash.length) == phash && this[reserveKeys.hashKey] != phash) { + childIndex.push(lidx); + } + } + }); + axf.each(childIndex, function () { + if (_body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + this).get(0)) { + _body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + this).get(0).checked = checked; + } + }); + + // 해시 변수 준비 + var hashs = phash.split(/_/g); + hashs.shift(); + + // 자식 트리 개체에 checked 속성을 부여 합니다. -------------- s + var stree = this.tree; + axf.each(hashs, function (hidx, H) { + if (hidx == 0) { + stree = stree[this.number()]; + } else { + stree = stree[reserveKeys.subTree][this.number()]; + } + }); + var subTreeChecked = function (T, checked) { + axf.each(T.subTree, function () { + this.__checked = checked; + if (this.subTree) subTreeChecked(this, checked); + }); + }; + stree.__checked = checked; + subTreeChecked(stree, checked); + //trace(stree); + // 자식 트리 개체에 checked 속성을 부여 합니다. -------------- e + + // 부모 트리 찾기 -------------- s + var ptree = this.tree; + for (var hidx = 0; hidx < hashs.length - 1; hidx++) { + if (hidx == 0) { + ptree = ptree[hashs[hidx].number()]; + } else { + ptree = ptree[reserveKeys.subTree][hashs[hidx].number()]; + } + }; + //trace(ptree); + + var parentIsRootTree = false; + if (this.tree == ptree) { + parentIsRootTree = true; + } + // 부모 트리 찾기 -------------- e + + if (!parentIsRootTree) { + var childIsAllChecked = true; + /* + axf.each(ptree[reserveKeys.subTree], function(){ + if(!this.__checked) childIsAllChecked = false; + }); + */ + if (childIsAllChecked) { + var findhash = ptree[reserveKeys.hashKey]; + + var p_tree = this.tree; + var checkedHashs = []; + + axf.each(hashs, function (hidx, H) { + if (hidx == 0) { + p_tree = p_tree[this.number()]; + } else { + p_tree.__checked = true; + checkedHashs.push(p_tree[reserveKeys.hashKey]); + p_tree = p_tree[reserveKeys.subTree][this.number()]; + } + }); + + //ptree.__checked = true; + //trace(findhash); + //trace(checkedHashs); + var _body = this.body; + axf.each(this.list, function (lidx, list) { + axf.each(checkedHashs, function () { + if (list[reserveKeys.hashKey] == this) { + if (_body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + lidx).get(0)) { + _body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + lidx).get(0).checked = checked; + } + } + }); + }); + + // 부모가 더이상 없을때까지 찾기 + } + } + + //trace(this.tree); + this.list = this.convertHashListToTree(this.tree); + + } else { // 체크박스가 체크 해제 된경우 + + if (checkboxRelationFixed != null) { + var phash = item[reserveKeys.hashKey]; + var childIndex = []; + axf.each(this.list, function (lidx, list) { + if (!this.isRoot) { + if (this[reserveKeys.hashKey].left(phash.length) == phash && this[reserveKeys.hashKey] != phash) { + childIndex.push(lidx); + } + } + }); + axf.each(childIndex, function () { + if (_body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + this).get(0)) { + _body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + this).get(0).checked = checked; + } + }); + + // 해시 변수 준비 + var hashs = phash.split(/_/g); + hashs.shift(); + + // 자식 트리 개체에 checked 속성을 부여 합니다. -------------- s + var stree = this.tree; + axf.each(hashs, function (hidx, H) { + if (hidx == 0) { + stree = stree[this.number()]; + } else { + stree = stree[reserveKeys.subTree][this.number()]; + } + }); + var subTreeChecked = function (T, checked) { + axf.each(T.subTree, function () { + this.__checked = checked; + if (this.subTree) subTreeChecked(this, checked); + }); + }; + stree.__checked = checked; + subTreeChecked(stree, checked); + // 자식 트리 개체에 checked 속성을 부여 합니다. -------------- e + } + //부모개체의 자식이 모두 제거 되었다면 체크를 해제 합니다. + if (checkboxRelationFixed) { + + var p_tree = this.tree; + var checkedHashs = []; + //trace(hashs); + + for (var l = hashs.length - 1; l > -1; l--) { + var subTreeStr = ""; + for (var i = 0; i < l + 1; i++) { + if (i == 0) { + subTreeStr += "[" + hashs[i].number() + "]"; + } else { + subTreeStr += "[reserveKeys.subTree][" + hashs[i].number() + "]"; + } + } + var myTree; + eval("myTree = this.tree" + subTreeStr); + //trace(myTree.hash); + var childIsAllUnChecked = true; + axf.each(myTree[reserveKeys.subTree], function () { + if (this.__checked) childIsAllUnChecked = false; + }); + if (childIsAllUnChecked) { + myTree.__checked = checked; + checkedHashs.push(myTree[reserveKeys.hashKey]); + } + }; + + //ptree.__checked = true; + //trace(findhash); + //trace(checkedHashs); + var _body = this.body; + axf.each(this.list, function (lidx, list) { + axf.each(checkedHashs, function () { + if (list[reserveKeys.hashKey] == this) { + if (_body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + lidx).get(0)) { + _body.find("#" + cfg.targetID + "_AX_checkboxItem_AX_" + colSeq + "_AX_" + lidx).get(0).checked = checked; + } + } + }); + }); + } + + this.list = this.convertHashListToTree(this.tree); + } + + }, + contentScrollResize: function (resetLeft) { + var cfg = this.config; + + var bodyHeight = this.body.height(); + var scrollHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + + var bodyWidth = this.body.width(); + var _colWidth = (this.colWidth.number() + cfg.fitToWidthRightMargin); + var scrollWidth = (_colWidth > bodyWidth) ? _colWidth : bodyWidth; + + if (cfg.width == "auto") scrollWidth = axdom("#" + cfg.targetID + "_AX_scrollContent").find("table.treeBodyTable").width().number(); + + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ width: scrollWidth }); + this.colHead.css({ width: scrollWidth }); // colHead width 재정의 + + if (this.hasEditor) this.editor.css({ width: scrollWidth }); + + if (resetLeft != false) { + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ left: 0 }); + axdom("#" + cfg.targetID + "_AX_gridColHead").css({ left: 0 }); + axdom("#" + cfg.targetID + "_AX_scrollXHandle").css({ left: 0 }); + if (this.hasEditor) axdom("#" + cfg.targetID + "_AX_editorContent").css({ left: 0 }); + } + + if (bodyHeight < scrollHeight && cfg.height != "auto") { + + if (cfg.width == "auto") { + //trace(scrollWidth); + //trace(axdom("#" + cfg.targetID + "_AX_scrollContent").width()); + //scrollWidth += 50; + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ width: scrollWidth }); + //trace(axdom("#" + cfg.targetID + "_AX_scrollContent").width()); + } + + //axdom("#" + cfg.targetID + "_AX_scrollTrackXY").show(); + axdom("#" + cfg.targetID + "_AX_scrollTrackY").show(); + + var scrollTrackYHeight = (cfg.xscroll) ? bodyHeight : bodyHeight; + axdom("#" + cfg.targetID + "_AX_scrollTrackY").css({ height: scrollTrackYHeight }); + + var scrollYHandleHeight = (bodyHeight * scrollTrackYHeight) / scrollHeight; + axdom("#" + cfg.targetID + "_AX_scrollYHandle").css({ height: scrollYHandleHeight }); + + + + } else { + //axdom("#" + cfg.targetID + "_AX_scrollTrackXY").hide(); + axdom("#" + cfg.targetID + "_AX_scrollTrackY").hide(); + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ top: 0 }); + } + + if (scrollWidth > bodyWidth && cfg.xscroll) { + + this.show_scrollTrackX = true; + + //axdom("#" + cfg.targetID + "_AX_scrollTrackXY").show(); + axdom("#" + cfg.targetID + "_AX_scrollTrackX").show(); + + var scrollTrackXWidth = bodyWidth; + axdom("#" + cfg.targetID + "_AX_scrollTrackX").css({ width: scrollTrackXWidth }); + var scrollXHandleWidth = ((bodyWidth) * scrollTrackXWidth) / (scrollWidth); + + axdom("#" + cfg.targetID + "_AX_scrollXHandle").css({ width: scrollXHandleWidth }); + + // cfg.height == "auto" 길이 늘이기 + if (cfg.height == "auto") { + var colHeadHeight = this.colHead.outerHeight(); + var scrollBodyHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + var scrollTrackXHeight = axdom("#" + cfg.targetID + "_AX_scrollTrackX").outerHeight(); + + this.scrollBody.css({ height: (scrollBodyHeight + colHeadHeight + scrollTrackXHeight) }); //colhead + body height + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight + scrollTrackXHeight) }); // body Height + } + } else { + this.show_scrollTrackX = false; + axdom("#" + cfg.targetID + "_AX_scrollTrackX").hide(); + //axdom("#"+cfg.targetID+"_AX_scrollTrackXY").hide(); + + if (cfg.height == "auto") { + var colHeadHeight = this.colHead.outerHeight(); + var scrollBodyHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + + this.scrollBody.css({ height: (scrollBodyHeight + colHeadHeight) }); //colhead + body height + this.body.css({ top: colHeadHeight, height: (scrollBodyHeight) }); // body Height + } + } + + }, + contentScrollScrollSync: function (pos) { + var cfg = this.config; + + if (pos.left != undefined) { + if (!this.contentScrollXAttr) { + var scrollWidth = (this.colWidth > this.body.width()) ? this.colWidth : this.body.width(); + this.contentScrollXAttr = { + bodyWidth: this.body.width(), + scrollWidth: scrollWidth, + scrollTrackXWidth: axdom("#" + cfg.targetID + "_AX_scrollTrackX").width(), + scrollXHandleWidth: axdom("#" + cfg.targetID + "_AX_scrollXHandle").outerHeight() + }; + } + + //x 변경 + var L = (this.contentScrollXAttr.scrollWidth * (pos.left) / this.contentScrollXAttr.scrollTrackXWidth).round(0); + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ left: -L }); + axdom("#" + cfg.targetID + "_AX_treeColHead").css({ left: -L }); + if (this.hasEditor) axdom("#" + cfg.targetID + "_AX_editorContent").css({ left: -L }); + //trace({top:-L}); + } else { + if (cfg.height == "auto") return; + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: axdom("#" + cfg.targetID + "_AX_scrollContent").height(), + scrollTrackYHeight: axdom("#" + cfg.targetID + "_AX_scrollTrackY").height(), + scrollYHandleHeight: axdom("#" + cfg.targetID + "_AX_scrollYHandle").outerHeight() + }; + } + + //y 변경 + var T = (this.contentScrollYAttr.scrollHeight * (pos.top) / this.contentScrollYAttr.scrollTrackYHeight).round(0); + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ top: -T }); + if (axf.getId(cfg.targetID + "_AX_fixedScrollContent")) axdom("#" + cfg.targetID + "_AX_fixedScrollContent").css({ top: -T }); + if (this.editorOpend) { + this.editor.css({ top: -T + this.editorOpenTop }); + } + //trace({top:-T}); + } + }, + contentScrollContentSync: function (pos) { + var cfg = this.config; + if (pos.left != undefined) { + + } else { + if (cfg.height == "auto") return; + if (!this.contentScrollYAttr) { + this.contentScrollYAttr = { + bodyHeight: this.body.height(), + scrollHeight: axdom("#" + cfg.targetID + "_AX_scrollContent").height(), + scrollTrackYHeight: axdom("#" + cfg.targetID + "_AX_scrollTrackY").height(), + scrollYHandleHeight: axdom("#" + cfg.targetID + "_AX_scrollYHandle").outerHeight() + }; + } + + //y 변경 + var T = (this.contentScrollYAttr.scrollYHandleHeight * (pos.top) / this.contentScrollYAttr.bodyHeight).round(0); + var handleTop = -T; + //trace({h1:(handleTop + this.contentScrollYAttr.handleHeight), trackHeight:this.contentScrollYAttr.trackHeight}); + //if((handleTop + this.contentScrollYAttr.handleHeight) > this.contentScrollYAttr.trackHeight) handleTop = this.contentScrollYAttr.trackHeight - this.contentScrollYAttr.handleHeight; + + axdom("#" + cfg.targetID + "_AX_scrollYHandle").css({ top: handleTop }); + if (axf.getId(cfg.targetID + "_AX_fixedScrollContent")) axdom("#" + cfg.targetID + "_AX_fixedScrollContent").css({ top: pos.top }); + if (this.editorOpend) { + this.editor.css({ top: pos.top + this.editorOpenTop }); + } + + } + }, + getMousePositionToContentScroll: function (event, contentScrollID) { + var pos = axdom("#" + contentScrollID).offset(); + var x = (event.pageX - pos.left); + var y = (event.pageY - pos.top); + return { x: x, y: y }; + }, + getTouchPositionToContentScroll: function (event) { + var cfg = this.config; + var touch = event.touches[0]; + var pos = this.contentScrollIDOffset; + if (cfg.touchDirection) { + var x = (touch.pageX.round(1) - pos.left); + var y = (touch.pageY.round(1) - pos.top); + } else { + var x = (-touch.pageX.round(1) - pos.left); + var y = (-touch.pageY.round(1) - pos.top); + } + return { x: x, y: y }; + }, + contentScrollScrollReady: function (event) { + var cfg = this.config; + var handleName = (event.target.id).split(/_AX_/).last(); + //trace(handleName); + this.contentScrollAttrs = { handleName: handleName }; + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + + if (handleName == "scrollYHandle") { + this.contentScrollAttrs.scrollTrack = cfg.targetID + "_AX_scrollTrackY"; + } else { + this.contentScrollAttrs.scrollTrack = 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 = axdom("#" + this.contentScrollAttrs.scrollTrack).width(); + this.contentScrollAttrs.trackHeight = axdom("#" + this.contentScrollAttrs.scrollTrack).height(); + + /* srcoll event bind */ + var contentScrollScrollMove = this.contentScrollScrollMove.bind(this); + this.contentScrollScrollMoveBind = function (event) { + contentScrollScrollMove(event); + }; + var contentScrollScrollEnd = this.contentScrollScrollEnd.bind(this); + this.contentScrollScrollEndBind = function (event) { + contentScrollScrollEnd(event); + }; + axdom(document.body).bind("mousemove.AXTree", this.contentScrollScrollMoveBind); + axdom(document.body).bind("mouseup.AXTree", this.contentScrollScrollEndBind); + axdom(document.body).bind("mouseleave.AXTree", this.contentScrollScrollEndBind); + axdom("iframe").bind("mouseover.AXTree", this.contentScrollScrollEndBind); + + axdom(document.body).attr("onselectstart", "return false"); + axdom(document.body).addClass("AXUserSelectNone"); + /* scroll event bind ~~~~~~~~~~~~~~~~~~~ */ + }, + contentScrollScrollMove: function (event) { + var cfg = this.config; + try { + var pos = this.getMousePositionToContentScroll(event, this.contentScrollAttrs.scrollTrack); + var handleName = this.contentScrollAttrs.handleName; + + var handleTop = 0; + var handleLeft = 0; + if (handleName == "scrollYHandle") { + handleTop = pos.y + this.contentScrollAttrs.y; + if (handleTop < 0) handleTop = 0; + if ((handleTop + this.contentScrollAttrs.handleHeight) > this.contentScrollAttrs.trackHeight) handleTop = this.contentScrollAttrs.trackHeight - this.contentScrollAttrs.handleHeight; + axdom("#" + cfg.targetID + "_AX_" + handleName).css({ top: handleTop }); + this.contentScrollScrollSync({ top: handleTop }); + } else { + handleLeft = pos.x + this.contentScrollAttrs.x; + if (handleLeft < 0) handleLeft = 0; + if ((handleLeft + this.contentScrollAttrs.handleWidth) > this.contentScrollAttrs.trackWidth) handleLeft = this.contentScrollAttrs.trackWidth - this.contentScrollAttrs.handleWidth; + axdom("#" + cfg.targetID + "_AX_" + handleName).css({ left: handleLeft }); + this.contentScrollScrollSync({ left: handleLeft }); + } + } catch (e) { + this.contentScrollScrollEnd(event); + } + }, + contentScrollScrollEnd: function (event) { + var cfg = this.config; + axdom(document.body).unbind("mousemove.AXTree"); + axdom(document.body).unbind("mouseup.AXTree"); + axdom(document.body).unbind("mouseleave.AXTree"); + axdom("iframe").unbind("mouseover.AXTree"); + + axdom(document.body).removeAttr("onselectstart"); + axdom(document.body).removeClass("AXUserSelectNone"); + + axdom("#" + cfg.targetID + "_AX_" + this.contentScrollAttrs.handleName).removeClass("hover"); + }, + contentScrollScrollWheel: function (e) { + var cfg = this.config; + if (cfg.height != "auto") { + var cfg = this.config; + + var event = window.event || e; + var delta = event.detail ? event.detail * (-20) : event.wheelDelta / 2 //check for detail first so Opera uses that instead of wheelDelta + + var scrollTop = axdom("#" + cfg.targetID + "_AX_scrollContent").position().top; + var scrollHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + var bodyHeight = this.body.height(); + //var handleTop = axdom("#"+cfg.targetID+"_AX_scrollYHandle").position().top; i want this value + var handleHeight = axdom("#" + cfg.targetID + "_AX_scrollYHandle").outerHeight(); + var trackHeight = axdom("#" + cfg.targetID + "_AX_scrollTrackY").height(); + + if (scrollHeight < bodyHeight) { + return; + } + + //trace({scrollTop:scrollTop, bodyHeight:bodyHeight, scrollHeight:scrollHeight}); + var eventCancle = false; + scrollTop += delta; + + if (scrollTop > 0) { + scrollTop = 0; + eventCancle = true; + } else if (scrollTop.abs() + bodyHeight > scrollHeight) { + scrollTop = bodyHeight - scrollHeight; + eventCancle = true; + } else if (scrollTop == 0) { + scrollTop = 0; + eventCancle = true; + } + + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + + if (!eventCancle) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + } + } + }, + contentScrollTouchstart: function (e) { + var cfg = this.config; + var event = window.event || e; + this.contentScrollTouchMoved = true; + this.contentScrollIDOffset = axdom("#" + cfg.targetID + "_AX_gridBody").offset(); + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + + var pos = this.getTouchPositionToContentScroll(event); + + var YhandleTop = axdom("#" + cfg.targetID + "_AX_scrollYHandle").position().top; + var YhandleHeight = axdom("#" + cfg.targetID + "_AX_scrollYHandle").outerHeight(); + var YtrackHeight = axdom("#" + cfg.targetID + "_AX_scrollTrackY").height(); + + axdom("#" + cfg.targetID + "_AX_scrollYHandle").addClass("hover"); + + var XhandleTop = axdom("#" + cfg.targetID + "_AX_scrollXHandle").position().left; + var XhandleHeight = axdom("#" + cfg.targetID + "_AX_scrollXHandle").outerWidth(); + var XtrackHeight = axdom("#" + cfg.targetID + "_AX_scrollTrackX").width(); + + axdom("#" + cfg.targetID + "_AX_scrollXHandle").addClass("hover"); + + this.scrollTouchAttr = { + y: (YhandleTop - pos.y).number(), h: YhandleHeight.number(), th: YtrackHeight, + x: (XhandleTop - pos.x).number(), w: XhandleHeight.number(), tw: XtrackHeight + }; + + var contentScrollTouchEnd = this.contentScrollTouchEnd.bind(this); + this.contentScrollTouchEndBind = function () { + contentScrollTouchEnd(event); + }; + + var contentScrollTouchMove = this.contentScrollTouchMove.bind(this); + this.contentScrollTouchMoveBind = function () { + contentScrollTouchMove(event); + }; + + if (document.addEventListener) { + document.addEventListener("touchend", this.contentScrollTouchEndBind, false); + document.addEventListener("touchmove", this.contentScrollTouchMoveBind, false); + } + }, + contentScrollTouchMove: function (e) { + var cfg = this.config; + var event = window.event || e; + if (this.contentScrollTouchMoved) { + var pos = this.getTouchPositionToContentScroll(event); + var scrollTouchAttr = this.scrollTouchAttr; + + var htop = axdom("#" + cfg.targetID + "_AX_scrollYHandle").position().top; + var handleTop = pos.y + scrollTouchAttr.y; + if (handleTop < 0) handleTop = 0; + if ((handleTop + scrollTouchAttr.h) > scrollTouchAttr.th) handleTop = scrollTouchAttr.th - scrollTouchAttr.h; + + if ((htop - handleTop).abs() > 2) { + axdom("#" + cfg.targetID + "_AX_scrollYHandle").css({ top: handleTop }); + this.contentScrollScrollSync({ top: handleTop }); + } + + if (this.show_scrollTrackX) { + var hleft = axdom("#" + cfg.targetID + "_AX_scrollXHandle").position().left; + var handleLeft = pos.x + this.scrollTouchAttr.x; + if (handleLeft < 0) handleLeft = 0; + if ((handleLeft + scrollTouchAttr.w) > scrollTouchAttr.tw) handleLeft = scrollTouchAttr.tw - scrollTouchAttr.w; + + if ((hleft - handleLeft).abs() > 2) { + axdom("#" + cfg.targetID + "_AX_scrollXHandle").css({ left: handleLeft }); + this.contentScrollScrollSync({ left: handleLeft }); + } + } + + if (event.preventDefault) event.preventDefault(); + else return false; + } + }, + contentScrollTouchEnd: function (e) { + var cfg = this.config; + var event = window.event || e; + if (this.contentScrollTouchMoved) { + + axdom("#" + cfg.targetID + "_AX_scrollXHandle").removeClass("hover"); + axdom("#" + cfg.targetID + "_AX_scrollYHandle").removeClass("hover"); + + if (document.removeEventListener) { + document.removeEventListener("touchend", this.contentScrollTouchEndBind, false); + document.removeEventListener("touchmove", this.contentScrollTouchMoveBind, false); + } + this.contentScrollTouchMoved = false; + } + }, + clearFocus: function () { + + }, + setFocus: function (itemIndex) { + var cfg = this.config; + + if (this.selectedCells.length > 0) { + axf.each(this.selectedCells, function () { + axdom("#" + this).removeClass("selected"); + }); + this.selectedCells.clear(); + } + if (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); + + if(cfg.height != "auto"){ + var trTop = this.body.find(".gridBodyTr_" + itemIndex).position().top; + var trHeight = this.body.find(".gridBodyTr_" + itemIndex).height(); + + var scrollHeight = axdom("#" + cfg.targetID + "_AX_scrollContent").height(); + var bodyHeight = this.body.height(); + var handleHeight = axdom("#" + cfg.targetID + "_AX_scrollYHandle").outerHeight(); + var trackHeight = axdom("#" + cfg.targetID + "_AX_scrollTrackY").height(); + + if (trTop.number() + trHeight.number() > bodyHeight) { + var scrollTop = bodyHeight - (trTop.number() + trHeight.number()); + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } else { + if (trTop.number() == 0) { + var scrollTop = 0; + axdom("#" + cfg.targetID + "_AX_scrollContent").css({ top: scrollTop }); + this.contentScrollContentSync({ top: scrollTop }); + } + } + } + }, + click: function (itemIndex, open, doNotCallBack) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + + var item = this.list[itemIndex]; + + var hashs = item.hash.split(/_/g); + var subTree = this.tree; + + var opendPath = []; + axf.each(hashs, function (idx, arg) { + if (idx == 1) { + subTree = subTree[this.number()]; + opendPath.push(subTree[reserveKeys.hashKey]); + } else if (idx > 1) { + subTree = subTree.subTree[this.number()]; + opendPath.push(subTree[reserveKeys.hashKey]); + } + }); + opendPath.pop(); + + if (cfg.body.onclick && !doNotCallBack) { + var sendObj = { + index: itemIndex, + list: this.list, + item: item, + subTree: subTree, + page: this.page + } + cfg.body.onclick.call(sendObj, itemIndex, item); + } + + if(open == "open"){ + var expandList = []; + axf.each(this.list, function(lidx, L){ + axf.each(opendPath, function(pidx, P){ + if(L[reserveKeys.hashKey] == P){ + if(!L[reserveKeys.openKey]){ + expandList.push(lidx); + } + } + }); + }); + //trace(expandList); + for(var i=0;i"); + var colCount = 0; + + axf.each(cfg.head.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == undefined || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + //radio, check exception + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + //trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + tpo.push("
    "); + tpo.push("
    "); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
    "); + tpo.push("
    "); + tpo.push(""); + } + } + }); + if (r == 0 && isfix == undefined) { + tpo.push("
     
    "); + } + tpo.push(""); + } + return tpo.join(''); + }, + getFootDataSet: function (dataSet, isfix) { + var cfg = this.config; + var tpo = []; + var getDataSetFormatterValue = this.getDataSetFormatterValue.bind(this); + //dataSet 빈 Key 채우기 + axf.each(cfg.colGroup, function () { + if (dataSet[this.key] == undefined) dataSet[this.key] = ""; + }); + //dataSet 빈 Key 채우기 ~~~~~~~~~~~~~~~~ + var hasFixed = this.hasFixed; + + for (var r = 0; r < cfg.foot.rows.length; r++) { + var isLastTR = (cfg.foot.rows.length - 1 == r); + tpo.push(""); + var colCount = 0; + + axf.each(cfg.foot.rows[r], function (CHidx, CH) { + if (CH.display && CH.colspan > 0) { + + if (isfix == undefined || (isfix != undefined && colCount < (cfg.fixedColSeq + 1))) { + + colCount += CH.colspan; + + //radio, check exception + var rowspan = (CH.rowspan > 1) ? " rowspan=\"" + CH.rowspan + "\"" : ""; + var colspan = (CH.colspan > 1) ? " colspan=\"" + CH.colspan + "\"" : ""; + var valign = " valign=\"" + CH.valign + "\" style=\"vertical-align:" + CH.valign + ";\""; + var bottomClass = (CH.isLastCell) ? "" : " bodyBottomBorder"; + var fixedClass = (CH.isFixedEndCell) ? " fixedLine" : ""; + + //trace({r:r, CHidx:CHifixedColSeq:cfg.fixedColSeq, colCount:colCount}); + + var bodyNodeClass = ""; + if (CH.formatter == "checkbox") bodyNodeClass = " bodyTdCheckBox"; + else if (CH.formatter == "html") bodyNodeClass = " bodyTdHtml"; + + tpo.push(""); + tpo.push("
    "); + tpo.push("
    "); + if ((hasFixed && !CH.isFixedCell) || !hasFixed || isfix != undefined) { + if (CH.formatter) { + tpo.push(getDataSetFormatterValue(CH.formatter, dataSet, dataSet[CH.key], CH.key, CH)); + } else { + tpo.push(dataSet[CH.key]); + } + } else { + tpo.push(" "); + } + tpo.push("
    "); + tpo.push("
    "); + tpo.push(""); + } + } + }); + if (r == 0 && isfix == undefined) { + tpo.push("
     
    "); + } + tpo.push(""); + } + return tpo.join(''); + }, + setDataSet: function (obj) { + var cfg = this.config; + if (obj.ajaxUrl) { + + } else { + if (axdom.isPlainObject(obj)) { + this.dataSet = obj; + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + this.contentScrollResize(false); + } + } + }, + redrawDataSet: function () { + var cfg = this.config; + if (this.dataSet) { + if (cfg.head) this.printHead(); + if (cfg.foot) this.printFoot(); + } + }, + printHead: function () { + var cfg = this.config; + var getDataSet = this.getHeadDataSet.bind(this); + var po = []; + po.push(getDataSet(this.dataSet)); + axdom("#" + cfg.targetID + "_AX_thead").html(po.join('')); + if (this.hasFixed) { + po = []; + po.push(getDataSet(this.dataSet, "fix")); + axdom("#" + cfg.targetID + "_AX_fixedThead").html(po.join('')); + } + }, + printFoot: function () { + var cfg = this.config; + var getDataSet = this.getFootDataSet.bind(this); + var po = []; + po.push(getDataSet(this.dataSet)); + axdom("#" + cfg.targetID + "_AX_tfoot").html(po.join('')); + if (this.hasFixed) { + po = []; + po.push(getDataSet(this.dataSet, "fix")); + axdom("#" + cfg.targetID + "_AX_fixedTfoot").html(po.join('')); + } + }, + /* head & foot 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ editor 영역 */ + + /* editor 영역 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + /* tree 추가 메서드 */ + setTree: function (obj, sortDisable) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + this.listLoadingDisplay(); + + if (obj.ajaxUrl) { + this.ajaxInfo = obj; + this.ajax_sortDisable = sortDisable; + this.pageActive = true; + + var url = obj.ajaxUrl; + /* + var appendPars = [ + "pageNo="+this.page.pageNo, + "pageSize="+this.page.pageSize + ]; + var pars = (obj.ajaxPars) ? obj.ajaxPars + "&" + appendPars.join('&') : appendPars.join('&') ; + */ + var pars = (obj.ajaxPars) ? obj.ajaxPars : ""; + + var ajaxGetTree = this.ajaxGetTree.bind(this); + new AXReq(url, { + debug: false, pars: pars, onsucc: function (res) { + if (res.result == AXConfig.AXReq.okCode) { + res._sortDisable = sortDisable; + if (obj.response) { + obj.response.call(res); + } else { + ajaxGetTree(res); + } + if (obj.onLoad) obj.onLoad.call(res); + } else { + //AXUtil.alert(res); + AXUtil.alert(res.msg); + } + } + }); + } else { + this.ajaxInfo = null; + if (axdom.isArray(obj)) { + this.tree = obj; + this.list = this.convertHashListToTree(obj); + //trace(this.list); + this.setList(this.list, false); + } + } + + }, + ajaxGetTree: function (res) { + var cfg = this.config; + var nowSortHeadID = this.nowSortHeadID; + var nowSortHeadObj = this.nowSortHeadObj; + this.tree = res[AXConfig.AXTree.keyTree]; + + this.list = this.convertHashListToTree(res[AXConfig.AXTree.keyTree]); + if (res._sortDisable || !cfg.sort) { + + } else { + if (nowSortHeadID) { + this.list = this.sortList(nowSortHeadObj.sort, nowSortHeadObj, this.list); + } + } + //AXUtil.overwriteObject(this.page, res.page, true); + this.setList(this.list, false); + //this.setPaging(); tree 에선 페이징 보류 + }, + setLoading: function (itemIndex, item) { + var cfg = this.config; + for (var r = 0; r < cfg.body.rows.length; r++) { + axdom("#" + cfg.targetID + "_AX_tr_" + r + "_AX_n_AX_" + itemIndex).find(".bodyNodeIndent").addClass("loading"); + } + }, + endLoading: function (itemIndex, item) { + var cfg = this.config; + for (var r = 0; r < cfg.body.rows.length; r++) { + axdom("#" + cfg.targetID + "_AX_tr_" + r + "_AX_n_AX_" + itemIndex).find(".bodyNodeIndent").removeClass("loading"); + } + }, + appendTree: function (itemIndex, item, subTree) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + + //trace({itemIndex:itemIndex, item:item, subTree:subTree}); + + if (itemIndex == null || itemIndex == undefined || item == null || item == undefined) { + + var tree = this.tree; + + axf.each(subTree, function () { + this[cfg.reserveKeys.subTree] = []; + tree.push(this); + }); + + var pushedList = this.appendSubTree("0".setDigit(cfg.hashDigit), true, subTree, this.tree); + this.printList(); + + } else { // 부모 하위 개체로 추가할 때에. + + axf.each(subTree, function () { + if (!this[cfg.reserveKeys.subTree]) this[cfg.reserveKeys.subTree] = []; + }); + var hashs = item.hash.split(/_/g); + + var tree = this.tree; // 추가될 트리 구하기 + axf.each(hashs, function (idx, T) { + if (idx > 0) { + if (idx == 1) tree = tree[T.number()]; + else tree = tree[cfg.reserveKeys.subTree][T.number()]; + } + }); + + //tree.subTree = + tree[reserveKeys.openKey] = true; + axf.each(subTree, function () { + tree[reserveKeys.subTree].push(this); + }); + + this.list = this.convertHashListToTree(this.tree); + this.printList(); + } + + this.contentScrollXAttr = null; + this.contentScrollYAttr = null; + /* */ + }, + appendSubTree: function (parentHash, parentOpened, arr, parentArr) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var appendSubTree = this.appendSubTree.bind(this); + var appendSubTree_pushList = this.appendSubTree_pushList.bind(this); + + var returnList = []; + var appendIndex = this.list.length; + var parentSubTreeLength = 0; + if (parentHash != "0".setDigit(cfg.hashDigit)) parentSubTreeLength = parentArr[reserveKeys.subTree].length; + else parentSubTreeLength = parentArr.length; + + axf.each(arr, function (idx, A) { + var pushItem = {}; + var hasOpenKey = false, hasSubTree = false; + axf.each(A, function (k, v) { + if (k == reserveKeys.openKey) { + hasOpenKey = true; + pushItem[k] = v; + } else if (k == reserveKeys.subTree) { + hasSubTree = true; + pushItem.__subTreeLength = v.length; + } else if (k == "__subTree") { + hasSubTree = true; + pushItem.__subTreeLength = 1; + } else { + pushItem[k] = v; + } + }); + + pushItem[reserveKeys.parentHashKey] = parentHash; + pushItem[reserveKeys.hashKey] = parentHash + cfg.hashSpliter + (idx + parentSubTreeLength - 1).setDigit(cfg.hashDigit); + if (!hasOpenKey) pushItem[reserveKeys.openKey] = true; + + //trace(pushItem[reserveKeys.openKey]); + + if (!hasSubTree) pushItem.__subTreeLength = 0; + if (!pushItem[reserveKeys.subTree]) pushItem[reserveKeys.subTree] = []; + pushItem[reserveKeys.displayKey] = parentOpened; + if (pushItem[reserveKeys.openKey] && !parentOpened) pushItem[reserveKeys.openKey] = false; //부보가 닫힌 개체 이면 자식 개체도 닫힘 + + //trace(pushItem); + + + appendSubTree_pushList(pushItem); + returnList.push({ itemIndex: appendIndex, item: pushItem }); + appendIndex++; + + if (!A[reserveKeys.subTree]) A[reserveKeys.subTree] = []; + + if (hasSubTree && A[reserveKeys.subTree].length > 0) { + appendSubTree(pushItem[reserveKeys.hashKey], pushItem[reserveKeys.openKey], A[reserveKeys.subTree]); + } + }); + return returnList; + }, + appendSubTree_pushList: function (item) { + this.list.push(item); + }, + updateTree: function (itemIndex, item, obj) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + AXUtil.overwriteObject(item, obj); + this.updateList(itemIndex, item); + }, + removeTree: function (itemIndex, item) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + // this.list 와 this.tree 에서 해당 개체를 찾아 제거 한다. + // tree 찾기 + var hashs = item[reserveKeys.hashKey].split(/_/g); + var phash = item[reserveKeys.parentHashKey]; + var tree = this.tree; + var ptree = this.tree; + for (var idx = 1; idx < hashs.length; idx++) { + var H = hashs[idx]; + if (idx == 1) tree = tree[H.number()]; + else tree = tree.subTree[H.number()]; + if (idx == hashs.length - 2) { + //부모 트리인 경우 + ptree = tree; + } + } + + tree._isDel = true; + + var applyDel = function (subTree) { + for (var ti = 0; ti < subTree.length; ti++) { + subTree[ti]._isDel = true; + if (subTree[ti].subTree) { + applyDel(subTree[ti].subTree); + } + } + }; + applyDel(tree.subTree); + + var __subTreeLength = 0; + if (ptree.subTree) { + axf.each(ptree.subTree, function () { + if (!this._isDel) __subTreeLength++; + }); + } + + // 삭제할 item 에 종속된 itemIndex 구한다. + var pItem = null; + + axf.each(this.list, function (idx, L) { + + if (L[reserveKeys.hashKey].left(item[reserveKeys.hashKey].length) == item[reserveKeys.hashKey]) { + L._isDel = true; + axdom(".gridBodyTr_" + idx).remove(); + } + if (phash == L[reserveKeys.hashKey]) { + pItem = { itemIndex: idx, item: L }; + } + }); + + //부모 ITEM 의 __subTreeLength 속성 변경하기 + if (pItem) { + this.list[pItem.itemIndex].__subTreeLength = __subTreeLength; + + // appendList 구문 생성 + /* */ + if (__subTreeLength == 0) { + var lastR = cfg.body.rows.length - 1; + axdom("#" + cfg.targetID + "_AX_tr_" + lastR + "_AX_n_AX_" + pItem.itemIndex).find(".bodyNodeIndent").hide(); + axdom("#" + cfg.targetID + "_AX_tr_" + lastR + "_AX_f_AX_" + pItem.itemIndex).find(".bodyNodeIndent").hide(); + axdom("#" + cfg.targetID + "_AX_tr_" + lastR + "_AX_n_AX_" + pItem.itemIndex).find(".bodyNodeIndent").removeClass("expand"); + axdom("#" + cfg.targetID + "_AX_tr_" + lastR + "_AX_f_AX_" + pItem.itemIndex).find(".bodyNodeIndent").removeClass("expand"); + } + } + + if (this.selectedRow.length > 0) { + var body = this.body; + axf.each(this.selectedRow, function () { + body.find(".gridBodyTr_" + this).removeClass("selected"); + }); + this.selectedRow.clear(); + AXContextMenu.close({ id: cfg.targetID + "ContextMenu" }); // event 직접 연결 방식 + } + + }, + moveUpTree: function () { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + var selectedObject = this.getSelectedList(); + + if (selectedObject.error) { + toast.push(selectedObject.description); + return; + } + + var itemIndex = selectedObject.index; + var item = this.list[selectedObject.index]; + + var hashs = item.hash.split(/_/g); + var myTree = this.tree; + var nowChildIndex; + var parentHashs = []; + + for (var hidx = 1; hidx < hashs.length - 1; hidx++) { + if (hidx == 1) { + myTree = myTree[hashs[hidx].number()]; + parentHashs.push(hashs[hidx]); + } else { + myTree = myTree.subTree[hashs[hidx].number()]; + parentHashs.push(hashs[hidx]); + } + nowChildIndex = hashs[hidx + 1].number(); + } + + var isRootControl = false; + if (myTree == this.tree) { + isRootControl = true; + nowChildIndex = hashs.last().number(); + } + + if (nowChildIndex < 1) { + //이동불가 + toast.push("순서의 처음입니다."); + } else { + + try { + if (isRootControl) { + var newSelectedHash = "0".setDigit(cfg.hashDigit) + "_" + (nowChildIndex - 1).setDigit(cfg.hashDigit); + var tempObj = AXUtil.copyObject(myTree[nowChildIndex]); + myTree[nowChildIndex] = AXUtil.copyObject(myTree[nowChildIndex - 1]); + myTree[nowChildIndex - 1] = tempObj; + } else { + var newSelectedHash = "0".setDigit(cfg.hashDigit) + "_" + parentHashs.join("_") + "_" + (nowChildIndex - 1).setDigit(cfg.hashDigit); + var tempObj = AXUtil.copyObject(myTree.subTree[nowChildIndex]); + myTree.subTree[nowChildIndex] = AXUtil.copyObject(myTree.subTree[nowChildIndex - 1]); + myTree.subTree[nowChildIndex - 1] = tempObj; + } + } catch (e) { + trace(e); + } + + this.selectedCells.clear(); + this.selectedRow.clear(); + + this.list = this.convertHashListToTree(this.tree); + this.printList(); + + var newSelecteIndex; + for (var idx = 0; idx < this.list.length; idx++) { + if (this.list[idx][reserveKeys.hashKey] == newSelectedHash) { + newSelecteIndex = idx; + + this.body.find(".gridBodyTr_" + newSelecteIndex).addClass("selected"); + this.selectedRow.push(newSelecteIndex); + + break; + } + }; + + } + }, + moveDownTree: function () { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + var selectedObject = this.getSelectedList(); + + if (selectedObject.error) { + toast.push(selectedObject.description); + return; + } + + var itemIndex = selectedObject.index; + var item = this.list[selectedObject.index]; + var hashs = item.hash.split(/_/g); + + var myTree = this.tree; + var nowChildIndex; + var parentHashs = []; + for (var hidx = 1; hidx < hashs.length - 1; hidx++) { + if (hidx == 1) { + myTree = myTree[hashs[hidx].number()]; + parentHashs.push(hashs[hidx]); + } else { + myTree = myTree.subTree[hashs[hidx].number()]; + parentHashs.push(hashs[hidx]); + } + nowChildIndex = hashs[hidx + 1].number(); + //trace(myTree); + } + + var isRootControl = false; + var subTreeLength; + if (myTree == this.tree) { + isRootControl = true; + //parentHashs.push(hashs.last(); + nowChildIndex = hashs.last().number(); + subTreeLength = myTree.length; + } else { + subTreeLength = myTree.subTree.length; + } + + if (nowChildIndex > subTreeLength - 2) { + //이동불가 + toast.push("순서의 마지막입니다."); + } else { + + try { + if (isRootControl) { + var newSelectedHash = "0".setDigit(cfg.hashDigit) + "_" + (nowChildIndex.number() + 1).setDigit(cfg.hashDigit); + var tempObj = AXUtil.copyObject(myTree[nowChildIndex]); + myTree[nowChildIndex] = AXUtil.copyObject(myTree[nowChildIndex.number() + 1]); + myTree[nowChildIndex.number() + 1] = tempObj; + } else { + var newSelectedHash = "0".setDigit(cfg.hashDigit) + "_" + parentHashs.join("_") + "_" + (nowChildIndex.number() + 1).setDigit(cfg.hashDigit); + var tempObj = AXUtil.copyObject(myTree.subTree[nowChildIndex]); + myTree.subTree[nowChildIndex] = AXUtil.copyObject(myTree.subTree[nowChildIndex.number() + 1]); + myTree.subTree[nowChildIndex.number() + 1] = tempObj; + } + } catch (e) { + trace(e); + } + + this.selectedCells.clear(); + this.selectedRow.clear(); + + this.list = this.convertHashListToTree(this.tree); + this.printList(); + + var newSelecteIndex; + for (var idx = 0; idx < this.list.length; idx++) { + if (this.list[idx][reserveKeys.hashKey] == newSelectedHash) { + newSelecteIndex = idx; + + this.body.find(".gridBodyTr_" + newSelecteIndex).addClass("selected"); + this.selectedRow.push(newSelecteIndex); + + break; + } + }; + + } + + }, + moveTree: function (Option) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + var moveObj = Option.moveObj, targetObj = Option.targetObj; + + if (moveObj && targetObj) { + //외부 이동 명령 처리 + //this.moveTreeExec(); 을 위한 필터링 + } else { + + var selectedObject = this.getSelectedList(); + + if (selectedObject.error) { + toast.push(selectedObject.description); + return; + } + + var itemIndex = selectedObject.index; + var item = this.list[selectedObject.index]; + var hashs = item.hash.split(/_/g); + + this.body.find(".gridBodyTr_" + itemIndex).addClass("copied"); + toast.push({ type: "Warning", body: "선택하신 아이템을 이동시킬 부모 아이템을 선택하세요" }); + this.readyMoved = true; + this.moveTarget = { itemIndex: itemIndex }; + this.moveValidate = Option.validate; + this.moveEndFunction = Option.endMove; + + if (Option.startMove) { + Option.startMove.call(); + } + + //직계 부모를 disable 처리 합니다. + this.addClassItem({ + className: "disable", + addClass: function () { + return (item[reserveKeys.parentHashKey] == this[reserveKeys.hashKey] || item[reserveKeys.hashKey] == this[reserveKeys.hashKey].left(item[reserveKeys.hashKey].length)); + } + }); + + // key event ready + var eventForDocument = this.onBodyKeydown.bind(this); + this.eventForDocument = function (event) { + eventForDocument(event); + } + axdom(document.body).bind("keydown", this.eventForDocument); + + } + }, + moveTreeExec: function (moveIndex, targetIndex) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + if (moveIndex == targetIndex) { + alert("이동 위치와 이동대상이 같습니다. 이동 할 수 없습니다."); + return; + } + + var moveObj = this.list[moveIndex]; + var targetObj = this.list[targetIndex]; + + if (moveObj[reserveKeys.parentHashKey] == targetObj[reserveKeys.hashKey]) { + alert("이동 위치가 현재 위치와 다르지 않습니다. 이동 할 수 없습니다."); + return; + } + if (moveObj[reserveKeys.hashKey] == targetObj[reserveKeys.hashKey].left(moveObj[reserveKeys.hashKey].length)) { + alert("이동 위치가 자식위치입니다. 이동 할 수 없습니다."); + return; + } + + if (this.moveValidate) { + var validateResult = this.moveValidate.call({ moveObj: moveObj, targetObj: targetObj }, moveObj, targetObj); + if (!validateResult) { + return; + } + } + + //trace(this.tree); + + //아이템 복사 ~~~~~~~~~~~~~~~~~~ + var move_hashs = moveObj[reserveKeys.hashKey].split(/_/g); + var move_Tree_parent = this.tree; + for (var hidx = 1; hidx < move_hashs.length - 1; hidx++) { + if (hidx == 1) { + move_Tree_parent = move_Tree_parent[move_hashs[hidx].number()]; + } else { + move_Tree_parent = move_Tree_parent.subTree[move_hashs[hidx].number()]; + } + } + var copyObject = {}; + //trace("moveObj"); + //trace(moveObj); + + var move_Tree_parent_subTree = []; + if (move_hashs.length == 2) { // root level + move_Tree_parent_subTree = this.tree; + } else { + move_Tree_parent_subTree = move_Tree_parent.subTree; + } + + axf.each(move_Tree_parent_subTree, function (subTreeIndex, ST) { + if (ST[relation.childKey] == moveObj[relation.childKey]) { + copyObject = AXUtil.copyObject(ST); + } else { + + } + }); + //~~~~~~~~~~~~~~~~~~ 아이템 복사 + + //아이템 이동 ~~~~~~~~~~~~~~~~~~ + var target_hashs = targetObj[reserveKeys.hashKey].split(/_/g); + var target_Tree_parent = this.tree; + + //trace(this.tree); + + var newSelectedHashs = []; + newSelectedHashs.push(target_hashs[0]); + for (var hidx = 1; hidx < target_hashs.length; hidx++) { + newSelectedHashs.push(target_hashs[hidx]); + if (hidx == 1) { + target_Tree_parent = target_Tree_parent[target_hashs[hidx].number()]; + } else { + target_Tree_parent = target_Tree_parent.subTree[target_hashs[hidx].number()]; + } + } + newSelectedHashs.push((target_Tree_parent.subTree.length).setDigit(cfg.hashDigit)); + + copyObject[relation.parentKey] = target_Tree_parent[relation.childKey]; + try { + copyObject[relation.parentName] = target_Tree_parent[relation.childName]; + } catch (e) { + + } + + target_Tree_parent.subTree.push(copyObject); + + var newSelectedHash = newSelectedHashs.join("_"); + + //~~~~~~~~~~~~~~~~~~ 아이템 이동 + + //이동된 아이템 제거 + var new_subTree = []; + axf.each(move_Tree_parent_subTree, function (subTreeIndex, ST) { + if (ST[relation.childKey] == moveObj[relation.childKey]) { + + } else { + new_subTree.push(ST); + } + }); + + if (move_hashs.length == 2) { // root level + this.tree = new_subTree; + } else { + move_Tree_parent.subTree = new_subTree; + } + + this.selectedCells.clear(); + this.selectedRow.clear(); + + this.list = this.convertHashListToTree(this.tree); + this.printList(); + + var newSelecteIndex; + for (var idx = 0; idx < this.list.length; idx++) { + if (this.list[idx][reserveKeys.hashKey] == newSelectedHash) { + newSelecteIndex = idx; + + this.body.find(".gridBodyTr_" + newSelecteIndex).addClass("selected"); + this.selectedRow.push(newSelecteIndex); + + break; + } + }; + + this.cancelMove(); + }, + cancelMove: function () { + this.readyMoved = false; + this.body.find(".gridBodyTr_" + this.moveTarget.itemIndex).removeClass("copied"); + if (this.moveEndFunction) { + this.moveEndFunction.call(); + } + + this.body.find(".gridBodyTr.disable").removeClass("disable"); + + this.moveTarget = null; + axdom(document.body).unbind("keydown", this.eventForDocument); + }, + addClassItem: function (Option) { + var body = this.body; + + axf.each(this.list, function (listIndex, item) { + if (Option.addClass) { + if (Option.addClass.call(item)) { + body.find(".gridBodyTr_" + listIndex).addClass(Option.className); + } + } + }); + }, + removeClassItem: function (Option) { + var body = this.body; + + axf.each(this.list, function (listIndex, item) { + if (Option.removeClass) { + if (Option.removeClass.call(item)) { + //trace(listIndex); + body.find(".gridBodyTr_" + listIndex).removeClass(Option.className); + } + } + }); + }, + /* tree 추가 메서드 */ + + /* tree = list convert */ + convertHashListToTree: function (Tree) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + this.hashList = []; + var pushItem = { isRoot: true }; + pushItem[relation.childKey] = "0"; + pushItem[reserveKeys.hashKey] = "0".setDigit(cfg.hashDigit); + pushItem[reserveKeys.parentHashKey] = ""; + pushItem[reserveKeys.openKey] = true; + pushItem._subTreeLength = Tree.length; + + this.getSubTreeList(pushItem[reserveKeys.hashKey], pushItem[reserveKeys.openKey], pushItem, Tree); + return this.hashList; + }, + getSubTreeList: function (parentHash, parentOpened, parentItem, arr) { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + var getSubTreeList = this.getSubTreeList.bind(this); + var pushHashList = this.pushHashList.bind(this); + + if (!arr[reserveKeys.subTree]) arr[reserveKeys.subTree] = []; + + axf.each(arr, function (idx, A) { + var pushItem = {}; + var hasOpenKey = false, hasSubTree = false; + + delete A.__subTreeLength; + axf.each(A, function (k, v) { + if (k == reserveKeys.openKey) { + hasOpenKey = true; + pushItem[k] = v; + } else if (k == reserveKeys.subTree) { + hasSubTree = true; + pushItem.__subTreeLength = v.length; + } else if (k == "__subTree") { + hasSubTree = true; + pushItem.__subTreeLength = 1; + } else { + pushItem[k] = v; + } + }); + pushItem[reserveKeys.parentHashKey] = parentHash; + pushItem[reserveKeys.hashKey] = parentHash + cfg.hashSpliter + idx.setDigit(cfg.hashDigit); + A[reserveKeys.hashKey] = parentHash + cfg.hashSpliter + idx.setDigit(cfg.hashDigit); + if (!hasOpenKey) pushItem[reserveKeys.openKey] = false; + if (!hasSubTree) pushItem.__subTreeLength = 0; + pushItem[reserveKeys.displayKey] = parentOpened; + if (pushItem[reserveKeys.openKey] && !parentOpened) pushItem[reserveKeys.openKey] = false; //부보가 닫힌 개체 이면 자식 개체도 닫힘 + + if (pushItem[relation.parentKey] == undefined) { + pushItem[relation.parentKey] = parentItem[relation.childKey]; + } + + if(idx == (arr.length-1)){ + A.__isLastChild = true; + pushItem.__isLastChild = true; + }else{ + A.__isLastChild = false; + pushItem.__isLastChild = false; + } + pushHashList(pushItem); + + if (!A[reserveKeys.subTree]) A[reserveKeys.subTree] = []; + if (hasSubTree && A[reserveKeys.subTree].length > 0) { + getSubTreeList(pushItem[reserveKeys.hashKey], pushItem[reserveKeys.openKey], pushItem, A[reserveKeys.subTree]); + } + }); + }, + pushHashList: function (item) { + this.hashList.push(item); + }, + convertTreeToHashList: function (List) { + var cfg = this.config; + reserveKeys = cfg.reserveKeys; + //cfg.hashSpliter; + var hashTree = []; + + for (var idx = 0; idx < List.length; idx++) { + var item = List[idx]; + var re = new RegExp(cfg.hashSpliter, "g"); + var pHash = item[reserveKeys.parentHashKey]; + var hashs = item[reserveKeys.hashKey].split(re); + var pushItem = {}; + axf.each(item, function (k, v) { + var addOk = true; + axf.each(reserveKeys, function (kk, vv) { + if (k == vv) { + addOk = false; + return false; + } + }); + if (addOk) { + pushItem[k] = v; + } + }); + pushItem[reserveKeys.hashKey] = item[reserveKeys.hashKey]; + pushItem.subTree = []; + if (hashs.length == 2) { + hashTree.push(pushItem); + } else if (hashs.length > 2) { + var pItem = hashTree.has(function () { + return this.item[reserveKeys.hashKey] == pHash; + }); + if (pItem) { + pItem.subTree.push(pushItem); + } + } + } + }, + positioningHashList: function (List) { + var cfg = this.config; + reserveKeys = cfg.reserveKeys; + relation = cfg.relation; + + if (!relation) { + toast.push("relation 속성이 지정되지 않아 요청을 수행 할 수 없습니다. relation:{parentKey:'', childKey:''}"); + return; + } + + // make pointer; + var tree = []; + var pointer = {}; + var seq = 0; + for (var idx = 0; idx < List.length; idx++) { + var L = List[idx]; + if (!L.isRoot) { + if(L.AXTreeSplit){ + + }else{ + pointer[L[relation.childKey]] = idx; + if (L[reserveKeys.openKey] == undefined) L[reserveKeys.openKey] = false; + if (L[relation.parentKey].number() == 0) { + L[reserveKeys.subTree] = []; + L.__subTreeLength = 0; + L[reserveKeys.parentHashKey] = "0".setDigit(cfg.hashDigit); + L[reserveKeys.hashKey] = "0".setDigit(cfg.hashDigit) + "_" + seq.setDigit(cfg.hashDigit); + L[reserveKeys.displayKey] = true; + tree.push(AXUtil.copyObject(L)); + seq++; + } else { + L.__subTreeLength = 0; + L[reserveKeys.displayKey] = false; + } + } + } + } + + for (var idx = 0; idx < List.length; idx++) { + var L = List[idx]; + if (L[reserveKeys.parentHashKey] == undefined && !L.isRoot) { + + if(L.AXTreeSplit) continue; + var pItem = List[pointer[L[relation.parentKey]]]; + var pHash = pItem[reserveKeys.hashKey]; + var pHashs = pHash.split(/_/g); + var pTree = tree; + axf.each(pHashs, function (idx, T) { + if (idx > 0) pTree = pTree[T.number()].subTree; + }); + L[reserveKeys.subTree] = []; + + var __subTreeLength = pItem.__subTreeLength; + var pOpend = pItem[reserveKeys.openKey]; + L[reserveKeys.parentHashKey] = pHash; + L[reserveKeys.hashKey] = pHash + cfg.hashSpliter + __subTreeLength.setDigit(cfg.hashDigit); + L[reserveKeys.displayKey] = pOpend; + + pTree.push(AXUtil.copyObject(L)); + pItem.__subTreeLength++; + } + } + + if(cfg.showConnectionLine){ + this.tree = tree; + List = this.convertHashListToTree(this.tree); + //List = this.list; + }else{ + this.tree = tree; + } + + //trace(List); + //trace(tree); + + return List; + }, + getSelectedList: function () { + if (this.selectedRow != undefined && this.selectedRow != null && this.selectedRow.length > 0) { + return { index: this.selectedRow.first(), item: this.list[this.selectedRow.first()] }; + } else { + return { error: "noselected", description: "선택된 item이 없습니다." }; + } + }, + getSelectedListParent: function () { + var cfg = this.config; + var reserveKeys = cfg.reserveKeys; + var relation = cfg.relation; + + if (this.selectedRow != undefined && this.selectedRow != null && this.selectedRow.length > 0) { + + var item = this.list[this.selectedRow.first()]; + var pno = item[relation.parentKey]; + + var parentIndex = null; + if (pno != "0") { + axf.each(this.list, function (findIndex, findItem) { + if (findItem[relation.childKey] == pno) { + parentIndex = findIndex; + return false; + } + }); + } + + if (parentIndex == null) { + return { index: null, item: null }; + } else { + return { index: parentIndex, item: this.list[parentIndex] }; + } + } else { + return { index: null, item: null }; + } + }, + relationFixedSync: function(){ + var cfg = this.config; + var _body = this.body; + axf.each(this.list, function(lidx, L){ + axdom("#" + cfg.targetID + "_AX_treeBody").find(".gridBodyTr_"+lidx+" .treeCheckBox_body").each(function(){ + this.checked = L.__checked; + }); + }); + }, + expandAll: function(){ + var cfg = this.config; + var _body = this.body; + axf.each(this.list, function (itemIndex, item) { + item[cfg.reserveKeys.openKey] = true; + item[cfg.reserveKeys.displayKey] = true; + item[cfg.reserveKeys.parentHashKey] = undefined; + item[cfg.reserveKeys.hashKey] = undefined; + }); + this.list = this.positioningHashList(this.list); + this.printList(); + }, + collapseAll: function(){ + var cfg = this.config; + var _body = this.body; + axf.each(this.list, function (itemIndex, item) { + item[cfg.reserveKeys.openKey] = false; + if(item[cfg.relation.parentKey] == 0){ + item[cfg.reserveKeys.displayKey] = true; + }else{ + item[cfg.reserveKeys.displayKey] = false; + } + item[cfg.reserveKeys.parentHashKey] = undefined; + item[cfg.reserveKeys.hashKey] = undefined; + }); + this.list = this.positioningHashList(this.list); + this.printList(); + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +/** + * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com + * + * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/ + * + * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz? and Mammon Media and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * SWFObject v2.2 + * is released under the MIT License + */ + +/* ******************* */ +/* Constructor & Init */ +/* ******************* */ +var SWFUpload; +var swfobject; + +if (SWFUpload == undefined) { + SWFUpload = function (settings) { + this.initSWFUpload(settings); + }; +} + +SWFUpload.prototype.initSWFUpload = function (userSettings) { + try { + this.customSettings = {}; // A container where developers can place their own settings associated with this instance. + this.settings = {}; + this.eventQueue = []; + this.movieName = "SWFUpload_" + SWFUpload.movieCount++; + this.movieElement = null; + + + // Setup global control tracking + SWFUpload.instances[this.movieName] = this; + + // Load the settings. Load the Flash movie. + this.initSettings(userSettings); + this.loadSupport(); + if (this.swfuploadPreload()) { + this.loadFlash(); + } + + this.displayDebugInfo(); + } catch (ex) { + delete SWFUpload.instances[this.movieName]; + throw ex; + } +}; + +/* *************** */ +/* Static Members */ +/* *************** */ +SWFUpload.instances = {}; +SWFUpload.movieCount = 0; +SWFUpload.version = "2.5.0 2010-01-15 Beta 2"; +SWFUpload.QUEUE_ERROR = { + QUEUE_LIMIT_EXCEEDED : -100, + FILE_EXCEEDS_SIZE_LIMIT : -110, + ZERO_BYTE_FILE : -120, + INVALID_FILETYPE : -130 +}; +SWFUpload.UPLOAD_ERROR = { + HTTP_ERROR : -200, + MISSING_UPLOAD_URL : -210, + IO_ERROR : -220, + SECURITY_ERROR : -230, + UPLOAD_LIMIT_EXCEEDED : -240, + UPLOAD_FAILED : -250, + SPECIFIED_FILE_ID_NOT_FOUND : -260, + FILE_VALIDATION_FAILED : -270, + FILE_CANCELLED : -280, + UPLOAD_STOPPED : -290, + RESIZE : -300 +}; +SWFUpload.FILE_STATUS = { + QUEUED : -1, + IN_PROGRESS : -2, + ERROR : -3, + COMPLETE : -4, + CANCELLED : -5 +}; +SWFUpload.UPLOAD_TYPE = { + NORMAL : -1, + RESIZED : -2 +}; + +SWFUpload.BUTTON_ACTION = { + SELECT_FILE : -100, + SELECT_FILES : -110, + START_UPLOAD : -120, + JAVASCRIPT : -130, // DEPRECATED + NONE : -130 +}; +SWFUpload.CURSOR = { + ARROW : -1, + HAND : -2 +}; +SWFUpload.WINDOW_MODE = { + WINDOW : "transparent", + TRANSPARENT : "transparent", + OPAQUE : "opaque" +}; + +SWFUpload.RESIZE_ENCODING = { + JPEG : -1, + PNG : -2 +}; + +// Private: takes a URL, determines if it is relative and converts to an absolute URL +// using the current site. Only processes the URL if it can, otherwise returns the URL untouched +SWFUpload.completeURL = function (url) { + try { + var path = "", indexSlash = -1; + if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//) || url === "") { + return url; + } + + indexSlash = window.location.pathname.lastIndexOf("/"); + if (indexSlash <= 0) { + path = "/"; + } else { + path = window.location.pathname.substr(0, indexSlash) + "/"; + } + + return path + url; + } catch (ex) { + return url; + } +}; + +// Public: assign a new function to onload to use swfobject's domLoad functionality +SWFUpload.onload = function () {}; + + +/* ******************** */ +/* Instance Members */ +/* ******************** */ + +// Private: initSettings ensures that all the +// settings are set, getting a default value if one was not assigned. +SWFUpload.prototype.initSettings = function (userSettings) { + + this.ensureDefault = function (settingName, defaultValue) { + var setting = userSettings[settingName]; + if (setting != undefined) { + this.settings[settingName] = setting; + } else { + this.settings[settingName] = defaultValue; + } + }; + + // Upload backend settings + this.ensureDefault("upload_url", ""); + this.ensureDefault("preserve_relative_urls", false); + this.ensureDefault("file_post_name", userSettings.uploadFileName); + this.ensureDefault("post_params", {}); + this.ensureDefault("use_query_string", false); + this.ensureDefault("requeue_on_error", false); + this.ensureDefault("http_success", []); + this.ensureDefault("assume_success_timeout", 0); + + // File Settings + this.ensureDefault("file_types", userSettings.file_types); + this.ensureDefault("file_types_description", "All Files"); + this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited" + this.ensureDefault("file_upload_limit", 0); + this.ensureDefault("file_queue_limit", 0); + + // Flash Settings + this.ensureDefault("flash_url", "swfupload.swf"); + this.ensureDefault("flash9_url", "swfupload_fp9.swf"); + this.ensureDefault("prevent_swf_caching", true); + + // Button Settings + this.ensureDefault("button_image_url", ""); + this.ensureDefault("button_width", 1); + this.ensureDefault("button_height", 1); + this.ensureDefault("button_text", ""); + this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;"); + this.ensureDefault("button_text_top_padding", 0); + this.ensureDefault("button_text_left_padding", 0); + this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES); + this.ensureDefault("button_disabled", false); + this.ensureDefault("button_placeholder_id", ""); + this.ensureDefault("button_placeholder", null); + this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW); + this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW); + + // Debug Settings + this.ensureDefault("debug", false); + this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API + + // Option Setting + this.ensureDefault("fileSelectAutoUpload", userSettings.fileSelectAutoUpload); + + // Event Handlers + this.settings.return_upload_start_handler = this.returnUploadStart; + this.ensureDefault("swfupload_preload_handler", null); + this.ensureDefault("swfupload_load_failed_handler", null); + this.ensureDefault("swfupload_loaded_handler", null); + this.ensureDefault("file_dialog_start_handler", null); + this.ensureDefault("file_queued_handler", null); + this.ensureDefault("file_queue_error_handler", null); + this.ensureDefault("file_dialog_complete_handler", null); + + this.ensureDefault("upload_resize_start_handler", null); + this.ensureDefault("upload_start_handler", null); + this.ensureDefault("upload_progress_handler", null); + this.ensureDefault("upload_error_handler", null); + this.ensureDefault("upload_success_handler", null); + this.ensureDefault("upload_complete_handler", null); + + this.ensureDefault("mouse_click_handler", null); + this.ensureDefault("mouse_out_handler", null); + this.ensureDefault("mouse_over_handler", null); + + this.ensureDefault("debug_handler", this.debugMessage); + + this.ensureDefault("custom_settings", {}); + + // Other settings + this.customSettings = this.settings.custom_settings; + + // Update the flash url if needed + if (!!this.settings.prevent_swf_caching) { + this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime(); + this.settings.flash9_url = this.settings.flash9_url + (this.settings.flash9_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime(); + } + + if (!this.settings.preserve_relative_urls) { + this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url); + this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url); + } + + delete this.ensureDefault; +}; + +// Initializes the supported functionality based the Flash Player version, state, and event that occur during initialization +SWFUpload.prototype.loadSupport = function () { + this.support = { + loading : swfobject.hasFlashPlayerVersion("9.0.28"), + imageResize : swfobject.hasFlashPlayerVersion("10.0.0") + }; + +}; + +// Private: loadFlash replaces the button_placeholder element with the flash movie. +SWFUpload.prototype.loadFlash = function () { + var targetElement, tempParent, wrapperType, flashHTML, els; + + if (!this.support.loading) { + this.queueEvent("swfupload_load_failed_handler", ["Flash Player doesn't support SWFUpload"]); + return; + } + + // Make sure an element with the ID we are going to use doesn't already exist + if (document.getElementById(this.movieName) !== null) { + this.support.loading = false; + this.queueEvent("swfupload_load_failed_handler", ["Element ID already in use"]); + return; + } + + // Get the element where we will be placing the flash movie + targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder; + + if (targetElement == undefined) { + this.support.loading = false; + this.queueEvent("swfupload_load_failed_handler", ["button place holder not found"]); + return; + } + + wrapperType = (targetElement.currentStyle && targetElement.currentStyle["display"] || window.getComputedStyle && document.defaultView.getComputedStyle(targetElement, null).getPropertyValue("display")) !== "block" ? "span" : "div"; + + // Append the container and load the flash + tempParent = document.createElement(wrapperType); + + flashHTML = this.getFlashHTML(); + + try { + tempParent.innerHTML = flashHTML; // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers) + } catch (ex) { + this.support.loading = false; + this.queueEvent("swfupload_load_failed_handler", ["Exception loading Flash HTML into placeholder"]); + return; + } + + // Try to get the movie element immediately + els = tempParent.getElementsByTagName("object"); + if (!els || els.length > 1 || els.length === 0) { + this.support.loading = false; + this.queueEvent("swfupload_load_failed_handler", ["Unable to find movie after adding to DOM"]); + return; + } else if (els.length === 1) { + this.movieElement = els[0]; + } + + targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement); + + // Fix IE Flash/Form bug + if (window[this.movieName] == undefined) { + window[this.movieName] = this.getMovieElement(); + } +}; + +// Private: getFlashHTML generates the object tag needed to embed the flash in to the document +SWFUpload.prototype.getFlashHTML = function (flashVersion) { + // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay + return ['', + '', + '', + '', + '', + '', + ''].join(""); +}; + +// Private: getFlashVars builds the parameter string that will be passed +// to flash in the flashvars param. +SWFUpload.prototype.getFlashVars = function () { + // Build a string from the post param object + var httpSuccessString, paramString; + + paramString = this.buildParamString(); + httpSuccessString = this.settings.http_success.join(","); + + // Build the parameter string + return ["movieName=", encodeURIComponent(this.movieName), + "&uploadURL=", encodeURIComponent(this.settings.upload_url), + "&useQueryString=", encodeURIComponent(this.settings.use_query_string), + "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error), + "&httpSuccess=", encodeURIComponent(httpSuccessString), + "&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout), + "&params=", encodeURIComponent(paramString), + "&filePostName=", encodeURIComponent(this.settings.file_post_name), + "&fileTypes=", encodeURIComponent(this.settings.file_types), + "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description), + "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit), + "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit), + "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit), + "&debugEnabled=", encodeURIComponent(this.settings.debug_enabled), + "&buttonImageURL=", encodeURIComponent(this.settings.button_image_url), + "&buttonWidth=", encodeURIComponent(this.settings.button_width), + "&buttonHeight=", encodeURIComponent(this.settings.button_height), + "&buttonText=", encodeURIComponent(this.settings.button_text), + "&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding), + "&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding), + "&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style), + "&buttonAction=", encodeURIComponent(this.settings.button_action), + "&buttonDisabled=", encodeURIComponent(this.settings.button_disabled), + "&buttonCursor=", encodeURIComponent(this.settings.button_cursor) + ].join(""); +}; + +// Public: get retrieves the DOM reference to the Flash element added by SWFUpload +// The element is cached after the first lookup +SWFUpload.prototype.getMovieElement = function () { + if (this.movieElement == undefined) { + this.movieElement = document.getElementById(this.movieName); + } + + if (this.movieElement === null) { + throw "Could not find Flash element"; + } + + return this.movieElement; +}; + +// Private: buildParamString takes the name/value pairs in the post_params setting object +// and joins them up in to a string formatted "name=value&name=value" +SWFUpload.prototype.buildParamString = function () { + var name, postParams, paramStringPairs = []; + + postParams = this.settings.post_params; + + if (typeof(postParams) === "object") { + for (name in postParams) { + if (postParams.hasOwnProperty(name)) { + paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString())); + } + } + } + + return paramStringPairs.join("&"); +}; + +// Public: Used to remove a SWFUpload instance from the page. This method strives to remove +// all references to the SWF, and other objects so memory is properly freed. +// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state. +// Credits: Major improvements provided by steffen +SWFUpload.prototype.destroy = function () { + var movieElement; + + try { + // Make sure Flash is done before we try to remove it + this.cancelUpload(null, false); + + movieElement = this.cleanUp(); + + // Remove the SWFUpload DOM nodes + if (movieElement) { + // Remove the Movie Element from the page + try { + movieElement.parentNode.removeChild(movieElement); + } catch (ex) {} + } + + // Remove IE form fix reference + window[this.movieName] = null; + + // Destroy other references + SWFUpload.instances[this.movieName] = null; + delete SWFUpload.instances[this.movieName]; + + this.movieElement = null; + this.settings = null; + this.customSettings = null; + this.eventQueue = null; + this.movieName = null; + + + return true; + } catch (ex2) { + return false; + } +}; + + +// Public: displayDebugInfo prints out settings and configuration +// information about this SWFUpload instance. +// This function (and any references to it) can be deleted when placing +// SWFUpload in production. +SWFUpload.prototype.displayDebugInfo = function () { + this.debug( + [ + "---SWFUpload Instance Info---\n", + "Version: ", SWFUpload.version, "\n", + "Movie Name: ", this.movieName, "\n", + "Settings:\n", + "\t", "upload_url: ", this.settings.upload_url, "\n", + "\t", "flash_url: ", this.settings.flash_url, "\n", + "\t", "flash9_url: ", this.settings.flash9_url, "\n", + "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n", + "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n", + "\t", "http_success: ", this.settings.http_success.join(", "), "\n", + "\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n", + "\t", "file_post_name: ", this.settings.file_post_name, "\n", + "\t", "post_params: ", this.settings.post_params.toString(), "\n", + "\t", "file_types: ", this.settings.file_types, "\n", + "\t", "file_types_description: ", this.settings.file_types_description, "\n", + "\t", "file_size_limit: ", this.settings.file_size_limit, "\n", + "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n", + "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n", + "\t", "debug: ", this.settings.debug.toString(), "\n", + + "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n", + + "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n", + "\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n", + "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n", + "\t", "button_width: ", this.settings.button_width.toString(), "\n", + "\t", "button_height: ", this.settings.button_height.toString(), "\n", + "\t", "button_text: ", this.settings.button_text.toString(), "\n", + "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n", + "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n", + "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n", + "\t", "button_action: ", this.settings.button_action.toString(), "\n", + "\t", "button_cursor: ", this.settings.button_cursor.toString(), "\n", + "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n", + + "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n", + "Event Handlers:\n", + "\t", "swfupload_preload_handler assigned: ", (typeof this.settings.swfupload_preload_handler === "function").toString(), "\n", + "\t", "swfupload_load_failed_handler assigned: ", (typeof this.settings.swfupload_load_failed_handler === "function").toString(), "\n", + "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n", + "\t", "mouse_click_handler assigned: ", (typeof this.settings.mouse_click_handler === "function").toString(), "\n", + "\t", "mouse_over_handler assigned: ", (typeof this.settings.mouse_over_handler === "function").toString(), "\n", + "\t", "mouse_out_handler assigned: ", (typeof this.settings.mouse_out_handler === "function").toString(), "\n", + "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n", + "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n", + "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n", + "\t", "upload_resize_start_handler assigned: ", (typeof this.settings.upload_resize_start_handler === "function").toString(), "\n", + "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n", + "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n", + "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n", + "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n", + "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n", + "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n", + + "Support:\n", + "\t", "Load: ", (this.support.loading ? "Yes" : "No"), "\n", + "\t", "Image Resize: ", (this.support.imageResize ? "Yes" : "No"), "\n" + + ].join("") + ); +}; + +/* Note: addSetting and getSetting are no longer used by SWFUpload but are included + the maintain v2 API compatibility +*/ +// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used. +SWFUpload.prototype.addSetting = function (name, value, default_value) { + if (value == undefined) { + return (this.settings[name] = default_value); + } else { + return (this.settings[name] = value); + } +}; + +// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found. +SWFUpload.prototype.getSetting = function (name) { + if (this.settings[name] != undefined) { + return this.settings[name]; + } + + return ""; +}; + + + +// Private: callFlash handles function calls made to the Flash element. +// Calls are made with a setTimeout for some functions to work around +// bugs in the ExternalInterface library. +SWFUpload.prototype.callFlash = function (functionName, argumentArray) { + var movieElement, returnValue, returnString; + + argumentArray = argumentArray || []; + movieElement = this.getMovieElement(); + + // Flash's method if calling ExternalInterface methods (code adapted from MooTools). + try { + if (movieElement != undefined) { + returnString = movieElement.CallFunction('' + __flash__argumentsToXML(argumentArray, 0) + ''); + returnValue = eval(returnString); + } else { + this.debug("Can't call flash because the movie wasn't found."); + } + } catch (ex) { + this.debug("Exception calling flash function '" + functionName + "': " + ex.message); + } + + // Unescape file post param values + if (returnValue != undefined && typeof returnValue.post === "object") { + returnValue = this.unescapeFilePostParams(returnValue); + } + + return returnValue; +}; + +/* ***************************** + -- Flash control methods -- + Your UI should use these + to operate SWFUpload + ***************************** */ + +// WARNING: this function does not work in Flash Player 10 +// Public: selectFile causes a File Selection Dialog window to appear. This +// dialog only allows 1 file to be selected. +SWFUpload.prototype.selectFile = function () { + this.callFlash("SelectFile"); +}; + +// WARNING: this function does not work in Flash Player 10 +// Public: selectFiles causes a File Selection Dialog window to appear/ This +// dialog allows the user to select any number of files +// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names. +// If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around +// for this bug. +SWFUpload.prototype.selectFiles = function () { + this.callFlash("SelectFiles"); +}; + + +// Public: startUpload starts uploading the first file in the queue unless +// the optional parameter 'fileID' specifies the ID +SWFUpload.prototype.startUpload = function (fileID) { + //trace(this.settings.fileSelectAutoUpload); + //trace(this.allowUpload); + if(this.settings.fileSelectAutoUpload || this.settings.allowUpload == true) { + this.callFlash("StartUpload", [fileID]); + } +}; + +// Public: startUpload starts uploading the first file in the queue unless +// the optional parameter 'fileID' specifies the ID +SWFUpload.prototype.startResizedUpload = function (fileID, width, height, encoding, quality, allowEnlarging) { + this.callFlash("StartUpload", [fileID, { "width": width, "height" : height, "encoding" : encoding, "quality" : quality, "allowEnlarging" : allowEnlarging }]); +}; + +// Public: cancelUpload cancels any queued file. The fileID parameter may be the file ID or index. +// If you do not specify a fileID the current uploading file or first file in the queue is cancelled. +// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter. +SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) { + if (triggerErrorEvent !== false) { + triggerErrorEvent = true; + } + this.callFlash("CancelUpload", [fileID, triggerErrorEvent]); +}; + +// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue. +// If nothing is currently uploading then nothing happens. +SWFUpload.prototype.stopUpload = function () { + this.callFlash("StopUpload"); +}; + + +// Public: requeueUpload requeues any file. If the file is requeued or already queued true is returned. +// If the file is not found or is currently uploading false is returned. Requeuing a file bypasses the +// file size, queue size, upload limit and other queue checks. Certain files can't be requeued (e.g, invalid or zero bytes files). +SWFUpload.prototype.requeueUpload = function (indexOrFileID) { + return this.callFlash("RequeueUpload", [indexOrFileID]); +}; + + +/* ************************ + * Settings methods + * These methods change the SWFUpload settings. + * SWFUpload settings should not be changed directly on the settings object + * since many of the settings need to be passed to Flash in order to take + * effect. + * *********************** */ + +// Public: getStats gets the file statistics object. +SWFUpload.prototype.getStats = function () { + return this.callFlash("GetStats"); +}; + +// Public: setStats changes the SWFUpload statistics. You shouldn't need to +// change the statistics but you can. Changing the statistics does not +// affect SWFUpload accept for the successful_uploads count which is used +// by the upload_limit setting to determine how many files the user may upload. +SWFUpload.prototype.setStats = function (statsObject) { + this.callFlash("SetStats", [statsObject]); +}; + +// Public: getFile retrieves a File object by ID or Index. If the file is +// not found then 'null' is returned. +SWFUpload.prototype.getFile = function (fileID) { + if (typeof(fileID) === "number") { + return this.callFlash("GetFileByIndex", [fileID]); + } else { + return this.callFlash("GetFile", [fileID]); + } +}; + +// Public: getFileFromQueue retrieves a File object by ID or Index. If the file is +// not found then 'null' is returned. +SWFUpload.prototype.getQueueFile = function (fileID) { + if (typeof(fileID) === "number") { + return this.callFlash("GetFileByQueueIndex", [fileID]); + } else { + return this.callFlash("GetFile", [fileID]); + } +}; + + +// Public: addFileParam sets a name/value pair that will be posted with the +// file specified by the Files ID. If the name already exists then the +// exiting value will be overwritten. +SWFUpload.prototype.addFileParam = function (fileID, name, value) { + return this.callFlash("AddFileParam", [fileID, name, value]); +}; + +// Public: removeFileParam removes a previously set (by addFileParam) name/value +// pair from the specified file. +SWFUpload.prototype.removeFileParam = function (fileID, name) { + this.callFlash("RemoveFileParam", [fileID, name]); +}; + +// Public: setUploadUrl changes the upload_url setting. +SWFUpload.prototype.setUploadURL = function (url) { + this.settings.upload_url = url.toString(); + this.callFlash("SetUploadURL", [url]); +}; + +// Public: setPostParams changes the post_params setting +SWFUpload.prototype.setPostParams = function (paramsObject) { + this.settings.post_params = paramsObject; + this.callFlash("SetPostParams", [paramsObject]); +}; + +// Public: addPostParam adds post name/value pair. Each name can have only one value. +SWFUpload.prototype.addPostParam = function (name, value) { + this.settings.post_params[name] = value; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: removePostParam deletes post name/value pair. +SWFUpload.prototype.removePostParam = function (name) { + delete this.settings.post_params[name]; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: setFileTypes changes the file_types setting and the file_types_description setting +SWFUpload.prototype.setFileTypes = function (types, description) { + this.settings.file_types = types; + this.settings.file_types_description = description; + this.callFlash("SetFileTypes", [types, description]); +}; + +// Public: setFileSizeLimit changes the file_size_limit setting +SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) { + this.settings.file_size_limit = fileSizeLimit; + this.callFlash("SetFileSizeLimit", [fileSizeLimit]); +}; + +// Public: setFileUploadLimit changes the file_upload_limit setting +SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) { + this.settings.file_upload_limit = fileUploadLimit; + this.callFlash("SetFileUploadLimit", [fileUploadLimit]); +}; + +// Public: setFileQueueLimit changes the file_queue_limit setting +SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) { + this.settings.file_queue_limit = fileQueueLimit; + this.callFlash("SetFileQueueLimit", [fileQueueLimit]); +}; + +// Public: setFilePostName changes the file_post_name setting +SWFUpload.prototype.setFilePostName = function (filePostName) { + this.settings.file_post_name = filePostName; + this.callFlash("SetFilePostName", [filePostName]); +}; + +// Public: setUseQueryString changes the use_query_string setting +SWFUpload.prototype.setUseQueryString = function (useQueryString) { + this.settings.use_query_string = useQueryString; + this.callFlash("SetUseQueryString", [useQueryString]); +}; + +// Public: setRequeueOnError changes the requeue_on_error setting +SWFUpload.prototype.setRequeueOnError = function (requeueOnError) { + this.settings.requeue_on_error = requeueOnError; + this.callFlash("SetRequeueOnError", [requeueOnError]); +}; + +// Public: setHTTPSuccess changes the http_success setting +SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) { + if (typeof http_status_codes === "string") { + http_status_codes = http_status_codes.replace(" ", "").split(","); + } + + this.settings.http_success = http_status_codes; + this.callFlash("SetHTTPSuccess", [http_status_codes]); +}; + +// Public: setHTTPSuccess changes the http_success setting +SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) { + this.settings.assume_success_timeout = timeout_seconds; + this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]); +}; + +// Public: setDebugEnabled changes the debug_enabled setting +SWFUpload.prototype.setDebugEnabled = function (debugEnabled) { + this.settings.debug_enabled = debugEnabled; + this.callFlash("SetDebugEnabled", [debugEnabled]); +}; + +// Public: setButtonImageURL loads a button image sprite +SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) { + if (buttonImageURL == undefined) { + buttonImageURL = ""; + } + + this.settings.button_image_url = buttonImageURL; + this.callFlash("SetButtonImageURL", [buttonImageURL]); +}; + +// Public: setButtonDimensions resizes the Flash Movie and button +SWFUpload.prototype.setButtonDimensions = function (width, height) { + this.settings.button_width = width; + this.settings.button_height = height; + + var movie = this.getMovieElement(); + if (movie != undefined) { + movie.style.width = width + "px"; + movie.style.height = height + "px"; + } + + this.callFlash("SetButtonDimensions", [width, height]); +}; +// Public: setButtonText Changes the text overlaid on the button +SWFUpload.prototype.setButtonText = function (html) { + this.settings.button_text = html; + this.callFlash("SetButtonText", [html]); +}; +// Public: setButtonTextPadding changes the top and left padding of the text overlay +SWFUpload.prototype.setButtonTextPadding = function (left, top) { + this.settings.button_text_top_padding = top; + this.settings.button_text_left_padding = left; + this.callFlash("SetButtonTextPadding", [left, top]); +}; + +// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button +SWFUpload.prototype.setButtonTextStyle = function (css) { + this.settings.button_text_style = css; + this.callFlash("SetButtonTextStyle", [css]); +}; +// Public: setButtonDisabled disables/enables the button +SWFUpload.prototype.setButtonDisabled = function (isDisabled) { + this.settings.button_disabled = isDisabled; + this.callFlash("SetButtonDisabled", [isDisabled]); +}; +// Public: setButtonAction sets the action that occurs when the button is clicked +SWFUpload.prototype.setButtonAction = function (buttonAction) { + this.settings.button_action = buttonAction; + this.callFlash("SetButtonAction", [buttonAction]); +}; + +// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button +SWFUpload.prototype.setButtonCursor = function (cursor) { + this.settings.button_cursor = cursor; + this.callFlash("SetButtonCursor", [cursor]); +}; + +/* ******************************* + Flash Event Interfaces + These functions are used by Flash to trigger the various + events. + + All these functions a Private. + + Because the ExternalInterface library is buggy the event calls + are added to a queue and the queue then executed by a setTimeout. + This ensures that events are executed in a determinate order and that + the ExternalInterface bugs are avoided. +******************************* */ + +SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + var self = this; + + if (argumentArray == undefined) { + argumentArray = []; + } else if (!(argumentArray instanceof Array)) { + argumentArray = [argumentArray]; + } + + if (typeof this.settings[handlerName] === "function") { + // Queue the event + this.eventQueue.push(function () { + this.settings[handlerName].apply(this, argumentArray); + }); + + // Execute the next queued event + setTimeout(function () { + self.executeNextEvent(); + }, 0); + + } else if (this.settings[handlerName] !== null) { + throw "Event handler " + handlerName + " is unknown or is not a function"; + } +}; + +// Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout +// we must queue them in order to garentee that they are executed in order. +SWFUpload.prototype.executeNextEvent = function () { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + + var f = this.eventQueue ? this.eventQueue.shift() : null; + if (typeof(f) === "function") { + f.apply(this); + } + +}; + +// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have +// properties that contain characters that are not valid for JavaScript identifiers. To work around this +// the Flash Component escapes the parameter names and we must unescape again before passing them along. +SWFUpload.prototype.unescapeFilePostParams = function (file) { + var reg = /[$]([0-9a-f]{4})/i, unescapedPost = {}, uk, k, match; + + if (file != undefined) { + for (k in file.post) { + if (file.post.hasOwnProperty(k)) { + uk = k; + while ((match = reg.exec(uk)) !== null) { + uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16))); + } + unescapedPost[uk] = file.post[k]; + } + } + + file.post = unescapedPost; + } + + return file; +}; + +// Private: This event is called by SWFUpload Init after we've determined what the user's Flash Player supports. +// Use the swfupload_preload_handler event setting to execute custom code when SWFUpload has loaded. +// Return false to prevent SWFUpload from loading and allow your script to do something else if your required feature is +// not supported +SWFUpload.prototype.swfuploadPreload = function () { + var returnValue; + if (typeof this.settings.swfupload_preload_handler === "function") { + returnValue = this.settings.swfupload_preload_handler.call(this); + } else if (this.settings.swfupload_preload_handler != undefined) { + throw "upload_start_handler must be a function"; + } + + // Convert undefined to true so if nothing is returned from the upload_start_handler it is + // interpretted as 'true'. + if (returnValue === undefined) { + returnValue = true; + } + + return !!returnValue; +} + +// Private: This event is called by Flash when it has finished loading. Don't modify this. +// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded. +SWFUpload.prototype.flashReady = function () { + // Check that the movie element is loaded correctly with its ExternalInterface methods defined + var movieElement = this.cleanUp(); + + if (!movieElement) { + this.debug("Flash called back ready but the flash movie can't be found."); + return; + } + + this.queueEvent("swfupload_loaded_handler"); +}; + +// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE. +// This function is called by Flash each time the ExternalInterface functions are created. +SWFUpload.prototype.cleanUp = function () { + var key, movieElement = this.getMovieElement(); + + // Pro-actively unhook all the Flash functions + try { + if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE + this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)"); + for (key in movieElement) { + try { + if (typeof(movieElement[key]) === "function") { + movieElement[key] = null; + } + } catch (ex) { + } + } + } + } catch (ex1) { + + } + + // Fix Flashes own cleanup code so if the SWF Movie was removed from the page + // it doesn't display errors. + window["__flash__removeCallback"] = function (instance, name) { + try { + if (instance) { + instance[name] = null; + } + } catch (flashEx) { + + } + }; + + return movieElement; +}; + +/* When the button_action is set to None this event gets fired and executes the mouse_click_handler */ +SWFUpload.prototype.mouseClick = function () { + this.queueEvent("mouse_click_handler"); +}; +SWFUpload.prototype.mouseOver = function () { + this.queueEvent("mouse_over_handler"); +}; +SWFUpload.prototype.mouseOut = function () { + this.queueEvent("mouse_out_handler"); +}; + +/* This is a chance to do something before the browse window opens */ +SWFUpload.prototype.fileDialogStart = function () { + this.queueEvent("file_dialog_start_handler"); +}; + + +/* Called when a file is successfully added to the queue. */ +SWFUpload.prototype.fileQueued = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queued_handler", file); +}; + + +/* Handle errors that occur when an attempt to queue a file fails. */ +SWFUpload.prototype.fileQueueError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queue_error_handler", [file, errorCode, message]); +}; + +/* Called after the file dialog has closed and the selected files have been queued. + You could call startUpload here if you want the queued files to begin uploading immediately. */ +SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) { + this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]); +}; + +SWFUpload.prototype.uploadResizeStart = function (file, resizeSettings) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_resize_start_handler", [file, resizeSettings.width, resizeSettings.height, resizeSettings.encoding, resizeSettings.quality]); +}; + +SWFUpload.prototype.uploadStart = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("return_upload_start_handler", file); +}; + +SWFUpload.prototype.returnUploadStart = function (file) { + var returnValue; + if (typeof this.settings.upload_start_handler === "function") { + file = this.unescapeFilePostParams(file); + returnValue = this.settings.upload_start_handler.call(this, file); + } else if (this.settings.upload_start_handler != undefined) { + throw "upload_start_handler must be a function"; + } + + // Convert undefined to true so if nothing is returned from the upload_start_handler it is + // interpretted as 'true'. + if (returnValue === undefined) { + returnValue = true; + } + + returnValue = !!returnValue; + + this.callFlash("ReturnUploadStart", [returnValue]); +}; + + + +SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]); +}; + +SWFUpload.prototype.uploadError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_error_handler", [file, errorCode, message]); +}; + +SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_success_handler", [file, serverData, responseReceived]); +}; + +SWFUpload.prototype.uploadComplete = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_complete_handler", file); +}; + +/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the + internal debug console. You can override this event and have messages written where you want. */ +SWFUpload.prototype.debug = function (message) { + this.queueEvent("debug_handler", message); +}; + + +/* ********************************** + Debug Console + The debug console is a self contained, in page location + for debug message to be sent. The Debug Console adds + itself to the body if necessary. + + The console is automatically scrolled as messages appear. + + If you are using your own debug handler or when you deploy to production and + have debug disabled you can remove these functions to reduce the file size + and complexity. +********************************** */ + +// Private: debugMessage is the default debug_handler. If you want to print debug messages +// call the debug() function. When overriding the function your own function should +// check to see if the debug setting is true before outputting debug information. +SWFUpload.prototype.debugMessage = function (message) { + var exceptionMessage, exceptionValues, key; + + if (this.settings.debug) { + exceptionValues = []; + + // Check for an exception object and print it nicely + if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") { + for (key in message) { + if (message.hasOwnProperty(key)) { + exceptionValues.push(key + ": " + message[key]); + } + } + exceptionMessage = exceptionValues.join("\n") || ""; + exceptionValues = exceptionMessage.split("\n"); + exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: "); + SWFUpload.Console.writeLine(exceptionMessage); + } else { + SWFUpload.Console.writeLine(message); + } + } +}; + +SWFUpload.Console = {}; +SWFUpload.Console.writeLine = function (message) { + var console, documentForm; + + try { + console = document.getElementById("SWFUpload_Console"); + + if (!console) { + documentForm = document.createElement("form"); + document.getElementsByTagName("body")[0].appendChild(documentForm); + + console = document.createElement("textarea"); + console.id = "SWFUpload_Console"; + console.style.fontFamily = "monospace"; + console.setAttribute("wrap", "off"); + console.wrap = "off"; + console.style.overflow = "auto"; + console.style.width = "700px"; + console.style.height = "350px"; + console.style.margin = "5px"; + documentForm.appendChild(console); + } + + console.value += message + "\n"; + + console.scrollTop = console.scrollHeight - console.clientHeight; + } catch (ex) { + alert("Exception: " + ex.name + " Message: " + ex.message); + } +}; + + +/* SWFObject v2.2 + is released under the MIT License +*/ +swfobject = function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab attr 인식 처리 구문 추가", + "2014-04-10 - tom : 설정에 선언된 파일타입 체크하여 파일 셀렉트와 드랍 방지 처리 구문 추가", + "2014-04-10 - tom : fileSelectAutoUpload 옵션 flash 모드에서 작동 하도록 픽스", + "2014-05-15 - tom : 파일선택 갯수 선택오류 버그 픽스 / fileSelectAutoUpload 버그 픽스" + + * @description + * + ```js + var myUpload = new AXUpload5(); + myUpload.setConfig(classConfig:JSObject); + ``` + * + */ + +var AXUpload5 = Class.create(AXJ, { + initialize: function(AXJ_super){ + AXJ_super(); + this.uploadedList = []; + this.uploadingObj = null; + this.queue = []; + this.queueLive = false; + this.isSingleUpload = false; + this.config.uploadFileName = "fileData"; + this.config.file_types = "*.*"; + this.config.fileSelectAutoUpload = true; + this.supportHtml5 = false; + if (window.File && window.FileReader && window.FileList && window.Blob) this.supportHtml5 = true; + if(!AXConfig.AXUpload5){ + AXConfig.AXUpload5 = {buttonTxt:"Upload files"}; + } + this.config.buttonTxt = AXConfig.AXUpload5.buttonTxt; + this.config.fileKeys = { // 서버에서 리턴하는 json key 정의 (id 는 예약어 입니다.) + name:"name", + type:"type", + saveName:"saveName", + fileSize:"fileSize", + uploadedPath:"uploadedPath", + thumbPath:"thumbPath" + } + this.config.flash_url = "/_AXJ/lib/swfupload.swf"; + this.config.flash9_url = "/_AXJ/lib/swfupload_fp9.swf"; + this.config.uploadPars = {}; + this.config.deletePars = {}; + this.config.queueBoxAppendType = "prepend"; + }, + init: function(reset){ + var cfg = this.config; + if(reset == undefined){ + if(!this.supportHtml5){ + if(cfg.onError) cfg.onError("html5Support"); + this.swfinit(reset); + return; + } + }else{ + if(!this.supportHtml5){ + return; + } + } + + var baseUrl = axdom("base").attr("href"); + if(axf.isEmpty(baseUrl)) baseUrl = ""; + if(cfg.uploadUrl.left(1) == "/"){ + cfg.uploadUrl = baseUrl + cfg.uploadUrl; + } + if(cfg.deleteUrl.left(1) == "/"){ + cfg.deleteUrl = baseUrl + cfg.deleteUrl; + } + /* dropBoxID, queueBoxID 자동 생성 */ + if( cfg.dropBoxTarget ){ + if(cfg.dropBoxTarget.id === undefined || cfg.dropBoxTarget.id == ""){ + axdom(cfg.dropBoxTarget).attr("id", cfg.dropBoxTarget.id = cfg.dropBoxID = "AXJUnique_dropBox_"+axf.getUniqueId()); + }else if(axf.isEmpty(cfg.dropBoxID)){ + cfg.dropBoxID = cfg.dropBoxTarget.id; + } + } + if( cfg.queueBoxTarget ){ + if( cfg.queueBoxTarget.id === undefined || cfg.queueBoxTarget.id == "" ){ + axdom(cfg.queueBoxTarget).attr("id", cfg.queueBoxTarget.id = cfg.queueBoxID = "AXJUnique_queueBox_"+axf.getUniqueId()); + alert(cfg.queueBoxID); + }else if(axf.isEmpty(cfg.queueBoxID)){ + cfg.queueBoxID = cfg.queueBoxTarget.id; + } + } + + this.target = jQuery("#"+cfg.targetID); + if(reset == undefined){ + this.target.empty(); + this.uploadedList = []; + } + + var inputFileMultiple = 'multiple="multiple"'; + var inputFileAccept = cfg.file_types; + if(cfg.isSingleUpload){ + inputFileMultiple = ''; + } + if(!this.supportHtml5){ + inputFileMultiple = ''; + } + + var po = []; + po.push('
    '); + po.push(' '); + + if(cfg.isSingleUpload){ + po.push(''); + } + + po.push('
    '); + po.push(' '); + po.push(' '); + po.push(' '); + po.push('
    '+AXConfig.AXUpload5.uploadSelectTxt+'
    '); + po.push('
    '); + po.push('
    '); + this.target.empty(); + this.target.append(po.join('')); + + jQuery('#'+cfg.targetID+'_AX_selectorTD').css({width:jQuery('#'+cfg.targetID+'_AX_selector').outerWidth()+5}); + jQuery('#'+cfg.targetID+'_AX_files').css({width:jQuery('#'+cfg.targetID+'_AX_selector').outerWidth(),height:jQuery('#'+cfg.targetID+'_AX_selector').outerHeight()}); + + var pauseQueue = this.pauseQueue.bind(this); + var _this = this; + jQuery('#'+cfg.targetID+'_AX_selector').click(function(event){ + + if(cfg.onbeforeFileSelect){ + if(!cfg.onbeforeFileSelect.call({ + uploadedList:_this.uploadedList, + uploadMaxFileSize:cfg.uploadMaxFileSize, + uploadMaxFileCount:cfg.uploadMaxFileCount + })){ + return false; + } + } + + if(!cfg.isSingleUpload && cfg.uploadMaxFileCount != 0){ + if(_this.uploadedList.length >= cfg.uploadMaxFileCount){ + cfg.onError("fileCount"); + return false; + } + } + + pauseQueue(); + jQuery('#'+cfg.targetID+'_AX_files').click(); + }); + + var onFileSelect = this.onFileSelect.bind(this); + var fileSelector = document.getElementById(cfg.targetID+'_AX_files'); + if(axf.browser.name == "ie" && axf.browser.version < 9){ + + }else{ + fileSelector.addEventListener('change', onFileSelect, false); + } + + if(reset == undefined){ + if(cfg.dropBoxID && this.supportHtml5){ + + // 드랍존 표현구문 ----------------- s + /* + var dropZoneMsg = []; + dropZoneMsg.push(""); + dropZoneMsg.push(AXConfig.AXUpload5.dropZoneTxt); + dropZoneMsg.push(""); + jQuery("#"+cfg.dropBoxID).append(dropZoneMsg.join('')); + */ + jQuery("#"+cfg.dropBoxID).addClass("allowDrop"); + //jQuery("#"+cfg.dropBoxID).find(".msgText").css({"top":jQuery("#"+cfg.dropBoxID).height()/2-50}); + // 드랍존 표현구문 ----------------- e + + var dropZoneBox = []; + dropZoneBox.push("
    "); + dropZoneBox.push("
    "); + jQuery("#"+cfg.dropBoxID).append(dropZoneBox.join('')); + + // ---------------- 옵션사항 s + /* + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").show(); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").css({height:jQuery("#"+cfg.dropBoxID).innerHeight()-6, width:jQuery("#"+cfg.dropBoxID).innerWidth()-6}); + setTimeout(function(){ + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").fadeOut(); + }, 2000); + */ + // ---------------- 옵션사항 e + + var onFileDragOver = this.onFileDragOver.bind(this); + var onFileDrop = this.onFileDrop.bind(this); + var dragZone = document.getElementById(cfg.dropBoxID); + dragZone.addEventListener('dragover', function(evt){onFileDragOver(evt)}, false); + + var dropZone = document.getElementById(cfg.dropBoxID+"_dropZoneBox"); + dropZone.addEventListener('drop', function(evt){ + + if(cfg.onbeforeFileSelect){ + if(!cfg.onbeforeFileSelect.call({ + uploadedList:_this.uploadedList, + uploadMaxFileSize:cfg.uploadMaxFileSize, + uploadMaxFileCount:cfg.uploadMaxFileCount + })){ + evt.stopPropagation(); + evt.preventDefault(); + jQuery("#"+cfg.dropBoxID).removeClass("onDrop"); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").hide(); + return false; + } + } + + if(!cfg.isSingleUpload && cfg.uploadMaxFileCount != 0){ + if(_this.uploadedList.length >= cfg.uploadMaxFileCount){ + evt.stopPropagation(); + evt.preventDefault(); + jQuery("#"+cfg.dropBoxID).removeClass("onDrop"); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").hide(); + cfg.onError("fileCount"); + return false; + } + } + + onFileDrop(evt) + }, false); + } + + if(cfg.queueBoxID){ + this.multiSelector = new AXMultiSelect(); + this.multiSelector.setConfig({ + selectStage : cfg.queueBoxID, + selectClassName : "readyselect", + beselectClassName : "beSelected" + }); + } + } + }, + swfinit: function(reset){ + var cfg = this.config; + this.target = jQuery("#"+cfg.targetID); + + var po = []; + po.push('
    '); + po.push(' '); + + if(cfg.isSingleUpload){ + po.push(''); + } + + po.push('
    '); + po.push(' '); + po.push(' '); + po.push(' '); + po.push('
    '+AXConfig.AXUpload5.uploadSelectTxt+'
    '); + po.push('
    '); + po.push('
    '); + this.target.empty(); + this.target.append(po.join('')); + + jQuery('#'+cfg.targetID+'_AX_selectorTD').css({width:jQuery('#'+cfg.targetID+'_AX_selector').outerWidth()+5}); + + var btnW = jQuery('#'+cfg.targetID+'_AX_selector').outerWidth(); + var btnH = jQuery('#'+cfg.targetID+'_AX_selector').outerHeight(); + + // functions --------------------------------------------------------------- s + var uploadSuccess = this.uploadSuccess.bind(this); + var onClickDeleteButton = this.onClickDeleteButton.bind(this); + var onClickFileTitle = this.onClickFileTitle.bind(this); + + var file_dialog_complete_handler = function(numFilesSelected, numFilesQueued){ + if (numFilesSelected > 0) { + if (this.swfu.getStats().files_queued > 0) { + //if(this.settings.onStartUpload) this.settings.onStartUpload(); + if(cfg.onStart) cfg.onStart.call(this.queue); + } + } + this.swfu.startUpload(); + }; + var file_dialog_complete_handler_bind = file_dialog_complete_handler.bind(this); + //-- + var file_queued_handler = function(file){ + if(cfg.isSingleUpload){ + var myFile = this.uploadedList.first(); + if(myFile){ + if(!confirm(AXConfig.AXUpload5.deleteConfirm)){ + this.cancelUpload(); + }; + var uploadFn = function(){ + var itemID = 'AX_'+ file.id; + this.queue.push({id:itemID, file:file}); + jQuery("#" + cfg.targetID+'_AX_display').empty(); + jQuery("#" + cfg.targetID+'_AX_display').append(this.getItemTag(itemID, file)); + }; + this.deleteFile(myFile, uploadFn.bind(this)); + return; + }else{ + var itemID = 'AX_'+ file.id; + this.queue.push({id:itemID, file:file}); + jQuery("#" + cfg.targetID+'_AX_display').empty(); + jQuery("#" + cfg.targetID+'_AX_display').append(this.getItemTag(itemID, file)); + } + }else{ + //cfg.uploadMaxFileCount + if(cfg.uploadMaxFileCount != 0){ + if(this.uploadedList.length >= cfg.uploadMaxFileCount){ + cfg.onError("fileCount"); + this.cancelUpload(); + return; + } + } + + //trace(file); + //{"filestatus":-1, "name":"20130708175735_1.jpg", "type":".jpg", "id":"SWFUpload_0_0", "index":0, "modificationdate":"2013-10-04T08:51:27Z", "uploadtype":0, "post":{}, "size":891324, "creationdate":"2013-10-04T08:52:02Z"} + var itemID = 'AX_'+ file.id; + this.queue.push({id:itemID, file:file}); + //큐박스에 아이템 추가 + if(cfg.queueBoxAppendType == "prepend") jQuery("#" + cfg.queueBoxID).prepend(this.getItemTag(itemID, file)); + else jQuery("#" + cfg.queueBoxID).append(this.getItemTag(itemID, file)); + jQuery("#" + cfg.queueBoxID).find("#"+itemID).fadeIn(); + } + }; + var file_queued_handler_bind = file_queued_handler.bind(this); + //-- + var file_queue_error_handler = function(file, errorCode, message){ + try { + if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) { + alert("You have attempted to queue too many files.\n" + (message === 0 ? "You have reached the upload limit." : "You may select " + (message > 1 ? "up to " + message + " files." : "one file."))); + return; + } + this.cancelUpload(); + if(cfg.onComplete) cfg.onComplete.call(this.uploadedList, this.uploadedList); + + switch (errorCode) { + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: + this.showMSG("File is too big."); + this.swfu.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + this.showMSG("Cannot upload Zero Byte files."); + this.swfu.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: + this.showMSG("Invalid File Type."); + this.swfu.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + default: + if (file !== null) { + this.showMSG("Unhandled Error"); + } + this.swfu.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + } + } catch (ex) { + this.debug(ex); + } + }; + var file_queue_error_handler_bind = file_queue_error_handler.bind(this); + //-- + var upload_start_handler = function(){ + if(this.isSingleUpload){ + + }else{ + if(cfg.uploadMaxFileCount != 0){ + if(cfg.uploadMaxFileCount <= this.uploadedList.length){ + this.cancelUpload(); + } + } + } + }; + var upload_start_handler_bind = upload_start_handler.bind(this); + //-- + var upload_progress_handler = function(file, bytesLoaded, bytesTotal){ + var itemID = 'AX_'+ file.id; + if(cfg.isSingleUpload){ + jQuery("#"+itemID).find(".AXUploadProcessBar").width( ((bytesLoaded / bytesTotal) * 100).round(2)+"%" ); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadProcessBar").width( ((bytesLoaded / bytesTotal) * 100).round(2)+"%" ); + } + }; + var upload_progress_handler_bind = upload_progress_handler.bind(this); + //-- + var upload_success_handler = function(file, res){ + var itemID = 'AX_'+ file.id; + + try{if(typeof res == "string") res = res.object();}catch(e){trace(e);} + if(cfg.isSingleUpload){ + + jQuery("#"+itemID+" .AXUploadBtns").show(); + jQuery("#"+itemID+" .AXUploadLabel").show(); + jQuery("#"+itemID+" .AXUploadTit").show(); + + jQuery("#"+itemID+" .AXUploadProcess").hide(); + + uploadSuccess(file, itemID, res); + // --------------------- s + jQuery("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + + }else{ + + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtns").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadLabel").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadProcess").hide(); + + if(res[cfg.fileKeys.thumbPath]){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({ + "background-image":"url('"+(res[cfg.fileKeys.thumbPath]||"").dec()+"')" + }).addClass("AXUploadPreview"); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({"background-image":"url()"}); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").html((res[cfg.fileKeys.type]||"").dec().replace(".", "")); + } + + uploadSuccess(file, itemID, res); + // --------------------- s + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + } + + //큐에서 제거 + var updateQueue = []; + jQuery.each(this.queue, function(){ + if(this.id != itemID) updateQueue.push(this); + }); + this.queue = updateQueue; + }; + var upload_success_handler_bind = upload_success_handler.bind(this); + //-- + var upload_complete_handler = function(){ + if(this.isSingleUpload){ + this.uploadComplete(); + }else{ + if (this.swfu.getStats().files_queued === 0) { + this.uploadComplete(); + this.swfu.settings.allowUpload = false; + }else{ + this.swfu.startUpload(); + } + } + }; + var upload_complete_handler_bind = upload_complete_handler.bind(this); + //-- + var queue_complete_handler = function(){ + //alert("end"); + }; + var queue_complete_handler_bind = queue_complete_handler.bind(this); + // functions --------------------------------------------------------------- e + + var settings = { + flash_url : cfg.flash_url, + flash9_url : cfg.flash9_url, + upload_url: cfg.uploadUrl, + file_post_name: cfg.uploadFileName, + post_params: cfg.uploadPars, + file_size_limit : cfg.uploadMaxFileSize, + fileSelectAutoUpload: cfg.fileSelectAutoUpload, + file_types : "*.*", + file_types_description : "All Files", + file_upload_limit : 0, //cfg.uploadMaxFileCount, + file_queue_limit : 0, + debug: false, + + // Button Settings + button_image_url : "null", + button_placeholder_id : "spanButtonPlaceholder", + button_width: btnW, + button_height: btnH, + + // The event handler functions are defined in handlers.js + swfupload_preload_handler : function(){}, + swfupload_load_failed_handler : function(){}, + swfupload_loaded_handler : function(){}, + file_queued_handler : file_queued_handler_bind, + file_queue_error_handler : file_queue_error_handler_bind, + file_dialog_complete_handler : file_dialog_complete_handler_bind, + upload_start_handler : upload_start_handler_bind, + upload_progress_handler : upload_progress_handler_bind, + upload_error_handler : function(){}, + upload_success_handler : upload_success_handler_bind, + upload_complete_handler : upload_complete_handler_bind, + queue_complete_handler : queue_complete_handler_bind // Queue plugin event + }; + this.swfu = new SWFUpload(settings); + + if(cfg.queueBoxID){ + this.multiSelector = new AXMultiSelect(); + this.multiSelector.setConfig({ + selectStage : cfg.queueBoxID, + selectClassName : "readyselect", + beselectClassName : "beSelected" + }); + } + }, + getItemTag: function(itemID, f){ + var cfg = this.config; + var po = []; + if(cfg.isSingleUpload){ + po.push('
    '); + po.push(' '); + po.push(' '); + po.push('
    '); + po.push('
    '); + po.push('
    '); + po.push(' '); + po.push('
    '); + }else{ + po.push('
    '); + po.push('
    '); + po.push('
    '+f.size.number().byte()+'
    '); + po.push('
    '+f.name.dec()+'
    '); + po.push('
    '); + po.push('
    '); + po.push('
    '); + po.push(' '); + po.push(' '); + } + return po.join(''); + }, + onFileSelect: function(evt){ + var cfg = this.config; + if(this.supportHtml5){ + var files = evt.target.files; // FileList object + if(cfg.isSingleUpload){ + + var myFile = this.uploadedList.first(); + if(myFile){ + if(!confirm(AXConfig.AXUpload5.deleteConfirm)) return; + var uploadFn = function(){ + var i = 0; + var f = files[i]; + var itemID = 'AX'+AXUtil.timekey()+'_AX_'+i; + this.queue.push({id:itemID, file:f}); + jQuery("#" + cfg.targetID+'_AX_display').empty(); + jQuery("#" + cfg.targetID+'_AX_display').append(this.getItemTag(itemID, f)); + + this.queueLive = true; + if(cfg.onStart) cfg.onStart.call(this.queue, this.queue); + this.uploadQueue(); + }; + this.deleteFile(myFile, uploadFn.bind(this)); + return; + }else{ + var i = 0; + var f = files[i]; + var itemID = 'AX'+AXUtil.timekey()+'_AX_'+i; + this.queue.push({id:itemID, file:f}); + jQuery("#" + cfg.targetID+'_AX_display').empty(); + jQuery("#" + cfg.targetID+'_AX_display').append(this.getItemTag(itemID, f)); + } + + }else{ + var hasSizeOverFile = false; + var sizeOverFile; + if(!cfg.file_types) cfg.file_types = "."; + if(cfg.file_types == "*.*") cfg.file_types = "*/*"; + + for (var i = 0; i < files.length; i++) { + var f = files[i]; + if(f.size > cfg.uploadMaxFileSize){ + hasSizeOverFile = true; + sizeOverFile = f; + break; + } + } + if(hasSizeOverFile) cfg.onError("fileSize", {name:sizeOverFile.name, size:sizeOverFile.size}); + + var uploadedCount = this.uploadedList.length; + for (var i = 0; i < files.length; i++) { + var f = files[i]; + + if( f.size <= cfg.uploadMaxFileSize && (new RegExp(cfg.file_types.replace(/\*/g, "[a-z]"), "ig")).test(f.type.toString()) ){ + if(uploadedCount-1 < cfg.uploadMaxFileCount || cfg.uploadMaxFileCount == 0){ + var itemID = 'AX'+AXUtil.timekey()+'_AX_'+i; + this.queue.push({id:itemID, file:f}); + //큐박스에 아이템 추가 + + if(cfg.queueBoxAppendType == "prepend") jQuery("#" + cfg.queueBoxID).prepend(this.getItemTag(itemID, f)); + else jQuery("#" + cfg.queueBoxID).append(this.getItemTag(itemID, f)); + jQuery("#" + cfg.queueBoxID).find("#"+itemID).fadeIn(); + uploadedCount++; + }else{ + cfg.onError("fileCount"); + break; + } + } + }; + } + }else{ + alert("not support HTML5"); + } + this.queueLive = true; + if(cfg.onStart) cfg.onStart.call(this.queue, this.queue); + this.uploadQueue(); + }, + onFileDragOver: function(evt){ + var cfg = this.config; + jQuery("#"+cfg.dropBoxID).addClass("onDrop"); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").show(); + /*jQuery("#"+cfg.dropBoxID+"_dropZoneBox").css({height:jQuery("#"+cfg.dropBoxID).innerHeight()-6, width:jQuery("#"+cfg.dropBoxID).innerWidth()-6}); 라르게덴 2013-10-29 오후 3:21:45 */ + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").css({height:jQuery("#"+cfg.dropBoxID).prop("scrollHeight")-6, width:jQuery("#"+cfg.dropBoxID).innerWidth()-6}); + + var dropZone = document.getElementById(cfg.dropBoxID+"_dropZoneBox"); + dropZone.addEventListener('dragleave', function(evt){ + jQuery("#"+cfg.dropBoxID).removeClass("onDrop"); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").hide(); + }, false); + + evt.stopPropagation(); + evt.preventDefault(); + evt.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy. + }, + onFileDrop: function(evt){ + var cfg = this.config; + evt.stopPropagation(); + evt.preventDefault(); + jQuery("#"+cfg.dropBoxID).removeClass("onDrop"); + jQuery("#"+cfg.dropBoxID+"_dropZoneBox").hide() + + var files = evt.dataTransfer.files; // FileList object. + + var hasSizeOverFile = false; + var sizeOverFile; + for (var i = 0, f; f = files[i]; i++) { + if(f.size > cfg.uploadMaxFileSize){ + hasSizeOverFile = true; + sizeOverFile = f; + break; + } + } + if(hasSizeOverFile) cfg.onError("fileSize", {name:sizeOverFile.name, size:sizeOverFile.size}); + if(!cfg.file_types) cfg.file_types = "."; + if(cfg.file_types == "*.*") cfg.file_types = "*/*"; + var fileTypeRe = new RegExp(cfg.file_types.replace(/\*/g, "[a-z]"), "ig"); + var uploadedCount = this.uploadedList.length; + for (var i = 0, f; f = files[i]; i++) { + if(f.size <= cfg.uploadMaxFileSize && (new RegExp(cfg.file_types.replace(/\*/g, "[a-z]"), "ig")).test(f.type.toString()) ){ + uploadedCount++; + if(uploadedCount-1 < cfg.uploadMaxFileCount || cfg.uploadMaxFileCount == 0){ + var itemID = 'AX'+AXUtil.timekey()+'_AX_'+i; + this.queue.push({id:itemID, file:f}); + //큐박스에 아이템 추가 + if(cfg.queueBoxAppendType == "prepend") jQuery("#" + cfg.queueBoxID).prepend(this.getItemTag(itemID, f)); + else jQuery("#" + cfg.queueBoxID).append(this.getItemTag(itemID, f)); + jQuery("#" + cfg.queueBoxID).find("#"+itemID).fadeIn(); + }else{ + cfg.onError("fileCount"); + break; + } + } + }; + + this.queueLive = true; + if(cfg.onStart) cfg.onStart.call(this.queue); + this.uploadQueue(); + }, + pauseQueue: function(){ + this.queueLive = false; + }, + uploadQueue: function(fileUpload){ + var cfg = this.config; + + if(cfg.fileSelectAutoUpload == false && fileUpload == undefined){ + return; + } + + if(cfg.fileSelectAutoUpload == false && fileUpload != undefined && this.swfu) { + this.swfu.settings.allowUpload = true; + this.swfu.startUpload(); + } + + if(!this.queueLive) return; + if(this.queue.length == 0){ + //trace("uploadEnd"); + this.uploadComplete(); + return; + } + + var uploadQueue = this.uploadQueue.bind(this); + var cancelUpload = this.cancelUpload.bind(this); + var uploadSuccess = this.uploadSuccess.bind(this); + var onClickDeleteButton = this.onClickDeleteButton.bind(this); + var onClickFileTitle = this.onClickFileTitle.bind(this); + + var obj = this.queue.shift(); + this.uploadingObj = obj; + var formData = new FormData(); + //서버로 전송해야 할 추가 파라미터 정보 설정 + jQuery.each(cfg.uploadPars, function(k, v){ + formData.append(k, v); + }); + //formData.append(obj.file.name, obj.file); + formData.append(cfg.uploadFileName, obj.file); + + //obj.id + var itemID = obj.id; + + this.xhr = new XMLHttpRequest(); + this.xhr.open('POST', cfg.uploadUrl, true); + this.xhr.onload = function(e) { + var res = e.target.response; + try { if (typeof res == "string") res = res.object(); } catch (e) { + trace(e); + cancelUpload(); + return; + } + + if (res.result == "err" || res.error) { + alert("파일전송에 실패 하였습니다. 서버에서 에러가 리턴되었습니다. 콘솔창을 확인 하세요."); + trace(res); + jQuery("#" + itemID).fadeOut("slow"); + cancelUpload(); + return; + } + + if(cfg.isSingleUpload){ + + jQuery("#"+itemID+" .AXUploadBtns").show(); + jQuery("#"+itemID+" .AXUploadLabel").show(); + jQuery("#"+itemID+" .AXUploadTit").show(); + + jQuery("#"+itemID+" .AXUploadProcess").hide(); + + uploadSuccess(obj.file, itemID, res); + // --------------------- s + jQuery("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + + }else{ + + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtns").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadLabel").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadProcess").hide(); + + var _res = (Object.isArray(res)) ? res[0] : res; /* Array 타입 예외처리 */ + + if(_res[cfg.fileKeys.thumbPath]){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({ + "background-image":"url('"+(_res[cfg.fileKeys.thumbPath]||"").dec()+"')" + }).addClass("AXUploadPreview"); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({"background-image":"url()"}); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").html((_res[cfg.fileKeys.type]||"").dec().replace(".", "")); + } + + uploadSuccess(obj.file, itemID, _res); + + // --------------------- s + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + } + + // --------------------- e + uploadQueue(fileUpload); + }; + var setUploadingObj = function(){ + this.uploadingObj = null; + }; + var setUploadingObjBind = setUploadingObj.bind(this); + this.xhr.upload.onprogress = function(e) { + if(cfg.isSingleUpload){ + if (e.lengthComputable) { jQuery("#"+itemID).find(".AXUploadProcessBar").width( ((e.loaded / e.total) * 100).round(2)+"%" ); } + }else{ + if (e.lengthComputable) { jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadProcessBar").width( ((e.loaded / e.total) * 100).round(2)+"%" ); } + } + if (e.lengthComputable) { + if( e.loaded > e.total*0.9 ){ + setUploadingObjBind(); + } + } + }; + this.xhr.send(formData); // multipart/form-data + }, + uploadSuccess: function(file, itemID, res){ // 업로드 아이템별 이벤트 + var cfg = this.config; + var uploadedItem = {id:itemID}; + var _res = (Object.isArray(res)) ? res[0] : res; /* Array 타입 예외처리 */ + jQuery.each(_res, function(k, v){ + uploadedItem[k] = v; + }); + if(cfg.queueBoxAppendType == "prepend") this.uploadedList.push(uploadedItem); + else{ + var uploadedList = []; + uploadedList.push(uploadedItem); + jQuery.each(this.uploadedList, function(){ + uploadedList.push(this); + }); + this.uploadedList = uploadedList; + } + jQuery("#"+itemID).addClass("readyselect"); + if(cfg.onUpload) cfg.onUpload.call(uploadedItem, uploadedItem); + }, + clearQueue: function(){ + //큐제거 + jQuery.each(this.queue, function(){ + jQuery("#"+this.id).hide(function(){ + jQuery(this).remove(); + }); + }); + this.queue = []; + }, + uploadComplete: function(){ + var cfg = this.config; + //trace("uploadComplete"); + if(AXgetId(cfg.targetID+'_AX_files')){ + + jQuery('#'+cfg.targetID+'_AX_files').remove(); + + var inputFileMultiple = 'multiple="multiple"'; + var inputFileAccept = cfg.file_types; + if(cfg.isSingleUpload){ + inputFileMultiple = ''; + } + if(!this.supportHtml5){ + inputFileMultiple = ''; + } + + var po = [' ']; + jQuery("#"+cfg.targetID+"_AX_selectorTD").prepend(po.join('')); + jQuery('#'+cfg.targetID+'_AX_files').css({width:jQuery('#'+cfg.targetID+'_AX_selector').outerWidth(),height:jQuery('#'+cfg.targetID+'_AX_selector').outerHeight()}); + + var onFileSelect = this.onFileSelect.bind(this); + var fileSelector = document.getElementById(cfg.targetID+'_AX_files'); + if(AXUtil.browser.name == "ie" && AXUtil.browser.version < 9){ + + }else{ + fileSelector.addEventListener('change', onFileSelect, false); + } + + } + if(cfg.queueBoxID){ + this.multiSelector.collect(); + } + if(cfg.onComplete) cfg.onComplete.call(this.uploadedList, this.uploadedList); + }, + cancelUpload: function(){ + var cfg = this.config; + if(this.swfu){ + this.swfu.stopUpload(); + var stats = this.swfu.getStats(); + while (stats.files_queued > 0) { + this.swfu.cancelUpload(); + stats = this.swfu.getStats(); + } + stats = null; + this.pauseQueue(); + this.clearQueue(); + }else{ + if(this.uploadingObj){ + this.xhr.abort(); + jQuery("#"+this.uploadingObj.id).remove(); + this.uploadingObj = null; + } + this.pauseQueue(); + this.clearQueue(); + } + if(cfg.onComplete) cfg.onComplete.call(this.uploadedList, this.uploadedList); + }, + onClickDeleteButton: function(itemID){ + var cfg = this.config; + if(cfg.isSingleUpload){ + var myFile; + jQuery.each(this.uploadedList, function(){ + if(this.id == itemID){ + myFile = this; + return false; + } + }); + if(myFile){ + this.deleteFile(myFile); + } + myFile = null; + //trace("a"); + this.init("reset"); + }else{ + var myFile; + jQuery.each(this.uploadedList, function(){ + if(this.id == itemID){ + myFile = this; + return false; + } + }); + if(myFile){ + this.deleteFile(myFile); + if(cfg.queueBoxID){ + this.multiSelector.clearSelects(); + } + } + myFile = null; + } + + }, + onClickFileTitle: function(itemID){ + var cfg = this.config; + //trace(itemID); + if(cfg.onClickUploadedItem){ + + var myFile; + jQuery.each(this.uploadedList, function(){ + if(this.id == itemID){ + myFile = this; + return false; + } + }); + cfg.onClickUploadedItem.call(myFile, myFile); + } + }, + deleteFile: function(file, onEnd, withOutServer){ + var cfg = this.config; + if(!onEnd) if(!confirm(AXConfig.AXUpload5.deleteConfirm)) return; + var removeUploadedList = this.removeUploadedList.bind(this); + + //trace(file); + //{"id":"AXA220125984_AX_0", "name":"38540011%2EJPG", "type":"%2EJPG", "saveName":"0DA0316011A0001%2EJPG", "fileSize":"3172720", "uploadedPath":"%2F%5Ffile%2F1%2F", "thumbPath":"%2F%5Ffile%2F1%2FT%5F0DA0316011A0001%2EJPG"} + if (file != undefined){ + + if(withOutServer == "withOutServer"){ + if(cfg.isSingleUpload){ + jQuery('#'+cfg.targetID+'_AX_display').html(AXConfig.AXUpload5.uploadSelectTxt); + }else{ + jQuery("#"+file.id).hide(function(){ + jQuery(this).remove(); + }); + } + removeUploadedList(file.id); + if(cfg.onDelete) cfg.onDelete.call({file:file, response:withOutServer}, file); + if(onEnd) onEnd(); + return; + } + + var pars = []; + var sendPars = ""; + jQuery.each(file, function(k, v){ + pars.push(k + '=' + v); + }); + + if (typeof(cfg.deletePars) === "object") { + jQuery.each(cfg.deletePars, function(k, v){ + pars.push(k + '=' + v); + }); + sendPars = pars.join("&"); + }else{ + sendPars = pars.join("&") + "&" + cfg.deletePars; + } + + if(cfg.isSingleUpload){ + jQuery("#"+file.id+" .AXUploadBtns").hide(); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+file.id+" .AXUploadBtns").hide(); + } + + new AXReq(cfg.deleteUrl, {debug:false, pars:sendPars, onsucc:function(res){ + if(res.result == AXConfig.AXReq.okCode || res.error === undefined){ + if(cfg.isSingleUpload){ + jQuery('#'+cfg.targetID+'_AX_display').html(AXConfig.AXUpload5.uploadSelectTxt); + }else{ + jQuery("#"+file.id).hide(function(){ + jQuery(this).remove(); + }); + } + removeUploadedList(file.id); + if(cfg.onDelete) cfg.onDelete.call({file:file, response:res}, file); + if(onEnd) onEnd(); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+file.id+" .AXUploadBtns").show(); + } + }}); + + }else{ + trace("file undefined"); + } + }, + deleteSelect: function(arg, withOutServer){ + if(arg == "all"){ + var deleteQueue = []; + jQuery.each(this.uploadedList, function(){ + deleteQueue.push(this.id); + }); + this.ccDelete(deleteQueue, 0, withOutServer); + deleteQueue = null; + }else{ + if(!this.multiSelector) return; + var selectObj = this.multiSelector.getSelects(); + if (selectObj.length > 0){ + var deleteQueue = []; + jQuery.each(selectObj, function(){ + deleteQueue.push(this.id); + }); + this.ccDelete(deleteQueue, 0, withOutServer); + deleteQueue = null; + }else{ + alert("삭제하실 파일을 선택해 주세요"); + } + } + }, + ccDelete: function(deleteQueue, index, withOutServer){ + if(deleteQueue.length > index){ + var myFile; + jQuery.each(this.uploadedList, function(){ + if(this.id == deleteQueue[index]){ + myFile = this; + return false; + } + }); + var ccDelete = this.ccDelete.bind(this); + this.deleteFile(myFile, function(){ + ccDelete(deleteQueue, (index+1), withOutServer); + }, withOutServer); + } + }, + removeUploadedList: function(fid){ + var newUploadedList = []; + jQuery.each(this.uploadedList, function(){ + if(this.id != fid) newUploadedList.push(this); + }); + this.uploadedList = newUploadedList; + newUploadedList = null; + + this.multiSelector.collect(); + }, + showMSG: function(msg){ + dialog.push(msg); + }, + setUploadedList: function(files){ + var cfg = this.config; + + var getItemTag = this.getItemTag.bind(this); + var onClickDeleteButton = this.onClickDeleteButton.bind(this); + var onClickFileTitle = this.onClickFileTitle.bind(this); + + + //if (!files.length) return; + + if(cfg.isSingleUpload){ + this.uploadedList = []; + var f; + if(jQuery.isArray(files)){ + if( jQuery.isArray(files.first()) ){ + f = files.first(); + } + }else{ + if (Object.isObject(files) ){ + f = files; + } + } + if(!f) return; + if(!f.id) return; + + this.uploadedList.push(f); + + var itemID = f.id; + + var uf = { + id:itemID, + name:f[cfg.fileKeys.name], + size:f[cfg.fileKeys.fileSize] + }; + + jQuery("#" + cfg.targetID+'_AX_display').empty(); + jQuery("#" + cfg.targetID+'_AX_display').append(this.getItemTag(itemID, uf)); + + jQuery("#"+itemID+" .AXUploadBtns").show(); + jQuery("#"+itemID+" .AXUploadLabel").show(); + jQuery("#"+itemID+" .AXUploadTit").show(); + jQuery("#"+itemID+" .AXUploadProcess").hide(); + + jQuery("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + + }else{ + + //this.uploadedList = files; + this.uploadedList = []; + var uploadedList = []; + files.reverse(); + axf.each(files, function(){ + if(this) uploadedList.push(this); + }); + this.uploadedList = uploadedList; + //trace(this.uploadedList); + + if(cfg.queueBoxID){ + jQuery.each(this.uploadedList, function(fidx, f){ + if(f.id == undefined){ + trace("id key는 필수 항목 입니다."); + return false; + } + var itemID = f.id; + var uf = { + id:itemID, + name:f[cfg.fileKeys.name], + size:f[cfg.fileKeys.fileSize] + }; + jQuery("#" + cfg.queueBoxID).prepend(getItemTag(itemID, uf)); + jQuery("#" + cfg.queueBoxID).find("#"+itemID).fadeIn(); + + // --------------------- s + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtns").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadLabel").show(); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadProcess").hide(); + + if(f[cfg.fileKeys.thumbPath]){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({ + "background-image":"url('"+(f[cfg.fileKeys.thumbPath]||"").dec()+"')" + }).addClass("AXUploadPreview"); + }else{ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({"background-image":"url()"}); + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").html((f[cfg.fileKeys.type]||"").dec().replace(".", "")); + } + + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadBtnsA").bind("click", function(){ + onClickDeleteButton(itemID); + }); + if(cfg.onClickUploadedItem){ + jQuery("#" + cfg.queueBoxID).find("#"+itemID+" .AXUploadDownload").bind("click", function(){ + onClickFileTitle(itemID); + }); + } + // --------------------- e + + jQuery("#"+itemID).addClass("readyselect"); + + }); + this.multiSelector.collect(); + } + } + }, + getUploadedList: function(arg){ + if(arg == "param"){ + try{ + var pars = []; + if(this.uploadedList){ + jQuery.each(this.uploadedList, function(){ + if(this != "") pars.push(jQuery.param(this)); + }); + } + return pars.join("&"); + pars = null; + }catch(e){ + trace(e); + } + }else{ + return this.uploadedList; + } + }, + getSelectUploadedList: function(arg){ + if(!this.multiSelector) return; + var selectObj = this.multiSelector.getSelects(); + if(arg == "param"){ + var pars = []; + jQuery.each(this.uploadedList, function(){ + for(var a=0;a"); + po.push(""+AXfile.ti.dec()+""); + po.push("X"); + po.push("
    "); + jQuery("#"+UploadDisplay_id).html(po.join('')); + jQuery("#"+UploadDisplay_id).find(".AXFileDelete").bind("click", onClickButton); + + if(this.settings.onclick){ + var onclick = this.settings.onclick.bind(this); + jQuery("#"+UploadDisplay_id).find(".AXFileTitle").bind("click", function(){ + onclick(AXfile); + }); + } + + po = null; + fileNameMaxLen = null; + }, + getUploadedFile: function(){ + return this.uploadedList.first(); + }, + + addKeyInUploadedListItem: function(objID, obj){ + var uploadedList = this.uploadedList; + + jQuery.each(uploadedList, function(idx, o){ + if (o.id == objID){ + jQuery.each(obj, function(k, v){ + o[k] = v; + }); + }else{ + jQuery.each(obj, function(k, v){ + o[k] = ''; + }); + } + }); + }, + + nothing: function(){ + + } +}); + +// jquery extend +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var AXUserSelect = Class.create(AXJ, { + version: "AXUserSelect V1.0", + author: "tom@axisj.com", + logs: [ + "2013-08-21 오후 11:47:11 - modsAX 변환" + ], + initialize: function(AXJ_super) { + AXJ_super(); + this.config.className = ""; + this.ds = []; + }, + init: function() { + var config = this.config; + this.myDrag = new AXDrag(); + + if (!config.containerID || !jQuery("#" + config.containerID).get(0)) { + alert("컨테이너 아이디가 지정되지 않아 modsTab 초기화에 실패 하였습니다."); + return; + } + + this.CT = jQuery("#" + config.containerID); + + var po = []; + po.push("
    "); + po.push("
    "); + this.CT.html(po.join('')); + + + var onSort = this.onSort.bind(this); + var onDrop = this.onDrop.bind(this); + + this.myDrag.setConfig({ + dragStage: config.containerID + "_UserSelectBox", + dragBoxClassName: "modsDragBox", + bedragClassName: "bedraged", + bedropClassName: "bedroped", + dragClassName: "readyDrag", + dropClassName: "readyDrop", + //onDrag: fnObj.portlet.onDrag, + onDrop: onDrop, + onSort: onSort, + multiSelector: { + selectStage: config.containerID + "_UserSelectBox", + selectClassName: "readyDrag", + beselectClassName: "beSelected" + }, + sort: { + sorter: "
    " + } + }); + // 3 : 활성화 + this.myDrag.active(); + + }, + push: function(ds) { + var config = this.config; + var myds = this.ds; + var po = []; + jQuery.each(ds, function(i, D) { + var addOk = 1; + jQuery.each(myds, function() { + if (this.id == D.id) { + addOk = 0; + return false; + } + }); + if (addOk == 1) { + po.push("
    "); + po.push("
    "); + po.push(" "); + po.push(" "); + po.push(" "); + po.push(" " + this.nm.dec() + " "); + po.push(" " + this.desc.dec() + " "); + //po.push(" 삭제"); + po.push("
    "); + po.push("
    "); + myds.push(this); + } + }); + + jQuery("#" + config.containerID + "_UserSelectBox").append(po.join('')); + + + this.dragCollect(); + }, + del: function(select) { + var config = this.config; + var myDS = []; + jQuery.each(this.ds, function() { + var delOK = 0; + for (var a = 0; a < select.length; a++) { + if (select[a].id.split(/\_/g).last() == this.id) { + delOK = 1; + } + } + if (delOK == 1) { + jQuery("#" + config.containerID + "userSelectItem_" + this.id).remove(); + } else { + myDS.push(this); + } + }); + this.ds = myDS; + this.dragCollect(); + }, + _del: function(select) { + var config = this.config; + var myDS = []; + axf.each(this.ds, function() { + var delOK = 0; + for (var a = 0; a < select.length; a++) { + if (select[a] == this.id) { + delOK = 1; + } + } + if (delOK == 1) { + axdom("#" + config.containerID + "userSelectItem_" + this.id).remove(); + } else { + myDS.push(this); + } + }); + this.ds = myDS; + this.dragCollect(); + }, + dragCollect: function() { + this.myDrag.collectItem(); + }, + onSort: function(res) { + var dragCollect = this.dragCollect.bind(this); + if (axdom(res.dragItem).html() == axdom(res.sortItem).html()) return; + if (res.dragItem == res.sortItem) return; + axdom(res.dragItem).fadeOut("fast", function() { + axdom(res.sortItem).before(this); + axdom(this).show("fast"); + dragCollect(); + }); + + }, + onDrop: function(res) { + var config = this.config; + var dragCollect = this.dragCollect.bind(this); + axdom(res.dragItem).fadeOut("fast", function() { + jQuery("#" + config.containerID + "_UserSelectBox").append(this); //예외 경우 + jQuery(this).show("fast"); + dragCollect(); + }); + + }, + moveup: function() { + var select = this.getSelect(); + + axf.each(select, function() { + var prev = axdom(this).prev(); + prev.before(axdom(this)); + }); + }, + movedown: function() { + var select = this.getSelect(); + + axf.each(select, function() { + var next = axdom(this).next(); + next.after(axdom(this)); + }); + }, + getSelect: function() { + return this.myDrag.mselector.getSelects(); + }, + empty: function() { + var config = this.config; + jQuery("#" + config.containerID + "_UserSelectBox").empty(); + this.ds = []; + this.dragCollect(); + }, + getDS: function() { + var config = this.config; + var myDS = []; + jQuery("#" + config.containerID + "_UserSelectBox").find(".readyDrag").each(function() { + var id = this.id.split(/\_/g).last(); + var nm = jQuery("#" + config.containerID + "userSelectItemNM_" + id).val(); + var desc = jQuery("#" + config.containerID + "userSelectItemDESC_" + id).val(); + myDS.push({id:id, nm:nm, desc:desc}); + }); + return myDS; + } +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + + +var AXValidator = Class.create(AXJ, { + version: "AXValidator V1.4", + author: "tom@axisj.com, hwshin@collabra.com", + logs: [ + "2013-07-18 오전 12:05:00", + "2013-07-18 오후 12:31:04 - tom", + "2013-07-19 오후 19:37:04 - shin : message[validateKey], errElement 추가", + "2013-07-24 오후 19:24:00 - shin : displayFormatter 추가 keyup event phone '-' add", + "2013-10-15 오후 13:10:00 - shin : del 기능 추가", + "2013-11-06 오후 12:41:17 - tom : 버그패치", + "2013-11-08 오전 11:08:17 - shin : messageConvert 예외 처리", + "2013-11-08 오전 11:41:18 - tom : onBlur 버그패치, earlierThan, laterThan 키 추가", + "2014-04-04 오전 10:33:08 - tom : validate(filterOption:JSObject) 옵션 추가", + "2014-04-30 오후 1:30:11 - tom : validate date bug fix " + ], + initialize: function (AXJ_super) { + AXJ_super(); + this.Observer = null; + this.form = null; + this.elements = []; + this.errElements = []; + this.errMessagePattern = "[{label}] {message}"; + this.config = { + targetID: null, + clazz: "av-" + }; + }, + init: function () { + var cfg = this.config; + if (Object.isUndefined(cfg.targetFormName)) { + trace("need targetID - setConfig({targetFormName:''})"); + return; + } + + if (!document[cfg.targetFormName]) { + // 엘리먼트가 존재 하지 않는 경우 예외 처리 + trace("not found form element"); + return; + } + + this.form = $(document[cfg.targetFormName]); + this.findElement(); + }, + findElement: function () { + var cfg = this.config; + var allElements = this.form.serializeObject(); + var _elements = this.elements; + var checkClass = this.validateCheckClass; + jQuery.each(allElements, function (eidx, Elem) { + try { + var config = {}; + var isValidate = false; + jQuery.each(checkClass, function (k, v) { + if (Elem.id) { + if (jQuery("#" + Elem.id).hasClass(cfg.clazz + k)) { + config[k] = v; + isValidate = true; + } + } else if (Elem.name) { + if ($(document[cfg.targetFormName][Elem.name]).hasClass(cfg.clazz + k)) { + config[k] = v; + isValidate = true; + } + } + }); + if (isValidate) { + delete Elem.value; + Elem.config = config; + _elements.push(Elem); + } + } catch (e) { + + } + }); + + this.elements = _elements; + + //trace(this.elements); + }, + del: function (delObj) { + var cfg = this.config; + var deledObject; + + var findIndex = null; + if (delObj.id) { + $.each(this.elements, function (eidx, elem) { + if (this.id == delObj.id) { + findIndex = eidx; + return false; + } + }); + } else if (delObj.name) { + $.each(this.elements, function (eidx, elem) { + if (this.name == delObj.name) { + findIndex = eidx; + return false; + } + }); + } + + if (findIndex != null) { + deledObject = this.elements[findIndex]; + $("#" + deledObject.id).unbind("keydown.validate"); + $("#" + deledObject.id).unbind("keyup.validate"); + $("#" + deledObject.id).unbind("blur.validate"); + this.elements.splice(findIndex, 1); + } + + //trace(this.elements); + }, + add: function (addObj) { + var cfg = this.config; + var addedObject; + var addElement = this.addElement.bind(this); + var getElement = this.getElement.bind(this); + var isActiveFormControl = this.isActiveFormControl.bind(this); + var element = getElement(addObj); + if (!isActiveFormControl(element)) return false; + + if (addObj.id) { + var findIndex = null; + jQuery.each(this.elements, function (eidx, elem) { + if (this.id == addObj.id) { + findIndex = eidx; + return false; + } + }); + if (findIndex != null) { + addElement(addObj, findIndex); + addedObject = this.elements[findIndex]; + } else { + addObj.name = jQuery("#" + addObj.id).attr("name"); + this.elements.push(addObj); + addedObject = this.elements.last(); + } + } else if (addObj.name) { + var findIndex = null; + jQuery.each(this.elements, function (eidx, elem) { + if (this.name == addObj.name) { + findIndex = eidx; + return false; + } + }); + if (findIndex != null) { + addElement(addObj, findIndex); + addedObject = this.elements[findIndex]; + } else { + addObj.id = $(document[cfg.targetFormName][addObj.name]).attr("id"); + this.elements.push(addObj); + addedObject = this.elements.last(); + } + + } + + var raiseError = this.raiseError.bind(this); + var validateFormatter = this.validateFormatter.bind(this); + var targetElem; + var targetElemForSelect; + + if (addedObject.id) { + targetElem = jQuery("#" + addedObject.id); + targetElemForSelect = AXgetId(addedObject.id); + } else if (this.name) { + targetElem = $(document[cfg.targetFormName][addedObject.name]); + targetElemForSelect = document[cfg.targetFormName][addedObject.name]; + } + var Elem = addedObject; + var displayFormatter = this.displayFormatter.bind(this); + + // realtime 지원 함수 구문 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + if (addedObject.realtime) { + //Elem.realtime.validate = Elem.config; + + Elem.needRealtimeCheck = false; + Elem.realtimeCheck = {}; + + jQuery.each(Elem.config, function (k, v) { + if (k == "maxlength" || k == "maxbyte") { + Elem.needRealtimeCheck = true; + Elem.realtimeCheck[k] = v; + } + }); + + if (Elem.needRealtimeCheck) { + targetElem.unbind("keydown.validate"); + targetElem.bind("keydown.validate", function (e) { + var event = window.event || e; + if (!event.keyCode || event.keyCode == 9 || event.keyCode == 16) return; + var _val = this.value; + var returnObject = null; + var eventBlock = true; + + if (document.selection && document.selection.createRange) { + var range = document.selection.createRange(); + if (range.text != "") eventBlock = false; + } else if (window.getSelection) { + + if (AXUtil.browser.name == "mozilla") { + //trace({ maxlength: Elem.realtimeCheck.maxlength, selectionStart: targetElemForSelect.selectionStart }); + if (Elem.realtimeCheck.maxlength > targetElemForSelect.selectionStart) { + eventBlock = false; + } + } else { + selectedText = window.getSelection().toString(); + if (selectedText != "") eventBlock = false; + } + } + + + jQuery.each(Elem.realtimeCheck, function (k, v) { + var val = targetElem.val() + "A"; + if (!validateFormatter(Elem, val, k, v, "realtime")) { // 값 검증 처리 + returnObject = raiseError(Elem, val, k, v); + return false; + } + }); + + var responseResult = true; + if (returnObject == null) { + Elem.realtime.response.call({ result: true }); + } else { + returnObject.result = false; + responseResult = Elem.realtime.response.call(returnObject); + } + + if (responseResult == false) { + if (eventBlock) { + if (event.keyCode != AXUtil.Event.KEY_DELETE + && event.keyCode != AXUtil.Event.KEY_BACKSPACE + && event.keyCode != AXUtil.Event.KEY_LEFT + && event.keyCode != AXUtil.Event.KEY_RIGHT) { + + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + } + } + } + + }); + } + + + + //trace(Elem.config); + + targetElem.unbind("keyup.validate").bind("keyup.validate", function (e) { + var event = window.event || e; + // ignore tab & shift key 스킵 + if (!event.keyCode || event.keyCode == 9 || event.keyCode == 16) return; + + var _val = this.value; + var returnObject = null; + var vKey; + jQuery.each(Elem.config, function (k, v) { + + //trace(k); + + vKey = k; + var val = targetElem.val(); + if (!validateFormatter(Elem, val, k, v, "realtime")) { // 값 검증 처리 + returnObject = raiseError(Elem, val, k, v); + return false; + } + }); + + var responseResult = true; + if (returnObject == null) { + Elem.__prevValue = _val; + Elem.realtime.response.call({ result: true }); + } else { + returnObject.result = false; + responseResult = Elem.realtime.response.call(returnObject); + } + + + + if (responseResult == false) { + if (event.keyCode != AXUtil.Event.KEY_DELETE + && event.keyCode != AXUtil.Event.KEY_BACKSPACE + && event.keyCode != AXUtil.Event.KEY_LEFT + && event.keyCode != AXUtil.Event.KEY_RIGHT + ) { + + if ((Elem.__prevValue || "").length > _val.length) { + this.value = ""; + } else { + if (displayFormatter((Elem.__prevValue || ""), vKey) != "") this.value = displayFormatter((Elem.__prevValue || ""), vKey); + } + + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.cancelBubble = true; + return false; + } + } else { + //realtime에서 체크시 백시켜서 오류 + if (displayFormatter(this.value, vKey) != "") this.value = displayFormatter(this.value, vKey); + } + + }); + + } + // realtime 지원 함수 구문 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + //trace(addedObject); + + // blur 지원 + if (addedObject.onblur) { + targetElem.unbind("blur.validate").bind("blur.validate", function (e) { + var returnObject = {result:true}; + jQuery.each(Elem.config, function (k, v) { + var val = targetElem.val(); + if (!validateFormatter(Elem, val, k, v, "")) { + returnObject = raiseError(Elem, val, k, v); + returnObject.config = Elem.config; + returnObject.result = false; + return false; + } + }); + if(returnObject.result){ + returnObject.element = Elem; + returnObject.value = targetElem.val(); + returnObject.config = Elem.config; + } + var responseResult = Elem.onblur.call(returnObject); + }); + } + + }, + addElement: function (addObj, findIndex) { + AXUtil.overwriteObject(this.elements[findIndex].config, addObj.config, true); + if (addObj.onblur) this.elements[findIndex].onblur = addObj.onblur; + if (addObj.realtime) this.elements[findIndex].realtime = addObj.realtime; + if (addObj.message) this.elements[findIndex].message = addObj.message; + if (addObj.label) this.elements[findIndex].label = addObj.label; + }, + validate: function (filterOption) { + var cfg = this.config; + var raiseError = this.raiseError.bind(this); + var validateFormatter = this.validateFormatter.bind(this); + + var returnObject = null; + for (var Elem, eidx= 0, __arr = this.elements; (eidx < __arr.length && (Elem = __arr[eidx])); eidx++) { + var targetElem; + if (Elem.id) { + targetElem = jQuery("#" + Elem.id); + } else if (Elem.name) { + targetElem = $(document[cfg.targetFormName][Elem.name]); + } + + var isCheck = true; + if(filterOption){ + if(filterOption.filterType == "include"){ + isCheck = false; + for (var f, fidx= 0, __arr2 = filterOption.list; (fidx < __arr2.length && (f = __arr2[fidx])); fidx++) { + if(f.id && f.id == Elem.id){ + isCheck = true; + break; + }else if(f.name && f.name == Elem.name){ + isCheck = true; + break; + } + } + }else{ + isCheck = true; + for (var f, fidx= 0, __arr2 = filterOption.list; (fidx < __arr2.length && (f = __arr2[fidx])); fidx++) { + if(f.id && f.id == Elem.id){ + isCheck = false; + break; + }else if(f.name && f.name == Elem.name){ + isCheck = false; + break; + } + } + } + } + + if (targetElem && isCheck) { + var val = targetElem.val(); + var _end = false; + jQuery.each(Elem.config, function (k, v) { + if (!validateFormatter(Elem, val, k, v, "")) { // 값 검증 처리 + returnObject = raiseError(Elem, val, k, v); + _end = true; + return false; + } + }); + if (_end) return false; + } + }; + + if (returnObject == null) { + this.errElements = []; + return true; + } else { + return false; + } + + }, + raiseError: function (elem, elemVal, validateKey, validateVal) { + var messageConvert = this.messageConvert.bind(this); + var message = messageConvert(elem, validateKey, validateVal); + var returnObject = { + element: elem, + value: elemVal, + validateKey: validateKey, + validateVal: validateVal, + message: message + }; + this.errElements.push(returnObject); + return returnObject; + }, + messageConvert: function (elementObj, validateKey, validateVal) { + var validateErrMessage = this.validateErrMessage; + var vKey = "exception"; + var vVal = ""; + if (validateKey != undefined) vKey = validateKey; + if (validateVal != undefined) vVal = validateVal; + + var element = elementObj; + if (!element) { + return null; + } + var label; + if (element.label) { + label = element.label.length > 0 ? element.label : (element.id || element.name); + } else { + label = (element.id || element.name); + } + + if(vKey == "earlierThan" || vKey == "laterThan"){ + label = (validateVal.label||label); + } + + var errMessage = validateErrMessage[vKey]; + if (element.message == undefined) { + var typeMessage = errMessage; + } else { + var typeMessage = (element.message[vKey] || errMessage); + } + + if (typeMessage != undefined) { + var message = typeMessage.replace(/{label}/, label); + message = message.replace("{" + vKey + "}", vVal); + } else { + message = ""; + } + return message; + }, + //-------------------- validate check - formatter - message Set [S] ---------------------- + validateErrMessage: { + /* for element */ + required: "[{label}](은)는 필수입력 사항입니다.", + requiredstring: "반드시 {required}(으)로 입력하셔야 하는 사항입니다.", + match: "[{label}](은)는 입력된 내용이 일치하지 않습니다.", + invalid: "[{label}](은)는 입력된 내용이 올바르지 않습니다.", + min: "[{label}](은)는 {min} 이상의 값을 입력해주세요.", + max: "[{label}](은)는 {max} 이하의 값을 입력해주세요.", + minbyte: "[{label}]의 입력된 내용의 길이가 {minbyte}Byte 이상이어야 합니다.", + maxbyte: "[{label}]의 입력된 내용의 길이가 {maxbyte}Byte를 초과할 수 없습니다.", + minlength: "[{label}]의 입력된 내용의 length가 {minlength} 이상이어야 합니다.", + maxlength: "[{label}]의 입력된 내용의 length가 {maxlength}을 초과할 수 없습니다.", + + /* for format */ + number: "숫자로만 입력하셔야 합니다.", + email: "이메일 형식이 올바르지 않습니다.", + hangul: "한글로만 입력하셔야 합니다.", + engonly: "영문으로만 입력하셔야 합니다.", + residentno: "주민등록번호 형식이 올바르지 않습니다.", + foreignerno: "외국인등록번호 형식이 올바르지 않습니다.", + bizno: "사업자등록번호 형식이 올바르지 않습니다.", + phone: "전화번호 형식이 올바르지 않습니다.", + isdate: "날짜 형식이 올바르지 않습니다.", + zip: "우편번호 형식이 올바르지 않습니다.", + money: "화폐형식으로만 입력하셔야 합니다.", + earlierThan: "[{label}] 보다 빠른 날짜를 입력해야 합니다.", + laterThan: "[{label}] 보다 느린 날짜를 입력해야 합니다.", + + exception: "not found errmessage" + }, + validateCheckClass: { + // element에서 클래스 검사 항목 + required: true, //필수 + number: true, //숫자 형식 + email: true, //이메일 형식 + hangul: true, //한글 형식 + engonly: true, //영문 형식 + residentno: true, //주민등록 번호 형식 + foreignerno: true, //외국인 번호 형식 + bizno: true, //사업자 등록 형식 + phone: true, //전화번호 형식 + isdate: true, //날짜 형식 + zip: true, //우편번호 형식 + money: true //',' 포함한 숫자 + }, + validateFormatter: function (Elem, ElemValue, validateKey, validateValue, realtime) { + var cfg = this.config; + var result = true; + var lenMargin = 1; // 최소 최대 비교시 하나 커야 함. + if (realtime == "realtime") lenMargin = 0; // realtime 실행 시는 마진 없음. + try { + /* for element */ + if (validateKey == "required") { + result = (ElemValue.trim() != ""); + } else if (ElemValue != "" && validateKey == "min") { + result = (ElemValue.number() + lenMargin > validateValue); + } else if (ElemValue != "" && validateKey == "max") { + result = (ElemValue.number() - lenMargin <= validateValue); + } else if (ElemValue != "" && validateKey == "minbyte") { + result = (ElemValue.getByte().number() + lenMargin > validateValue); + } else if (ElemValue != "" && validateKey == "maxbyte") { + result = (ElemValue.getByte().number() - lenMargin <= validateValue); + } else if (ElemValue != "" && validateKey == "minlength") { + result = (ElemValue.length.number() + lenMargin > validateValue); + } else if (ElemValue != "" && validateKey == "maxlength") { + result = (ElemValue.length.number() - lenMargin <= validateValue); + /* for format */ + } else if (ElemValue != "" && validateKey == "number") { + //var pattern = /^[0-9]+$/; + result = jQuery.isNumeric(ElemValue.trim()); + } else if (ElemValue != "" && validateKey == "email") { + var pattern = /^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/; + result = pattern.test(ElemValue); + } else if (ElemValue != "" && validateKey == "hangul") { + var pattern = /^[가-힣0-9]+$/; + result = pattern.test(ElemValue); + } else if (ElemValue != "" && validateKey == "engonly") { + var pattern = /^[a-zA-Z0-9]+$/; + result = pattern.test(ElemValue); + } else if (ElemValue != "" && validateKey == "residentno") { + var pattern = /^(\d{6})-?(\d{5}(\d{1})\d{1})$/; + var num = ElemValue; + if (!pattern.test(num)) return "invalid"; + num = RegExp.$1 + RegExp.$2; + if (RegExp.$3 == 7 || RegExp.$3 == 8 || RegExp.$4 == 9) + if ((num[7] * 10 + num[8]) % 2) return "residentno"; + + var sum = 0; + var last = num.charCodeAt(12) - 0x30; + var bases = "234567892345"; + for (var i = 0; i < 12; i++) { + if (isNaN(num.substring(i, i + 1))) return "residentno"; + sum += (num.charCodeAt(i) - 0x30) * (bases.charCodeAt(i) - 0x30); + }; + var mod = sum % 11; + if (RegExp.$3 == 7 || RegExp.$3 == 8 || RegExp.$4 == 9) + result = (11 - mod + 2) % 10 == last ? true : false; + else + result = (11 - mod) % 10 == last ? true : false; + + } else if (ElemValue != "" && validateKey == "foreignerno") { + var pattern = /^(\d{6})-?(\d{5}[7-9]\d{1})$/; + var num = ElemValue; + if (!pattern.test(num)) return "foreignerno"; + num = RegExp.$1 + RegExp.$2; + if ((num[7] * 10 + num[8]) % 2) return "foreignerno"; + + var sum = 0; + var last = num.charCodeAt(12) - 0x30; + var bases = "234567892345"; + for (var i = 0; i < 12; i++) { + if (isNaN(num.substring(i, i + 1))) return "foreignerno"; + sum += (num.charCodeAt(i) - 0x30) * (bases.charCodeAt(i) - 0x30); + }; + var mod = sum % 11; + result = (11 - mod + 2) % 10 == last ? true : false; + + } else if (ElemValue != "" && validateKey == "bizno") { + var pattern = /([0-9]{3})-?([0-9]{2})-?([0-9]{5})/; + var num = ElemValue; + if (!pattern.test(num)) return "bizno"; + num = RegExp.$1 + RegExp.$2 + RegExp.$3; + var cVal = 0; + for (var i = 0; i < 8; i++) { + var cKeyNum = parseInt(((_tmp = i % 3) == 0) ? 1 : (_tmp == 1) ? 3 : 7); + cVal += (parseFloat(num.substring(i, i + 1)) * cKeyNum) % 10; + }; + var li_temp = parseFloat(num.substring(i, i + 1)) * 5 + "0"; + cVal += parseFloat(li_temp.substring(0, 1)) + parseFloat(li_temp.substring(1, 2)); + result = parseInt(num.substring(9, 10)) == 10 - (cVal % 10) % 10 ? true : false; + + } else if (ElemValue != "" && validateKey == "phone") { + if (realtime == "realtime") { + var pattern = /[\D]+/; + var num = ElemValue.replace(/\-/g, ""); + result = pattern.test(num) ? false : true; + } else { + var pattern = /^(0[2-8][0-5]?|01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/; + var pattern15xx = /^(1544|1566|1577|1588|1644|1688)-?([0-9]{4})$/; + var patternHand = /^(01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/; + var num = ElemValue; + result = pattern.test(num) || pattern15xx.test(num) || patternHand.test(num) ? true : false; + } + } else if (ElemValue != "" && validateKey == "isdate") { + result = true; + + var iDate = ElemValue.replace(/-/g, ""); + if (iDate.length != 8) { + return result = false; + } + + var oDate = new Date(parseInt(iDate.substr(0, 4), 10), parseInt(iDate.substr(4, 2), 10) - 1, parseInt(iDate.substr(6, 2), 10)); + if (oDate.getFullYear() != parseInt(iDate.substr(0, 4), 10) + || oDate.getMonth() != parseInt(iDate.substr(4, 2), 10)-1 + || oDate.getDate() != parseInt(iDate.substr(6, 2), 10)) { + return result = false; + }else{ + return result = true; + } + } else if (ElemValue != "" && validateKey == "zip") { + var pattern = /^[0-9]{3}\-[0-9]{3}$/; + result = pattern.test(ElemValue); + } else if (ElemValue != "" && validateKey == "money") { + var value = ElemValue.replace(",").replace("."); + //실제 money형식 + var pattern = /^\$?[0-9]+(,[0-9]{3})*(\.[0-9]*)?$/; + //var pattern = /^[1-9]\d*(((,\d{3}){1})?(\.\d{0,2})?)$/; + result = pattern.test(ElemValue); + } else if (validateKey == "earlierThan") { + if(ElemValue == ""){ + result = true; + }else{ + var st_date = ElemValue; + var ed_date = jQuery("#" + validateValue.id).val().trim(); + if(ed_date != ""){ + if (st_date.date().diff(ed_date) < 0) { + result = false; + }else{ + result = true; + } + }else{ + result = false; + } + } + } else if (validateKey == "laterThan") { + if(ElemValue == ""){ + result = true; + }else{ + var ed_date = ElemValue; + var st_date = jQuery("#" + validateValue.id).val().trim(); + if(st_date != ""){ + //trace(st_date, ed_date, st_date.date()); + if (st_date.date().diff(ed_date) < 0) { + result = false; + }else{ + result = true; + } + }else{ + result = false; + } + } + } else { + if (jQuery.isFunction(validateValue)) { + result = validateValue.call({ + Elem: Elem, + ElemValue: ElemValue, + validateKey: validateKey + }); + } + } + } catch (e) { + trace("validateFormatter-catch:662", e); + result = false; + } + + return result; + }, + //-------------------- validate check - formatter - message Set [E] ---------------------- + //-------------------- validate static 지원 함수 Set [S] --------------------------------- + getErrorMessage: function (errorMessagePattern) { + if (!this.errElements) { + return null; + } + if (this.errElements.length == 0) { + return "Err 메세지가 없습니다."; + } + var errObj = this.errElements.last(); + var errElement = errObj.element; + var messageConvert = this.messageConvert.bind(this); + var message = messageConvert(errElement, errObj.validateKey, errObj.validateVal); + + return message; + }, + getErrorElement: function () { + var cfg = this.config; + if (!this.errElements) { + return null; + } + if (this.errElements.length == 0) { + return null; + } + var errObj = this.errElements.last(); + var errElement = errObj.element; + return jQuery("#" + errElement.id).length > 0 ? jQuery("#" + errElement.id) : $(document[cfg.targetFormName][errElement.name]); + }, + getElement: function (elementObj) { + var cfg = this.config; + var element; + try { + if (elementObj.id) { + element = AXgetId(elementObj.id); + } else { + element = document[cfg.targetFormName][elementObj.name]; + } + } catch (e) { + return false; + } + if (element == null) { + AXUtil.alert((elementObj.id || elementObj.name) + " 객체를 확인하세요"); + return null; + } else { + return element; + } + }, + isActiveFormControl: function (element) { + if (!element) return false; + if (!(__rinput.test(element.type) || __rselectTextarea.test(element.type)) || element.disabled) return false; + return true; + }, + displayFormatter: function (elemValue, validateKey) { + if (elemValue == "" || elemValue == null) return ""; + + var value = elemValue; + var dataFormat = ""; + + if (value != "") { + if (validateKey == "phone") { + var pattern = /[^0-9]/g; + var parintPattern = ""; + value = value.replace(pattern, ""); + + //문자열 길이에 따른 값 처리 + if (value.length < 4) return value; + if (value.length > 3 && value.length < 7) { + dataFormat = "$1-$2"; + parintPattern = /([0-9]{3})([0-9]+)/; + } else if (value.length == 7) { + dataFormat = "$1-$2"; + parintPattern = /([0-9]{3})([0-9]{4})/; + } else if (value.length == 9) { + dataFormat = "$1-$2-$3"; + parintPattern = /([0-9]{2})([0-9]{3})([0-9]+)/; + } + else if (value.length == 10) { + if (value.substring(0, 2) == "02") { + dataFormat = "$1-$2-$3"; + parintPattern = /([0-9]{2})([0-9]{4})([0-9]+)/; + } else { + dataFormat = "$1-$2-$3"; + parintPattern = /([0-9]{3})([0-9]{3})([0-9]+)/; + } + } else if (value.length > 10) { + dataFormat = "$1-$2-$3"; + parintPattern = /([0-9]{3})([0-9]{4})([0-9]+)/; + } + value = value.replace(parintPattern, dataFormat); + + } else if (validateKey == "isdate") { + var pattern = /[^0-9]/g; + var parintPattern = ""; + + value = value.replace(pattern, ""); + if (value.length < 4) return value; + if (value.length > 4 && value.length < 7) { + dataFormat = "$1-$2"; + parintPattern = /([0-9]{4})([0-9]+)/; + } else if (value.length < 10) { + dataFormat = "$1-$2-$3"; + parintPattern = /([0-9]{4})([0-9]{2})([0-9]+)/; + } + value = value.replace(parintPattern, dataFormat); + } + else { + return ""; + } + } + + return value; + } + //-------------------- validate static 지원 함수 Set [E] --------------------------------- +}); +/* ---------------------------- */ +/* http://www.axisj.com, license : http://www.axisj.com/license */ + +var AXWaterfall = Class.create(AXJ, { + version: "AXWaterfall v1.1", + author: "tom@axisj.com", + logs: [ + "2012-10-11 오후 1:40:26", + "2013-11-07 오전 9:58:41 - tom : 최소사이즈 버그 픽스" + ], + initialize: function(AXJ_super) { + AXJ_super(); + this.CT_className = "AXWaterfall"; + this.I_className = "WaterBox"; + this.I_classNameMobile = "WaterBoxMobile"; + this.config.boxWidth = 224; + this.config.boxMargin = 10; + this.config.pageSize = 5; + this.config.mobileSize = 300; + this.config.autoResize = true; + this.Observer = null; + this.player = null; + this.played = false; + this.targetWidth = null; + }, + init: function(){ + var config = this.config; + if(Object.isUndefined(config.targetID)){ + trace("need targetID - setConfig({targetID:''})"); + return; + } + jQuery("#"+config.targetID).addClass(this.CT_className); + jQuery("#"+config.targetID).find("."+config.fallClassName).addClass(this.I_className); + + var bodyWidth = (AXUtil.docTD == "Q") ? document.body.clientWidth : document.documentElement.clientWidth; + this.targetWidth = bodyWidth; + jQuery("#"+config.targetID).css({width:"auto", minWidth:"auto", maxWidth:"auto"}); + + jQuery("#"+config.targetID).find("."+config.fallClassName).hide(); + + this.waterFall(); + this.bindEvent(); + }, + onresize: function(){ + var config = this.config; + var bodyWidth = (AXUtil.docTD == "Q") ? document.body.clientWidth : document.documentElement.clientWidth; + if(this.targetWidth == bodyWidth) return; + this.targetWidth = bodyWidth; + + jQuery("#"+config.targetID).css({width:"auto", minWidth:"auto", maxWidth:"auto"}); + if (this.Observer) clearTimeout(this.Observer); //닫기 명령 제거 + var waterFall = this.waterFall.bind(this); + this.Observer = setTimeout(function() { + jQuery("#"+config.targetID).find("."+config.fallClassName).hide(); + waterFall(); + }, 100); + }, + waterFall: function(){ + //if(this.played) return; + + var config = this.config; + var CTw = jQuery("#"+config.targetID).innerWidth() - config.boxMargin; + var CW = config.boxWidth + config.boxMargin + 2; + this.Clen = parseInt(CTw.div(CW)); + + var targetWidth = (CW * this.Clen); + if(targetWidth < CW){ + jQuery("#"+config.targetID).css({width:"auto"}); + }else{ + jQuery("#"+config.targetID).css({width:targetWidth+"px"}); + } + + if(this.Clen == 1){ + jQuery("#"+config.targetID).find("."+config.fallClassName).addClass(this.I_classNameMobile); + }else{ + jQuery("#"+config.targetID).find("."+config.fallClassName).removeClass(this.I_classNameMobile); + } + this.grid = []; + this.colsGrid = []; + for(var a=0;a O){ + minH = O; + minC = index; + c = index; + l = (index * config.boxWidth) + (config.boxMargin * index); + } + }); + t = minH + config.boxMargin; + } + if(AXgetId(boxID)){ + var myBox = jQuery("#"+boxID); + myBox.css({left:l, top:t}); + myBox.show(); + var et = t + myBox.outerHeight(); + this.grid.push({id:boxID, left:l, top:t, et:et, col:c}); + this.colsGrid[c] = et; + //trace({id:boxID, left:l, top:t, et:et, col:c}); + }else{ + break; + } + } + + //trace(pageNo+" == "+(this.itemLen / config.pageSize)); + + if((pageNo+1) > this.itemLen / config.pageSize){ + //play end + var maxH = null; + jQuery.each(this.colsGrid, function(index, O){ + if(maxH == null || maxH < O){ + maxH = O; + } + }); + var itemWidth = this.Clen * (config.boxWidth + config.boxMargin) - config.boxMargin; + var leftPadding = (jQuery("#"+config.targetID).innerWidth() - itemWidth) /2; + jQuery("#"+config.targetID).css({height:maxH+config.boxMargin}); + this.played = false; + }else{ + var playWaterFall = this.playWaterFall.bind(this); + this.player = setTimeout(function(){ + playWaterFall((pageNo+1)); + }, 10); + } + }, + + bindEvent: function(){ + var config = this.config; + if(this.config.autoResize) + jQuery(window).resize(this.onresize.bind(this)); + } +}); \ No newline at end of file diff --git a/dist/AXJ.min.js b/dist/AXJ.min.js new file mode 100644 index 00000000..d711eec2 --- /dev/null +++ b/dist/AXJ.min.js @@ -0,0 +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))}) +}},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 +},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