Skip to content

Instantly share code, notes, and snippets.

View thomasJang's full-sized avatar
🎯
Focusing

JANG KI-YOUNG thomasJang

🎯
Focusing
View GitHub Profile
@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) {
git rm -rf .idea; git commit -m "delete .idea"; git push;
@thomasJang
thomasJang / colgroup.js
Created August 23, 2016 14:21
AXGrid inline-edit editor options 함수로 채우기
{
key: "combobox1", label: "combobox1", width: "100",
formatter: function () {
return this.value.NM;
},
editor: {
type: "select",
optionValue: "CD",
optionText: "NM",
options: function () {
axboot
.call({
type: "GET", url: "/api/v1/programs", data: "",
callBack: function (res) {
var programList = [];
res.list.forEach(function (n) {
programList.push({
value: n.progCd, text: n.progNm + "(" + n.progCd + ")",
progCd: n.progCd, progNm: n.progNm,
data: n
@thomasJang
thomasJang / jsdoc.sample.js
Created September 29, 2016 01:10
jsdoc.sample.js
/**
* @method ax5grid.addRow
* @param {Object} _row
* @param {Number|String} [_dindex=last]
* @returns {ax5grid}
* @example
* ```js
* ax5Grid.addRow($.extend({}, {...}), "first");
* ```
*/
@thomasJang
thomasJang / ax5select-ajax.js
Created October 7, 2016 06:39
ax5select-ajax.js
$('[data-ax5select="printerGrpId"]').ax5select({
columnKeys: {
optionValue: "id",
optionText: "groupNm"
},
onExpand: function (callback) {
if (_this.stores && _this.stores[0]) {
axboot.ajax({
type: "GET",
url: "/api/v1/printers/groups",
@thomasJang
thomasJang / htmlEncode.js
Created October 29, 2016 13:23
htmlEncode
function htmlEncode( html ) {
return document.createElement( 'a' ).appendChild(
document.createTextNode( html ) ).parentNode.innerHTML;
};
function htmlDecode( html ) {
var a = document.createElement( 'a' ); a.innerHTML = html;
return a.textContent;
};
@thomasJang
thomasJang / axboot.config.js
Created November 14, 2016 07:59
axboot.config.js
(function () {
if (axboot && axboot.def) {
axboot.def["DEFAULT_TAB_LIST"] = [
{menuId: "00-dashboard", id: "dashboard", progNm: '홈', menuNm: '홈', progPh: '/jsp/dashboard.jsp', url: '/jsp/dashboard.jsp?progCd=dashboard', status: "on", fixed: true}
];
axboot.def["API"] = {
"users": "/api/v1/users",
"commonCodes": "/api/v1/commonCodes",
@thomasJang
thomasJang / 스웨거API테이블로뽑아내는.js
Created December 29, 2016 11:17
스웨거API테이블로뽑아내는.js
var po = [];
po.push("<table>");
$(".operations .heading").each(function(){
po.push("<tr>");
po.push("<td>" + $(this).find(".http_method").text().trim() + "</td>");
po.push("<td>" + $(this).find(".path").text().trim() + "</td>");
po.push("</tr>");
});
po.push("</table>");
@thomasJang
thomasJang / html.html
Created January 18, 2017 07:43
Chartjs line chart sample
<canvas id="canvas" width="500" height="100"></canvas>