linkkf 로직수정중
This commit is contained in:
@@ -10,12 +10,13 @@ function j_button_group(h) {
|
||||
}
|
||||
|
||||
// primary, secondary, success, danger, warning, info, light, dark, white
|
||||
function j_button(id, text, data={}, color='primary', outline=true, small=false) {
|
||||
function j_button(id, text, data={}, color='primary', outline=true, small=false, _class='') {
|
||||
var str = '<button id="'+id+'" name="'+id+'" class="btn btn-sm btn';
|
||||
if (outline) {
|
||||
str += '-outline';
|
||||
}
|
||||
str += '-' + color+'';
|
||||
str += ' ' + _class;
|
||||
if (small) {
|
||||
str += ' py-0" style="font-size: 0.8em;"';
|
||||
} else {
|
||||
@@ -35,9 +36,14 @@ function j_button_small(id, text, data={}, color='primary', outline=true) {
|
||||
|
||||
|
||||
function j_row_start(padding='10', align='center') {
|
||||
var str = '<div class="row" style="padding-top: '+padding+'px; padding-bottom:'+padding+'px; align-items:'+align+';">';
|
||||
var str = '<div class="row chover" style="padding-top: '+padding+'px; padding-bottom:'+padding+'px; align-items:'+align+';">';
|
||||
return str;
|
||||
}
|
||||
function j_row_start_hover(padding='10', align='center') {
|
||||
var str = '<div class="row my_hover" style="padding-top: '+padding+'px; padding-bottom:'+padding+'px; align-items:'+align+';">';
|
||||
return str;
|
||||
}
|
||||
|
||||
function j_col(w, h, align='left') {
|
||||
var str = '<div class="col-sm-' + w + ' " style="text-align: '+align+'; word-break:break-all;">';
|
||||
str += h;
|
||||
@@ -45,6 +51,13 @@ function j_col(w, h, align='left') {
|
||||
return str;
|
||||
}
|
||||
|
||||
function j_col_with_class(w, h, align='left', _class='context_menu') {
|
||||
var str = '<div class="col-sm-' + w + ' '+_class+'" style="text-align: '+align+'; word-break:break-all;">';
|
||||
str += h;
|
||||
str += '</div>';
|
||||
return str;
|
||||
}
|
||||
|
||||
function j_col_wide(w, h, align='left') {
|
||||
var str = '<div class="col-sm-' + w + ' " style="padding:0px; margin:0px; text-align: '+align+'; word-break:break-all;">';
|
||||
str += h;
|
||||
@@ -87,57 +100,101 @@ function j_row_info(left, right, l=2, r=8) {
|
||||
function j_progress(id, width, label) {
|
||||
var str = '';
|
||||
str += '<div class="progress" style="height: 25px;">'
|
||||
str += '<div id="'+id+'" class="progress-bar" style="background-color:yellow;width:'+width+'%"></div>';
|
||||
str += '<div id="'+id+'_label" class="justify-content-center d-flex w-100 " style="margin-top:2px">'+label+'</div>';
|
||||
str += '<div id="'+id+'" class="progress-bar bg-success" style="width:'+width+'%"></div>';
|
||||
str += '<div id="'+id+'_label" class="justify-content-center d-flex w-100 position-absolute" style="margin-top:2px">'+label+'</div>';
|
||||
str += '</div>'
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
function j_td(text, width='10', align='center', colspan='1') {
|
||||
str = '<td scope="col" colspan="'+colspan+'" style="width:'+width+'%; text-align:'+align+';">'+ text + '</td>';
|
||||
return str;
|
||||
}
|
||||
|
||||
function j_th(text, width='10', align='center', colspan='1') {
|
||||
str = '<th scope="col" colspan="'+colspan+'" style="width:'+width+'%; text-align:'+align+';">'+ text + '</td>';
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function make_log(key, value, left=2, right=10) {
|
||||
row = m_col(left, key, aligh='right');
|
||||
row += m_col(right, value, aligh='left');
|
||||
function j_info_text(key, value, left=2, right=10) {
|
||||
row = j_row_start(0);
|
||||
row += j_col(left, '<strong>' + key + '</strong>', aligh='right');
|
||||
row += j_col(right, value, aligh='left');
|
||||
row += j_row_end();
|
||||
return row;
|
||||
}
|
||||
|
||||
function j_info_text_left(key, value, left=3, right=9) {
|
||||
row = j_row_start(0);
|
||||
row += j_col(left, '<strong>' + key + '</strong>', aligh='left');
|
||||
row += j_col(right, value, aligh='left');
|
||||
row += j_row_end();
|
||||
return row;
|
||||
}
|
||||
|
||||
|
||||
function j_tab_make(data) {
|
||||
str = '<nav><div class="nav nav-tabs" id="nav-tab" role="tablist">';
|
||||
for (i in data) {
|
||||
if (data[i][2]) {
|
||||
str += '<a class="nav-item nav-link active" id="tab_head_'+data[i][0]+'" data-toggle="tab" href="#tab_content_'+data[i][0]+'" role="tab">'+data[i][1]+'</a>';
|
||||
} else {
|
||||
str += '<a class="nav-item nav-link" id="tab_head_'+data[i][0]+'" data-toggle="tab" href="#tab_content_'+data[i][0]+'" role="tab">'+data[i][1]+'</a>';
|
||||
}
|
||||
}
|
||||
str += '</div></nav>';
|
||||
str += '<div class="tab-content" id="nav-tabContent">';
|
||||
for (i in data) {
|
||||
if (data[i][2]) {
|
||||
str += '<div class="tab-pane fade show active" id="tab_content_'+data[i][0]+'" role="tabpanel" ></div>';
|
||||
} else {
|
||||
str += '<div class="tab-pane fade show" id="tab_content_'+data[i][0]+'" role="tabpanel" ></div>';
|
||||
}
|
||||
}
|
||||
str += '</div>';
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
// javascript에서 화면 생성
|
||||
function text_color(text, color='red') {
|
||||
return '<span style="color:'+color+'; font-weight:bold">' + text + '</span>';
|
||||
}
|
||||
|
||||
|
||||
function j_pre(text) {
|
||||
return '<pre style="word-wrap: break-word;white-space: pre-wrap;white-space: -moz-pre-wrap;white-space: -pre-wrap;white-space: -o-pre-wrap;word-break:break-all;">'+text+'</pre>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -277,10 +334,7 @@ document.addEventListener("DOMContentLoaded", function(){
|
||||
|
||||
|
||||
|
||||
function m_row_start_hover(padding='10', align='center') {
|
||||
var str = '<div class="row my_hover" style="padding-top: '+padding+'px; padding-bottom:'+padding+'px; align-items:'+align+';">';
|
||||
return str;
|
||||
}
|
||||
|
||||
function m_row_start_top(padding='10') {
|
||||
return m_row_start(padding, 'top');
|
||||
}
|
||||
@@ -309,46 +363,5 @@ function m_row_start_color2(padding='10', align='center') {
|
||||
|
||||
|
||||
|
||||
function m_tab_head(name, active) {
|
||||
if (active) {
|
||||
var str = '<a class="nav-item nav-link active" id="id_'+name+'" data-toggle="tab" href="#'+name+'" role="tab">'+name+'</a>';
|
||||
} else {
|
||||
var str = '<a class="nav-item nav-link" id="id_'+name+'" data-toggle="tab" href="#'+name+'" role="tab">'+name+'</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function m_tab_content(name, content, active) {
|
||||
if (active) {
|
||||
var str = '<div class="tab-pane fade show active" id="'+name+'" role="tabpanel" >';
|
||||
} else {
|
||||
var str = '<div class="tab-pane fade show" id="'+name+'" role="tabpanel" >';
|
||||
}
|
||||
str += content;
|
||||
str += '</div>'
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function m_progress2(id, width, label) {
|
||||
var str = '';
|
||||
str += '<div class="progress" style="height: 25px;">'
|
||||
str += '<div id="'+id+'" class="progress-bar" style="background-color:yellow;width:'+width+'%"></div>';
|
||||
str += '<div id="'+id+'_label" class="justify-content-center d-flex w-100 position-absolute" style="margin:0px; margin-top:2px">'+label+'</div>';
|
||||
str += '</div>'
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user