diff --git a/_src/admin/js/admin.js b/_src/admin/js/admin.js index 616c1e0..3c846c8 100644 --- a/_src/admin/js/admin.js +++ b/_src/admin/js/admin.js @@ -1,76 +1,58 @@ +/*********************************************************************************** + * 관리자 페이지 초기화 + ***********************************************************************************/ APP.init = function(){ - APP.initPage(); + APP.initAjaxDefaultSetting(); APP.initMenu(); - APP.initMask(); - APP.initModal(); + APP.initAx5(); APP.initPlugins(); APP.initCheckboxAll(); }; -APP.initPage = function(){ - if( $('body').height() < $(window).height() ) - { - $('html,body').css('height', '100%'); - } -}; - -APP.initMenu = function(){ - $('.btn-menu-toggle').click(function(e){ - $('#left-panel').toggleClass('opened'); - $('#left-panel').niceScroll().resize(); - }); - - - $('#main .main').niceScroll({ - cursorborder : "1px solid rgba(0,0,0, 0.15)", - cursorwidth : '12px', - cursorcolor : 'rgba(0,0,0, 0.5)' - }); - - $('#left-panel').niceScroll({ - cursorborder : "1px solid rgba(0,0,0, 0.15)", - cursorwidth : '12px', - cursorcolor : 'rgba(0,0,0, 0.5)' - }); - - $("#left-panel li").each(function(){ - if( $(this).data('active') && $(this).data('active') == menuActive) - { - $(this).addClass('active'); - $(this).parents('li').addClass('open'); - $(this).parents('ul').show(); +/*********************************************************************************** + * AJAX Error 및 BlockUI 처리 + ***********************************************************************************/ +APP.initAjaxDefaultSetting = function() { + $(document).ajaxError(function(event, request, settings){ + var message = '알수없는 오류가 발생하였습니다.'; + if( typeof request.responseJSON != 'undefined' && typeof request.responseJSON.message != 'undefined' ) { + message = request.responseJSON.message; + } + else { + if( request.status == 500 ) message = '서버 코드 오류가 발생하였습니다.\n관리자에게 문의하세요'; + else if ( request.status == 401 ) message = '해당 명령을 실행할 권한이 없습니다.'; } + toastr.error(message, '오류 발생'); + }).ajaxStart(function(){ + $.blockUI({ + css: {width:'25px',top:'49%',left:'49%',border:'0px none',backgroundColor:'transparent',cursor:'wait'}, + message : '', + baseZ : 10000, + overlayCSS : {opacity : 0} + }); + }).ajaxComplete(function(){ + $.unblockUI(); }); +}; - $('#left-panel #main-navigation a.parent').click(function(e){ - e.preventDefault(); - $(this).parent().toggleClass('open'); - $('#left-panel').niceScroll().resize(); +/*********************************************************************************** + * 메뉴관련 초기화 + ***********************************************************************************/ +APP.initMenu = function(){ + $('#nav .main-navigation li').each(function(){ + var $this = $(this); + var menuCode = $this.data('active'); + + if(menuCode == menuActive) + { + $(this).addClass('active'); + $(this).parents('li').addClass('active'); + } }); }; APP.initPlugins = function() { - - $.datepicker.regional['ko'] = { - closeText: '닫기', - prevText: '이전달', - nextText: '다음달', - currentText: '오늘', - monthNames: ['1월','2월','3월','4월','5월','6월', '7월','8월','9월','10월','11월','12월'], - monthNamesShort: ['1월','2월','3월','4월','5월','6월', '7월','8월','9월','10월','11월','12월'], - dayNames: ['일','월','화','수','목','금','토'], - dayNamesShort: ['일','월','화','수','목','금','토'], - dayNamesMin: ['일','월','화','수','목','금','토'], - weekHeader: 'Wk', - dateFormat: 'yy-mm-dd', - firstDay: 0, - isRTL: false, - showMonthAfterYear: true, - yearSuffix: '' - }; - - $.datepicker.setDefaults($.datepicker.regional['ko']); - + /* $('[data-toggle="datepicker"]').datepicker(); $("body").on("click", '[data-toggle="datepicker"]', function(){ @@ -95,6 +77,7 @@ APP.initPlugins = function() { $('[data-toggle="datetimepicker"]').datetimepicker({ format:'Y-m-d H:i' }); + */ }; APP.initCheckboxAll = function(){ @@ -117,19 +100,13 @@ APP.initCheckboxAll = function(){ /********************************************************************************************************************** * MODAL 관련 *********************************************************************************************************************/ -APP.MASK = null; -APP.MASK2 = null; -APP.modal = null; -APP.modal2 = null; -APP.initMask = function(){ +APP.initAx5 = function(){ APP.MASK = new ax5.ui.mask({ - zIndex: 1000 - }); + zIndex: 1000} + ); APP.MASK2 = new ax5.ui.mask({ zIndex: 2000 }); -}; -APP.initModal = function() { APP.modal = new ax5.ui.modal({ absolute: true, iframeLoadingMsg: '' @@ -138,201 +115,12 @@ APP.initModal = function() { absolute: true, iframeLoadingMsg: '' }); -}; -APP.MODAL = function() { - var modalCallback = {}; - - var defaultCss = { - width: 400, - height: 400, - position: { - left: "center", - top: "middle" - } - }; - - var defaultOption = $.extend(true, {}, defaultCss, { - iframeLoadingMsg: "", - iframe: { - method: "get", - url: "#" - }, - closeToEsc: true, - onStateChanged: function onStateChanged() { - // mask - if (this.state === "open") { - APP.MASK.open(); - } else if (this.state === "close") { - APP.MASK.close(); - } - }, - animateTime: 100, - zIndex: 1001, - absolute: true, - fullScreen: false, - header: { - title: "새로운 윈도우", - btns: { - close: { - label: '', onClick: function onClick() { - APP.MODAL.callback(); - } - } - } - } - }); - - var open = function(modalConfig) { - - modalConfig = $.extend(true, {}, defaultOption, modalConfig); - $(document.body).addClass("modalOpened"); - - this.modalCallback = modalConfig.callback; - this.modalSendData = modalConfig.sendData; - - APP.modal.open(modalConfig); - }; - - var css = function css(modalCss) { - modalCss = $.extend(true, {}, defaultCss, modalCss); - APP.modal.css(modalCss); - }; - var align = function align(modalAlign) { - APP.modal.align(modalAlign); - }; - var close = function close(data) { - APP.modal.close(); - setTimeout(function () { - $(document.body).removeClass("modalOpened"); - }, 500); - }; - var minimize = function minimize() { - APP.modal.minimize(); - }; - var maximize = function maximize() { - APP.modal.maximize(); - }; - var callback = function callback(data) { - if (this.modalCallback) { - this.modalCallback(data); - } - this.close(data); - }; - var getData = function getData() { - if (this.modalSendData) { - return this.modalSendData(); - } - }; - - return { - "open": open, - "css": css, - "align": align, - "close": close, - "minimize": minimize, - "maximize": maximize, - "callback": callback, - "modalCallback": modalCallback, - "getData": getData - }; -}(); -APP.MODAL2 = function() { - var modalCallback = {}; - - var defaultCss = { - width: 400, - height: 400, - position: { - left: "center", - top: "middle" - } - }; - - var defaultOption = $.extend(true, {}, defaultCss, { - iframeLoadingMsg: "", - iframe: { - method: "get", - url: "#" - }, - closeToEsc: true, - onStateChanged: function onStateChanged() { - // mask - if (this.state === "open") { - APP.MASK2.open(); - } else if (this.state === "close") { - APP.MASK2.close(); - } - }, - animateTime: 100, - zIndex: 2001, - absolute: true, - fullScreen: false, - header: { - title: "새로운 윈도우", - btns: { - close: { - label: '', onClick: function onClick() { - APP.MODAL2.callback(); - } - } - } - } + APP.toast = new ax5.ui.toast({ + containerPosition: "top-right", + closeIcon: '' }); +}; - var open = function(modalConfig) { - - modalConfig = $.extend(true, {}, defaultOption, modalConfig); - $(document.body).addClass("modalOpened"); - - this.modalCallback = modalConfig.callback; - this.modalSendData = modalConfig.sendData; - - APP.modal2.open(modalConfig); - }; - - var css = function css(modalCss) { - modalCss = $.extend(true, {}, defaultCss, modalCss); - APP.modal2.css(modalCss); - }; - var align = function align(modalAlign) { - APP.modal2.align(modalAlign); - }; - var close = function close(data) { - APP.modal2.close(); - setTimeout(function () { - $(document.body).removeClass("modalOpened"); - }, 500); - }; - var minimize = function minimize() { - APP.modal2.minimize(); - }; - var maximize = function maximize() { - APP.modal2.maximize(); - }; - var callback = function callback(data) { - if (this.modalCallback) { - this.modalCallback(data); - } - this.close(data); - }; - var getData = function getData() { - if (this.modalSendData) { - return this.modalSendData(); - } - }; - - return { - "open": open, - "css": css, - "align": align, - "close": close, - "minimize": minimize, - "maximize": maximize, - "callback": callback, - "modalCallback": modalCallback, - "getData": getData - }; -}(); $(function(){ APP.init(); diff --git a/_src/admin/js/modules/components.js b/_src/admin/js/modules/components.js new file mode 100644 index 0000000..e4b0166 --- /dev/null +++ b/_src/admin/js/modules/components.js @@ -0,0 +1,163 @@ +/* ======================================================================== + * Bootstrap: dropdown.js v3.3.7 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle="dropdown"]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.VERSION = '3.3.7' + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + function clearMenus(e) { + if (e && e.which === 3) return + $(backdrop).remove() + $(toggle).each(function () { + var $this = $(this) + var $parent = getParent($this) + var relatedTarget = { relatedTarget: this } + + if (!$parent.hasClass('open')) return + + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this.attr('aria-expanded', 'false') + $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) + }) + } + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $(document.createElement('div')) + .addClass('dropdown-backdrop') + .insertAfter($(this)) + .on('click', clearMenus) + } + + var relatedTarget = { relatedTarget: this } + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this + .trigger('focus') + .attr('aria-expanded', 'true') + + $parent + .toggleClass('open') + .trigger($.Event('shown.bs.dropdown', relatedTarget)) + } + + return false + } + + Dropdown.prototype.keydown = function (e) { + if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return + + var $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + if (!isActive && e.which != 27 || isActive && e.which == 27) { + if (e.which == 27) $parent.find(toggle).trigger('focus') + return $this.trigger('click') + } + + var desc = ' li:not(.disabled):visible a' + var $items = $parent.find('.dropdown-menu' + desc) + + if (!$items.length) return + + var index = $items.index(e.target) + + if (e.which == 38 && index > 0) index-- // up + if (e.which == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items.eq(index).trigger('focus') + } + + + // DROPDOWN PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.dropdown') + + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + var old = $.fn.dropdown + + $.fn.dropdown = Plugin + $.fn.dropdown.Constructor = Dropdown + + + // DROPDOWN NO CONFLICT + // ==================== + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + // APPLY TO STANDARD DROPDOWN ELEMENTS + // =================================== + + $(document) + .on('click.bs.dropdown.data-api', clearMenus) + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) + .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) + .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) + +}(jQuery); \ No newline at end of file diff --git a/_src/admin/js/modules/modal.js b/_src/admin/js/modules/modal.js new file mode 100644 index 0000000..11bcd09 --- /dev/null +++ b/_src/admin/js/modules/modal.js @@ -0,0 +1,194 @@ +APP.MODAL = function() { + var modalCallback = {}; + + var defaultCss = { + width: 400, + height: 400, + position: { + left: "center", + top: "middle" + } + }; + + var defaultOption = $.extend(true, {}, defaultCss, { + iframeLoadingMsg: "", + iframe: { + method: "get", + url: "#" + }, + closeToEsc: true, + onStateChanged: function onStateChanged() { + // mask + if (this.state === "open") { + APP.MASK.open(); + } else if (this.state === "close") { + APP.MASK.close(); + } + }, + animateTime: 100, + zIndex: 1001, + absolute: true, + fullScreen: false, + header: { + title: "새로운 윈도우", + btns: { + close: { + label: '', onClick: function onClick() { + APP.MODAL.callback(); + } + } + } + } + }); + + var open = function(modalConfig) { + + modalConfig = $.extend(true, {}, defaultOption, modalConfig); + $(document.body).addClass("modalOpened"); + + this.modalCallback = modalConfig.callback; + this.modalSendData = modalConfig.sendData; + + APP.modal.open(modalConfig); + }; + + var css = function css(modalCss) { + modalCss = $.extend(true, {}, defaultCss, modalCss); + APP.modal.css(modalCss); + }; + var align = function align(modalAlign) { + APP.modal.align(modalAlign); + }; + var close = function close(data) { + APP.modal.close(); + setTimeout(function () { + $(document.body).removeClass("modalOpened"); + }, 500); + }; + var minimize = function minimize() { + APP.modal.minimize(); + }; + var maximize = function maximize() { + APP.modal.maximize(); + }; + var callback = function callback(data) { + if (this.modalCallback) { + this.modalCallback(data); + } + this.close(data); + }; + var getData = function getData() { + if (this.modalSendData) { + return this.modalSendData(); + } + }; + + return { + "open": open, + "css": css, + "align": align, + "close": close, + "minimize": minimize, + "maximize": maximize, + "callback": callback, + "modalCallback": modalCallback, + "getData": getData + }; +}(); +APP.MODAL2 = function() { + var modalCallback = {}; + + var defaultCss = { + width: 400, + height: 400, + position: { + left: "center", + top: "middle" + } + }; + + var defaultOption = $.extend(true, {}, defaultCss, { + iframeLoadingMsg: "", + iframe: { + method: "get", + url: "#" + }, + closeToEsc: true, + onStateChanged: function onStateChanged() { + // mask + if (this.state === "open") { + APP.MASK2.open(); + } else if (this.state === "close") { + APP.MASK2.close(); + } + }, + animateTime: 100, + zIndex: 2001, + absolute: true, + fullScreen: false, + header: { + title: "새로운 윈도우", + btns: { + close: { + label: '', onClick: function onClick() { + APP.MODAL2.callback(); + } + } + } + } + }); + + var open = function(modalConfig) { + + modalConfig = $.extend(true, {}, defaultOption, modalConfig); + $(document.body).addClass("modalOpened"); + + this.modalCallback = modalConfig.callback; + this.modalSendData = modalConfig.sendData; + + APP.modal2.open(modalConfig); + }; + + var css = function css(modalCss) { + modalCss = $.extend(true, {}, defaultCss, modalCss); + APP.modal2.css(modalCss); + }; + var align = function align(modalAlign) { + APP.modal2.align(modalAlign); + }; + var close = function close(data) { + APP.modal2.close(); + setTimeout(function () { + $(document.body).removeClass("modalOpened"); + }, 500); + }; + var minimize = function minimize() { + APP.modal2.minimize(); + }; + var maximize = function maximize() { + APP.modal2.maximize(); + }; + var callback = function callback(data) { + if (this.modalCallback) { + this.modalCallback(data); + } + this.close(data); + }; + var getData = function getData() { + if (this.modalSendData) { + return this.modalSendData(); + } + }; + + return { + "open": open, + "css": css, + "align": align, + "close": close, + "minimize": minimize, + "maximize": maximize, + "callback": callback, + "modalCallback": modalCallback, + "getData": getData + }; +}(); \ No newline at end of file diff --git a/_src/admin/js/modules/toast.js b/_src/admin/js/modules/toast.js new file mode 100644 index 0000000..4b4332f --- /dev/null +++ b/_src/admin/js/modules/toast.js @@ -0,0 +1,23 @@ +APP.TOAST = { + confirm : function(msg) { + APP.toast.push({ + theme : 'default', + icon : '', + msg : msg + }); + }, + error : function(msg) { + APP.toast.push({ + theme : 'danger', + icon : '', + msg : msg + }); + }, + success: function(msg) { + APP.toast.push({ + theme : 'success', + icon : '', + msg : msg + }) + } +}; \ No newline at end of file diff --git a/_src/admin/scss/_variables.scss b/_src/admin/scss/_variables.scss index 65c82a7..3dc4cf5 100644 --- a/_src/admin/scss/_variables.scss +++ b/_src/admin/scss/_variables.scss @@ -1,15 +1,26 @@ +// 반응형 포인트 +$break-desktop : 1200px; +$break-tablet : 992px; +$break-mobile : 768px; + // 색상 변수 -$color-primary : #282828; // 메인 컬러 -$color-secondary : #282828; // 서브 컬러 +$color-primary : #5399ea; // 메인 컬러 +$color-secondary : #404040; // 서브 컬러 +$color-success : #1ffd32; +$color-info : #3498db; +$color-warning : #ffb802; +$color-danger : #e32815; +$color-light : #f8f9fa; +$color-dark : #343a40; -$body-color : #212529; // 기본 텍스트 색상 -$body-bg-color : #FFFFFF; // 기본 배경 색상 +$body-color : #282828; // 기본 텍스트 색상 +$body-bg-color : #f4f8f9; // 기본 배경 색상 $link-color : $body-color; // 링크 텍스트 색상 $link-hover-color : $color-primary; // 링크 오버시 텍스트 색상 // 폰트 관련 -$font-family-base : 나눔고딕,NanumGothic,NanumGothicWeb,'나눔 고딕',sans-serif; // 기본글자에 사용 되는 폰트 +$font-family-base : 'Noto Sans KR',sans-serif; // 기본글자에 사용 되는 폰트 $font-family-heading : $font-family-base; // 헤딩태그에 사용 되는 폰트 $font-size-base : 14px; $font-weight-base : 400; @@ -19,39 +30,50 @@ $line-height-base : 1.5em; // 애니메이션 $default-animation : ease; -// 반응형 포인트 -$break-desktop : 1200px; -$break-tablet : 992px; -$break-mobile : 768px; - // 테이블 관련 $table-cell-padding: .75rem !default; $table-cell-padding-sm: .3rem !default; -// Default Button 색상 지정 -$btn-default-text : #242424; -$btn-default-bg : #fff; -$btn-default-border : #8f8f8f; -$btn-default-hover-bg : #e6e6e6; -$btn-default-hover-border : #4f4f4f; - -// Primary Button 색상 지정 -$btn-primary-text : #fff; -$btn-primary-bg : #3498db; -$btn-primary-border : #616161; -$btn-primary-hover-bg : #256d9c; -$btn-primary-hover-border : #000; - -// Warning Button 색상 지정 -$btn-warning-text : #242424; -$btn-warning-bg : #FFB802; -$btn-warning-border : #b58200; -$btn-warning-hover-bg : #ce9400; -$btn-warning-hover-border : #352600; - -// Danger Button 색상 지정 -$btn-danger-text : #fff; -$btn-danger-bg : #e32815; -$btn-danger-border : #e37170; -$btn-danger-hover-bg : #e34249; -$btn-danger-hover-border : #e37170; +// 버튼 및 INPUT +$input-btn-padding-y : $font-size-base * 0.375 !default; // 상하 +$input-btn-padding-x : $font-size-base * 0.75 !default; // 좌우 +$input-btn-font-size : $font-size-base !default; +$input-btn-line-height: $line-height-base !default; +$input-btn-border-radius : 4px !default; + +$input-btn-padding-y-xs: $font-size-base * 0.125 !default; +$input-btn-padding-x-xs: $font-size-base * 0.25 !default; +$input-btn-font-size-xs: $font-size-base * 0.75 !default; +$input-btn-line-height-xs: $line-height-base !default; +$input-btn-border-radius-xs : 2px !default; + +$input-btn-padding-y-sm: $font-size-base * 0.25 !default; +$input-btn-padding-x-sm: $font-size-base * 0.5 !default; +$input-btn-font-size-sm: $font-size-base * 0.875 !default; +$input-btn-line-height-sm: $line-height-base !default; +$input-btn-border-radius-sm : 3px !default; + +$input-btn-padding-y-lg: $font-size-base * 0.5 !default; +$input-btn-padding-x-lg: $font-size-base !default; +$input-btn-font-size-lg: $font-size-base * 1.25 !default; +$input-btn-line-height-lg: $line-height-base !default; +$input-btn-border-radius-lg : 6px !default; + +$theme-colors: () !default; +$theme-colors: map-merge(( + "primary": $color-primary, + "secondary": $color-secondary, + "success": $color-success, + "info": $color-info, + "warning": $color-warning, + "danger": $color-danger, + "light" : $color-light, + "dark" : $color-dark, + "default" : $color-light +), $theme-colors); + +$brand-primary : $color-primary; +$brand-success : $color-success; +$brand-info : $color-info; +$brand-warning : $color-warning; +$brand-danger : $color-danger; diff --git a/_src/admin/scss/admin.scss b/_src/admin/scss/admin.scss index 56998fb..1852b9f 100644 --- a/_src/admin/scss/admin.scss +++ b/_src/admin/scss/admin.scss @@ -13,21 +13,27 @@ // 각종 컴포넌트 @import "components/buttons"; +@import "components/dropdown"; @import "components/grid"; @import "components/form"; // 각종 플러그인 SCSS 및 플러그인 커스텀 -@import "plugins/bootstrap_custom"; @import "plugins/jquery_ui"; -@import "plugins/plugins_custom"; -@import "plugins/toastr"; @import "plugins/fontawesome5/fontawesome"; @import "plugins/fontawesome5/fa-regular"; @import "plugins/fontawesome5/fa-light"; @import "plugins/fontawesome5/fa-solid"; @import "plugins/fontawesome5/fa-brands"; -@import "plugins/modal"; @import "plugins/jquery.datetimepicker.css"; +@import "plugins/ax5ui/ax5"; +@import "plugins/ax5ui/ax5grid"; +@import "plugins/ax5ui/ax5mask"; +@import "plugins/ax5ui/ax5modal"; +@import "plugins/ax5ui/ax5toast"; +@import "plugins/ax5ui/ax5calendar"; +@import "plugins/ax5ui/ax5picker"; +@import "plugins/plugins_custom"; // 각 페이지 SCSS 파일 @import "pages/login"; + diff --git a/_src/admin/scss/boot/_function.scss b/_src/admin/scss/boot/_function.scss index e69de29..00bb815 100644 --- a/_src/admin/scss/boot/_function.scss +++ b/_src/admin/scss/boot/_function.scss @@ -0,0 +1,13 @@ +@function color-yiq($color, $dark: #212529, $light: #fff) { + $r: red($color); + $g: green($color); + $b: blue($color); + + $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + + @if ($yiq >= 150) { + @return #343a40; + } @else { + @return #f8f9fa; + } +} diff --git a/_src/admin/scss/boot/_mixins.scss b/_src/admin/scss/boot/_mixins.scss index da985b3..0d13112 100644 --- a/_src/admin/scss/boot/_mixins.scss +++ b/_src/admin/scss/boot/_mixins.scss @@ -1,7 +1,34 @@ -@mixin admin_clearfix{ - display:table; - content:''; +// Clear FIX +@mixin clear-fix() { + display:block; clear:both; + content:""; +} + +@mixin clear-fix-after() { + &:after { + display:block; + clear:both; + content:""; + } +} + +// Global Transition +@mixin transition($second:.3s, $target:all, $animation:$default-animation) +{ + -webkit-transition: $target $second $animation; + -moz-transition: $target $second $animation; + -ms-transition: $target $second $animation; + -o-transition: $target $second $animation; + transition: $target $second $animation; +} + +// Display flex & Prefix +@mixin display-flex() +{ + -webkit-display:flex; + display:-ms-flex; + display:flex; } @mixin background-gradient($start, $end ) @@ -11,44 +38,46 @@ background-image: linear-gradient(to bottom,$start, $end); } -@mixin button-generator($txt-color, $bg-color, $border-color, $hover-color, $hover-border-color ) -{ - color: $txt-color; - background-color: $bg-color; - border-color: $border-color; - - &:focus, &.focus { - color: $txt-color; - background-color: $hover-color; - border-color: $border-color; - } +@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { + padding: $padding-y $padding-x; + font-size: $font-size; + line-height: $line-height; + border-radius: $border-radius; +} + +@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) { + color: color-yiq($background); + background-color:$background; + border-color: $border; + &:hover { - color: $txt-color; - background-color: $hover-color; - border-color: $hover-border-color; - } - &:active, &.active, .open > &.dropdown-toggle { - color: $txt-color; - background-color: $hover-color; - border-color: $hover-border-color; + color: color-yiq($hover-background); + background-color :$hover-background; + border-color: $hover-border; } - &:active:hover, &:active:focus, &:active.focus, &.active:hover, &.active:focus, &.active.focus, .open > &.dropdown-toggle:hover, .open > &.dropdown-toggle:focus, .open > &.dropdown-toggle.focus { - color: $txt-color; - background-color: $hover-color; - border-color: $hover-border-color; - } + &:focus, + &.focus { - &:active, &.active, .open > &.dropdown-toggle { - background-image: none; } - &.disabled:hover, &.disabled:focus, &.disabled.focus, &[disabled]:hover, &[disabled]:focus, &[disabled].focus, fieldset[disabled] &:hover, fieldset[disabled] &:focus, fieldset[disabled] &.focus { - background-color: #fff; - border-color: #8f8f8f; + // Disabled comes first so active can properly restyle + &.disabled, + &:disabled { + color: color-yiq($background); + background-color: $background; + border-color: $border; } - .badge { - color: #fff; background-color: #242424; + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active, + .show > &.dropdown-toggle { + color: color-yiq($active-background); + background-color: $active-background; + border-color: $active-border; + + &:focus { + + } } -} \ No newline at end of file +} diff --git a/_src/admin/scss/common/_layout.scss b/_src/admin/scss/common/_layout.scss index 305590d..bcf12ee 100644 --- a/_src/admin/scss/common/_layout.scss +++ b/_src/admin/scss/common/_layout.scss @@ -1,297 +1,208 @@ -html, body { - min-height:100%; + height:100vh; } +$header-height : 50px; +$nav-height : 59px; -body, -html, -input, -select, -button, -textarea { - font-family: Roboto, "Spoqa Han Sans", "Spoqa Han Sans JP", Sans-serif; -} - - -.application { - position:absolute; - top:0; - left:0; - right:0; - bottom:0; - -webkit-display:flex; - display:flex; - flex-direction: column; -} - -.background-container { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; - background-color: #3f4245; - - .bg-1 { - background-image: url(../images/admin/bg-dark.png); - background-size: cover; - background-position: center center; - background-repeat: no-repeat; - width: 100%; - height: 100%; - position: absolute; - z-index: 2; - } - - .bg-2 { - position: absolute; - width: 100%; - height: 100%; - background: url(../images/admin/bg-noise.png); - z-index: 2; - } -} - -#nav-bar { - flex-grow: 0; - flex-shrink: 0; - z-index: 1000; - background-color: rgba(0,0,0,.7); - height:60px; - width:100%; +#header { + position:relative; + @include display-flex(); + height:$header-height; + background: #5399ea; /* Old browsers */ + background: -moz-linear-gradient(left, #5399ea 0%, #5ec0cc 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(left, #5399ea 0%,#5ec0cc 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to right, #5399ea 0%,#5ec0cc 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5399ea', endColorstr='#5ec0cc',GradientType=1 ); /* IE6-9 */ + padding:0 30px; + z-index:101; + align-items: center; .logo { - display:flex; - height:60px; - //background:rgba(0,0,0,.7); + display:block; color:#fff; - font-weight:900; - font-size:20px; - justify-content: center; - align-items: center; - text-decoration: none; - width:200px; + font-size:19px; } - - .btn-menu-toggle { - display:none; - @media screen and (max-width:768px) { - display:block; - position:fixed; - right:15px; - top:15px; - font-size:24px; - background:transparent; - border:0; - color:#fff; - } + .top-navs { + -ms-flex:1; + -webkit-flex:1; + flex:1; } - .btn-logout { - position:fixed; - right:15px; - top:15px; - font-size:24px; + + .btn-top-action { + padding:14px; + cursor:pointer; background:transparent; - border:0; + position:relative; color:#fff; + border:0 none; + outline:none !important; + font-size:13px; - @media screen and (max-width:768px) { - display:none; + i { + font-size:20px; + vertical-align: middle; } } -} - -#content { - position: relative; - flex-grow: 1; - overflow: hidden; - -webkit-overflow-scrolling: touch; - display:flex; - - #left-panel { - width:200px; - overflow:hidden; - background-color: rgba(0,0,0,.15); - - @media screen and (max-width:768px) { - width:0px; - - &.opened { - width:100%; - position: absolute; - z-index: 100; - background: #000; + .btn-user { + display:inline-block; + + .btn-top-action { + + &:after { + content:"\f107"; + font-family:'Font Awesome 5 Pro'; + position:absolute; + right:0px; + top:50%; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); } } + } +} - #main-navigation { - list-style:none; - padding:0; - margin:0; - - > li { - display:block; +#nav { + position:relative; + z-index: 100; + width: 100%; + height: $nav-height; + background-color: #ffffff; + border-bottom: 1px solid #e6e6e6; + padding:0 30px; + + .main-navigation { + @include display-flex(); + height:$nav-height; + padding:0; + margin:0; + list-style:none; + flex-wrap:wrap; + + > li { + display:block; + position:relative; + margin-right:30px; + + > a { + @include display-flex(); + height:$nav-height; + justify-content: center; + align-items: center; + color:#282828; + font-size:0; + font-weight:500; + padding-left:0; + padding-right:45px; position:relative; - -webkit-transition: all .2s ease; - -moz-transition: all .2s ease; - -ms-transition: all .2s ease; - -o-transition: all .2s ease; - transition: all .2s ease; - &:first-child { - border-top: 0; + &:after { + content:"\f107"; + font-family:'Font Awesome 5 Pro'; + position:absolute; + font-size:15px; + right:15px; + top:50%; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); } - > a { - display:block; - padding:20px 10px; - color:#c8c8c8; - border-left:2px solid #293242; - font-size:14px; - text-decoration: none; - -webkit-transition: all .2s ease; - -moz-transition: all .2s ease; - -ms-transition: all .2s ease; - -o-transition: all .2s ease; - transition: all .2s ease; + i, span { + font-size:15px; + } - > i { - margin-right:5px; - } + i + span { + margin-left:6px; + } + } - &:after { - content:"\f105"; - font-family:'Font Awesome 5 Pro'; - position:absolute; right:20px; top:20px; - -webkit-transition: all .2s ease; - -moz-transition: all .2s ease; - -ms-transition: all .2s ease; - -o-transition: all .2s ease; - transition: all .2s ease; - } + &.active { + > a { + color:$color-primary; } + } - > ul { - height:0; - visibility: hidden; - opacity:0; - margin:0; - padding:0; - list-style:none; - -webkit-transition: all .2s ease; - -moz-transition: all .2s ease; - -ms-transition: all .2s ease; - -o-transition: all .2s ease; - transition: all .2s ease; + > ul { + height:0; + visibility: hidden; + opacity:0; + z-index:101; + position:absolute; + top:100%; + left:0; + width:130px; + background:#fff; + list-style:none; + padding:0; + margin:0; + border:1px solid #767676; + + li { + display:block; - > li { + a { display:block; - //border-top:1px solid rgba(#ccc,0.4); - - > a { - padding:15px 25px; - display:block; - color:#c8c8c8; - text-decoration:none; - - background: rgba(0,0,0,0.4); - } - - &:hover > a { - color:#fff; - } + padding:12px 15px; + font-size:13px; + color:#282828; + cursor:pointer; - &.active { - > a { - background:#fff; - color:#282828; - } + &:hover { + background-color:#f4f8f9; } - } - } - - &.open { - - > a:after { - -webkit-transform: rotate(90deg); - -moz-transform:rotate(90deg); - transform:rotate(90deg); - } - - > ul { - height:auto; - visibility: visible; - opacity:1; + &.active { + a { + background-color:#f4f8f9; + color:$color-primary; + } } } + } - &:active > a, - &:hover > a { - border-color:#96ddfe; - color:#f1f3f6; + &:hover { + > ul { + height:auto; + visibility: visible; + opacity:1; + -webkit-transition: visibility .3s, opacity .3s; + -moz-transition: visibility .3s, opacity .3s; + -ms-transition: visibility .3s, opacity .3s; + -o-transition: visibility .3s, opacity .3s; + transition: visibility .3s, opacity .3s; } - } } } - - #main { - -webkit-flex:1; - flex:1; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - flex-grow: 1; - position:relative; - color:#fff; - - .main { - padding:15px; - height:100%; - overflow-x:hidden; - overflow-y:scroll; - } - } } -#header { - background:#3498db; - >:first-child { - background:#3498db; - } -} - -.frame-content { - background-color:#3f4245; - min-height:100%; - color:#fff; - padding:15px; +#contents { + padding:30px; + height: calc(100vh - #{$header-height} - #{$nav-height}); + overflow-y:auto; } .page-header { - -webkit-display:flex; - display:flex; - background-color: rgba(0,0,0,.15); - border:0px; - color: hsla(0,0%,100%,.7); - margin:-15px -15px 15px; - padding:0px 15px; - height:60px; - justify-content: left; - align-items: center; - z-index:10; - - @media screen and (max-width:768px) { - left:0px; - } + margin-bottom:30px; .page-title { - margin:0px; - font-size:18px; + font-size:23px; + font-weight:500; + color:#282828; + + small { + color:#767676; + font-size:12px; + margin-left:15px; + } } } \ No newline at end of file diff --git a/_src/admin/scss/common/_utility.scss b/_src/admin/scss/common/_utility.scss index ef77f61..26472ed 100644 --- a/_src/admin/scss/common/_utility.scss +++ b/_src/admin/scss/common/_utility.scss @@ -47,4 +47,16 @@ .P#{$i * 5} { padding:5px * $i; } +} + +.text-center { + text-align:center !important; +} + +.text-left { + text-align:left !important; +} + +.text-right { + text-align:right !important; } \ No newline at end of file diff --git a/_src/admin/scss/components/_buttons.scss b/_src/admin/scss/components/_buttons.scss index 7bee3e8..3bde098 100644 --- a/_src/admin/scss/components/_buttons.scss +++ b/_src/admin/scss/components/_buttons.scss @@ -1,111 +1,87 @@ .btn { display: inline-block; - margin-bottom: 0; - font-weight: 500; + font-weight: 400; + color: $body-color; text-align: center; vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 3px 7px; - font-size: 13px; - line-height: 1.42857; - border-radius: 5px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; + background-color: transparent; + border: 1px solid transparent; + @include button-size( $input-btn-padding-y , $input-btn-padding-x, $input-btn-font-size, $input-btn-line-height, $input-btn-border-radius ); + @include transition(); - &:focus, - &.focus, - &:active:focus, - &:active.focus, - &.active:focus, - &.active.focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; + &:hover { + color: $body-color; + text-decoration: none; } - &:hover, &:focus, &.focus { - color: #242424; - text-decoration: none; - } - - &:active, - &.active { outline: 0; - background-image: none; - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow:none; } &.disabled, - &[disabled], - fieldset[disabled] & { - cursor: not-allowed; opacity: 0.65; filter: alpha(opacity=65); box-shadow: none; + &:disabled { + opacity: 0.4; + box-shadow:none; } - &a.disabled, - fieldset[disabled] &a { - pointer-events: none; + &:not(:disabled):not(.disabled) { + cursor: pointer; } - &.btn-default, - &.btn-white { - @include button-generator(#fff, hsla(0,0%,100%,.25), transparent, hsla(0,0%,100%,.3), transparent); - } + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active { + &:focus { - &.btn-primary { - @include button-generator(#fff, #cc7b19, transparent, #b56d16, transparent); + } } +} - &.btn-warning { - @include button-generator($btn-warning-text, $btn-warning-bg, $btn-warning-border, $btn-warning-hover-bg, $btn-warning-hover-border); - } +// Future-proof disabling of clicks on `` elements +a.btn.disabled, +fieldset:disabled a.btn { + pointer-events: none; +} - &.btn-danger { - @include button-generator($btn-danger-text, $btn-danger-bg, $btn-danger-bg, $btn-danger-hover-bg, $btn-danger-hover-bg); +@each $color, $value in $theme-colors { + .btn-#{$color} { + @include button-variant($value, $value); } +} - &.btn-lg, - .btn-group-lg > & { - padding: 6px 12px; - font-size: 17px; - line-height: 1.33333; - border-radius: 5px; - } +.btn-xs { + @include button-size($input-btn-padding-y-xs, $input-btn-padding-x-xs, $input-btn-font-size-xs, $input-btn-line-height-xs, $input-btn-border-radius-xs); +} - &.btn-sm, - .btn-group-sm > & { - padding: 2px 4px; - font-size: 12px; - line-height: 1.5; - border-radius: 2px; - } +.btn-lg { + @include button-size($input-btn-padding-y-lg, $input-btn-padding-x-lg, $input-btn-font-size-lg, $input-btn-line-height-lg, $input-btn-border-radius-lg); +} - &.btn-xs, - .btn-group-xs > & { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 2px; - } +.btn-sm { + @include button-size($input-btn-padding-y-sm, $input-btn-padding-x-sm, $input-btn-font-size-sm, $input-btn-line-height-sm, $input-btn-border-radius-sm); +} - &.btn-block { - display:block; - width:100%; +.btn-block { + display: block; + width: 100%; - + .btn-block { - margin-top: 5px; - } + + .btn-block { + margin-top: 10px; + } +} - &input[type="submit"], - &input[type="reset"], - &input[type="button"] { - width: 100%; - } +// Specificity overrides +input[type="submit"], +input[type="reset"], +input[type="button"] { + &.btn-block { + width: 100%; } } + +.btn-group { + display:inline-block; + position:relative; +} \ No newline at end of file diff --git a/_src/admin/scss/components/_dropdown.scss b/_src/admin/scss/components/_dropdown.scss new file mode 100644 index 0000000..b84ccf2 --- /dev/null +++ b/_src/admin/scss/components/_dropdown.scss @@ -0,0 +1,122 @@ + +// The dropdown wrapper (div) +.dropup, +.dropdown { + position: relative; +} + +// Prevent the focus on the dropdown toggle when closing dropdowns +.dropdown-toggle:focus { + outline: 0; +} + +// The dropdown menu (ul) +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000 ; + display: none; + float: left; + min-width: 160px; + padding: 0; + margin: 0; + list-style: none; + font-size: $font-size-base; + text-align: left; + background-color: #fff; + border: 1px solid #767676; + border-radius: 0; + -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); + -moz-box-shadow: 0 6px 12px rgba(0,0,0,.175); + box-shadow: 0 6px 12px rgba(0,0,0,.175); + background-clip: padding-box; + + &.pull-right { + right: 0; + left: auto; + } + + .divider { + + } + + // Links within the dropdown menu + > li > a { + display: block; + padding:12px 15px; + font-size:13px; + clear: both; + font-weight: normal; + line-height: $line-height-base; + color: $body-color; + white-space: nowrap; // prevent links from randomly breaking onto new lines + } +} + +// Hover/Focus state +.dropdown-menu > li > a { + &:hover, + &:focus { + text-decoration: none; + color: $color-primary ; + background-color: #f4f8f9; + } +} + +// Active state +.dropdown-menu > .active > a { + &, + &:hover, + &:focus { + color: $color-primary; + text-decoration: none; + outline: 0; + background-color: #f4f8f9; + } +} + +// Open state for the dropdown +.open { + + > .dropdown-menu { + display: block; + } + + > a { + outline: 0; + } +} + +.dropdown-menu-right { + left: auto; + right: 0; +} + +.dropdown-menu-left { + left: 0; + right: auto; +} + +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 990; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup, +.navbar-fixed-bottom .dropdown { + .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; + } +} diff --git a/_src/admin/scss/components/_form.scss b/_src/admin/scss/components/_form.scss index 01e2f58..3bcc434 100644 --- a/_src/admin/scss/components/_form.scss +++ b/_src/admin/scss/components/_form.scss @@ -1,5 +1,6 @@ -/* 버튼그룹 */ + +//버튼그룹 .ax-button-group { display: table; width: 100%; @@ -56,10 +57,7 @@ [data-ax-tr] { border-bottom: 1px solid #D8D8D8; - - &:after { - @include admin_clearfix; - } + @include clear-fix-after(); [data-ax-td] { float: left; diff --git a/_src/admin/scss/components/_grid.scss b/_src/admin/scss/components/_grid.scss index d472e83..26a0e5d 100644 --- a/_src/admin/scss/components/_grid.scss +++ b/_src/admin/scss/components/_grid.scss @@ -6,7 +6,7 @@ border:0px; table { - border-collapse: separate; + border-collapse: collapse; border-spacing: 0; border: 0 none; width: 100%; @@ -23,22 +23,19 @@ padding: 0; position: relative; overflow: hidden; - background-color: rgba(0,0,0,.15); + background-color: #fafafa; border: 0px none; - color: #fff; + color: #282828; th { box-sizing: border-box; overflow: hidden; position: relative; padding: 10px; - border: 0 none; height:38px; text-align:center; - - &:last-child { - border-right:0px; - } + border:1px solid #ddd; + font-weight:400; } } } @@ -51,31 +48,16 @@ td { line-height:21px; - padding:10px; - - &:last-child { - border-right:0px; - } + padding:5px 10px; + background-color:#fff; + border:1px solid #ddd; + font-weight:300; &.empty { height:300px; vertical-align: middle; text-align:center; } - - &.active { - color:#f9be03; - } - - a { - color:#fff; - } - } - - &:last-child { - td { - border-bottom:0px; - } } } } diff --git a/_src/admin/scss/plugins/_bootstrap_custom.scss b/_src/admin/scss/plugins/_bootstrap_custom.scss deleted file mode 100644 index 1b9baad..0000000 --- a/_src/admin/scss/plugins/_bootstrap_custom.scss +++ /dev/null @@ -1,359 +0,0 @@ -/* 좌측메뉴 */ -#logo-group #logo>a {font-family:Arial;} -nav ul ul li>a {font-size:12px;} - -/* 회원 메뉴 */ -.dropdown-menu>li>a {font-size:12px;} - -/* 페이지네이션 */ -.pagination>li>a, .pagination>li>span { color:#777; } -.pagination>.disabled>a, .pagination>.disabled>a:focus, .pagination>.disabled>a:hover, .pagination>.disabled>span, .pagination>.disabled>span:focus, .pagination>.disabled>span:hover { color :#ddd;} -.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover { background:$btn-primary-bg; border-color:$btn-primary-border;} - -/* Input */ -input[type="checkbox"], input[type="radio"] { display: inline-block; position: static; margin: 0 3px; vertical-align: middle; } -.form-control{ display: block; width: 100%; height: 26px; padding: 3px 6px; font-size: 13px; line-height: 1.42857; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 3px; box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s} - -.nav-cards { - margin-bottom:20px; - > li { - float:none; - margin:0; - > .card { - padding: 10px 20px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - color:#eee; - background-color: rgba(0,0,0,.15); - - &:focus, - &:hover { - text-decoration: none; - background-color: hsla(0,0%,100%,.08); - } - - &.selected { - color:#f9be03; - } - } - } -} - -.nav-card-tabs { - margin-bottom:0px; - - &:after { - clear:both; - content:''; - display:table; - } - > li { - float:left; - margin:0; - - > .card { - padding: 10px 20px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - color:#eee; - background-color: hsla(0,0%,100%,.08); - - &:focus, - &:hover { - text-decoration: none; - background-color: hsla(0,0%,100%,.08); - color:#f9be03; - } - - &.selected, - &.selected:hover { - color:#f9be03; - background-color:rgba(0,0,0,.15); - } - } - } -} - -label, -label.control-label {font-weight:400;} - -.panel.panel-dark { - background-color:transparent; - - .panel-heading { - position: relative; - background-color: rgba(0,0,0,.15); - line-height:50px; - - .panel-title { - font-size:16px; - } - } - - .panel-body { - border-left:1px solid rgba(0,0,0,.15); - border-right:1px solid rgba(0,0,0,.15); - border-bottom:1px solid rgba(0,0,0, .15); - - &.no-padding { - padding:0px; - } - - .cke_chrome { - border:0px; - } - } - - .panel-footer { - position: relative; - background-color: rgba(0,0,0,.15); - border:0px; - text-align:right; - } -} - -.form-control { - color:#eee; - height: 38px; - padding: 6px 12px; - font-size: 14px; - vertical-align: middle; - background-color: hsla(0,0%,100%,.25); - -webkit-transition: background-color .2s; - -moz-transition: background-color .2s; - -ms-transition: background-color .2s; - -o-transition: background-color .2s; - transition: background-color .2s; - box-shadow:none; - border:0; - line-height:1.5em; - - &:focus { - outline: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - - &:focus:not([disabled]):not([readonly]) { - color: #555; - background-color: #eee; - } - - &[disabled], - &[readonly] { - background:rgba(0,0,0,0.1); - color:#797979; - } -} - -select.form-control { - margin-top:1px; -} - -.form-control-inline { - display:inline-block; - width:auto; -} -textarea.form-control { - resize:vertical;; -} -.form-flex { - .form-group { - -webkit-display:flex; - display:flex; - - .control-label { - width:150px; - display:block; - text-align:right; - padding-top:11px; - - &.control-label-sm { - width:100px; - } - - &.control-label-xs { - width:50px; - } - } - - .controls { - margin-left:15px; - flex:1; - vertical-align: middle; - - .form-control-static { - padding-top:11px; - } - } - } -} - -.alert-info { - color: #fff; - background-color: rgba(0,0,0,0.14); - border-color: transparent; -} - -.alert-danger { - background-color: rgba(0,0,0,0.14); - border-color: transparent; -} - -.w-check { - position: relative; - margin:0; - line-height:21px; - padding:7.5px 0; - - & + .w-check { - margin-left:30px; - } - - input[type="checkbox"] { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip:rect(0,0,0,0); border: 0; - - & + span { - display: inline-block; - position: relative; - padding-left: 30px; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - - &:before { - content: ''; - position: absolute; - left: 0; - width: 21px; - height: 21px; - line-height:21px; - text-align: center; - background: rgba(0,0,0,0.15); - border: 0px; - font-family:'Font Awesome 5 Pro'; - } - } - - &:checked + span:before { - content:'\f00c'; - background: rgba(0,0,0,0.5); - color: #cc7b19; - } - } -} - -.w-radio { - position: relative; - margin:0; - line-height:21px; - padding:7.5px 0; - - & + .w-radio { - margin-left:30px; - } - - input[type="radio"] { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip:rect(0,0,0,0); border: 0; - - & + span { - display: inline-block; - position: relative; - padding-left: 30px; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - - &:before { - content: ''; - position: absolute; - left: 0; - width: 21px; - height: 21px; - line-height:21px; - text-align: center; - background: rgba(0,0,0,0.15); - border: 0px; - border-radius: 100%; - font-family:'Font Awesome 5 Pro'; - } - } - - &:checked + span:before { - content:'\f00c'; - background: rgba(0,0,0,0.5); - color: #cc7b19; - } - } -} - -.pagination { - > li { - > a, - > span { - color:#fff; - background:rgba(0,0,0, 0.15); - border:0px; - - &:focus, - &:hover { - color:#cc7b19; - background-color:rgba(0,0,0,0.15); - border:0px; - } - } - - &.active { - > a, - > a:focus, - > a:hover, - > span, - > span:focus, - > span:hover { - background:rgba(0,0,0, 0.5); - color:#fff; - } - } - - &.disabled { - > a, - > a:focus, - > a:hover, - > span, - > span:focus, - > span:hover { - background:rgba(0,0,0, 0.15); - color:#797979; - } - } - - } -} - -.dropdown-menu-dark { - background:#3f4245; - - .divider { - background:rgba(0,0,0,0.15); - } -} - -hr { - border-top:1px solid rgba(0,0,0,0.15); -} \ No newline at end of file diff --git a/_src/admin/scss/plugins/_modal.scss b/_src/admin/scss/plugins/_modal.scss deleted file mode 100644 index a0d2243..0000000 --- a/_src/admin/scss/plugins/_modal.scss +++ /dev/null @@ -1,616 +0,0 @@ -.ax-masking { - -webkit-filter: blur(3px); - -webkit-transform: scale(0.96); - -moz-transform: scale(0.96); - -ms-transform: scale(0.96); - -o-transform: scale(0.96); - transform: scale(0.96); - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -ms-transform: translateZ(0); - -o-transform: translateZ(0); - transform: translateZ(0) -} - -.ax-mask { - box-sizing: border-box; - z-index: 1000; - position: fixed; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - - .ax-mask-bg { - z-index: 1; - position: absolute; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - background: #000; - opacity: .6; - } - - .ax-mask-content { - z-index: 2; - position: absolute; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - display: table; - vertical-align: middle; - text-align: center; - color: #fff; - text-shadow: 0px 1px 0px #000; - - * { - color:inherit; - } - - > div { - display: table-cell; - vertical-align: middle; - text-align: center - } - } - - &.fade-out { - -webkit-animation: ax-mask-fade-out .25s; - -o-animation: ax-mask-fade-out .25s; - animation: ax-mask-fade-out .25s; - opacity: 0.0 - } -} - - -.ax5modal { - -webkit-animation: ax-modal .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -o-animation: ax-modal .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - animation: ax-modal .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -webkit-transform: translateZ(0px); - -moz-transform: translateZ(0px); - -ms-transform: translateZ(0px); - -o-transform: translateZ(0px); - transform: translateZ(0px); - box-sizing: border-box; - background-color: #3f4245; - border: 1px solid rgba(0,0,0,0.4); - border-radius: 4px; - -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.6); - box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.6); - z-index: 2000; - position: fixed; - left: 0px; - top: 0px; - box-sizing: content-box; - - .ax-modal-header { - user-select: none; - padding: 10px 15px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - font-size:13px; - cursor: move; - color: #fff; - background:rgba(0,0,0,.15); - font-weight:400; - border:0px; - - .ax-modal-header-addon { - position: absolute; - right: 0px; - top: 0px; - padding: 10px 10px; - - a { - color: #333; - outline: 0 - } - - [data-modal-header-btn] { - border: 0; - padding: 0px 2px; - background: transparent; - display: inline-block; - text-align: center; - cursor: pointer; - outline: 0 - } - } - } - - .ax-modal-body { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - padding: 0px; - text-align: center; - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -moz-flex: 1; - -ms-flex: 1; - flex: 1; - position: relative; - overflow: hidden; - - iframe { - border: 0 none - } - - .fadeIn { - -webkit-animation: ax-modal-fade-in .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -o-animation: ax-modal-fade-in .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - animation: ax-modal-fade-in .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards - } - - .fadeOut { - -webkit-animation: ax-modal-fade-out .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -o-animation: ax-modal-fade-out .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - animation: ax-modal-fade-out .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards - } - - } - - &.destroy { - -webkit-animation: ax-modal-destroy .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -o-animation: ax-modal-destroy .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - animation: ax-modal-destroy .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards - } - - &.fullscreen { - border: 0px none; - border-radius: 0px; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-animation: ax-modal-fullscreen .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - -o-animation: ax-modal-fullscreen .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; - animation: ax-modal-fullscreen .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards - } - - &.fullscreen.destroy { - -webkit-animation: ax-modal-fullscreen-destroy .3s cubic-bezier(0.19, 1, 0.22, 1) forwards; - -o-animation: ax-modal-fullscreen-destroy .3s cubic-bezier(0.19, 1, 0.22, 1) forwards; - animation: ax-modal-fullscreen-destroy .3s cubic-bezier(0.19, 1, 0.22, 1) forwards - } - - &.draged .ax-modal-header { - opacity: 0.5 - } - - &.draged .ax-modal-body { - opacity: 0.5 - } - - [data-ax5modal-resizer] { - position: absolute; - display: block; - - &:before { - position: absolute; - content: ' '; - display: block; - width: auto; - height: auto; - left: auto; - top: auto; - right: auto; - bottom: auto - } - - &[data-ax5modal-resizer="top"] { - left: 0; - top: 0; - width: 100%; - height: 0; - - &:before { - width: 100%; - height: 8px; - left: 0; - top: -4px; - cursor: row-resize - } - } - - &[data-ax5modal-resizer="bottom"] { - left: 0; - bottom: 0; - width: 100%; - height: 0; - - &:before { - width: 100%; - height: 8px; - left: 0; - top: -4px; - cursor: row-resize; - } - } - - - &[data-ax5modal-resizer="left"] { - left: 0; - top: 0; - width: 0; - height: 100%; - - &:before { - width: 8px; - height: 100%; - left: -4px; - top: 0; - cursor: col-resize - } - } - - - &[data-ax5modal-resizer="right"] { - right: 0; - top: 0; - width: 0; - height: 100%; - - &:before { - width: 8px; - height: 100%; - left: -4px; - top: 0; - cursor: col-resize - } - } - - - &[data-ax5modal-resizer="top-left"] { - left: 0; - top: 0; - width: 0; - height: 0; - - &:before { - width: 8px; - height: 8px; - left: -4px; - top: -4px; - cursor: nwse-resize - } - } - - - &[data-ax5modal-resizer="top-right"] { - right: 0; - top: 0; - width: 0; - height: 0; - &:before { - width: 8px; - height: 8px; - left: -4px; - top: -4px; - cursor: nesw-resize - } - } - - - &[data-ax5modal-resizer="bottom-left"] { - left: 0; - bottom: 0; - width: 0; - height: 0; - - &:before { - width: 8px; - height: 8px; - left: -4px; - top: -4px; - cursor: nesw-resize - } - } - - - &[data-ax5modal-resizer="bottom-right"] { - right: 0; - bottom: 0; - width: 0; - height: 0; - - &:before { - width: 8px; - height: 8px; - left: -4px; - top: -4px; - cursor: nwse-resize - } - } - } -} - - -.ax5modal-resizer-background { - position: fixed; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - background: transparent; - z-index: 2000; - cursor: move -} - -.ax5modal-resizer { - position: absolute; - left: 0px; - top: 0px; - z-index: 2001; - cursor: move; - box-sizing: border-box; - background-color: #ccc; - border: 1px solid red; - opacity: .3; - border-radius: 4px; - -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.6); - box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.6) -} - - -@-webkit-keyframes ax-mask { - from { - opacity: 0.0 - } - to { - opacity: .6 - } -} - -@-moz-keyframes ax-mask { - from { - opacity: 0.0 - } - to { - opacity: .6 - } -} - -@keyframes ax-mask { - from { - opacity: 0.0 - } - to { - opacity: .6 - } -} - -@-webkit-keyframes ax-mask-fade-out { - from { - opacity: .6 - } - to { - opacity: 0.0 - } -} - -@-moz-keyframes ax-mask-fade-out { - from { - opacity: .6 - } - to { - opacity: 0.0 - } -} - -@keyframes ax-mask-fade-out { - from { - opacity: .6 - } - to { - opacity: 0.0 - } -} - -@-webkit-keyframes ax-modal { - 0% { - opacity: 0.0; - -webkit-transform: scale(0.8) - } - 100% { - opacity: 1.0; - -webkit-transform: scale(1) - } -} - -@-moz-keyframes ax-modal { - 0% { - opacity: 0.0; - -moz-transform: scale(0.8) - } - 100% { - opacity: 1.0; - -moz-transform: scale(1) - } -} - -@keyframes ax-modal { - 0% { - opacity: 0.0; - -webkit-transform: scale(0.8); - -moz-transform: scale(0.8); - -ms-transform: scale(0.8); - -o-transform: scale(0.8); - transform: scale(0.8) - } - 100% { - opacity: 1.0; - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1) - } -} - -@-webkit-keyframes ax-modal-destroy { - 100% { - opacity: 0.0; - -webkit-transform: translateY(20%) - } - 0% { - opacity: 1.0; - -webkit-transform: translateY(0) - } -} - -@-moz-keyframes ax-modal-destroy { - 100% { - opacity: 0.0; - -moz-transform: translateY(20%) - } - 0% { - opacity: 1.0; - -moz-transform: translateY(0) - } -} - -@keyframes ax-modal-destroy { - 100% { - opacity: 0.0; - -webkit-transform: translateY(20%); - -moz-transform: translateY(20%); - -ms-transform: translateY(20%); - -o-transform: translateY(20%); - transform: translateY(20%) - } - 0% { - opacity: 1.0; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -ms-transform: translateY(0); - -o-transform: translateY(0); - transform: translateY(0) - } -} - -@-webkit-keyframes ax-modal-fullscreen { - 0% { - -webkit-transform: translateY(20%) - } - 100% { - -webkit-transform: translateY(0) - } -} - -@-moz-keyframes ax-modal-fullscreen { - 0% { - -moz-transform: translateY(20%) - } - 100% { - -moz-transform: translateY(0) - } -} - -@keyframes ax-modal-fullscreen { - 0% { - -webkit-transform: translateY(20%); - -moz-transform: translateY(20%); - -ms-transform: translateY(20%); - -o-transform: translateY(20%); - transform: translateY(20%) - } - 100% { - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -ms-transform: translateY(0); - -o-transform: translateY(0); - transform: translateY(0) - } -} - -@-webkit-keyframes ax-modal-fullscreen-destroy { - 0% { - -webkit-transform: translateY(0) - } - 100% { - -webkit-transform: translateY(100%) - } -} - -@-moz-keyframes ax-modal-fullscreen-destroy { - 0% { - -moz-transform: translateY(0) - } - 100% { - -moz-transform: translateY(100%) - } -} - -@keyframes ax-modal-fullscreen-destroy { - 0% { - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -ms-transform: translateY(0); - -o-transform: translateY(0); - transform: translateY(0) - } - 100% { - -webkit-transform: translateY(100%); - -moz-transform: translateY(100%); - -ms-transform: translateY(100%); - -o-transform: translateY(100%); - transform: translateY(100%) - } -} - -@-webkit-keyframes ax-modal-fade-in { - 0% { - opacity: 0.0 - } - 100% { - opacity: 1.0 - } -} - -@-moz-keyframes ax-modal-fade-in { - 0% { - opacity: 0.0 - } - 100% { - opacity: 1.0 - } -} - -@keyframes ax-modal-fade-in { - 0% { - opacity: 0.0 - } - 100% { - opacity: 1.0 - } -} - -@-webkit-keyframes ax-modal-fade-out { - 0% { - opacity: 1.0 - } - 100% { - opacity: 0.0 - } -} - -@-moz-keyframes ax-modal-fade-out { - 0% { - opacity: 1.0 - } - 100% { - opacity: 0.0 - } -} - -@keyframes ax-modal-fade-out { - 0% { - opacity: 1.0 - } - 100% { - opacity: 0.0 - } -} \ No newline at end of file diff --git a/_src/admin/scss/plugins/_plugins_custom.scss b/_src/admin/scss/plugins/_plugins_custom.scss index 6c5ab69..e69de29 100644 --- a/_src/admin/scss/plugins/_plugins_custom.scss +++ b/_src/admin/scss/plugins/_plugins_custom.scss @@ -1,228 +0,0 @@ -/* JQUERY-UI */ -.ui-icon, -.ui-widget-content .ui-icon { background-image: url("../images/jquery-ui/ui-icons_444444_256x240.png"); } -.ui-widget-header .ui-icon { background-image: url("../images/jquery-ui/ui-icons_444444_256x240.png"); } -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon, -.ui-button:hover .ui-icon, -.ui-button:focus .ui-icon { background-image: url("../images/jquery-ui/ui-icons_555555_256x240.png"); } -.ui-state-active .ui-icon, -.ui-button:active .ui-icon { background-image: url("../images/jquery-ui/ui-icons_ffffff_256x240.png"); } -.ui-state-highlight .ui-icon, -.ui-button .ui-state-highlight.ui-icon { background-image: url("../images/jquery-ui/ui-icons_777620_256x240.png"); } -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { background-image: url("../images/jquery-ui/ui-icons_cc0000_256x240.png"); } -.ui-button .ui-icon { background-image: url("../images/jquery-ui/ui-icons_777777_256x240.png");} -.ui-button.ui-state-active:hover, -.ui-button:active, -.ui-state-active, -.ui-widget-content -.ui-state-active, -.ui-widget-header -.ui-state-active, -a.ui-button:active { - border: 1px solid $btn-primary-border; - background: $btn-primary-bg; - color:#fff; -} - -/* AX5UI-MODAL */ -.ax5modal .ax-modal-header { font-size:13px;} - -/* 순서변경시 아이콘에 커서변경 */ -.sort-handle-icon {cursor:move;} - -/* 카테고리용 */ -.category-list { - background:rgba(0,0,0,0.15); - padding:15px 20px; - - li { - background:url(../images/admin/treeview_line.gif) 0px 0px no-repeat; - display:block; - - > div { - display:block; - padding:5px 5px 0px 22px; - line-height:23px; - color:#fff; - text-decoration:none; - vertical-align:middle; - - span { - vertical-align:bottom; - } - - > span.move-item { - cursor:move; - border:1px dashed transparent; - - &:hover { - //border:1px dashed #e0e0e0; - color:#cc7b19; - } - } - - > button.btn-xs { - margin-left:10px; - display:none; - - +button { - margin-left:0px; - } - } - - &:hover { - >button { - display:inline-block; - } - } - } - - &:last-child { background-position-y:-1768px; } - } - - > li { - background:none; - - &.ui-sortable-placeholder { - background:#f0f0f0; - } - - > div { - padding-left:0px; - - > button.btn-xs { - display:inline-block; - } - } - - > ul > li { - background-position-y: -2px; - > ul.items > li { - background-position: 22px -2px; - - > div { - padding-left: 44px; - } - - &:last-child { - background-position-y: -1768px; - } - } - } - } -} - -.cke { - border:0px !important; - .cke_inner { - background:transparent; - } - - .cke_bottom, - .cke_top { - border:0px; - background:rgba(0,0,0, 0.14); - } - - .cke_combo_button, - .cke_button { - background: rgba(0,0,0,.14); - } - - .cke_toolgroup { - background:transparent; - } - - .cke_toolbar_separator { - //background:transparent; - } - .cke_path_item, .cke_path_empty { - color:#fff; - text-shadow:none; - } - .cke_source { - color:#222; - } -} - - -.ui-datepicker { - border:0px !important; - border-radius:0px !important; - background:#3f4245; - box-shadow: 0px 10px 10px rgba(0,0,0,0.15); - padding:0px; - - .ui-datepicker-header { - border-radius:0px !important; - border:0px; - background:rgba(0,0,0,0.15); - - .ui-datepicker-title { - color:#fff; - } - - .ui-datepicker-prev, - .ui-datepicker-next { - border-radius:0px; - width:auto; - font-weight:400; - - &:after { - font-size: 16px; - text-align: center; - display: inline-block; - } - .ui-icon { - display:none - } - - &.ui-state-hover { - background:transparent; - color:#cc7b19; - border:0px; - } - } - .ui-datepicker-prev { - &:after { - content:'\f32a'; - font-family:'Font Awesome 5 Pro'; - color:#fff; - } - - } - .ui-datepicker-next { - &:after { - content:'\f32b'; - font-family:'Font Awesome 5 Pro'; - color:#fff; - } - } - } - .ui-datepicker-calendar { - color:#fff; - - td { - border:0px; - padding:0px; - - a { - background:transparent; - color:#fff; - border:0px !important; - - &.ui-state-active { - background:#3498db; - } - - &.ui-state-highlight { - background:#cc7b19; - color:#fff; - } - } - } - - } -} \ No newline at end of file diff --git a/_src/admin/scss/plugins/_toastr.scss b/_src/admin/scss/plugins/_toastr.scss deleted file mode 100644 index bd4e916..0000000 --- a/_src/admin/scss/plugins/_toastr.scss +++ /dev/null @@ -1,220 +0,0 @@ -.toast-title { - font-weight: bold; -} -.toast-message { - -ms-word-wrap: break-word; - word-wrap: break-word; - a, - label { - color: #ffffff; - } - a { - &:hover { - color: #cccccc; - text-decoration: none; - } - } -} -.toast-close-button { - position: relative; - right: -0.3em; - top: -0.3em; - float: right; - font-size: 20px; - font-weight: bold; - color: #ffffff; - -webkit-text-shadow: 0 1px 0 #ffffff; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.8; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); - filter: alpha(opacity=80); - - &:hover, - &:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); - } -} - -button.toast-close-button { - - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -#toast-container { - position: fixed; - z-index: 999999; - pointer-events: none; - - * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - } - - > div { - position: relative; - pointer-events: auto; - overflow: hidden; - margin: 0 0 6px; - padding: 15px 15px 15px 50px; - width: 300px; - -moz-border-radius: 3px 3px 3px 3px; - -webkit-border-radius: 3px 3px 3px 3px; - border-radius: 3px 3px 3px 3px; - background-position: 15px center; - background-repeat: no-repeat; - -moz-box-shadow: 0 0 12px #999999; - -webkit-box-shadow: 0 0 12px #999999; - box-shadow: 0 0 12px #999999; - color: #ffffff; - opacity: 0.8; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); - filter: alpha(opacity=80); - } - - > :hover { - -moz-box-shadow: 0 0 12px #000000; - -webkit-box-shadow: 0 0 12px #000000; - box-shadow: 0 0 12px #000000; - opacity: 1; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); - filter: alpha(opacity=100); - cursor: pointer; - } - - > .toast-info { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; - } - - > .toast-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; - } - - > .toast-success { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; - } - - > .toast-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; - } - - &.toast-top-center { - top: 0; - right: 0; - width: 100%; - } - - &.toast-bottom-center { - bottom: 0; - right: 0; - width: 100%; - } - - &.toast-top-full-width { - top: 0; - right: 0; - width: 100%; - } - - &.toast-bottom-full-width { - bottom: 0; - right: 0; - width: 100%; - } - - &.toast-top-left { - top: 12px; - left: 12px; - } - - &.toast-top-right { - top: 12px; - right: 12px; - } - - &.toast-bottom-right { - right: 12px; - bottom: 12px; - } - - &.toast-bottom-left { - bottom: 12px; - left: 12px; - } - - &.toast-top-center > div, - &.toast-bottom-center > div { - width: 300px; - margin-left: auto; - margin-right: auto; - } - - &.toast-top-full-width > div, - &.toast-bottom-full-width > div { - width: 96%; - margin-left: auto; - margin-right: auto; - } -} - -.toast { - background-color: #030303; -} -.toast-success { - background-color: #51a351; -} -.toast-error { - background-color: #bd362f; -} -.toast-info { - background-color: #2f96b4; -} -.toast-warning { - background-color: #f89406; -} -.toast-progress { - position: absolute; - left: 0; - bottom: 0; - height: 4px; - background-color: #000000; - opacity: 0.4; - -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); - filter: alpha(opacity=40); -} -/*Responsive Design*/ -@media all and (max-width: 240px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 11em; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } -} -@media all and (min-width: 241px) and (max-width: 480px) { - #toast-container > div { - padding: 8px 8px 8px 50px; - width: 18em; - } - #toast-container .toast-close-button { - right: -0.2em; - top: -0.2em; - } -} -@media all and (min-width: 481px) and (max-width: 768px) { - #toast-container > div { - padding: 15px 15px 15px 50px; - width: 25em; - } -} diff --git a/_src/admin/scss/plugins/ax5ui/_ax5.scss b/_src/admin/scss/plugins/ax5ui/_ax5.scss new file mode 100644 index 0000000..9a4c7ae --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5.scss @@ -0,0 +1,3 @@ +@import "bourbon_support"; +@import "mixin"; + diff --git a/_src/admin/scss/plugins/ax5ui/_ax5calendar.scss b/_src/admin/scss/plugins/ax5ui/_ax5calendar.scss new file mode 100644 index 0000000..3ce3245 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5calendar.scss @@ -0,0 +1,351 @@ +$ax5calendar-control-bg: #f5f5f5 !default; +$ax5calendar-control-border: 1px solid #ddd !default; +$ax5calendar-control-border-radius: 5px !default; +$ax5calendar-control-font-size: ceil(($font-size-base * 1.25)) !default; +$ax5calendar-control-text-color: #222 !default; +$ax5calendar-control-hover-text-color: $brand-primary !default; +$ax5calendar-control-padding: 0 !default; + +$ax5calendar-header-bg: (#FFFFFF, #FFFFFF) !default; +$ax5calendar-header-border: 0px none !default; +$ax5calendar-header-padding: 0px 2px !default; +$ax5calendar-header-font-size: ceil(($font-size-base * 0.8)) !default; + +$ax5calendar-body-bg: (#FFFFFF, #FFFFFF) !default; +$ax5calendar-body-border: 0px none !default; +$ax5calendar-body-font-size: ceil(($font-size-base * 1)) !default; +$ax5calendar-body-animation-in: ax5-ui-calendar-fadein !default; +$ax5calendar-body-animation-out: ax5-ui-calendar-fadeout !default; + +$ax5calendar-sun-text-color: #C78B81 !default; +$ax5calendar-sat-text-color: #32B4DC !default; + +$ax5calendar-date-bg: (#FFFFFF, #FFFFFF) !default; +$ax5calendar-date-text-color: #C3C4C6 !default; +$ax5calendar-live-bg: (#F0F0F0, #F0F0F0) !default; +$ax5calendar-live-text-color: #6D6E70 !default; +$ax5calendar-hover-bg: (#32B4DC, #32B4DC) !default; +$ax5calendar-hover-text-color: #fff !default; +$ax5calendar-focus-bg: (#E67241, #E67241) !default; +$ax5calendar-focus-text-color: #fff !default; +$ax5calendar-period-bg: (#82d3fa, #82d3fa) !default; +$ax5calendar-period-text-color: #fff !default; + + +$ax5calendar-item-day-radius: 5px !default; +$ax5calendar-item-month-radius: 5px !default; +$ax5calendar-item-year-radius: 5px !default; + +@mixin extend-item-theme() { + &.holiday { + color: $ax5calendar-sun-text-color; + } +} + +// mixins --------------------------------------------- end + +@include keyframes(ax5-ui-calendar-fadeout) { + from { + opacity: 1.0; + } + to { + opacity: 0.5; + } +} + +@include keyframes(ax5-ui-calendar-fadein) { + from { + opacity: 0.5; + } + to { + opacity: 1.0; + } +} + +.ax5-ui-calendar { + box-sizing: border-box; + * { + box-sizing: border-box; + } + position: relative; + .calendar-control { + position: relative; + box-sizing: content-box; + @include ax-background($ax5calendar-control-bg); + border: $ax5calendar-control-border; + border-radius: $ax5calendar-control-border-radius; + font-size: $ax5calendar-control-font-size; + margin-bottom: 5px; + padding: $ax5calendar-control-padding; + + .date-move-left, .date-move-right { + display: block; + position: absolute; + overflow: hidden; + + text-align: center; + font-size: ceil($ax5calendar-control-font-size * 1.2); + cursor: pointer; + text-decoration: none; + padding: $ax5calendar-control-padding; + i, span { + line-height: inherit; + } + } + + .date-move-left { + left: 0px; + top: 0px; + } + .date-move-right { + right: 0px; + top: 0px; + } + .date-display { + text-align: center; + [data-calendar-display] { + margin: 0px 10px; + cursor: pointer; + text-decoration: underline; + } + } + + color: $ax5calendar-control-text-color; + a { + color: $ax5calendar-control-text-color; + } + a:hover { + color: $ax5calendar-control-hover-text-color; + } + } + .calendar-body { + &.fadein { + @include animation($ax5calendar-body-animation-in 0.1s ease-in-out); + opacity: 1.0; + } + &.fadeout { + @include animation($ax5calendar-body-animation-out 0.1s ease-in-out); + opacity: 0.0; + } + + table { + box-sizing: border-box; + table-layout: fixed; + border-collapse: collapse; + border-spacing: 0px; + border: 0px none; + thead { + td, th { + box-sizing: border-box; + vertical-align: middle; + line-height: 1em; + cursor: pointer; + text-align: center; + font-size: $ax5calendar-header-font-size; + padding: $ax5calendar-header-padding; + border: $ax5calendar-header-border; + overflow: hidden; + @include ax-background($ax5calendar-header-bg); + + color: $ax5calendar-live-text-color; + &.calendar-col-0 { + color: $ax5calendar-sun-text-color; + } + &.calendar-col-6 { + color: $ax5calendar-sat-text-color; + } + } + } + tbody { + td, th { + box-sizing: border-box; + vertical-align: middle; + line-height: 1em; + cursor: pointer; + text-align: center; + font-size: $ax5calendar-body-font-size; + + border: $ax5calendar-body-border; + @include ax-background($ax5calendar-body-bg); + + overflow: hidden; + .calendar-item-day { + position: relative; + display: block; + width: 100%; + height: 100%; + vertical-align: middle; + border-radius: $ax5calendar-item-day-radius; + overflow: hidden; + line-height: inherit; + @include ax-background($ax5calendar-date-bg); + color: $ax5calendar-date-text-color; + font-size: $ax5calendar-body-font-size; + + span.addon { + position: absolute; + width: 100%; + text-align: center; + line-height: $ax5calendar-body-font-size * 0.8; + font-size: $ax5calendar-body-font-size * 0.8; + + &.addon-header { + left: 0px; + top: 1px; + } + &.addon-footer { + left: 0px; + bottom: 1px; + } + } + + &.live { + @include ax-background($ax5calendar-live-bg); + color: $ax5calendar-live-text-color; + span.addon { + color: #A1A1A1; + } + &.sunday { + color: $ax5calendar-sun-text-color; + } + &.saturday { + color: $ax5calendar-sat-text-color; + } + } + &.focus { + @include ax-background($ax5calendar-focus-bg); + color: $ax5calendar-focus-text-color; + span.addon { + color: $ax5calendar-focus-text-color; + } + &.hover { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color !important; + span.addon { + color: $ax5calendar-hover-text-color; + } + } + } + &.period { + @include ax-background($ax5calendar-period-bg); + color: $ax5calendar-period-text-color !important; + span.addon { + color: $ax5calendar-period-text-color; + } + } + &.selected-day { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color !important; + span.addon { + color: $ax5calendar-hover-text-color; + } + } + &.disable { + @include ax-background($ax5calendar-date-bg); + color: lighten($ax5calendar-date-text-color, 10%); + } + + @include extend-item-theme(); + } + .calendar-item-month { + display: block; + width: 100%; + height: 100%; + vertical-align: middle; + border-radius: $ax5calendar-item-month-radius; + overflow: hidden; + line-height: inherit; + @include ax-background($ax5calendar-date-bg); + color: $ax5calendar-date-text-color; + font-size: $ax5calendar-body-font-size; + + &.live { + @include ax-background($ax5calendar-live-bg); + color: $ax5calendar-live-text-color; + } + &.hover { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color; + } + &.focus { + @include ax-background($ax5calendar-focus-bg); + color: $ax5calendar-focus-text-color; + } + &.selected-month { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color !important; + span.addon { + color: $ax5calendar-hover-text-color; + } + span.lunar { + color: $ax5calendar-hover-text-color; + } + } + &.disable { + @include ax-background($ax5calendar-date-bg); + color: lighten($ax5calendar-date-text-color, 10%); + } + @include extend-item-theme(); + } + .calendar-item-year { + display: block; + width: 100%; + height: 100%; + vertical-align: middle; + border-radius: $ax5calendar-item-year-radius; + overflow: hidden; + line-height: inherit; + @include ax-background($ax5calendar-date-bg); + color: $ax5calendar-date-text-color; + font-size: $ax5calendar-body-font-size; + + &.live { + @include ax-background($ax5calendar-live-bg); + color: $ax5calendar-live-text-color; + } + &.hover { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color; + } + &.focus { + @include ax-background($ax5calendar-focus-bg); + color: $ax5calendar-focus-text-color; + } + &.selected-year { + @include ax-background($ax5calendar-hover-bg); + color: $ax5calendar-hover-text-color !important; + span.addon { + color: $ax5calendar-hover-text-color; + } + span.lunar { + color: $ax5calendar-hover-text-color; + } + } + &.disable { + @include ax-background($ax5calendar-date-bg); + color: lighten($ax5calendar-date-text-color, 10%); + } + @include extend-item-theme(); + } + + /* + &.calendar-col-0 { + .calendar-item-day.live { + color: $ax5calendar-sun-text-color; + @include extend-item-theme(); + } + } + &.calendar-col-6 { + .calendar-item-day.live { + color: $ax5calendar-sat-text-color; + @include extend-item-theme(); + } + } + */ + + } + } + } + } + +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_ax5grid.scss b/_src/admin/scss/plugins/ax5ui/_ax5grid.scss new file mode 100644 index 0000000..4fed473 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5grid.scss @@ -0,0 +1,769 @@ +//== +$ax5grid-border: 1px solid #ccc !default; +$ax5grid-bg: #fff !default; +$ax5grid-font-size: 12px !default; +$ax5grid-column-border: 1px solid #ccc !default; + +//== header +$ax5grid-header-column-color: #222 !default; +$ax5grid-header-column-border: 1px solid #ccc !default; +$ax5grid-header-column-box-shadow: inset 1px 1px 0px 0px #fff !default; +$ax5grid-header-column-bg-colors: (#FFFFFF, #F0F0F0) !default; +$ax5grid-header-column-hover-bg-colors: (#eee, #eee) !default; +$ax5grid-header-column-resizer-color: #ff3300 !default; +$ax5grid-header-column-resizer-size: 4px !default; +$ax5grid-header-sorter-size: 9px !default; +$ax5grid-header-sorter-color: #000 !default; + +//== aside +$ax5grid-aside-border: 1px solid darken(#ccc, 0%) !default; +$ax5grid-aside-bg: #f2f2f2 !default; +$ax5grid-aside-column-shadow: inset 1px 1px 0px 0px #fff !default; + +$ax5grid-frozen-line-border: 1px solid darken(#ccc, 10%) !default; + +//== footsum +$ax5grid-footsum-bg: #ffe7e2 !default; +$ax5grid-footsum-line-border: 1px solid darken(#ccc, 10%) !default; + +//== page +$ax5grid-page-border: 1px solid #ccc !default; +$ax5grid-page-bg-colors: (#FFFFFF, #F0F0F0) !default; +$ax5grid-page-navigation-padding: 5px !default; +$ax5grid-page-navigation-font-size: 12px !default; +$ax5grid-page-navigation-btn-min-width: 20px !default; +$ax5grid-page-navigation-btn-border: 0px none !default; +$ax5grid-page-navigation-btn-border-radius: 5px !default; +$ax5grid-page-navigation-btn-bg: transparent !default; +$ax5grid-page-navigation-btn-font-size: 11px !default; +$ax5grid-page-navigation-btn-color: #222 !default; +$ax5grid-page-navigation-btn-hover-bg: #888 !default; +$ax5grid-page-navigation-btn-hover-color: #fff !default; + +$ax5grid-page-status-font-size: 12px !default; +$ax5grid-page-status-padding: 10px !default; +$ax5grid-page-status-color: #222 !default; + +//== scroll +$ax5grid-scroll-track-border: 1px solid #ccc !default; +$ax5grid-scroll-track-bg: #f3f3f3 !default; +$ax5grid-scroll-corner-bg: #EAEDEF !default; + +$ax5grid-scroll-bar-border-radius: 10px !default; +$ax5grid-scroll-bar-border: 0px solid #fff !default; +$ax5grid-scroll-bar-bg: #ccc !default; +$ax5grid-scroll-bar-hover-border: 0px solid #ccc !default; +$ax5grid-scroll-bar-hover-bg: #bababa !default; + +//== body.row +$ax5grid-row-bg-0: #f3f3f3 !default; +$ax5grid-row-bg-1: #fff !default; +$ax5grid-row-bg-2: #f3f3f3 !default; +$ax5grid-row-bg-3: #fff !default; +$ax5grid-row-hover-bg: lighten(#cce2f3, 5%) !default; +$ax5grid-row-grouping-bg: #ffffe7 !default; +$ax5grid-row-selected: lighten(#b1d7fe, 10%) !default; + +//== body.cell +$ax5grid-cell-padding-row-selector: 5px !default; +$ax5grid-cell-padding: 3px 5px !default; + +$ax5grid-cell-checkbox-border: 1px solid #ccc !default; +$ax5grid-cell-checkbox-border-radius: 3px !default; +$ax5grid-cell-checkbox-bg-colors: (#FFFFFF, #F0F0F0) !default; +$ax5grid-cell-disable-checkbox-bg-colors: (darken(nth($ax5grid-cell-checkbox-bg-colors, 2), 10%), darken(nth($ax5grid-cell-checkbox-bg-colors, 1), 10%)) !default; +$ax5grid-cell-checkbox-arrow-color: $brand-primary !default; + +$ax5grid-cell-focused-box-shadow: inset 0px 0px 1px 1px #0581f2 !default; +$ax5grid-cell-focused-bg: lighten(#b1d7fe, 10%) !default; +$ax5grid-cell-focused-color: #000 !default; + +$ax5grid-cell-selected-border-color: #ccc !default; +$ax5grid-cell-selected-bg: #b1d7fe !default; +$ax5grid-cell-selected-color: #000 !default; + +//== resizer +$ax5grid-resizer-color: #ff3300 !default; +$ax5grid-resizer-size: 2px !default; + + +// mixins +@mixin gridBoxModal() { + margin: 0; + padding: 0; +} + +@mixin gridColumn($container) { + + box-sizing: border-box; + overflow: hidden; + position: relative; + padding: 0; + font-size: $ax5grid-font-size; + border: 0 none; + + &.hasBorder { + border-right: $ax5grid-column-border; + border-bottom: $ax5grid-column-border; + } + &.isLastColumn { + + } + &.lineNumberColumn { + + } + &.focused { + box-shadow: $ax5grid-cell-focused-box-shadow; + } + + @if ($container == "header") { + cursor: pointer; + box-shadow: $ax5grid-header-column-box-shadow; + &:hover { + @include ax-background(top, $ax5grid-header-column-hover-bg-colors); + } + &[data-ax5grid-column-row="null"] { + box-shadow: none; + } + } + + &[data-ax5grid-column-row="null"] { + border-right: 0 none; + } + + &[data-ax5grid-column-selected] { + background: $ax5grid-cell-selected-bg; + border-color: $ax5grid-cell-selected-border-color; + color: $ax5grid-cell-selected-color; + } + + &[data-ax5grid-column-focused] { + box-shadow: $ax5grid-cell-focused-box-shadow; + background: $ax5grid-cell-focused-bg; + color: $ax5grid-cell-focused-color; + } + + &[data-ax5grid-column-attr="rowSelector"] { + cursor: pointer; + [data-ax5grid-cellHolder] { + padding: $ax5grid-cell-padding-row-selector; + } + + .checkBox { + display: inline-block; + position: relative; + border: $ax5grid-cell-checkbox-border; + border-radius: $ax5grid-cell-checkbox-border-radius; + @include ax-background(top, $ax5grid-cell-checkbox-bg-colors); + height: 100%; + width: 100%; + &:after { + content: ''; + width: 60%; + height: 40%; + position: absolute; + top: 20%; + right: 20%; + border: 0.2em solid $ax5grid-cell-checkbox-arrow-color; + border-top: none; + border-right: none; + background: transparent; + opacity: 0.0; + @include transform(rotate(-50deg)); + } + } + &[data-ax5grid-selected="true"] { + .checkBox { + &:after { + opacity: 1; + } + } + } + } + + &[data-ax5grid-column-attr="lineNumber"] { + } + + [data-ax5grid-cellHolder] { + // 그리드 셀표현 : 그리드의 컬럼텍스트가 여기에 출력됨 + display: block; + box-sizing: border-box; + padding: $ax5grid-cell-padding; + font-size: $ax5grid-font-size; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + @if ($container == "header") { + //text-align: center; + } + + &[data-ax5grid-text-align="left"] { + text-align: left; + } + &[data-ax5grid-text-align="center"] { + text-align: center; + } + &[data-ax5grid-text-align="right"] { + text-align: right; + } + &[data-ax5grid-cellHolder="multiLine"] { + white-space: normal; + } + + [data-ax5grid-editor] { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + border: 0 none; + background: $ax5grid-bg; + &::-ms-clear { + display: none; + } + } + + [data-ax5select] { + position: absolute; + display: block; + left: 0; + top: 0; + width: 100%; + height: 100%; + border: 0px none; + background: $ax5grid-bg; + .ax5select-display { + height: 100%; + border-radius: 0; + } + } + + [data-ax5grid-editor="checkbox"] { + display: inline-block; + position: relative; + border: $ax5grid-cell-checkbox-border; + border-radius: $ax5grid-cell-checkbox-border-radius; + @include ax-background(top, $ax5grid-cell-checkbox-bg-colors); + height: 100%; + &:after { + content: ''; + width: 60%; + height: 40%; + position: absolute; + top: 20%; + right: 20%; + border: 0.2em solid $ax5grid-cell-checkbox-arrow-color; + border-top: none; + border-right: none; + background: transparent; + opacity: 0.0; + @include transform(rotate(-50deg)); + } + &[data-ax5grid-checked="true"] { + &:after { + opacity: 1.0; + } + } + } + + [data-ax5grid-tnode-arrow] { + display: inline-block; + box-sizing: content-box; + text-align: right; + text-shadow: 0 -1px #fff; + padding: 0 5px 0 0; + } + a[data-ax5grid-tnode-arrow] { + cursor: pointer; + text-decoration: none; + &:hover { + text-decoration: none; + } + } + [data-ax5grid-tnode-item="group"] { + display: inline-block; + } + [data-ax5grid-tnode-item="item"] { + display: inline-block; + } + } +} + +@mixin gridRowBackground() { + &.tr-0 { + background: $ax5grid-row-bg-0; + } + &.tr-1 { + background: $ax5grid-row-bg-1; + } + &.tr-2 { + background: $ax5grid-row-bg-2; + } + &.tr-3 { + background: $ax5grid-row-bg-3; + } + &.hover { + background: $ax5grid-row-hover-bg; + } + &[data-ax5grid-grouping-tr="true"] { + background: $ax5grid-row-grouping-bg; + } + &[data-ax5grid-selected="true"] { + background: $ax5grid-row-selected; + td { + //color: #fff; + //box-shadow: inset 1px 1px 0px 0px #fff; + &[data-ax5grid-column-attr="rowSelector"], + &[data-ax5grid-column-attr="lineNumber"] { + box-shadow: none; + } + &[data-ax5grid-column-attr="rowSelector"] { + .checkBox { + &:after { + opacity: 1; + } + } + } + } + } + &[data-ax5grid-disable-selection="true"] { + // background: $ax5grid-row-selected; + td { + &[data-ax5grid-column-attr="rowSelector"] { + .checkBox { + cursor: not-allowed; + @include ax-background(top, $ax5grid-cell-disable-checkbox-bg-colors); + &:after { + opacity: 0; + } + } + } + } + } + + // mergeCells 대상 컬럼 배경생 통일. + td.merged { + background: $ax5grid-row-bg-1; + } +} + +@mixin gridPanel($container) { + [data-ax5grid-panel] { + @include gridBoxModal(); + position: absolute; + overflow: hidden; + /* + overflow: hidden; + -webkit-overflow-scrolling: touch; + transform: translate3d(0, 0, 0); + */ + + table { + table-layout: fixed; + border-collapse: separate; + border-spacing: 0; + border: 0 none; + width: 100%; + @if ($container == "header") { + height: 100%; + } + tr { + border-bottom: 0 none; + @include gridRowBackground(); + td { + @include gridColumn($container); + + } + } + } + + &[data-ax5grid-panel="aside-header"] { + border-right: $ax5grid-aside-border; + table { + tr { + td { + text-align: center; + } + } + } + } + &[data-ax5grid-panel="top-aside-body"], + &[data-ax5grid-panel="aside-body"], + &[data-ax5grid-panel="bottom-aside-body"] { + border-right: $ax5grid-aside-border; + background: $ax5grid-aside-bg; + table { + tr { + background: $ax5grid-aside-bg; + td { + text-align: center; + box-shadow: $ax5grid-aside-column-shadow; + } + } + } + } + + &[data-ax5grid-panel="left-header"], + &[data-ax5grid-panel="top-left-body"], + &[data-ax5grid-panel="left-body"], + &[data-ax5grid-panel="bottom-left-body"] { + border-right: $ax5grid-frozen-line-border; /// frozen Line color + } + + &[data-ax5grid-panel="top-aside-body"], + &[data-ax5grid-panel="top-left-body"], + &[data-ax5grid-panel="top-body"], + &[data-ax5grid-panel="top-right-body"] { + border-bottom: $ax5grid-frozen-line-border; /// frozen Line color + } + + &[data-ax5grid-panel="bottom-aside-body"], + &[data-ax5grid-panel="bottom-left-body"], + &[data-ax5grid-panel="bottom-body"], + &[data-ax5grid-panel="bottom-right-body"] { + border-top: $ax5grid-footsum-line-border; /// footSum Line color + } + + &[data-ax5grid-panel="bottom-aside-body"], + &[data-ax5grid-panel="bottom-left-body"], + &[data-ax5grid-panel="bottom-body"], + &[data-ax5grid-panel="bottom-right-body"] { + background: $ax5grid-footsum-bg; + } + + [data-ax5grid-panel-scroll] { + position: absolute; + left: 0; + top: 0; + } + } +} + +@mixin scrollBar($type) { + position: absolute; + top: 0; + left: 0; + @include border-top-radius($ax5grid-scroll-bar-border-radius); + @include border-bottom-radius($ax5grid-scroll-bar-border-radius); + box-sizing: border-box; + border: $ax5grid-scroll-bar-border; + background: $ax5grid-scroll-bar-bg; + + @if ($type == "vertical-bar") { + cursor: ns-resize; + } @else { + cursor: ew-resize; + } + + &:hover { + border: $ax5grid-scroll-bar-hover-border; + background: $ax5grid-scroll-bar-hover-bg; + } +} + +@mixin resizer($type: "horizontal") { + display: none; + &.live { + display: block; + position: absolute; + top: 0; + left: 0; + background: $ax5grid-resizer-color; + opacity: 0.5; + + @if ($type == "vertical") { + height: $ax5grid-resizer-size; + width: 100%; + cursor: row-resize; + } @else { + height: 100%; + width: $ax5grid-resizer-size; + cursor: col-resize; + } + + } +} + +// body +[data-ax5grid] { + box-sizing: border-box; + *, + *:before, + *:after { + box-sizing: border-box; + } + + [data-ax5grid-container="root"] { + @include gridBoxModal(); + position: relative; + background: $ax5grid-bg; + border: $ax5grid-border; + overflow: hidden; + + [data-ax5grid-container="hidden"] { + @include gridBoxModal(); + position: absolute; + //z-index: 100; + left: -100%; + top: -100%; + height: 100%; + width: 100%; + } + + [data-ax5grid-container="header"] { + user-select: none; + @include gridBoxModal(); + position: relative; + overflow: hidden; + @include ax-background(top, $ax5grid-header-column-bg-colors); + border: 0px none; + border-bottom: $ax5grid-header-column-border; + @include gridPanel("header"); + color: $ax5grid-header-column-color; + [data-ax5grid-column-resizer] { + position: absolute; + right: 0; + top: 0; + width: $ax5grid-header-column-resizer-size; + height: 100%; + cursor: col-resize; + &:hover { + background: $ax5grid-header-column-resizer-color; + opacity: 0.5; + } + } + [data-ax5grid-column-sort] { + position: relative; + //right: 0; + //top: 2px; + width: 10px; + height: 10px; + display: inline-block; + + @mixin sort-arrow($arrow-size, $ratio-0, $ratio-1, $arrow-color, $opacity, $direction) { + position: absolute; + content: ' '; + width: 0; + height: 0; + display: inline-block; + border-left: $arrow-size/$ratio-0 solid transparent; + border-right: $arrow-size/$ratio-0 solid transparent; + @if ($direction == "up") { + border-bottom: ($arrow-size)/$ratio-1 solid $arrow-color; + } @else { + border-top: ($arrow-size)/$ratio-1 solid $arrow-color; + } + background: transparent; + opacity: $opacity; + } + + &:before { + top: 0; + left: 0; + @include sort-arrow($ax5grid-header-sorter-size, 2.5, 2.2, $ax5grid-header-sorter-color, 0.3, "up"); + } + &:after { + bottom: 0; + left: 0; + @include sort-arrow($ax5grid-header-sorter-size, 2.5, 2.2, $ax5grid-header-sorter-color, 0.3, "down"); + } + + &[data-ax5grid-column-sort-order="asc"] { + &:before { + top: 2px; + left: 0; + @include sort-arrow($ax5grid-header-sorter-size + 1, 2.5, 2.0, $ax5grid-header-sorter-color, 0.8, "up"); + } + &:after { + display: none; + } + } + &[data-ax5grid-column-sort-order="desc"] { + &:before { + display: none; + } + &:after { + bottom: 2px; + left: 0; + @include sort-arrow($ax5grid-header-sorter-size + 1, 2.5, 2.0, $ax5grid-header-sorter-color, 0.8, "down"); + } + } + + } + [data-ax5grid-column-filter] { + // 개발중.. + $filter-size: 10px; + + position: absolute; + left: 0; + top: 0; + width: 10px; + height: 10px; + cursor: pointer; + + &:before { + content: ' '; + width: 0; + height: 0; + display: inline-block; + border-left: $filter-size/2 solid transparent; + border-right: $filter-size/2 solid transparent; + border-top: ($filter-size) solid #000; + background: transparent; + opacity: 1; + } + + } + } + + [data-ax5grid-container="body"] { + @include gridBoxModal(); + position: relative; + overflow: hidden; + @include gridPanel("body"); + + /* + @keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } + } + + [data-ax5grid-panel-scroll="body"]{ + table { + @include animation(fadein 0.3s); + } + } + */ + + } + + [data-ax5grid-container="page"] { + @include gridBoxModal(); + position: absolute; + bottom: 0; + left: 0; + width: 100%; + overflow: hidden; + @include ax-background(top, $ax5grid-page-bg-colors); + border: 0px none; + border-top: $ax5grid-page-border; + + [data-ax5grid-page="holder"] { + @include gridBoxModal(); + display: table; + //table-layout: fixed; + width: 100%; + height: 100%; + [data-ax5grid-page="navigation"] { + @include gridBoxModal(); + display: table-cell; + vertical-align: middle; + text-align: left; + padding-left: $ax5grid-page-navigation-padding; + font-size: $ax5grid-page-navigation-font-size; + + [data-ax5grid-page-navigation="holder"] { + display: table; + [data-ax5grid-page-navigation="cell"], [data-ax5grid-page-navigation="cell-paging"] { + display: table-cell; + vertical-align: middle; + } + [data-ax5grid-page-navigation="cell-paging"] { + padding: 0 $ax5grid-page-navigation-padding; + } + + [data-ax5grid-page-move] { + box-sizing: border-box; + min-width: $ax5grid-page-navigation-btn-min-width; + border-radius: $ax5grid-page-navigation-btn-border-radius; + padding: 1px; + border: $ax5grid-page-navigation-btn-border; + background: $ax5grid-page-navigation-btn-bg; + font-size: $ax5grid-page-navigation-btn-font-size; + color: $ax5grid-page-navigation-btn-color; + outline: 0; + + &[data-ax5grid-page-selected="true"], &:active { + background-color: $ax5grid-page-navigation-btn-hover-bg; + color: $ax5grid-page-navigation-btn-hover-color; + } + &:hover { + text-decoration: underline; + } + } + } + + } + [data-ax5grid-page="status"] { + @include gridBoxModal(); + display: table-cell; + text-align: right; + vertical-align: middle; + padding-right: $ax5grid-page-status-padding; + font-size: $ax5grid-page-status-font-size; + color: $ax5grid-page-status-color; + } + } + } + + [data-ax5grid-container="scroller"] { + @include gridBoxModal(); + position: absolute; + right: 0px; + bottom: 0px; + + $scroller-size: 15px; + [data-ax5grid-scroller="vertical"] { + box-sizing: border-box; + position: absolute; + display: none; + right: 0; + bottom: 0; + width: $scroller-size; + height: 100%; + background: $ax5grid-scroll-track-bg; + border-left: $ax5grid-scroll-track-border; + + [data-ax5grid-scroller="vertical-bar"] { + @include scrollBar("vertical-bar"); + } + } + [data-ax5grid-scroller="horizontal"] { + box-sizing: border-box; + position: absolute; + display: none; + right: 0; + bottom: 0; + height: $scroller-size; + width: 100%; + background: $ax5grid-scroll-track-bg; + border-top: $ax5grid-scroll-track-border; + + [data-ax5grid-scroller="horizontal-bar"] { + @include scrollBar("horizontal-bar"); + } + } + [data-ax5grid-scroller="corner"] { + position: absolute; + display: none; + right: 0px; + bottom: 0px; + width: $scroller-size; + height: $scroller-size; + + background: $ax5grid-scroll-corner-bg; + border-top: $ax5grid-scroll-track-border; + border-left: $ax5grid-scroll-track-border; + } + } + + [data-ax5grid-resizer="horizontal"] { + @include resizer("horizontal"); + } + [data-ax5grid-resizer="vertical"] { + @include resizer("vertical"); + } + } +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_ax5mask.scss b/_src/admin/scss/plugins/ax5ui/_ax5mask.scss new file mode 100644 index 0000000..9271d38 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5mask.scss @@ -0,0 +1,96 @@ +$ax5mask-z-index: 1000 !default; +$ax5mask-bg-opacity: 0.6 !default; + +$ax5mask-bg: #000 !default; +$ax5mask-text-color: #fff !default; +$ax5mask-text-shadow:0px 1px 0px #000 !default; + +$ax5mask-easing-time-open: 0.25s !default; +$ax5mask-easing-time-close: 0.25s !default; + +@mixin ax-mask() { + position: absolute; +} + +@mixin ax-panel-mask() { + position: absolute; +} + +// mixins --------------------------------------------- end + +@include keyframes(ax-mask) { + from { + opacity: 0.0; + } + to { + opacity: $ax5mask-bg-opacity; + } +} + +@include keyframes(ax-mask-fade-out) { + from { + opacity: $ax5mask-bg-opacity; + } + to { + opacity: 0.0; + } +} + +.ax-masking { + -webkit-filter: blur(3px); + //position: fixed; + @include transform(scale(0.96)); + @include transform(translateZ(0)); +} + +.ax-mask { + box-sizing: border-box; + *, + *:before, + *:after { + box-sizing: border-box; + } + + z-index: $ax5mask-z-index; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + .ax-mask-bg { + z-index: 1; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: $ax5mask-bg; + opacity: $ax5mask-bg-opacity; + } + .ax-mask-content { + z-index: 2; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + display: table; + vertical-align: middle; + text-align: center; + color: $ax5mask-text-color; + text-shadow: $ax5mask-text-shadow; + * { + color: inherit; + } + > div { + display: table-cell; + vertical-align: middle; + text-align: center; + } + } + + &.fade-out { + @include animation(ax-mask-fade-out $ax5mask-easing-time-close); + opacity: 0.0; + } +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_ax5modal.scss b/_src/admin/scss/plugins/ax5ui/_ax5modal.scss new file mode 100644 index 0000000..bcac75e --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5modal.scss @@ -0,0 +1,474 @@ +//============== +//== modal +$ax5modal-z-index: 2000 !default; +$ax5modal-box-model: border-box !default; +$ax5modal-bg: #fff !default; +$ax5modal-border: 1px solid #ddd !default; +$ax5modal-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.60) !default; +$ax5modal-body-padding: 0px !default; +$ax5modal-header-padding: 10px 15px !default; + +$ax5modal-header-addon-padding: 10px 10px !default; +$ax5modal-header-addon-btn-padding: 0px 2px !default; + +$ax5modal-border-radius: 4px !default; +$ax5modal-easing-time-open: 0.3s !default; +$ax5modal-easing-time-close: 0.3s !default; +$ax5modal-easing-open: $ease-out-back !default; +$ax5modal-easing-close: $ease-out-back !default; + +//== modal resizer +$ax5modal-resizer-bg: #ccc !default; +$ax5modal-resizer-border: 1px solid #ff0000 !default; +$ax5modal-resizer-box-shaodw: 0px 0px 5px 0px rgba(0, 0, 0, 0.60) !default; +$ax5modal-resizer-opacity : 0.3 !default; + +//** Border color for elements within dialog +$ax5modal-default-text: #222 !default; +$ax5modal-default-border: 1px solid #ddd !default; +$ax5modal-default-header-bg: #f5f5f5 !default; + +@mixin ax-modal() { + box-sizing: border-box; + *, + *:before, + *:after { + box-sizing: border-box; + } + + background-color: $ax5modal-bg; + border: $ax5modal-border; + + @include ax-border-radius($ax5modal-border-radius); + @include box-shadow($ax5modal-box-shadow); + + z-index: $ax5modal-z-index; + position: fixed; + left: 0px; + top: 0px; + //overflow: hidden; + box-sizing: content-box; +} + +@mixin ax-modal-section() { + .ax-modal-header { + user-select: none; + //font-size: 1em; + font-weight: 600; + padding: $ax5modal-header-padding; + border-bottom: 1px solid transparent; + border-top-left-radius: $ax5modal-border-radius; + border-top-right-radius: $ax5modal-border-radius; + + cursor: move; + .ax-modal-header-addon{ + position: absolute; + right: 0px; + top: 0px; + padding: $ax5modal-header-addon-padding; + [data-modal-header-btn]{ + border: 0; + padding: $ax5modal-header-addon-btn-padding; + background: transparent; + display: inline-block; + text-align: center; + cursor: pointer; + outline: 0; + } + } + } + .ax-modal-body { + border-bottom-left-radius: $ax5modal-border-radius; + border-bottom-right-radius: $ax5modal-border-radius; + + padding: $ax5modal-body-padding; + text-align: center; + @include flex(1); + position: relative; + overflow: hidden; + + iframe { + border: 0 none; + } + + .fadeIn{ + @include animation(ax-modal-fade-in $ax5modal-easing-time-open $ease-out-back forwards); + } + .fadeOut{ + @include animation(ax-modal-fade-out $ax5modal-easing-time-open $ease-out-back forwards); + } + } +} + +@mixin modal-variant($text-color, $border, $header-bg-color) { + .ax-modal-header { + color: $text-color; + background: $header-bg-color; + .ax-modal-header-addon{ + a{ + color: $text-color; + outline: 0; + } + } + } + .ax-modal-body { + + } +} + +@include keyframes(ax-modal) { + 0% { + opacity: 0.0; + //@include transform(translateY(20%)); + @include transform(scale(0.8)); + } + 100% { + opacity: 1.0; + @include transform(scale(1.0)); + } + /* + 0% { + opacity: 0.0; + -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 0.1% { + opacity: 1.0; + -webkit-transform: matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 5.9% { + -webkit-transform: matrix3d(0.711, 0, 0, 0, 0, 0.742, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.711, 0, 0, 0, 0, 0.742, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 7.7% { + -webkit-transform: matrix3d(0.768, 0, 0, 0, 0, 0.812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.768, 0, 0, 0, 0, 0.812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 11.5% { + -webkit-transform: matrix3d(0.869, 0, 0, 0, 0, 0.935, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.869, 0, 0, 0, 0, 0.935, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 11.7% { + -webkit-transform: matrix3d(0.873, 0, 0, 0, 0, 0.94, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.873, 0, 0, 0, 0, 0.94, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 15.2% { + -webkit-transform: matrix3d(0.941, 0, 0, 0, 0, 1.014, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.941, 0, 0, 0, 0, 1.014, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 17.5% { + -webkit-transform: matrix3d(0.973, 0, 0, 0, 0, 1.045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.973, 0, 0, 0, 0, 1.045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 19% { + -webkit-transform: matrix3d(0.99, 0, 0, 0, 0, 1.058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.99, 0, 0, 0, 0, 1.058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 22.8% { + -webkit-transform: matrix3d(1.019, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.019, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 23.2% { + -webkit-transform: matrix3d(1.021, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.021, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 30.3% { + -webkit-transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 30.4% { + -webkit-transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 37.5% { + -webkit-transform: matrix3d(1.028, 0, 0, 0, 0, 1.016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.028, 0, 0, 0, 0, 1.016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 44.6% { + -webkit-transform: matrix3d(1.016, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.016, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 50.3% { + -webkit-transform: matrix3d(1.008, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.008, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 51.7% { + -webkit-transform: matrix3d(1.006, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1.006, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 70.3% { + -webkit-transform: matrix3d(0.998, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.998, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 80.3% { + -webkit-transform: matrix3d(0.999, 0, 0, 0, 0, 1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(0.999, 0, 0, 0, 0, 1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + 100% { + -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + */ +} + +@include keyframes(ax-modal-destroy) { + /* + from { + @include transform(scale(1)); + opacity: 1.0; + } + to { + @include transform(scale(0.5)); + opacity: 0.0; + } + */ + 100% { + opacity: 0.0; + @include transform(translateY(20%)); + } + 0% { + opacity: 1.0; + @include transform(translateY(0)); + } + +} + +@include keyframes(ax-modal-fullscreen) { + 0% { + @include transform(translateY(20%)); + } + 100% { + @include transform(translateY(0)); + } +} + +@include keyframes(ax-modal-fullscreen-destroy) { + 0% { + @include transform(translateY(0)); + } + 100% { + @include transform(translateY(100%)); + } +} + +@include keyframes(ax-modal-fade-in){ + 0% { + opacity: 0.0; + } + 100% { + opacity: 1.0; + } +} + +@include keyframes(ax-modal-fade-out){ + 0% { + opacity: 1.0; + } + 100% { + opacity: 0.0; + } +} + +// mixins --------------------------------------------- end + +.ax5modal { + * { + box-sizing: border-box; + } + *:before, + *:after { + box-sizing: border-box; + } + + @include animation(ax-modal $ax5modal-easing-time-open $ax5modal-easing-open forwards); + @include transform(translateZ(0px)); + //@include transition(all $ax5modal-easing-time-open linear); + + @include ax-modal(); + @include ax-modal-section(); + @include modal-variant($ax5modal-default-text, $ax5modal-default-border, $ax5modal-default-header-bg); + + &.destroy { + @include animation(ax-modal-destroy $ax5modal-easing-time-close $ax5modal-easing-close forwards); + } + + &.fullscreen { + border: 0px none; + @include ax-border-radius(0px); + @include box-shadow(none); + @include animation(ax-modal-fullscreen $ax5modal-easing-time-open $ease-out-back forwards); + + &.destroy { + @include animation(ax-modal-fullscreen-destroy $ax5modal-easing-time-close $ease-out-expo forwards); + } + } + + &.draged{ + .ax-modal-header { + opacity: 0.5; + } + .ax-modal-body { + opacity: 0.5; + } + } + [data-ax5modal-resizer]{ + position: absolute; + display: block; + &:before{ + position: absolute; + content: ' '; + display: block; + width: auto; + height: auto; + left: auto; + top: auto; + right: auto; + bottom: auto; + //background: #ff3300; + //opacity: 0.3; + } + + &[data-ax5modal-resizer="top"]{ + left: 0; + top: 0; + width: 100%; + height: 0; + + &:before{ + width: 100%; + height: 8px; + left: 0; + top: -4px; + cursor: row-resize; + } + } + &[data-ax5modal-resizer="bottom"]{ + left: 0; + bottom: 0; + width: 100%; + height: 0; + + &:before{ + width: 100%; + height: 8px; + left: 0; + top: -4px; + cursor: row-resize; + } + } + &[data-ax5modal-resizer="left"]{ + left: 0; + top: 0; + width: 0; + height: 100%; + + &:before{ + width: 8px; + height: 100%; + left: -4px; + top: 0; + cursor: col-resize; + } + } + &[data-ax5modal-resizer="right"]{ + right: 0; + top: 0; + width: 0; + height: 100%; + + &:before{ + width: 8px; + height: 100%; + left: -4px; + top: 0; + cursor: col-resize; + } + } + &[data-ax5modal-resizer="top-left"]{ + left: 0; + top: 0; + width: 0; + height: 0; + + &:before{ + width: 8px; + height: 8px; + left: -4px; + top: -4px; + cursor: nwse-resize; + } + } + &[data-ax5modal-resizer="top-right"]{ + right: 0; + top: 0; + width: 0; + height: 0; + + &:before{ + width: 8px; + height: 8px; + left: -4px; + top: -4px; + cursor: nesw-resize; + } + } + &[data-ax5modal-resizer="bottom-left"]{ + left: 0; + bottom: 0; + width: 0; + height: 0; + + &:before{ + width: 8px; + height: 8px; + left: -4px; + top: -4px; + cursor: nesw-resize; + } + } + &[data-ax5modal-resizer="bottom-right"]{ + right: 0; + bottom: 0; + width: 0; + height: 0; + + &:before{ + width: 8px; + height: 8px; + left: -4px; + top: -4px; + cursor: nwse-resize; + } + } + } +} + +// resizer가 활성화 되면 리사이저 백그라운드도 함께 활성화 됩니다. 백그라운드는 페이지 전체를 투명 레이어로 덮어 리사이저가 자유롭게 활동 하도록 도와 줍니다. +.ax5modal-resizer-background{ + position: fixed; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + background: transparent; + z-index: $ax5modal-z-index; + //opacity: 0.1; + cursor: move; +} +.ax5modal-resizer{ + position: absolute; + left: 0px; + top: 0px; + + z-index: $ax5modal-z-index + 1; + cursor: move; + + box-sizing: $ax5modal-box-model; + background-color: $ax5modal-resizer-bg; + border: $ax5modal-resizer-border; + opacity: $ax5modal-resizer-opacity; + + @include ax-border-radius($ax5modal-border-radius); + @include box-shadow($ax5modal-box-shadow); +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_ax5picker.scss b/_src/admin/scss/plugins/ax5ui/_ax5picker.scss new file mode 100644 index 0000000..b5bef32 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5picker.scss @@ -0,0 +1,334 @@ +$ax5picker-z-index: 2000 !default; +$ax5picker-box-model: border-box !default; +$ax5picker-bg: #fff !default; +$ax5picker-inner-border: 1px solid !default; +$ax5picker-inner-border-color: #ddd !default; + +$ax5picker-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.175) !default; +$ax5picker-border-radius: 5px !default; + +$ax5picker-body-padding: 5px !default; +$ax5picker-heading-padding: 10px 15px !default; +$ax5picker-buttons-padding: 10px 0px 5px 0px !default; + +$ax5picker-content-border: 0px solid !default; +$ax5picker-content-border-color: none !default; +$ax5picker-content-border-radius: 0px !default; +$ax5picker-content-padding: 0px !default; + +$ax5picker-easing-time-open: 0.1s !default; +$ax5picker-easing-time-close: 0.1s !default; +$ax5picker-arrow-size: 10px !default; +$ax5picker-arrow-border-width: 1px !default; + +//** Border color for elements within dialog +$ax5picker-default-text: #222 !default; +$ax5picker-default-border-color: #ddd !default; +$ax5picker-default-heading-bg: #f5f5f5 !default; + +$ax5picker-primary-text: #fff !default; +$ax5picker-primary-border-color: $brand-primary !default; +$ax5picker-primary-heading-bg: $brand-primary !default; + +$ax5picker-success-text: #3c763d !default; +$ax5picker-success-border-color: #dff0d8 !default; +$ax5picker-success-heading-bg: darken(adjust-hue(#dff0d8, -10), 5%) !default; + +$ax5picker-info-text: #31708f !default; +$ax5picker-info-border-color: #d9edf7 !default; +$ax5picker-info-heading-bg: darken(adjust-hue(#d9edf7, -10), 5%) !default; + +$ax5picker-warning-text: #8a6d3b !default; +$ax5picker-warning-border-color: #fcf8e3 !default; +$ax5picker-warning-heading-bg: darken(adjust-hue(#fcf8e3, -10), 5%) !default; + +$ax5picker-danger-text: #a94442 !default; +$ax5picker-danger-border-color: #f2dede !default; +$ax5picker-danger-heading-bg: darken(adjust-hue(#f2dede, -10), 5%) !default; + +@mixin ax-picker() { + box-sizing: border-box; + *, + *:before, + *:after { + box-sizing: border-box; + } + + z-index: $ax5picker-z-index; + position: absolute; + left: 0px; + top: 0px; + //overflow: hidden; +} + +@mixin picker-variant($text-color, $border-color, $heading-bg-color) { + + @include ax-background($ax5picker-bg); + border: $ax5picker-inner-border; + border-color: $border-color; + border-radius: $ax5picker-border-radius; + box-shadow: $ax5picker-box-shadow; + + .ax-picker-heading { + font-weight: 600; + padding: $ax5picker-heading-padding; + border-bottom: 1px solid transparent; + @include border-top-radius($ax5picker-border-radius - 1); + + color: $text-color; + @include ax-background($heading-bg-color); + .badge { + font-size: 0.8em; + color: $heading-bg-color; + @include ax-background($text-color); + } + } + .ax-picker-body { + padding: $ax5picker-body-padding; + text-align: center; + .ax-picker-content { + min-width: 50px; + + .ax-picker-content-box { + border: $ax5picker-content-border; + border-color: $ax5picker-content-border-color; + border-radius: $ax5picker-content-border-radius; + padding: $ax5picker-content-padding; + overflow: hidden; + } + } + .ax-picker-buttons { + padding: $ax5picker-buttons-padding; + button { + &:not(:last-child) { + margin-right: 3px; + } + } + } + } + + &.direction-top { + .ax-picker-arrow { + @include picker-arrow($ax5picker-arrow-size, $ax5picker-arrow-border-width, $border-color, top); + } + } + &.direction-right { + .ax-picker-arrow { + @include picker-arrow($ax5picker-arrow-size, $ax5picker-arrow-border-width, $border-color, right); + } + } + &.direction-bottom { + .ax-picker-arrow { + @include picker-arrow($ax5picker-arrow-size, $ax5picker-arrow-border-width, $border-color, bottom); + } + } + &.direction-left { + .ax-picker-arrow { + @include picker-arrow($ax5picker-arrow-size, $ax5picker-arrow-border-width, $border-color, left); + } + } + +} + +@mixin picker-arrow($arrow-size, $arrow-border-width, $border-color, $arrow-direction) { + + // + //@debug( nth($ax5picker-inner-border, 3) ); + $arrow-bg: nth($ax5picker-bg, 1); + $arrow-border-color: $border-color; + + position: absolute; + width: 0; + height: 0; + + @if ($arrow-direction == top) { + left: 50%; + top: 0px; + } @else if ($arrow-direction == right) { + right: 0px; + top: 50%; + } @else if ($arrow-direction == bottom) { + left: 50%; + bottom: 0px; + } @else if ($arrow-direction == left) { + left: 0px; + top: 50%; + } + + &:before { + content: ' '; + position: absolute; + width: 0; + height: 0; + + @if ($arrow-direction == top) { + left: - ($arrow-size); + top: - ($arrow-size * 2); + border-left: $arrow-size solid transparent; + border-right: $arrow-size solid transparent; + border-bottom: ($arrow-size * 2) solid $arrow-border-color; + } @else if ($arrow-direction == right) { + right: - ($arrow-size * 2); + top: - ($arrow-size); + border-top: $arrow-size solid transparent; + border-bottom: $arrow-size solid transparent; + border-left: ($arrow-size * 2) solid $arrow-border-color; + } @else if ($arrow-direction == bottom) { + left: - ($arrow-size); + bottom: - ($arrow-size * 2); + border-left: $arrow-size solid transparent; + border-right: $arrow-size solid transparent; + border-top: ($arrow-size * 2) solid $arrow-border-color; + } @else if ($arrow-direction == left) { + left: - ($arrow-size * 2); + top: - ($arrow-size); + border-top: $arrow-size solid transparent; + border-bottom: $arrow-size solid transparent; + border-right: ($arrow-size * 2) solid $arrow-border-color; + } + } + + &:after { + content: ' '; + position: absolute; + width: 0; + height: 0; + + @if ($arrow-direction == top) { + left: - ($arrow-size); + top: - ($arrow-size * 2) + ($arrow-border-width * 2); + border-left: ($arrow-size) solid transparent; + border-right: ($arrow-size) solid transparent; + border-bottom: ($arrow-size * 2) solid $arrow-bg; + } @else if ($arrow-direction == right) { + right: - ($arrow-size * 2) + ($arrow-border-width * 2); + top: - ($arrow-size); + border-top: ($arrow-size) solid transparent; + border-bottom: ($arrow-size) solid transparent; + border-left: ($arrow-size * 2) solid $arrow-bg; + } @else if ($arrow-direction == bottom) { + left: - ($arrow-size); + bottom: - ($arrow-size * 2) + ($arrow-border-width * 2); + border-left: ($arrow-size) solid transparent; + border-right: ($arrow-size) solid transparent; + border-top: ($arrow-size * 2) solid $arrow-bg; + } @else if ($arrow-direction == left) { + left: - ($arrow-size * 2) + ($arrow-border-width * 2); + top: - ($arrow-size); + border-top: ($arrow-size) solid transparent; + border-bottom: ($arrow-size) solid transparent; + border-right: ($arrow-size * 2) solid $arrow-bg; + } + } +} + +@include keyframes(ax-picker) { + + 0% { + opacity: 0.0; + //@include transform(scale(0)); + @include transform(translate(0, -10%)); + } + + 100% { + opacity: 1.0; + //@include transform(scale(1)); + @include transform(translate(0, 0)); + } +} + +@include keyframes(ax-picker-destroy) { + from { + //@include transform(scale(1)); + opacity: 1.0; + @include transform(translate(0, 0)); + } + to { + //@include transform(scale(0.95)); + opacity: 0.0; + @include transform(translate(0, -10%)); + } +} + +// mixins --------------------------------------------- end + +.ax5-ui-picker { + + @include ax-picker(); + + @include perspective(1000px); + @include transform-style(preserve-3d); + + @include animation(ax-picker $ax5picker-easing-time-open); + @include transform(translateZ(0)); + @include transform-origin(center top); + /* flip type + @include backface-visibility(visible); + @include transform(translateY(0%) rotateX(0deg)); + */ + + @include picker-variant($ax5picker-default-text, $ax5picker-default-border-color, $ax5picker-default-heading-bg); + + &.primary { + @include picker-variant($ax5picker-primary-text, $ax5picker-primary-border-color, $ax5picker-primary-heading-bg); + } + &.success { + @include picker-variant($ax5picker-success-text, $ax5picker-success-border-color, $ax5picker-success-heading-bg); + } + &.info { + @include picker-variant($ax5picker-info-text, $ax5picker-info-border-color, $ax5picker-info-heading-bg); + } + &.warning { + @include picker-variant($ax5picker-warning-text, $ax5picker-warning-border-color, $ax5picker-warning-heading-bg); + } + &.danger { + @include picker-variant($ax5picker-danger-text, $ax5picker-danger-border-color, $ax5picker-danger-heading-bg); + } + + &.destroy { + @include animation(ax-picker-destroy $ax5picker-easing-time-close $ease-in-back forwards); + } + + &.direction-top { + @include transform-origin(center top); + } + &.direction-right { + @include transform-origin(right center); + } + &.direction-bottom { + @include transform-origin(center bottom); + + } + &.direction-left { + @include transform-origin(left center); + } +} + +// picker handle + +@mixin ax5picker-handle(){ + &[data-ax5picker] { + .input-group-addon { + cursor: pointer; + + &:not(:last-child) { + border-left: 0 none; + border-right: 0 none; + } + + &.color-preview{ + padding: 0; + } + [data-ax5picker-color="preview"]{ + display: block; + } + } + } +} + +.input-group { + @include ax5picker-handle(); +} +.form-group { + @include ax5picker-handle(); +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_ax5toast.scss b/_src/admin/scss/plugins/ax5ui/_ax5toast.scss new file mode 100644 index 0000000..412deac --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_ax5toast.scss @@ -0,0 +1,256 @@ +//============== toast +$ax5toast-z-index: 2000; +// 0:left,top / 1:right,top / 2:right,bottom / 3:left,bottom +$ax5toast-container-width: auto !default; +$ax5toast-container-padding: 10px !default; +$ax5toast-box-model: border-box !default; +$ax5toast-border: 1px solid rgb(255/2, 255/2, 255/2) !default; +$ax5toast-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.175) !default; +$ax5toast-body-padding: 6px !default; +$ax5toast-border-radius: 8px !default; +$ax5toast-opacity: 0.9 !default; +$ax5toast-box-margin: 5px 0px 5px 0px !default; +$ax5toast-icon-size: 24px; +$ax5toast-easing: $ease-in-out-quint; +$ax5toast-easing-time: 0.3s; + +//** Border color for elements within toast +$ax5toast-default-text: #282828 !default; +$ax5toast-default-bg: #fff !default; +$ax5toast-default-color: $body-color !default; + +$ax5toast-primary-text: $brand-primary !default; +$ax5toast-primary-bg: #fff !default; +$ax5toast-primary-color: $brand-primary !default; + +$ax5toast-success-text: $brand-success !default; +$ax5toast-success-bg: #fff !default; +$ax5toast-success-color: $brand-success !default; + +$ax5toast-info-text: $brand-info !default; +$ax5toast-info-bg: #fff !default; +$ax5toast-info-color: $brand-info !default; + +$ax5toast-warning-text: #fff !default; +$ax5toast-warning-bg: $brand-warning !default; +$ax5toast-warning-color: $brand-warning !default; + +$ax5toast-danger-text: #fff !default; +$ax5toast-danger-bg: $brand-warning !default; +$ax5toast-danger-color: $brand-danger !default; + +@mixin ax-toast() { + box-sizing: $ax5toast-box-model; + border: $ax5toast-border; + opacity: $ax5toast-opacity; + + @include ax-border-radius($ax5toast-border-radius); + box-shadow: $ax5toast-box-shadow; + position: relative; + margin: $ax5toast-box-margin; +} + +@mixin ax-toast-section() { + display: table; + padding: $ax5toast-body-padding; + .ax-toast-icon { + display: table-cell; + padding: $ax5toast-body-padding; + text-align: left; + font-size: $ax5toast-icon-size; + width: $ax5toast-icon-size; + vertical-align: middle; + } + .ax-toast-body { + display: table-cell; + padding: $ax5toast-body-padding; + text-align: left; + vertical-align: middle; + } + .ax-toast-buttons { + display: table-cell; + padding: $ax5toast-body-padding; + text-align: right; + vertical-align: middle; + button { + &:not(:last-child) { + margin-right: 3px; + } + } + } + .ax-toast-close { + display: table-cell; + padding: $ax5toast-body-padding; + text-align: right; + vertical-align: top; + text-decoration: none; + cursor: pointer; + } +} + +@mixin toast-variant($text-color, $bg-color, $color) { + background: $bg-color; + color: $text-color; + .ax-toast-icon { + color: $color; + } + .ax-toast-close { + color: $text-color; + } +} + +@include keyframes(ax-toast-bottom) { + from { + @include transform(translateY(-100px) scale(0.7)); + } + to { + //@include opacity($mask-bg-opacity); + @include transform(translateY(0px) scale(1)) + } +} + +@include keyframes(ax-toast-top) { + from { + @include transform(translateY(100px) scale(0.7)); + } + to { + //@include opacity($mask-bg-opacity); + @include transform(translateY(0px) scale(1)) + } +} + +@include keyframes(ax-toast-removed-bottom) { + from { + @include transform(translateY(0px)); + opacity: 1.0; + } + to { + @include transform(translateY(10px) scale(0.7)); + opacity: 0.0; + } +} + +@include keyframes(ax-toast-removed-top) { + from { + @include transform(translateY(0px)); + opacity: 1.0; + } + to { + @include transform(translateY(-10px) scale(0.7)); + opacity: 0.0; + } +} + +@include keyframes(ax-toast-destroy) { + from { + @include transform(scale(1)); + opacity: 1.0; + } + to { + @include transform(scale(1.5)); + opacity: 0.0; + } +} + +// mixins --------------------------------------------- end + +.ax5-ui-toast-container { + z-index: $ax5toast-z-index; + position: fixed; + width: $ax5toast-container-width; + padding: $ax5toast-container-padding; + + box-sizing: border-box; + *, + *:before, + *:after { + box-sizing: border-box; + } + + .ax5-ui-toast { + @include ax-toast(); + @include ax-toast-section(); + @include transition(all $ax5toast-easing-time ease-in-out); + + @include toast-variant($ax5toast-default-text, $ax5toast-default-bg, $ax5toast-default-color); + + &.primary { + @include toast-variant($ax5toast-primary-text, $ax5toast-primary-bg, $ax5toast-primary-color); + } + &.success { + @include toast-variant($ax5toast-success-text, $ax5toast-success-bg, $ax5toast-success-color); + } + &.info { + @include toast-variant($ax5toast-info-text, $ax5toast-info-bg, $ax5toast-info-color); + } + &.warning { + @include toast-variant($ax5toast-warning-text, $ax5toast-warning-bg, $ax5toast-warning-color); + } + &.danger { + @include toast-variant($ax5toast-danger-text, $ax5toast-danger-bg, $ax5toast-danger-color); + } + } + + &.bottom-left { + left: 0; + bottom: 0; + + .ax5-ui-toast { + @include animation(ax-toast-top $ax5toast-easing-time $ax5toast-easing); + &.removed { + @include animation(ax-toast-removed-bottom $ax5toast-easing-time ease forwards); + } + &.destroy { + @include animation(ax-toast-destroy $ax5toast-easing-time ease forwards); + } + } + } + &.bottom-right { + right: 0; + bottom: 0; + + .ax5-ui-toast { + @include animation(ax-toast-top $ax5toast-easing-time $ax5toast-easing); + &.removed { + @include animation(ax-toast-removed-bottom $ax5toast-easing-time ease forwards); + } + &.destroy { + @include animation(ax-toast-destroy $ax5toast-easing-time ease forwards); + } + } + + } + + &.top-left { + left: 0; + top: 0; + + .ax5-ui-toast { + @include animation(ax-toast-bottom $ax5toast-easing-time $ax5toast-easing); + + &.removed { + @include animation(ax-toast-removed-top $ax5toast-easing-time ease forwards); + } + &.destroy { + @include animation(ax-toast-destroy $ax5toast-easing-time ease forwards); + } + } + } + + &.top-right { + right: 0; + top: 0; + + .ax5-ui-toast { + @include animation(ax-toast-bottom $ax5toast-easing-time $ax5toast-easing); + &.removed { + @include animation(ax-toast-removed-top $ax5toast-easing-time ease forwards); + } + &.destroy { + @include animation(ax-toast-destroy $ax5toast-easing-time ease forwards); + } + } + } + +} + diff --git a/_src/admin/scss/plugins/ax5ui/_bourbon_support.scss b/_src/admin/scss/plugins/ax5ui/_bourbon_support.scss new file mode 100644 index 0000000..955fc53 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_bourbon_support.scss @@ -0,0 +1,537 @@ +$output-bourbon-deprecation-warnings: false !default; + +/// @type cubic-bezier +$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); +$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); +$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); +$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); +$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); +$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); +$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); +$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); + +$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); +$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); +$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); +$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); +$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); +$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); +$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); +$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); + +$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); +$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); +$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); +$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); +$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); +$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); +$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); +$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); + +$prefix-for-webkit: true !default; +$prefix-for-mozilla: true !default; +$prefix-for-microsoft: true !default; +$prefix-for-opera: true !default; +$prefix-for-spec: true !default; + +@mixin disable-prefix-for-all() { + $prefix-for-webkit: false !global; + $prefix-for-mozilla: false !global; + $prefix-for-microsoft: false !global; + $prefix-for-opera: false !global; + $prefix-for-spec: false !global; +} + +// Opacity +@mixin opacity($opacity) { + opacity: $opacity; + // IE8 filter + $opacity-ie: ($opacity * 100); + filter: alpha(opacity=$opacity-ie); +} + +@mixin keyframes($name) { + $original-prefix-for-webkit: $prefix-for-webkit; + $original-prefix-for-mozilla: $prefix-for-mozilla; + $original-prefix-for-microsoft: $prefix-for-microsoft; + $original-prefix-for-opera: $prefix-for-opera; + $original-prefix-for-spec: $prefix-for-spec; + + @if $original-prefix-for-webkit { + @include disable-prefix-for-all(); + $prefix-for-webkit: true !global; + @-webkit-keyframes #{$name} { + @content; + } + } + + @if $original-prefix-for-mozilla { + @include disable-prefix-for-all(); + $prefix-for-mozilla: true !global; + @-moz-keyframes #{$name} { + @content; + } + } + + $prefix-for-webkit: $original-prefix-for-webkit !global; + $prefix-for-mozilla: $original-prefix-for-mozilla !global; + $prefix-for-microsoft: $original-prefix-for-microsoft !global; + $prefix-for-opera: $original-prefix-for-opera !global; + $prefix-for-spec: $original-prefix-for-spec !global; + + @if $original-prefix-for-spec { + @keyframes #{$name} { + @content; + } + } +} + +///// bourbon support + +// Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content +@mixin keyframes($name) { + $original-prefix-for-webkit: $prefix-for-webkit; + $original-prefix-for-mozilla: $prefix-for-mozilla; + $original-prefix-for-microsoft: $prefix-for-microsoft; + $original-prefix-for-opera: $prefix-for-opera; + $original-prefix-for-spec: $prefix-for-spec; + + @if $original-prefix-for-webkit { + @include disable-prefix-for-all(); + $prefix-for-webkit: true !global; + @-webkit-keyframes #{$name} { + @content; + } + } + + @if $original-prefix-for-mozilla { + @include disable-prefix-for-all(); + $prefix-for-mozilla: true !global; + @-moz-keyframes #{$name} { + @content; + } + } + + $prefix-for-webkit: $original-prefix-for-webkit !global; + $prefix-for-mozilla: $original-prefix-for-mozilla !global; + $prefix-for-microsoft: $original-prefix-for-microsoft !global; + $prefix-for-opera: $original-prefix-for-opera !global; + $prefix-for-spec: $original-prefix-for-spec !global; + + @if $original-prefix-for-spec { + @keyframes #{$name} { + @content; + } + } +} + +@mixin transform($property: none) { + // none | + @include prefixer(transform, $property, webkit moz ms o spec); +} + +@mixin transform-origin($axes: 50%) { + // x-axis - left | center | right | length | % + // y-axis - top | center | bottom | length | % + // z-axis - length + @include prefixer(transform-origin, $axes, webkit moz ms o spec); +} + +@mixin transform-style($style: flat) { + @include prefixer(transform-style, $style, webkit moz ms o spec); +} + +@mixin display($value) { + // flex | inline-flex + @if $value == "flex" { + // 2009 + display: -webkit-box; + display: -moz-box; + display: box; + + // 2012 + display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; // 2011 (IE 10) + display: flex; + } @else if $value == "inline-flex" { + display: -webkit-inline-box; + display: -moz-inline-box; + display: inline-box; + + display: -webkit-inline-flex; + display: -moz-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + } @else { + display: $value; + } +} + +// 2009 - box-flex (integer) +// 2011 - flex (decimal | width decimal) +// 2012 - flex (integer integer width) +@mixin flex($value) { + // Grab flex-grow for older browsers. + $flex-grow: nth($value, 1); + + // 2009 + @include prefixer(box-flex, $flex-grow, webkit moz spec); + + // 2011 (IE 10), 2012 + @include prefixer(flex, $value, webkit moz ms spec); +} + +// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis) +// - box-direction (normal | reverse) +// 2011 - flex-direction (row | row-reverse | column | column-reverse) +// 2012 - flex-direction (row | row-reverse | column | column-reverse) +@mixin flex-direction($value: row) { + // Alt values. + $value-2009: $value; + $value-2011: $value; + $direction: normal; + + @if $value == row { + $value-2009: horizontal; + } @else if $value == "row-reverse" { + $value-2009: horizontal; + $direction: reverse; + } @else if $value == column { + $value-2009: vertical; + } @else if $value == "column-reverse" { + $value-2009: vertical; + $direction: reverse; + } + + // 2009 + @include prefixer(box-orient, $value-2009, webkit moz spec); + @include prefixer(box-direction, $direction, webkit moz spec); + + // 2012 + @include prefixer(flex-direction, $value, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-direction: $value; +} + +// 2009 - box-lines (single | multiple) +// 2011 - flex-wrap (nowrap | wrap | wrap-reverse) +// 2012 - flex-wrap (nowrap | wrap | wrap-reverse) +@mixin flex-wrap($value: nowrap) { + // Alt values + $alt-value: $value; + @if $value == nowrap { + $alt-value: single; + } @else if $value == wrap { + $alt-value: multiple; + } @else if $value == "wrap-reverse" { + $alt-value: multiple; + } + + @include prefixer(box-lines, $alt-value, webkit moz spec); + @include prefixer(flex-wrap, $value, webkit moz ms spec); +} + +// 2009 - TODO: parse values into flex-direction/flex-wrap +// 2011 - TODO: parse values into flex-direction/flex-wrap +// 2012 - flex-flow (flex-direction || flex-wrap) +@mixin flex-flow($value) { + @include prefixer(flex-flow, $value, webkit moz spec); +} + +// 2009 - box-ordinal-group (integer) +// 2011 - flex-order (integer) +// 2012 - order (integer) +@mixin order($int: 0) { + // 2009 + @include prefixer(box-ordinal-group, $int, webkit moz spec); + + // 2012 + @include prefixer(order, $int, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-order: $int; +} + +// 2012 - flex-grow (number) +@mixin flex-grow($number: 0) { + @include prefixer(flex-grow, $number, webkit moz spec); + -ms-flex-positive: $number; +} + +// 2012 - flex-shrink (number) +@mixin flex-shrink($number: 1) { + @include prefixer(flex-shrink, $number, webkit moz spec); + -ms-flex-negative: $number; +} + +// 2012 - flex-basis (number) +@mixin flex-basis($width: auto) { + @include prefixer(flex-basis, $width, webkit moz spec); + -ms-flex-preferred-size: $width; +} + +// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. +// Example: @include transition (all 2s ease-in-out); +// @include transition (opacity 1s ease-in 2s, width 2s ease-out); +// @include transition-property (transform, opacity); + +@mixin transition($properties...) { + // Fix for vendor-prefix transform property + $needs-prefixes: false; + $webkit: (); + $moz: (); + $spec: (); + + // Create lists for vendor-prefixed transform + @each $list in $properties { + @if nth($list, 1) == "transform" { + $needs-prefixes: true; + $list1: -webkit-transform; + $list2: -moz-transform; + $list3: (); + + @each $var in $list { + $list3: join($list3, $var); + + @if $var != "transform" { + $list1: join($list1, $var); + $list2: join($list2, $var); + } + } + + $webkit: append($webkit, $list1); + $moz: append($moz, $list2); + $spec: append($spec, $list3); + } @else { + $webkit: append($webkit, $list, comma); + $moz: append($moz, $list, comma); + $spec: append($spec, $list, comma); + } + } + + @if $needs-prefixes { + -webkit-transition: $webkit; + -moz-transition: $moz; + transition: $spec; + } @else { + @if length($properties) >= 1 { + @include prefixer(transition, $properties, webkit moz spec); + } @else { + $properties: all 0.15s ease-out 0s; + @include prefixer(transition, $properties, webkit moz spec); + } + } +} + +@mixin transition-property($properties...) { + -webkit-transition-property: transition-property-names($properties, "webkit"); + -moz-transition-property: transition-property-names($properties, "moz"); + transition-property: transition-property-names($properties, false); +} + +@mixin transition-duration($times...) { + @include prefixer(transition-duration, $times, webkit moz spec); +} + +@mixin transition-timing-function($motions...) { + // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() + @include prefixer(transition-timing-function, $motions, webkit moz spec); +} + +@mixin transition-delay($times...) { + @include prefixer(transition-delay, $times, webkit moz spec); +} + +// http://www.w3.org/TR/css3-animations/#the-animation-name-property- +// Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. + +@mixin animation($animations...) { + @include prefixer(animation, $animations, webkit moz spec); +} + +@mixin animation-name($names...) { + @include prefixer(animation-name, $names, webkit moz spec); +} + +@mixin animation-duration($times...) { + @include prefixer(animation-duration, $times, webkit moz spec); +} + +@mixin animation-timing-function($motions...) { + // ease | linear | ease-in | ease-out | ease-in-out + @include prefixer(animation-timing-function, $motions, webkit moz spec); +} + +@mixin animation-iteration-count($values...) { + // infinite | + @include prefixer(animation-iteration-count, $values, webkit moz spec); +} + +@mixin animation-direction($directions...) { + // normal | alternate + @include prefixer(animation-direction, $directions, webkit moz spec); +} + +@mixin animation-play-state($states...) { + // running | paused + @include prefixer(animation-play-state, $states, webkit moz spec); +} + +@mixin animation-delay($times...) { + @include prefixer(animation-delay, $times, webkit moz spec); +} + +@mixin animation-fill-mode($modes...) { + // none | forwards | backwards | both + @include prefixer(animation-fill-mode, $modes, webkit moz spec); +} + +@mixin linear-gradient($pos, $g1, $g2: null, + $g3: null, $g4: null, + $g5: null, $g6: null, + $g7: null, $g8: null, + $g9: null, $g10: null, + $fallback: null) { + + // Detect what type of value exists in $pos + $pos-type: type-of(nth($pos, 1)); + $pos-spec: null; + $pos-degree: null; + + // If $pos is missing from mixin, reassign vars and add default position + @if ($pos-type == color) or (nth($pos, 1) == "transparent") { + $g10: $g9; $g9: $g8; $g8: $g7; $g7: $g6; $g6: $g5; + $g5: $g4; $g4: $g3; $g3: $g2; $g2: $g1; $g1: $pos; + $pos: null; + } + + @if $pos { + $positions: _linear-positions-parser($pos); + $pos-degree: nth($positions, 1); + $pos-spec: nth($positions, 2); + } + + $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; + + // Set $g1 as the default fallback color + $fallback-color: nth($g1, 1); + + // If $fallback is a color use that color as the fallback color + @if (type-of($fallback) == color) or ($fallback == "transparent") { + $fallback-color: $fallback; + } + + background-color: $fallback-color; + background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome + background-image: unquote("linear-gradient(#{$pos-spec}#{$full})"); +} + +@function _linear-positions-parser($pos) { + $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings; + $output-bourbon-deprecation-warnings: false !global; + + $type: type-of(nth($pos, 1)); + $spec: null; + $degree: null; + $side: null; + $corner: null; + $length: length($pos); + // Parse Side and corner positions + @if ($length > 1) { + @if nth($pos, 1) == "to" { // Newer syntax + $side: nth($pos, 2); + + @if $length == 2 { // eg. to top + // Swap for backwards compatibility + $degree: _position-flipper(nth($pos, 2)); + } + @else if $length == 3 { // eg. to top left + $corner: nth($pos, 3); + } + } + @else if $length == 2 { // Older syntax ("top left") + $side: _position-flipper(nth($pos, 1)); + $corner: _position-flipper(nth($pos, 2)); + } + + @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") { + $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); + } + @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") { + $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); + } + @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") { + $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); + } + @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") { + $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); + } + $spec: to $side $corner; + } + @else if $length == 1 { + // Swap for backwards compatibility + @if $type == string { + $degree: $pos; + $spec: to _position-flipper($pos); + } + @else { + $degree: -270 - $pos; //rotate the gradient opposite from spec + $spec: $pos; + } + } + $degree: unquote($degree + ","); + $spec: unquote($spec + ","); + + $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global; + + @return $degree $spec; +} + +@function _position-flipper($pos) { + @return if($pos == left, right, null) + if($pos == right, left, null) + if($pos == top, bottom, null) + if($pos == bottom, top, null); +} + +/// border-radius +@mixin border-top-radius($radii) { + border-top-left-radius: $radii; + border-top-right-radius: $radii; +} + +@mixin border-right-radius($radii) { + border-bottom-right-radius: $radii; + border-top-right-radius: $radii; +} + +@mixin border-bottom-radius($radii) { + border-bottom-left-radius: $radii; + border-bottom-right-radius: $radii; +} + +@mixin border-left-radius($radii) { + border-bottom-left-radius: $radii; + border-top-left-radius: $radii; +} + +/// perspective +@mixin perspective($depth: none) { + @include prefixer(perspective, $depth, webkit moz spec); +} + +@mixin perspective-origin($value: 50% 50%) { + @include prefixer(perspective-origin, $value, webkit moz spec); +} + +//// ellipsis +@mixin ellipsis($width: 100%) { + display: inline-block; + max-width: $width; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-wrap: normal; +} \ No newline at end of file diff --git a/_src/admin/scss/plugins/ax5ui/_mixin.scss b/_src/admin/scss/plugins/ax5ui/_mixin.scss new file mode 100644 index 0000000..796f1b3 --- /dev/null +++ b/_src/admin/scss/plugins/ax5ui/_mixin.scss @@ -0,0 +1,127 @@ +/*! + * Copyright (c) 2017. tom@axisj.com + * - github.com/thomasjang + * - www.axisj.com + */ + +$hack_ie67: '.'; + +@mixin placeholder($color: $input-color-placeholder) { + // Firefox + &::-moz-placeholder { + color: $color; + opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 + } + &:-ms-input-placeholder { + color: $color; + } + // Internet Explorer 10+ + &::-webkit-input-placeholder { + color: $color; + } + // Safari and Chrome +} + +@mixin prefixer($property, $value, $prefixes) { + @each $prefix in $prefixes { + @if $prefix == webkit { + @if $prefix-for-webkit { + -webkit-#{$property}: $value; + } + } @else if $prefix == moz { + @if $prefix-for-mozilla { + -moz-#{$property}: $value; + } + } @else if $prefix == ms { + @if $prefix-for-microsoft { + -ms-#{$property}: $value; + } + } @else if $prefix == o { + @if $prefix-for-opera { + -o-#{$property}: $value; + } + } @else if $prefix == spec { + @if $prefix-for-spec { + #{$property}: $value; + } + } @else { + @warn "Unrecognized prefix: #{$prefix}"; + } + } +} + +@mixin box-shadow($shadows...) { + @include prefixer(box-shadow, $shadows, spec); +} + +@mixin background-size($lengths...) { + @include prefixer(background-size, $lengths, spec); +} + +@mixin ax-border-radius($border-radius, $direction:"", $adjust:0) { + @if (type_of($border-radius) == "list") { + @if ($direction == "") { + border-top-left-radius: nth($border-radius, 1)+$adjust; + border-top-right-radius: nth($border-radius, 2)+$adjust; + border-bottom-right-radius: nth($border-radius, 3)+$adjust; + border-bottom-left-radius: nth($border-radius, 4)+$adjust; + } @else if ($direction == "top") { + border-top-left-radius: nth($border-radius, 1)+$adjust; + border-top-right-radius: nth($border-radius, 2)+$adjust; + } @else if ($direction == "bottom") { + border-bottom-right-radius: nth($border-radius, 3)+$adjust; + border-bottom-left-radius: nth($border-radius, 4)+$adjust; + } @else if ($direction == "left") { + border-top-left-radius: nth($border-radius, 1)+$adjust; + border-bottom-left-radius: nth($border-radius, 4)+$adjust; + } @else if ($direction == "right") { + border-top-right-radius: nth($border-radius, 2)+$adjust; + border-bottom-right-radius: nth($border-radius, 3)+$adjust; + } + } @else { + @if ($direction == "") { + border-radius: $border-radius+$adjust; + } @else if ($direction == "top") { + border-top-left-radius: $border-radius+$adjust; + border-top-right-radius: $border-radius+$adjust; + } @else if ($direction == "bottom") { + border-bottom-left-radius: $border-radius+$adjust; + border-bottom-right-radius: $border-radius+$adjust; + } @else if ($direction == "left") { + border-top-left-radius: $border-radius+$adjust; + border-bottom-left-radius: $border-radius+$adjust; + } @else if ($direction == "right") { + border-top-right-radius: $border-radius+$adjust; + border-bottom-right-radius: $border-radius+$adjust; + } + } +} + +@mixin ax-background($pos, $g1: null, $g2: null) { + + $pos-type: type-of(nth($pos, 1)); + + // If $pos is missing from mixin, reassign vars and add default position + @if ($pos-type == color) or (nth($pos, 1) == "transparent") { + $g2: $g1; + $g1: $pos; + $pos: to top; + } @else if ($g1 == null) { + $g1: $pos; + $pos: to top; + } + + // @debug($g1); + @if (length($g1) == 2) { + $g2: nth($g1, 2); + $g1: nth($g1, 1); + @include linear-gradient($pos, $g1, $g2); + } @else if (length($g1) == 3) { + @include linear-gradient(nth($g1, 1), nth($g1, 2), nth($g1, 3)); + } @else { + @if (type_of(nth($g2, 1)) == color) { + $g2: nth($g2, 1); + } + @include linear-gradient($pos, $g1, $g2); + } +} diff --git a/_src/common/js/global.js b/_src/common/js/global.js index c8bc0b7..0095333 100644 --- a/_src/common/js/global.js +++ b/_src/common/js/global.js @@ -3,32 +3,6 @@ ***********************************************************************************/ if(!window.console || !window.console.log) {window.console = {log : function(){}};} - -/*********************************************************************************** - * AJAX Error 및 BlockUI 처리 - ***********************************************************************************/ -$(function(){ - $(document).ajaxError(function(event, request, settings){ - var message = '알수없는 오류가 발생하였습니다.'; - if( typeof request.responseJSON != 'undefined' && typeof request.responseJSON.message != 'undefined' ) { - message = request.responseJSON.message; - } - else { - if( request.status == 500 ) message = '서버 코드 오류가 발생하였습니다.\n관리자에게 문의하세요'; - else if ( request.status == 401 ) message = '해당 명령을 실행할 권한이 없습니다.'; - } - toastr.error(message, '오류 발생'); - }).ajaxStart(function(){ - $.blockUI({ - css: {width:'25px',top:'49%',left:'49%',border:'0px none',backgroundColor:'transparent',cursor:'wait'}, - message : '', - baseZ : 10000, - overlayCSS : {opacity : 0} - }); - }).ajaxComplete(function(){ - $.unblockUI(); - }); -}); var APP = {}; APP.POPUP = null; APP.REGEX = {}; diff --git a/_src/plugins/ax5core/ax5core.js b/_src/plugins/ax5core/ax5core.js deleted file mode 100644 index 47d6bf2..0000000 --- a/_src/plugins/ax5core/ax5core.js +++ /dev/null @@ -1,3848 +0,0 @@ -'use strict'; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -(function () { - 'use strict'; - - // root of function - - var root = this, - win = this, - doc = win ? win.document : null, - docElem = win ? win.document.documentElement : null, - reIsJson = /^(["'](\\.|[^"\\\n\r])*?["']|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/, - reMs = /^-ms-/, - reSnakeCase = /[\-_]([\da-z])/gi, - reCamelCase = /([A-Z])/g, - reDot = /\./, - reInt = /[-|+]?[\D]/gi, - reNotNum = /\D/gi, - reMoneySplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'), - reAmp = /&/g, - reEq = /=/, - reClassNameSplit = /[ ]+/g, - - - /** @namespace {Object} ax5 */ - ax5 = {}, - info = void 0, - U = void 0, - dom = void 0; - - /** - * guid - * @member {Number} ax5.guid - */ - ax5.guid = 1; - /** - * ax5.guid를 구하고 증가시킵니다. - * @method ax5.getGuid - * @returns {Number} guid - */ - ax5.getGuid = function () { - return ax5.guid++; - }; - - /** - * 상수모음 - * @namespace ax5.info - */ - ax5.info = info = function () { - var _arguments = arguments; - - /** - * ax5 version - * @member {String} ax5.info.version - */ - var version = "1.4.126"; - - /** - * ax5 library path - * @member {String} ax5.info.baseUrl - */ - var baseUrl = ""; - - /** - * ax5 에러 출력메세지 사용자 재 정의 - * @member {Object} ax5.info.onerror - * @examples - * ``` - * ax5.info.onerror = function(){ - * console.log(arguments); - * } - * ``` - */ - var onerror = function onerror() { - console.error(U.toArray(_arguments).join(":")); - }; - - /** - * event keyCodes - * @member {Object} ax5.info.eventKeys - * @example - * ``` - * { - * BACKSPACE: 8, TAB: 9, - * RETURN: 13, ESC: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46, - * HOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34, INSERT: 45, SPACE: 32 - * } - * ``` - */ - var eventKeys = { - BACKSPACE: 8, TAB: 9, - RETURN: 13, ESC: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46, - HOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34, INSERT: 45, SPACE: 32 - }; - - /** - * week names - * @member {Object[]} weekNames - * @member {string} weekNames[].label - * - * @example - * ``` - * [ - * {label: "SUN"},{label: "MON"},{label: "TUE"},{label: "WED"},{label: "THU"},{label: "FRI"},{label: "SAT"} - * ] - * console.log( weekNames[0] ); - * console.log( ax5.info.weekNames[(new Date()).getDay()].label ) - * ``` - */ - var weekNames = [{ label: "SUN" }, { label: "MON" }, { label: "TUE" }, { label: "WED" }, { label: "THU" }, { label: "FRI" }, { label: "SAT" }]; - - /** - * 사용자 브라우저 식별용 오브젝트 - * @member {Object} ax5.info.browser - * @example - * ``` - * console.log( ax5.info.browser ); - * //Object {name: "chrome", version: "39.0.2171.71", mobile: false} - * ``` - */ - var browser = function (ua, mobile, browserName, match, browser, browserVersion) { - if (!win || !win.navigator) return {}; - - ua = navigator.userAgent.toLowerCase(), mobile = ua.search(/mobile/g) != -1, browserName, match, browser, browserVersion; - - 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) { - match = /(android)[ \/]([\w.]+)/.exec(ua) || []; - browserVersion = match[2] || "0"; - return { name: "android", version: browserVersion, mobile: mobile }; - } else { - browserName = ""; - match = /(opr)[ \/]([\w.]+)/.exec(ua) || /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; - browser = match[1] || ""; - browserVersion = match[2] || "0"; - - if (browser == "msie") browser = "ie"; - return { - name: browser, - version: browserVersion, - mobile: mobile - }; - } - ua = null, mobile = null, browserName = null, match = null, browser = null, browserVersion = null; - }(); - - /** - * 브라우저 여부 - * @member {Boolean} ax5.info.isBrowser - */ - var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && win.document); - - /** - * 브라우저에 따른 마우스 휠 이벤트이름 - * @member {Object} ax5.info.wheelEnm - */ - var wheelEnm = win && /Firefox/i.test(navigator.userAgent) ? "DOMMouseScroll" : "mousewheel"; - - /** - * 첫번째 자리수 동사 - (필요한것이 없을때 : 4, 실행오류 : 5) - * 두번째 자리수 목적어 - 문자열 0, 숫자 1, 배열 2, 오브젝트 3, 함수 4, DOM 5, 파일 6, 기타 7 - * 세번째 자리수 옵션 - * @member {Object} ax5.info.errorMsg - */ - var errorMsg = {}; - - /** - * 현재 페이지의 Url 정보를 리턴합니다. - * @method ax5.info.urlUtil - * @returns {Object} - * @example - * ``` - * console.log( ax5.util.toJson( ax5.info.urlUtil() ) ); - * { - * "baseUrl": "http://ax5:2018", - * "href": "http://ax5:2018/samples/index.html?a=1&b=1#abc", - * "param": "a=1&b=1", - * "referrer": "", - * "pathname": "/samples/index.html", - * "hostname": "ax5", - * "port": "2018", - * "url": "http://ax5:2018/samples/index.html", - * "hashdata": "abc" - * } - * ``` - */ - function urlUtil(url, urls) { - url = { - href: win.location.href, - param: win.location.search, - referrer: doc.referrer, - pathname: win.location.pathname, - hostname: win.location.hostname, - port: win.location.port - }, urls = url.href.split(/[\?#]/); - url.param = url.param.replace("?", ""); - url.url = urls[0]; - if (url.href.search("#") > -1) { - url.hashdata = U.last(urls); - } - urls = null; - url.baseUrl = U.left(url.href, "?").replace(url.pathname, ""); - return url; - } - - /** - * ax5-error-msg.js 에 정의된 ax5 error를 반환합니다. - * @method ax5.info.getError - * @returns {Object} - * @example - * ``` - * console.log( ax5.info.getError("single-uploader", "460", "upload") ); - * - * if(!this.selectedFile){ - * if (cfg.onEvent) { - * var that = { - * action: "error", - * error: ax5.info.getError("single-uploader", "460", "upload") - * }; - * cfg.onEvent.call(that, that); - * } - * return this; - * } - * ``` - */ - function getError(className, errorCode, methodName) { - if (info.errorMsg && info.errorMsg[className]) { - return { - className: className, - errorCode: errorCode, - methodName: methodName, - msg: info.errorMsg[className][errorCode] - }; - } else { - return { className: className, errorCode: errorCode, methodName: methodName }; - } - } - - /** - * 브라우져의 터치 기능 유무를 확인합니다. - * @method ax5.info.supportTouch - * @returns {boolean} - * @example - * ``` - * var chkFlag = ax5.info.supportTouch; - */ - var supportTouch = win ? 'ontouchstart' in win || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 : false; - - var supportFileApi = win ? win.FileReader && win.File && win.FileList && win.Blob : false; - - return { - errorMsg: errorMsg, - version: version, - baseUrl: baseUrl, - onerror: onerror, - eventKeys: eventKeys, - weekNames: weekNames, - browser: browser, - isBrowser: isBrowser, - supportTouch: supportTouch, - supportFileApi: supportFileApi, - wheelEnm: wheelEnm, - urlUtil: urlUtil, - getError: getError - }; - }(); - - /** - * Refer to this by {@link ax5}. - * @namespace ax5.util - */ - ax5['util'] = U = function () { - var _toString = Object.prototype.toString; - - /** - * Object나 Array의 아이템으로 사용자 함수를 호출합니다. - * @method ax5.util.each - * @param {Object|Array} O - * @param {Function} _fn - * @example - * ```js - * var axf = ax5.util; - * axf.each([0,1,2], function(){ - * // with this - * }); - * axf.each({a:1, b:2}, function(){ - * // with this - * }); - * ``` - */ - function each(O, _fn) { - if (isNothing(O)) return []; - var key = void 0, - i = 0, - l = O.length, - isObj = l === undefined || typeof O === "function"; - if (isObj) { - for (key in O) { - if (typeof O[key] != "undefined") if (_fn.call(O[key], key, O[key]) === false) break; - } - } else { - for (; i < l;) { - if (typeof O[i] != "undefined") if (_fn.call(O[i], i, O[i++]) === false) break; - } - } - return O; - } - - // In addition to using the http://underscorejs.org : map, reduce, reduceRight, find - /** - * 원본 아이템들을 이용하여 사용자 함수의 리턴값으로 이루어진 새로운 배열을 만듭니다. - * @method ax5.util.map - * @param {Object|Array} O - * @param {Function} _fn - * @returns {Array} - * @example - * ```js - * var myArray = [0,1,2,3,4]; - * var myObject = {a:1, b:"2", c:{axj:"what", arrs:[0,2,"3"]}, - * fn: function(abcdd){ - * return abcdd; - * } - * }; - * - * var _arr = ax5.util.map( myArray, function(index, I){ - * return index+1; - * }); - * console.log(_arr); - * // [1, 2, 3, 4, 5] - * - * var _arr = ax5.util.map( myObject, function(k, v){ - * return v * 2; - * }); - * console.log(_arr); - * // [2, 4, NaN, NaN] - * ``` - */ - function map(O, _fn) { - if (isNothing(O)) return []; - var key = void 0, - i = 0, - l = O.length, - results = [], - fnResult = void 0; - if (isObject(O)) { - for (key in O) { - if (typeof O[key] != "undefined") { - fnResult = undefined; - if ((fnResult = _fn.call(O[key], key, O[key])) === false) break;else results.push(fnResult); - } - } - } else { - for (; i < l;) { - if (typeof O[i] != "undefined") { - fnResult = undefined; - if ((fnResult = _fn.call(O[i], i, O[i++])) === false) break;else results.push(fnResult); - } - } - } - return results; - } - - /** - * 원본 아이템들을 이용하여 사용자 함수의 리턴값이 참인 아이템의 위치나 키값을 반환합니다. - * @method ax5.util.search - * @param {Object|Array} O - * @param {Function|String|Number} _fn - 함수 또는 값 - * @returns {Number|String} - * @example - * ```js - * var myArray = [0,1,2,3,4,5,6]; - * var myObject = {a:"123","b":"123",c:123}; - * - * ax5.util.search(myArray, function(){ - * return this > 3; - * }); - * // 4 - * ax5.util.search(myObject, function(k, v){ - * return v === 123; - * }); - * // "c" - * ax5.util.search([1,2,3,4], 3); - * // 2 - * ax5.util.search([1,2], 4); - * // -1 - * ax5.util.search(["name","value"], "value"); - * // 1 - * ax5.util.search(["name","value"], "values"); - * // -1 - * ax5.util.search({k1:"name",k2:"value"}, "value2"); - * // -1 - * ax5.util.search({k1:"name",k2:"value"}, "value"); - * // "k2" - * ``` - */ - function search(O, _fn) { - if (isNothing(O)) return -1; - if (isObject(O)) { - for (var key in O) { - if (typeof O[key] != "undefined" && isFunction(_fn) && _fn.call(O[key], key, O[key])) { - return key; - break; - } else if (O[key] == _fn) { - return key; - break; - } - } - } else { - for (var i = 0, l = O.length; i < l; i++) { - if (typeof O[i] != "undefined" && isFunction(_fn) && _fn.call(O[i], i, O[i])) { - return i; - break; - } else if (O[i] == _fn) { - return i; - break; - } - } - } - return -1; - } - - /** - * @method ax5.util.sum - * @param {Array|Object} O - * @param {Number} [defaultValue] - * @param {Function} _fn - * @returns {Number} - * @example - * ```js - * var arr = [ - * {name: "122", value: 9}, - * {name: "122", value: 10}, - * {name: "123", value: 11} - * ]; - * - * var rs = ax5.util.sum(arr, function () { - * if(this.name == "122") { - * return this.value; - * } - * }); - * console.log(rs); // 19 - * - * console.log(ax5.util.sum(arr, 10, function () { - * return this.value; - * })); - * // 40 - * ``` - */ - function sum(O, defaultValue, _fn) { - var i = void 0, - l = void 0, - tokenValue = void 0; - if (isFunction(defaultValue) && typeof _fn === "undefined") { - _fn = defaultValue; - defaultValue = 0; - } - if (typeof defaultValue === "undefined") defaultValue = 0; - - if (isArray(O)) { - i = 0; - l = O.length; - for (; i < l; i++) { - if (typeof O[i] !== "undefined") { - if ((tokenValue = _fn.call(O[i], O[i])) === false) break;else if (typeof tokenValue !== "undefined") defaultValue += tokenValue; - } - } - return defaultValue; - } else if (isObject(O)) { - for (i in O) { - if (typeof O[i] != "undefined") { - if ((tokenValue = _fn.call(O[i], O[i])) === false) break;else if (typeof tokenValue !== "undefined") defaultValue += tokenValue; - } - } - return defaultValue; - } else { - console.error("argument error : ax5.util.sum - use Array or Object"); - return defaultValue; - } - } - - /** - * @method ax5.util.avg - * @param {Array|Object} O - * @param {Number} [defaultValue] - * @param {Function} _fn - * @returns {Number} - * @example - * ```js - * var arr = [ - * {name: "122", value: 9}, - * {name: "122", value: 10}, - * {name: "123", value: 11} - * ]; - * - * var rs = ax5.util.avg(arr, function () { - * return this.value; - * }); - * - * console.log(rs); // 10 - * ``` - */ - function avg(O, defaultValue, _fn) { - var i = void 0, - l = void 0, - tokenValue = void 0; - if (isFunction(defaultValue) && typeof _fn === "undefined") { - _fn = defaultValue; - defaultValue = 0; - } - if (typeof defaultValue === "undefined") defaultValue = 0; - - if (isArray(O)) { - i = 0; - l = O.length; - for (; i < l; i++) { - if (typeof O[i] !== "undefined") { - if ((tokenValue = _fn.call(O[i], O[i])) === false) break;else if (typeof tokenValue !== "undefined") defaultValue += tokenValue; - } - } - return defaultValue / l; - } else if (isObject(O)) { - l = 0; - for (i in O) { - if (typeof O[i] != "undefined") { - if ((tokenValue = _fn.call(O[i], O[i])) === false) break;else if (typeof tokenValue !== "undefined") defaultValue += tokenValue;++l; - } - } - return defaultValue / l; - } else { - console.error("argument error : ax5.util.sum - use Array or Object"); - return defaultValue; - } - } - - /** - * 배열의 왼쪽에서 오른쪽으로 연산을 진행하는데 수행한 결과가 왼쪽 값으로 반영되어 최종 왼쪽 값을 반환합니다. - * @method ax5.util.reduce - * @param {Array|Object} O - * @param {Function} _fn - * @returns {Alltypes} - * @example - * ```js - * var aarray = [5,4,3,2,1]; - * result = ax5.util.reduce( aarray, function(p, n){ - * return p * n; - * }); - * console.log(result, aarray); - * // 120 [5, 4, 3, 2, 1] - * - * ax5.util.reduce({a:1, b:2}, function(p, n){ - * return parseInt(p|0) + parseInt(n); - * }); - * // 3 - * ``` - */ - function reduce(O, _fn) { - var i, l, tokenItem; - if (isArray(O)) { - i = 0, l = O.length, tokenItem = O[i]; - for (; i < l - 1;) { - if (typeof O[i] != "undefined") { - if ((tokenItem = _fn.call(root, tokenItem, O[++i])) === false) break; - } - } - return tokenItem; - } else if (isObject(O)) { - for (i in O) { - if (typeof O[i] != "undefined") { - if ((tokenItem = _fn.call(root, tokenItem, O[i])) === false) break; - } - } - return tokenItem; - } else { - console.error("argument error : ax5.util.reduce - use Array or Object"); - return null; - } - } - - /** - * 배열의 오른쪽에서 왼쪽으로 연산을 진행하는데 수행한 결과가 오른쪽 값으로 반영되어 최종 오른쪽 값을 반환합니다. - * @method ax5.util.reduceRight - * @param {Array} O - * @param {Function} _fn - * @returns {Alltypes} - * @example - * ```js - * var aarray = [5,4,3,2,1]; - * result = ax5.util.reduceRight( aarray, function(p, n){ - * console.log( n ); - * return p * n; - * }); - * console.log(result, aarray); - * 120 [5, 4, 3, 2, 1] - * ``` - */ - function reduceRight(O, _fn) { - var i = O.length - 1, - tokenItem = O[i]; - for (; i > 0;) { - if (typeof O[i] != "undefined") { - if ((tokenItem = _fn.call(root, tokenItem, O[--i])) === false) break; - } - } - return tokenItem; - } - - /** - * 배열또는 오브젝트의 각 아이템을 인자로 하는 사용자 함수의 결과가 참인 아이템들의 배열을 반환합니다. - * @method ax5.util.filter - * @param {Object|Array} O - * @param {Function} _fn - * @returns {Array} - * @example - * ```js - * var aarray = [5,4,3,2,1]; - * result = ax5.util.filter( aarray, function(){ - * return this % 2; - * }); - * console.log(result); - * // [5, 3, 1] - * - * var filObject = {a:1, s:"string", oa:{pickup:true, name:"AXISJ"}, os:{pickup:true, name:"AX5"}}; - * result = ax5.util.filter( filObject, function(){ - * return this.pickup; - * }); - * console.log( ax5.util.toJson(result) ); - * // [{"pickup": , "name": "AXISJ"}, {"pickup": , "name": "AX5"}] - * ``` - */ - function filter(O, _fn) { - if (isNothing(O)) return []; - var k, - i = 0, - l = O.length, - results = [], - fnResult; - if (isObject(O)) { - for (k in O) { - if (typeof O[k] != "undefined") { - if (fnResult = _fn.call(O[k], k, O[k])) results.push(O[k]); - } - } - } else { - for (; i < l;) { - if (typeof O[i] != "undefined") { - if (fnResult = _fn.call(O[i], i, O[i])) results.push(O[i]); - i++; - } - } - } - return results; - } - - /** - * Object를 JSONString 으로 반환합니다. - * @method ax5.util.toJson - * @param {Object|Array} O - * @returns {String} JSON - * @example - * ```js - * var ax = ax5.util; - * var myObject = { - * a:1, b:"2", c:{axj:"what", arrs:[0,2,"3"]}, - * fn: function(abcdd){ - * return abcdd; - * } - * }; - * console.log( ax.toJson(myObject) ); - * ``` - */ - function toJson(O) { - var jsonString = ""; - if (ax5.util.isArray(O)) { - var i = 0, - l = O.length; - jsonString += "["; - for (; i < l; i++) { - if (i > 0) jsonString += ","; - jsonString += toJson(O[i]); - } - jsonString += "]"; - } else if (ax5.util.isObject(O)) { - jsonString += "{"; - var jsonObjectBody = []; - each(O, function (key, value) { - jsonObjectBody.push('"' + key + '": ' + toJson(value)); - }); - jsonString += jsonObjectBody.join(", "); - jsonString += "}"; - } else if (ax5.util.isString(O)) { - jsonString = '"' + O + '"'; - } else if (ax5.util.isNumber(O)) { - jsonString = O; - } else if (ax5.util.isUndefined(O)) { - jsonString = "undefined"; - } else if (ax5.util.isFunction(O)) { - jsonString = '"{Function}"'; - } else { - jsonString = O; - } - return jsonString; - } - - /** - * 관용의 JSON Parser - * @method ax5.util.parseJson - * @param {String} JSONString - * @param {Boolean} [force] - 강제 적용 여부 (json 문자열 검사를 무시하고 오브젝트 변환을 시도합니다.) - * @returns {Object} - * @example - * ``` - * console.log(ax5.util.parseJson('{"a":1}')); - * // Object {a: 1} - * console.log(ax5.util.parseJson("{'a':1, 'b':'b'}")); - * // Object {a: 1, b: "b"} - * console.log(ax5.util.parseJson("{'a':1, 'b':function(){return 1;}}", true)); - * // Object {a: 1, b: function} - * console.log(ax5.util.parseJson("{a:1}")); - * // Object {a: 1} - * console.log(ax5.util.parseJson("[1,2,3]")); - * // [1, 2, 3] - * console.log(ax5.util.parseJson("['1','2','3']")); - * // ["1", "2", "3"] - * console.log(ax5.util.parseJson("[{'a':'99'},'2','3']")); - * // [Object, "2", "3"] - * ``` - */ - function parseJson(str, force) { - if (force || reIsJson.test(str)) { - try { - return new Function('', 'return ' + str)(); - } catch (e) { - return { error: 500, msg: 'syntax error' }; - } - } else { - return { error: 500, msg: 'syntax error' }; - } - } - - /** - * 인자의 타입을 반환합니다. - * @method ax5.util.getType - * @param {Object|Array|String|Number|Element|Etc} O - * @returns {String} window|element|object|array|function|string|number|undefined|nodelist - * @example - * ```js - * var axf = ax5.util; - * var a = 11; - * var b = "11"; - * console.log( axf.getType(a) ); - * console.log( axf.getType(b) ); - * ``` - */ - function getType(O) { - var typeName; - if (O != null && O == O.window) { - typeName = "window"; - } else if (!!(O && O.nodeType == 1)) { - typeName = "element"; - } else if (!!(O && O.nodeType == 11)) { - typeName = "fragment"; - } else if (O === null) { - typeName = "null"; - } else if (typeof O === "undefined") { - typeName = "undefined"; - } else if (_toString.call(O) == "[object Object]") { - typeName = "object"; - } else if (_toString.call(O) == "[object Array]") { - typeName = "array"; - } else if (_toString.call(O) == "[object String]") { - typeName = "string"; - } else if (_toString.call(O) == "[object Number]") { - typeName = "number"; - } else if (_toString.call(O) == "[object NodeList]") { - typeName = "nodelist"; - } else if (typeof O === "function") { - typeName = "function"; - } - return typeName; - } - - /** - * 오브젝트가 window 인지 판단합니다. - * @method ax5.util.isWindow - * @param {Object} O - * @returns {Boolean} - */ - function isWindow(O) { - return O != null && O == O.window; - } - - /** - * 오브젝트가 HTML 엘리먼트여부인지 판단합니다. - * @method ax5.util.isElement - * @param {Object} O - * @returns {Boolean} - */ - function isElement(O) { - return !!(O && (O.nodeType == 1 || O.nodeType == 11)); - } - - /** - * 오브젝트가 Object인지 판단합니다. - * @method ax5.util.isObject - * @param {Object} O - * @returns {Boolean} - */ - function isObject(O) { - return _toString.call(O) == "[object Object]"; - } - - /** - * 오브젝트가 Array인지 판단합니다. - * @method ax5.util.isArray - * @param {Object} O - * @returns {Boolean} - */ - function isArray(O) { - return _toString.call(O) == "[object Array]"; - } - - /** - * 오브젝트가 Function인지 판단합니다. - * @method ax5.util.isFunction - * @param {Object} O - * @returns {Boolean} - */ - function isFunction(O) { - return typeof O === "function"; - } - - /** - * 오브젝트가 String인지 판단합니다. - * @method ax5.util.isString - * @param {Object} O - * @returns {Boolean} - */ - function isString(O) { - return _toString.call(O) == "[object String]"; - } - - /** - * 오브젝트가 Number인지 판단합니다. - * @method ax5.util.isNumber - * @param {Object} O - * @returns {Boolean} - */ - function isNumber(O) { - return _toString.call(O) == "[object Number]"; - } - - /** - * 오브젝트가 NodeList인지 판단합니다. - * @method ax5.util.isNodelist - * @param {Object} O - * @returns {Boolean} - */ - function isNodelist(O) { - return !!(_toString.call(O) == "[object NodeList]" || typeof O !== "undefined" && O && O[0] && O[0].nodeType == 1); - } - - /** - * 오브젝트가 undefined인지 판단합니다. - * @method ax5.util.isUndefined - * @param {Object} O - * @returns {Boolean} - */ - function isUndefined(O) { - return typeof O === "undefined"; - } - - /** - * 오브젝트가 undefined이거나 null이거나 빈값인지 판단합니다. - * @method ax5.util.isNothing - * @param {Object} O - * @returns {Boolean} - */ - function isNothing(O) { - return typeof O === "undefined" || O === null || O === ""; - } - - /** - * 오브젝트가 날자값인지 판단합니다. - * @method ax5.util.isDate - * @param {Date} O - * @returns {Boolean} - * @example - * ```js - * ax5.util.isDate('2016-09-30'); - * // false - * ax5.util.isDate( new Date('2016-09-30') ); - * // true - * ``` - */ - function isDate(O) { - return O instanceof Date && !isNaN(O.valueOf()); - } - - function isDateFormat(O) { - var result = false; - if (!O) {} else if (O instanceof Date && !isNaN(O.valueOf())) { - result = true; - } else { - if (O.length > 7) { - if (date(O) instanceof Date) { - return true; - } - } - O = O.replace(/\D/g, ''); - if (O.length > 7) { - var mm = O.substr(4, 2), - dd = O.substr(6, 2); - O = date(O); - if (O.getMonth() == mm - 1 && O.getDate() == dd) { - result = true; - } - } - } - return result; - } - - /** - * 오브젝트의 첫번째 아이템을 반환합니다. - * @method ax5.util.first - * @param {Object|Array} O - * @returns {Object} - * @example - * ```js - * ax5.util.first({a:1, b:2}); - * // Object {a: 1} - * ax5.util.first([1,2,3,4]); - * // 1 - * ``` - */ - function first(O) { - if (isObject(O)) { - var keys = Object.keys(O); - var item = {}; - item[keys[0]] = O[keys[0]]; - return item; - } else if (isArray(O)) { - return O[0]; - } else { - console.error("ax5.util.object.first", "argument type error"); - return undefined; - } - } - - /** - * 오브젝트의 마지막 아이템을 반환합니다. - * @method ax5.util.last - * @param {Object|Array} O - * @returns {Object} - * @example - * ```js - * ax5.util.last({a:1, b:2}); - * // Object {b: 2} - * ax5.util.last([1,2,3,4]); - * // 4 - * ``` - */ - function last(O) { - if (isObject(O)) { - var keys = Object.keys(O); - var item = {}; - item[keys[keys.length - 1]] = O[keys[keys.length - 1]]; - return item; - } else if (isArray(O)) { - return O[O.length - 1]; - } else { - console.error("ax5.util.object.last", "argument type error"); - return undefined; - } - } - - /** - * 쿠키를 설정합니다. - * @method ax5.util.setCookie - * @param {String} cname - 쿠키이름 - * @param {String} cvalue - 쿠키값 - * @param {Number} [exdays] - 쿠키 유지일수 - * @param {Object} [opts] - path, domain 설정 옵션 - * @example - * ```js - * ax5.util.setCookie("jslib", "AX5"); - * ax5.util.setCookie("jslib", "AX5", 3); - * ax5.util.setCookie("jslib", "AX5", 3, {path:"/", domain:".axisj.com"}); - * ``` - */ - function setCookie(cn, cv, exdays, opts) { - var expire; - if (typeof exdays === "number") { - expire = new Date(); - expire.setDate(expire.getDate() + exdays); - } - opts = opts || {}; - return doc.cookie = [escape(cn), '=', escape(cv), expire ? "; expires=" + expire.toUTCString() : "", // use expires attribute, max-age is not supported by IE - opts.path ? "; path=" + opts.path : "", opts.domain ? "; domain=" + opts.domain : "", opts.secure ? "; secure" : ""].join(""); - } - - /** - * 쿠키를 가져옵니다. - * @method ax5.util.getCookie - * @param {String} cname - * @returns {String} cookie value - * @example - * ```js - * ax5.util.getCookie("jslib"); - * ``` - */ - function getCookie(cname) { - var name = cname + "="; - var ca = doc.cookie.split(';'), - i = 0, - l = ca.length; - for (; i < l; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') { - c = c.substring(1); - }if (c.indexOf(name) != -1) return unescape(c.substring(name.length, c.length)); - } - return ""; - } - - /** - * jsonString 으로 alert 합니다. - * @method ax5.util.alert - * @param {Object|Array|String|Number} O - * @returns {Object|Array|String|Number} O - * @example ```js - * ax5.util.alert({a:1,b:2}); - * ax5.util.alert("정말?"); - * ``` - */ - function alert(O) { - win.alert(toJson(O)); - return O; - } - - /** - * 문자열의 특정 문자열까지 잘라주거나 원하는 포지션까지 잘라줍니다. - * @method ax5.util.left - * @param {String} str - 문자열 - * @param {String|Number} pos - 찾을 문자열 또는 포지션 - * @returns {String} - * @example - * ```js - * ax5.util.left("abcd.efd", 3); - * // abc - * ax5.util.left("abcd.efd", "."); - * // abcd - * ``` - */ - function left(str, pos) { - if (typeof str === "undefined" || typeof pos === "undefined") return ""; - if (isString(pos)) { - return str.indexOf(pos) > -1 ? str.substr(0, str.indexOf(pos)) : ""; - } else if (isNumber(pos)) { - return str.substr(0, pos); - } else { - return ""; - } - } - - /** - * 문자열의 특정 문자열까지 잘라주거나 원하는 포지션까지 잘라줍니다. - * @method ax5.util.right - * @param {String} str - 문자열 - * @param {String|Number} pos - 찾을 문자열 또는 포지션 - * @returns {String} - * @example - * ```js - * ax5.util.right("abcd.efd", 3); - * // efd - * ax5.util.right("abcd.efd", "."); - * // efd - * ``` - */ - function right(str, pos) { - if (typeof str === "undefined" || typeof pos === "undefined") return ""; - str = '' + str; - if (isString(pos)) { - return str.lastIndexOf(pos) > -1 ? str.substr(str.lastIndexOf(pos) + 1) : ""; - } else if (isNumber(pos)) { - return str.substr(str.length - pos); - } else { - return ""; - } - } - - /** - * css형 문자열이나 특수문자가 포함된 문자열을 카멜케이스로 바꾸어 반환합니다. - * @method ax5.util.camelCase - * @param {String} str - * @returns {String} - * @example - * ```js - * ax5.util.camelCase("inner-width"); - * ax5.util.camelCase("innerWidth"); - * // innerWidth - * ``` - */ - function camelCase(str) { - return str.replace(reMs, "ms-").replace(reSnakeCase, function (all, letter) { - return letter.toUpperCase(); - }); - } - - /** - * css형 문자열이나 카멜케이스문자열을 스네이크 케이스 문자열로 바꾸어 반환합니다. - * @method ax5.util.snakeCase - * @param {String} str - * @returns {String} - * @example - * ```js - * ax5.util.snakeCase("innerWidth"); - * ax5.util.snakeCase("inner-Width"); - * ax5.util.snakeCase("innerWidth"); - * // inner-width - * ``` - */ - function snakeCase(str) { - return camelCase(str).replace(reCamelCase, function (all, letter) { - return "-" + letter.toLowerCase(); - }); - } - - /** - * 문자열에서 -. 을 제외한 모든 문자열을 제거하고 숫자로 반환합니다. 옵션에 따라 원하는 형식의 숫자로 변환 할 수 도 있습니다. - * @method ax5.util.number - * @param {String|Number} str - * @param {Object} cond - 옵션 - * @returns {String|Number} - * @example - * ```js - * var cond = { - * round: {Number|Boolean} - 반올림할 자릿수, - * money: {Boolean} - 통화, - * abs: {Boolean} - 절대값, - * byte: {Boolean} - 바이트 - * } - * - * console.log(ax5.util.number(123456789.678, {round:1})); - * console.log(ax5.util.number(123456789.678, {round:1, money:true})); - * console.log(ax5.util.number(123456789.678, {round:2, byte:true})); - * console.log(ax5.util.number(-123456789.8888, {abs:true, round:2, money:true})); - * console.log(ax5.util.number("A-1234~~56789.8~888PX", {abs:true, round:2, money:true})); - * - * //123456789.7 - * //123,456,789.7 - * //117.7MB - * //123,456,789.89 - * //123,456,789.89 - * ``` - */ - function number(str, cond) { - var result, - pair = ('' + str).split(reDot), - isMinus, - returnValue; - - isMinus = Number(pair[0].replace(/,/g, "")) < 0 || pair[0] == "-0"; - returnValue = 0.0; - pair[0] = pair[0].replace(reInt, ""); - - if (pair[1]) { - pair[1] = pair[1].replace(reNotNum, ""); - returnValue = Number(pair[0] + "." + pair[1]) || 0; - } else { - returnValue = Number(pair[0]) || 0; - } - result = isMinus ? -returnValue : returnValue; - - each(cond, function (k, c) { - if (k == "round") { - if (isNumber(c)) { - if (c < 0) { - result = +(Math.round(result + "e-" + Math.abs(c)) + "e+" + Math.abs(c)); - } else { - result = +(Math.round(result + "e+" + c) + "e-" + c); - } - } else { - result = Math.round(result); - } - } - if (k == "floor") { - result = Math.floor(result); - } - if (k == "ceil") { - result = Math.ceil(result); - } else if (k == "money") { - result = function (val) { - var txtNumber = '' + val; - if (isNaN(txtNumber) || txtNumber == "") { - return ""; - } else { - var arrNumber = txtNumber.split('.'); - arrNumber[0] += '.'; - do { - arrNumber[0] = arrNumber[0].replace(reMoneySplit, '$1,$2'); - } while (reMoneySplit.test(arrNumber[0])); - if (arrNumber.length > 1) { - return arrNumber.join(''); - } else { - return arrNumber[0].split('.')[0]; - } - } - }(result); - } else if (k == "abs") { - result = Math.abs(Number(result)); - } else if (k == "byte") { - result = function (val) { - val = Number(result); - var nUnit = "KB"; - var myByte = val / 1024; - if (myByte / 1024 > 1) { - nUnit = "MB"; - myByte = myByte / 1024; - } - if (myByte / 1024 > 1) { - nUnit = "GB"; - myByte = myByte / 1024; - } - return number(myByte, { round: 1 }) + nUnit; - }(result); - } - }); - - return result; - } - - /** - * 배열 비슷한 오브젝트를 배열로 변환해줍니다. - * @method ax5.util.toArray - * @param {Object|Elements|Arguments} O - * @returns {Array} - * @example - * ```js - * ax5.util.toArray(arguments); - * // - * ``` - */ - function toArray(O) { - if (typeof O.length != "undefined") return Array.prototype.slice.call(O); - return []; - } - - /** - * 첫번째 인자에 두번째 인자 아이템을 합쳐줍니다. concat과 같은 역할을 하지만. 인자가 Array타입이 아니어도 됩니다. - * @method ax5.util.merge - * @param {Array|ArrayLike} first - * @param {Array|ArrayLike} second - * @returns {Array} first - * @example - * ``` - * - * ``` - */ - function merge(first, second) { - var l = second.length, - i = first.length, - j = 0; - - if (typeof l === "number") { - for (; j < l; j++) { - first[i++] = second[j]; - } - } else { - while (second[j] !== undefined) { - first[i++] = second[j++]; - } - } - - first.length = i; - - return first; - } - - /** - * 오브젝트를 파라미터형식으로 또는 파라미터를 오브젝트 형식으로 변환합니다. - * @method ax5.util.param - * @param {Object|Array|String} O - * @param {String} [cond] - param|object - * @returns {Object|String} - * @example - * ``` - * ax5.util.param({a:1,b:'1232'}, "param"); - * ax5.util.param("a=1&b=1232", "param"); - * // "a=1&b=1232" - * ax5.util.param("a=1&b=1232"); - * // {a: "1", b: "1232"} - * ``` - */ - function param(O, cond) { - var p; - if (isString(O) && typeof cond !== "undefined" && cond == "param") { - return O; - } else if (isString(O) && typeof cond !== "undefined" && cond == "object" || isString(O) && typeof cond === "undefined") { - p = {}; - each(O.split(reAmp), function () { - var item = this.split(reEq); - if (!p[item[0]]) p[item[0]] = item[1];else { - if (isString(p[item[0]])) p[item[0]] = [p[item[0]]]; - p[item[0]].push(item[1]); - } - }); - return p; - } else { - p = []; - each(O, function (k, v) { - p.push(k + "=" + escape(v)); - }); - return p.join('&'); - } - } - - function encode(s) { - return encodeURIComponent(s); - } - - function decode(s) { - return decodeURIComponent(s); - } - - function error() { - ax5.info.onerror.apply(this, arguments); - } - - function localDate(yy, mm, dd, hh, mi, ss) { - var utcD, localD; - localD = new Date(); - if (mm < 0) mm = 0; - if (typeof hh === "undefined") hh = 12; - if (typeof mi === "undefined") mi = 0; - utcD = new Date(Date.UTC(yy, mm, dd || 1, hh, mi, ss || 0)); - - if (mm == 0 && dd == 1 && utcD.getUTCHours() + utcD.getTimezoneOffset() / 60 < 0) { - utcD.setUTCHours(0); - } else { - utcD.setUTCHours(utcD.getUTCHours() + utcD.getTimezoneOffset() / 60); - } - return utcD; - } - - /** - * 날짜 형식의 문자열이나 Date객체를 조건에 맞게 처리 한 후 원하는 return 값으로 반환합니다. - * @method ax5.util.date - * @param {String|Date} d - * @param {Object} cond - * @returns {Date|String} - * @example - * ```js - * ax5.util.date('2013-01-01'); // Tue Jan 01 2013 23:59:00 GMT+0900 (KST) - * ax5.util.date((new Date()), {add:{d:10}, return:'yyyy/MM/dd'}); // "2015/07/01" - * ax5.util.date('1919-03-01', {add:{d:10}, return:'yyyy/MM/dd hh:mm:ss'}); // "1919/03/11 23:59:00" - * ``` - */ - function date(d, cond) { - var yy = void 0, - mm = void 0, - dd = void 0, - hh = void 0, - mi = void 0, - aDateTime = void 0, - aTimes = void 0, - aTime = void 0, - aDate = void 0, - va = void 0, - ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i, - ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i; - - if (isString(d)) { - if (d.length == 0) { - d = new Date(); - } else if (d.length > 15) { - if (ISO_8601_FULL.test(d) || ISO_8601.test(d)) { - d = new Date(d); - } else { - aDateTime = d.split(/ /g), aTimes, aTime, aDate = aDateTime[0].split(/\D/g), yy = aDate[0]; - mm = parseFloat(aDate[1]); - dd = parseFloat(aDate[2]); - aTime = aDateTime[1] || "09:00"; - aTimes = aTime.substring(0, 5).split(":"); - hh = parseFloat(aTimes[0]); - mi = parseFloat(aTimes[1]); - if (right(aTime, 2) === "AM" || right(aTime, 2) === "PM") hh += 12; - d = localDate(yy, mm - 1, dd, hh, mi); - } - } else if (d.length == 14) { - va = d.replace(/\D/g, ""); - d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, number(va.substr(6, 2)), number(va.substr(8, 2)), number(va.substr(10, 2)), number(va.substr(12, 2))); - } else if (d.length > 7) { - va = d.replace(/\D/g, ""); - d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, number(va.substr(6, 2))); - } else if (d.length > 4) { - va = d.replace(/\D/g, ""); - d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, 1); - } else if (d.length > 2) { - va = d.replace(/\D/g, ""); - return localDate(va.substr(0, 4), va.substr(4, 2) - 1, 1); - } else { - d = new Date(); - } - } - if (typeof cond === "undefined" || typeof d === "undefined") { - return d; - } else { - if ("add" in cond) { - d = function (_d, opts) { - var yy = void 0, - mm = void 0, - dd = void 0, - mxdd = void 0, - DyMilli = 1000 * 60 * 60 * 24; - - if (typeof opts["d"] !== "undefined") { - _d.setTime(_d.getTime() + opts["d"] * DyMilli); - } else if (typeof opts["m"] !== "undefined") { - yy = _d.getFullYear(); - mm = _d.getMonth(); - dd = _d.getDate(); - yy = yy + parseInt(opts["m"] / 12); - mm += opts["m"] % 12; - mxdd = daysOfMonth(yy, mm); - if (mxdd < dd) dd = mxdd; - _d = new Date(yy, mm, dd, 12); - } else if (typeof opts["y"] !== "undefined") { - _d.setTime(_d.getTime() + opts["y"] * 365 * DyMilli); - } else if (typeof opts["h"] !== "undefined") { - _d.setTime(_d.getTime() + opts["h"] * 1000 * 60 * 60); - } - - return _d; - }(new Date(d), cond["add"]); - } - if ("set" in cond) { - d = function (_d, opts) { - var yy = void 0, - mm = void 0, - dd = void 0, - processor = { - "firstDayOfMonth": function firstDayOfMonth(date) { - yy = date.getFullYear(); - mm = date.getMonth(); - dd = 1; - return new Date(yy, mm, dd, 12); - }, - "lastDayOfMonth": function lastDayOfMonth(date) { - yy = date.getFullYear(); - mm = date.getMonth(); - dd = daysOfMonth(yy, mm); - return new Date(yy, mm, dd, 12); - } - }; - if (opts in processor) { - return processor[opts](_d); - } else { - return _d; - } - }(new Date(d), cond["set"]); - } - if ("return" in cond) { - return function () { - - var fStr = cond["return"], - nY = void 0, - nM = void 0, - nD = void 0, - nH = void 0, - nMM = void 0, - nS = void 0, - nDW = void 0, - yre = void 0, - regY = void 0, - mre = void 0, - regM = void 0, - dre = void 0, - regD = void 0, - hre = void 0, - regH = void 0, - mire = void 0, - regMI = void 0, - sre = void 0, - regS = void 0, - dwre = void 0, - regDW = void 0; - - nY = d.getUTCFullYear(); - nM = setDigit(d.getMonth() + 1, 2); - nD = setDigit(d.getDate(), 2); - nH = setDigit(d.getHours(), 2); - nMM = setDigit(d.getMinutes(), 2); - nS = setDigit(d.getSeconds(), 2); - nDW = d.getDay(); - - yre = /[^y]*(yyyy)[^y]*/gi; - yre.exec(fStr); - regY = RegExp.$1; - mre = /[^m]*(MM)[^m]*/g; - mre.exec(fStr); - regM = RegExp.$1; - dre = /[^d]*(dd)[^d]*/gi; - dre.exec(fStr); - regD = RegExp.$1; - hre = /[^h]*(hh)[^h]*/gi; - hre.exec(fStr); - regH = RegExp.$1; - mire = /[^m]*(mm)[^i]*/g; - mire.exec(fStr); - regMI = RegExp.$1; - sre = /[^s]*(ss)[^s]*/gi; - sre.exec(fStr); - regS = RegExp.$1; - dwre = /[^d]*(dw)[^w]*/gi; - dwre.exec(fStr); - regDW = RegExp.$1; - - if (regY === "yyyy") { - fStr = fStr.replace(regY, right(nY, regY.length)); - } - if (regM === "MM") { - if (regM.length == 1) nM = d.getMonth() + 1; - fStr = fStr.replace(regM, nM); - } - if (regD === "dd") { - if (regD.length == 1) nD = d.getDate(); - fStr = fStr.replace(regD, nD); - } - if (regH === "hh") { - fStr = fStr.replace(regH, nH); - } - if (regMI === "mm") { - fStr = fStr.replace(regMI, nMM); - } - if (regS === "ss") { - fStr = fStr.replace(regS, nS); - } - if (regDW == "dw") { - fStr = fStr.replace(regDW, info.weekNames[nDW].label); - } - return fStr; - }(); - } else { - return d; - } - } - } - - /** - * 인자인 날짜가 오늘부터 몇일전인지 반환합니다. 또는 인자인 날짜가 가까운 미래에 몇일 후인지 반환합니다. - * @method ax5.util.dday - * @param {String|Data} d - * @param {Object} cond - * @returns {Number} - * @example - * ```js - * ax5.util.dday('2016-01-29'); - * // 1 - * ax5.util.dday('2016-01-29', {today:'2016-01-28'}); - * // 1 - * ax5.util.dday('1977-03-29', {today:'2016-01-28', age:true}); - * // 39 - * ``` - */ - function dday(d, cond) { - var memoryDay = date(d), - DyMilli = 1000 * 60 * 60 * 24, - today = new Date(), - diffnum, - thisYearMemoryDay; - - function getDayTime(_d) { - return Math.floor(_d.getTime() / DyMilli) * DyMilli; - } - - if (typeof cond === "undefined") { - diffnum = number((getDayTime(memoryDay) - getDayTime(today)) / DyMilli, { floor: true }); - return diffnum; - } else { - diffnum = number((getDayTime(memoryDay) - getDayTime(today)) / DyMilli, { floor: true }); - if (cond["today"]) { - today = date(cond.today); - diffnum = number((getDayTime(memoryDay) - getDayTime(today)) / DyMilli, { floor: true }); - } - if (cond["thisYear"]) { - thisYearMemoryDay = new Date(today.getFullYear(), memoryDay.getMonth(), memoryDay.getDate()); - diffnum = number((getDayTime(thisYearMemoryDay) - getDayTime(today)) / DyMilli, { floor: true }); - if (diffnum < 0) { - thisYearMemoryDay = new Date(today.getFullYear() + 1, memoryDay.getMonth(), memoryDay.getDate()); - diffnum = number((getDayTime(thisYearMemoryDay) - getDayTime(today)) / DyMilli, { floor: true }); - } - } - if (cond["age"]) { - thisYearMemoryDay = new Date(today.getFullYear(), memoryDay.getMonth(), memoryDay.getDate()); - diffnum = thisYearMemoryDay.getFullYear() - memoryDay.getFullYear(); - } - - return diffnum; - } - } - - /** - * 인자인 날짜가 몇년 몇월의 몇번째 주차인지 반환합니다. - * @method ax5.util.weeksOfMonth - * @param {String|Data} d - * @returns {Object} - * @example - * ```js - * ax5.util.weeksOfMonth("2015-10-01"); // {year: 2015, month: 10, count: 1} - * ax5.util.weeksOfMonth("2015-09-19"); // {year: 2015, month: 9, count: 3} - * ``` - */ - function weeksOfMonth(d) { - var myDate = date(d); - return { - year: myDate.getFullYear(), - month: myDate.getMonth() + 1, - count: parseInt(myDate.getDate() / 7 + 1) - }; - } - - /** - * 년월에 맞는 날자수를 반환합니다. - * (new Date()).getMonth() 기준으로 월값을 보냅니다. "2월" 인경우 "1" 을 넘기게 됩니다. - * @method ax5.util.daysOfMonth - * @param {Number} y - * @param {Number} m - * @returns {Number} - * @examples - * ```js - * ax5.util.daysOfMonth(2015, 11); // 31 - * ax5.util.daysOfMonth(2015, 1); // 28 - * ``` - */ - function daysOfMonth(y, m) { - if (m == 3 || m == 5 || m == 8 || m == 10) { - return 30; - } else if (m == 1) { - return y % 4 == 0 && y % 100 != 0 || y % 400 == 0 ? 29 : 28; - } else { - return 31; - } - } - - /** - * 원하는 횟수 만큼 자릿수 맞춤 문자열을 포함한 문자열을 반환합니다. - * 문자열 길이보다 작은값을 보내면 무시됩니다. - * @method ax5.util.setDigit - * @param {String|Number} num - * @param {Number} length - * @param {String} [padder=0] - * @param {Number} [radix] - * @returns {String} - * @example - * ``` - * ax5.util.setDigit(2016, 6) - * // "002016" - * ax5.util.setDigit(2016, 2) - * // "2016" - * ``` - */ - function setDigit(num, length, padder, radix) { - var s = num.toString(radix || 10); - return times(padder || '0', length - s.length) + s; - } - - /** - * 문자열을 지정된 수만큼 반복 합니다. - * @param {String} s - * @param {Number} count - * @returns {string} - * @example - * ``` - * ax5.util.times(2016, 2) - * //"20162016" - * ``` - */ - function times(s, count) { - return count < 1 ? '' : new Array(count + 1).join(s); - } - - /** - * 타겟엘리먼트의 부모 엘리멘트 트리에서 원하는 조건의 엘리먼트를 얻습니다. - * @method ax5.util.findParentNode - * @param {Element} _target - target element - * @param {Object|Function} cond - 원하는 element를 찾을 조건 - * @returns {Element} - * @example - * ``` - * // cond 속성정의 - * var cond = { - * tagname: {String} - 태그명 (ex. a, div, span..), - * clazz: {String} - 클래스명 - * [, 그 외 찾고 싶은 attribute명들] - * }; - * console.log( - * console.log( - * ax5.util.findParentNode(e.target, {tagname:"a", clazz:"ax-menu-handel", "data-custom-attr":"attr_value"}) - * ); - * // cond 함수로 처리하기 - * jQuery('#id').bind("click.app_expand", function(e){ - * var target = ax5.util.findParentNode(e.target, function(target){ - * if($(target).hasClass("aside")){ - * return true; - * } - * else{ - * return true; - * } - * }); - * //client-aside - * if(target.id !== "client-aside"){ - * // some action - * } - * }); - * ``` - */ - - function findParentNode(_target, cond) { - if (_target) { - while (function () { - var result = true; - if (typeof cond === "undefined") { - _target = _target.parentNode ? _target.parentNode : false; - } else if (isFunction(cond)) { - result = cond(_target); - } else if (isObject(cond)) { - for (var k in cond) { - if (k === "tagname") { - if (_target.tagName.toLocaleLowerCase() != cond[k]) { - result = false; - break; - } - } else if (k === "clazz" || k === "class_name") { - if ("className" in _target) { - var klasss = _target.className.split(reClassNameSplit); - var hasClass = false; - for (var a = 0; a < klasss.length; a++) { - if (klasss[a] == cond[k]) { - hasClass = true; - break; - } - } - result = hasClass; - } else { - result = false; - break; - } - } else { - // 그외 속성값들. - if (_target.getAttribute) { - if (_target.getAttribute(k) != cond[k]) { - result = false; - break; - } - } else { - result = false; - break; - } - } - } - } - return !result; - }()) { - if (_target.parentNode && _target.parentNode.parentNode) { - _target = _target.parentNode; - } else { - _target = false; - break; - } - } - } - return _target; - } - - /** - * @method ax5.util.cssNumber - * @param {String|Number} val - * @returns {String} - * @example - * ``` - * console.log(ax5.util.cssNumber("100px")) - * console.log(ax5.util.cssNumber("100%")) - * console.log(ax5.util.cssNumber("100")) - * console.log(ax5.util.cssNumber(100)) - * console.log(ax5.util.cssNumber("!!100@#")) - * ``` - */ - function cssNumber(val) { - var re = /\D?(\d+)([a-zA-Z%]*)/i, - found = ('' + val).match(re), - unit = found[2] || "px"; - - return found[1] + unit; - } - - /** - * css string 및 object 를 넘기면 object 및 string 으로 변환되어 리턴됩니다. - * @method ax5.util.css - * @param {Object|String} val - CSS String or CSS Object - * @returns {String|Object} - * @example - * ``` - * console.log(ax5.util.css({background: "#ccc", padding: "50px", width: "100px"})); - * //"background:#ccc;padding:50px;width:100px;" - * console.log(ax5.util.css('width:100px;padding: 50px; background: #ccc')); - * // object {width: "100px", padding: "50px", background: "#ccc"} - * ``` - */ - function css(val) { - var returns; - if (isObject(val)) { - returns = ''; - for (var k in val) { - returns += k + ':' + val[k] + ';'; - } - return returns; - } else if (isString(val)) { - returns = {}; - var valSplited = val.split(/[ ]*;[ ]*/g); - valSplited.forEach(function (v) { - if ((v = v.trim()) !== "") { - var vSplited = v.split(/[ ]*:[ ]*/g); - returns[vSplited[0]] = vSplited[1]; - } - }); - return returns; - } - } - - /** - * @method ax5.util.stopEvent - * @param {Event} e - * @example - * ``` - * ax5.util.stopEvent(e); - * ``` - */ - function stopEvent(e) { - // 이벤트 중지 구문 - if (!e) var e = window.event; - - //e.cancelBubble is supported by IE - - // this will kill the bubbling process. - e.cancelBubble = true; - e.returnValue = false; - - //e.stopPropagation works only in Firefox. - if (e.stopPropagation) e.stopPropagation(); - if (e.preventDefault) e.preventDefault(); - - return false; - // 이벤트 중지 구문 끝 - } - - /** - * @method ax5.util.selectRange - * @param {Element} el - * @param {Element} offset - * @example - * ``` - * ax5.util.selectRange($("#select-test-0")); // selectAll - * ax5.util.selectRange($("#select-test-0"), "selectAll"); //selectAll - * ax5.util.selectRange($("#select-test-0"), "start"); // focus on start - * ax5.util.selectRange($("#select-test-0"), "end"); // focus on end - * ax5.util.selectRange($("#select-test-0"), [1, 5]); // select 1~5 - * ``` - */ - var selectRange = function () { - var processor = { - 'textRange': { - 'selectAll': function selectAll(el, range, offset) {}, - 'arr': function arr(el, range, offset) { - range.moveStart("character", offset[0]); // todo ie node select 체크필요 - range.collapse(); - range.moveEnd("character", offset[1]); - }, - 'start': function start(el, range, offset) { - range.moveStart("character", 0); - range.collapse(); - }, - 'end': function end(el, range, offset) { - range.moveStart("character", range.text.length); - range.collapse(); - } - }, - 'range': { - 'selectAll': function selectAll(el, range, offset) { - range.selectNodeContents(el); - }, - 'arr': function arr(el, range, offset) { - if (isObject(offset[0])) { - range.setStart(offset[0].node, offset[0].offset); - range.setEnd(offset[1].node, offset[1].offset); - } else { - range.setStart(el.firstChild, offset[0]); - range.setEnd(el.firstChild, offset[1]); - } - }, - 'start': function start(el, range, offset) { - range.selectNodeContents(el); - range.collapse(true); - }, - 'end': function end(el, range, offset) { - range.selectNodeContents(el); - range.collapse(false); - } - } - }; - return function (el, offset) { - var range, rangeType, selection; - - if (el instanceof jQuery) { - el = el.get(0); - } - if (!el) return; - - // 레인지 타입 선택 - if (doc.body.createTextRange) { - range = document.body.createTextRange(); - range.moveToElementText(el); - rangeType = "textRange"; - } else if (window.getSelection) { - selection = window.getSelection(); - range = document.createRange(); - rangeType = "range"; - } - - // range 적용 - if (typeof offset == "undefined") { - processor[rangeType].selectAll.call(this, el, range, offset); - } else if (isArray(offset)) { - processor[rangeType].arr.call(this, el, range, offset); - } else { - for (var key in processor[rangeType]) { - if (offset == key) { - processor[rangeType][key].call(this, el, range, offset); - break; - } - } - } - - // 포커스 및 셀렉트 - if (doc.body.createTextRange) { - range.select(); - el.focus(); - } else if (window.getSelection) { - el.focus(); - selection.removeAllRanges(); - selection.addRange(range); - } - }; - }(); - - /** - * 지정한 시간을 지연시켜 함수를 실행합니다. - * @method ax5.util.debounce - * @param {Function} func - * @param {Number} wait - * @param {Object} options - * @returns {debounced} - * @example - * ```js - * var debounceFn = ax5.util.debounce(function( val ) { console.log(val); }, 300); - * $(document.body).click(function(){ - * debounceFn(new Date()); - * }); - * ``` - */ - // https://github.com/lodash/lodash/blob/master/debounce.js - function debounce(func, wait, options) { - var lastArgs = void 0, - lastThis = void 0, - maxWait = void 0, - result = void 0, - timerId = void 0, - lastCallTime = void 0; - - var lastInvokeTime = 0; - var leading = false; - var maxing = false; - var trailing = true; - - if (typeof func != 'function') { - throw new TypeError('Expected a function'); - } - wait = +wait || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs; - var thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime; - var timeSinceLastInvoke = time - lastInvokeTime; - var result = wait - timeSinceLastCall; - - return maxing ? Math.min(result, maxWait - timeSinceLastInvoke) : result; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime; - var timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; - } - - function timerExpired() { - var time = Date.now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(Date.now()); - } - - function debounced() { - var time = Date.now(); - var isInvoking = shouldInvoke(time); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - lastArgs = args; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; - } - - /** - * @method ax5.util.throttle - * @param func - * @param wait - * @param options - * @return {debounced} - */ - //https://github.com/lodash/lodash/blob/master/throttle.js - function throttle(func, wait, options) { - var leading = true; - var trailing = true; - - if (typeof func != 'function') { - throw new TypeError('Expected a function'); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); - } - - /** - * @method ax5.util.deepCopy - * @param {Object} obj - * @returns {Object} - * @example - * ```js - * var obj = [ - * {name:"A", child:[{name:"a-1"}]}, - * {name:"B", child:[{name:"b-1"}], callBack: function(){ console.log('callBack'); }} - * ]; - * var copiedObj = ax5.util.deepCopy(obj) - * ``` - */ - function deepCopy(obj) { - var r, l; - if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == 'object') { - if (U.isArray(obj)) { - l = obj.length; - r = new Array(l); - for (var i = 0; i < l; i++) { - r[i] = deepCopy(obj[i]); - } - return r; - } else { - return jQuery.extend({}, obj); - } - } - return obj; - } - - /** - * HTML 문자열을 escape 처리합니다. - * "<" represents the < sign. - * ">" represents the > sign. - * "&" represents the & sign. - * "" represents the " mark. - * [Character entity references](https://www.w3.org/TR/html401/charset.html#h-5.3) - * @method ax5.util.escapeHtml - * @param {String} s - * @returns {string} - * @example - * ``` - * ax5.util.escapeHtml('HTML string & "escape"') - * //"HTML <span>string</span> & "escape"" - * ``` - */ - function escapeHtml(s) { - if (_toString.call(s) != "[object String]") return s; - if (!s) return ""; - return s.replace(/[\<\>\&\"]/gm, function (match) { - switch (match) { - case "<": - return "<"; - case ">": - return ">"; - case "&": - return "&"; - case "\"": - return """; - default: - return match; - } - }); - } - - /** - * HTML 문자열을 unescape 처리합니다. - * escapeHtml를 참고하세요. - * @method ax5.util.unescapeHtml - * @param {String} s - * @returns {string} - * @example - * ``` - * ax5.util.unescapeHtml('HTML <span>string</span> & "escape"') - * //"HTML string & "escape"" - * ``` - */ - function unescapeHtml(s) { - if (_toString.call(s) != "[object String]") return s; - if (!s) return ""; - return s.replace(/(<)|(>)|(&)|(")/gm, function (match) { - switch (match) { - case "<": - return "<"; - case ">": - return ">"; - case "&": - return "&"; - case """: - return "\""; - default: - return match; - } - }); - } - - /** - * @method ax5.util.string - * @param {String} tmpl - * @param {*} args - * @return {ax5string} - * @example - * ```js - * ax5.util.string("{0} is dead, but {1} is alive! {0} {2}").format("ASP", "ASP.NET"); - * ax5.util.string("{0} is dead, but {1} is alive! {0} {2}").format(["ASP", "ASP.NET"]); - * ax5.util.stinrg("{0} counts").format(100); - * ``` - */ - function string(_string) { - return new function (_string) { - this.value = _string; - this.toString = function () { - return this.value; - }; - /** - * @method ax5.util.string.format - * @returns {*} - */ - this.format = function () { - var args = []; - for (var i = 0, l = arguments.length; i < l; i++) { - args = args.concat(arguments[i]); - } - return this.value.replace(/{(\d+)}/g, function (match, number) { - return typeof args[number] != 'undefined' ? args[number] : match; - }); - }; - /** - * @method ax5.util.string.escape - * @returns {*} - */ - this.escape = function () { - return escapeHtml(this.value); - }; - /** - * @method ax5.util.string.unescape - * @returns {*} - */ - this.unescape = function () { - return unescapeHtml(this.value); - }; - /** - * @method ax5.util.string.encode - * @returns {*} - */ - this.encode = function () { - return encode(this.value); - }; - /** - * @method ax5.util.string.decode - * @returns {*} - */ - this.decode = function () { - return decode(this.value); - }; - /** - * @method ax5.util.string.left - * @param {String|Number} pos - 찾을 문자열 또는 포지션 - * @returns {*} - */ - this.left = function (_pos) { - return left(this.value, _pos); - }; - /** - * @method ax5.util.string.right - * @param {String|Number} pos - 찾을 문자열 또는 포지션 - * @returns {*} - */ - this.right = function (_pos) { - return right(this.value, _pos); - }; - /** - * @method ax5.util.string.camelCase - * @returns {*} - */ - this.camelCase = function () { - return camelCase(this.value); - }; - /** - * @method ax5.util.string.snakeCase - * @returns {*} - */ - this.snakeCase = function () { - return snakeCase(this.value); - }; - }(_string); - } - - /** - * @method ax5.util.color - * @param _hexColor - * @return {ax5color} - * @example - * ```js - * ax5.util.color("#ff3300").lighten(10).getHexValue() - * console.log(ax5.util.color("#ff3300").darken(10).getHexValue()); - * ``` - */ - function color(_hexColor) { - - var matchers = function () { - - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - - return { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - }(); - - var convertObject = function convertObject(_color) { - var match = void 0; - if (match = matchers.rgb.exec(_color)) { - return { r: match[1], g: match[2], b: match[3] }; - } - if (match = matchers.rgba.exec(_color)) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - if (match = matchers.hsl.exec(_color)) { - return { h: match[1], s: match[2], l: match[3] }; - } - if (match = matchers.hsla.exec(_color)) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - if (match = matchers.hsv.exec(_color)) { - return { h: match[1], s: match[2], v: match[3] }; - } - if (match = matchers.hsva.exec(_color)) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; - } - if (match = matchers.hex8.exec(_color)) { - return { - r: parseInt(match[1], 16), - g: parseInt(match[2], 16), - b: parseInt(match[3], 16), - a: parseInt(match[4] / 255, 16), - format: "hex8" - }; - } - if (match = matchers.hex6.exec(_color)) { - return { - r: parseInt(match[1], 16), - g: parseInt(match[2], 16), - b: parseInt(match[3], 16), - format: "hex" - }; - } - if (match = matchers.hex4.exec(_color)) { - return { - r: parseInt(match[1] + '' + match[1], 16), - g: parseInt(match[2] + '' + match[2], 16), - b: parseInt(match[3] + '' + match[3], 16), - a: parseInt(match[4] + '' + match[4], 16), - format: "hex8" - }; - } - if (match = matchers.hex3.exec(_color)) { - return { - r: parseInt(match[1] + '' + match[1], 16), - g: parseInt(match[2] + '' + match[2], 16), - b: parseInt(match[3] + '' + match[3], 16), - format: "hex" - }; - } - - return false; - }; - - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; - } - - function isPercentage(n) { - return typeof n === "string" && n.indexOf('%') != -1; - } - - function convertToPercentage(n) { - if (n <= 1) { - n = n * 100 + "%"; - } - - return n; - } - - function convertTo255(n) { - return ax5.util.number(Math.min(255, Math.max(n, 0)), { 'round': 2 }); - } - - function convertToHex(n) { - return setDigit(Math.round(n).toString(16), 2); - } - - function bound01(n, max) { - if (isOnePointZero(n)) { - n = "100%"; - } - - var processPercent = isPercentage(n); - n = Math.min(max, Math.max(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if (Math.abs(n - max) < 0.000001) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return n % max / parseFloat(max); - } - - function rgbToHsl(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - l = (max + min) / 2; - - if (max == min) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - - h /= 6; - } - - return { h: h, s: s, l: l }; - } - - function hslToRgb(h, s, l) { - var r = void 0, - g = void 0, - b = void 0; - - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - - if (s === 0) { - r = g = b = l; // achromatic - } else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1 / 3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1 / 3); - } - - return { r: r * 255, g: g * 255, b: b * 255 }; - } - - return new function (_color) { - this._originalValue = _color; - _color = convertObject(_color); - this.r = _color.r; - this.g = _color.g; - this.b = _color.b; - this.a = _color.a || 1; - this._format = _color.format; - this._hex = convertToHex(this.r) + convertToHex(this.g) + convertToHex(this.b); - - this.getHexValue = function () { - return this._hex; - }; - - this.lighten = function (amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = rgbToHsl(this.r, this.g, this.b), - rgb = {}; - - hsl.l += amount / 100; - hsl.l = Math.min(1, Math.max(0, hsl.l)); - hsl.h = hsl.h * 360; - - rgb = hslToRgb(hsl.h, convertToPercentage(hsl.s), convertToPercentage(hsl.l)); - - return color('rgba(' + convertTo255(rgb.r) + ', ' + convertTo255(rgb.g) + ', ' + convertTo255(rgb.b) + ', ' + this.a + ')'); - }; - - this.darken = function (amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = rgbToHsl(this.r, this.g, this.b), - rgb = {}; - - hsl.l -= amount / 100; - hsl.l = Math.min(1, Math.max(0, hsl.l)); - hsl.h = hsl.h * 360; - - rgb = hslToRgb(hsl.h, convertToPercentage(hsl.s), convertToPercentage(hsl.l)); - - return color('rgba(' + convertTo255(rgb.r) + ', ' + convertTo255(rgb.g) + ', ' + convertTo255(rgb.b) + ', ' + this.a + ')'); - }; - - this.getBrightness = function () { - return (this.r * 299 + this.g * 587 + this.b * 114) / 1000; - }; - - this.isDark = function () { - return this.getBrightness() < 128; - }; - - this.isLight = function () { - return !this.isDark(); - }; - - this.getHsl = function () { - var hsl = rgbToHsl(this.r, this.g, this.b); - hsl.l = Math.min(1, Math.max(0, hsl.l)); - hsl.h = hsl.h * 360; - return { - h: hsl.h, - s: hsl.s, - l: hsl.l - }; - }; - }(_hexColor); - } - - return { - alert: alert, - each: each, - map: map, - search: search, - reduce: reduce, - reduceRight: reduceRight, - filter: filter, - sum: sum, - avg: avg, - toJson: toJson, - parseJson: parseJson, - first: first, - last: last, - deepCopy: deepCopy, - - left: left, - right: right, - getType: getType, - isWindow: isWindow, - isElement: isElement, - isObject: isObject, - isArray: isArray, - isFunction: isFunction, - isString: isString, - isNumber: isNumber, - isNodelist: isNodelist, - isUndefined: isUndefined, - isNothing: isNothing, - setCookie: setCookie, - getCookie: getCookie, - camelCase: camelCase, - snakeCase: snakeCase, - number: number, - toArray: toArray, - merge: merge, - param: param, - error: error, - date: date, - dday: dday, - daysOfMonth: daysOfMonth, - weeksOfMonth: weeksOfMonth, - setDigit: setDigit, - times: times, - findParentNode: findParentNode, - cssNumber: cssNumber, - css: css, - isDate: isDate, - isDateFormat: isDateFormat, - stopEvent: stopEvent, - selectRange: selectRange, - debounce: debounce, - throttle: throttle, - escapeHtml: escapeHtml, - unescapeHtml: unescapeHtml, - - string: string, - color: color - }; - }(); - - if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === "object" && _typeof(module.exports) === "object") { - module.exports = ax5; - } else { - root.ax5 = function () { - return ax5; - }(); // ax5.ui에 연결 - } -}).call(typeof window !== "undefined" ? window : undefined); - -ax5.def = {}; -ax5.info.errorMsg["ax5dialog"] = { - "501": "Duplicate call error" -}; - -ax5.info.errorMsg["ax5picker"] = { - "401": "Can not find target element", - "402": "Can not find boundID", - "501": "Can not find content key" -}; - -ax5.info.errorMsg["single-uploader"] = { - "460": "There are no files to be uploaded.", - "461": "There is no uploaded files." -}; - -ax5.info.errorMsg["ax5calendar"] = { - "401": "Can not find target element" -}; - -ax5.info.errorMsg["ax5formatter"] = { - "401": "Can not find target element", - "402": "Can not find boundID", - "501": "Can not find pattern" -}; - -ax5.info.errorMsg["ax5menu"] = { - "501": "Can not find menu item" -}; - -ax5.info.errorMsg["ax5select"] = { - "401": "Can not find target element", - "402": "Can not find boundID", - "501": "Can not find option" -}; - -ax5.info.errorMsg["ax5combobox"] = { - "401": "Can not find target element", - "402": "Can not find boundID", - "501": "Can not find option" -}; -// 필수 Ployfill 확장 구문 -(function () { - 'use strict'; - - var root = this, - re_trim = /^\s*|\s*$/g; - - // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys - if (!Object.keys) { - Object.keys = function () { - var hwp = Object.prototype.hasOwnProperty, - hdeb = !{ toString: null }.propertyIsEnumerable('toString'), - de = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], - del = de.length; - - return function (obj) { - if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && (typeof obj !== 'function' || obj === null)) throw new TypeError('type err'); - var r = [], - prop, - i; - for (prop in obj) { - if (hwp.call(obj, prop)) r.push(prop); - }if (hdeb) { - for (i = 0; i < del; i++) { - if (hwp.call(obj, de[i])) r.push(de[i]); - } - } - return r; - }; - }(); - } - - // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] ) - // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach - if (!Array.prototype.forEach) { - Array.prototype.forEach = function (fun /*, thisp */) { - if (this === void 0 || this === null) { - throw TypeError(); - } - var t = Object(this); - var len = t.length >>> 0; - if (typeof fun !== "function") { - throw TypeError(); - } - var thisp = arguments[1], - i; - for (i = 0; i < len; i++) { - if (i in t) { - fun.call(thisp, t[i], i, t); - } - } - }; - } - - // ES5 15.3.4.5 Function.prototype.bind ( thisArg [, arg1 [, arg2, ... ]] ) - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind - if (!Function.prototype.bind) { - Function.prototype.bind = function (o) { - if (typeof this !== 'function') { - throw TypeError("function"); - } - var slice = [].slice, - args = slice.call(arguments, 1), - self = this, - bound = function bound() { - return self.apply(this instanceof nop ? this : o, args.concat(slice.call(arguments))); - }; - - function nop() {} - - nop.prototype = self.prototype; - bound.prototype = new nop(); - return bound; - }; - } - - /*global document */ - /** - * define document.querySelector & document.querySelectorAll for IE7 - * - * A not very fast but small hack. The approach is taken from - * http://weblogs.asp.net/bleroy/archive/2009/08/31/queryselectorall-on-old-ie-versions-something-that-doesn-t-work.aspx - * - */ - (function () { - if (document.querySelectorAll || document.querySelector) { - return; - } - if (!document.createStyleSheet) return; - var style = document.createStyleSheet(), - select = function select(selector, maxCount) { - var all = document.all, - l = all.length, - i, - resultSet = []; - - style.addRule(selector, "foo:bar"); - for (i = 0; i < l; i += 1) { - if (all[i].currentStyle.foo === "bar") { - resultSet.push(all[i]); - if (resultSet.length > maxCount) { - break; - } - } - } - style.removeRule(0); - return resultSet; - }; - - document.querySelectorAll = function (selector) { - return select(selector, Infinity); - }; - document.querySelector = function (selector) { - return select(selector, 1)[0] || null; - }; - })(); - - if (!String.prototype.trim) { - (function () { - String.prototype.trim = function () { - return this.replace(re_trim, ''); - }; - })(); - } - - if (!window.JSON) { - window.JSON = { - parse: function parse(sJSON) { - return new Function('', 'return ' + sJSON)(); - }, - stringify: function () { - var r = /["]/g, - _f; - return _f = function f(vContent) { - var result, i, j; - switch (result = typeof vContent === 'undefined' ? 'undefined' : _typeof(vContent)) { - case 'string': - return '"' + vContent.replace(r, '\\"') + '"'; - case 'number': - case 'boolean': - return vContent.toString(); - case 'undefined': - return 'undefined'; - case 'function': - return '""'; - case 'object': - if (!vContent) return 'null'; - result = ''; - if (vContent.splice) { - for (i = 0, j = vContent.length; i < j; i++) { - result += ',' + _f(vContent[i]); - }return '[' + result.substr(1) + ']'; - } else { - for (i in vContent) { - if (vContent.hasOwnProperty(i) && vContent[i] !== undefined && typeof vContent[i] != 'function') result += ',"' + i + '":' + _f(vContent[i]); - }return '{' + result.substr(1) + '}'; - } - } - }; - }() - }; - } - - // splice ie8 <= polyfill - (function () { - if (!document.documentMode || document.documentMode >= 9) return false; - var _splice = Array.prototype.splice; - Array.prototype.splice = function () { - var args = Array.prototype.slice.call(arguments); - if (typeof args[1] === "undefined") args[1] = this.length - args[0]; - return _splice.apply(this, args); - }; - })(); - - /** - * Shim for "fixing" IE's lack of support (IE < 9) for applying slice - * on host objects like NamedNodeMap, NodeList, and HTMLCollection - * (technically, since host objects have been implementation-dependent, - * at least before ES6, IE hasn't needed to work this way). - * Also works on strings, fixes IE < 9 to allow an explicit undefined - * for the 2nd argument (as in Firefox), and prevents errors when - * called on other DOM objects. - */ - (function () { - 'use strict'; - - var _slice = Array.prototype.slice; - - try { - // Can't be used with DOM elements in IE < 9 - _slice.call(document.documentElement); - } catch (e) { - // Fails in IE < 9 - // This will work for genuine arrays, array-like objects, - // NamedNodeMap (attributes, entities, notations), - // NodeList (e.g., getElementsByTagName), HTMLCollection (e.g., childNodes), - // and will not fail on other DOM objects (as do DOM elements in IE < 9) - Array.prototype.slice = function (begin, end) { - // IE < 9 gets unhappy with an undefined end argument - end = typeof end !== 'undefined' ? end : this.length; - - // For native Array objects, we use the native slice function - if (Object.prototype.toString.call(this) === '[object Array]') { - return _slice.call(this, begin, end); - } - - // For array like object we handle it ourselves. - var i, - cloned = [], - size, - len = this.length; - - // Handle negative value for "begin" - var start = begin || 0; - start = start >= 0 ? start : Math.max(0, len + start); - - // Handle negative value for "end" - var upTo = typeof end == 'number' ? Math.min(end, len) : len; - if (end < 0) { - upTo = len + end; - } - - // Actual expected size of the slice - size = upTo - start; - - if (size > 0) { - cloned = new Array(size); - if (this.charAt) { - for (i = 0; i < size; i++) { - cloned[i] = this.charAt(start + i); - } - } else { - for (i = 0; i < size; i++) { - cloned[i] = this[start + i]; - } - } - } - - return cloned; - }; - } - })(); - - // Console-polyfill. MIT license. https://github.com/paulmillr/console-polyfill - // Make it safe to do console.log() always. - (function (con) { - var prop, method; - var empty = {}; - var dummy = function dummy() {}; - var properties = 'memory'.split(','); - var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' + 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(','); - while (prop = properties.pop()) { - con[prop] = con[prop] || empty; - }while (method = methods.pop()) { - con[method] = con[method] || dummy; - } - })(window.console || {}); // Using `this` for web workers. - - - // Modernizr style test - if (!(window.webkitMatchMedia || window.mozMatchMedia || window.oMatchMedia || window.msMatchMedia || window.matchMedia)) { - var root = document.getElementsByTagName('html')[0]; - root.className += ' no-matchmedia'; - } - - /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ - window.matchMedia || (window.matchMedia = function () { - "use strict"; - - // For browsers that support matchMedium api such as IE 9 and webkit - - var styleMedia = window.styleMedia || window.media; - - // For those that don't support matchMedium - if (!styleMedia) { - var style = document.createElement('style'), - script = document.getElementsByTagName('script')[0], - info = null; - - style.type = 'text/css'; - style.id = 'matchmediajs-test'; - - script.parentNode.insertBefore(style, script); - - // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers - info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; - - styleMedia = { - matchMedium: function matchMedium(media) { - var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; - - // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers - if (style.styleSheet) { - style.styleSheet.cssText = text; - } else { - style.textContent = text; - } - - // Test if media query is true or false - return info.width === '1px'; - } - }; - } - - return function (media) { - return { - matches: styleMedia.matchMedium(media || 'all'), - media: media || 'all' - }; - }; - }()); - - /*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ - (function () { - // Bail out for browsers that have addListener support - if (window.matchMedia && window.matchMedia('all').addListener) { - return false; - } - - var localMatchMedia = window.matchMedia, - hasMediaQueries = localMatchMedia('only all').matches, - isListening = false, - timeoutID = 0, - // setTimeout for debouncing 'handleChange' - queries = [], - // Contains each 'mql' and associated 'listeners' if 'addListener' is used - handleChange = function handleChange(evt) { - // Debounce - clearTimeout(timeoutID); - - timeoutID = setTimeout(function () { - for (var i = 0, il = queries.length; i < il; i++) { - var mql = queries[i].mql, - listeners = queries[i].listeners || [], - matches = localMatchMedia(mql.media).matches; - - // Update mql.matches value and call listeners - // Fire listeners only if transitioning to or from matched state - if (matches !== mql.matches) { - mql.matches = matches; - - for (var j = 0, jl = listeners.length; j < jl; j++) { - listeners[j].call(window, mql); - } - } - } - }, 30); - }; - - window.matchMedia = function (media) { - var mql = localMatchMedia(media), - listeners = [], - index = 0; - - mql.addListener = function (listener) { - // Changes would not occur to css media type so return now (Affects IE <= 8) - if (!hasMediaQueries) { - return; - } - - // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) - // There should only ever be 1 resize listener running for performance - if (!isListening) { - isListening = true; - window.addEventListener('resize', handleChange, true); - } - - // Push object only if it has not been pushed already - if (index === 0) { - index = queries.push({ - mql: mql, - listeners: listeners - }); - } - - listeners.push(listener); - }; - - mql.removeListener = function (listener) { - for (var i = 0, il = listeners.length; i < il; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - } - } - }; - - return mql; - }; - })(); - - // extend innerWidth .. - var html = document.getElementsByTagName('html')[0]; - var body = document.getElementsByTagName('body')[0]; - - /* - if (!window.innerWidth) window.innerWidth = html.clientWidth; - if (!window.innerHeight) window.innerHeight = html.clientHeight; - if (!window.scrollX) window.scrollX = window.pageXOffset || html.scrollLeft; - if (!window.scrollY) window.scrollY = window.pageYOffset || html.scrollTop; - */ -}).call(window); -/** - * Refer to this by {@link ax5}. - * @namespace ax5.ui - */ - -/** - * @class ax5.ui.root - * @classdesc ax5 ui class - * @author tom@axisj.com - * @example - * ``` - * var myui = new ax5.ui.root(); - * ``` - */ -ax5.ui = function () { - - function axUi() { - this.config = {}; - this.name = "root"; - - /** - * 클래스의 속성 정의 메소드 속성 확장후에 내부에 init 함수를 호출합니다. - * @method ax5.ui.root.setConfig - * @param {Object} config - 클래스 속성값 - * @param {Boolean} [callInit=true] - init 함수 호출 여부 - * @returns {ax5.ui.axUi} - * @example - * ``` - * var myui = new ax5.ui.root(); - * myui.setConfig({ - * id:"abcd" - * }); - * ``` - */ - this.setConfig = function (cfg, callInit) { - jQuery.extend(true, this.config, cfg); - if (typeof callInit == "undefined" || callInit === true) { - this.init(); - } - return this; - }; - this.init = function () { - console.log(this.config); - }; - - this.bindWindowResize = function (callBack) { - setTimeout(function () { - jQuery(window).resize(function () { - if (this.bindWindowResize__) clearTimeout(this.bindWindowResize__); - this.bindWindowResize__ = setTimeout(function () { - callBack.call(this); - }.bind(this), 10); - }.bind(this)); - }.bind(this), 100); - }; - - this.stopEvent = function (e) { - if (e.preventDefault) e.preventDefault(); - if (e.stopPropagation) e.stopPropagation(); - e.cancelBubble = true; - return false; - }; - - this.toString = function () { - return this.name + '@' + this.version; - }; - - // instance init - this.main = function () {}.apply(this, arguments); - } - - /** - * @method ax5.ui.addClass - * @param {Object} config - * @param {String} config.className - name of Class - * @param {Object} [config.classStore=ax5.ui] - 클래스가 저장될 경로 - * @param {Function} [config.superClass=ax5.ui.root] - * @param {Function} cls - Class Function - */ - function addClass(config, cls) { - if (!config || !config.className) throw 'invalid call'; - var classStore = config.classStore ? config.classStore : ax5.ui; - if (!classStore) throw 'invalid classStore'; - - // make ui definition variable - ax5.def[config.className] = { - version: ax5.info.version - }; - - var factory = function factory(cls, arg) { - switch (arg.length) { - case 0: - return new cls(); - break; - case 1: - return new cls(arg[0]); - break; - case 2: - return new cls(arg[0], arg[1]); - break; - case 3: - return new cls(arg[0], arg[1], arg[2]); - break; - } - }; - var initInstance = function initInstance(name, version, instance) { - instance.name = name; - instance.version = version; - instance.instanceId = ax5.getGuid(); - return instance; - }; - var initPrototype = function initPrototype(cls) { - var superClass = config.superClass ? config.superClass : ax5.ui.root; - if (!ax5.util.isFunction(superClass)) throw 'invalid superClass'; - superClass.call(this); // 부모호출 - cls.prototype = new superClass(); // 상속 - }; - var wrapper = function wrapper() { - if (!this || !(this instanceof wrapper)) throw 'invalid call'; - var instance = factory(cls, arguments); - return initInstance(config.className, config.version || "", instance); - }; - initPrototype.call(this, cls); - classStore[config.className] = wrapper; - } - - return { - root: axUi, - addClass: addClass - }; -}(); - -/*! - * mustache.js - Logic-less {{mustache}} templates with JavaScript - * http://github.com/janl/mustache.js - * https://github.com/thomasJang/mustache.js -- imporove some variables - */ - -(function defineMustache(global, factory) { - - factory(global.mustache = {}); -})(window.ax5, function mustacheFactory(mustache) { - - var objectToString = Object.prototype.toString; - var isArray = Array.isArray || function isArrayPolyfill(object) { - return objectToString.call(object) === '[object Array]'; - }; - - function isFunction(object) { - return typeof object === 'function'; - } - - /** - * More correct typeof string handling array - * which normally returns typeof 'object' - */ - function typeStr(obj) { - return isArray(obj) ? 'array' : typeof obj === 'undefined' ? 'undefined' : _typeof(obj); - } - - function escapeRegExp(string) { - return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); - } - - /** - * Null safe way of checking whether or not an object, - * including its prototype, has a given property - */ - function hasProperty(obj, propName) { - return obj != null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && propName in obj; - } - - // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577 - // See https://github.com/janl/mustache.js/issues/189 - var regExpTest = RegExp.prototype.test; - - function testRegExp(re, string) { - return regExpTest.call(re, string); - } - - var nonSpaceRe = /\S/; - - function isWhitespace(string) { - return !testRegExp(nonSpaceRe, string); - } - - var entityMap = { - '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '/': '/' - }; - - function escapeHtml(string) { - return String(string).replace(/[&<>"'\/]/g, function fromEntityMap(s) { - return entityMap[s]; - }); - } - - var whiteRe = /\s*/; - var spaceRe = /\s+/; - var equalsRe = /\s*=/; - var curlyRe = /\s*\}/; - var tagRe = /#|\^|\/|>|\{|&|=|!/; - - /** - * Breaks up the given `template` string into a tree of tokens. If the `tags` - * argument is given here it must be an array with two string values: the - * opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of - * course, the default is to use mustaches (i.e. mustache.tags). - * - * A token is an array with at least 4 elements. The first element is the - * mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag - * did not contain a symbol (i.e. {{myValue}}) this element is "name". For - * all text that appears outside a symbol this element is "text". - * - * The second element of a token is its "value". For mustache tags this is - * whatever else was inside the tag besides the opening symbol. For text tokens - * this is the text itself. - * - * The third and fourth elements of the token are the start and end indices, - * respectively, of the token in the original template. - * - * Tokens that are the root node of a subtree contain two more elements: 1) an - * array of tokens in the subtree and 2) the index in the original template at - * which the closing tag for that section begins. - */ - function parseTemplate(template, tags) { - if (!template) return []; - - var sections = []; // Stack to hold section tokens - var tokens = []; // Buffer to hold the tokens - var spaces = []; // Indices of whitespace tokens on the current line - var hasTag = false; // Is there a {{tag}} on the current line? - var nonSpace = false; // Is there a non-space char on the current line? - - // Strips all whitespace tokens array for the current line - // if there was a {{#tag}} on it and otherwise only space. - function stripSpace() { - if (hasTag && !nonSpace) { - while (spaces.length) { - delete tokens[spaces.pop()]; - } - } else { - spaces = []; - } - - hasTag = false; - nonSpace = false; - } - - var openingTagRe, closingTagRe, closingCurlyRe; - - function compileTags(tagsToCompile) { - if (typeof tagsToCompile === 'string') tagsToCompile = tagsToCompile.split(spaceRe, 2); - - if (!isArray(tagsToCompile) || tagsToCompile.length !== 2) throw new Error('Invalid tags: ' + tagsToCompile); - - openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\s*'); - closingTagRe = new RegExp('\\s*' + escapeRegExp(tagsToCompile[1])); - closingCurlyRe = new RegExp('\\s*' + escapeRegExp('}' + tagsToCompile[1])); - } - - compileTags(tags || mustache.tags); - - var scanner = new Scanner(template); - - var start, type, value, chr, token, openSection; - while (!scanner.eos()) { - start = scanner.pos; - - // Match any text between tags. - value = scanner.scanUntil(openingTagRe); - - if (value) { - for (var i = 0, valueLength = value.length; i < valueLength; ++i) { - chr = value.charAt(i); - - if (isWhitespace(chr)) { - spaces.push(tokens.length); - } else { - nonSpace = true; - } - - tokens.push(['text', chr, start, start + 1]); - start += 1; - - // Check for whitespace on the current line. - if (chr === '\n') stripSpace(); - } - } - - // Match the opening tag. - if (!scanner.scan(openingTagRe)) break; - - hasTag = true; - - // Get the tag type. - type = scanner.scan(tagRe) || 'name'; - scanner.scan(whiteRe); - - // Get the tag value. - if (type === '=') { - value = scanner.scanUntil(equalsRe); - scanner.scan(equalsRe); - scanner.scanUntil(closingTagRe); - } else if (type === '{') { - value = scanner.scanUntil(closingCurlyRe); - scanner.scan(curlyRe); - scanner.scanUntil(closingTagRe); - type = '&'; - } else { - value = scanner.scanUntil(closingTagRe); - } - - // Match the closing tag. - if (!scanner.scan(closingTagRe)) throw new Error('Unclosed tag at ' + scanner.pos); - - token = [type, value, start, scanner.pos]; - tokens.push(token); - - if (type === '#' || type === '^') { - sections.push(token); - } else if (type === '/') { - // Check section nesting. - openSection = sections.pop(); - - if (!openSection) throw new Error('Unopened section "' + value + '" at ' + start); - - if (openSection[1] !== value) throw new Error('Unclosed section "' + openSection[1] + '" at ' + start); - } else if (type === 'name' || type === '{' || type === '&') { - nonSpace = true; - } else if (type === '=') { - // Set the tags for the next time around. - compileTags(value); - } - } - - // Make sure there are no open sections when we're done. - openSection = sections.pop(); - - if (openSection) throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos); - - return nestTokens(squashTokens(tokens)); - } - - /** - * Combines the values of consecutive text tokens in the given `tokens` array - * to a single token. - */ - function squashTokens(tokens) { - var squashedTokens = []; - - var token, lastToken; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - token = tokens[i]; - - if (token) { - if (token[0] === 'text' && lastToken && lastToken[0] === 'text') { - lastToken[1] += token[1]; - lastToken[3] = token[3]; - } else { - squashedTokens.push(token); - lastToken = token; - } - } - } - - return squashedTokens; - } - - /** - * Forms the given array of `tokens` into a nested tree structure where - * tokens that represent a section have two additional items: 1) an array of - * all tokens that appear in that section and 2) the index in the original - * template that represents the end of that section. - */ - function nestTokens(tokens) { - var nestedTokens = []; - var collector = nestedTokens; - var sections = []; - - var token, section; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - token = tokens[i]; - - switch (token[0]) { - case '#': - case '^': - collector.push(token); - sections.push(token); - collector = token[4] = []; - break; - case '/': - section = sections.pop(); - section[5] = token[2]; - collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens; - break; - default: - collector.push(token); - } - } - - return nestedTokens; - } - - /** - * A simple string scanner that is used by the template parser to find - * tokens in template strings. - */ - function Scanner(string) { - this.string = string; - this.tail = string; - this.pos = 0; - } - - /** - * Returns `true` if the tail is empty (end of string). - */ - Scanner.prototype.eos = function eos() { - return this.tail === ''; - }; - - /** - * Tries to match the given regular expression at the current position. - * Returns the matched text if it can match, the empty string otherwise. - */ - Scanner.prototype.scan = function scan(re) { - var match = this.tail.match(re); - - if (!match || match.index !== 0) return ''; - - var string = match[0]; - - this.tail = this.tail.substring(string.length); - this.pos += string.length; - - return string; - }; - - /** - * Skips all text until the given regular expression can be matched. Returns - * the skipped string, which is the entire tail if no match can be made. - */ - Scanner.prototype.scanUntil = function scanUntil(re) { - var index = this.tail.search(re), - match; - - switch (index) { - case -1: - match = this.tail; - this.tail = ''; - break; - case 0: - match = ''; - break; - default: - match = this.tail.substring(0, index); - this.tail = this.tail.substring(index); - } - - this.pos += match.length; - - return match; - }; - - /** - * Represents a rendering context by wrapping a view object and - * maintaining a reference to the parent context. - */ - function Context(view, parentContext) { - this.view = view; - this.cache = { - '.': this.view, - '@each': function each() { - var returns = []; - for (var k in this) { - returns.push({ '@key': k, '@value': this[k] }); - } - return returns; - } - }; - this.parent = parentContext; - } - - /** - * Creates a new context using the given view with this context - * as the parent. - */ - Context.prototype.push = function push(view) { - return new Context(view, this); - }; - - /** - * Returns the value of the given name in this context, traversing - * up the context hierarchy if the value is absent in this context's view. - */ - Context.prototype.lookup = function lookup(name) { - var cache = this.cache; - - var value; - if (cache.hasOwnProperty(name)) { - value = cache[name]; - } else { - var context = this, - names, - index, - lookupHit = false; - - while (context) { - if (name.indexOf('.') > 0) { - value = context.view; - names = name.split('.'); - index = 0; - - /** - * Using the dot notion path in `name`, we descend through the - * nested objects. - * - * To be certain that the lookup has been successful, we have to - * check if the last object in the path actually has the property - * we are looking for. We store the result in `lookupHit`. - * - * This is specially necessary for when the value has been set to - * `undefined` and we want to avoid looking up parent contexts. - **/ - while (value != null && index < names.length) { - if (index === names.length - 1) lookupHit = hasProperty(value, names[index]); - - value = value[names[index++]]; - } - } else { - value = context.view[name]; - lookupHit = hasProperty(context.view, name); - } - - if (lookupHit) break; - - context = context.parent; - } - - cache[name] = value; - } - - if (isFunction(value)) value = value.call(this.view); - - return value; - }; - - /** - * A Writer knows how to take a stream of tokens and render them to a - * string, given a context. It also maintains a cache of templates to - * avoid the need to parse the same template twice. - */ - function Writer() { - this.cache = {}; - } - - /** - * Clears all cached templates in this writer. - */ - Writer.prototype.clearCache = function clearCache() { - this.cache = {}; - }; - - /** - * Parses and caches the given `template` and returns the array of tokens - * that is generated from the parse. - */ - Writer.prototype.parse = function parse(template, tags) { - var cache = this.cache; - var tokens = cache[template]; - - if (tokens == null) tokens = cache[template] = parseTemplate(template, tags); - - return tokens; - }; - - /** - * High-level method that is used to render the given `template` with - * the given `view`. - * - * The optional `partials` argument may be an object that contains the - * names and templates of partials that are used in the template. It may - * also be a function that is used to load partial templates on the fly - * that takes a single argument: the name of the partial. - */ - Writer.prototype.render = function render(template, view, partials) { - var tokens = this.parse(template); - var context = view instanceof Context ? view : new Context(view); - return this.renderTokens(tokens, context, partials, template); - }; - - /** - * Low-level method that renders the given array of `tokens` using - * the given `context` and `partials`. - * - * Note: The `originalTemplate` is only ever used to extract the portion - * of the original template that was contained in a higher-order section. - * If the template doesn't use higher-order sections, this argument may - * be omitted. - */ - Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) { - var buffer = ''; - var token, symbol, value; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - value = undefined; - token = tokens[i]; - symbol = token[0]; - - if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);else if (symbol === '>') value = this.renderPartial(token, context, partials, originalTemplate);else if (symbol === '&') value = this.unescapedValue(token, context);else if (symbol === 'name') value = this.escapedValue(token, context);else if (symbol === 'text') value = this.rawValue(token); - - if (value !== undefined) buffer += value; - } - - return buffer; - }; - - Writer.prototype.renderSection = function renderSection(token, context, partials, originalTemplate) { - var self = this; - var buffer = ''; - - var value = context.lookup(token[1]); - - // This function is used to render an arbitrary template - // in the current context by higher-order sections. - function subRender(template) { - return self.render(template, context, partials); - } - - if (!value) return; - - if (isArray(value)) { - for (var j = 0, valueLength = value.length; j < valueLength; ++j) { - if (value[j]) { - if (_typeof(value[j]) === 'object') { - value[j]['@i'] = j; - value[j]['@first'] = j === 0; - } - - buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate); - } - } - } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' || typeof value === 'string' || typeof value === 'number') { - buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate); - } else if (isFunction(value)) { - if (typeof originalTemplate !== 'string') throw new Error('Cannot use higher-order sections without the original template'); - - // Extract the portion of the original template that the section contains. - value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender); - - if (value != null) buffer += value; - } else { - buffer += this.renderTokens(token[4], context, partials, originalTemplate); - } - return buffer; - }; - - Writer.prototype.renderInverted = function renderInverted(token, context, partials, originalTemplate) { - var value = context.lookup(token[1]); - - // Use JavaScript's definition of falsy. Include empty arrays. - // See https://github.com/janl/mustache.js/issues/186 - if (!value || isArray(value) && value.length === 0) return this.renderTokens(token[4], context, partials, originalTemplate); - }; - - Writer.prototype.renderPartial = function renderPartial(token, context, partials) { - if (!partials) return; - - var value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; - if (value != null) return this.renderTokens(this.parse(value), context, partials, value); - }; - - Writer.prototype.unescapedValue = function unescapedValue(token, context) { - var value = context.lookup(token[1]); - if (value != null) return value; - }; - - Writer.prototype.escapedValue = function escapedValue(token, context) { - var value = context.lookup(token[1]); - if (value != null) return mustache.escape(value); - }; - - Writer.prototype.rawValue = function rawValue(token) { - return token[1]; - }; - - mustache.name = 'mustache.js'; - mustache.version = '2.1.3'; - mustache.tags = ['{{', '}}']; - - // All high-level mustache.* functions use this writer. - var defaultWriter = new Writer(); - - /** - * Clears all cached templates in the default writer. - */ - mustache.clearCache = function clearCache() { - return defaultWriter.clearCache(); - }; - - /** - * Parses and caches the given template in the default writer and returns the - * array of tokens it contains. Doing this ahead of time avoids the need to - * parse templates on the fly as they are rendered. - */ - mustache.parse = function parse(template, tags) { - return defaultWriter.parse(template, tags); - }; - - /** - * Renders the `template` with the given `view` and `partials` using the - * default writer. - */ - mustache.render = function render(template, view, partials) { - if (typeof template !== 'string') { - throw new TypeError('Invalid template! Template should be a "string" ' + 'but "' + typeStr(template) + '" was given as the first ' + 'argument for mustache#render(template, view, partials)'); - } - - return defaultWriter.render(template, view, partials); - }; - - // This is here for backwards compatibility with 0.4.x., - /*eslint-disable */ // eslint wants camel cased function name - mustache.to_html = function to_html(template, view, partials, send) { - /*eslint-enable*/ - - var result = mustache.render(template, view, partials); - - if (isFunction(send)) { - send(result); - } else { - return result; - } - }; - - // Export the escaping function so that the user may override it. - // See https://github.com/janl/mustache.js/issues/244 - mustache.escape = escapeHtml; - - // Export these mainly for testing, but also for advanced usage. - mustache.Scanner = Scanner; - mustache.Context = Context; - mustache.Writer = Writer; -}); \ No newline at end of file diff --git a/_src/plugins/ax5core/ax5core.min.js b/_src/plugins/ax5core/ax5core.min.js deleted file mode 100644 index 71f6064..0000000 --- a/_src/plugins/ax5core/ax5core.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(){var e=this,t=this,n=t?t.document:null,r=(t?t.document.documentElement:null,/^(["'](\\.|[^"\\\n\r])*?["']|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/),i=/^-ms-/,o=/[\-_]([\da-z])/gi,a=/([A-Z])/g,u=/\./,s=/[-|+]?[\D]/gi,f=/\D/gi,c=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),l=/&/g,d=/=/,h=/[ ]+/g,p={},g=void 0,m=void 0;p.guid=1,p.getGuid=function(){return p.guid++},p.info=g=function(){function e(e,r){return e={href:t.location.href,param:t.location.search,referrer:n.referrer,pathname:t.location.pathname,hostname:t.location.hostname,port:t.location.port},r=e.href.split(/[\?#]/),e.param=e.param.replace("?",""),e.url=r[0],e.href.search("#")>-1&&(e.hashdata=m.last(r)),r=null,e.baseUrl=m.left(e.href,"?").replace(e.pathname,""),e}function r(e,t,n){return g.errorMsg&&g.errorMsg[e]?{className:e,errorCode:t,methodName:n,msg:g.errorMsg[e][t]}:{className:e,errorCode:t,methodName:n}}var i=arguments,o="1.4.126",a="",u=function(){console.error(m.toArray(i).join(":"))},s={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34,INSERT:45,SPACE:32},f=[{label:"SUN"},{label:"MON"},{label:"TUE"},{label:"WED"},{label:"THU"},{label:"FRI"},{label:"SAT"}],c=function(e,n,r,i,o,a){return t&&t.navigator?(e=navigator.userAgent.toLowerCase(),n=e.search(/mobile/g)!=-1,a,e.search(/iphone/g)!=-1?{name:"iphone",version:0,mobile:!0}:e.search(/ipad/g)!=-1?{name:"ipad",version:0,mobile:!0}:e.search(/android/g)!=-1?(i=/(android)[ \/]([\w.]+)/.exec(e)||[],a=i[2]||"0",{name:"android",version:a,mobile:n}):(r="",i=/(opr)[ \/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],o=i[1]||"",a=i[2]||"0","msie"==o&&(o="ie"),{name:o,version:a,mobile:n})):{}}(),l=!("undefined"==typeof window||"undefined"==typeof navigator||!t.document),d=t&&/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel",h={},p=!!t&&("ontouchstart"in t||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),v=!!t&&(t.FileReader&&t.File&&t.FileList&&t.Blob);return{errorMsg:h,version:o,baseUrl:a,onerror:u,eventKeys:s,weekNames:f,browser:c,isBrowser:l,supportTouch:p,supportFileApi:v,wheelEnm:d,urlUtil:e,getError:r}}(),p.util=m=function(){function v(e,t){if(_(e))return[];var n=void 0,r=0,i=e.length,o=void 0===i||"function"==typeof e;if(o){for(n in e)if("undefined"!=typeof e[n]&&t.call(e[n],n,e[n])===!1)break}else for(;r0&&("undefined"==typeof t[r]||(i=n.call(e,i,t[--r]))!==!1););return i}function T(e,t){if(_(e))return[];var n,r,i=0,o=e.length,a=[];if(k(e))for(n in e)"undefined"!=typeof e[n]&&(r=t.call(e[n],n,e[n]))&&a.push(e[n]);else for(;i0&&(t+=","),t+=S(e[n]);t+="]"}else if(p.util.isObject(e)){t+="{";var i=[];v(e,function(e,t){i.push('"'+e+'": '+S(t))}),t+=i.join(", "),t+="}"}else t=p.util.isString(e)?'"'+e+'"':p.util.isNumber(e)?e:p.util.isUndefined(e)?"undefined":p.util.isFunction(e)?'"{Function}"':e;return t}function A(e,t){if(!t&&!r.test(e))return{error:500,msg:"syntax error"};try{return new Function("","return "+e)()}catch(n){return{error:500,msg:"syntax error"}}}function D(e){var t;return null!=e&&e==e.window?t="window":e&&1==e.nodeType?t="element":e&&11==e.nodeType?t="fragment":null===e?t="null":"undefined"==typeof e?t="undefined":"[object Object]"==we.call(e)?t="object":"[object Array]"==we.call(e)?t="array":"[object String]"==we.call(e)?t="string":"[object Number]"==we.call(e)?t="number":"[object NodeList]"==we.call(e)?t="nodelist":"function"==typeof e&&(t="function"),t}function C(e){return null!=e&&e==e.window}function N(e){return!(!e||1!=e.nodeType&&11!=e.nodeType)}function k(e){return"[object Object]"==we.call(e)}function j(e){return"[object Array]"==we.call(e)}function F(e){return"function"==typeof e}function O(e){return"[object String]"==we.call(e)}function R(e){return"[object Number]"==we.call(e)}function I(e){return!!("[object NodeList]"==we.call(e)||"undefined"!=typeof e&&e&&e[0]&&1==e[0].nodeType)}function U(e){return"undefined"==typeof e}function _(e){return"undefined"==typeof e||null===e||""===e}function P(e){return e instanceof Date&&!isNaN(e.valueOf())}function $(e){var t=!1;if(e)if(e instanceof Date&&!isNaN(e.valueOf()))t=!0;else{if(e.length>7&&re(e)instanceof Date)return!0;if(e=e.replace(/\D/g,""),e.length>7){var n=e.substr(4,2),r=e.substr(6,2);e=re(e),e.getMonth()==n-1&&e.getDate()==r&&(t=!0)}}else;return t}function B(e){if(k(e)){var t=Object.keys(e),n={};return n[t[0]]=e[t[0]],n}return j(e)?e[0]:void console.error("ax5.util.object.first","argument type error")}function L(e){if(k(e)){var t=Object.keys(e),n={};return n[t[t.length-1]]=e[t[t.length-1]],n}return j(e)?e[e.length-1]:void console.error("ax5.util.object.last","argument type error")}function z(e,t,r,i){var o;return"number"==typeof r&&(o=new Date,o.setDate(o.getDate()+r)),i=i||{},n.cookie=[escape(e),"=",escape(t),o?"; expires="+o.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}function H(e){for(var t=e+"=",r=n.cookie.split(";"),i=0,o=r.length;i-1?e.substr(0,e.indexOf(t)):"":R(t)?e.substr(0,t):""}function q(e,t){return"undefined"==typeof e||"undefined"==typeof t?"":(e=""+e,O(t)?e.lastIndexOf(t)>-1?e.substr(e.lastIndexOf(t)+1):"":R(t)?e.substr(e.length-t):"")}function V(e){return e.replace(i,"ms-").replace(o,function(e,t){return t.toUpperCase()})}function G(e){return V(e).replace(a,function(e,t){return"-"+t.toLowerCase()})}function J(e,t){var n,r,i,o=(""+e).split(u);return r=Number(o[0].replace(/,/g,""))<0||"-0"==o[0],i=0,o[0]=o[0].replace(s,""),o[1]?(o[1]=o[1].replace(f,""),i=Number(o[0]+"."+o[1])||0):i=Number(o[0])||0,n=r?-i:i,v(t,function(e,t){"round"==e&&(n=R(t)?t<0?+(Math.round(n+"e-"+Math.abs(t))+"e+"+Math.abs(t)):+(Math.round(n+"e+"+t)+"e-"+t):Math.round(n)),"floor"==e&&(n=Math.floor(n)),"ceil"==e?n=Math.ceil(n):"money"==e?n=function(e){var t=""+e;if(isNaN(t)||""==t)return"";var n=t.split(".");n[0]+=".";do n[0]=n[0].replace(c,"$1,$2");while(c.test(n[0]));return n.length>1?n.join(""):n[0].split(".")[0]}(n):"abs"==e?n=Math.abs(Number(n)):"byte"==e&&(n=function(e){e=Number(n);var t="KB",r=e/1024;return r/1024>1&&(t="MB",r/=1024),r/1024>1&&(t="GB",r/=1024),J(r,{round:1})+t}(n))}),n}function Q(e){return"undefined"!=typeof e.length?Array.prototype.slice.call(e):[]}function Z(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;i15)h.test(e)||d.test(e)?e=new Date(e):(u=e.split(/ /g),c=u[0].split(/\D/g),n=c[0],r=parseFloat(c[1]),i=parseFloat(c[2]),f=u[1]||"09:00",s=f.substring(0,5).split(":"),o=parseFloat(s[0]),a=parseFloat(s[1]),"AM"!==q(f,2)&&"PM"!==q(f,2)||(o+=12),e=ne(n,r-1,i,o,a));else if(14==e.length)l=e.replace(/\D/g,""),e=ne(l.substr(0,4),l.substr(4,2)-1,J(l.substr(6,2)),J(l.substr(8,2)),J(l.substr(10,2)),J(l.substr(12,2)));else if(e.length>7)l=e.replace(/\D/g,""),e=ne(l.substr(0,4),l.substr(4,2)-1,J(l.substr(6,2)));else if(e.length>4)l=e.replace(/\D/g,""),e=ne(l.substr(0,4),l.substr(4,2)-1,1);else{if(e.length>2)return l=e.replace(/\D/g,""),ne(l.substr(0,4),l.substr(4,2)-1,1);e=new Date}return"undefined"==typeof t||"undefined"==typeof e?e:("add"in t&&(e=function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,a=864e5;return"undefined"!=typeof t.d?e.setTime(e.getTime()+t.d*a):"undefined"!=typeof t.m?(n=e.getFullYear(),r=e.getMonth(),i=e.getDate(),n+=parseInt(t.m/12),r+=t.m%12,o=ae(n,r),o=t||n<0||w&&r>=p}function u(){var e=Date.now();return a(e)?s(e):void(m=setTimeout(u,o(e)))}function s(e){return m=void 0,x&&d?r(e):(d=h=void 0,g)}function f(){void 0!==m&&clearTimeout(m),y=0,d=v=h=m=void 0}function c(){return void 0===m?g:s(Date.now())}function l(){for(var e=Date.now(),n=a(e),o=arguments.length,s=Array(o),f=0;f\&\"]/gm,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case'"':return""";default:return e}}):""}function ve(e){return"[object String]"!=we.call(e)?e:e?e.replace(/(<)|(>)|(&)|(")/gm,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case""":return'"';default:return e}}):""}function ye(e){return new function(e){this.value=e,this.toString=function(){return this.value},this.format=function(){for(var e=[],t=0,n=arguments.length;t.5?f/(2-o-u):f/(o+u),o){case e:r=(t-n)/f+(t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var i=void 0,o=void 0,u=void 0;if(e=a(e,360),t=a(t,100),n=a(n,100),0===t)i=o=u=n;else{var s=n<.5?n*(1+t):n+t-n*t,f=2*n-s;i=r(f,s,e+1/3),o=r(f,s,e),u=r(f,s,e-1/3)}return{r:255*i,g:255*o,b:255*u}}var f=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}(),c=function(e){var t=void 0;return(t=f.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=f.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=f.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=f.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=f.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=f.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=f.hex8.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:parseInt(t[4]/255,16),format:"hex8"}:(t=f.hex6.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),format:"hex"}:(t=f.hex4.exec(e))?{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),a:parseInt(t[4]+""+t[4],16),format:"hex8"}:!!(t=f.hex3.exec(e))&&{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),format:"hex"}};return new function(e){this._originalValue=e,e=c(e),this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a||1,this._format=e.format,this._hex=o(this.r)+o(this.g)+o(this.b),this.getHexValue=function(){return this._hex},this.lighten=function(e){e=0===e?0:e||10;var t=u(this.r,this.g,this.b),n={};return t.l+=e/100,t.l=Math.min(1,Math.max(0,t.l)),t.h=360*t.h,n=s(t.h,r(t.s),r(t.l)),be("rgba("+i(n.r)+", "+i(n.g)+", "+i(n.b)+", "+this.a+")")},this.darken=function(e){e=0===e?0:e||10;var t=u(this.r,this.g,this.b),n={};return t.l-=e/100,t.l=Math.min(1,Math.max(0,t.l)),t.h=360*t.h,n=s(t.h,r(t.s),r(t.l)),be("rgba("+i(n.r)+", "+i(n.g)+", "+i(n.b)+", "+this.a+")")},this.getBrightness=function(){return(299*this.r+587*this.g+114*this.b)/1e3},this.isDark=function(){return this.getBrightness()<128},this.isLight=function(){return!this.isDark()},this.getHsl=function(){var e=u(this.r,this.g,this.b);return e.l=Math.min(1,Math.max(0,e.l)),e.h=360*e.h,{h:e.h,s:e.s,l:e.l}}}(e)}var we=Object.prototype.toString,xe=function(){var e={textRange:{selectAll:function(e,t,n){},arr:function(e,t,n){t.moveStart("character",n[0]),t.collapse(),t.moveEnd("character",n[1])},start:function(e,t,n){t.moveStart("character",0),t.collapse()},end:function(e,t,n){t.moveStart("character",t.text.length),t.collapse()}},range:{selectAll:function(e,t,n){t.selectNodeContents(e)},arr:function(e,t,n){k(n[0])?(t.setStart(n[0].node,n[0].offset),t.setEnd(n[1].node,n[1].offset)):(t.setStart(e.firstChild,n[0]),t.setEnd(e.firstChild,n[1]))},start:function(e,t,n){t.selectNodeContents(e),t.collapse(!0)},end:function(e,t,n){t.selectNodeContents(e),t.collapse(!1)}}};return function(t,r){var i,o,a;if(t instanceof jQuery&&(t=t.get(0)),t){if(n.body.createTextRange?(i=document.body.createTextRange(),i.moveToElementText(t),o="textRange"):window.getSelection&&(a=window.getSelection(),i=document.createRange(),o="range"),"undefined"==typeof r)e[o].selectAll.call(this,t,i,r);else if(j(r))e[o].arr.call(this,t,i,r);else for(var u in e[o])if(r==u){e[o][u].call(this,t,i,r);break}n.body.createTextRange?(i.select(),t.focus()):window.getSelection&&(t.focus(),a.removeAllRanges(),a.addRange(i))}}}();return{alert:W,each:v,map:y,search:b,reduce:M,reduceRight:E,filter:T,sum:w,avg:x,toJson:S,parseJson:A,first:B,last:L,deepCopy:ge,left:Y,right:q,getType:D,isWindow:C,isElement:N,isObject:k,isArray:j,isFunction:F,isString:O,isNumber:R,isNodelist:I,isUndefined:U,isNothing:_,setCookie:z,getCookie:H,camelCase:V,snakeCase:G,number:J,toArray:Q,merge:Z,param:K,error:te,date:re,dday:ie,daysOfMonth:ae,weeksOfMonth:oe,setDigit:ue,times:se,findParentNode:fe,cssNumber:ce,css:le,isDate:P,isDateFormat:$,stopEvent:de,selectRange:xe,debounce:he,throttle:pe,escapeHtml:me,unescapeHtml:ve,string:ye,color:be}}(),"object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)?module.exports=p:e.ax5=function(){return p}()}).call("undefined"!=typeof window?window:void 0),ax5.def={},ax5.info.errorMsg.ax5dialog={501:"Duplicate call error"},ax5.info.errorMsg.ax5picker={401:"Can not find target element",402:"Can not find boundID",501:"Can not find content key"},ax5.info.errorMsg["single-uploader"]={460:"There are no files to be uploaded.",461:"There is no uploaded files."},ax5.info.errorMsg.ax5calendar={401:"Can not find target element"},ax5.info.errorMsg.ax5formatter={401:"Can not find target element",402:"Can not find boundID",501:"Can not find pattern"},ax5.info.errorMsg.ax5menu={501:"Can not find menu item"},ax5.info.errorMsg.ax5select={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},ax5.info.errorMsg.ax5combobox={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},function(){var e=this,t=/^\s*|\s*$/g;if(Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(i){if("object"!==("undefined"==typeof i?"undefined":_typeof(i))&&("function"!=typeof i||null===i))throw new TypeError("type err");var o,a,u=[];for(o in i)e.call(i,o)&&u.push(o);if(t)for(a=0;a>>0;if("function"!=typeof e)throw TypeError();var r,i=arguments[1];for(r=0;rn));r+=1);return e.removeRule(0),a};document.querySelectorAll=function(e){return t(e,1/0)},document.querySelector=function(e){return t(e,1)[0]||null}}}(),String.prototype.trim||!function(){String.prototype.trim=function(){return this.replace(t,"")}}(),window.JSON||(window.JSON={parse:function(e){return new Function("","return "+e)()},stringify:function(){var e,t=/["]/g;return e=function(n){var r,i,o;switch(r="undefined"==typeof n?"undefined":_typeof(n)){case"string":return'"'+n.replace(t,'\\"')+'"';case"number":case"boolean":return n.toString();case"undefined":return"undefined";case"function":return'""';case"object":if(!n)return"null";if(r="",n.splice){for(i=0,o=n.length;i=9)return!1;var e=Array.prototype.splice;Array.prototype.splice=function(){var t=Array.prototype.slice.call(arguments);return"undefined"==typeof t[1]&&(t[1]=this.length-t[0]),e.apply(this,t)}}(),function(){var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){if(n="undefined"!=typeof n?n:this.length,"[object Array]"===Object.prototype.toString.call(this))return e.call(this,t,n);var r,i,o=[],a=this.length,u=t||0;u=u>=0?u:Math.max(0,a+u);var s="number"==typeof n?Math.min(n,a):a;if(n<0&&(s=a+n),i=s-u,i>0)if(o=new Array(i),this.charAt)for(r=0;r"'\/]/g,function(e){return y[e]})}function s(t,n){function i(){if(v&&!y)for(;m.length;)delete p[m.pop()];else m=[];v=!1,y=!1}function o(e){if("string"==typeof e&&(e=e.split(w,2)),!g(e)||2!==e.length)throw new Error("Invalid tags: "+e);u=new RegExp(r(e[0])+"\\s*"),s=new RegExp("\\s*"+r(e[1])),d=new RegExp("\\s*"+r("}"+e[1]))}if(!t)return[];var u,s,d,h=[],p=[],m=[],v=!1,y=!1;o(n||e.tags);for(var T,S,A,D,C,N,k=new l(t);!k.eos();){if(T=k.pos,A=k.scanUntil(u))for(var j=0,F=A.length;j0?o[o.length-1][4]:r;break;default:i.push(t)}return r}function l(e){this.string=e,this.tail=e,this.pos=0}function d(e,t){this.view=e,this.cache={".":this.view,"@each":function(){var e=[];for(var t in this)e.push({"@key":t,"@value":this[t]});return e}},this.parent=t}function h(){this.cache={}}var p=Object.prototype.toString,g=Array.isArray||function(e){return"[object Array]"===p.call(e)},m=RegExp.prototype.test,v=/\S/,y={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},b=/\s*/,w=/\s+/,x=/\s*=/,M=/\s*\}/,E=/#|\^|\/|>|\{|&|=|!/; -l.prototype.eos=function(){return""===this.tail},l.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},l.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},d.prototype.push=function(e){return new d(e,this)},d.prototype.lookup=function(e){var n,r=this.cache;if(r.hasOwnProperty(e))n=r[e];else{for(var o,a,u=this,s=!1;u;){if(e.indexOf(".")>0)for(n=u.view,o=e.split("."),a=0;null!=n&&a"===o?a=this.renderPartial(i,t,n,r):"&"===o?a=this.unescapedValue(i,t):"name"===o?a=this.escapedValue(i,t):"text"===o&&(a=this.rawValue(i)),void 0!==a&&(u+=a);return u},h.prototype.renderSection=function(e,n,r,i){function o(e){return a.render(e,n,r)}var a=this,u="",s=n.lookup(e[1]);if(s){if(g(s))for(var f=0,c=s.length;f","\"","'","/","lookup","names","context","lookupHit","clearCache","render","partials","renderTokens","originalTemplate","symbol","buffer","renderSection","renderInverted","renderPartial","unescapedValue","escapedValue","rawValue","subRender","defaultWriter","to_html","send"],"mappings":"oOAAA,WAIA,GAAAA,GAAAC,KAAAC,EAAAD,KACAE,EAAAD,EAAAA,EAAAE,SAAA,KACAC,GADAH,EAAAA,EAAAE,SAAAE,gBAAA,KACA,sEACAC,EAAA,QACAC,EAAA,mBACAC,EAAA,WACAC,EAAA,KACAC,EAAA,eACAC,EAAA,OACAC,EAAA,GAAAC,QAAA,gCACAC,EAAA,KACAC,EAAA,IACAC,EAAA,QAGAC,KAAAC,EAAAA,OAAAC,EAAAA,MAMAF,GAAAG,KAAA,EAMAH,EAAAI,QAAA,WACA,MAAAJ,GAAAG,Q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AAAyb,eAAA,SAAApD,EAAAwC,GACA,GAAA3f,GAAA2f,EAAAF,OAAAtC,EAAA,GACA,IAAA,MAAAnd,EACA,MAAAA,IAGAif,EAAAna,UAAA0b,aAAA,SAAArD,EAAAwC,GACA,GAAA3f,GAAA2f,EAAAF,OAAAtC,EAAA,GACA,IAAA,MAAAnd,EACA,MAAAub,GAAA/Y,OAAAxC,IAGAif,EAAAna,UAAA2b,SAAA,SAAAtD,GACA,MAAAA,GAAA,IAGA5B,EAAAre,KAAA,cACAqe,EAAAtgB,QAAA,QACAsgB,EAAAa,MAAA,KAAA,KAGA,IAAAuE,GAAA,GAAA1B,EAKA1D,GAAAsE,WAAA,WACA,MAAAc,GAAAd,cAQAtE,EAAAjF,MAAA,SAAA6F,EAAAC,GACA,MAAAuE,GAAArK,MAAA6F,EAAAC,IAOAb,EAAAuE,OAAA,SAAA3D,EAAAsC,EAAAsB,GACA,GAAA,gBAAA5D,GACA,KAAA,IAAAhO,WAAA,wDAAAsN,EAAAU,GAAA,kFAGA,OAAAwE,GAAAb,OAAA3D,EAAAsC,EAAAsB,IAKAxE,EAAAqF,QAAA,SAAAzE,EAAAsC,EAAAsB,EAAAc,GAGA,GAAAxf,GAAAka,EAAAuE,OAAA3D,EAAAsC,EAAAsB,EAEA,OAAA9gB,GAAA4hB,OACAA,GAAAxf,GAGAA,GAMAka,EAAA/Y,OAAAoM,EAGA2M,EAAA+B,QAAAA,EACA/B,EAAAiD,QAAAA,EACAjD,EAAA0D,OAAAA","file":"ax5core.min.js","sourcesContent":["(function () {\n 'use strict';\n\n // root of function\n let root = this, win = this,\n doc = (win) ? win.document : null, docElem = (win) ? win.document.documentElement : null,\n reIsJson = /^([\"'](\\\\.|[^\"\\\\\\n\\r])*?[\"']|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/,\n reMs = /^-ms-/,\n reSnakeCase = /[\\-_]([\\da-z])/gi,\n reCamelCase = /([A-Z])/g,\n reDot = /\\./,\n reInt = /[-|+]?[\\D]/gi,\n reNotNum = /\\D/gi,\n reMoneySplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'),\n reAmp = /&/g,\n reEq = /=/,\n reClassNameSplit = /[ ]+/g,\n\n /** @namespace {Object} ax5 */\n ax5 = {}, info, U, dom;\n\n /**\n * guid\n * @member {Number} ax5.guid\n */\n ax5.guid = 1;\n /**\n * ax5.guid를 구하고 증가시킵니다.\n * @method ax5.getGuid\n * @returns {Number} guid\n */\n ax5.getGuid = () => {\n return ax5.guid++\n };\n\n /**\n * 상수모음\n * @namespace ax5.info\n */\n ax5.info = info = (function () {\n /**\n * ax5 version\n * @member {String} ax5.info.version\n */\n const version = \"${VERSION}\";\n\n /**\n * ax5 library path\n * @member {String} ax5.info.baseUrl\n */\n const baseUrl = \"\";\n\n /**\n * ax5 에러 출력메세지 사용자 재 정의\n * @member {Object} ax5.info.onerror\n * @examples\n * ```\n * ax5.info.onerror = function(){\n\t\t * console.log(arguments);\n\t\t * }\n * ```\n */\n let onerror = () => {\n console.error(U.toArray(arguments).join(\":\"));\n };\n\n /**\n * event keyCodes\n * @member {Object} ax5.info.eventKeys\n * @example\n * ```\n * {\n\t\t * \tBACKSPACE: 8, TAB: 9,\n\t\t * \tRETURN: 13, ESC: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46,\n\t\t * \tHOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34, INSERT: 45, SPACE: 32\n\t\t * }\n * ```\n */\n const eventKeys = {\n BACKSPACE: 8, TAB: 9,\n RETURN: 13, ESC: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46,\n HOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34, INSERT: 45, SPACE: 32\n };\n\n /**\n * week names\n * @member {Object[]} weekNames\n * @member {string} weekNames[].label\n *\n * @example\n * ```\n * [\n * {label: \"SUN\"},{label: \"MON\"},{label: \"TUE\"},{label: \"WED\"},{label: \"THU\"},{label: \"FRI\"},{label: \"SAT\"}\n * ]\n * console.log( weekNames[0] );\n * console.log( ax5.info.weekNames[(new Date()).getDay()].label )\n * ```\n */\n let weekNames = [\n {label: \"SUN\"},\n {label: \"MON\"},\n {label: \"TUE\"},\n {label: \"WED\"},\n {label: \"THU\"},\n {label: \"FRI\"},\n {label: \"SAT\"}\n ];\n\n /**\n * 사용자 브라우저 식별용 오브젝트\n * @member {Object} ax5.info.browser\n * @example\n * ```\n * console.log( ax5.info.browser );\n * //Object {name: \"chrome\", version: \"39.0.2171.71\", mobile: false}\n * ```\n */\n let browser = (function (ua, mobile, browserName, match, browser, browserVersion) {\n if (!win || !win.navigator) return {};\n\n ua = navigator.userAgent.toLowerCase(), mobile = (ua.search(/mobile/g) != -1), browserName, match, browser, browserVersion;\n\n if (ua.search(/iphone/g) != -1) {\n return {name: \"iphone\", version: 0, mobile: true}\n }\n else if (ua.search(/ipad/g) != -1) {\n return {name: \"ipad\", version: 0, mobile: true}\n }\n else if (ua.search(/android/g) != -1) {\n match = /(android)[ \\/]([\\w.]+)/.exec(ua) || [];\n browserVersion = (match[2] || \"0\");\n return {name: \"android\", version: browserVersion, mobile: mobile}\n }\n else {\n browserName = \"\";\n match = /(opr)[ \\/]([\\w.]+)/.exec(ua) || /(chrome)[ \\/]([\\w.]+)/.exec(ua) || /(webkit)[ \\/]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || ua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) || [];\n browser = (match[1] || \"\");\n browserVersion = (match[2] || \"0\");\n\n if (browser == \"msie\") browser = \"ie\";\n return {\n name: browser,\n version: browserVersion,\n mobile: mobile\n }\n }\n ua = null, mobile = null, browserName = null, match = null, browser = null, browserVersion = null;\n })();\n\n /**\n * 브라우저 여부\n * @member {Boolean} ax5.info.isBrowser\n */\n let isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && win.document);\n\n /**\n * 브라우저에 따른 마우스 휠 이벤트이름\n * @member {Object} ax5.info.wheelEnm\n */\n let wheelEnm = (win && (/Firefox/i.test(navigator.userAgent)) ? \"DOMMouseScroll\" : \"mousewheel\");\n\n /**\n * 첫번째 자리수 동사 - (필요한것이 없을때 : 4, 실행오류 : 5)\n * 두번째 자리수 목적어 - 문자열 0, 숫자 1, 배열 2, 오브젝트 3, 함수 4, DOM 5, 파일 6, 기타 7\n * 세번째 자리수 옵션\n * @member {Object} ax5.info.errorMsg\n */\n let errorMsg = {};\n\n /**\n * 현재 페이지의 Url 정보를 리턴합니다.\n * @method ax5.info.urlUtil\n * @returns {Object}\n * @example\n * ```\n * console.log( ax5.util.toJson( ax5.info.urlUtil() ) );\n * {\n\t\t *\t\"baseUrl\": \"http://ax5:2018\",\n\t\t *\t\"href\": \"http://ax5:2018/samples/index.html?a=1&b=1#abc\",\n\t\t *\t\"param\": \"a=1&b=1\",\n\t\t *\t\"referrer\": \"\",\n\t\t *\t\"pathname\": \"/samples/index.html\",\n\t\t *\t\"hostname\": \"ax5\",\n\t\t *\t\"port\": \"2018\",\n\t\t *\t\"url\": \"http://ax5:2018/samples/index.html\",\n\t\t *\t\"hashdata\": \"abc\"\n\t\t * }\n * ```\n */\n function urlUtil(url, urls) {\n url = {\n href: win.location.href,\n param: win.location.search,\n referrer: doc.referrer,\n pathname: win.location.pathname,\n hostname: win.location.hostname,\n port: win.location.port\n }, urls = url.href.split(/[\\?#]/);\n url.param = url.param.replace(\"?\", \"\");\n url.url = urls[0];\n if (url.href.search(\"#\") > -1) {\n url.hashdata = U.last(urls);\n }\n urls = null;\n url.baseUrl = U.left(url.href, \"?\").replace(url.pathname, \"\");\n return url;\n }\n\n /**\n * ax5-error-msg.js 에 정의된 ax5 error를 반환합니다.\n * @method ax5.info.getError\n * @returns {Object}\n * @example\n * ```\n * console.log( ax5.info.getError(\"single-uploader\", \"460\", \"upload\") );\n *\n * if(!this.selectedFile){\n\t\t * if (cfg.onEvent) {\n\t\t * \tvar that = {\n\t\t * \t\taction: \"error\",\n\t\t * \t\terror: ax5.info.getError(\"single-uploader\", \"460\", \"upload\")\n\t\t * \t};\n\t\t * \tcfg.onEvent.call(that, that);\n\t\t * }\n\t\t * return this;\n\t\t * }\n * ```\n */\n function getError(className, errorCode, methodName) {\n if (info.errorMsg && info.errorMsg[className]) {\n return {\n className: className,\n errorCode: errorCode,\n methodName: methodName,\n msg: info.errorMsg[className][errorCode]\n };\n }\n else {\n return {className: className, errorCode: errorCode, methodName: methodName};\n }\n }\n\n /**\n * 브라우져의 터치 기능 유무를 확인합니다.\n * @method ax5.info.supportTouch\n * @returns {boolean}\n * @example\n * ```\n * var chkFlag = ax5.info.supportTouch;\n */\n let supportTouch = (win) ? (('ontouchstart' in win) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) : false;\n\n let supportFileApi = (win) ? ( win.FileReader && win.File && win.FileList && win.Blob ) : false;\n\n return {\n errorMsg: errorMsg,\n version: version,\n baseUrl: baseUrl,\n onerror: onerror,\n eventKeys: eventKeys,\n weekNames: weekNames,\n browser: browser,\n isBrowser: isBrowser,\n supportTouch: supportTouch,\n supportFileApi: supportFileApi,\n wheelEnm: wheelEnm,\n urlUtil: urlUtil,\n getError: getError\n };\n })();\n\n /**\n * Refer to this by {@link ax5}.\n * @namespace ax5.util\n */\n ax5['util'] = U = (function () {\n const _toString = Object.prototype.toString;\n\n /**\n * Object나 Array의 아이템으로 사용자 함수를 호출합니다.\n * @method ax5.util.each\n * @param {Object|Array} O\n * @param {Function} _fn\n * @example\n * ```js\n * var axf = ax5.util;\n * axf.each([0,1,2], function(){\n\t\t * \t// with this\n\t\t * });\n * axf.each({a:1, b:2}, function(){\n\t\t * \t// with this\n\t\t * });\n * ```\n */\n function each(O, _fn) {\n if (isNothing(O)) return [];\n let key, i = 0, l = O.length,\n isObj = l === undefined || typeof O === \"function\";\n if (isObj) {\n for (key in O) {\n if (typeof O[key] != \"undefined\")\n if (_fn.call(O[key], key, O[key]) === false) break;\n }\n }\n else {\n for (; i < l;) {\n if (typeof O[i] != \"undefined\")\n if (_fn.call(O[i], i, O[i++]) === false) break;\n }\n }\n return O;\n }\n\n // In addition to using the http://underscorejs.org : map, reduce, reduceRight, find\n /**\n * 원본 아이템들을 이용하여 사용자 함수의 리턴값으로 이루어진 새로운 배열을 만듭니다.\n * @method ax5.util.map\n * @param {Object|Array} O\n * @param {Function} _fn\n * @returns {Array}\n * @example\n * ```js\n * var myArray = [0,1,2,3,4];\n * var myObject = {a:1, b:\"2\", c:{axj:\"what\", arrs:[0,2,\"3\"]},\n\t\t * fn: function(abcdd){\n\t\t * return abcdd;\n\t\t * }\n\t\t * };\n *\n * var _arr = ax5.util.map( myArray, function(index, I){\n\t\t * return index+1;\n\t\t * });\n * console.log(_arr);\n * // [1, 2, 3, 4, 5]\n *\n * var _arr = ax5.util.map( myObject, function(k, v){\n\t\t * return v * 2;\n\t\t * });\n * console.log(_arr);\n * // [2, 4, NaN, NaN]\n * ```\n */\n function map(O, _fn) {\n if (isNothing(O)) return [];\n let key, i = 0, l = O.length, results = [], fnResult;\n if (isObject(O)) {\n for (key in O) {\n if (typeof O[key] != \"undefined\") {\n fnResult = undefined;\n if ((fnResult = _fn.call(O[key], key, O[key])) === false) break;\n else results.push(fnResult);\n }\n }\n }\n else {\n for (; i < l;) {\n if (typeof O[i] != \"undefined\") {\n fnResult = undefined;\n if ((fnResult = _fn.call(O[i], i, O[i++])) === false) break;\n else results.push(fnResult);\n }\n }\n }\n return results;\n }\n\n /**\n * 원본 아이템들을 이용하여 사용자 함수의 리턴값이 참인 아이템의 위치나 키값을 반환합니다.\n * @method ax5.util.search\n * @param {Object|Array} O\n * @param {Function|String|Number} _fn - 함수 또는 값\n * @returns {Number|String}\n * @example\n * ```js\n * var myArray = [0,1,2,3,4,5,6];\n * var myObject = {a:\"123\",\"b\":\"123\",c:123};\n *\n * ax5.util.search(myArray, function(){\n\t\t * return this > 3;\n\t\t * });\n * // 4\n * ax5.util.search(myObject, function(k, v){\n\t\t * return v === 123;\n\t\t * });\n * // \"c\"\n * ax5.util.search([1,2,3,4], 3);\n * // 2\n * ax5.util.search([1,2], 4);\n * // -1\n * ax5.util.search([\"name\",\"value\"], \"value\");\n * // 1\n * ax5.util.search([\"name\",\"value\"], \"values\");\n * // -1\n * ax5.util.search({k1:\"name\",k2:\"value\"}, \"value2\");\n * // -1\n * ax5.util.search({k1:\"name\",k2:\"value\"}, \"value\");\n * // \"k2\"\n * ```\n */\n function search(O, _fn) {\n if (isNothing(O)) return -1;\n if (isObject(O)) {\n for (let key in O) {\n if (typeof O[key] != \"undefined\" && isFunction(_fn) && _fn.call(O[key], key, O[key])) {\n return key;\n break;\n }\n else if (O[key] == _fn) {\n return key;\n break;\n }\n }\n }\n else {\n for (let i = 0, l = O.length; i < l; i++) {\n if (typeof O[i] != \"undefined\" && isFunction(_fn) && _fn.call(O[i], i, O[i])) {\n return i;\n break;\n }\n else if (O[i] == _fn) {\n return i;\n break;\n }\n }\n }\n return -1;\n }\n\n /**\n * @method ax5.util.sum\n * @param {Array|Object} O\n * @param {Number} [defaultValue]\n * @param {Function} _fn\n * @returns {Number}\n * @example\n * ```js\n * var arr = [\n * {name: \"122\", value: 9},\n * {name: \"122\", value: 10},\n * {name: \"123\", value: 11}\n * ];\n *\n * var rs = ax5.util.sum(arr, function () {\n * if(this.name == \"122\") {\n * return this.value;\n * }\n * });\n * console.log(rs); // 19\n *\n * console.log(ax5.util.sum(arr, 10, function () {\n * return this.value;\n * }));\n * // 40\n * ```\n */\n function sum(O, defaultValue, _fn) {\n let i, l, tokenValue;\n if (isFunction(defaultValue) && typeof _fn === \"undefined\") {\n _fn = defaultValue;\n defaultValue = 0;\n }\n if (typeof defaultValue === \"undefined\") defaultValue = 0;\n\n if (isArray(O)) {\n i = 0;\n l = O.length;\n for (; i < l; i++) {\n if (typeof O[i] !== \"undefined\") {\n if (( tokenValue = _fn.call(O[i], O[i]) ) === false) break;\n else if (typeof tokenValue !== \"undefined\") defaultValue += tokenValue;\n }\n }\n return defaultValue;\n }\n else if (isObject(O)) {\n for (i in O) {\n if (typeof O[i] != \"undefined\") {\n if (( tokenValue = _fn.call(O[i], O[i]) ) === false) break;\n else if (typeof tokenValue !== \"undefined\") defaultValue += tokenValue;\n }\n }\n return defaultValue;\n }\n else {\n console.error(\"argument error : ax5.util.sum - use Array or Object\");\n return defaultValue;\n }\n }\n\n /**\n * @method ax5.util.avg\n * @param {Array|Object} O\n * @param {Number} [defaultValue]\n * @param {Function} _fn\n * @returns {Number}\n * @example\n * ```js\n * var arr = [\n * {name: \"122\", value: 9},\n * {name: \"122\", value: 10},\n * {name: \"123\", value: 11}\n * ];\n *\n * var rs = ax5.util.avg(arr, function () {\n * return this.value;\n * });\n *\n * console.log(rs); // 10\n * ```\n */\n function avg(O, defaultValue, _fn) {\n let i, l, tokenValue;\n if (isFunction(defaultValue) && typeof _fn === \"undefined\") {\n _fn = defaultValue;\n defaultValue = 0;\n }\n if (typeof defaultValue === \"undefined\") defaultValue = 0;\n\n if (isArray(O)) {\n i = 0;\n l = O.length;\n for (; i < l; i++) {\n if (typeof O[i] !== \"undefined\") {\n if (( tokenValue = _fn.call(O[i], O[i]) ) === false) break;\n else if (typeof tokenValue !== \"undefined\") defaultValue += tokenValue;\n }\n }\n return defaultValue / l;\n }\n else if (isObject(O)) {\n l = 0;\n for (i in O) {\n if (typeof O[i] != \"undefined\") {\n if (( tokenValue = _fn.call(O[i], O[i]) ) === false) break;\n else if (typeof tokenValue !== \"undefined\") defaultValue += tokenValue; ++l;\n }\n }\n return defaultValue / l;\n }\n else {\n console.error(\"argument error : ax5.util.sum - use Array or Object\");\n return defaultValue;\n }\n }\n\n /**\n * 배열의 왼쪽에서 오른쪽으로 연산을 진행하는데 수행한 결과가 왼쪽 값으로 반영되어 최종 왼쪽 값을 반환합니다.\n * @method ax5.util.reduce\n * @param {Array|Object} O\n * @param {Function} _fn\n * @returns {Alltypes}\n * @example\n * ```js\n * var aarray = [5,4,3,2,1];\n * result = ax5.util.reduce( aarray, function(p, n){\n\t\t * return p * n;\n\t\t * });\n * console.log(result, aarray);\n * // 120 [5, 4, 3, 2, 1]\n *\n * ax5.util.reduce({a:1, b:2}, function(p, n){\n\t\t * return parseInt(p|0) + parseInt(n);\n\t\t * });\n * // 3\n * ```\n */\n function reduce(O, _fn) {\n var i, l, tokenItem;\n if (isArray(O)) {\n i = 0, l = O.length, tokenItem = O[i];\n for (; i < l - 1;) {\n if (typeof O[i] != \"undefined\") {\n if (( tokenItem = _fn.call(root, tokenItem, O[++i]) ) === false) break;\n }\n }\n return tokenItem;\n }\n else if (isObject(O)) {\n for (i in O) {\n if (typeof O[i] != \"undefined\") {\n if (( tokenItem = _fn.call(root, tokenItem, O[i]) ) === false) break;\n }\n }\n return tokenItem;\n }\n else {\n console.error(\"argument error : ax5.util.reduce - use Array or Object\");\n return null;\n }\n }\n\n /**\n * 배열의 오른쪽에서 왼쪽으로 연산을 진행하는데 수행한 결과가 오른쪽 값으로 반영되어 최종 오른쪽 값을 반환합니다.\n * @method ax5.util.reduceRight\n * @param {Array} O\n * @param {Function} _fn\n * @returns {Alltypes}\n * @example\n * ```js\n * var aarray = [5,4,3,2,1];\n * result = ax5.util.reduceRight( aarray, function(p, n){\n\t\t * console.log( n );\n\t\t * return p * n;\n\t\t * });\n * console.log(result, aarray);\n * 120 [5, 4, 3, 2, 1]\n * ```\n */\n function reduceRight(O, _fn) {\n var i = O.length - 1, tokenItem = O[i];\n for (; i > 0;) {\n if (typeof O[i] != \"undefined\") {\n if (( tokenItem = _fn.call(root, tokenItem, O[--i]) ) === false) break;\n }\n }\n return tokenItem;\n }\n\n /**\n * 배열또는 오브젝트의 각 아이템을 인자로 하는 사용자 함수의 결과가 참인 아이템들의 배열을 반환합니다.\n * @method ax5.util.filter\n * @param {Object|Array} O\n * @param {Function} _fn\n * @returns {Array}\n * @example\n * ```js\n * var aarray = [5,4,3,2,1];\n * result = ax5.util.filter( aarray, function(){\n\t\t * return this % 2;\n\t\t * });\n * console.log(result);\n * // [5, 3, 1]\n *\n * var filObject = {a:1, s:\"string\", oa:{pickup:true, name:\"AXISJ\"}, os:{pickup:true, name:\"AX5\"}};\n * result = ax5.util.filter( filObject, function(){\n\t\t * \treturn this.pickup;\n\t\t * });\n * console.log( ax5.util.toJson(result) );\n * // [{\"pickup\": , \"name\": \"AXISJ\"}, {\"pickup\": , \"name\": \"AX5\"}]\n * ```\n */\n function filter(O, _fn) {\n if (isNothing(O)) return [];\n var k, i = 0, l = O.length, results = [], fnResult;\n if (isObject(O)) {\n for (k in O) {\n if (typeof O[k] != \"undefined\") {\n if (fnResult = _fn.call(O[k], k, O[k])) results.push(O[k]);\n }\n }\n }\n else {\n for (; i < l;) {\n if (typeof O[i] != \"undefined\") {\n if (fnResult = _fn.call(O[i], i, O[i])) results.push(O[i]);\n i++;\n }\n }\n }\n return results;\n }\n\n /**\n * Object를 JSONString 으로 반환합니다.\n * @method ax5.util.toJson\n * @param {Object|Array} O\n * @returns {String} JSON\n * @example\n * ```js\n * var ax = ax5.util;\n * var myObject = {\n\t\t * a:1, b:\"2\", c:{axj:\"what\", arrs:[0,2,\"3\"]},\n\t\t * fn: function(abcdd){\n\t\t * return abcdd;\n\t\t * }\n\t\t * };\n * console.log( ax.toJson(myObject) );\n * ```\n */\n function toJson(O) {\n var jsonString = \"\";\n if (ax5.util.isArray(O)) {\n var i = 0, l = O.length;\n jsonString += \"[\";\n for (; i < l; i++) {\n if (i > 0) jsonString += \",\";\n jsonString += toJson(O[i]);\n }\n jsonString += \"]\";\n }\n else if (ax5.util.isObject(O)) {\n jsonString += \"{\";\n var jsonObjectBody = [];\n each(O, function (key, value) {\n jsonObjectBody.push('\"' + key + '\": ' + toJson(value));\n });\n jsonString += jsonObjectBody.join(\", \");\n jsonString += \"}\";\n }\n else if (ax5.util.isString(O)) {\n jsonString = '\"' + O + '\"';\n }\n else if (ax5.util.isNumber(O)) {\n jsonString = O;\n }\n else if (ax5.util.isUndefined(O)) {\n jsonString = \"undefined\";\n }\n else if (ax5.util.isFunction(O)) {\n jsonString = '\"{Function}\"';\n }\n else {\n jsonString = O;\n }\n return jsonString;\n }\n\n /**\n * 관용의 JSON Parser\n * @method ax5.util.parseJson\n * @param {String} JSONString\n * @param {Boolean} [force] - 강제 적용 여부 (json 문자열 검사를 무시하고 오브젝트 변환을 시도합니다.)\n * @returns {Object}\n * @example\n * ```\n * console.log(ax5.util.parseJson('{\"a\":1}'));\n * // Object {a: 1}\n * console.log(ax5.util.parseJson(\"{'a':1, 'b':'b'}\"));\n * // Object {a: 1, b: \"b\"}\n * console.log(ax5.util.parseJson(\"{'a':1, 'b':function(){return 1;}}\", true));\n * // Object {a: 1, b: function}\n * console.log(ax5.util.parseJson(\"{a:1}\"));\n * // Object {a: 1}\n * console.log(ax5.util.parseJson(\"[1,2,3]\"));\n * // [1, 2, 3]\n * console.log(ax5.util.parseJson(\"['1','2','3']\"));\n * // [\"1\", \"2\", \"3\"]\n * console.log(ax5.util.parseJson(\"[{'a':'99'},'2','3']\"));\n * // [Object, \"2\", \"3\"]\n * ```\n */\n function parseJson(str, force) {\n if (force || (reIsJson).test(str)) {\n try {\n return (new Function('', 'return ' + str))();\n } catch (e) {\n return {error: 500, msg: 'syntax error'};\n }\n }\n else {\n return {error: 500, msg: 'syntax error'};\n }\n }\n\n /**\n * 인자의 타입을 반환합니다.\n * @method ax5.util.getType\n * @param {Object|Array|String|Number|Element|Etc} O\n * @returns {String} window|element|object|array|function|string|number|undefined|nodelist\n * @example\n * ```js\n * var axf = ax5.util;\n * var a = 11;\n * var b = \"11\";\n * console.log( axf.getType(a) );\n * console.log( axf.getType(b) );\n * ```\n */\n function getType(O) {\n var typeName;\n if (O != null && O == O.window) {\n typeName = \"window\";\n }\n else if (!!(O && O.nodeType == 1)) {\n typeName = \"element\";\n }\n else if (!!(O && O.nodeType == 11)) {\n typeName = \"fragment\";\n }\n else if (O === null) {\n typeName = \"null\";\n }\n else if (typeof O === \"undefined\") {\n typeName = \"undefined\";\n }\n else if (_toString.call(O) == \"[object Object]\") {\n typeName = \"object\";\n }\n else if (_toString.call(O) == \"[object Array]\") {\n typeName = \"array\";\n }\n else if (_toString.call(O) == \"[object String]\") {\n typeName = \"string\";\n }\n else if (_toString.call(O) == \"[object Number]\") {\n typeName = \"number\";\n }\n else if (_toString.call(O) == \"[object NodeList]\") {\n typeName = \"nodelist\";\n }\n else if (typeof O === \"function\") {\n typeName = \"function\";\n }\n return typeName;\n }\n\n /**\n * 오브젝트가 window 인지 판단합니다.\n * @method ax5.util.isWindow\n * @param {Object} O\n * @returns {Boolean}\n */\n function isWindow(O) {\n return O != null && O == O.window;\n }\n\n /**\n * 오브젝트가 HTML 엘리먼트여부인지 판단합니다.\n * @method ax5.util.isElement\n * @param {Object} O\n * @returns {Boolean}\n */\n function isElement(O) {\n return !!(O && (O.nodeType == 1 || O.nodeType == 11));\n }\n\n /**\n * 오브젝트가 Object인지 판단합니다.\n * @method ax5.util.isObject\n * @param {Object} O\n * @returns {Boolean}\n */\n function isObject(O) {\n return _toString.call(O) == \"[object Object]\";\n }\n\n /**\n * 오브젝트가 Array인지 판단합니다.\n * @method ax5.util.isArray\n * @param {Object} O\n * @returns {Boolean}\n */\n function isArray(O) {\n return _toString.call(O) == \"[object Array]\";\n }\n\n /**\n * 오브젝트가 Function인지 판단합니다.\n * @method ax5.util.isFunction\n * @param {Object} O\n * @returns {Boolean}\n */\n function isFunction(O) {\n return typeof O === \"function\";\n }\n\n /**\n * 오브젝트가 String인지 판단합니다.\n * @method ax5.util.isString\n * @param {Object} O\n * @returns {Boolean}\n */\n function isString(O) {\n return _toString.call(O) == \"[object String]\";\n }\n\n /**\n * 오브젝트가 Number인지 판단합니다.\n * @method ax5.util.isNumber\n * @param {Object} O\n * @returns {Boolean}\n */\n function isNumber(O) {\n return _toString.call(O) == \"[object Number]\";\n }\n\n /**\n * 오브젝트가 NodeList인지 판단합니다.\n * @method ax5.util.isNodelist\n * @param {Object} O\n * @returns {Boolean}\n */\n function isNodelist(O) {\n return !!(_toString.call(O) == \"[object NodeList]\" || (typeof O !== \"undefined\" && O && O[0] && O[0].nodeType == 1));\n }\n\n /**\n * 오브젝트가 undefined인지 판단합니다.\n * @method ax5.util.isUndefined\n * @param {Object} O\n * @returns {Boolean}\n */\n function isUndefined(O) {\n return typeof O === \"undefined\";\n }\n\n /**\n * 오브젝트가 undefined이거나 null이거나 빈값인지 판단합니다.\n * @method ax5.util.isNothing\n * @param {Object} O\n * @returns {Boolean}\n */\n function isNothing(O) {\n return (typeof O === \"undefined\" || O === null || O === \"\");\n }\n\n /**\n * 오브젝트가 날자값인지 판단합니다.\n * @method ax5.util.isDate\n * @param {Date} O\n * @returns {Boolean}\n * @example\n * ```js\n * ax5.util.isDate('2016-09-30');\n * // false\n * ax5.util.isDate( new Date('2016-09-30') );\n * // true\n * ```\n */\n function isDate(O) {\n return (O instanceof Date && !isNaN(O.valueOf()));\n }\n\n\n function isDateFormat(O) {\n var\n result = false\n ;\n if (!O) {\n }\n else if (O instanceof Date && !isNaN(O.valueOf())) {\n result = true;\n }\n else {\n if (O.length > 7) {\n if (date(O) instanceof Date) {\n return true;\n }\n }\n O = O.replace(/\\D/g, '');\n if (O.length > 7) {\n var\n mm = O.substr(4, 2),\n dd = O.substr(6, 2)\n ;\n O = date(O);\n if (O.getMonth() == (mm - 1) && O.getDate() == dd) {\n result = true;\n }\n }\n }\n return result;\n }\n\n /**\n * 오브젝트의 첫번째 아이템을 반환합니다.\n * @method ax5.util.first\n * @param {Object|Array} O\n * @returns {Object}\n * @example\n * ```js\n * ax5.util.first({a:1, b:2});\n * // Object {a: 1}\n * ax5.util.first([1,2,3,4]);\n * // 1\n * ```\n */\n function first(O) {\n if (isObject(O)) {\n var keys = Object.keys(O);\n var item = {};\n item[keys[0]] = O[keys[0]];\n return item;\n }\n else if (isArray(O)) {\n return O[0];\n }\n else {\n console.error(\"ax5.util.object.first\", \"argument type error\");\n return undefined;\n }\n }\n\n /**\n * 오브젝트의 마지막 아이템을 반환합니다.\n * @method ax5.util.last\n * @param {Object|Array} O\n * @returns {Object}\n * @example\n * ```js\n * ax5.util.last({a:1, b:2});\n * // Object {b: 2}\n * ax5.util.last([1,2,3,4]);\n * // 4\n * ```\n */\n function last(O) {\n if (isObject(O)) {\n var keys = Object.keys(O);\n var item = {};\n item[keys[keys.length - 1]] = O[keys[keys.length - 1]];\n return item;\n }\n else if (isArray(O)) {\n return O[O.length - 1];\n }\n else {\n console.error(\"ax5.util.object.last\", \"argument type error\");\n return undefined;\n }\n }\n\n /**\n * 쿠키를 설정합니다.\n * @method ax5.util.setCookie\n * @param {String} cname - 쿠키이름\n * @param {String} cvalue - 쿠키값\n * @param {Number} [exdays] - 쿠키 유지일수\n * @param {Object} [opts] - path, domain 설정 옵션\n * @example\n * ```js\n * ax5.util.setCookie(\"jslib\", \"AX5\");\n * ax5.util.setCookie(\"jslib\", \"AX5\", 3);\n * ax5.util.setCookie(\"jslib\", \"AX5\", 3, {path:\"/\", domain:\".axisj.com\"});\n * ```\n */\n function setCookie(cn, cv, exdays, opts) {\n var expire;\n if (typeof exdays === \"number\") {\n expire = new Date();\n expire.setDate(expire.getDate() + exdays);\n }\n opts = opts || {};\n return (doc.cookie = [\n escape(cn), '=', escape(cv),\n expire ? \"; expires=\" + expire.toUTCString() : \"\", // use expires attribute, max-age is not supported by IE\n opts.path ? \"; path=\" + opts.path : \"\",\n opts.domain ? \"; domain=\" + opts.domain : \"\",\n opts.secure ? \"; secure\" : \"\"\n ].join(\"\"));\n }\n\n /**\n * 쿠키를 가져옵니다.\n * @method ax5.util.getCookie\n * @param {String} cname\n * @returns {String} cookie value\n * @example\n * ```js\n * ax5.util.getCookie(\"jslib\");\n * ```\n */\n function getCookie(cname) {\n var name = cname + \"=\";\n var ca = doc.cookie.split(';'), i = 0, l = ca.length;\n for (; i < l; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') c = c.substring(1);\n if (c.indexOf(name) != -1) return unescape(c.substring(name.length, c.length));\n }\n return \"\";\n }\n\n /**\n * jsonString 으로 alert 합니다.\n * @method ax5.util.alert\n * @param {Object|Array|String|Number} O\n * @returns {Object|Array|String|Number} O\n * @example ```js\n * ax5.util.alert({a:1,b:2});\n * ax5.util.alert(\"정말?\");\n * ```\n */\n function alert(O) {\n win.alert(toJson(O));\n return O;\n }\n\n /**\n * 문자열의 특정 문자열까지 잘라주거나 원하는 포지션까지 잘라줍니다.\n * @method ax5.util.left\n * @param {String} str - 문자열\n * @param {String|Number} pos - 찾을 문자열 또는 포지션\n * @returns {String}\n * @example\n * ```js\n * ax5.util.left(\"abcd.efd\", 3);\n * // abc\n * ax5.util.left(\"abcd.efd\", \".\");\n * // abcd\n * ```\n */\n function left(str, pos) {\n if (typeof str === \"undefined\" || typeof pos === \"undefined\") return \"\";\n if (isString(pos)) {\n return (str.indexOf(pos) > -1) ? str.substr(0, str.indexOf(pos)) : \"\";\n }\n else if (isNumber(pos)) {\n return str.substr(0, pos);\n }\n else {\n return \"\";\n }\n }\n\n /**\n * 문자열의 특정 문자열까지 잘라주거나 원하는 포지션까지 잘라줍니다.\n * @method ax5.util.right\n * @param {String} str - 문자열\n * @param {String|Number} pos - 찾을 문자열 또는 포지션\n * @returns {String}\n * @example\n * ```js\n * ax5.util.right(\"abcd.efd\", 3);\n * // efd\n * ax5.util.right(\"abcd.efd\", \".\");\n * // efd\n * ```\n */\n function right(str, pos) {\n if (typeof str === \"undefined\" || typeof pos === \"undefined\") return \"\";\n str = '' + str;\n if (isString(pos)) {\n return (str.lastIndexOf(pos) > -1) ? str.substr(str.lastIndexOf(pos) + 1) : \"\";\n }\n else if (isNumber(pos)) {\n return str.substr(str.length - pos);\n }\n else {\n return \"\";\n }\n }\n\n /**\n * css형 문자열이나 특수문자가 포함된 문자열을 카멜케이스로 바꾸어 반환합니다.\n * @method ax5.util.camelCase\n * @param {String} str\n * @returns {String}\n * @example\n * ```js\n * ax5.util.camelCase(\"inner-width\");\n * ax5.util.camelCase(\"innerWidth\");\n * // innerWidth\n * ```\n */\n function camelCase(str) {\n return str.replace(reMs, \"ms-\").replace(reSnakeCase, function (all, letter) {\n return letter.toUpperCase();\n });\n }\n\n /**\n * css형 문자열이나 카멜케이스문자열을 스네이크 케이스 문자열로 바꾸어 반환합니다.\n * @method ax5.util.snakeCase\n * @param {String} str\n * @returns {String}\n * @example\n * ```js\n * ax5.util.snakeCase(\"innerWidth\");\n * ax5.util.snakeCase(\"inner-Width\");\n * ax5.util.snakeCase(\"innerWidth\");\n * // inner-width\n * ```\n */\n function snakeCase(str) {\n return camelCase(str).replace(reCamelCase, function (all, letter) {\n return \"-\" + letter.toLowerCase();\n });\n }\n\n /**\n * 문자열에서 -. 을 제외한 모든 문자열을 제거하고 숫자로 반환합니다. 옵션에 따라 원하는 형식의 숫자로 변환 할 수 도 있습니다.\n * @method ax5.util.number\n * @param {String|Number} str\n * @param {Object} cond - 옵션\n * @returns {String|Number}\n * @example\n * ```js\n * var cond = {\n\t\t * \tround: {Number|Boolean} - 반올림할 자릿수,\n\t\t * \tmoney: {Boolean} - 통화,\n\t\t * \tabs: {Boolean} - 절대값,\n\t\t * \tbyte: {Boolean} - 바이트\n\t\t * }\n *\n * console.log(ax5.util.number(123456789.678, {round:1}));\n * console.log(ax5.util.number(123456789.678, {round:1, money:true}));\n * console.log(ax5.util.number(123456789.678, {round:2, byte:true}));\n * console.log(ax5.util.number(-123456789.8888, {abs:true, round:2, money:true}));\n * console.log(ax5.util.number(\"A-1234~~56789.8~888PX\", {abs:true, round:2, money:true}));\n *\n * //123456789.7\n * //123,456,789.7\n * //117.7MB\n * //123,456,789.89\n * //123,456,789.89\n * ```\n */\n function number(str, cond) {\n var result, pair = ('' + str).split(reDot), isMinus, returnValue;\n\n isMinus = (Number(pair[0].replace(/,/g, \"\")) < 0 || pair[0] == \"-0\");\n returnValue = 0.0;\n pair[0] = pair[0].replace(reInt, \"\");\n\n if (pair[1]) {\n pair[1] = pair[1].replace(reNotNum, \"\");\n returnValue = Number(pair[0] + \".\" + pair[1]) || 0;\n }\n else {\n returnValue = Number(pair[0]) || 0;\n }\n result = (isMinus) ? -returnValue : returnValue;\n\n each(cond, function (k, c) {\n if (k == \"round\") {\n if (isNumber(c)) {\n if (c < 0) {\n result = +(Math.round(result + \"e-\" + Math.abs(c)) + \"e+\" + Math.abs(c));\n }\n else {\n result = +(Math.round(result + \"e+\" + c) + \"e-\" + c);\n }\n }\n else {\n result = Math.round(result);\n }\n }\n if (k == \"floor\") {\n result = Math.floor(result);\n }\n if (k == \"ceil\") {\n result = Math.ceil(result);\n }\n else if (k == \"money\") {\n result = (function (val) {\n var txtNumber = '' + val;\n if (isNaN(txtNumber) || txtNumber == \"\") {\n return \"\";\n }\n else {\n var arrNumber = txtNumber.split('.');\n arrNumber[0] += '.';\n do {\n arrNumber[0] = arrNumber[0].replace(reMoneySplit, '$1,$2');\n } while (reMoneySplit.test(arrNumber[0]));\n if (arrNumber.length > 1) {\n return arrNumber.join('');\n }\n else {\n return arrNumber[0].split('.')[0];\n }\n }\n })(result);\n }\n else if (k == \"abs\") {\n result = Math.abs(Number(result));\n }\n else if (k == \"byte\") {\n result = (function (val) {\n val = Number(result);\n var nUnit = \"KB\";\n var myByte = val / 1024;\n if (myByte / 1024 > 1) {\n nUnit = \"MB\";\n myByte = myByte / 1024;\n }\n if (myByte / 1024 > 1) {\n nUnit = \"GB\";\n myByte = myByte / 1024;\n }\n return number(myByte, {round: 1}) + nUnit;\n })(result);\n }\n });\n\n return result;\n }\n\n /**\n * 배열 비슷한 오브젝트를 배열로 변환해줍니다.\n * @method ax5.util.toArray\n * @param {Object|Elements|Arguments} O\n * @returns {Array}\n * @example\n * ```js\n * ax5.util.toArray(arguments);\n * //\n * ```\n */\n function toArray(O) {\n if (typeof O.length != \"undefined\") return Array.prototype.slice.call(O);\n return [];\n }\n\n /**\n * 첫번째 인자에 두번째 인자 아이템을 합쳐줍니다. concat과 같은 역할을 하지만. 인자가 Array타입이 아니어도 됩니다.\n * @method ax5.util.merge\n * @param {Array|ArrayLike} first\n * @param {Array|ArrayLike} second\n * @returns {Array} first\n * @example\n * ```\n *\n * ```\n */\n function merge(first, second) {\n var l = second.length,\n i = first.length,\n j = 0;\n\n if (typeof l === \"number\") {\n for (; j < l; j++) {\n first[i++] = second[j];\n }\n }\n else {\n while (second[j] !== undefined) {\n first[i++] = second[j++];\n }\n }\n\n first.length = i;\n\n return first;\n }\n\n /**\n * 오브젝트를 파라미터형식으로 또는 파라미터를 오브젝트 형식으로 변환합니다.\n * @method ax5.util.param\n * @param {Object|Array|String} O\n * @param {String} [cond] - param|object\n * @returns {Object|String}\n * @example\n * ```\n * ax5.util.param({a:1,b:'1232'}, \"param\");\n * ax5.util.param(\"a=1&b=1232\", \"param\");\n * // \"a=1&b=1232\"\n * ax5.util.param(\"a=1&b=1232\");\n * // {a: \"1\", b: \"1232\"}\n * ```\n */\n function param(O, cond) {\n var p;\n if (isString(O) && typeof cond !== \"undefined\" && cond == \"param\") {\n return O;\n }\n else if ((isString(O) && typeof cond !== \"undefined\" && cond == \"object\") || (isString(O) && typeof cond === \"undefined\")) {\n p = {};\n each(O.split(reAmp), function () {\n var item = this.split(reEq);\n if (!p[item[0]]) p[item[0]] = item[1];\n else {\n if (isString(p[item[0]])) p[item[0]] = [p[item[0]]];\n p[item[0]].push(item[1]);\n }\n });\n return p;\n }\n else {\n p = [];\n each(O, function (k, v) {\n p.push(k + \"=\" + escape(v));\n });\n return p.join('&');\n }\n }\n\n function encode(s) {\n return encodeURIComponent(s);\n }\n\n function decode(s) {\n return decodeURIComponent(s);\n }\n\n function error() {\n ax5.info.onerror.apply(this, arguments);\n }\n\n function localDate(yy, mm, dd, hh, mi, ss) {\n var utcD, localD;\n localD = new Date();\n if (mm < 0) mm = 0;\n if (typeof hh === \"undefined\") hh = 12;\n if (typeof mi === \"undefined\") mi = 0;\n utcD = new Date(Date.UTC(yy, mm, dd || 1, hh, mi, ss || 0));\n\n if (mm == 0 && dd == 1 && utcD.getUTCHours() + (utcD.getTimezoneOffset() / 60) < 0) {\n utcD.setUTCHours(0);\n }\n else {\n utcD.setUTCHours(utcD.getUTCHours() + (utcD.getTimezoneOffset() / 60));\n }\n return utcD;\n }\n\n /**\n * 날짜 형식의 문자열이나 Date객체를 조건에 맞게 처리 한 후 원하는 return 값으로 반환합니다.\n * @method ax5.util.date\n * @param {String|Date} d\n * @param {Object} cond\n * @returns {Date|String}\n * @example\n * ```js\n * ax5.util.date('2013-01-01'); // Tue Jan 01 2013 23:59:00 GMT+0900 (KST)\n * ax5.util.date((new Date()), {add:{d:10}, return:'yyyy/MM/dd'}); // \"2015/07/01\"\n * ax5.util.date('1919-03-01', {add:{d:10}, return:'yyyy/MM/dd hh:mm:ss'}); // \"1919/03/11 23:59:00\"\n * ```\n */\n function date(d, cond) {\n let yy, mm, dd, hh, mi,\n aDateTime, aTimes, aTime, aDate,\n va,\n ISO_8601 = /^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$/i,\n ISO_8601_FULL = /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?$/i;\n\n if (isString(d)) {\n if (d.length == 0) {\n d = new Date();\n }\n else if (d.length > 15) {\n if (ISO_8601_FULL.test(d) || ISO_8601.test(d)) {\n d = new Date(d);\n } else {\n aDateTime = d.split(/ /g), aTimes, aTime,\n aDate = aDateTime[0].split(/\\D/g),\n yy = aDate[0];\n mm = parseFloat(aDate[1]);\n dd = parseFloat(aDate[2]);\n aTime = aDateTime[1] || \"09:00\";\n aTimes = aTime.substring(0, 5).split(\":\");\n hh = parseFloat(aTimes[0]);\n mi = parseFloat(aTimes[1]);\n if (right(aTime, 2) === \"AM\" || right(aTime, 2) === \"PM\") hh += 12;\n d = localDate(yy, mm - 1, dd, hh, mi);\n }\n }\n else if (d.length == 14) {\n va = d.replace(/\\D/g, \"\");\n d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, number(va.substr(6, 2)), number(va.substr(8, 2)), number(va.substr(10, 2)), number(va.substr(12, 2)));\n }\n else if (d.length > 7) {\n va = d.replace(/\\D/g, \"\");\n d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, number(va.substr(6, 2)));\n }\n else if (d.length > 4) {\n va = d.replace(/\\D/g, \"\");\n d = localDate(va.substr(0, 4), va.substr(4, 2) - 1, 1);\n }\n else if (d.length > 2) {\n va = d.replace(/\\D/g, \"\");\n return localDate(va.substr(0, 4), va.substr(4, 2) - 1, 1);\n }\n else {\n d = new Date();\n }\n }\n if (typeof cond === \"undefined\" || typeof d === \"undefined\") {\n return d;\n }\n else {\n if (\"add\" in cond) {\n d = (function (_d, opts) {\n let yy, mm, dd, mxdd,\n DyMilli = ((1000 * 60) * 60) * 24;\n\n if (typeof opts[\"d\"] !== \"undefined\") {\n _d.setTime(_d.getTime() + (opts[\"d\"] * DyMilli));\n }\n else if (typeof opts[\"m\"] !== \"undefined\") {\n yy = _d.getFullYear();\n mm = _d.getMonth();\n dd = _d.getDate();\n yy = yy + parseInt(opts[\"m\"] / 12);\n mm += opts[\"m\"] % 12;\n mxdd = daysOfMonth(yy, mm);\n if (mxdd < dd) dd = mxdd;\n _d = new Date(yy, mm, dd, 12);\n }\n else if (typeof opts[\"y\"] !== \"undefined\") {\n _d.setTime(_d.getTime() + ((opts[\"y\"] * 365) * DyMilli));\n }\n else if (typeof opts[\"h\"] !== \"undefined\") {\n _d.setTime(_d.getTime() + (opts[\"h\"] * 1000 * 60 * 60));\n }\n\n return _d;\n })(new Date(d), cond[\"add\"]);\n }\n if (\"set\" in cond) {\n d = (function (_d, opts) {\n let yy, mm, dd,\n processor = {\n \"firstDayOfMonth\": function (date) {\n yy = date.getFullYear();\n mm = date.getMonth();\n dd = 1;\n return new Date(yy, mm, dd, 12);\n },\n \"lastDayOfMonth\": function (date) {\n yy = date.getFullYear();\n mm = date.getMonth();\n dd = daysOfMonth(yy, mm);\n return new Date(yy, mm, dd, 12);\n }\n };\n if (opts in processor) {\n return processor[opts](_d);\n } else {\n return _d;\n }\n })(new Date(d), cond[\"set\"]);\n }\n if (\"return\" in cond) {\n return (function () {\n\n let fStr = cond[\"return\"], nY, nM, nD, nH, nMM, nS, nDW,\n yre, regY, mre, regM, dre, regD, hre, regH, mire, regMI, sre, regS, dwre, regDW;\n\n nY = d.getUTCFullYear();\n nM = setDigit(d.getMonth() + 1, 2);\n nD = setDigit(d.getDate(), 2);\n nH = setDigit(d.getHours(), 2);\n nMM = setDigit(d.getMinutes(), 2);\n nS = setDigit(d.getSeconds(), 2);\n nDW = d.getDay();\n\n yre = /[^y]*(yyyy)[^y]*/gi;\n yre.exec(fStr);\n regY = RegExp.$1;\n mre = /[^m]*(MM)[^m]*/g;\n mre.exec(fStr);\n regM = RegExp.$1;\n dre = /[^d]*(dd)[^d]*/gi;\n dre.exec(fStr);\n regD = RegExp.$1;\n hre = /[^h]*(hh)[^h]*/gi;\n hre.exec(fStr);\n regH = RegExp.$1;\n mire = /[^m]*(mm)[^i]*/g;\n mire.exec(fStr);\n regMI = RegExp.$1;\n sre = /[^s]*(ss)[^s]*/gi;\n sre.exec(fStr);\n regS = RegExp.$1;\n dwre = /[^d]*(dw)[^w]*/gi;\n dwre.exec(fStr);\n regDW = RegExp.$1;\n\n if (regY === \"yyyy\") {\n fStr = fStr.replace(regY, right(nY, regY.length));\n }\n if (regM === \"MM\") {\n if (regM.length == 1) nM = (d.getMonth() + 1);\n fStr = fStr.replace(regM, nM);\n }\n if (regD === \"dd\") {\n if (regD.length == 1) nD = d.getDate();\n fStr = fStr.replace(regD, nD);\n }\n if (regH === \"hh\") {\n fStr = fStr.replace(regH, nH);\n }\n if (regMI === \"mm\") {\n fStr = fStr.replace(regMI, nMM);\n }\n if (regS === \"ss\") {\n fStr = fStr.replace(regS, nS);\n }\n if (regDW == \"dw\") {\n fStr = fStr.replace(regDW, info.weekNames[nDW].label);\n }\n return fStr;\n })();\n }\n else {\n return d;\n }\n }\n }\n\n /**\n * 인자인 날짜가 오늘부터 몇일전인지 반환합니다. 또는 인자인 날짜가 가까운 미래에 몇일 후인지 반환합니다.\n * @method ax5.util.dday\n * @param {String|Data} d\n * @param {Object} cond\n * @returns {Number}\n * @example\n * ```js\n * ax5.util.dday('2016-01-29');\n * // 1\n * ax5.util.dday('2016-01-29', {today:'2016-01-28'});\n * // 1\n * ax5.util.dday('1977-03-29', {today:'2016-01-28', age:true});\n * // 39\n * ```\n */\n function dday(d, cond) {\n var memoryDay = date(d), DyMilli = ((1000 * 60) * 60) * 24, today = new Date(), diffnum, thisYearMemoryDay;\n\n function getDayTime(_d) {\n return Math.floor(_d.getTime() / DyMilli) * DyMilli;\n }\n\n if (typeof cond === \"undefined\") {\n diffnum = number((( getDayTime(memoryDay) - getDayTime(today) ) / DyMilli), {floor: true});\n return diffnum;\n }\n\n else {\n diffnum = number((( getDayTime(memoryDay) - getDayTime(today) ) / DyMilli), {floor: true});\n if (cond[\"today\"]) {\n today = date(cond.today);\n diffnum = number((( getDayTime(memoryDay) - getDayTime(today) ) / DyMilli), {floor: true});\n }\n if (cond[\"thisYear\"]) {\n thisYearMemoryDay = new Date(today.getFullYear(), memoryDay.getMonth(), memoryDay.getDate());\n diffnum = number((( getDayTime(thisYearMemoryDay) - getDayTime(today) ) / DyMilli), {floor: true});\n if (diffnum < 0) {\n thisYearMemoryDay = new Date(today.getFullYear() + 1, memoryDay.getMonth(), memoryDay.getDate());\n diffnum = number((( getDayTime(thisYearMemoryDay) - getDayTime(today) ) / DyMilli), {floor: true});\n }\n }\n if (cond[\"age\"]) {\n thisYearMemoryDay = new Date(today.getFullYear(), memoryDay.getMonth(), memoryDay.getDate());\n diffnum = thisYearMemoryDay.getFullYear() - memoryDay.getFullYear();\n }\n\n return diffnum;\n }\n }\n\n /**\n * 인자인 날짜가 몇년 몇월의 몇번째 주차인지 반환합니다.\n * @method ax5.util.weeksOfMonth\n * @param {String|Data} d\n * @returns {Object}\n * @example\n * ```js\n * ax5.util.weeksOfMonth(\"2015-10-01\"); // {year: 2015, month: 10, count: 1}\n * ax5.util.weeksOfMonth(\"2015-09-19\"); // {year: 2015, month: 9, count: 3}\n * ```\n */\n function weeksOfMonth(d) {\n var myDate = date(d);\n return {\n year: myDate.getFullYear(),\n month: myDate.getMonth() + 1,\n count: parseInt(myDate.getDate() / 7 + 1)\n };\n }\n\n /**\n * 년월에 맞는 날자수를 반환합니다.\n * (new Date()).getMonth() 기준으로 월값을 보냅니다. \"2월\" 인경우 \"1\" 을 넘기게 됩니다.\n * @method ax5.util.daysOfMonth\n * @param {Number} y\n * @param {Number} m\n * @returns {Number}\n * @examples\n * ```js\n * ax5.util.daysOfMonth(2015, 11); // 31\n * ax5.util.daysOfMonth(2015, 1); // 28\n * ```\n */\n function daysOfMonth(y, m) {\n if (m == 3 || m == 5 || m == 8 || m == 10) {\n return 30;\n }\n else if (m == 1) {\n return (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) ? 29 : 28;\n }\n else {\n return 31;\n }\n }\n\n /**\n * 원하는 횟수 만큼 자릿수 맞춤 문자열을 포함한 문자열을 반환합니다.\n * 문자열 길이보다 작은값을 보내면 무시됩니다.\n * @method ax5.util.setDigit\n * @param {String|Number} num\n * @param {Number} length\n * @param {String} [padder=0]\n * @param {Number} [radix]\n * @returns {String}\n * @example\n * ```\n * ax5.util.setDigit(2016, 6)\n * // \"002016\"\n * ax5.util.setDigit(2016, 2)\n * // \"2016\"\n * ```\n */\n function setDigit(num, length, padder, radix) {\n var s = num.toString(radix || 10);\n return times((padder || '0'), (length - s.length)) + s;\n }\n\n /**\n * 문자열을 지정된 수만큼 반복 합니다.\n * @param {String} s\n * @param {Number} count\n * @returns {string}\n * @example\n * ```\n * ax5.util.times(2016, 2)\n * //\"20162016\"\n * ```\n */\n function times(s, count) {\n return count < 1 ? '' : new Array(count + 1).join(s);\n }\n\n /**\n * 타겟엘리먼트의 부모 엘리멘트 트리에서 원하는 조건의 엘리먼트를 얻습니다.\n * @method ax5.util.findParentNode\n * @param {Element} _target - target element\n * @param {Object|Function} cond - 원하는 element를 찾을 조건\n * @returns {Element}\n * @example\n * ```\n * // cond 속성정의\n * var cond = {\n\t\t * \ttagname: {String} - 태그명 (ex. a, div, span..),\n\t\t * \tclazz: {String} - 클래스명\n\t\t * \t[, 그 외 찾고 싶은 attribute명들]\n\t\t * };\n * console.log(\n * console.log(\n * ax5.util.findParentNode(e.target, {tagname:\"a\", clazz:\"ax-menu-handel\", \"data-custom-attr\":\"attr_value\"})\n * );\n * // cond 함수로 처리하기\n * jQuery('#id').bind(\"click.app_expand\", function(e){\n\t\t * \tvar target = ax5.util.findParentNode(e.target, function(target){\n\t\t * \t\tif($(target).hasClass(\"aside\")){\n\t\t * \t\t\treturn true;\n\t\t * \t\t}\n\t\t * \t\telse{\n\t\t * \t\t\treturn true;\n\t\t * \t\t}\n\t\t * \t});\n\t\t * \t//client-aside\n\t\t * \tif(target.id !== \"client-aside\"){\n\t\t * \t\t// some action\n\t\t * \t}\n\t\t * });\n * ```\n */\n\n function findParentNode(_target, cond) {\n if (_target) {\n while ((function () {\n var result = true;\n if (typeof cond === \"undefined\") {\n _target = (_target.parentNode) ? _target.parentNode : false;\n }\n else if (isFunction(cond)) {\n result = cond(_target);\n }\n else if (isObject(cond)) {\n for (var k in cond) {\n if (k === \"tagname\") {\n if (_target.tagName.toLocaleLowerCase() != cond[k]) {\n result = false;\n break;\n }\n }\n else if (k === \"clazz\" || k === \"class_name\") {\n if (\"className\" in _target) {\n var klasss = _target.className.split(reClassNameSplit);\n var hasClass = false;\n for (var a = 0; a < klasss.length; a++) {\n if (klasss[a] == cond[k]) {\n hasClass = true;\n break;\n }\n }\n result = hasClass;\n }\n else {\n result = false;\n break;\n }\n }\n else { // 그외 속성값들.\n if (_target.getAttribute) {\n if (_target.getAttribute(k) != cond[k]) {\n result = false;\n break;\n }\n }\n else {\n result = false;\n break;\n }\n }\n }\n }\n return !result;\n })()) {\n if (_target.parentNode && _target.parentNode.parentNode) {\n _target = _target.parentNode;\n }\n else {\n _target = false;\n break;\n }\n }\n }\n return _target;\n }\n\n /**\n * @method ax5.util.cssNumber\n * @param {String|Number} val\n * @returns {String}\n * @example\n * ```\n * console.log(ax5.util.cssNumber(\"100px\"))\n * console.log(ax5.util.cssNumber(\"100%\"))\n * console.log(ax5.util.cssNumber(\"100\"))\n * console.log(ax5.util.cssNumber(100))\n * console.log(ax5.util.cssNumber(\"!!100@#\"))\n * ```\n */\n function cssNumber(val) {\n var re = /\\D?(\\d+)([a-zA-Z%]*)/i,\n found = ('' + val).match(re),\n unit = found[2] || \"px\"\n ;\n\n return found[1] + unit;\n }\n\n /**\n * css string 및 object 를 넘기면 object 및 string 으로 변환되어 리턴됩니다.\n * @method ax5.util.css\n * @param {Object|String} val - CSS String or CSS Object\n * @returns {String|Object}\n * @example\n * ```\n * console.log(ax5.util.css({background: \"#ccc\", padding: \"50px\", width: \"100px\"}));\n * //\"background:#ccc;padding:50px;width:100px;\"\n * console.log(ax5.util.css('width:100px;padding: 50px; background: #ccc'));\n * // object {width: \"100px\", padding: \"50px\", background: \"#ccc\"}\n * ```\n */\n function css(val) {\n var returns;\n if (isObject(val)) {\n returns = '';\n for (var k in val) {\n returns += k + ':' + val[k] + ';';\n }\n return returns;\n }\n else if (isString(val)) {\n returns = {};\n var valSplited = val.split(/[ ]*;[ ]*/g);\n valSplited.forEach(function (v) {\n if ((v = v.trim()) !== \"\") {\n var vSplited = v.split(/[ ]*:[ ]*/g);\n returns[vSplited[0]] = vSplited[1];\n }\n });\n return returns;\n }\n }\n\n /**\n * @method ax5.util.stopEvent\n * @param {Event} e\n * @example\n * ```\n * ax5.util.stopEvent(e);\n * ```\n */\n function stopEvent(e) {\n // 이벤트 중지 구문\n if (!e) var e = window.event;\n\n //e.cancelBubble is supported by IE -\n // this will kill the bubbling process.\n e.cancelBubble = true;\n e.returnValue = false;\n\n //e.stopPropagation works only in Firefox.\n if (e.stopPropagation) e.stopPropagation();\n if (e.preventDefault) e.preventDefault();\n\n return false;\n // 이벤트 중지 구문 끝\n }\n\n /**\n * @method ax5.util.selectRange\n * @param {Element} el\n * @param {Element} offset\n * @example\n * ```\n * ax5.util.selectRange($(\"#select-test-0\")); // selectAll\n * ax5.util.selectRange($(\"#select-test-0\"), \"selectAll\"); //selectAll\n * ax5.util.selectRange($(\"#select-test-0\"), \"start\"); // focus on start\n * ax5.util.selectRange($(\"#select-test-0\"), \"end\"); // focus on end\n * ax5.util.selectRange($(\"#select-test-0\"), [1, 5]); // select 1~5\n * ```\n */\n const selectRange = (function () {\n var processor = {\n 'textRange': {\n 'selectAll': function (el, range, offset) {\n\n },\n 'arr': function (el, range, offset) {\n range.moveStart(\"character\", offset[0]); // todo ie node select 체크필요\n range.collapse();\n range.moveEnd(\"character\", offset[1]);\n },\n 'start': function (el, range, offset) {\n range.moveStart(\"character\", 0);\n range.collapse();\n },\n 'end': function (el, range, offset) {\n range.moveStart(\"character\", range.text.length);\n range.collapse();\n }\n },\n 'range': {\n 'selectAll': function (el, range, offset) {\n range.selectNodeContents(el);\n },\n 'arr': function (el, range, offset) {\n if (isObject(offset[0])) {\n range.setStart(offset[0].node, offset[0].offset);\n range.setEnd(offset[1].node, offset[1].offset);\n }\n else {\n range.setStart(el.firstChild, offset[0]);\n range.setEnd(el.firstChild, offset[1]);\n }\n },\n 'start': function (el, range, offset) {\n range.selectNodeContents(el);\n range.collapse(true);\n },\n 'end': function (el, range, offset) {\n range.selectNodeContents(el);\n range.collapse(false);\n }\n }\n };\n return function (el, offset) {\n var range, rangeType, selection;\n\n if (el instanceof jQuery) {\n el = el.get(0);\n }\n if (!el) return;\n\n // 레인지 타입 선택\n if (doc.body.createTextRange) {\n range = document.body.createTextRange();\n range.moveToElementText(el);\n rangeType = \"textRange\";\n }\n else if (window.getSelection) {\n selection = window.getSelection();\n range = document.createRange();\n rangeType = \"range\";\n }\n\n // range 적용\n if (typeof offset == \"undefined\") {\n processor[rangeType].selectAll.call(this, el, range, offset);\n }\n else if (isArray(offset)) {\n processor[rangeType].arr.call(this, el, range, offset);\n }\n else {\n for (var key in processor[rangeType]) {\n if (offset == key) {\n processor[rangeType][key].call(this, el, range, offset);\n break;\n }\n }\n }\n\n // 포커스 및 셀렉트\n if (doc.body.createTextRange) {\n range.select();\n el.focus();\n }\n else if (window.getSelection) {\n el.focus();\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n }\n })();\n\n /**\n * 지정한 시간을 지연시켜 함수를 실행합니다.\n * @method ax5.util.debounce\n * @param {Function} func\n * @param {Number} wait\n * @param {Object} options\n * @returns {debounced}\n * @example\n * ```js\n * var debounceFn = ax5.util.debounce(function( val ) { console.log(val); }, 300);\n * $(document.body).click(function(){\n * debounceFn(new Date());\n * });\n * ```\n */\n // https://github.com/lodash/lodash/blob/master/debounce.js\n function debounce(func, wait, options) {\n let lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime;\n\n let lastInvokeTime = 0;\n let leading = false;\n let maxing = false;\n let trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError('Expected a function')\n }\n wait = +wait || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n const args = lastArgs;\n const thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n const timeSinceLastCall = time - lastCallTime;\n const timeSinceLastInvoke = time - lastInvokeTime;\n const result = wait - timeSinceLastCall;\n\n return maxing ? Math.min(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n const timeSinceLastCall = time - lastCallTime;\n const timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))\n }\n\n function timerExpired() {\n const time = Date.now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time)\n }\n lastArgs = lastThis = undefined;\n return result\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(Date.now())\n }\n\n function debounced(...args) {\n const time = Date.now();\n const isInvoking = shouldInvoke(time);\n\n lastArgs = args;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime)\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime)\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait)\n }\n return result\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced\n }\n\n /**\n * @method ax5.util.throttle\n * @param func\n * @param wait\n * @param options\n * @return {debounced}\n */\n //https://github.com/lodash/lodash/blob/master/throttle.js\n function throttle(func, wait, options) {\n let leading = true;\n let trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError('Expected a function');\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * @method ax5.util.deepCopy\n * @param {Object} obj\n * @returns {Object}\n * @example\n * ```js\n * var obj = [\n * {name:\"A\", child:[{name:\"a-1\"}]},\n * {name:\"B\", child:[{name:\"b-1\"}], callBack: function(){ console.log('callBack'); }}\n * ];\n * var copiedObj = ax5.util.deepCopy(obj)\n * ```\n */\n function deepCopy(obj) {\n var r, l;\n if (typeof obj == 'object') {\n if (U.isArray(obj)) {\n l = obj.length;\n r = new Array(l);\n for (var i = 0; i < l; i++) {\n r[i] = deepCopy(obj[i]);\n }\n return r;\n } else {\n return jQuery.extend({}, obj);\n }\n }\n return obj;\n }\n\n /**\n * HTML 문자열을 escape 처리합니다.\n * \"<\" represents the < sign.\n * \">\" represents the > sign.\n * \"&\" represents the & sign.\n * \"" represents the \" mark.\n * [Character entity references](https://www.w3.org/TR/html401/charset.html#h-5.3)\n * @method ax5.util.escapeHtml\n * @param {String} s\n * @returns {string}\n * @example\n * ```\n * ax5.util.escapeHtml('HTML string & \"escape\"')\n * //\"HTML <span>string</span> & "escape"\"\n * ```\n */\n function escapeHtml(s) {\n if (_toString.call(s) != \"[object String]\") return s;\n if (!s) return \"\";\n return s.replace(/[\\<\\>\\&\\\"]/gm, function (match) {\n switch (match) {\n case \"<\":\n return \"<\";\n case \">\":\n return \">\";\n case \"&\":\n return \"&\";\n case \"\\\"\":\n return \""\";\n default:\n return match;\n }\n });\n }\n\n /**\n * HTML 문자열을 unescape 처리합니다.\n * escapeHtml를 참고하세요.\n * @method ax5.util.unescapeHtml\n * @param {String} s\n * @returns {string}\n * @example\n * ```\n * ax5.util.unescapeHtml('HTML <span>string</span> & "escape"')\n * //\"HTML string & \"escape\"\"\n * ```\n */\n function unescapeHtml(s) {\n if (_toString.call(s) != \"[object String]\") return s;\n if (!s) return \"\";\n return s.replace(/(<)|(>)|(&)|(")/gm, function (match) {\n switch (match) {\n case \"<\":\n return \"<\";\n case \">\":\n return \">\";\n case \"&\":\n return \"&\";\n case \""\":\n return \"\\\"\";\n default:\n return match;\n }\n });\n }\n\n /**\n * @method ax5.util.string\n * @param {String} tmpl\n * @param {*} args\n * @return {ax5string}\n * @example\n * ```js\n * ax5.util.string(\"{0} is dead, but {1} is alive! {0} {2}\").format(\"ASP\", \"ASP.NET\");\n * ax5.util.string(\"{0} is dead, but {1} is alive! {0} {2}\").format([\"ASP\", \"ASP.NET\"]);\n * ax5.util.stinrg(\"{0} counts\").format(100);\n * ```\n */\n function string(_string) {\n return new (function (_string) {\n this.value = _string;\n this.toString = function () {\n return this.value;\n };\n /**\n * @method ax5.util.string.format\n * @returns {*}\n */\n this.format = function () {\n var args = [];\n for (var i = 0, l = arguments.length; i < l; i++) {\n args = args.concat(arguments[i]);\n }\n return this.value.replace(/{(\\d+)}/g, function (match, number) {\n return typeof args[number] != 'undefined' ? args[number] : match;\n });\n };\n /**\n * @method ax5.util.string.escape\n * @returns {*}\n */\n this.escape = function () {\n return escapeHtml(this.value);\n };\n /**\n * @method ax5.util.string.unescape\n * @returns {*}\n */\n this.unescape = function () {\n return unescapeHtml(this.value);\n };\n /**\n * @method ax5.util.string.encode\n * @returns {*}\n */\n this.encode = function () {\n return encode(this.value);\n };\n /**\n * @method ax5.util.string.decode\n * @returns {*}\n */\n this.decode = function () {\n return decode(this.value);\n };\n /**\n * @method ax5.util.string.left\n * @param {String|Number} pos - 찾을 문자열 또는 포지션\n * @returns {*}\n */\n this.left = function (_pos) {\n return left(this.value, _pos);\n };\n /**\n * @method ax5.util.string.right\n * @param {String|Number} pos - 찾을 문자열 또는 포지션\n * @returns {*}\n */\n this.right = function (_pos) {\n return right(this.value, _pos);\n };\n /**\n * @method ax5.util.string.camelCase\n * @returns {*}\n */\n this.camelCase = function () {\n return camelCase(this.value);\n };\n /**\n * @method ax5.util.string.snakeCase\n * @returns {*}\n */\n this.snakeCase = function () {\n return snakeCase(this.value);\n };\n })(_string);\n }\n\n /**\n * @method ax5.util.color\n * @param _hexColor\n * @return {ax5color}\n * @example\n * ```js\n * ax5.util.color(\"#ff3300\").lighten(10).getHexValue()\n * console.log(ax5.util.color(\"#ff3300\").darken(10).getHexValue());\n * ```\n */\n function color(_hexColor) {\n\n const matchers = (function () {\n\n // \n const CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // \n const CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n const CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n const PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n const PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n })();\n\n const convertObject = function (_color) {\n let match;\n if ((match = matchers.rgb.exec(_color))) {\n return {r: match[1], g: match[2], b: match[3]};\n }\n if ((match = matchers.rgba.exec(_color))) {\n return {r: match[1], g: match[2], b: match[3], a: match[4]};\n }\n if ((match = matchers.hsl.exec(_color))) {\n return {h: match[1], s: match[2], l: match[3]};\n }\n if ((match = matchers.hsla.exec(_color))) {\n return {h: match[1], s: match[2], l: match[3], a: match[4]};\n }\n if ((match = matchers.hsv.exec(_color))) {\n return {h: match[1], s: match[2], v: match[3]};\n }\n if ((match = matchers.hsva.exec(_color))) {\n return {h: match[1], s: match[2], v: match[3], a: match[4]};\n }\n if ((match = matchers.hex8.exec(_color))) {\n return {\n r: parseInt(match[1], 16),\n g: parseInt(match[2], 16),\n b: parseInt(match[3], 16),\n a: parseInt((match[4]) / 255, 16),\n format: \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(_color))) {\n return {\n r: parseInt(match[1], 16),\n g: parseInt(match[2], 16),\n b: parseInt(match[3], 16),\n format: \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(_color))) {\n return {\n r: parseInt(match[1] + '' + match[1], 16),\n g: parseInt(match[2] + '' + match[2], 16),\n b: parseInt(match[3] + '' + match[3], 16),\n a: parseInt(match[4] + '' + match[4], 16),\n format: \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(_color))) {\n return {\n r: parseInt(match[1] + '' + match[1], 16),\n g: parseInt(match[2] + '' + match[2], 16),\n b: parseInt(match[3] + '' + match[3], 16),\n format: \"hex\"\n };\n }\n\n return false;\n };\n\n function isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n }\n\n function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }\n\n function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }\n\n function convertTo255(n) {\n return ax5.util.number(Math.min(255, Math.max(n, 0)), {'round': 2});\n }\n\n function convertToHex(n) {\n return setDigit(Math.round(n).toString(16), 2)\n }\n\n function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = \"100%\";\n }\n\n var processPercent = isPercentage(n);\n n = Math.min(max, Math.max(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n }\n\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = Math.max(r, g, b), min = Math.min(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if (max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return {h: h, s: s, l: l};\n }\n\n function hslToRgb(h, s, l) {\n let r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n if (s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n let q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n let p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return {r: r * 255, g: g * 255, b: b * 255};\n }\n\n return new (function (_color) {\n this._originalValue = _color;\n _color = convertObject(_color);\n this.r = _color.r;\n this.g = _color.g;\n this.b = _color.b;\n this.a = _color.a || 1;\n this._format = _color.format;\n this._hex = convertToHex(this.r) + convertToHex(this.g) + convertToHex(this.b);\n\n this.getHexValue = function () {\n return this._hex;\n };\n\n this.lighten = function (amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n let hsl = rgbToHsl(this.r, this.g, this.b), rgb = {};\n\n hsl.l += amount / 100;\n hsl.l = Math.min(1, Math.max(0, hsl.l));\n hsl.h = hsl.h * 360;\n\n rgb = hslToRgb(hsl.h, convertToPercentage(hsl.s), convertToPercentage(hsl.l));\n\n return color('rgba(' + convertTo255(rgb.r) + ', ' + convertTo255(rgb.g)+ ', ' + convertTo255(rgb.b) + ', ' + this.a + ')');\n };\n\n this.darken = function (amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n let hsl = rgbToHsl(this.r, this.g, this.b), rgb = {};\n\n hsl.l -= amount / 100;\n hsl.l = Math.min(1, Math.max(0, hsl.l));\n hsl.h = hsl.h * 360;\n\n rgb = hslToRgb(hsl.h, convertToPercentage(hsl.s), convertToPercentage(hsl.l));\n\n return color('rgba(' + convertTo255(rgb.r) + ', ' + convertTo255(rgb.g)+ ', ' + convertTo255(rgb.b) + ', ' + this.a + ')');\n };\n\n this.getBrightness = function () {\n return (this.r * 299 + this.g * 587 + this.b * 114) / 1000;\n };\n\n this.isDark = function() {\n return this.getBrightness() < 128;\n };\n\n this.isLight = function() {\n return !this.isDark();\n };\n\n this.getHsl = function () {\n let hsl = rgbToHsl(this.r, this.g, this.b);\n hsl.l = Math.min(1, Math.max(0, hsl.l));\n hsl.h = hsl.h * 360;\n return {\n h: hsl.h,\n s: hsl.s,\n l: hsl.l\n }\n };\n\n })(_hexColor);\n }\n\n return {\n alert: alert,\n each: each,\n map: map,\n search: search,\n reduce: reduce,\n reduceRight: reduceRight,\n filter: filter,\n sum: sum,\n avg: avg,\n toJson: toJson,\n parseJson: parseJson,\n first: first,\n last: last,\n deepCopy: deepCopy,\n\n left: left,\n right: right,\n getType: getType,\n isWindow: isWindow,\n isElement: isElement,\n isObject: isObject,\n isArray: isArray,\n isFunction: isFunction,\n isString: isString,\n isNumber: isNumber,\n isNodelist: isNodelist,\n isUndefined: isUndefined,\n isNothing: isNothing,\n setCookie: setCookie,\n getCookie: getCookie,\n camelCase: camelCase,\n snakeCase: snakeCase,\n number: number,\n toArray: toArray,\n merge: merge,\n param: param,\n error: error,\n date: date,\n dday: dday,\n daysOfMonth: daysOfMonth,\n weeksOfMonth: weeksOfMonth,\n setDigit: setDigit,\n times: times,\n findParentNode: findParentNode,\n cssNumber: cssNumber,\n css: css,\n isDate: isDate,\n isDateFormat: isDateFormat,\n stopEvent: stopEvent,\n selectRange: selectRange,\n debounce: debounce,\n throttle: throttle,\n escapeHtml: escapeHtml,\n unescapeHtml: unescapeHtml,\n\n string: string,\n color: color\n }\n })();\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = ax5;\n } else {\n root.ax5 = (function () {\n return ax5;\n })(); // ax5.ui에 연결\n }\n\n}).call(typeof window !== \"undefined\" ? window : this);\n","ax5.def = {};","ax5.info.errorMsg[\"ax5dialog\"] = {\n \"501\": \"Duplicate call error\"\n};\n\nax5.info.errorMsg[\"ax5picker\"] = {\n \"401\": \"Can not find target element\",\n \"402\": \"Can not find boundID\",\n \"501\": \"Can not find content key\"\n};\n\nax5.info.errorMsg[\"single-uploader\"] = {\n \"460\": \"There are no files to be uploaded.\",\n \"461\": \"There is no uploaded files.\"\n};\n\nax5.info.errorMsg[\"ax5calendar\"] = {\n \"401\": \"Can not find target element\"\n};\n\nax5.info.errorMsg[\"ax5formatter\"] = {\n \"401\": \"Can not find target element\",\n \"402\": \"Can not find boundID\",\n \"501\": \"Can not find pattern\"\n};\n\nax5.info.errorMsg[\"ax5menu\"] = {\n \"501\": \"Can not find menu item\"\n};\n\nax5.info.errorMsg[\"ax5select\"] = {\n \"401\": \"Can not find target element\",\n \"402\": \"Can not find boundID\",\n \"501\": \"Can not find option\"\n};\n\nax5.info.errorMsg[\"ax5combobox\"] = {\n \"401\": \"Can not find target element\",\n \"402\": \"Can not find boundID\",\n \"501\": \"Can not find option\"\n};","// 필수 Ployfill 확장 구문\n(function () {\n 'use strict';\n \n var root = this,\n re_trim = /^\\s*|\\s*$/g;\n\n // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\n if (!Object.keys) {\n Object.keys = (function () {\n var hwp = Object.prototype.hasOwnProperty,\n hdeb = !({toString: null}).propertyIsEnumerable('toString'),\n de = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n del = de.length;\n\n return function (obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) throw new TypeError('type err');\n var r = [], prop, i;\n for (prop in obj) if (hwp.call(obj, prop)) r.push(prop);\n if (hdeb) {\n for (i = 0; i < del; i++) if (hwp.call(obj, de[i])) r.push(de[i]);\n }\n return r;\n };\n }());\n }\n\n // ES5 15.4.4.18 Array.prototype.forEach ( callbackfn [ , thisArg ] )\n // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach\n if (!Array.prototype.forEach) {\n Array.prototype.forEach = function (fun /*, thisp */) {\n if (this === void 0 || this === null) {\n throw TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (typeof fun !== \"function\") {\n throw TypeError();\n }\n var thisp = arguments[1], i;\n for (i = 0; i < len; i++) {\n if (i in t) {\n fun.call(thisp, t[i], i, t);\n }\n }\n };\n }\n\n // ES5 15.3.4.5 Function.prototype.bind ( thisArg [, arg1 [, arg2, ... ]] )\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\n if (!Function.prototype.bind) {\n Function.prototype.bind = function (o) {\n if (typeof this !== 'function') {\n throw TypeError(\"function\");\n }\n var slice = [].slice,\n args = slice.call(arguments, 1),\n self = this,\n bound = function () {\n return self.apply(this instanceof nop ? this : o,\n args.concat(slice.call(arguments)));\n };\n\n function nop() {}\n\n nop.prototype = self.prototype;\n bound.prototype = new nop();\n return bound;\n };\n }\n\n /*global document */\n /**\n * define document.querySelector & document.querySelectorAll for IE7\n *\n * A not very fast but small hack. The approach is taken from\n * http://weblogs.asp.net/bleroy/archive/2009/08/31/queryselectorall-on-old-ie-versions-something-that-doesn-t-work.aspx\n *\n */\n (function () {\n if (document.querySelectorAll || document.querySelector) {\n return;\n }\n if (!document.createStyleSheet) return;\n var style = document.createStyleSheet(),\n select = function (selector, maxCount) {\n var\n all = document.all,\n l = all.length,\n i,\n resultSet = [];\n\n style.addRule(selector, \"foo:bar\");\n for (i = 0; i < l; i += 1) {\n if (all[i].currentStyle.foo === \"bar\") {\n resultSet.push(all[i]);\n if (resultSet.length > maxCount) {\n break;\n }\n }\n }\n style.removeRule(0);\n return resultSet;\n };\n\n document.querySelectorAll = function (selector) {\n return select(selector, Infinity);\n };\n document.querySelector = function (selector) {\n return select(selector, 1)[0] || null;\n };\n }());\n\n if (!String.prototype.trim) {\n (function () {\n String.prototype.trim = function () {\n return this.replace(re_trim, '');\n };\n })();\n }\n\n if (!window.JSON) {\n window.JSON = {\n parse: function (sJSON) { return (new Function('', 'return ' + sJSON))(); },\n stringify: (function () {\n var r = /[\"]/g, f;\n return f = function (vContent) {\n var result, i, j;\n switch (result = typeof vContent) {\n case'string':\n return '\"' + vContent.replace(r, '\\\\\"') + '\"';\n case'number':\n case'boolean':\n return vContent.toString();\n case'undefined':\n return 'undefined';\n case'function':\n return '\"\"';\n case'object':\n if (!vContent) return 'null';\n result = '';\n if (vContent.splice) {\n for (i = 0, j = vContent.length; i < j; i++) result += ',' + f(vContent[i]);\n return '[' + result.substr(1) + ']';\n }\n else {\n for (i in vContent) if (vContent.hasOwnProperty(i) && vContent[i] !== undefined && typeof vContent[i] != 'function') result += ',\"' + i + '\":' + f(vContent[i]);\n return '{' + result.substr(1) + '}';\n }\n }\n };\n })()\n };\n }\n\n // splice ie8 <= polyfill\n (function () {\n if (!document.documentMode || document.documentMode >= 9) return false;\n var _splice = Array.prototype.splice;\n Array.prototype.splice = function () {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[1] === \"undefined\") args[1] = this.length - args[0];\n return _splice.apply(this, args);\n };\n })();\n\n /**\n * Shim for \"fixing\" IE's lack of support (IE < 9) for applying slice\n * on host objects like NamedNodeMap, NodeList, and HTMLCollection\n * (technically, since host objects have been implementation-dependent,\n * at least before ES6, IE hasn't needed to work this way).\n * Also works on strings, fixes IE < 9 to allow an explicit undefined\n * for the 2nd argument (as in Firefox), and prevents errors when\n * called on other DOM objects.\n */\n (function () {\n 'use strict';\n var _slice = Array.prototype.slice;\n\n try {\n // Can't be used with DOM elements in IE < 9\n _slice.call(document.documentElement);\n } catch (e) { // Fails in IE < 9\n // This will work for genuine arrays, array-like objects,\n // NamedNodeMap (attributes, entities, notations),\n // NodeList (e.g., getElementsByTagName), HTMLCollection (e.g., childNodes),\n // and will not fail on other DOM objects (as do DOM elements in IE < 9)\n Array.prototype.slice = function(begin, end) {\n // IE < 9 gets unhappy with an undefined end argument\n end = (typeof end !== 'undefined') ? end : this.length;\n\n // For native Array objects, we use the native slice function\n if (Object.prototype.toString.call(this) === '[object Array]'){\n return _slice.call(this, begin, end);\n }\n\n // For array like object we handle it ourselves.\n var i, cloned = [],\n size, len = this.length;\n\n // Handle negative value for \"begin\"\n var start = begin || 0;\n start = (start >= 0) ? start : Math.max(0, len + start);\n\n // Handle negative value for \"end\"\n var upTo = (typeof end == 'number') ? Math.min(end, len) : len;\n if (end < 0) {\n upTo = len + end;\n }\n \n // Actual expected size of the slice\n size = upTo - start;\n\n if (size > 0) {\n cloned = new Array(size);\n if (this.charAt) {\n for (i = 0; i < size; i++) {\n cloned[i] = this.charAt(start + i);\n }\n } else {\n for (i = 0; i < size; i++) {\n cloned[i] = this[start + i];\n }\n }\n }\n\n return cloned;\n };\n }\n }());\n\n // Console-polyfill. MIT license. https://github.com/paulmillr/console-polyfill\n // Make it safe to do console.log() always.\n (function (con) {\n var prop, method;\n var empty = {};\n var dummy = function () {};\n var properties = 'memory'.split(',');\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) con[prop] = con[prop] || empty;\n while (method = methods.pop()) con[method] = con[method] || dummy;\n })(window.console || {}); // Using `this` for web workers.\n\n\n // Modernizr style test\n if (!(window.webkitMatchMedia || window.mozMatchMedia || window.oMatchMedia || window.msMatchMedia || window.matchMedia)) {\n var root = document.getElementsByTagName( 'html' )[0];\n root.className += ' no-matchmedia';\n }\n\n /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */\n window.matchMedia || (window.matchMedia = function() {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n script.parentNode.insertBefore(style, script);\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function(media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n }());\n\n /*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */\n (function(){\n // Bail out for browsers that have addListener support\n if (window.matchMedia && window.matchMedia('all').addListener) {\n return false;\n }\n\n var localMatchMedia = window.matchMedia,\n hasMediaQueries = localMatchMedia('only all').matches,\n isListening = false,\n timeoutID = 0, // setTimeout for debouncing 'handleChange'\n queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used\n handleChange = function(evt) {\n // Debounce\n clearTimeout(timeoutID);\n\n timeoutID = setTimeout(function() {\n for (var i = 0, il = queries.length; i < il; i++) {\n var mql = queries[i].mql,\n listeners = queries[i].listeners || [],\n matches = localMatchMedia(mql.media).matches;\n\n // Update mql.matches value and call listeners\n // Fire listeners only if transitioning to or from matched state\n if (matches !== mql.matches) {\n mql.matches = matches;\n\n for (var j = 0, jl = listeners.length; j < jl; j++) {\n listeners[j].call(window, mql);\n }\n }\n }\n }, 30);\n };\n\n window.matchMedia = function(media) {\n var mql = localMatchMedia(media),\n listeners = [],\n index = 0;\n\n mql.addListener = function(listener) {\n // Changes would not occur to css media type so return now (Affects IE <= 8)\n if (!hasMediaQueries) {\n return;\n }\n\n // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8)\n // There should only ever be 1 resize listener running for performance\n if (!isListening) {\n isListening = true;\n window.addEventListener('resize', handleChange, true);\n }\n\n // Push object only if it has not been pushed already\n if (index === 0) {\n index = queries.push({\n mql : mql,\n listeners : listeners\n });\n }\n\n listeners.push(listener);\n };\n\n mql.removeListener = function(listener) {\n for (var i = 0, il = listeners.length; i < il; i++){\n if (listeners[i] === listener){\n listeners.splice(i, 1);\n }\n }\n };\n\n return mql;\n };\n }());\n\n // extend innerWidth ..\n var html = document.getElementsByTagName('html')[0];\n var body = document.getElementsByTagName('body')[0];\n\n /*\n if (!window.innerWidth) window.innerWidth = html.clientWidth;\n if (!window.innerHeight) window.innerHeight = html.clientHeight;\n if (!window.scrollX) window.scrollX = window.pageXOffset || html.scrollLeft;\n if (!window.scrollY) window.scrollY = window.pageYOffset || html.scrollTop;\n */\n}.call(window));","/**\n * Refer to this by {@link ax5}.\n * @namespace ax5.ui\n */\n\n/**\n * @class ax5.ui.root\n * @classdesc ax5 ui class\n * @author tom@axisj.com\n * @example\n * ```\n * var myui = new ax5.ui.root();\n * ```\n */\nax5.ui = (function () {\n\n function axUi() {\n this.config = {};\n this.name = \"root\";\n\n /**\n * 클래스의 속성 정의 메소드 속성 확장후에 내부에 init 함수를 호출합니다.\n * @method ax5.ui.root.setConfig\n * @param {Object} config - 클래스 속성값\n * @param {Boolean} [callInit=true] - init 함수 호출 여부\n * @returns {ax5.ui.axUi}\n * @example\n * ```\n * var myui = new ax5.ui.root();\n * myui.setConfig({\n\t\t * \tid:\"abcd\"\n\t\t * });\n * ```\n */\n this.setConfig = function (cfg, callInit) {\n jQuery.extend(true, this.config, cfg);\n if (typeof callInit == \"undefined\" || callInit === true) {\n this.init();\n }\n return this;\n };\n this.init = function () {\n console.log(this.config);\n };\n\n this.bindWindowResize = function (callBack) {\n setTimeout((function () {\n jQuery(window).resize((function () {\n if (this.bindWindowResize__) clearTimeout(this.bindWindowResize__);\n this.bindWindowResize__ = setTimeout((function () {\n callBack.call(this);\n }).bind(this), 10);\n }).bind(this));\n }).bind(this), 100);\n };\n\n this.stopEvent = function (e) {\n if (e.preventDefault) e.preventDefault();\n if (e.stopPropagation) e.stopPropagation();\n e.cancelBubble = true;\n return false;\n };\n\n this.toString = function () {\n return this.name + '@' + this.version;\n };\n\n // instance init\n this.main = (function () {\n\n }).apply(this, arguments);\n\n }\n\n /**\n * @method ax5.ui.addClass\n * @param {Object} config\n * @param {String} config.className - name of Class\n * @param {Object} [config.classStore=ax5.ui] - 클래스가 저장될 경로\n * @param {Function} [config.superClass=ax5.ui.root]\n * @param {Function} cls - Class Function\n */\n function addClass(config, cls) {\n if (!config || !config.className) throw 'invalid call';\n var classStore = (config.classStore) ? config.classStore : ax5.ui;\n if (!classStore) throw 'invalid classStore';\n\n // make ui definition variable\n ax5.def[config.className] = {\n version: ax5.info.version\n };\n\n var factory = function (cls, arg) {\n switch (arg.length) {\n case 0:\n return new cls();\n break;\n case 1:\n return new cls(arg[0]);\n break;\n case 2:\n return new cls(arg[0], arg[1]);\n break;\n case 3:\n return new cls(arg[0], arg[1], arg[2]);\n break;\n }\n };\n var initInstance = function (name, version, instance) {\n instance.name = name;\n instance.version = version;\n instance.instanceId = ax5.getGuid();\n return instance;\n };\n var initPrototype = function (cls) {\n var superClass = (config.superClass) ? config.superClass : ax5.ui.root;\n if (!ax5.util.isFunction(superClass)) throw 'invalid superClass';\n superClass.call(this); // 부모호출\n cls.prototype = new superClass(); // 상속\n };\n var wrapper = function () {\n if (!this || !(this instanceof wrapper)) throw 'invalid call';\n var instance = factory(cls, arguments);\n return initInstance(config.className, config.version || \"\", instance);\n };\n initPrototype.call(this, cls);\n classStore[config.className] = wrapper;\n }\n\n return {\n root: axUi,\n addClass: addClass\n }\n})();\n","/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n * https://github.com/thomasJang/mustache.js -- imporove some variables\n */\n\n(function defineMustache(global, factory) {\n\n factory(global.mustache = {});\n\n}(window.ax5, function mustacheFactory(mustache) {\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill(object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction(object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr(obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp(string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty(obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n\n function testRegExp(re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n\n function isWhitespace(string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''', '/': '/'\n };\n\n function escapeHtml(string) {\n return String(string).replace(/[&<>\"'\\/]/g, function fromEntityMap(s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n */\n function parseTemplate(template, tags) {\n if (!template)\n return [];\n\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace() {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n }\n else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n\n function compileTags(tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n }\n else {\n nonSpace = true;\n }\n\n tokens.push(['text', chr, start, start + 1]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n')\n stripSpace();\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n }\n else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n }\n else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n token = [type, value, start, scanner.pos];\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n }\n else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n }\n else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n }\n else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens(tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n }\n else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens(tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner(string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos() {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan(re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil(re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context(view, parentContext) {\n this.view = view;\n this.cache = {\n '.': this.view,\n '@each': function () {\n var returns = [];\n for (var k in this) {\n returns.push({'@key': k, '@value': this[k]});\n }\n return returns;\n }\n };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push(view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup(name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n }\n else {\n var context = this, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n value = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n **/\n while (value != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = hasProperty(value, names[index]);\n\n value = value[names[index++]];\n }\n }\n else {\n value = context.view[name];\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit)\n break;\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer() {\n this.cache = {};\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache() {\n this.cache = {};\n };\n\n /**\n * Parses and caches the given `template` and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse(template, tags) {\n var cache = this.cache;\n var tokens = cache[template];\n\n if (tokens == null)\n tokens = cache[template] = parseTemplate(template, tags);\n\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n */\n Writer.prototype.render = function render(template, view, partials) {\n var tokens = this.parse(template);\n var context = (view instanceof Context) ? view : new Context(view);\n return this.renderTokens(tokens, context, partials, template);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) {\n var buffer = '';\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, originalTemplate);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection(token, context, partials, originalTemplate) {\n var self = this;\n var buffer = '';\n\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender(template) {\n return self.render(template, context, partials);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n if (value[j]) {\n if (typeof value[j] === 'object') {\n value[j]['@i'] = j;\n value[j]['@first'] = (j === 0);\n }\n\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);\n }\n }\n }\n else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);\n }\n else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n }\n else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted(token, context, partials, originalTemplate) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate);\n };\n\n Writer.prototype.renderPartial = function renderPartial(token, context, partials) {\n if (!partials) return;\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null)\n return this.renderTokens(this.parse(value), context, partials, value);\n };\n\n Writer.prototype.unescapedValue = function unescapedValue(token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue(token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return mustache.escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue(token) {\n return token[1];\n };\n\n mustache.name = 'mustache.js';\n mustache.version = '2.1.3';\n mustache.tags = ['{{', '}}'];\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache() {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse(template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view` and `partials` using the\n * default writer.\n */\n mustache.render = function render(template, view, partials) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' + 'but \"' + typeStr(template) + '\" was given as the first ' + 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials);\n };\n\n // This is here for backwards compatibility with 0.4.x.,\n /*eslint-disable */ // eslint wants camel cased function name\n mustache.to_html = function to_html(template, view, partials, send) {\n /*eslint-enable*/\n\n var result = mustache.render(template, view, partials);\n\n if (isFunction(send)) {\n send(result);\n }\n else {\n return result;\n }\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n}));"]} \ No newline at end of file diff --git a/_src/plugins/ax5ui-mask/ax5mask.js b/_src/plugins/ax5ui-mask/ax5mask.js deleted file mode 100644 index 27c8faa..0000000 --- a/_src/plugins/ax5ui-mask/ax5mask.js +++ /dev/null @@ -1,346 +0,0 @@ -'use strict'; - -// ax5.ui.mask -(function () { - - var UI = ax5.ui; - var U = ax5.util; - var MASK = void 0; - - UI.addClass({ - className: "mask" - }, function () { - /** - * @class ax5mask - * @classdesc - * @author tom@axisj.com - * @example - * ```js - * var customMask = function customMask() { - * var cTmpl = '' + - * '' + - * ' ' + - * ' ' + - * ' {{{body}}}' + - * ' ' + - * ''; - * return cTmpl; - * }; - * ax5.ui.mask.tmpl.customMask = customMask; - * - * var mask = new ax5.ui.mask(); - * - * mask.open({ - * templateName: 'customMask', - * content: 'custom MASK on target', - * target: $("#user-content").get(0), - * onClick: function(){ - * console.log(this); - * } - * }); - * ``` - */ - return function () { - var self = this, - cfg = void 0; - - this.instanceId = ax5.getGuid(); - this.config = { - theme: '', - target: jQuery(document.body).get(0), - animateTime: 250 - }; - this.maskContent = ''; - this.status = "off"; - - cfg = this.config; - - var onStateChanged = function onStateChanged(opts, that) { - if (opts && opts.onStateChanged) { - opts.onStateChanged.call(that, that); - } else if (this.onStateChanged) { - this.onStateChanged.call(that, that); - } - - opts = null; - that = null; - return true; - }; - var getBodyTmpl = function getBodyTmpl(data) { - if (typeof data.templateName === "undefined") data.templateName = "defaultMask"; - return MASK.tmpl.get.call(this, data.templateName, data); - }; - var setBody = function setBody(content) { - this.maskContent = content; - }; - - /** - * Preferences of Mask UI - * @method ax5mask.setConfig - * @param {Object} config - 클래스 속성값 - * @returns {ax5mask} - * @example - * ``` - * setConfig({ - * target : {Element|AX5 nodelist}, // 마스크 처리할 대상 - * content : {String}, // 마스크안에 들어가는 내용물 - * onStateChanged: function(){} // 마스크 상태변경 시 호출되는 함수 this.type으로 예외처리 가능 - * } - * ``` - */ - this.init = function () { - // after setConfig(); - this.onStateChanged = cfg.onStateChanged; - this.onClick = cfg.onClick; - if (this.config.content) setBody.call(this, this.config.content); - }; - - /** - * open mask - * target 을 주지 않으면 기본적으로 body 에 마스크가 적용되고 원하는 타겟을 지정해서 마스크를 씌울 수 있습니다. - * 기본 정의된 마스크 외에 사용자가 템플릿을 정의해서 마스크를 사용 가능합니다. - * @method ax5mask.open - * @param {Object} config - * @param {String} config - * @returns {ax5mask} - * @example - * ```js - * my_mask.open({ - * target: document.body, - * content: "Loading..", - * onStateChanged: function () { - * - * } - * }); - * - * my_mask.open({ - * target: $("#mask-target").get(0), // dom Element - * content: "Loading..", - * onStateChanged: function () { - * - * } - * }); - * - * - * var customMask = function customMask() { - * var cTmpl = '' + - * '' + - * ' ' + - * ' ' + - * ' {{{body}}}' + - * ' ' + - * ''; - * return cTmpl; - * }; - * ax5.ui.mask.tmpl.customMask = customMask; - * - * my_mask.open({ - * target: $("#mask-target").get(0), // dom Element - * content: "Loading..", - * - * onStateChanged: function () { - * - * } - * }); - * ``` - */ - this.open = function (options) { - - if (this.status === "on") this.close(); - if (options && options.content) setBody.call(this, options.content); - if (options && typeof options.templateName === "undefined") options.templateName = "defaultMask"; - self.maskConfig = jQuery.extend(true, {}, this.config, options); - - var _cfg = self.maskConfig, - target = _cfg.target, - $target = jQuery(target), - maskId = 'ax-mask-' + ax5.getGuid(), - $mask = void 0, - css = {}, - that = {}, - templateName = _cfg.templateName, - body = getBodyTmpl({ - theme: _cfg.theme, - maskId: maskId, - body: this.maskContent, - templateName: templateName - }); - - jQuery(document.body).append(body); - - // 마스크의 타겟이 html body 가 아니라면 - if (target && target !== jQuery(document.body).get(0)) { - css = { - position: _cfg.position || "absolute", - left: $target.offset().left, - top: $target.offset().top, - width: $target.outerWidth(), - height: $target.outerHeight() - }; - - $target.addClass("ax-masking"); - - // 마스크의 타겟이 html body가 아닌경우 window resize 이벤트를 추적하여 엘리먼트 마스크의 CSS 속성 변경 - jQuery(window).on("resize.ax5mask-" + this.instanceId, function (_$target) { - this.align(); - }.bind(this)); - } - - if (typeof self.maskConfig.zIndex !== "undefined") { - css["z-index"] = self.maskConfig.zIndex; - } - - this.$mask = $mask = jQuery("#" + maskId); - this.$target = $target; - this.status = "on"; - $mask.css(css); - - if (_cfg.onClick) { - $mask.on("click", function (e) { - that = { - self: self, - state: "open", - type: "click" - }; - self.maskConfig.onClick.call(that, that); - }); - } - - onStateChanged.call(this, null, { - self: this, - state: "open" - }); - - options = null; - _cfg = null; - target = null; - $target = null; - maskId = null; - $mask = null; - css = null; - that = null; - templateName = null; - body = null; - - return this; - }; - - /** - * close mask - * @method ax5mask.close - * @param {Number} [_delay=0] - * @returns {ax5mask} - * @example - * ``` - * my_mask.close(); - * ``` - */ - this.close = function (_delay) { - if (this.$mask) { - var _close = function _close() { - this.status = "off"; - this.$mask.remove(); - this.$target.removeClass("ax-masking"); - - onStateChanged.call(this, null, { - self: this, - state: "close" - }); - - jQuery(window).off("resize.ax5mask-" + this.instanceId); - }; - - if (_delay) { - setTimeout(function () { - _close.call(this); - }.bind(this), _delay); - } else { - _close.call(this); - } - } - return this; - }; - - /** - * @method ax5mask.fadeOut - * @returns {ax5mask} - */ - this.fadeOut = function () { - if (this.$mask) { - var _close = function _close() { - this.status = "off"; - this.$mask.remove(); - this.$target.removeClass("ax-masking"); - - onStateChanged.call(this, null, { - self: this, - state: "close" - }); - - jQuery(window).off("resize.ax5mask-" + this.instanceId); - }; - - this.$mask.addClass("fade-out"); - setTimeout(function () { - _close.call(this); - }.bind(this), cfg.animateTime); - } - return this; - }; - - /** - * @method ax5mask.align - * @returns {ax5mask} - */ - this.align = function () { - if (this.maskConfig && this.maskConfig.target && this.maskConfig.target !== jQuery(document.body).get(0)) { - try { - var css = { - position: this.maskConfig.position || "absolute", - left: this.$target.offset().left, - top: this.$target.offset().top, - width: this.$target.outerWidth(), - height: this.$target.outerHeight() - }; - this.$mask.css(css); - } catch (e) {} - } - return this; - }; - - this.pullRequest = function () { - console.log("test pullRequest01"); - console.log("test pullRequest02"); - }; - - // 클래스 생성자 - this.main = function () { - - UI.mask_instance = UI.mask_instance || []; - UI.mask_instance.push(this); - - if (arguments && U.isObject(arguments[0])) { - this.setConfig(arguments[0]); - } - }.apply(this, arguments); - }; - }()); - MASK = ax5.ui.mask; -})(); -// ax5.ui.mask.tmpl -(function () { - - var MASK = ax5.ui.mask; - - var defaultMask = function defaultMask(columnKeys) { - return '\n \n \n \n \n {{{body}}}\n \n \n \n '; - }; - - MASK.tmpl = { - "defaultMask": defaultMask, - - get: function get(tmplName, data, columnKeys) { - return ax5.mustache.render(MASK.tmpl[tmplName].call(this, columnKeys), data); - } - }; -})(); \ No newline at end of file diff --git a/_src/plugins/ax5ui-mask/ax5mask.min.js b/_src/plugins/ax5ui-mask/ax5mask.min.js deleted file mode 100644 index d98d585..0000000 --- a/_src/plugins/ax5ui-mask/ax5mask.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";!function(){var t=ax5.ui,s=ax5.util,e=void 0;t.addClass({className:"mask"},function(){return function(){var i=this,n=void 0;this.instanceId=ax5.getGuid(),this.config={theme:"",target:jQuery(document.body).get(0),animateTime:250},this.maskContent="",this.status="off",n=this.config;var a=function(t,s){return t&&t.onStateChanged?t.onStateChanged.call(s,s):this.onStateChanged&&this.onStateChanged.call(s,s),t=null,s=null,!0},o=function(t){return"undefined"==typeof t.templateName&&(t.templateName="defaultMask"),e.tmpl.get.call(this,t.templateName,t)},l=function(t){this.maskContent=t};this.init=function(){this.onStateChanged=n.onStateChanged,this.onClick=n.onClick,this.config.content&&l.call(this,this.config.content)},this.open=function(t){"on"===this.status&&this.close(),t&&t.content&&l.call(this,t.content),t&&"undefined"==typeof t.templateName&&(t.templateName="defaultMask"),i.maskConfig=jQuery.extend(!0,{},this.config,t);var s=i.maskConfig,e=s.target,n=jQuery(e),u="ax-mask-"+ax5.getGuid(),h=void 0,c={},f={},m=s.templateName,d=o({theme:s.theme,maskId:u,body:this.maskContent,templateName:m});return jQuery(document.body).append(d),e&&e!==jQuery(document.body).get(0)&&(c={position:s.position||"absolute",left:n.offset().left,top:n.offset().top,width:n.outerWidth(),height:n.outerHeight()},n.addClass("ax-masking"),jQuery(window).on("resize.ax5mask-"+this.instanceId,function(t){this.align()}.bind(this))),"undefined"!=typeof i.maskConfig.zIndex&&(c["z-index"]=i.maskConfig.zIndex),this.$mask=h=jQuery("#"+u),this.$target=n,this.status="on",h.css(c),s.onClick&&h.on("click",function(t){f={self:i,state:"open",type:"click"},i.maskConfig.onClick.call(f,f)}),a.call(this,null,{self:this,state:"open"}),t=null,s=null,e=null,n=null,u=null,h=null,c=null,f=null,m=null,d=null,this},this.close=function(t){if(this.$mask){var s=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};t?setTimeout(function(){s.call(this)}.bind(this),t):s.call(this)}return this},this.fadeOut=function(){if(this.$mask){var t=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};this.$mask.addClass("fade-out"),setTimeout(function(){t.call(this)}.bind(this),n.animateTime)}return this},this.align=function(){if(this.maskConfig&&this.maskConfig.target&&this.maskConfig.target!==jQuery(document.body).get(0))try{var t={position:this.maskConfig.position||"absolute",left:this.$target.offset().left,top:this.$target.offset().top,width:this.$target.outerWidth(),height:this.$target.outerHeight()};this.$mask.css(t)}catch(t){}return this},this.pullRequest=function(){console.log("test pullRequest01"),console.log("test pullRequest02")},this.main=function(){t.mask_instance=t.mask_instance||[],t.mask_instance.push(this),arguments&&s.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),e=ax5.ui.mask}(),function(){var t=ax5.ui.mask,s=function(t){return'\n \n \n \n \n {{{body}}}\n \n \n \n '};t.tmpl={defaultMask:s,get:function(s,e,i){return ax5.mustache.render(t.tmpl[s].call(this,i),e)}}}(); -//# sourceMappingURL=ax5mask.min.js.map diff --git a/_src/plugins/ax5ui-mask/ax5mask.min.js.map b/_src/plugins/ax5ui-mask/ax5mask.min.js.map deleted file mode 100644 index e153fe9..0000000 --- a/_src/plugins/ax5ui-mask/ax5mask.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["ax5mask.js","ax5mask-tmpl.js"],"names":["UI","ax5","ui","U","util","MASK","addClass","className","self","this","cfg","instanceId","getGuid","config","theme","target","jQuery","document","body","get","animateTime","maskContent","status","onStateChanged","opts","that","call","getBodyTmpl","data","templateName","tmpl","setBody","content","init","onClick","open","options","close","maskConfig","extend","_cfg","$target","maskId","$mask","css","append","position","left","offset","top","width","outerWidth","height","outerHeight","window","on","_$target","align","bind","zIndex","e","state","type","_delay","_close","remove","removeClass","off","setTimeout","fadeOut","pullRequest","console","log","main","mask_instance","push","arguments","isObject","setConfig","apply","mask","defaultMask","columnKeys","tmplName","mustache","render"],"mappings":"cACA,WAEA,GAAAA,GAAAC,IAAAC,GACAC,EAAAF,IAAAG,KACAC,EAAAA,MAEAL,GAAAM,UACAC,UAAA,QACA,WA+BA,MAAA,YACA,GAAAC,GAAAC,KACAC,EAAAA,MAEAD,MAAAE,WAAAV,IAAAW,UACAH,KAAAI,QACAC,MAAA,GACAC,OAAAC,OAAAC,SAAAC,MAAAC,IAAA,GACAC,YAAA,KAEAX,KAAAY,YAAA,GACAZ,KAAAa,OAAA,MAEAZ,EAAAD,KAAAI,MAEA,IAAAU,GAAA,SAAAC,EAAAC,GAUA,MATAD,IAAAA,EAAAD,eACAC,EAAAD,eAAAG,KAAAD,EAAAA,GAEAhB,KAAAc,gBACAd,KAAAc,eAAAG,KAAAD,EAAAA,GAGAD,EAAA,KACAC,EAAA,MACA,GAEAE,EAAA,SAAAC,GAEA,MADA,mBAAAA,GAAAC,eAAAD,EAAAC,aAAA,eACAxB,EAAAyB,KAAAX,IAAAO,KAAAjB,KAAAmB,EAAAC,aAAAD,IAEAG,EAAA,SAAAC,GACAvB,KAAAY,YAAAW,EAiBAvB,MAAAwB,KAAA,WAEAxB,KAAAc,eAAAb,EAAAa,eACAd,KAAAyB,QAAAxB,EAAAwB,QACAzB,KAAAI,OAAAmB,SAAAD,EAAAL,KAAAjB,KAAAA,KAAAI,OAAAmB,UAoDAvB,KAAA0B,KAAA,SAAAC,GAEA,OAAA3B,KAAAa,QAAAb,KAAA4B,QACAD,GAAAA,EAAAJ,SAAAD,EAAAL,KAAAjB,KAAA2B,EAAAJ,SAC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SAAAD,UAAA,KACAnE,KAAAqE,UAAAF,UAAA,KAEAG,MAAAtE,KAAAmE,gBAGAvE,EAAAJ,IAAAC,GAAA8E,QC1UA,WAEA,GAAA3E,GAAAJ,IAAAC,GAAA8E,KAEAC,EAAA,SAAAC,GACA,MAAA,iUAYA7E,GAAAyB,MACAmD,YAAAA,EAEA9D,IAAA,SAAAgE,EAAAvD,EAAAsD,GACA,MAAAjF,KAAAmF,SAAAC,OAAAhF,EAAAyB,KAAAqD,GAAAzD,KAAAjB,KAAAyE,GAAAtD","file":"ax5mask.min.js","sourcesContent":["// ax5.ui.mask\n(function () {\n\n const UI = ax5.ui;\n const U = ax5.util;\n let MASK;\n\n UI.addClass({\n className: \"mask\"\n }, (function () {\n /**\n * @class ax5mask\n * @classdesc\n * @author tom@axisj.com\n * @example\n * ```js\n * var customMask = function customMask() {\n * var cTmpl = '' +\n * '' +\n * ' ' +\n * ' ' +\n * ' {{{body}}}' +\n * ' ' +\n * '';\n * return cTmpl;\n * };\n * ax5.ui.mask.tmpl.customMask = customMask;\n *\n * var mask = new ax5.ui.mask();\n *\n * mask.open({\n * templateName: 'customMask',\n * content: 'custom MASK on target',\n * target: $(\"#user-content\").get(0),\n * onClick: function(){\n * console.log(this);\n * }\n * });\n * ```\n */\n return function () {\n let self = this,\n cfg;\n\n this.instanceId = ax5.getGuid();\n this.config = {\n theme: '',\n target: jQuery(document.body).get(0),\n animateTime: 250\n };\n this.maskContent = '';\n this.status = \"off\";\n\n cfg = this.config;\n\n const onStateChanged = function (opts, that) {\n if (opts && opts.onStateChanged) {\n opts.onStateChanged.call(that, that);\n }\n else if (this.onStateChanged) {\n this.onStateChanged.call(that, that);\n }\n\n opts = null;\n that = null;\n return true;\n };\n const getBodyTmpl = function (data) {\n if (typeof data.templateName === \"undefined\") data.templateName = \"defaultMask\";\n return MASK.tmpl.get.call(this, data.templateName, data);\n };\n const setBody = function (content) {\n this.maskContent = content;\n };\n\n /**\n * Preferences of Mask UI\n * @method ax5mask.setConfig\n * @param {Object} config - 클래스 속성값\n * @returns {ax5mask}\n * @example\n * ```\n * setConfig({\n * target : {Element|AX5 nodelist}, // 마스크 처리할 대상\n * content : {String}, // 마스크안에 들어가는 내용물\n * onStateChanged: function(){} // 마스크 상태변경 시 호출되는 함수 this.type으로 예외처리 가능\n * }\n * ```\n */\n this.init = function () {\n // after setConfig();\n this.onStateChanged = cfg.onStateChanged;\n this.onClick = cfg.onClick;\n if (this.config.content) setBody.call(this, this.config.content);\n };\n\n /**\n * open mask\n * target 을 주지 않으면 기본적으로 body 에 마스크가 적용되고 원하는 타겟을 지정해서 마스크를 씌울 수 있습니다.\n * 기본 정의된 마스크 외에 사용자가 템플릿을 정의해서 마스크를 사용 가능합니다.\n * @method ax5mask.open\n * @param {Object} config\n * @param {String} config\n * @returns {ax5mask}\n * @example\n * ```js\n * my_mask.open({\n * target: document.body,\n * content: \"Loading..\",\n * onStateChanged: function () {\n *\n * }\n * });\n *\n * my_mask.open({\n * target: $(\"#mask-target\").get(0), // dom Element\n * content: \"Loading..\",\n * onStateChanged: function () {\n *\n * }\n * });\n *\n *\n * var customMask = function customMask() {\n * var cTmpl = '' +\n * '' +\n * ' ' +\n * ' ' +\n * ' {{{body}}}' +\n * ' ' +\n * '';\n * return cTmpl;\n * };\n * ax5.ui.mask.tmpl.customMask = customMask;\n *\n * my_mask.open({\n * target: $(\"#mask-target\").get(0), // dom Element\n * content: \"Loading..\",\n * \n * onStateChanged: function () {\n *\n * }\n * });\n * ```\n */\n this.open = function (options) {\n\n if (this.status === \"on\") this.close();\n if (options && options.content) setBody.call(this, options.content);\n if (options && typeof options.templateName === \"undefined\") options.templateName = \"defaultMask\";\n self.maskConfig = jQuery.extend(true, {}, this.config, options);\n\n let _cfg = self.maskConfig,\n target = _cfg.target,\n $target = jQuery(target),\n maskId = 'ax-mask-' + ax5.getGuid(),\n $mask,\n css = {},\n that = {},\n templateName = _cfg.templateName,\n body = getBodyTmpl({\n theme: _cfg.theme,\n maskId: maskId,\n body: this.maskContent,\n templateName: templateName\n });\n\n jQuery(document.body).append(body);\n\n // 마스크의 타겟이 html body 가 아니라면\n if (target && target !== jQuery(document.body).get(0)) {\n css = {\n position: _cfg.position || \"absolute\",\n left: $target.offset().left,\n top: $target.offset().top,\n width: $target.outerWidth(),\n height: $target.outerHeight()\n };\n\n\n $target.addClass(\"ax-masking\");\n\n // 마스크의 타겟이 html body가 아닌경우 window resize 이벤트를 추적하여 엘리먼트 마스크의 CSS 속성 변경\n jQuery(window).on(\"resize.ax5mask-\" + this.instanceId, (function (_$target) {\n this.align();\n }).bind(this));\n }\n\n if (typeof self.maskConfig.zIndex !== \"undefined\") {\n css[\"z-index\"] = self.maskConfig.zIndex;\n }\n\n this.$mask = $mask = jQuery(\"#\" + maskId);\n this.$target = $target;\n this.status = \"on\";\n $mask.css(css);\n\n if (_cfg.onClick) {\n $mask.on(\"click\", function (e) {\n that = {\n self: self,\n state: \"open\",\n type: \"click\"\n };\n self.maskConfig.onClick.call(that, that);\n });\n }\n\n onStateChanged.call(this, null, {\n self: this,\n state: \"open\"\n });\n\n options = null;\n _cfg = null;\n target = null;\n $target = null;\n maskId = null;\n $mask = null;\n css = null;\n that = null;\n templateName = null;\n body = null;\n\n return this;\n };\n\n /**\n * close mask\n * @method ax5mask.close\n * @param {Number} [_delay=0]\n * @returns {ax5mask}\n * @example\n * ```\n * my_mask.close();\n * ```\n */\n this.close = function (_delay) {\n if (this.$mask) {\n let _close = function () {\n this.status = \"off\";\n this.$mask.remove();\n this.$target.removeClass(\"ax-masking\");\n\n onStateChanged.call(this, null, {\n self: this,\n state: \"close\"\n });\n\n jQuery(window).off(\"resize.ax5mask-\" + this.instanceId);\n };\n\n if (_delay) {\n setTimeout((function () {\n _close.call(this);\n }).bind(this), _delay);\n } else {\n _close.call(this);\n }\n }\n return this;\n };\n\n /**\n * @method ax5mask.fadeOut\n * @returns {ax5mask}\n */\n this.fadeOut = function () {\n if (this.$mask) {\n let _close = function () {\n this.status = \"off\";\n this.$mask.remove();\n this.$target.removeClass(\"ax-masking\");\n\n onStateChanged.call(this, null, {\n self: this,\n state: \"close\"\n });\n\n jQuery(window).off(\"resize.ax5mask-\" + this.instanceId);\n };\n\n\n this.$mask.addClass(\"fade-out\");\n setTimeout((function () {\n _close.call(this);\n }).bind(this), cfg.animateTime);\n }\n return this;\n };\n\n /**\n * @method ax5mask.align\n * @returns {ax5mask}\n */\n this.align = function () {\n if (this.maskConfig && this.maskConfig.target && this.maskConfig.target !== jQuery(document.body).get(0)) {\n try {\n var css = {\n position: this.maskConfig.position || \"absolute\",\n left: this.$target.offset().left,\n top: this.$target.offset().top,\n width: this.$target.outerWidth(),\n height: this.$target.outerHeight()\n };\n this.$mask.css(css);\n } catch (e) {\n\n }\n }\n return this;\n };\n\n\n this.pullRequest = function () {\n console.log(\"test pullRequest01\");\n console.log(\"test pullRequest02\");\n };\n\n // 클래스 생성자\n this.main = (function () {\n\n UI.mask_instance = UI.mask_instance || [];\n UI.mask_instance.push(this);\n\n if (arguments && U.isObject(arguments[0])) {\n this.setConfig(arguments[0]);\n }\n }).apply(this, arguments);\n };\n })());\n MASK = ax5.ui.mask;\n})();","// ax5.ui.mask.tmpl\n(function () {\n\n var MASK = ax5.ui.mask;\n\n var defaultMask = function(columnKeys) {\n return `\n \n \n \n \n {{{body}}}\n \n \n \n `;\n };\n\n MASK.tmpl = {\n \"defaultMask\": defaultMask,\n\n get: function (tmplName, data, columnKeys) {\n return ax5.mustache.render(MASK.tmpl[tmplName].call(this, columnKeys), data);\n }\n };\n\n})();"]} \ No newline at end of file diff --git a/_src/plugins/ax5ui-modal/ax5modal.js b/_src/plugins/ax5ui-modal/ax5modal.js deleted file mode 100644 index af9dacb..0000000 --- a/_src/plugins/ax5ui-modal/ax5modal.js +++ /dev/null @@ -1,1165 +0,0 @@ -"use strict"; - -/* - * Copyright (c) 2016. tom@axisj.com - * - github.com/thomasjang - * - www.axisj.com - */ - -// ax5.ui.modal -(function () { - var UI = ax5.ui; - var U = ax5.util; - var MODAL = void 0; - - UI.addClass({ - className: "modal" - }, function () { - /** - * @class ax5modal - * @alias ax5.ui.modal - * @author tom@axisj.com - */ - return function () { - var self = this, - cfg = void 0, - ENM = { - mousedown: ax5.info.supportTouch ? "touchstart" : "mousedown", - mousemove: ax5.info.supportTouch ? "touchmove" : "mousemove", - mouseup: ax5.info.supportTouch ? "touchend" : "mouseup" - }, - getMousePosition = function getMousePosition(e) { - var mouseObj = e; - if ("changedTouches" in e && e.changedTouches) { - mouseObj = e.changedTouches[0]; - } - return { - clientX: mouseObj.clientX, - clientY: mouseObj.clientY - }; - }; - - this.instanceId = ax5.getGuid(); - this.config = { - id: "ax5-modal-" + this.instanceId, - position: { - left: "center", - top: "middle", - margin: 10 - }, - minimizePosition: "bottom-right", - clickEventName: "ontouchstart" in document.documentElement ? "touchstart" : "click", - theme: "default", - width: 300, - height: 400, - closeToEsc: true, - disableDrag: false, - disableResize: false, - animateTime: 250, - iframe: false - }; - this.activeModal = null; - this.watingModal = false; - this.$ = {}; // UI inside of the jQuery object store - - cfg = this.config; // extended config copy cfg - - var onStateChanged = function onStateChanged(opts, that) { - var eventProcessor = { - resize: function resize(that) { - if (opts && opts.onResize) { - opts.onResize.call(that, that); - } else if (this.onResize) { - this.onResize.call(that, that); - } - }, - move: function move() {} - }; - if (that.state in eventProcessor) { - eventProcessor[that.state].call(this, that); - } - - if (opts && opts.onStateChanged) { - opts.onStateChanged.call(that, that); - } else if (this.onStateChanged) { - this.onStateChanged.call(that, that); - } - return true; - }, - getContent = function getContent(modalId, opts) { - var data = { - modalId: modalId, - theme: opts.theme, - header: opts.header, - fullScreen: opts.fullScreen ? "fullscreen" : "", - styles: "", - iframe: opts.iframe, - iframeLoadingMsg: opts.iframeLoadingMsg, - disableResize: opts.disableResize - }; - - if (opts.zIndex) { - data.styles += "z-index:" + opts.zIndex + ";"; - } - if (opts.absolute) { - data.styles += "position:absolute;"; - } - - if (data.iframe && typeof data.iframe.param === "string") { - data.iframe.param = ax5.util.param(data.iframe.param); - } - - return MODAL.tmpl.get.call(this, "content", data, {}); - }, - open = function open(opts, callback) { - var that = void 0; - jQuery(document.body).append(getContent.call(this, opts.id, opts)); - - this.activeModal = jQuery("#" + opts.id); - // 파트수집 - this.$ = { - root: this.activeModal, - header: this.activeModal.find('[data-modal-els="header"]'), - body: this.activeModal.find('[data-modal-els="body"]') - }; - - if (opts.iframe) { - this.$["iframe-wrap"] = this.activeModal.find('[data-modal-els="iframe-wrap"]'); - this.$["iframe"] = this.activeModal.find('[data-modal-els="iframe"]'); - this.$["iframe-form"] = this.activeModal.find('[data-modal-els="iframe-form"]'); - this.$["iframe-loading"] = this.activeModal.find('[data-modal-els="iframe-loading"]'); - } else { - this.$["body-frame"] = this.activeModal.find('[data-modal-els="body-frame"]'); - } - - //- position 정렬 - this.align(); - - that = { - self: this, - id: opts.id, - theme: opts.theme, - width: opts.width, - height: opts.height, - state: "open", - $: this.$ - }; - - if (opts.iframe) { - this.$["iframe-wrap"].css({ height: opts.height }); - this.$["iframe"].css({ height: opts.height }); - - // iframe content load - this.$["iframe-form"].attr({ method: opts.iframe.method }); - this.$["iframe-form"].attr({ target: opts.id + "-frame" }); - this.$["iframe-form"].attr({ action: opts.iframe.url }); - this.$["iframe"].on("load", function () { - that.state = "load"; - if (opts.iframeLoadingMsg) { - this.$["iframe-loading"].hide(); - } - onStateChanged.call(this, opts, that); - }.bind(this)); - if (!opts.iframeLoadingMsg) { - this.$["iframe"].show(); - } - this.$["iframe-form"].submit(); - } - - if (callback) callback.call(that, that); - - if (!this.watingModal) { - onStateChanged.call(this, opts, that); - } - - // bind key event - if (opts.closeToEsc) { - jQuery(window).bind("keydown.ax-modal", function (e) { - onkeyup.call(this, e || window.event); - }.bind(this)); - } - - jQuery(window).bind("resize.ax-modal", function (e) { - this.align(null, e || window.event); - }.bind(this)); - - this.$.header.off(ENM["mousedown"]).off("dragstart").on(ENM["mousedown"], function (e) { - /// 이벤트 필터링 추가 : 버튼엘리먼트로 부터 발생된 이벤트이면 moveModal 시작하지 않도록 필터링 - var isButton = U.findParentNode(e.target, function (_target) { - if (_target.getAttribute("data-modal-header-btn")) { - return true; - } - }); - - if (!opts.isFullScreen && !isButton && opts.disableDrag != true) { - self.mousePosition = getMousePosition(e); - moveModal.on.call(self); - } - if (isButton) { - btnOnClick.call(self, e || window.event, opts); - } - }).on("dragstart", function (e) { - U.stopEvent(e.originalEvent); - return false; - }); - - this.activeModal.off(ENM["mousedown"]).off("dragstart").on(ENM["mousedown"], "[data-ax5modal-resizer]", function (e) { - if (opts.disableDrag || opts.isFullScreen) return false; - self.mousePosition = getMousePosition(e); - resizeModal.on.call(self, this.getAttribute("data-ax5modal-resizer")); - }).on("dragstart", function (e) { - U.stopEvent(e.originalEvent); - return false; - }); - }, - btnOnClick = function btnOnClick(e, opts, callback, target, k) { - var that = void 0; - if (e.srcElement) e.target = e.srcElement; - - target = U.findParentNode(e.target, function (target) { - if (target.getAttribute("data-modal-header-btn")) { - return true; - } - }); - - if (target) { - k = target.getAttribute("data-modal-header-btn"); - - that = { - self: this, - key: k, - value: opts.header.btns[k], - dialogId: opts.id, - btnTarget: target - }; - - if (opts.header.btns[k].onClick) { - opts.header.btns[k].onClick.call(that, k); - } - } - - that = null; - opts = null; - callback = null; - target = null; - k = null; - }, - onkeyup = function onkeyup(e) { - if (e.keyCode == ax5.info.eventKeys.ESC) { - this.close(); - } - }, - alignProcessor = { - "top-left": function topLeft() { - this.align({ left: "left", top: "top" }); - }, - "top-right": function topRight() { - this.align({ left: "right", top: "top" }); - }, - "bottom-left": function bottomLeft() { - this.align({ left: "left", top: "bottom" }); - }, - "bottom-right": function bottomRight() { - this.align({ left: "right", top: "bottom" }); - }, - "center-middle": function centerMiddle() { - this.align({ left: "center", top: "middle" }); - } - }, - moveModal = { - on: function on() { - var modalZIndex = this.activeModal.css("z-index"), - modalOffset = this.activeModal.offset(), - modalBox = { - width: this.activeModal.outerWidth(), - height: this.activeModal.outerHeight() - }, - windowBox = { - width: jQuery(window).width(), - height: jQuery(window).height(), - scrollLeft: jQuery(document).scrollLeft(), - scrollTop: jQuery(document).scrollTop() - }, - getResizerPosition = function getResizerPosition(e) { - self.__dx = e.clientX - self.mousePosition.clientX; - self.__dy = e.clientY - self.mousePosition.clientY; - - /* - if (minX > modalOffset.left + self.__dx) { - self.__dx = -modalOffset.left; - } else if (maxX < modalOffset.left + self.__dx) { - self.__dx = maxX - modalOffset.left; - } - if (minY > modalOffset.top + self.__dy) { - self.__dy = -modalOffset.top; - } else if (maxY < modalOffset.top + self.__dy) { - self.__dy = maxY - modalOffset.top; - } - */ - - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top + self.__dy - }; - }; - - var minX = 0, - maxX = windowBox.width - modalBox.width, - minY = 0, - maxY = windowBox.height - modalBox.height; - - self.__dx = 0; // 변화량 X - self.__dy = 0; // 변화량 Y - - // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV - self.resizerBg = jQuery(''); - self.resizer = jQuery(''); - self.resizerBg.css({ zIndex: modalZIndex }); - self.resizer.css({ - left: modalOffset.left, - top: modalOffset.top, - width: modalBox.width, - height: modalBox.height, - zIndex: modalZIndex + 1 - }); - - jQuery(document.body).append(self.resizerBg).append(self.resizer); - - self.activeModal.addClass("draged"); - - jQuery(document.body).on(ENM["mousemove"] + ".ax5modal-move-" + this.instanceId, function (e) { - self.resizer.css(getResizerPosition(e)); - }).on(ENM["mouseup"] + ".ax5modal-move-" + this.instanceId, function (e) { - moveModal.off.call(self); - }).on("mouseleave.ax5modal-move-" + this.instanceId, function (e) { - moveModal.off.call(self); - }); - - jQuery(document.body).attr("unselectable", "on").css("user-select", "none").on("selectstart", false); - }, - off: function off() { - var setModalPosition = function setModalPosition() { - var box = this.resizer.offset(); - if (!this.modalConfig.absolute) { - box.left -= jQuery(document).scrollLeft(); - box.top -= jQuery(document).scrollTop(); - } - this.activeModal.css(box); - this.modalConfig.left = box.left; - this.modalConfig.top = box.top; - - box = null; - }; - - this.activeModal.removeClass("draged"); - setModalPosition.call(this); - - this.resizer.remove(); - this.resizer = null; - this.resizerBg.remove(); - this.resizerBg = null; - //this.align(); - - jQuery(document.body).off(ENM["mousemove"] + ".ax5modal-move-" + this.instanceId).off(ENM["mouseup"] + ".ax5modal-move-" + this.instanceId).off("mouseleave.ax5modal-move-" + this.instanceId); - - jQuery(document.body).removeAttr("unselectable").css("user-select", "auto").off("selectstart"); - - onStateChanged.call(this, self.modalConfig, { - self: this, - state: "move" - }); - } - }, - resizeModal = { - on: function on(resizerType) { - var modalZIndex = this.activeModal.css("z-index"), - modalOffset = this.activeModal.offset(), - modalBox = { - width: this.activeModal.outerWidth(), - height: this.activeModal.outerHeight() - }, - windowBox = { - width: jQuery(window).width(), - height: jQuery(window).height(), - scrollLeft: jQuery(document).scrollLeft(), - scrollTop: jQuery(document).scrollTop() - }, - resizerProcessor = { - top: function top(e) { - if (minHeight > modalBox.height - self.__dy) { - self.__dy = modalBox.height - minHeight; - } - - if (e.shiftKey) { - if (minHeight > modalBox.height - self.__dy * 2) { - self.__dy = (modalBox.height - minHeight) / 2; - } - - return { - left: modalOffset.left, - top: modalOffset.top + self.__dy, - width: modalBox.width, - height: modalBox.height - self.__dy * 2 - }; - } else if (e.altKey) { - if (minHeight > modalBox.height - self.__dy * 2) { - self.__dy = (modalBox.height - minHeight) / 2; - } - - return { - left: modalOffset.left + self.__dy, - top: modalOffset.top + self.__dy, - width: modalBox.width - self.__dy * 2, - height: modalBox.height - self.__dy * 2 - }; - } else { - return { - left: modalOffset.left, - top: modalOffset.top + self.__dy, - width: modalBox.width, - height: modalBox.height - self.__dy - }; - } - }, - bottom: function bottom(e) { - if (minHeight > modalBox.height + self.__dy) { - self.__dy = -modalBox.height + minHeight; - } - - if (e.shiftKey) { - if (minHeight > modalBox.height + self.__dy * 2) { - self.__dy = (-modalBox.height + minHeight) / 2; - } - - return { - left: modalOffset.left, - top: modalOffset.top - self.__dy, - width: modalBox.width, - height: modalBox.height + self.__dy * 2 - }; - } else if (e.altKey) { - if (minHeight > modalBox.height + self.__dy * 2) { - self.__dy = (-modalBox.height + minHeight) / 2; - } - - return { - left: modalOffset.left - self.__dy, - top: modalOffset.top - self.__dy, - width: modalBox.width + self.__dy * 2, - height: modalBox.height + self.__dy * 2 - }; - } else { - return { - left: modalOffset.left, - top: modalOffset.top, - width: modalBox.width, - height: modalBox.height + self.__dy - }; - } - }, - left: function left(e) { - if (minWidth > modalBox.width - self.__dx) { - self.__dx = modalBox.width - minWidth; - } - - if (e.shiftKey) { - if (minWidth > modalBox.width - self.__dx * 2) { - self.__dx = (modalBox.width - minWidth) / 2; - } - - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top, - width: modalBox.width - self.__dx * 2, - height: modalBox.height - }; - } else if (e.altKey) { - if (minWidth > modalBox.width - self.__dx * 2) { - self.__dx = (modalBox.width - minWidth) / 2; - } - - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top + self.__dx, - width: modalBox.width - self.__dx * 2, - height: modalBox.height - self.__dx * 2 - }; - } else { - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top, - width: modalBox.width - self.__dx, - height: modalBox.height - }; - } - }, - right: function right(e) { - if (minWidth > modalBox.width + self.__dx) { - self.__dx = -modalBox.width + minWidth; - } - - if (e.shiftKey) { - if (minWidth > modalBox.width + self.__dx * 2) { - self.__dx = (-modalBox.width + minWidth) / 2; - } - - return { - left: modalOffset.left - self.__dx, - top: modalOffset.top, - width: modalBox.width + self.__dx * 2, - height: modalBox.height - }; - } else if (e.altKey) { - if (minWidth > modalBox.width + self.__dx * 2) { - self.__dx = (-modalBox.width + minWidth) / 2; - } - - return { - left: modalOffset.left - self.__dx, - top: modalOffset.top - self.__dx, - width: modalBox.width + self.__dx * 2, - height: modalBox.height + self.__dx * 2 - }; - } else { - return { - left: modalOffset.left, - top: modalOffset.top, - width: modalBox.width + self.__dx, - height: modalBox.height - }; - } - }, - "top-left": function topLeft(e) { - if (minWidth > modalBox.width - self.__dx) { - self.__dx = modalBox.width - minWidth; - } - - if (minHeight > modalBox.height - self.__dy) { - self.__dy = modalBox.height - minHeight; - } - - if (e.shiftKey || e.altKey) { - if (minHeight > modalBox.height - self.__dy * 2) { - self.__dy = (modalBox.height - minHeight) / 2; - } - if (minWidth > modalBox.width - self.__dx * 2) { - self.__dx = (modalBox.width - minWidth) / 2; - } - - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top + self.__dy, - width: modalBox.width - self.__dx * 2, - height: modalBox.height - self.__dy * 2 - }; - } else { - if (minHeight > modalBox.height - self.__dy * 2) { - self.__dy = (modalBox.height - minHeight) / 2; - } - if (minWidth > modalBox.width - self.__dx * 2) { - self.__dx = (modalBox.width - minWidth) / 2; - } - - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top + self.__dy, - width: modalBox.width - self.__dx, - height: modalBox.height - self.__dy - }; - } - }, - "top-right": function topRight(e) { - if (minWidth > modalBox.width + self.__dx) { - self.__dx = -modalBox.width + minWidth; - } - - if (minHeight > modalBox.height - self.__dy) { - self.__dy = modalBox.height - minHeight; - } - - if (e.shiftKey || e.altKey) { - if (minHeight > modalBox.height - self.__dy * 2) { - self.__dy = (modalBox.height - minHeight) / 2; - } - if (minWidth > modalBox.width + self.__dx * 2) { - self.__dx = (-modalBox.width + minWidth) / 2; - } - - return { - left: modalOffset.left - self.__dx, - top: modalOffset.top + self.__dy, - width: modalBox.width + self.__dx * 2, - height: modalBox.height - self.__dy * 2 - }; - } else { - return { - left: modalOffset.left, - top: modalOffset.top + self.__dy, - width: modalBox.width + self.__dx, - height: modalBox.height - self.__dy - }; - } - }, - "bottom-left": function bottomLeft(e) { - if (minWidth > modalBox.width - self.__dx) { - self.__dx = modalBox.width - minWidth; - } - - if (minHeight > modalBox.height + self.__dy) { - self.__dy = -modalBox.height + minHeight; - } - - if (e.shiftKey || e.altKey) { - if (minWidth > modalBox.width - self.__dx * 2) { - self.__dx = (modalBox.width - minWidth) / 2; - } - if (minHeight > modalBox.height + self.__dy * 2) { - self.__dy = (-modalBox.height + minHeight) / 2; - } - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top - self.__dy, - width: modalBox.width - self.__dx * 2, - height: modalBox.height + self.__dy * 2 - }; - } else { - return { - left: modalOffset.left + self.__dx, - top: modalOffset.top, - width: modalBox.width - self.__dx, - height: modalBox.height + self.__dy - }; - } - }, - "bottom-right": function bottomRight(e) { - if (minWidth > modalBox.width + self.__dx) { - self.__dx = -modalBox.width + minWidth; - } - - if (minHeight > modalBox.height + self.__dy) { - self.__dy = -modalBox.height + minHeight; - } - - if (e.shiftKey || e.altKey) { - if (minWidth > modalBox.width + self.__dx * 2) { - self.__dx = (-modalBox.width + minWidth) / 2; - } - if (minHeight > modalBox.height + self.__dy * 2) { - self.__dy = (-modalBox.height + minHeight) / 2; - } - return { - left: modalOffset.left - self.__dx, - top: modalOffset.top - self.__dy, - width: modalBox.width + self.__dx * 2, - height: modalBox.height + self.__dy * 2 - }; - } else { - return { - left: modalOffset.left, - top: modalOffset.top, - width: modalBox.width + self.__dx, - height: modalBox.height + self.__dy - }; - } - } - }, - getResizerPosition = function getResizerPosition(e) { - self.__dx = e.clientX - self.mousePosition.clientX; - self.__dy = e.clientY - self.mousePosition.clientY; - - return resizerProcessor[resizerType](e); - }; - - var minWidth = 100, - minHeight = 100; - - var cursorType = { - top: "row-resize", - bottom: "row-resize", - left: "col-resize", - right: "col-resize", - "top-left": "nwse-resize", - "top-right": "nesw-resize", - "bottom-left": "nesw-resize", - "bottom-right": "nwse-resize" - }; - - self.__dx = 0; // 변화량 X - self.__dy = 0; // 변화량 Y - - // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV - self.resizerBg = jQuery(''); - self.resizer = jQuery(''); - self.resizerBg.css({ - zIndex: modalZIndex, - cursor: cursorType[resizerType] - }); - self.resizer.css({ - left: modalOffset.left, - top: modalOffset.top, - width: modalBox.width, - height: modalBox.height, - zIndex: modalZIndex + 1, - cursor: cursorType[resizerType] - }); - jQuery(document.body).append(self.resizerBg).append(self.resizer); - self.activeModal.addClass("draged"); - - jQuery(document.body).bind(ENM["mousemove"] + ".ax5modal-resize-" + this.instanceId, function (e) { - self.resizer.css(getResizerPosition(e)); - }).bind(ENM["mouseup"] + ".ax5modal-resize-" + this.instanceId, function (e) { - resizeModal.off.call(self); - }).bind("mouseleave.ax5modal-resize-" + this.instanceId, function (e) { - resizeModal.off.call(self); - }); - - jQuery(document.body).attr("unselectable", "on").css("user-select", "none").bind("selectstart", false); - }, - off: function off() { - var setModalPosition = function setModalPosition() { - var box = this.resizer.offset(); - jQuery.extend(box, { - width: this.resizer.width(), - height: this.resizer.height() - }); - if (!this.modalConfig.absolute) { - box.left -= jQuery(document).scrollLeft(); - box.top -= jQuery(document).scrollTop(); - } - this.activeModal.css(box); - - this.modalConfig.left = box.left; - this.modalConfig.top = box.top; - this.modalConfig.width = box.width; - this.modalConfig.height = box.height; - this.$["body"].css({ - height: box.height - this.modalConfig.headerHeight - }); - if (this.modalConfig.iframe) { - this.$["iframe-wrap"].css({ - height: box.height - this.modalConfig.headerHeight - }); - this.$["iframe"].css({ - height: box.height - this.modalConfig.headerHeight - }); - } - - box = null; - }; - - this.activeModal.removeClass("draged"); - setModalPosition.call(this); - - this.resizer.remove(); - this.resizer = null; - this.resizerBg.remove(); - this.resizerBg = null; - - onStateChanged.call(this, self.modalConfig, { - self: this, - state: "resize" - }); - - jQuery(document.body).unbind(ENM["mousemove"] + ".ax5modal-resize-" + this.instanceId).unbind(ENM["mouseup"] + ".ax5modal-resize-" + this.instanceId).unbind("mouseleave.ax5modal-resize-" + this.instanceId); - - jQuery(document.body).removeAttr("unselectable").css("user-select", "auto").unbind("selectstart"); - } - }; - - /// private end - - /** - * Preferences of modal UI - * @method ax5modal.setConfig - * @param {Object} config - 클래스 속성값 - * @param {Number} [config.zIndex] - * @param {Object} [config.position] - * @param {String} [config.position.left="center"] - * @param {String} [config.position.top="middle"] - * @param {Number} [config.position.margin=10] - * @param {String} [config.minimizePosition="bottom-right"] - * @param {Number} [config.width=300] - * @param {Number} [config.height=400] - * @param {Boolean} [config.closeToEsc=true] - * @param {Boolean} [config.absolute=false] - * @param {Boolean} [config.disableDrag=false] - * @param {Boolean} [config.disableResize=false] - * @param {Number} [config.animateTime=250] - * @param {Function} [config.fullScreen] - * @param {Function} [config.onStateChanged] - `onStateChanged` function can be defined in setConfig method or new ax5.ui.modal initialization method. However, you can us to define an event function after initialization, if necessary - * @param {Function} [config.onResize] - * @returns {ax5modal} - * @example - * ```js - * var modal = new ax5.ui.modal({ - * iframeLoadingMsg: '', - * header: { - * title: "MODAL TITLE", - * btns: { - * minimize: { - * label: '', onClick: function () { - * modal.minimize(); - * } - * }, - * maximize: { - * label: '', onClick: function () { - * modal.maximize(); - * } - * }, - * close: { - * label: '', onClick: function () { - * modal.close(); - * } - * } - * } - * } - * }); - * - * modal.open({ - * width: 800, - * height: 600, - * fullScreen: function(){ - * return ($(window).width() < 600); - * }, - * iframe: { - * method: "get", - * url: "http://chequer-app:2017/html/login.html", - * param: "callback=modalCallback" - * }, - * onStateChanged: function(){ - * console.log(this); - * }, - * onResize: function(){ - * console.log(this); - * } - * }); - * ``` - */ - //== class body start - this.init = function () { - this.onStateChanged = cfg.onStateChanged; - this.onResize = cfg.onResize; - }; - - /** - * open the modal - * @method ax5modal.open - * @returns {ax5modal} - * @example - * ``` - * modal.open(); - * modal.open({ - * width: 500, - * height: 500 - * }); - * moaal.open({}, function(){ - * console.log(this); - * }); - * ``` - */ - this.open = function (opts, callback, tryCount) { - if (typeof tryCount === "undefined") tryCount = 0; - if (!this.activeModal) { - opts = self.modalConfig = jQuery.extend(true, {}, cfg, opts); - open.call(this, opts, callback); - this.watingModal = false; - } else if (tryCount < 3) { - // 3번까지 재 시도 - this.watingModal = true; - setTimeout(function () { - this.open(opts, callback, tryCount + 1); - }.bind(this), cfg.animateTime); - } else { - // 열기 시도 종료 - this.watingModal = false; - } - return this; - }; - - /** - * close the modal - * @method ax5modal.close - * @param _option - * @returns {ax5modal} - * @example - * ``` - * my_modal.close(); - * my_modal.close({callback: function(){ - * // on close event - * }); - * // close 함수에 callback을 전달하면 정확한 close 타이밍을 캐치할 수 있습니다 - * ``` - */ - - this.close = function (_option) { - var opts = void 0, - that = void 0; - - if (this.activeModal) { - opts = self.modalConfig; - this.activeModal.addClass("destroy"); - jQuery(window).unbind("keydown.ax-modal"); - jQuery(window).unbind("resize.ax-modal"); - - setTimeout(function () { - // 프레임 제거 - if (opts.iframe) { - var $iframe = this.$["iframe"]; // iframe jQuery Object - if ($iframe) { - var iframeObject = $iframe.get(0), - idoc = iframeObject.contentDocument ? iframeObject.contentDocument : iframeObject.contentWindow.document; - - try { - $(idoc.body).children().each(function () { - $(this).remove(); - }); - } catch (e) {} - idoc.innerHTML = ""; - $iframe.attr("src", "about:blank").remove(); - - // force garbarge collection for IE only - window.CollectGarbage && window.CollectGarbage(); - } - } - - this.activeModal.remove(); - this.activeModal = null; - - // 모달 오픈 대기중이면 닫기 상태 전달 안함. - if (!this.watingModal) { - onStateChanged.call(this, opts, { - self: this, - state: "close" - }); - } - - if (_option && U.isFunction(_option.callback)) { - that = { - self: this, - id: opts.id, - theme: opts.theme, - width: opts.width, - height: opts.height, - state: "close", - $: this.$ - }; - _option.callback.call(that, that); - } - }.bind(this), cfg.animateTime); - } - - this.minimized = false; // hoksi - - return this; - }; - - /** - * @method ax5modal.minimize - * @returns {ax5modal} - */ - this.minimize = function () { - return function (minimizePosition) { - if (this.minimized !== true) { - var opts = self.modalConfig; - if (typeof minimizePosition === "undefined") minimizePosition = cfg.minimizePosition; - - this.minimized = true; - this.$.body.hide(); - self.modalConfig.originalHeight = opts.height; - self.modalConfig.height = 0; - alignProcessor[minimizePosition].call(this); - - onStateChanged.call(this, opts, { - self: this, - state: "minimize" - }); - } - - return this; - }; - }(); - - /** - * @method ax5modal.restore - * @returns {ax5modal} - */ - this.restore = function () { - var opts = self.modalConfig; - if (this.minimized) { - this.minimized = false; - this.$.body.show(); - self.modalConfig.height = self.modalConfig.originalHeight; - self.modalConfig.originalHeight = undefined; - - this.align({ left: "center", top: "middle" }); - onStateChanged.call(this, opts, { - self: this, - state: "restore" - }); - } - return this; - }; - - /** - * setCSS - * @method ax5modal.css - * @param {Object} css - - * @returns {ax5modal} - */ - this.css = function (css) { - if (this.activeModal && !self.fullScreen) { - this.activeModal.css(css); - if (typeof css.width !== "undefined") { - self.modalConfig.width = css.width; - } - if (typeof css.height !== "undefined") { - self.modalConfig.height = css.height; - } - - this.align(); - } - return this; - }; - - /** - * @method ax5modal.setModalConfig - * @param _config - * @returns {ax5.ui.ax5modal} - */ - this.setModalConfig = function (_config) { - self.modalConfig = jQuery.extend({}, self.modalConfig, _config); - this.align(); - return this; - }; - - /** - * @method ax5modal.align - * @param position - * @param e - * @returns {ax5modal} - * @example - * ```js - * modal.align({left:"center", top:"middle"}); - * modal.align({left:"left", top:"top", margin: 20}); - * ``` - */ - this.align = function () { - return function (position, e) { - if (!this.activeModal) return this; - - var opts = self.modalConfig, - box = { - width: opts.width, - height: opts.height - }; - - var fullScreen = opts.isFullScreen = function (_fullScreen) { - if (typeof _fullScreen === "undefined") { - return false; - } else if (U.isFunction(_fullScreen)) { - return _fullScreen(); - } - }(opts.fullScreen); - - if (fullScreen) { - if (opts.header) this.$.header.show(); - if (opts.header) { - opts.headerHeight = this.$.header.outerHeight(); - box.height += opts.headerHeight; - } else { - opts.headerHeight = 0; - } - box.width = jQuery(window).width(); - box.height = opts.height; - box.left = 0; - box.top = 0; - } else { - if (opts.header) this.$.header.show(); - if (position) { - jQuery.extend(true, opts.position, position); - } - - if (opts.header) { - opts.headerHeight = this.$.header.outerHeight(); - box.height += opts.headerHeight; - } else { - opts.headerHeight = 0; - } - - //- position 정렬 - if (opts.position.left == "left") { - box.left = opts.position.margin || 0; - } else if (opts.position.left == "right") { - // window.innerWidth; - box.left = jQuery(window).width() - box.width - (opts.position.margin || 0); - } else if (opts.position.left == "center") { - box.left = jQuery(window).width() / 2 - box.width / 2; - } else { - box.left = opts.position.left || 0; - } - - if (opts.position.top == "top") { - box.top = opts.position.margin || 0; - } else if (opts.position.top == "bottom") { - box.top = jQuery(window).height() - box.height - (opts.position.margin || 0); - } else if (opts.position.top == "middle") { - box.top = jQuery(window).height() / 2 - box.height / 2; - } else { - box.top = opts.position.top || 0; - } - if (box.left < 0) box.left = 0; - if (box.top < 0) box.top = 0; - - if (opts.absolute) { - box.top += jQuery(window).scrollTop(); - box.left += jQuery(window).scrollLeft(); - } - } - - this.activeModal.css(box); - - this.$["body"].css({ - height: box.height - (opts.headerHeight || 0) - }); - - if (opts.iframe) { - this.$["iframe-wrap"].css({ - height: box.height - opts.headerHeight - }); - this.$["iframe"].css({ height: box.height - opts.headerHeight }); - } else {} - return this; - }; - }(); - - // 클래스 생성자 - this.main = function () { - UI.modal_instance = UI.modal_instance || []; - UI.modal_instance.push(this); - - if (arguments && U.isObject(arguments[0])) { - this.setConfig(arguments[0]); - } - }.apply(this, arguments); - }; - }()); - - MODAL = ax5.ui.modal; -})(); - -// ax5.ui.modal.tmpl -(function () { - var MODAL = ax5.ui.modal; - - var content = function content() { - return " \n \n {{#header}}\n \n {{{title}}}\n {{#btns}}\n \n {{#@each}}\n {{{@value.label}}}\n {{/@each}}\n \n {{/btns}}\n \n {{/header}}\n \n {{#iframe}}\n \n {{{iframeLoadingMsg}}}\n \n \n \n \n {{#param}}\n {{#@each}}\n \n {{/@each}}\n {{/param}}\n \n {{/iframe}}\n {{^iframe}}\n \n {{/iframe}}\n \n {{^disableResize}}\n \n \n \n \n \n \n \n \n {{/disableResize}}\n \n "; - }; - - MODAL.tmpl = { - "content": content, - - get: function get(tmplName, data, columnKeys) { - return ax5.mustache.render(MODAL.tmpl[tmplName].call(this, columnKeys), data); - } - }; -})(); \ No newline at end of file diff --git a/_src/plugins/ax5ui-modal/ax5modal.min.js b/_src/plugins/ax5ui-modal/ax5modal.min.js deleted file mode 100644 index c9f3b2b..0000000 --- a/_src/plugins/ax5ui-modal/ax5modal.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";!function(){var t=ax5.ui,e=ax5.util,i=void 0;t.addClass({className:"modal"},function(){return function(){var o=this,d=void 0,a={mousedown:ax5.info.supportTouch?"touchstart":"mousedown",mousemove:ax5.info.supportTouch?"touchmove":"mousemove",mouseup:ax5.info.supportTouch?"touchend":"mouseup"},h=function(t){var e=t;return"changedTouches"in t&&t.changedTouches&&(e=t.changedTouches[0]),{clientX:e.clientX,clientY:e.clientY}};this.instanceId=ax5.getGuid(),this.config={id:"ax5-modal-"+this.instanceId,position:{left:"center",top:"middle",margin:10},minimizePosition:"bottom-right",clickEventName:"ontouchstart"in document.documentElement?"touchstart":"click",theme:"default",width:300,height:400,closeToEsc:!0,disableDrag:!1,disableResize:!1,animateTime:250,iframe:!1},this.activeModal=null,this.watingModal=!1,this.$={},d=this.config;var n=function(t,e){var i={resize:function(e){t&&t.onResize?t.onResize.call(e,e):this.onResize&&this.onResize.call(e,e)},move:function(){}};return e.state in i&&i[e.state].call(this,e),t&&t.onStateChanged?t.onStateChanged.call(e,e):this.onStateChanged&&this.onStateChanged.call(e,e),!0},s=function(t,e){var o={modalId:t,theme:e.theme,header:e.header,fullScreen:e.fullScreen?"fullscreen":"",styles:"",iframe:e.iframe,iframeLoadingMsg:e.iframeLoadingMsg,disableResize:e.disableResize};return e.zIndex&&(o.styles+="z-index:"+e.zIndex+";"),e.absolute&&(o.styles+="position:absolute;"),o.iframe&&"string"==typeof o.iframe.param&&(o.iframe.param=ax5.util.param(o.iframe.param)),i.tmpl.get.call(this,"content",o,{})},l=function(t,i){var d=void 0;jQuery(document.body).append(s.call(this,t.id,t)),this.activeModal=jQuery("#"+t.id),this.$={root:this.activeModal,header:this.activeModal.find('[data-modal-els="header"]'),body:this.activeModal.find('[data-modal-els="body"]')},t.iframe?(this.$["iframe-wrap"]=this.activeModal.find('[data-modal-els="iframe-wrap"]'),this.$.iframe=this.activeModal.find('[data-modal-els="iframe"]'),this.$["iframe-form"]=this.activeModal.find('[data-modal-els="iframe-form"]'),this.$["iframe-loading"]=this.activeModal.find('[data-modal-els="iframe-loading"]')):this.$["body-frame"]=this.activeModal.find('[data-modal-els="body-frame"]'),this.align(),d={self:this,id:t.id,theme:t.theme,width:t.width,height:t.height,state:"open",$:this.$},t.iframe&&(this.$["iframe-wrap"].css({height:t.height}),this.$.iframe.css({height:t.height}),this.$["iframe-form"].attr({method:t.iframe.method}),this.$["iframe-form"].attr({target:t.id+"-frame"}),this.$["iframe-form"].attr({action:t.iframe.url}),this.$.iframe.on("load",function(){d.state="load",t.iframeLoadingMsg&&this.$["iframe-loading"].hide(),n.call(this,t,d)}.bind(this)),t.iframeLoadingMsg||this.$.iframe.show(),this.$["iframe-form"].submit()),i&&i.call(d,d),this.watingModal||n.call(this,t,d),t.closeToEsc&&jQuery(window).bind("keydown.ax-modal",function(t){f.call(this,t||window.event)}.bind(this)),jQuery(window).bind("resize.ax-modal",function(t){this.align(null,t||window.event)}.bind(this)),this.$.header.off(a.mousedown).off("dragstart").on(a.mousedown,function(i){var d=e.findParentNode(i.target,function(t){if(t.getAttribute("data-modal-header-btn"))return!0});t.isFullScreen||d||1==t.disableDrag||(o.mousePosition=h(i),m.on.call(o)),d&&r.call(o,i||window.event,t)}).on("dragstart",function(t){return e.stopEvent(t.originalEvent),!1}),this.activeModal.off(a.mousedown).off("dragstart").on(a.mousedown,"[data-ax5modal-resizer]",function(e){return!t.disableDrag&&!t.isFullScreen&&(o.mousePosition=h(e),void u.on.call(o,this.getAttribute("data-ax5modal-resizer")))}).on("dragstart",function(t){return e.stopEvent(t.originalEvent),!1})},r=function(t,i,o,d,a){var h=void 0;t.srcElement&&(t.target=t.srcElement),d=e.findParentNode(t.target,function(t){if(t.getAttribute("data-modal-header-btn"))return!0}),d&&(a=d.getAttribute("data-modal-header-btn"),h={self:this,key:a,value:i.header.btns[a],dialogId:i.id,btnTarget:d},i.header.btns[a].onClick&&i.header.btns[a].onClick.call(h,a)),h=null,i=null,o=null,d=null,a=null},f=function(t){t.keyCode==ax5.info.eventKeys.ESC&&this.close()},c={"top-left":function(){this.align({left:"left",top:"top"})},"top-right":function(){this.align({left:"right",top:"top"})},"bottom-left":function(){this.align({left:"left",top:"bottom"})},"bottom-right":function(){this.align({left:"right",top:"bottom"})},"center-middle":function(){this.align({left:"center",top:"middle"})}},m={on:function(){var t=this.activeModal.css("z-index"),e=this.activeModal.offset(),i={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()},d={width:jQuery(window).width(),height:jQuery(window).height(),scrollLeft:jQuery(document).scrollLeft(),scrollTop:jQuery(document).scrollTop()},h=function(t){return o.__dx=t.clientX-o.mousePosition.clientX,o.__dy=t.clientY-o.mousePosition.clientY,{left:e.left+o.__dx,top:e.top+o.__dy}};d.width-i.width,d.height-i.height;o.__dx=0,o.__dy=0,o.resizerBg=jQuery(''),o.resizer=jQuery(''),o.resizerBg.css({zIndex:t}),o.resizer.css({left:e.left,top:e.top,width:i.width,height:i.height,zIndex:t+1}),jQuery(document.body).append(o.resizerBg).append(o.resizer),o.activeModal.addClass("draged"),jQuery(document.body).on(a.mousemove+".ax5modal-move-"+this.instanceId,function(t){o.resizer.css(h(t))}).on(a.mouseup+".ax5modal-move-"+this.instanceId,function(t){m.off.call(o)}).on("mouseleave.ax5modal-move-"+this.instanceId,function(t){m.off.call(o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(){var t=function(){var t=this.resizer.offset();this.modalConfig.absolute||(t.left-=jQuery(document).scrollLeft(),t.top-=jQuery(document).scrollTop()),this.activeModal.css(t),this.modalConfig.left=t.left,this.modalConfig.top=t.top,t=null};this.activeModal.removeClass("draged"),t.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,jQuery(document.body).off(a.mousemove+".ax5modal-move-"+this.instanceId).off(a.mouseup+".ax5modal-move-"+this.instanceId).off("mouseleave.ax5modal-move-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart"),n.call(this,o.modalConfig,{self:this,state:"move"})}},u={on:function(t){var e=this.activeModal.css("z-index"),i=this.activeModal.offset(),d={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()},h=({width:jQuery(window).width(),height:jQuery(window).height(),scrollLeft:jQuery(document).scrollLeft(),scrollTop:jQuery(document).scrollTop()},{top:function(t){return l>d.height-o.__dy&&(o.__dy=d.height-l),t.shiftKey?(l>d.height-2*o.__dy&&(o.__dy=(d.height-l)/2),{left:i.left,top:i.top+o.__dy,width:d.width,height:d.height-2*o.__dy}):t.altKey?(l>d.height-2*o.__dy&&(o.__dy=(d.height-l)/2),{left:i.left+o.__dy,top:i.top+o.__dy,width:d.width-2*o.__dy,height:d.height-2*o.__dy}):{left:i.left,top:i.top+o.__dy,width:d.width,height:d.height-o.__dy}},bottom:function(t){return l>d.height+o.__dy&&(o.__dy=-d.height+l),t.shiftKey?(l>d.height+2*o.__dy&&(o.__dy=(-d.height+l)/2),{left:i.left,top:i.top-o.__dy,width:d.width,height:d.height+2*o.__dy}):t.altKey?(l>d.height+2*o.__dy&&(o.__dy=(-d.height+l)/2),{left:i.left-o.__dy,top:i.top-o.__dy,width:d.width+2*o.__dy,height:d.height+2*o.__dy}):{left:i.left,top:i.top,width:d.width,height:d.height+o.__dy}},left:function(t){return s>d.width-o.__dx&&(o.__dx=d.width-s),t.shiftKey?(s>d.width-2*o.__dx&&(o.__dx=(d.width-s)/2),{left:i.left+o.__dx,top:i.top,width:d.width-2*o.__dx,height:d.height}):t.altKey?(s>d.width-2*o.__dx&&(o.__dx=(d.width-s)/2),{left:i.left+o.__dx,top:i.top+o.__dx,width:d.width-2*o.__dx,height:d.height-2*o.__dx}):{left:i.left+o.__dx,top:i.top,width:d.width-o.__dx,height:d.height}},right:function(t){return s>d.width+o.__dx&&(o.__dx=-d.width+s),t.shiftKey?(s>d.width+2*o.__dx&&(o.__dx=(-d.width+s)/2),{left:i.left-o.__dx,top:i.top,width:d.width+2*o.__dx,height:d.height}):t.altKey?(s>d.width+2*o.__dx&&(o.__dx=(-d.width+s)/2),{left:i.left-o.__dx,top:i.top-o.__dx,width:d.width+2*o.__dx,height:d.height+2*o.__dx}):{left:i.left,top:i.top,width:d.width+o.__dx,height:d.height}},"top-left":function(t){return s>d.width-o.__dx&&(o.__dx=d.width-s),l>d.height-o.__dy&&(o.__dy=d.height-l),t.shiftKey||t.altKey?(l>d.height-2*o.__dy&&(o.__dy=(d.height-l)/2),s>d.width-2*o.__dx&&(o.__dx=(d.width-s)/2),{left:i.left+o.__dx,top:i.top+o.__dy,width:d.width-2*o.__dx,height:d.height-2*o.__dy}):(l>d.height-2*o.__dy&&(o.__dy=(d.height-l)/2),s>d.width-2*o.__dx&&(o.__dx=(d.width-s)/2),{left:i.left+o.__dx,top:i.top+o.__dy,width:d.width-o.__dx,height:d.height-o.__dy})},"top-right":function(t){return s>d.width+o.__dx&&(o.__dx=-d.width+s),l>d.height-o.__dy&&(o.__dy=d.height-l),t.shiftKey||t.altKey?(l>d.height-2*o.__dy&&(o.__dy=(d.height-l)/2),s>d.width+2*o.__dx&&(o.__dx=(-d.width+s)/2),{left:i.left-o.__dx,top:i.top+o.__dy,width:d.width+2*o.__dx,height:d.height-2*o.__dy}):{left:i.left,top:i.top+o.__dy,width:d.width+o.__dx,height:d.height-o.__dy}},"bottom-left":function(t){return s>d.width-o.__dx&&(o.__dx=d.width-s),l>d.height+o.__dy&&(o.__dy=-d.height+l),t.shiftKey||t.altKey?(s>d.width-2*o.__dx&&(o.__dx=(d.width-s)/2),l>d.height+2*o.__dy&&(o.__dy=(-d.height+l)/2),{left:i.left+o.__dx,top:i.top-o.__dy,width:d.width-2*o.__dx,height:d.height+2*o.__dy}):{left:i.left+o.__dx,top:i.top,width:d.width-o.__dx,height:d.height+o.__dy}},"bottom-right":function(t){return s>d.width+o.__dx&&(o.__dx=-d.width+s),l>d.height+o.__dy&&(o.__dy=-d.height+l),t.shiftKey||t.altKey?(s>d.width+2*o.__dx&&(o.__dx=(-d.width+s)/2),l>d.height+2*o.__dy&&(o.__dy=(-d.height+l)/2),{left:i.left-o.__dx,top:i.top-o.__dy,width:d.width+2*o.__dx,height:d.height+2*o.__dy}):{left:i.left,top:i.top,width:d.width+o.__dx,height:d.height+o.__dy}}}),n=function(e){return o.__dx=e.clientX-o.mousePosition.clientX,o.__dy=e.clientY-o.mousePosition.clientY,h[t](e)},s=100,l=100,r={top:"row-resize",bottom:"row-resize",left:"col-resize",right:"col-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"};o.__dx=0,o.__dy=0,o.resizerBg=jQuery(''),o.resizer=jQuery(''),o.resizerBg.css({zIndex:e,cursor:r[t]}),o.resizer.css({left:i.left,top:i.top,width:d.width,height:d.height,zIndex:e+1,cursor:r[t]}),jQuery(document.body).append(o.resizerBg).append(o.resizer),o.activeModal.addClass("draged"),jQuery(document.body).bind(a.mousemove+".ax5modal-resize-"+this.instanceId,function(t){o.resizer.css(n(t))}).bind(a.mouseup+".ax5modal-resize-"+this.instanceId,function(t){u.off.call(o)}).bind("mouseleave.ax5modal-resize-"+this.instanceId,function(t){u.off.call(o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").bind("selectstart",!1)},off:function(){var t=function(){var t=this.resizer.offset();jQuery.extend(t,{width:this.resizer.width(),height:this.resizer.height()}),this.modalConfig.absolute||(t.left-=jQuery(document).scrollLeft(),t.top-=jQuery(document).scrollTop()),this.activeModal.css(t),this.modalConfig.left=t.left,this.modalConfig.top=t.top,this.modalConfig.width=t.width,this.modalConfig.height=t.height,this.$.body.css({height:t.height-this.modalConfig.headerHeight}),this.modalConfig.iframe&&(this.$["iframe-wrap"].css({height:t.height-this.modalConfig.headerHeight}),this.$.iframe.css({height:t.height-this.modalConfig.headerHeight})),t=null};this.activeModal.removeClass("draged"),t.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,n.call(this,o.modalConfig,{self:this,state:"resize"}),jQuery(document.body).unbind(a.mousemove+".ax5modal-resize-"+this.instanceId).unbind(a.mouseup+".ax5modal-resize-"+this.instanceId).unbind("mouseleave.ax5modal-resize-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").unbind("selectstart")}};this.init=function(){this.onStateChanged=d.onStateChanged,this.onResize=d.onResize},this.open=function(t,e,i){return"undefined"==typeof i&&(i=0),this.activeModal?i<3?(this.watingModal=!0,setTimeout(function(){this.open(t,e,i+1)}.bind(this),d.animateTime)):this.watingModal=!1:(t=o.modalConfig=jQuery.extend(!0,{},d,t),l.call(this,t,e),this.watingModal=!1),this},this.close=function(t){var i=void 0,a=void 0;return this.activeModal&&(i=o.modalConfig,this.activeModal.addClass("destroy"),jQuery(window).unbind("keydown.ax-modal"),jQuery(window).unbind("resize.ax-modal"),setTimeout(function(){if(i.iframe){var o=this.$.iframe;if(o){var d=o.get(0),h=d.contentDocument?d.contentDocument:d.contentWindow.document;try{$(h.body).children().each(function(){$(this).remove()})}catch(s){}h.innerHTML="",o.attr("src","about:blank").remove(),window.CollectGarbage&&window.CollectGarbage()}}this.activeModal.remove(),this.activeModal=null,this.watingModal||n.call(this,i,{self:this,state:"close"}),t&&e.isFunction(t.callback)&&(a={self:this,id:i.id,theme:i.theme,width:i.width,height:i.height,state:"close",$:this.$},t.callback.call(a,a))}.bind(this),d.animateTime)),this.minimized=!1,this},this.minimize=function(){return function(t){if(this.minimized!==!0){var e=o.modalConfig;"undefined"==typeof t&&(t=d.minimizePosition),this.minimized=!0,this.$.body.hide(),o.modalConfig.originalHeight=e.height,o.modalConfig.height=0,c[t].call(this),n.call(this,e,{self:this,state:"minimize"})}return this}}(),this.restore=function(){var t=o.modalConfig;return this.minimized&&(this.minimized=!1,this.$.body.show(),o.modalConfig.height=o.modalConfig.originalHeight,o.modalConfig.originalHeight=void 0,this.align({left:"center",top:"middle"}),n.call(this,t,{self:this,state:"restore"})),this},this.css=function(t){return this.activeModal&&!o.fullScreen&&(this.activeModal.css(t),"undefined"!=typeof t.width&&(o.modalConfig.width=t.width),"undefined"!=typeof t.height&&(o.modalConfig.height=t.height),this.align()),this},this.setModalConfig=function(t){return o.modalConfig=jQuery.extend({},o.modalConfig,t),this.align(),this},this.align=function(){return function(t,i){if(!this.activeModal)return this;var d=o.modalConfig,a={width:d.width,height:d.height},h=d.isFullScreen=function(t){return"undefined"!=typeof t&&(e.isFunction(t)?t():void 0)}(d.fullScreen);return h?(d.header&&this.$.header.show(),d.header?(d.headerHeight=this.$.header.outerHeight(),a.height+=d.headerHeight):d.headerHeight=0,a.width=jQuery(window).width(),a.height=d.height,a.left=0,a.top=0):(d.header&&this.$.header.show(),t&&jQuery.extend(!0,d.position,t),d.header?(d.headerHeight=this.$.header.outerHeight(),a.height+=d.headerHeight):d.headerHeight=0,"left"==d.position.left?a.left=d.position.margin||0:"right"==d.position.left?a.left=jQuery(window).width()-a.width-(d.position.margin||0):"center"==d.position.left?a.left=jQuery(window).width()/2-a.width/2:a.left=d.position.left||0,"top"==d.position.top?a.top=d.position.margin||0:"bottom"==d.position.top?a.top=jQuery(window).height()-a.height-(d.position.margin||0):"middle"==d.position.top?a.top=jQuery(window).height()/2-a.height/2:a.top=d.position.top||0,a.left<0&&(a.left=0),a.top<0&&(a.top=0),d.absolute&&(a.top+=jQuery(window).scrollTop(),a.left+=jQuery(window).scrollLeft())),this.activeModal.css(a),this.$.body.css({height:a.height-(d.headerHeight||0)}),d.iframe&&(this.$["iframe-wrap"].css({height:a.height-d.headerHeight}),this.$.iframe.css({height:a.height-d.headerHeight})),this}}(),this.main=function(){t.modal_instance=t.modal_instance||[],t.modal_instance.push(this),arguments&&e.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),i=ax5.ui.modal}(),function(){var t=ax5.ui.modal,e=function(){return' \n \n {{#header}}\n \n {{{title}}}\n {{#btns}}\n \n {{#@each}}\n {{{@value.label}}}\n {{/@each}}\n \n {{/btns}}\n \n {{/header}}\n \n {{#iframe}}\n \n {{{iframeLoadingMsg}}}\n \n \n \n \n {{#param}}\n {{#@each}}\n \n {{/@each}}\n {{/param}}\n \n {{/iframe}}\n {{^iframe}}\n \n {{/iframe}}\n \n {{^disableResize}}\n \n \n \n \n \n \n \n \n {{/disableResize}}\n \n '};t.tmpl={content:e,get:function(e,i,o){return ax5.mustache.render(t.tmpl[e].call(this,o),i)}}}(); -//# sourceMappingURL=ax5modal.min.js.map diff --git a/_src/plugins/ax5ui-modal/ax5modal.min.js.map b/_src/plugins/ax5ui-modal/ax5modal.min.js.map deleted file mode 100644 index 0afb938..0000000 --- a/_src/plugins/ax5ui-modal/ax5modal.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["ax5modal.min.js","ax5modal.js","ax5modal-tmpl.js"],"names":["UI","ax5","ui","U","util","MODAL","addClass","className","self","this","cfg","ENM","mousedown","info","supportTouch","mousemove","mouseup","getMousePosition","e","mouseObj","changedTouches","clientX","clientY","instanceId","getGuid","config","id","position","left","top","margin","minimizePosition","clickEventName","document","documentElement","theme","width","height","closeToEsc","disableDrag","disableResize","animateTime","iframe","activeModal","watingModal","$","onStateChanged","opts","that","eventProcessor","resize","onResize","call","move","state","getContent","modalId","data","header","fullScreen","styles","iframeLoadingMsg","zIndex","absolute","param","tmpl","get","open","callback","jQuery","body","append","root","find","align","css","attr","method","target","action","url","on","hide","bind","show","submit","window","onkeyup","event","off","isButton","findParentNode","_target","getAttribute","isFullScreen","mousePosition","moveModal","btnOnClick","stopEvent","originalEvent","resizeModal","k","srcElement","key","value","btns","dialogId","btnTarget","onClick","keyCode","eventKeys","ESC","close","alignProcessor","top-left","top-right","bottom-left","bottom-right","center-middle","modalZIndex","modalOffset","offset","modalBox","outerWidth","outerHeight","windowBox","scrollLeft","scrollTop","getResizerPosition","__dx","__dy","resizerBg","resizer","setModalPosition","box","modalConfig","removeClass","remove","removeAttr","resizerType","resizerProcessor","minHeight","shiftKey","altKey","bottom","minWidth","right","cursorType","cursor","extend","headerHeight","unbind","init","tryCount","setTimeout","_option","$iframe","iframeObject","idoc","contentDocument","contentWindow","children","each","innerHTML","CollectGarbage","isFunction","minimized","minimize","originalHeight","restore","undefined","setModalConfig","_config","_fullScreen","main","modal_instance","push","arguments","isObject","setConfig","apply","modal","content","tmplName","columnKeys","mustache","render"],"mappings":"AAAA,cCOA,WACA,GAAAA,GAAAC,IAAAC,GACAC,EAAAF,IAAAG,KACAC,EAAAA,MAEAL,GAAAM,UAEAC,UAAA,SAEA,WAMA,MAAA,YACA,GAAAC,GAAAC,KACAC,EAAAA,OACAC,GACAC,UAAAX,IAAAY,KAAAC,aAAA,aAAA,YACAC,UAAAd,IAAAY,KAAAC,aAAA,YAAA,YACAE,QAAAf,IAAAY,KAAAC,aAAA,WAAA,WAEAG,EAAA,SAAAC,GACA,GAAAC,GAAAD,CAIA,OAHA,kBAAAA,IAAAA,EAAAE,iBACAD,EAAAD,EAAAE,eAAA,KAGAC,QAAAF,EAAAE,QACAC,QAAAH,EAAAG,SAIAb,MAAAc,WAAAtB,IAAAuB,UACAf,KAAAgB,QACAC,GAAA,aAAAjB,KAAAc,WACAI,UACAC,KAAA,SACAC,IAAA,SACAC,OAAA,IAEAC,iBAAA,eACAC,eACA,gBAAAC,UAAAC,gBAAA,aAAA,QACAC,MAAA,UACAC,MAAA,IACAC,OAAA,IACAC,YAAA,EACAC,aAAA,EACAC,eAAA,EACAC,YAAA,IACAC,QAAA,GAEAjC,KAAAkC,YAAA,KACAlC,KAAAmC,aAAA,EACAnC,KAAAoC,KAEAnC,EAAAD,KAAAgB,MAEA,IAAAqB,GAAA,SAAAC,EAAAC,GACA,GAAAC,IACAC,OAAA,SAAAF,GACAD,GAAAA,EAAAI,SACAJ,EAAAI,SAAAC,KAAAJ,EAAAA,GACAvC,KAAA0C,UACA1C,KAAA0C,SAAAC,KAAAJ,EAAAA,IAGAK,KAAA,aAWA,OATAL,GAAAM,QAAAL,IACAA,EAAAD,EAAAM,OAAAF,KAAA3C,KAAAuC,GAGAD,GAAAA,EA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,OAAAiB,QAAAyC,YACAO,EAAA1G,MAAAyC,OAAAiB,QAAAwC,eAIArH,KAAAkC,YAAAgC,IAAA2D,GAEA7H,KAAAoC,EAAA,KAAA8B,KACAtC,OAAAiG,EAAAjG,QAAAU,EAAAuG,cAAA,KAGAvG,EAAAL,SACAjC,KAAAoC,EAAA,eAAA8B,KACAtC,OAAAiG,EAAAjG,OAAAU,EAAAuG,eAEA7I,KAAAoC,EAAA,OAAA8B,KAAAtC,OAAAiG,EAAAjG,OAAAU,EAAAuG,gBAGA7I,SAKAA,KAAAqK,KAAA,WACA9K,EAAA+K,eAAA/K,EAAA+K,mBACA/K,EAAA+K,eAAAC,KAAAvK,MAEAwK,WAAA9K,EAAA+K,SAAAD,UAAA,KACAxK,KAAA0K,UAAAF,UAAA,KAEAG,MAAA3K,KAAAwK,gBAKA5K,EAAAJ,IAAAC,GAAAmL,SCnuCA,WACA,GAAAhL,GAAAJ,IAAAC,GAAAmL,MAEAC,EAAA,WACA,MAAA,uzEA+CAjL,GAAA4D,MACAqH,QAAAA,EAEApH,IAAA,SAAAqH,EAAA9H,EAAA+H,GACA,MAAAvL,KAAAwL,SAAAC,OAAArL,EAAA4D,KAAAsH,GAAAnI,KAAA3C,KAAA+K,GAAA/H","file":"ax5modal.min.js","sourcesContent":["\"use strict\";\n\n/*\n * Copyright (c) 2016. tom@axisj.com\n * - github.com/thomasjang\n * - www.axisj.com\n */\n\n// ax5.ui.modal\n(function () {\n var UI = ax5.ui;\n var U = ax5.util;\n var MODAL = void 0;\n\n UI.addClass({\n className: \"modal\"\n }, function () {\n /**\n * @class ax5modal\n * @alias ax5.ui.modal\n * @author tom@axisj.com\n */\n return function () {\n var self = this,\n cfg = void 0,\n ENM = {\n mousedown: ax5.info.supportTouch ? \"touchstart\" : \"mousedown\",\n mousemove: ax5.info.supportTouch ? \"touchmove\" : \"mousemove\",\n mouseup: ax5.info.supportTouch ? \"touchend\" : \"mouseup\"\n },\n getMousePosition = function getMousePosition(e) {\n var mouseObj = e;\n if (\"changedTouches\" in e && e.changedTouches) {\n mouseObj = e.changedTouches[0];\n }\n return {\n clientX: mouseObj.clientX,\n clientY: mouseObj.clientY\n };\n };\n\n this.instanceId = ax5.getGuid();\n this.config = {\n id: \"ax5-modal-\" + this.instanceId,\n position: {\n left: \"center\",\n top: \"middle\",\n margin: 10\n },\n minimizePosition: \"bottom-right\",\n clickEventName: \"ontouchstart\" in document.documentElement ? \"touchstart\" : \"click\",\n theme: \"default\",\n width: 300,\n height: 400,\n closeToEsc: true,\n disableDrag: false,\n disableResize: false,\n animateTime: 250,\n iframe: false\n };\n this.activeModal = null;\n this.watingModal = false;\n this.$ = {}; // UI inside of the jQuery object store\n\n cfg = this.config; // extended config copy cfg\n\n var onStateChanged = function onStateChanged(opts, that) {\n var eventProcessor = {\n resize: function resize(that) {\n if (opts && opts.onResize) {\n opts.onResize.call(that, that);\n } else if (this.onResize) {\n this.onResize.call(that, that);\n }\n },\n move: function move() {}\n };\n if (that.state in eventProcessor) {\n eventProcessor[that.state].call(this, that);\n }\n\n if (opts && opts.onStateChanged) {\n opts.onStateChanged.call(that, that);\n } else if (this.onStateChanged) {\n this.onStateChanged.call(that, that);\n }\n return true;\n },\n getContent = function getContent(modalId, opts) {\n var data = {\n modalId: modalId,\n theme: opts.theme,\n header: opts.header,\n fullScreen: opts.fullScreen ? \"fullscreen\" : \"\",\n styles: \"\",\n iframe: opts.iframe,\n iframeLoadingMsg: opts.iframeLoadingMsg,\n disableResize: opts.disableResize\n };\n\n if (opts.zIndex) {\n data.styles += \"z-index:\" + opts.zIndex + \";\";\n }\n if (opts.absolute) {\n data.styles += \"position:absolute;\";\n }\n\n if (data.iframe && typeof data.iframe.param === \"string\") {\n data.iframe.param = ax5.util.param(data.iframe.param);\n }\n\n return MODAL.tmpl.get.call(this, \"content\", data, {});\n },\n open = function open(opts, callback) {\n var that = void 0;\n jQuery(document.body).append(getContent.call(this, opts.id, opts));\n\n this.activeModal = jQuery(\"#\" + opts.id);\n // 파트수집\n this.$ = {\n root: this.activeModal,\n header: this.activeModal.find('[data-modal-els=\"header\"]'),\n body: this.activeModal.find('[data-modal-els=\"body\"]')\n };\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"] = this.activeModal.find('[data-modal-els=\"iframe-wrap\"]');\n this.$[\"iframe\"] = this.activeModal.find('[data-modal-els=\"iframe\"]');\n this.$[\"iframe-form\"] = this.activeModal.find('[data-modal-els=\"iframe-form\"]');\n this.$[\"iframe-loading\"] = this.activeModal.find('[data-modal-els=\"iframe-loading\"]');\n } else {\n this.$[\"body-frame\"] = this.activeModal.find('[data-modal-els=\"body-frame\"]');\n }\n\n //- position 정렬\n this.align();\n\n that = {\n self: this,\n id: opts.id,\n theme: opts.theme,\n width: opts.width,\n height: opts.height,\n state: \"open\",\n $: this.$\n };\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"].css({ height: opts.height });\n this.$[\"iframe\"].css({ height: opts.height });\n\n // iframe content load\n this.$[\"iframe-form\"].attr({ method: opts.iframe.method });\n this.$[\"iframe-form\"].attr({ target: opts.id + \"-frame\" });\n this.$[\"iframe-form\"].attr({ action: opts.iframe.url });\n this.$[\"iframe\"].on(\"load\", function () {\n that.state = \"load\";\n if (opts.iframeLoadingMsg) {\n this.$[\"iframe-loading\"].hide();\n }\n onStateChanged.call(this, opts, that);\n }.bind(this));\n if (!opts.iframeLoadingMsg) {\n this.$[\"iframe\"].show();\n }\n this.$[\"iframe-form\"].submit();\n }\n\n if (callback) callback.call(that, that);\n\n if (!this.watingModal) {\n onStateChanged.call(this, opts, that);\n }\n\n // bind key event\n if (opts.closeToEsc) {\n jQuery(window).bind(\"keydown.ax-modal\", function (e) {\n onkeyup.call(this, e || window.event);\n }.bind(this));\n }\n\n jQuery(window).bind(\"resize.ax-modal\", function (e) {\n this.align(null, e || window.event);\n }.bind(this));\n\n this.$.header.off(ENM[\"mousedown\"]).off(\"dragstart\").on(ENM[\"mousedown\"], function (e) {\n /// 이벤트 필터링 추가 : 버튼엘리먼트로 부터 발생된 이벤트이면 moveModal 시작하지 않도록 필터링\n var isButton = U.findParentNode(e.target, function (_target) {\n if (_target.getAttribute(\"data-modal-header-btn\")) {\n return true;\n }\n });\n\n if (!opts.isFullScreen && !isButton && opts.disableDrag != true) {\n self.mousePosition = getMousePosition(e);\n moveModal.on.call(self);\n }\n if (isButton) {\n btnOnClick.call(self, e || window.event, opts);\n }\n }).on(\"dragstart\", function (e) {\n U.stopEvent(e.originalEvent);\n return false;\n });\n\n this.activeModal.off(ENM[\"mousedown\"]).off(\"dragstart\").on(ENM[\"mousedown\"], \"[data-ax5modal-resizer]\", function (e) {\n if (opts.disableDrag || opts.isFullScreen) return false;\n self.mousePosition = getMousePosition(e);\n resizeModal.on.call(self, this.getAttribute(\"data-ax5modal-resizer\"));\n }).on(\"dragstart\", function (e) {\n U.stopEvent(e.originalEvent);\n return false;\n });\n },\n btnOnClick = function btnOnClick(e, opts, callback, target, k) {\n var that = void 0;\n if (e.srcElement) e.target = e.srcElement;\n\n target = U.findParentNode(e.target, function (target) {\n if (target.getAttribute(\"data-modal-header-btn\")) {\n return true;\n }\n });\n\n if (target) {\n k = target.getAttribute(\"data-modal-header-btn\");\n\n that = {\n self: this,\n key: k,\n value: opts.header.btns[k],\n dialogId: opts.id,\n btnTarget: target\n };\n\n if (opts.header.btns[k].onClick) {\n opts.header.btns[k].onClick.call(that, k);\n }\n }\n\n that = null;\n opts = null;\n callback = null;\n target = null;\n k = null;\n },\n onkeyup = function onkeyup(e) {\n if (e.keyCode == ax5.info.eventKeys.ESC) {\n this.close();\n }\n },\n alignProcessor = {\n \"top-left\": function topLeft() {\n this.align({ left: \"left\", top: \"top\" });\n },\n \"top-right\": function topRight() {\n this.align({ left: \"right\", top: \"top\" });\n },\n \"bottom-left\": function bottomLeft() {\n this.align({ left: \"left\", top: \"bottom\" });\n },\n \"bottom-right\": function bottomRight() {\n this.align({ left: \"right\", top: \"bottom\" });\n },\n \"center-middle\": function centerMiddle() {\n this.align({ left: \"center\", top: \"middle\" });\n }\n },\n moveModal = {\n on: function on() {\n var modalZIndex = this.activeModal.css(\"z-index\"),\n modalOffset = this.activeModal.offset(),\n modalBox = {\n width: this.activeModal.outerWidth(),\n height: this.activeModal.outerHeight()\n },\n windowBox = {\n width: jQuery(window).width(),\n height: jQuery(window).height(),\n scrollLeft: jQuery(document).scrollLeft(),\n scrollTop: jQuery(document).scrollTop()\n },\n getResizerPosition = function getResizerPosition(e) {\n self.__dx = e.clientX - self.mousePosition.clientX;\n self.__dy = e.clientY - self.mousePosition.clientY;\n\n /*\n if (minX > modalOffset.left + self.__dx) {\n self.__dx = -modalOffset.left;\n } else if (maxX < modalOffset.left + self.__dx) {\n self.__dx = maxX - modalOffset.left;\n }\n if (minY > modalOffset.top + self.__dy) {\n self.__dy = -modalOffset.top;\n } else if (maxY < modalOffset.top + self.__dy) {\n self.__dy = maxY - modalOffset.top;\n }\n */\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy\n };\n };\n\n var minX = 0,\n maxX = windowBox.width - modalBox.width,\n minY = 0,\n maxY = windowBox.height - modalBox.height;\n\n self.__dx = 0; // 변화량 X\n self.__dy = 0; // 변화량 Y\n\n // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV\n self.resizerBg = jQuery('');\n self.resizer = jQuery('');\n self.resizerBg.css({ zIndex: modalZIndex });\n self.resizer.css({\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height,\n zIndex: modalZIndex + 1\n });\n\n jQuery(document.body).append(self.resizerBg).append(self.resizer);\n\n self.activeModal.addClass(\"draged\");\n\n jQuery(document.body).on(ENM[\"mousemove\"] + \".ax5modal-move-\" + this.instanceId, function (e) {\n self.resizer.css(getResizerPosition(e));\n }).on(ENM[\"mouseup\"] + \".ax5modal-move-\" + this.instanceId, function (e) {\n moveModal.off.call(self);\n }).on(\"mouseleave.ax5modal-move-\" + this.instanceId, function (e) {\n moveModal.off.call(self);\n });\n\n jQuery(document.body).attr(\"unselectable\", \"on\").css(\"user-select\", \"none\").on(\"selectstart\", false);\n },\n off: function off() {\n var setModalPosition = function setModalPosition() {\n var box = this.resizer.offset();\n if (!this.modalConfig.absolute) {\n box.left -= jQuery(document).scrollLeft();\n box.top -= jQuery(document).scrollTop();\n }\n this.activeModal.css(box);\n this.modalConfig.left = box.left;\n this.modalConfig.top = box.top;\n\n box = null;\n };\n\n this.activeModal.removeClass(\"draged\");\n setModalPosition.call(this);\n\n this.resizer.remove();\n this.resizer = null;\n this.resizerBg.remove();\n this.resizerBg = null;\n //this.align();\n\n jQuery(document.body).off(ENM[\"mousemove\"] + \".ax5modal-move-\" + this.instanceId).off(ENM[\"mouseup\"] + \".ax5modal-move-\" + this.instanceId).off(\"mouseleave.ax5modal-move-\" + this.instanceId);\n\n jQuery(document.body).removeAttr(\"unselectable\").css(\"user-select\", \"auto\").off(\"selectstart\");\n\n onStateChanged.call(this, self.modalConfig, {\n self: this,\n state: \"move\"\n });\n }\n },\n resizeModal = {\n on: function on(resizerType) {\n var modalZIndex = this.activeModal.css(\"z-index\"),\n modalOffset = this.activeModal.offset(),\n modalBox = {\n width: this.activeModal.outerWidth(),\n height: this.activeModal.outerHeight()\n },\n windowBox = {\n width: jQuery(window).width(),\n height: jQuery(window).height(),\n scrollLeft: jQuery(document).scrollLeft(),\n scrollTop: jQuery(document).scrollTop()\n },\n resizerProcessor = {\n top: function top(e) {\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width,\n height: modalBox.height - self.__dy * 2\n };\n } else if (e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dy,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dy * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width,\n height: modalBox.height - self.__dy\n };\n }\n },\n bottom: function bottom(e) {\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey) {\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n\n return {\n left: modalOffset.left,\n top: modalOffset.top - self.__dy,\n width: modalBox.width,\n height: modalBox.height + self.__dy * 2\n };\n } else if (e.altKey) {\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dy,\n top: modalOffset.top - self.__dy,\n width: modalBox.width + self.__dy * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height + self.__dy\n };\n }\n },\n left: function left(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (e.shiftKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height\n };\n } else if (e.altKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dx,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height - self.__dx * 2\n };\n } else {\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx,\n height: modalBox.height\n };\n }\n },\n right: function right(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (e.shiftKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height\n };\n } else if (e.altKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top - self.__dx,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height + self.__dx * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width + self.__dx,\n height: modalBox.height\n };\n }\n },\n \"top-left\": function topLeft(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dx,\n height: modalBox.height - self.__dy\n };\n }\n },\n \"top-right\": function topRight(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width + self.__dx,\n height: modalBox.height - self.__dy\n };\n }\n },\n \"bottom-left\": function bottomLeft(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top - self.__dy,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx,\n height: modalBox.height + self.__dy\n };\n }\n },\n \"bottom-right\": function bottomRight(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top - self.__dy,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width + self.__dx,\n height: modalBox.height + self.__dy\n };\n }\n }\n },\n getResizerPosition = function getResizerPosition(e) {\n self.__dx = e.clientX - self.mousePosition.clientX;\n self.__dy = e.clientY - self.mousePosition.clientY;\n\n return resizerProcessor[resizerType](e);\n };\n\n var minWidth = 100,\n minHeight = 100;\n\n var cursorType = {\n top: \"row-resize\",\n bottom: \"row-resize\",\n left: \"col-resize\",\n right: \"col-resize\",\n \"top-left\": \"nwse-resize\",\n \"top-right\": \"nesw-resize\",\n \"bottom-left\": \"nesw-resize\",\n \"bottom-right\": \"nwse-resize\"\n };\n\n self.__dx = 0; // 변화량 X\n self.__dy = 0; // 변화량 Y\n\n // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV\n self.resizerBg = jQuery('');\n self.resizer = jQuery('');\n self.resizerBg.css({\n zIndex: modalZIndex,\n cursor: cursorType[resizerType]\n });\n self.resizer.css({\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height,\n zIndex: modalZIndex + 1,\n cursor: cursorType[resizerType]\n });\n jQuery(document.body).append(self.resizerBg).append(self.resizer);\n self.activeModal.addClass(\"draged\");\n\n jQuery(document.body).bind(ENM[\"mousemove\"] + \".ax5modal-resize-\" + this.instanceId, function (e) {\n self.resizer.css(getResizerPosition(e));\n }).bind(ENM[\"mouseup\"] + \".ax5modal-resize-\" + this.instanceId, function (e) {\n resizeModal.off.call(self);\n }).bind(\"mouseleave.ax5modal-resize-\" + this.instanceId, function (e) {\n resizeModal.off.call(self);\n });\n\n jQuery(document.body).attr(\"unselectable\", \"on\").css(\"user-select\", \"none\").bind(\"selectstart\", false);\n },\n off: function off() {\n var setModalPosition = function setModalPosition() {\n var box = this.resizer.offset();\n jQuery.extend(box, {\n width: this.resizer.width(),\n height: this.resizer.height()\n });\n if (!this.modalConfig.absolute) {\n box.left -= jQuery(document).scrollLeft();\n box.top -= jQuery(document).scrollTop();\n }\n this.activeModal.css(box);\n\n this.modalConfig.left = box.left;\n this.modalConfig.top = box.top;\n this.modalConfig.width = box.width;\n this.modalConfig.height = box.height;\n this.$[\"body\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n if (this.modalConfig.iframe) {\n this.$[\"iframe-wrap\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n this.$[\"iframe\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n }\n\n box = null;\n };\n\n this.activeModal.removeClass(\"draged\");\n setModalPosition.call(this);\n\n this.resizer.remove();\n this.resizer = null;\n this.resizerBg.remove();\n this.resizerBg = null;\n\n onStateChanged.call(this, self.modalConfig, {\n self: this,\n state: \"resize\"\n });\n\n jQuery(document.body).unbind(ENM[\"mousemove\"] + \".ax5modal-resize-\" + this.instanceId).unbind(ENM[\"mouseup\"] + \".ax5modal-resize-\" + this.instanceId).unbind(\"mouseleave.ax5modal-resize-\" + this.instanceId);\n\n jQuery(document.body).removeAttr(\"unselectable\").css(\"user-select\", \"auto\").unbind(\"selectstart\");\n }\n };\n\n /// private end\n\n /**\n * Preferences of modal UI\n * @method ax5modal.setConfig\n * @param {Object} config - 클래스 속성값\n * @param {Number} [config.zIndex]\n * @param {Object} [config.position]\n * @param {String} [config.position.left=\"center\"]\n * @param {String} [config.position.top=\"middle\"]\n * @param {Number} [config.position.margin=10]\n * @param {String} [config.minimizePosition=\"bottom-right\"]\n * @param {Number} [config.width=300]\n * @param {Number} [config.height=400]\n * @param {Boolean} [config.closeToEsc=true]\n * @param {Boolean} [config.absolute=false]\n * @param {Boolean} [config.disableDrag=false]\n * @param {Boolean} [config.disableResize=false]\n * @param {Number} [config.animateTime=250]\n * @param {Function} [config.fullScreen]\n * @param {Function} [config.onStateChanged] - `onStateChanged` function can be defined in setConfig method or new ax5.ui.modal initialization method. However, you can us to define an event function after initialization, if necessary\n * @param {Function} [config.onResize]\n * @returns {ax5modal}\n * @example\n * ```js\n * var modal = new ax5.ui.modal({\n * iframeLoadingMsg: '',\n * header: {\n * title: \"MODAL TITLE\",\n * btns: {\n * minimize: {\n * label: '', onClick: function () {\n * modal.minimize();\n * }\n * },\n * maximize: {\n * label: '', onClick: function () {\n * modal.maximize();\n * }\n * },\n * close: {\n * label: '', onClick: function () {\n * modal.close();\n * }\n * }\n * }\n * }\n * });\n *\n * modal.open({\n * width: 800,\n * height: 600,\n * fullScreen: function(){\n * return ($(window).width() < 600);\n * },\n * iframe: {\n * method: \"get\",\n * url: \"http://chequer-app:2017/html/login.html\",\n * param: \"callback=modalCallback\"\n * },\n * onStateChanged: function(){\n * console.log(this);\n * },\n * onResize: function(){\n * console.log(this);\n * }\n * });\n * ```\n */\n //== class body start\n this.init = function () {\n this.onStateChanged = cfg.onStateChanged;\n this.onResize = cfg.onResize;\n };\n\n /**\n * open the modal\n * @method ax5modal.open\n * @returns {ax5modal}\n * @example\n * ```\n * modal.open();\n * modal.open({\n * width: 500,\n * height: 500\n * });\n * moaal.open({}, function(){\n * console.log(this);\n * });\n * ```\n */\n this.open = function (opts, callback, tryCount) {\n if (typeof tryCount === \"undefined\") tryCount = 0;\n if (!this.activeModal) {\n opts = self.modalConfig = jQuery.extend(true, {}, cfg, opts);\n open.call(this, opts, callback);\n this.watingModal = false;\n } else if (tryCount < 3) {\n // 3번까지 재 시도\n this.watingModal = true;\n setTimeout(function () {\n this.open(opts, callback, tryCount + 1);\n }.bind(this), cfg.animateTime);\n } else {\n // 열기 시도 종료\n this.watingModal = false;\n }\n return this;\n };\n\n /**\n * close the modal\n * @method ax5modal.close\n * @param _option\n * @returns {ax5modal}\n * @example\n * ```\n * my_modal.close();\n * my_modal.close({callback: function(){\n * // on close event\n * });\n * // close 함수에 callback을 전달하면 정확한 close 타이밍을 캐치할 수 있습니다\n * ```\n */\n\n this.close = function (_option) {\n var opts = void 0,\n that = void 0;\n\n if (this.activeModal) {\n opts = self.modalConfig;\n this.activeModal.addClass(\"destroy\");\n jQuery(window).unbind(\"keydown.ax-modal\");\n jQuery(window).unbind(\"resize.ax-modal\");\n\n setTimeout(function () {\n // 프레임 제거\n if (opts.iframe) {\n var $iframe = this.$[\"iframe\"]; // iframe jQuery Object\n if ($iframe) {\n var iframeObject = $iframe.get(0),\n idoc = iframeObject.contentDocument ? iframeObject.contentDocument : iframeObject.contentWindow.document;\n\n try {\n $(idoc.body).children().each(function () {\n $(this).remove();\n });\n } catch (e) {}\n idoc.innerHTML = \"\";\n $iframe.attr(\"src\", \"about:blank\").remove();\n\n // force garbarge collection for IE only\n window.CollectGarbage && window.CollectGarbage();\n }\n }\n\n this.activeModal.remove();\n this.activeModal = null;\n\n // 모달 오픈 대기중이면 닫기 상태 전달 안함.\n if (!this.watingModal) {\n onStateChanged.call(this, opts, {\n self: this,\n state: \"close\"\n });\n }\n\n if (_option && U.isFunction(_option.callback)) {\n that = {\n self: this,\n id: opts.id,\n theme: opts.theme,\n width: opts.width,\n height: opts.height,\n state: \"close\",\n $: this.$\n };\n _option.callback.call(that, that);\n }\n }.bind(this), cfg.animateTime);\n }\n\n this.minimized = false; // hoksi\n\n return this;\n };\n\n /**\n * @method ax5modal.minimize\n * @returns {ax5modal}\n */\n this.minimize = function () {\n return function (minimizePosition) {\n if (this.minimized !== true) {\n var opts = self.modalConfig;\n if (typeof minimizePosition === \"undefined\") minimizePosition = cfg.minimizePosition;\n\n this.minimized = true;\n this.$.body.hide();\n self.modalConfig.originalHeight = opts.height;\n self.modalConfig.height = 0;\n alignProcessor[minimizePosition].call(this);\n\n onStateChanged.call(this, opts, {\n self: this,\n state: \"minimize\"\n });\n }\n\n return this;\n };\n }();\n\n /**\n * @method ax5modal.restore\n * @returns {ax5modal}\n */\n this.restore = function () {\n var opts = self.modalConfig;\n if (this.minimized) {\n this.minimized = false;\n this.$.body.show();\n self.modalConfig.height = self.modalConfig.originalHeight;\n self.modalConfig.originalHeight = undefined;\n\n this.align({ left: \"center\", top: \"middle\" });\n onStateChanged.call(this, opts, {\n self: this,\n state: \"restore\"\n });\n }\n return this;\n };\n\n /**\n * setCSS\n * @method ax5modal.css\n * @param {Object} css -\n * @returns {ax5modal}\n */\n this.css = function (css) {\n if (this.activeModal && !self.fullScreen) {\n this.activeModal.css(css);\n if (typeof css.width !== \"undefined\") {\n self.modalConfig.width = css.width;\n }\n if (typeof css.height !== \"undefined\") {\n self.modalConfig.height = css.height;\n }\n\n this.align();\n }\n return this;\n };\n\n /**\n * @method ax5modal.setModalConfig\n * @param _config\n * @returns {ax5.ui.ax5modal}\n */\n this.setModalConfig = function (_config) {\n self.modalConfig = jQuery.extend({}, self.modalConfig, _config);\n this.align();\n return this;\n };\n\n /**\n * @method ax5modal.align\n * @param position\n * @param e\n * @returns {ax5modal}\n * @example\n * ```js\n * modal.align({left:\"center\", top:\"middle\"});\n * modal.align({left:\"left\", top:\"top\", margin: 20});\n * ```\n */\n this.align = function () {\n return function (position, e) {\n if (!this.activeModal) return this;\n\n var opts = self.modalConfig,\n box = {\n width: opts.width,\n height: opts.height\n };\n\n var fullScreen = opts.isFullScreen = function (_fullScreen) {\n if (typeof _fullScreen === \"undefined\") {\n return false;\n } else if (U.isFunction(_fullScreen)) {\n return _fullScreen();\n }\n }(opts.fullScreen);\n\n if (fullScreen) {\n if (opts.header) this.$.header.show();\n if (opts.header) {\n opts.headerHeight = this.$.header.outerHeight();\n box.height += opts.headerHeight;\n } else {\n opts.headerHeight = 0;\n }\n box.width = jQuery(window).width();\n box.height = opts.height;\n box.left = 0;\n box.top = 0;\n } else {\n if (opts.header) this.$.header.show();\n if (position) {\n jQuery.extend(true, opts.position, position);\n }\n\n if (opts.header) {\n opts.headerHeight = this.$.header.outerHeight();\n box.height += opts.headerHeight;\n } else {\n opts.headerHeight = 0;\n }\n\n //- position 정렬\n if (opts.position.left == \"left\") {\n box.left = opts.position.margin || 0;\n } else if (opts.position.left == \"right\") {\n // window.innerWidth;\n box.left = jQuery(window).width() - box.width - (opts.position.margin || 0);\n } else if (opts.position.left == \"center\") {\n box.left = jQuery(window).width() / 2 - box.width / 2;\n } else {\n box.left = opts.position.left || 0;\n }\n\n if (opts.position.top == \"top\") {\n box.top = opts.position.margin || 0;\n } else if (opts.position.top == \"bottom\") {\n box.top = jQuery(window).height() - box.height - (opts.position.margin || 0);\n } else if (opts.position.top == \"middle\") {\n box.top = jQuery(window).height() / 2 - box.height / 2;\n } else {\n box.top = opts.position.top || 0;\n }\n if (box.left < 0) box.left = 0;\n if (box.top < 0) box.top = 0;\n\n if (opts.absolute) {\n box.top += jQuery(window).scrollTop();\n box.left += jQuery(window).scrollLeft();\n }\n }\n\n this.activeModal.css(box);\n\n this.$[\"body\"].css({\n height: box.height - (opts.headerHeight || 0)\n });\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"].css({\n height: box.height - opts.headerHeight\n });\n this.$[\"iframe\"].css({ height: box.height - opts.headerHeight });\n } else {}\n return this;\n };\n }();\n\n // 클래스 생성자\n this.main = function () {\n UI.modal_instance = UI.modal_instance || [];\n UI.modal_instance.push(this);\n\n if (arguments && U.isObject(arguments[0])) {\n this.setConfig(arguments[0]);\n }\n }.apply(this, arguments);\n };\n }());\n\n MODAL = ax5.ui.modal;\n})();\n\n// ax5.ui.modal.tmpl\n(function () {\n var MODAL = ax5.ui.modal;\n\n var content = function content() {\n return \" \\n \\n {{#header}}\\n \\n {{{title}}}\\n {{#btns}}\\n \\n {{#@each}}\\n {{{@value.label}}}\\n {{/@each}}\\n \\n {{/btns}}\\n \\n {{/header}}\\n \\n {{#iframe}}\\n \\n {{{iframeLoadingMsg}}}\\n \\n \\n \\n \\n {{#param}}\\n {{#@each}}\\n \\n {{/@each}}\\n {{/param}}\\n \\n {{/iframe}}\\n {{^iframe}}\\n \\n {{/iframe}}\\n \\n {{^disableResize}}\\n \\n \\n \\n \\n \\n \\n \\n \\n {{/disableResize}}\\n \\n \";\n };\n\n MODAL.tmpl = {\n \"content\": content,\n\n get: function get(tmplName, data, columnKeys) {\n return ax5.mustache.render(MODAL.tmpl[tmplName].call(this, columnKeys), data);\n }\n };\n})();","/*\n * Copyright (c) 2016. tom@axisj.com\n * - github.com/thomasjang\n * - www.axisj.com\n */\n\n// ax5.ui.modal\n(function() {\n const UI = ax5.ui;\n const U = ax5.util;\n let MODAL;\n\n UI.addClass(\n {\n className: \"modal\"\n },\n (function() {\n /**\n * @class ax5modal\n * @alias ax5.ui.modal\n * @author tom@axisj.com\n */\n return function() {\n let self = this,\n cfg,\n ENM = {\n mousedown: ax5.info.supportTouch ? \"touchstart\" : \"mousedown\",\n mousemove: ax5.info.supportTouch ? \"touchmove\" : \"mousemove\",\n mouseup: ax5.info.supportTouch ? \"touchend\" : \"mouseup\"\n },\n getMousePosition = function(e) {\n let mouseObj = e;\n if (\"changedTouches\" in e && e.changedTouches) {\n mouseObj = e.changedTouches[0];\n }\n return {\n clientX: mouseObj.clientX,\n clientY: mouseObj.clientY\n };\n };\n\n this.instanceId = ax5.getGuid();\n this.config = {\n id: \"ax5-modal-\" + this.instanceId,\n position: {\n left: \"center\",\n top: \"middle\",\n margin: 10\n },\n minimizePosition: \"bottom-right\",\n clickEventName:\n \"ontouchstart\" in document.documentElement ? \"touchstart\" : \"click\",\n theme: \"default\",\n width: 300,\n height: 400,\n closeToEsc: true,\n disableDrag: false,\n disableResize: false,\n animateTime: 250,\n iframe: false\n };\n this.activeModal = null;\n this.watingModal = false;\n this.$ = {}; // UI inside of the jQuery object store\n\n cfg = this.config; // extended config copy cfg\n\n let onStateChanged = function(opts, that) {\n var eventProcessor = {\n resize: function(that) {\n if (opts && opts.onResize) {\n opts.onResize.call(that, that);\n } else if (this.onResize) {\n this.onResize.call(that, that);\n }\n },\n move: function() {}\n };\n if (that.state in eventProcessor) {\n eventProcessor[that.state].call(this, that);\n }\n\n if (opts && opts.onStateChanged) {\n opts.onStateChanged.call(that, that);\n } else if (this.onStateChanged) {\n this.onStateChanged.call(that, that);\n }\n return true;\n },\n getContent = function(modalId, opts) {\n let data = {\n modalId: modalId,\n theme: opts.theme,\n header: opts.header,\n fullScreen: opts.fullScreen ? \"fullscreen\" : \"\",\n styles: \"\",\n iframe: opts.iframe,\n iframeLoadingMsg: opts.iframeLoadingMsg,\n disableResize: opts.disableResize\n };\n\n if (opts.zIndex) {\n data.styles += \"z-index:\" + opts.zIndex + \";\";\n }\n if (opts.absolute) {\n data.styles += \"position:absolute;\";\n }\n\n if (data.iframe && typeof data.iframe.param === \"string\") {\n data.iframe.param = ax5.util.param(data.iframe.param);\n }\n\n return MODAL.tmpl.get.call(this, \"content\", data, {});\n },\n open = function(opts, callback) {\n let that;\n jQuery(document.body).append(getContent.call(this, opts.id, opts));\n\n this.activeModal = jQuery(\"#\" + opts.id);\n // 파트수집\n this.$ = {\n root: this.activeModal,\n header: this.activeModal.find('[data-modal-els=\"header\"]'),\n body: this.activeModal.find('[data-modal-els=\"body\"]')\n };\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"] = this.activeModal.find(\n '[data-modal-els=\"iframe-wrap\"]'\n );\n this.$[\"iframe\"] = this.activeModal.find(\n '[data-modal-els=\"iframe\"]'\n );\n this.$[\"iframe-form\"] = this.activeModal.find(\n '[data-modal-els=\"iframe-form\"]'\n );\n this.$[\"iframe-loading\"] = this.activeModal.find(\n '[data-modal-els=\"iframe-loading\"]'\n );\n } else {\n this.$[\"body-frame\"] = this.activeModal.find(\n '[data-modal-els=\"body-frame\"]'\n );\n }\n\n //- position 정렬\n this.align();\n\n that = {\n self: this,\n id: opts.id,\n theme: opts.theme,\n width: opts.width,\n height: opts.height,\n state: \"open\",\n $: this.$\n };\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"].css({ height: opts.height });\n this.$[\"iframe\"].css({ height: opts.height });\n\n // iframe content load\n this.$[\"iframe-form\"].attr({ method: opts.iframe.method });\n this.$[\"iframe-form\"].attr({ target: opts.id + \"-frame\" });\n this.$[\"iframe-form\"].attr({ action: opts.iframe.url });\n this.$[\"iframe\"].on(\n \"load\",\n function() {\n that.state = \"load\";\n if (opts.iframeLoadingMsg) {\n this.$[\"iframe-loading\"].hide();\n }\n onStateChanged.call(this, opts, that);\n }.bind(this)\n );\n if (!opts.iframeLoadingMsg) {\n this.$[\"iframe\"].show();\n }\n this.$[\"iframe-form\"].submit();\n }\n\n if (callback) callback.call(that, that);\n\n if (!this.watingModal) {\n onStateChanged.call(this, opts, that);\n }\n\n // bind key event\n if (opts.closeToEsc) {\n jQuery(window).bind(\n \"keydown.ax-modal\",\n function(e) {\n onkeyup.call(this, e || window.event);\n }.bind(this)\n );\n }\n\n jQuery(window).bind(\n \"resize.ax-modal\",\n function(e) {\n this.align(null, e || window.event);\n }.bind(this)\n );\n\n this.$.header\n .off(ENM[\"mousedown\"])\n .off(\"dragstart\")\n .on(ENM[\"mousedown\"], function(e) {\n /// 이벤트 필터링 추가 : 버튼엘리먼트로 부터 발생된 이벤트이면 moveModal 시작하지 않도록 필터링\n let isButton = U.findParentNode(e.target, function(_target) {\n if (_target.getAttribute(\"data-modal-header-btn\")) {\n return true;\n }\n });\n\n if (\n !opts.isFullScreen &&\n !isButton &&\n opts.disableDrag != true\n ) {\n self.mousePosition = getMousePosition(e);\n moveModal.on.call(self);\n }\n if (isButton) {\n btnOnClick.call(self, e || window.event, opts);\n }\n })\n .on(\"dragstart\", function(e) {\n U.stopEvent(e.originalEvent);\n return false;\n });\n\n this.activeModal\n .off(ENM[\"mousedown\"])\n .off(\"dragstart\")\n .on(ENM[\"mousedown\"], \"[data-ax5modal-resizer]\", function(e) {\n if (opts.disableDrag || opts.isFullScreen) return false;\n self.mousePosition = getMousePosition(e);\n resizeModal.on.call(\n self,\n this.getAttribute(\"data-ax5modal-resizer\")\n );\n })\n .on(\"dragstart\", function(e) {\n U.stopEvent(e.originalEvent);\n return false;\n });\n },\n btnOnClick = function(e, opts, callback, target, k) {\n let that;\n if (e.srcElement) e.target = e.srcElement;\n\n target = U.findParentNode(e.target, function(target) {\n if (target.getAttribute(\"data-modal-header-btn\")) {\n return true;\n }\n });\n\n if (target) {\n k = target.getAttribute(\"data-modal-header-btn\");\n\n that = {\n self: this,\n key: k,\n value: opts.header.btns[k],\n dialogId: opts.id,\n btnTarget: target\n };\n\n if (opts.header.btns[k].onClick) {\n opts.header.btns[k].onClick.call(that, k);\n }\n }\n\n that = null;\n opts = null;\n callback = null;\n target = null;\n k = null;\n },\n onkeyup = function(e) {\n if (e.keyCode == ax5.info.eventKeys.ESC) {\n this.close();\n }\n },\n alignProcessor = {\n \"top-left\": function() {\n this.align({ left: \"left\", top: \"top\" });\n },\n \"top-right\": function() {\n this.align({ left: \"right\", top: \"top\" });\n },\n \"bottom-left\": function() {\n this.align({ left: \"left\", top: \"bottom\" });\n },\n \"bottom-right\": function() {\n this.align({ left: \"right\", top: \"bottom\" });\n },\n \"center-middle\": function() {\n this.align({ left: \"center\", top: \"middle\" });\n }\n },\n moveModal = {\n on: function() {\n let modalZIndex = this.activeModal.css(\"z-index\"),\n modalOffset = this.activeModal.offset(),\n modalBox = {\n width: this.activeModal.outerWidth(),\n height: this.activeModal.outerHeight()\n },\n windowBox = {\n width: jQuery(window).width(),\n height: jQuery(window).height(),\n scrollLeft: jQuery(document).scrollLeft(),\n scrollTop: jQuery(document).scrollTop()\n },\n getResizerPosition = function(e) {\n self.__dx = e.clientX - self.mousePosition.clientX;\n self.__dy = e.clientY - self.mousePosition.clientY;\n\n /*\n if (minX > modalOffset.left + self.__dx) {\n self.__dx = -modalOffset.left;\n } else if (maxX < modalOffset.left + self.__dx) {\n self.__dx = maxX - modalOffset.left;\n }\n\n if (minY > modalOffset.top + self.__dy) {\n self.__dy = -modalOffset.top;\n } else if (maxY < modalOffset.top + self.__dy) {\n self.__dy = maxY - modalOffset.top;\n }\n */\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy\n };\n };\n\n let minX = 0,\n maxX = windowBox.width - modalBox.width,\n minY = 0,\n maxY = windowBox.height - modalBox.height;\n\n self.__dx = 0; // 변화량 X\n self.__dy = 0; // 변화량 Y\n\n // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV\n self.resizerBg = jQuery(\n ''\n );\n self.resizer = jQuery(\n ''\n );\n self.resizerBg.css({ zIndex: modalZIndex });\n self.resizer.css({\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height,\n zIndex: modalZIndex + 1\n });\n\n jQuery(document.body)\n .append(self.resizerBg)\n .append(self.resizer);\n\n self.activeModal.addClass(\"draged\");\n\n jQuery(document.body)\n .on(\n ENM[\"mousemove\"] + \".ax5modal-move-\" + this.instanceId,\n function(e) {\n self.resizer.css(getResizerPosition(e));\n }\n )\n .on(\n ENM[\"mouseup\"] + \".ax5modal-move-\" + this.instanceId,\n function(e) {\n moveModal.off.call(self);\n }\n )\n .on(\"mouseleave.ax5modal-move-\" + this.instanceId, function(e) {\n moveModal.off.call(self);\n });\n\n jQuery(document.body)\n .attr(\"unselectable\", \"on\")\n .css(\"user-select\", \"none\")\n .on(\"selectstart\", false);\n },\n off: function() {\n let setModalPosition = function() {\n let box = this.resizer.offset();\n if (!this.modalConfig.absolute) {\n box.left -= jQuery(document).scrollLeft();\n box.top -= jQuery(document).scrollTop();\n }\n this.activeModal.css(box);\n this.modalConfig.left = box.left;\n this.modalConfig.top = box.top;\n\n box = null;\n };\n\n this.activeModal.removeClass(\"draged\");\n setModalPosition.call(this);\n\n this.resizer.remove();\n this.resizer = null;\n this.resizerBg.remove();\n this.resizerBg = null;\n //this.align();\n\n jQuery(document.body)\n .off(ENM[\"mousemove\"] + \".ax5modal-move-\" + this.instanceId)\n .off(ENM[\"mouseup\"] + \".ax5modal-move-\" + this.instanceId)\n .off(\"mouseleave.ax5modal-move-\" + this.instanceId);\n\n jQuery(document.body)\n .removeAttr(\"unselectable\")\n .css(\"user-select\", \"auto\")\n .off(\"selectstart\");\n\n onStateChanged.call(this, self.modalConfig, {\n self: this,\n state: \"move\"\n });\n }\n },\n resizeModal = {\n on: function(resizerType) {\n let modalZIndex = this.activeModal.css(\"z-index\"),\n modalOffset = this.activeModal.offset(),\n modalBox = {\n width: this.activeModal.outerWidth(),\n height: this.activeModal.outerHeight()\n },\n windowBox = {\n width: jQuery(window).width(),\n height: jQuery(window).height(),\n scrollLeft: jQuery(document).scrollLeft(),\n scrollTop: jQuery(document).scrollTop()\n },\n resizerProcessor = {\n top: function(e) {\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width,\n height: modalBox.height - self.__dy * 2\n };\n } else if (e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dy,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dy * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width,\n height: modalBox.height - self.__dy\n };\n }\n },\n bottom: function(e) {\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey) {\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n\n return {\n left: modalOffset.left,\n top: modalOffset.top - self.__dy,\n width: modalBox.width,\n height: modalBox.height + self.__dy * 2\n };\n } else if (e.altKey) {\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dy,\n top: modalOffset.top - self.__dy,\n width: modalBox.width + self.__dy * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height + self.__dy\n };\n }\n },\n left: function(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (e.shiftKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height\n };\n } else if (e.altKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dx,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height - self.__dx * 2\n };\n } else {\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx,\n height: modalBox.height\n };\n }\n },\n right: function(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (e.shiftKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height\n };\n } else if (e.altKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top - self.__dx,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height + self.__dx * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width + self.__dx,\n height: modalBox.height\n };\n }\n },\n \"top-left\": function(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width - self.__dx,\n height: modalBox.height - self.__dy\n };\n }\n },\n \"top-right\": function(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (minHeight > modalBox.height - self.__dy) {\n self.__dy = modalBox.height - minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minHeight > modalBox.height - self.__dy * 2) {\n self.__dy = (modalBox.height - minHeight) / 2;\n }\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top + self.__dy,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height - self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top + self.__dy,\n width: modalBox.width + self.__dx,\n height: modalBox.height - self.__dy\n };\n }\n },\n \"bottom-left\": function(e) {\n if (minWidth > modalBox.width - self.__dx) {\n self.__dx = modalBox.width - minWidth;\n }\n\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minWidth > modalBox.width - self.__dx * 2) {\n self.__dx = (modalBox.width - minWidth) / 2;\n }\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top - self.__dy,\n width: modalBox.width - self.__dx * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left + self.__dx,\n top: modalOffset.top,\n width: modalBox.width - self.__dx,\n height: modalBox.height + self.__dy\n };\n }\n },\n \"bottom-right\": function(e) {\n if (minWidth > modalBox.width + self.__dx) {\n self.__dx = -modalBox.width + minWidth;\n }\n\n if (minHeight > modalBox.height + self.__dy) {\n self.__dy = -modalBox.height + minHeight;\n }\n\n if (e.shiftKey || e.altKey) {\n if (minWidth > modalBox.width + self.__dx * 2) {\n self.__dx = (-modalBox.width + minWidth) / 2;\n }\n if (minHeight > modalBox.height + self.__dy * 2) {\n self.__dy = (-modalBox.height + minHeight) / 2;\n }\n return {\n left: modalOffset.left - self.__dx,\n top: modalOffset.top - self.__dy,\n width: modalBox.width + self.__dx * 2,\n height: modalBox.height + self.__dy * 2\n };\n } else {\n return {\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width + self.__dx,\n height: modalBox.height + self.__dy\n };\n }\n }\n },\n getResizerPosition = function(e) {\n self.__dx = e.clientX - self.mousePosition.clientX;\n self.__dy = e.clientY - self.mousePosition.clientY;\n\n return resizerProcessor[resizerType](e);\n };\n\n let minWidth = 100,\n minHeight = 100;\n\n let cursorType = {\n top: \"row-resize\",\n bottom: \"row-resize\",\n left: \"col-resize\",\n right: \"col-resize\",\n \"top-left\": \"nwse-resize\",\n \"top-right\": \"nesw-resize\",\n \"bottom-left\": \"nesw-resize\",\n \"bottom-right\": \"nwse-resize\"\n };\n\n self.__dx = 0; // 변화량 X\n self.__dy = 0; // 변화량 Y\n\n // self.resizerBg : body 가 window보다 작을 때 문제 해결을 위한 DIV\n self.resizerBg = jQuery(\n ''\n );\n self.resizer = jQuery(\n ''\n );\n self.resizerBg.css({\n zIndex: modalZIndex,\n cursor: cursorType[resizerType]\n });\n self.resizer.css({\n left: modalOffset.left,\n top: modalOffset.top,\n width: modalBox.width,\n height: modalBox.height,\n zIndex: modalZIndex + 1,\n cursor: cursorType[resizerType]\n });\n jQuery(document.body)\n .append(self.resizerBg)\n .append(self.resizer);\n self.activeModal.addClass(\"draged\");\n\n jQuery(document.body)\n .bind(\n ENM[\"mousemove\"] + \".ax5modal-resize-\" + this.instanceId,\n function(e) {\n self.resizer.css(getResizerPosition(e));\n }\n )\n .bind(\n ENM[\"mouseup\"] + \".ax5modal-resize-\" + this.instanceId,\n function(e) {\n resizeModal.off.call(self);\n }\n )\n .bind(\"mouseleave.ax5modal-resize-\" + this.instanceId, function(\n e\n ) {\n resizeModal.off.call(self);\n });\n\n jQuery(document.body)\n .attr(\"unselectable\", \"on\")\n .css(\"user-select\", \"none\")\n .bind(\"selectstart\", false);\n },\n off: function() {\n let setModalPosition = function() {\n let box = this.resizer.offset();\n jQuery.extend(box, {\n width: this.resizer.width(),\n height: this.resizer.height()\n });\n if (!this.modalConfig.absolute) {\n box.left -= jQuery(document).scrollLeft();\n box.top -= jQuery(document).scrollTop();\n }\n this.activeModal.css(box);\n\n this.modalConfig.left = box.left;\n this.modalConfig.top = box.top;\n this.modalConfig.width = box.width;\n this.modalConfig.height = box.height;\n this.$[\"body\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n if (this.modalConfig.iframe) {\n this.$[\"iframe-wrap\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n this.$[\"iframe\"].css({\n height: box.height - this.modalConfig.headerHeight\n });\n }\n\n box = null;\n };\n\n this.activeModal.removeClass(\"draged\");\n setModalPosition.call(this);\n\n this.resizer.remove();\n this.resizer = null;\n this.resizerBg.remove();\n this.resizerBg = null;\n\n onStateChanged.call(this, self.modalConfig, {\n self: this,\n state: \"resize\"\n });\n\n jQuery(document.body)\n .unbind(\n ENM[\"mousemove\"] + \".ax5modal-resize-\" + this.instanceId\n )\n .unbind(ENM[\"mouseup\"] + \".ax5modal-resize-\" + this.instanceId)\n .unbind(\"mouseleave.ax5modal-resize-\" + this.instanceId);\n\n jQuery(document.body)\n .removeAttr(\"unselectable\")\n .css(\"user-select\", \"auto\")\n .unbind(\"selectstart\");\n }\n };\n\n /// private end\n\n /**\n * Preferences of modal UI\n * @method ax5modal.setConfig\n * @param {Object} config - 클래스 속성값\n * @param {Number} [config.zIndex]\n * @param {Object} [config.position]\n * @param {String} [config.position.left=\"center\"]\n * @param {String} [config.position.top=\"middle\"]\n * @param {Number} [config.position.margin=10]\n * @param {String} [config.minimizePosition=\"bottom-right\"]\n * @param {Number} [config.width=300]\n * @param {Number} [config.height=400]\n * @param {Boolean} [config.closeToEsc=true]\n * @param {Boolean} [config.absolute=false]\n * @param {Boolean} [config.disableDrag=false]\n * @param {Boolean} [config.disableResize=false]\n * @param {Number} [config.animateTime=250]\n * @param {Function} [config.fullScreen]\n * @param {Function} [config.onStateChanged] - `onStateChanged` function can be defined in setConfig method or new ax5.ui.modal initialization method. However, you can us to define an event function after initialization, if necessary\n * @param {Function} [config.onResize]\n * @returns {ax5modal}\n * @example\n * ```js\n * var modal = new ax5.ui.modal({\n * iframeLoadingMsg: '',\n * header: {\n * title: \"MODAL TITLE\",\n * btns: {\n * minimize: {\n * label: '', onClick: function () {\n * modal.minimize();\n * }\n * },\n * maximize: {\n * label: '', onClick: function () {\n * modal.maximize();\n * }\n * },\n * close: {\n * label: '', onClick: function () {\n * modal.close();\n * }\n * }\n * }\n * }\n * });\n *\n * modal.open({\n * width: 800,\n * height: 600,\n * fullScreen: function(){\n * return ($(window).width() < 600);\n * },\n * iframe: {\n * method: \"get\",\n * url: \"http://chequer-app:2017/html/login.html\",\n * param: \"callback=modalCallback\"\n * },\n * onStateChanged: function(){\n * console.log(this);\n * },\n * onResize: function(){\n * console.log(this);\n * }\n * });\n * ```\n */\n //== class body start\n this.init = function() {\n this.onStateChanged = cfg.onStateChanged;\n this.onResize = cfg.onResize;\n };\n\n /**\n * open the modal\n * @method ax5modal.open\n * @returns {ax5modal}\n * @example\n * ```\n * modal.open();\n * modal.open({\n * width: 500,\n * height: 500\n * });\n * moaal.open({}, function(){\n * console.log(this);\n * });\n * ```\n */\n this.open = function(opts, callback, tryCount) {\n if (typeof tryCount === \"undefined\") tryCount = 0;\n if (!this.activeModal) {\n opts = self.modalConfig = jQuery.extend(true, {}, cfg, opts);\n open.call(this, opts, callback);\n this.watingModal = false;\n } else if (tryCount < 3) {\n // 3번까지 재 시도\n this.watingModal = true;\n setTimeout(\n function() {\n this.open(opts, callback, tryCount + 1);\n }.bind(this),\n cfg.animateTime\n );\n } else {\n // 열기 시도 종료\n this.watingModal = false;\n }\n return this;\n };\n\n /**\n * close the modal\n * @method ax5modal.close\n * @param _option\n * @returns {ax5modal}\n * @example\n * ```\n * my_modal.close();\n * my_modal.close({callback: function(){\n * // on close event\n * });\n * // close 함수에 callback을 전달하면 정확한 close 타이밍을 캐치할 수 있습니다\n * ```\n */\n\n this.close = function(_option) {\n let opts, that;\n\n if (this.activeModal) {\n opts = self.modalConfig;\n this.activeModal.addClass(\"destroy\");\n jQuery(window).unbind(\"keydown.ax-modal\");\n jQuery(window).unbind(\"resize.ax-modal\");\n\n setTimeout(\n function() {\n // 프레임 제거\n if (opts.iframe) {\n var $iframe = this.$[\"iframe\"]; // iframe jQuery Object\n if ($iframe) {\n var iframeObject = $iframe.get(0),\n idoc = iframeObject.contentDocument\n ? iframeObject.contentDocument\n : iframeObject.contentWindow.document;\n\n try {\n $(idoc.body)\n .children()\n .each(function() {\n $(this).remove();\n });\n } catch (e) {}\n idoc.innerHTML = \"\";\n $iframe.attr(\"src\", \"about:blank\").remove();\n\n // force garbarge collection for IE only\n window.CollectGarbage && window.CollectGarbage();\n }\n }\n\n this.activeModal.remove();\n this.activeModal = null;\n\n // 모달 오픈 대기중이면 닫기 상태 전달 안함.\n if (!this.watingModal) {\n onStateChanged.call(this, opts, {\n self: this,\n state: \"close\"\n });\n }\n\n if (_option && U.isFunction(_option.callback)) {\n that = {\n self: this,\n id: opts.id,\n theme: opts.theme,\n width: opts.width,\n height: opts.height,\n state: \"close\",\n $: this.$\n };\n _option.callback.call(that, that);\n }\n }.bind(this),\n cfg.animateTime\n );\n }\n\n this.minimized = false; // hoksi\n\n return this;\n };\n\n /**\n * @method ax5modal.minimize\n * @returns {ax5modal}\n */\n this.minimize = (function() {\n return function(minimizePosition) {\n if (this.minimized !== true) {\n var opts = self.modalConfig;\n if (typeof minimizePosition === \"undefined\")\n minimizePosition = cfg.minimizePosition;\n\n this.minimized = true;\n this.$.body.hide();\n self.modalConfig.originalHeight = opts.height;\n self.modalConfig.height = 0;\n alignProcessor[minimizePosition].call(this);\n\n onStateChanged.call(this, opts, {\n self: this,\n state: \"minimize\"\n });\n }\n\n return this;\n };\n })();\n\n /**\n * @method ax5modal.restore\n * @returns {ax5modal}\n */\n this.restore = function() {\n var opts = self.modalConfig;\n if (this.minimized) {\n this.minimized = false;\n this.$.body.show();\n self.modalConfig.height = self.modalConfig.originalHeight;\n self.modalConfig.originalHeight = undefined;\n\n this.align({ left: \"center\", top: \"middle\" });\n onStateChanged.call(this, opts, {\n self: this,\n state: \"restore\"\n });\n }\n return this;\n };\n\n /**\n * setCSS\n * @method ax5modal.css\n * @param {Object} css -\n * @returns {ax5modal}\n */\n this.css = function(css) {\n if (this.activeModal && !self.fullScreen) {\n this.activeModal.css(css);\n if (typeof css.width !== \"undefined\") {\n self.modalConfig.width = css.width;\n }\n if (typeof css.height !== \"undefined\") {\n self.modalConfig.height = css.height;\n }\n\n this.align();\n }\n return this;\n };\n\n /**\n * @method ax5modal.setModalConfig\n * @param _config\n * @returns {ax5.ui.ax5modal}\n */\n this.setModalConfig = function(_config) {\n self.modalConfig = jQuery.extend({}, self.modalConfig, _config);\n this.align();\n return this;\n };\n\n /**\n * @method ax5modal.align\n * @param position\n * @param e\n * @returns {ax5modal}\n * @example\n * ```js\n * modal.align({left:\"center\", top:\"middle\"});\n * modal.align({left:\"left\", top:\"top\", margin: 20});\n * ```\n */\n this.align = (function() {\n return function(position, e) {\n if (!this.activeModal) return this;\n\n var opts = self.modalConfig,\n box = {\n width: opts.width,\n height: opts.height\n };\n\n var fullScreen = (opts.isFullScreen = (function(_fullScreen) {\n if (typeof _fullScreen === \"undefined\") {\n return false;\n } else if (U.isFunction(_fullScreen)) {\n return _fullScreen();\n }\n })(opts.fullScreen));\n\n if (fullScreen) {\n if (opts.header) this.$.header.show();\n if (opts.header) {\n opts.headerHeight = this.$.header.outerHeight();\n box.height += opts.headerHeight;\n } else {\n opts.headerHeight = 0;\n }\n box.width = jQuery(window).width();\n box.height = opts.height;\n box.left = 0;\n box.top = 0;\n } else {\n if (opts.header) this.$.header.show();\n if (position) {\n jQuery.extend(true, opts.position, position);\n }\n\n if (opts.header) {\n opts.headerHeight = this.$.header.outerHeight();\n box.height += opts.headerHeight;\n } else {\n opts.headerHeight = 0;\n }\n\n //- position 정렬\n if (opts.position.left == \"left\") {\n box.left = opts.position.margin || 0;\n } else if (opts.position.left == \"right\") {\n // window.innerWidth;\n box.left =\n jQuery(window).width() -\n box.width -\n (opts.position.margin || 0);\n } else if (opts.position.left == \"center\") {\n box.left = jQuery(window).width() / 2 - box.width / 2;\n } else {\n box.left = opts.position.left || 0;\n }\n\n if (opts.position.top == \"top\") {\n box.top = opts.position.margin || 0;\n } else if (opts.position.top == \"bottom\") {\n box.top =\n jQuery(window).height() -\n box.height -\n (opts.position.margin || 0);\n } else if (opts.position.top == \"middle\") {\n box.top = jQuery(window).height() / 2 - box.height / 2;\n } else {\n box.top = opts.position.top || 0;\n }\n if (box.left < 0) box.left = 0;\n if (box.top < 0) box.top = 0;\n\n if (opts.absolute) {\n box.top += jQuery(window).scrollTop();\n box.left += jQuery(window).scrollLeft();\n }\n }\n\n this.activeModal.css(box);\n\n this.$[\"body\"].css({\n height: box.height - (opts.headerHeight || 0)\n });\n\n if (opts.iframe) {\n this.$[\"iframe-wrap\"].css({\n height: box.height - opts.headerHeight\n });\n this.$[\"iframe\"].css({ height: box.height - opts.headerHeight });\n } else {\n }\n return this;\n };\n })();\n\n // 클래스 생성자\n this.main = function() {\n UI.modal_instance = UI.modal_instance || [];\n UI.modal_instance.push(this);\n\n if (arguments && U.isObject(arguments[0])) {\n this.setConfig(arguments[0]);\n }\n }.apply(this, arguments);\n };\n })()\n );\n\n MODAL = ax5.ui.modal;\n})();\n","// ax5.ui.modal.tmpl\n(function () {\n var MODAL = ax5.ui.modal;\n\n var content = function () {\n return ` \n \n {{#header}}\n \n {{{title}}}\n {{#btns}}\n \n {{#@each}}\n {{{@value.label}}}\n {{/@each}}\n \n {{/btns}}\n \n {{/header}}\n \n {{#iframe}}\n \n {{{iframeLoadingMsg}}}\n \n \n \n \n {{#param}}\n {{#@each}}\n \n {{/@each}}\n {{/param}}\n \n {{/iframe}}\n {{^iframe}}\n \n {{/iframe}}\n \n {{^disableResize}}\n \n \n \n \n \n \n \n \n {{/disableResize}}\n \n `;\n };\n\n MODAL.tmpl = {\n \"content\": content,\n\n get: function (tmplName, data, columnKeys) {\n return ax5.mustache.render(MODAL.tmpl[tmplName].call(this, columnKeys), data);\n }\n };\n})();"]} \ No newline at end of file diff --git a/_src/plugins/jquery-ui-1.12.1.custom/AUTHORS.txt b/_src/plugins/jquery-ui-1.12.1.custom/AUTHORS.txt deleted file mode 100644 index a75056b..0000000 --- a/_src/plugins/jquery-ui-1.12.1.custom/AUTHORS.txt +++ /dev/null @@ -1,333 +0,0 @@ -Authors ordered by first contribution -A list of current team members is available at http://jqueryui.com/about - -Paul Bakaus -Richard Worth -Yehuda Katz -Sean Catchpole -John Resig -Tane Piper -Dmitri Gaskin -Klaus Hartl -Stefan Petre -Gilles van den Hoven -Micheil Bryan Smith -Jörn Zaefferer -Marc Grabanski -Keith Wood -Brandon Aaron -Scott González -Eduardo Lundgren -Aaron Eisenberger -Joan Piedra -Bruno Basto -Remy Sharp -Bohdan Ganicky -David Bolter -Chi Cheng -Ca-Phun Ung -Ariel Flesler -Maggie Wachs -Scott Jehl -Todd Parker -Andrew Powell -Brant Burnett -Douglas Neiner -Paul Irish -Ralph Whitbeck -Thibault Duplessis -Dominique Vincent -Jack Hsu -Adam Sontag -Carl Fürstenberg -Kevin Dalman -Alberto Fernández Capel -Jacek Jędrzejewski (http://jacek.jedrzejewski.name) -Ting Kuei -Samuel Cormier-Iijima -Jon Palmer -Ben Hollis -Justin MacCarthy -Eyal Kobrigo -Tiago Freire -Diego Tres -Holger Rüprich -Ziling Zhao -Mike Alsup -Robson Braga Araujo -Pierre-Henri Ausseil -Christopher McCulloh -Andrew Newcomb -Lim Chee Aun -Jorge Barreiro -Daniel Steigerwald -John Firebaugh -John Enters -Andrey Kapitcyn -Dmitry Petrov -Eric Hynds -Chairat Sunthornwiphat -Josh Varner -Stéphane Raimbault -Jay Merrifield -J. Ryan Stinnett -Peter Heiberg -Alex Dovenmuehle -Jamie Gegerson -Raymond Schwartz -Phillip Barnes -Kyle Wilkinson -Khaled AlHourani -Marian Rudzynski -Jean-Francois Remy -Doug Blood -Filippo Cavallarin -Heiko Henning -Aliaksandr Rahalevich -Mario Visic -Xavi Ramirez -Max Schnur -Saji Nediyanchath -Corey Frang -Aaron Peterson -Ivan Peters -Mohamed Cherif Bouchelaghem -Marcos Sousa -Michael DellaNoce -George Marshall -Tobias Brunner -Martin Solli -David Petersen -Dan Heberden -William Kevin Manire -Gilmore Davidson -Michael Wu -Adam Parod -Guillaume Gautreau -Marcel Toele -Dan Streetman -Matt Hoskins -Giovanni Giacobbi -Kyle Florence -Pavol Hluchý -Hans Hillen -Mark Johnson -Trey Hunner -Shane Whittet -Edward A Faulkner -Adam Baratz -Kato Kazuyoshi -Eike Send -Kris Borchers -Eddie Monge -Israel Tsadok -Carson McDonald -Jason Davies -Garrison Locke -David Murdoch -Benjamin Scott Boyle -Jesse Baird -Jonathan Vingiano -Dylan Just -Hiroshi Tomita -Glenn Goodrich -Tarafder Ashek-E-Elahi -Ryan Neufeld -Marc Neuwirth -Philip Graham -Benjamin Sterling -Wesley Walser -Kouhei Sutou -Karl Kirch -Chris Kelly -Jason Oster -Felix Nagel -Alexander Polomoshnov -David Leal -Igor Milla -Dave Methvin -Florian Gutmann -Marwan Al Jubeh -Milan Broum -Sebastian Sauer -Gaëtan Muller -Michel Weimerskirch -William Griffiths -Stojce Slavkovski -David Soms -David De Sloovere -Michael P. Jung -Shannon Pekary -Dan Wellman -Matthew Edward Hutton -James Khoury -Rob Loach -Alberto Monteiro -Alex Rhea -Krzysztof Rosiński -Ryan Olton -Genie <386@mail.com> -Rick Waldron -Ian Simpson -Lev Kitsis -TJ VanToll -Justin Domnitz -Douglas Cerna -Bert ter Heide -Jasvir Nagra -Yuriy Khabarov <13real008@gmail.com> -Harri Kilpiö -Lado Lomidze -Amir E. Aharoni -Simon Sattes -Jo Liss -Guntupalli Karunakar -Shahyar Ghobadpour -Lukasz Lipinski -Timo Tijhof -Jason Moon -Martin Frost -Eneko Illarramendi -EungJun Yi -Courtland Allen -Viktar Varvanovich -Danny Trunk -Pavel Stetina -Michael Stay -Steven Roussey -Michael Hollis -Lee Rowlands -Timmy Willison -Karl Swedberg -Baoju Yuan -Maciej Mroziński -Luis Dalmolin -Mark Aaron Shirley -Martin Hoch -Jiayi Yang -Philipp Benjamin Köppchen -Sindre Sorhus -Bernhard Sirlinger -Jared A. Scheel -Rafael Xavier de Souza -John Chen -Robert Beuligmann -Dale Kocian -Mike Sherov -Andrew Couch -Marc-Andre Lafortune -Nate Eagle -David Souther -Mathias Stenbom -Sergey Kartashov -Avinash R -Ethan Romba -Cory Gackenheimer -Juan Pablo Kaniefsky -Roman Salnikov -Anika Henke -Samuel Bovée -Fabrício Matté -Viktor Kojouharov -Pawel Maruszczyk (http://hrabstwo.net) -Pavel Selitskas -Bjørn Johansen -Matthieu Penant -Dominic Barnes -David Sullivan -Thomas Jaggi -Vahid Sohrabloo -Travis Carden