Skip to content

Commit 9b26c1c

Browse files
committed
initialize
0 parents  commit 9b26c1c

File tree

2,060 files changed

+313541
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,060 files changed

+313541
-0
lines changed

assets/css/axboot-01.css

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/axboot-02.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/axboot-03.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/axboot.css

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/favicon.ico

5.3 KB
Binary file not shown.

assets/images/devtools-logo.png

5.93 KB
Loading

assets/images/header-logo.png

5.74 KB
Loading

assets/images/login-bg.jpg

60.8 KB
Loading

assets/images/login-logo.png

7.71 KB
Loading

assets/images/logo.png

18.8 KB
Loading

assets/images/ztree/line_conn.gif

1.14 KB
Loading

assets/images/ztree/line_conn.png

1 KB
Loading

assets/images/ztree/loading.gif

381 Bytes
Loading

assets/images/ztree/metro.gif

7.43 KB
Loading

assets/images/ztree/metro.png

17.9 KB
Loading

assets/js/axboot/dist/axboot.js

+2,609
Large diffs are not rendered by default.

assets/js/axboot/dist/axboot.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/axboot/dist/axboot.min.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/axboot/dist/good-words.js

+508
Large diffs are not rendered by default.

assets/js/axboot/src/_axboot.js

+219
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
/**
2+
* axboot 오브젝트 axboot 애플리케이션을 편리하게 사용하기 위한 오브젝트 입니다.
3+
* @var {Object} axboot
4+
*/
5+
var axboot = {};
6+
7+
/**
8+
* axboot의 환경 변수 저장 공간
9+
* @type {Object} axboot.def
10+
* @example
11+
* ```js
12+
* axboot.def.menuHeight = 20;
13+
* // 와 같이 원하는 속성을 저장 / 사용 할 수 있다.
14+
* ```
15+
*/
16+
axboot.def = {
17+
"pageFunctionName": "fnObj",
18+
"iframeLoadingMsg": '<i class="cqc-chequer ax-loading-icon lg"></i>',
19+
"dialogTitle": "CHEQUER"
20+
};
21+
22+
23+
/**
24+
* document ready 상태가 되었을 때 실행됩니다. 애플리케이션 초기화를 담당합니다.
25+
* @method axboot.init
26+
*/
27+
axboot.init = function () {
28+
axboot.pageAutoHeight.init();
29+
axboot.pageAutoHeight.align();
30+
31+
setTimeout(function () {
32+
$('[data-ax5layout]').ax5layout({
33+
splitter: {
34+
size: 6
35+
},
36+
autoResize: false,
37+
onStateChanged: function () {
38+
39+
},
40+
onResize: function () {
41+
axboot.layoutResize();
42+
},
43+
onOpenTab: function () {
44+
var activeTabPanel = this.activePanel.$target.get(0);
45+
46+
this.activePanel.$target.find('[data-fit-height-content]').each(function () {
47+
var $this = $(this);
48+
var _pHeight = $this.offsetParent().height();
49+
var name = this.getAttribute("data-fit-height-content");
50+
var _asideHeight = 0;
51+
$('[data-fit-height-aside="' + name + '"]').each(function () {
52+
_asideHeight += $(this).outerHeight();
53+
});
54+
$this.css({height: _pHeight - _asideHeight});
55+
});
56+
57+
if (ax5.ui.grid_instance) {
58+
for (var gi = 0, gl = ax5.ui.grid_instance.length; gi < gl; gi++) {
59+
var target = ax5.util.findParentNode(ax5.ui.grid_instance[gi].$target.get(0), function (_el) {
60+
return activeTabPanel == _el;
61+
});
62+
if (target) {
63+
ax5.ui.grid_instance[gi].setHeight(ax5.ui.grid_instance[gi].$target.height());
64+
}
65+
}
66+
}
67+
}
68+
}); // 레이아웃 플러그인 실행
69+
70+
if (typeof parent.COMMON_CODE === "undefined" && (window.SCRIPT_SESSION && SCRIPT_SESSION.login)) {
71+
// API : /api/v1/commonCodes/getAllByMap
72+
axboot.ajax({
73+
url: "/api/v1/commonCodes/getAllByMap",
74+
callback: function (res) {
75+
parent.COMMON_CODE = axboot.convertCode(res);
76+
axboot.pageStart();
77+
},
78+
options: {nomask: true}
79+
});
80+
} else {
81+
parent.COMMON_CODE = axboot.convertCode(parent.COMMON_CODE);
82+
axboot.pageStart();
83+
}
84+
85+
var debounceFn = ax5.util.debounce(function (val) {
86+
axboot.pageResize();
87+
axboot.pageAutoHeight.align();
88+
$('[data-ax5layout]').ax5layout("reset");
89+
}, 20);
90+
91+
$(window).resize(function () {
92+
debounceFn();
93+
});
94+
$(document.body).on("click", function () {
95+
if (window.parent != window) {
96+
$(parent.document.body).trigger("click");
97+
}
98+
});
99+
});
100+
};
101+
102+
/**
103+
* axboot.def.pageFunctionName의 pageStart를 실행해 줍니다.
104+
* @method axboot.pageStart
105+
*
106+
*/
107+
axboot.pageStart = function () {
108+
if (window[axboot.def.pageFunctionName] && window[axboot.def.pageFunctionName].pageStart) {
109+
// 프레임 셋에 타이머 초기화.
110+
if (top.fnObj && top.fnObj.activityTimerView) {
111+
top.fnObj.activityTimerView.update();
112+
}
113+
window[axboot.def.pageFunctionName].pageStart();
114+
}
115+
};
116+
/**
117+
* axboot.def.pageFunctionName의 pageResize를 실행해 줍니다.
118+
* @method axboot.pageResize
119+
*/
120+
axboot.pageResize = function () {
121+
if (window[axboot.def.pageFunctionName] && window[axboot.def.pageFunctionName].pageResize) {
122+
window[axboot.def.pageFunctionName].pageResize();
123+
}
124+
};
125+
126+
/**
127+
* 페이지내부에 선언된 ax5layout안에 UI들에 강제 resize이벤트 발생시켜 줌.
128+
* @method axboot.layoutResize
129+
*/
130+
axboot.layoutResize = function (_delay) {
131+
132+
133+
$('[data-fit-height-content]').each(function () {
134+
var $this = $(this);
135+
var _pHeight = $this.offsetParent().height();
136+
var name = this.getAttribute("data-fit-height-content");
137+
var _asideHeight = 0;
138+
$('[data-fit-height-aside="' + name + '"]').each(function () {
139+
_asideHeight += $(this).outerHeight();
140+
});
141+
$this.css({height: _pHeight - _asideHeight});
142+
});
143+
144+
function fn(){
145+
if (ax5.ui.grid_instance) {
146+
var gi = ax5.ui.grid_instance.length;
147+
while (gi--) {
148+
ax5.ui.grid_instance[gi].setHeight(ax5.ui.grid_instance[gi].$target.height());
149+
}
150+
}
151+
if (ax5.ui.mask_instance) {
152+
var mi = ax5.ui.mask_instance.length;
153+
while (mi--) {
154+
ax5.ui.mask_instance[mi].align();
155+
}
156+
}
157+
if (ax5.ui.autocomplete_instance) {
158+
ax5.ui.autocomplete_instance.align();
159+
}
160+
if (ax5.ui.combobox_instance) {
161+
ax5.ui.combobox_instance.align();
162+
}
163+
}
164+
if(_delay){
165+
setTimeout(function(){
166+
fn();
167+
}, _delay);
168+
}else{
169+
fn();
170+
}
171+
};
172+
173+
/**
174+
* 페이지안에 [role="page-content"] 과 그 외의 부분의 높이를 계산하여 페이지 안에 컨텐츠의 높이들을 꽉 차게 해줍니다.
175+
* @Object {Object} axboot.pageAutoHeight
176+
*/
177+
axboot.pageAutoHeight = {
178+
/**
179+
* @method axboot.pageAutoHeight.init
180+
*/
181+
init: function () {
182+
this.active = $(document.body).attr("data-page-auto-height");
183+
},
184+
/**
185+
* @method axboot.pageAutoHeight.align
186+
*/
187+
align: function () {
188+
if (!this.active) return false;
189+
// page-content-auto-height
190+
(function () {
191+
var winHeight = $(window).height();
192+
var minusHeight = 0;
193+
$('[role^="page-"]').each(function () {
194+
var sectionName = this.getAttribute("role");
195+
if (sectionName != "page-content") {
196+
minusHeight += $(this).outerHeight();
197+
}
198+
});
199+
var contentHeight = winHeight - minusHeight - 10;
200+
$('[role="page-content"]').css({height: contentHeight});
201+
})();
202+
}
203+
};
204+
205+
///// ~~~~~~~~~~~~~~~~~~~~~~
206+
$(document.body).ready(function () {
207+
axboot.preparePlugin.pageStart();
208+
axboot.init();
209+
210+
document.createElement("lang");
211+
});
212+
213+
window.onError = function(){
214+
window.CollectGarbage && window.CollectGarbage();
215+
};
216+
217+
window.onUnload = function () {
218+
window.CollectGarbage && window.CollectGarbage();
219+
};

assets/js/axboot/src/modules/ajax.js

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/**
2+
* @method axboot.ajax
3+
* @param {Object} http
4+
* @param {String} http.type
5+
* @param {String} http.url
6+
* @param {Object|String} http.data
7+
* @param {Function} http.callback
8+
* @param {Object} [http.options]
9+
* @param {Boolean} [http.options.nomask = false]
10+
* @param {Function} [http.options.onError]
11+
* @param {String} [http.options.contentType]
12+
* @param {String} [http.options.apiType]
13+
* @example
14+
* ```js
15+
* // 기본 에러가 나면 알어서 처리 함.
16+
* axboot.ajax({
17+
* type: "GET",
18+
* url: "/api/v1/users",
19+
* data : {},
20+
* callback: function(response){
21+
* // do something
22+
* }
23+
* });
24+
*
25+
* // onError 지정
26+
* axboot.ajax({
27+
* type: "GET",
28+
* url: "/api/v1/users",
29+
* data : {},
30+
* callback: function(response){
31+
* // do something
32+
* },
33+
* options: {
34+
* onError: function(err){
35+
* // console.log(err);
36+
* }
37+
* }
38+
* });
39+
* ```
40+
*/
41+
axboot.ajax = (function () {
42+
43+
var queue = [];
44+
var defaultOption = {
45+
apiType: "",
46+
contentType: 'application/json'
47+
};
48+
49+
return function (http) {
50+
var jqxhr, httpOpts, callback;
51+
var options = $.extend(true, {}, defaultOption, http.options);
52+
if (!options.nomask) axAJAXMask.open();
53+
54+
queue.push("1");
55+
56+
httpOpts = {
57+
contentType: options.contentType
58+
};
59+
60+
var url = "";
61+
if (ax5.util.isArray(http.url)) {
62+
if (http.url[0] in axboot.def["API"]) {
63+
http.url[0] = axboot.def["API"][http.url[0]];
64+
http.url = CONTEXT_PATH + http.url.join('/');
65+
} else {
66+
http.url = CONTEXT_PATH + http.url.join('/');
67+
}
68+
} else {
69+
http.url = CONTEXT_PATH + http.url;
70+
}
71+
72+
$.extend(http, httpOpts);
73+
74+
callback = http.callback;
75+
76+
jqxhr = $.ajax(http);
77+
jqxhr.done(function (data, textStatus, jqXHR) {
78+
if (typeof data == "string") {
79+
arguments[0] = data = (data == "") ? {} : JSON.parse(data);
80+
}
81+
82+
if (data.redirect && options.apiType != "login") {
83+
location.href = data.redirect;
84+
return;
85+
}
86+
87+
if (data.error) {
88+
if (options.onError) {
89+
options.onError(data.error);
90+
} else {
91+
alert(data.error.message);
92+
if (data.error.requiredKey) {
93+
$('[data-ax-path="' + data.error.requiredKey + '"]').focus();
94+
}
95+
}
96+
} else {
97+
var args = [].concat($.makeArray(arguments));
98+
if (callback) callback.apply(this, args); // callback
99+
}
100+
101+
}).fail(function (data, textStatus, msg) {
102+
if (msg == "") {
103+
104+
}
105+
else {
106+
if (callback) callback.apply(this, [{
107+
error: {message: msg}
108+
}]); // callback
109+
}
110+
}).always(function (data, textStatus, jqXHR) {
111+
queue.pop();
112+
113+
// 프레임 셋에 타이머 초기화.
114+
if (top.fnObj && top.fnObj.activityTimerView) {
115+
top.fnObj.activityTimerView.update();
116+
}
117+
118+
if (!options.nomask) if (queue.length == 0) axAJAXMask.close(300);
119+
});
120+
}
121+
})();

0 commit comments

Comments
 (0)