Browse Source

휘파람보드 1.2.0

- 대규모 업데이트
master
장선근 5 years ago
parent
commit
876f4aca8b
  1. 40
      _src/admin/js/admin.js
  2. 12
      _src/admin/scss/common/_utility.scss
  3. 6
      _src/admin/scss/components/_grid.scss
  4. 2
      public_html/assets/css/admin.min.css
  5. 2
      public_html/assets/css/admin.min.css.map
  6. BIN
      public_html/assets/images/admin/grip-handle.png
  7. 2
      public_html/assets/js/admin.min.js
  8. 2
      public_html/assets/js/admin.min.js.map
  9. 19
      wheeparam/application/controllers/admin/Management.php
  10. 25
      wheeparam/application/controllers/admin/ajax/Management.php
  11. 1
      wheeparam/config/wheeparam.sql
  12. 28
      wheeparam/views/themes/admin/management/banner.php
  13. 133
      wheeparam/views/themes/admin/management/banner_form.php
  14. 56
      wheeparam/views/themes/admin/management/banner_group_form.php
  15. 47
      wheeparam/views/themes/admin/management/faq.php
  16. 21
      wheeparam/views/themes/admin/management/faq_category_form.php
  17. 29
      wheeparam/views/themes/admin/management/faq_form.php
  18. 2
      wheeparam/views/themes/admin/statics/browser.php
  19. 2
      wheeparam/views/themes/admin/statics/device.php
  20. 2
      wheeparam/views/themes/admin/statics/keyword.php
  21. 2
      wheeparam/views/themes/admin/statics/os.php
  22. 2
      wheeparam/views/themes/admin/statics/referrer.php
  23. 2
      wheeparam/views/themes/admin/statics/times.php

40
_src/admin/js/admin.js

@ -6,6 +6,7 @@ APP.init = function(){
APP.initAx5(); APP.initAx5();
APP.initPlugins(); APP.initPlugins();
APP.initFitHeight(); APP.initFitHeight();
APP.initSortableList();
DevExpress.localization.locale('ko'); DevExpress.localization.locale('ko');
}; };
@ -82,6 +83,45 @@ APP.initPlugins = function() {
}); });
}; };
APP.initSortableList = function() {
$('[data-toggle="sortable"]').each(function(){
if( $(this).hasClass('has-sortable') ) return true;
$(this).addClass('has-sortable');
var $this = $(this);
var key = $(this).data('key');
var table = $(this).data('table');
var sort = $(this).data('sort');
$this.sortable({
handle : '.move-grip',
update : function() {
var sortArray = [];
$('input[name="'+key+'[]"]').each(function(){
sortArray.push( $(this).val() );
});
$.ajax({
url : base_url + '/admin/ajax/management/sort',
type : 'POST',
data : {
key : key,
table : table,
sort : sort,
sort_order : sortArray
},
success:function(res) {
toastr.success('순서변경이 적용되었습니다.');
}
})
}
})
});
};
/********************************************************************************************************************** /**********************************************************************************************************************
* MODAL 관련 * MODAL 관련
*********************************************************************************************************************/ *********************************************************************************************************************/

12
_src/admin/scss/common/_utility.scss

@ -12,3 +12,15 @@
color: #e32815; color: #e32815;
} }
} }
.move-grip {
cursor:move;
font-size:12px;
background-image: url('../images/admin/grip-handle.png');
background-size:auto 100%;
background-repeat: no-repeat;
width:100%;
min-width:14px;
height:14px;
display:block;
}

6
_src/admin/scss/components/_grid.scss

@ -68,6 +68,12 @@
border-bottom: 0 none; border-bottom: 0 none;
background:transparent; background:transparent;
&.active {
td {
background-color:#fafafa;
}
}
td { td {
padding:5px 10px; padding:5px 10px;
background-color:#fff; background-color:#fff;

2
public_html/assets/css/admin.min.css
File diff suppressed because it is too large
View File

2
public_html/assets/css/admin.min.css.map
File diff suppressed because it is too large
View File

BIN
public_html/assets/images/admin/grip-handle.png

After

Width: 6  |  Height: 14  |  Size: 1014 B

2
public_html/assets/js/admin.min.js
File diff suppressed because it is too large
View File

2
public_html/assets/js/admin.min.js.map
File diff suppressed because it is too large
View File

19
wheeparam/application/controllers/admin/Management.php

@ -485,7 +485,7 @@ class Management extends WB_Controller {
// 배너 그룹 목록 가져오기 // 배너 그룹 목록 가져오기
$param['limit'] = FALSE; $param['limit'] = FALSE;
$param['order_by'] = "bng_name ASC";
$param['order_by'] = "bng_sort ASC";
$param['from'] = "banner_group"; $param['from'] = "banner_group";
$this->data['banner_group_list'] = $this->basic_model->get_list($param); $this->data['banner_group_list'] = $this->basic_model->get_list($param);
@ -529,6 +529,9 @@ class Management extends WB_Controller {
exit; exit;
} }
$sort = (int)$this->db->select_max('bng_sort', 'max')->get('banner_group')->row(0)->max;
$data['bng_sort'] = $sort+1;
if( $this->db->insert('banner_group', $data)) if( $this->db->insert('banner_group', $data))
{ {
alert_modal_close('배너 그룹이 추가 되었습니다.', TRUE); alert_modal_close('배너 그룹이 추가 되었습니다.', TRUE);
@ -758,20 +761,6 @@ class Management extends WB_Controller {
} }
} }
/****************************************************************************
* 배너 관리 - 배너 순서변경
***************************************************************************/
function banner_sort()
{
$sort_idx = $this->input->post("sort_idx", TRUE);
for($i=1; $i<=count($sort_idx); $i++)
{
$this->db->where("ban_idx", $sort_idx[$i-1]);
$this->db->set("ban_sort", $i);
$this->db->update("banner");
}
}
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
} }

25
wheeparam/application/controllers/admin/ajax/Management.php

@ -4,6 +4,31 @@ require APPPATH . '/libraries/REST_Controller.php';
class Management extends REST_Controller class Management extends REST_Controller
{ {
/****************************************************************************
* 공용 순서변경
***************************************************************************/
function sort_post()
{
$key = $this->input->post('key', TRUE);
$sort_idx = $this->input->post("sort_order", TRUE);
$table = $this->input->post('table', TRUE);
$sort_col = $this->input->post('sort', TRUE);
if(empty($key) OR empty($table) or empty($sort_col))
$this->response(array('message'=>'잘못된 접근입니다.'));
$update_array = array();
for($i=1; $i<=count($sort_idx); $i++)
{
$update_array[] = array(
$key => $sort_idx[$i-1],
$sort_col => $i
);
}
$this->db->update_batch($table, $update_array, $key);
}
/** /**
* 팝업 목록 * 팝업 목록
*/ */

1
wheeparam/config/wheeparam.sql

@ -28,6 +28,7 @@ CREATE TABLE `wb_banner` (
DROP TABLE IF EXISTS `wb_banner_group`; DROP TABLE IF EXISTS `wb_banner_group`;
CREATE TABLE `wb_banner_group` ( CREATE TABLE `wb_banner_group` (
`bng_idx` int(10) unsigned NOT NULL AUTO_INCREMENT, `bng_idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`bng_sort` int(10) unsigned NOT NULL DEFAULT 0,
`bng_key` varchar(20) NOT NULL DEFAULT '', `bng_key` varchar(20) NOT NULL DEFAULT '',
`bng_name` varchar(50) NOT NULL DEFAULT '', `bng_name` varchar(50) NOT NULL DEFAULT '',
`bng_width` int(11) NOT NULL DEFAULT '0', `bng_width` int(11) NOT NULL DEFAULT '0',

28
wheeparam/views/themes/admin/management/banner.php

@ -14,24 +14,28 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="W20"></th>
<th>분류이름</th> <th>분류이름</th>
<th class="W175">관리</th>
<th class="W140">관리</th>
</tr> </tr>
</thead> </thead>
<tbody>
<tbody data-toggle="sortable" data-key="bng_idx" data-sort="bng_sort" data-table="banner_group">
<?php foreach($banner_group_list['list'] as $row) :?> <?php foreach($banner_group_list['list'] as $row) :?>
<tr>
<td class="<?=isset($bng_key)&&$bng_key==$row['bng_key']?'active':''?>"><?=$row['bng_name']?></td>
<td class="text-center W200">
<a href="<?=base_url('admin/management/banner/'.$row['bng_key'])?>" class="btn btn-default btn-xs"><i class="far <?=isset($bng_key)&&$bng_key==$row['bng_key']?'fa-folder-open':'fa-folder'?>"></i> 관리</a>
<button type="button" class="btn btn-default btn-xs" data-button="btn-banner-group-form" data-idx="<?=$row['bng_idx']?>"><i class="far fa-pencil"></i> 수정</button>
<tr class="<?=isset($bng_key)&&$bng_key==$row['bng_key']?'active':''?>">
<td class="text-center">
<span class="move-grip"></span>
<input type="hidden" name="bng_idx[]" value="<?=$row['bng_idx']?>">
</td>
<td><i class="far <?=isset($bng_key)&&$bng_key==$row['bng_key']?'fa-folder-open':'fa-folder'?>"></i>&nbsp;<a href="<?=base_url('admin/management/banner/'.$row['bng_key'])?>"><?=$row['bng_name']?></a></td>
<td class="text-center">
<button type="button" class="btn btn-default btn-xs MR5" data-button="btn-banner-group-form" data-idx="<?=$row['bng_idx']?>"><i class="far fa-pencil"></i> 수정</button>
<button type="button" class="btn btn-danger btn-xs" data-button="btn-banner-group-delete" data-idx="<?=$row['bng_idx']?>"><i class="far fa-trash"></i> 삭제</button> <button type="button" class="btn btn-danger btn-xs" data-button="btn-banner-group-delete" data-idx="<?=$row['bng_idx']?>"><i class="far fa-trash"></i> 삭제</button>
</td> </td>
</tr> </tr>
<?php endforeach;?> <?php endforeach;?>
<?php if(count($banner_group_list['list']) == 0) :?> <?php if(count($banner_group_list['list']) == 0) :?>
<tr> <tr>
<td colspan="3" class="empty">등록된 배너 그룹이 없습니다.</td>
<td colspan="4" class="empty">등록된 배너 그룹이 없습니다.</td>
</tr> </tr>
<?php endif;?> <?php endif;?>
</tbody> </tbody>
@ -57,17 +61,17 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="W50">순서</th>
<th class="W20"></th>
<th class="W250">썸네일</th> <th class="W250">썸네일</th>
<th>이름</th> <th>이름</th>
<th class="W150">관리</th> <th class="W150">관리</th>
</tr> </tr>
</thead> </thead>
<tbody id="banner-list">
<tbody data-toggle="sortable" data-key="ban_idx" data-sort="ban_sort" data-table="banner">
<?php foreach($banner_list['list'] as $row) :?> <?php foreach($banner_list['list'] as $row) :?>
<tr> <tr>
<td class="text-center"> <td class="text-center">
<i class="far fa-bars"></i>
<span class="move-grip"></span>
<input type="hidden" name="ban_idx[]" value="<?=$row['ban_idx']?>"> <input type="hidden" name="ban_idx[]" value="<?=$row['ban_idx']?>">
</td> </td>
<td><?=thumb_img($row['ban_filepath'],'img-thumbnail','style="max-width:250px"')?></td> <td><?=thumb_img($row['ban_filepath'],'img-thumbnail','style="max-width:250px"')?></td>
@ -120,7 +124,7 @@
} }
}, },
width: 500, width: 500,
height: 650,
height: 400,
header : { header : {
title : '배너 그룹 정보' title : '배너 그룹 정보'
} }

133
wheeparam/views/themes/admin/management/banner_form.php

@ -1,24 +1,29 @@
<?=form_open_multipart(NULL ,array('class'=>'form-flex','autocomplete'=>'off'))?> <?=form_open_multipart(NULL ,array('class'=>'form-flex','autocomplete'=>'off'))?>
<input type="hidden" name="bng_key" value="<?=$bng_key?>"> <input type="hidden" name="bng_key" value="<?=$bng_key?>">
<input type="hidden" name="ban_idx" value="<?=element('ban_idx', $view)?>"> <input type="hidden" name="ban_idx" value="<?=element('ban_idx', $view)?>">
<div class="form-group">
<label class="control-label">배너 이름</label>
<div class="controls">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>배너 이름</div>
<div data-ax-td-wrap>
<input class="form-control" name="ban_name" value="<?=element('ban_name', $view)?>" required maxlength="50"> <input class="form-control" name="ban_name" value="<?=element('ban_name', $view)?>" required maxlength="50">
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">배너 표시/숨김</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>배너 표시/숨김</div>
<div data-ax-td-wrap>
<label class="w-radio"><input type="radio" name="ban_status" value="Y" <?=element('ban_status',$view,'Y')=='Y'?'checked':''?>><span>표시</span></label> <label class="w-radio"><input type="radio" name="ban_status" value="Y" <?=element('ban_status',$view,'Y')=='Y'?'checked':''?>><span>표시</span></label>
<label class="w-radio"><input type="radio" name="ban_status" value="H" <?=element('ban_status',$view,'Y')=='H'?'checked':''?>><span>숨김</span></label> <label class="w-radio"><input type="radio" name="ban_status" value="H" <?=element('ban_status',$view,'Y')=='H'?'checked':''?>><span>숨김</span></label>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">배너 파일</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>배너 파일</div>
<div data-ax-td-wrap>
<?=thumb_img(element('ban_filepath', $view),'img-responsive MB5')?>
<input type="file" class="form-control" name="userfile"> <input type="file" class="form-control" name="userfile">
<?php if($banner_group['bng_width'] > 0) :?> <?php if($banner_group['bng_width'] > 0) :?>
<p class="help-block">권장 너비 : <?=$banner_group['bng_width']?>px</p> <p class="help-block">권장 너비 : <?=$banner_group['bng_width']?>px</p>
@ -28,76 +33,94 @@
<?php endif;?> <?php endif;?>
</div> </div>
</div> </div>
<hr>
<div class="form-group">
<label class="control-label">클릭시 이동</label>
<div class="controls">
<label class="w-radio"><input type="radio" name="ban_link_use" value="Y" <?=element('ban_link_use',$view,'N')=='Y'?'checked':''?>><span>사용</span></label>
<label class="w-radio"><input type="radio" name="ban_link_use" value="N" <?=element('ban_link_use',$view,'N')=='N'?'checked':''?>><span>미사용</span></label>
</div> </div>
</div> </div>
<?php if($banner_group['bng_ext1_use'] == 'Y' OR $banner_group['bng_ext2_use'] == 'Y' OR $banner_group['bng_ext3_use'] == 'Y' OR $banner_group['bng_ext4_use'] == 'Y' OR $banner_group['bng_ext5_use'] == 'Y') :?>
<div class="H10"></div>
<div data-ax-tbl>
<?php endif;?>
<div class="form-group">
<label class="control-label">이동 URL</label>
<div class="controls">
<input class="form-control" name="ban_link_url" value="<?=element('ban_link_url', $view)?>">
<?php for($i=1; $i<=5; $i++):
if( $banner_group["bng_ext{$i}_use"] === 'Y' ) :
?>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label><?=$banner_group["bng_ext{$i}"]?></div>
<div data-ax-td-wrap>
<input class="form-control form-control-inline" name="ban_ext<?=$i?>" value="<?=element('ban_ext'.$i, $view)?>">
</div> </div>
</div> </div>
</div>
<?php
endif;
endfor;
?>
<?php if($banner_group['bng_ext1_use'] == 'Y' OR $banner_group['bng_ext2_use'] == 'Y' OR $banner_group['bng_ext3_use'] == 'Y' OR $banner_group['bng_ext4_use'] == 'Y' OR $banner_group['bng_ext5_use'] == 'Y') :?>
</div>
<?php endif;?>
<div class="form-group">
<label class="control-label">이동 방식</label>
<div class="controls">
<div class="H10"></div>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>클릭시 이동</div>
<div data-ax-td-wrap>
<label class="w-radio"><input type="radio" name="ban_link_use" value="Y" <?=element('ban_link_use',$view,'N')=='Y'?'checked':''?>><span>사용</span></label>
<label class="w-radio"><input type="radio" name="ban_link_use" value="N" <?=element('ban_link_use',$view,'N')=='N'?'checked':''?>><span>미사용</span></label>
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>이동 URL</div>
<div data-ax-td-wrap>
<input class="form-control" name="ban_link_url" value="<?=element('ban_link_url', $view)?>">
</div>
</div>
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>이동 방식</div>
<div data-ax-td-wrap>
<label class="w-radio"><input type="radio" name="ban_link_type" value="Y" <?=element('ban_link_type',$view,'N')=='Y'?'checked':''?>><span>새 탭으로</span></label> <label class="w-radio"><input type="radio" name="ban_link_type" value="Y" <?=element('ban_link_type',$view,'N')=='Y'?'checked':''?>><span>새 탭으로</span></label>
<label class="w-radio"><input type="radio" name="ban_link_type" value="N" <?=element('ban_link_type',$view,'N')=='N'?'checked':''?>><span>현재창에서</span></label> <label class="w-radio"><input type="radio" name="ban_link_type" value="N" <?=element('ban_link_type',$view,'N')=='N'?'checked':''?>><span>현재창에서</span></label>
</div> </div>
</div> </div>
</div>
</div>
<hr>
<div class="form-group">
<label class="control-label">표기 기간</label>
<div class="controls">
<div class="H10"></div>
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>표시 기간</div>
<div data-ax-td-wrap>
<select class="form-control form-control-inline" name="ban_timer_use"> <select class="form-control form-control-inline" name="ban_timer_use">
<option value="Y" <?=element('ban_timer_use', $view,'N')=='Y'?'selected':''?>>시간지정</option> <option value="Y" <?=element('ban_timer_use', $view,'N')=='Y'?'selected':''?>>시간지정</option>
<option value="N" <?=element('ban_timer_use', $view,'N')=='N'?'selected':''?>>항상표시</option> <option value="N" <?=element('ban_timer_use', $view,'N')=='N'?'selected':''?>>항상표시</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">표기 시작시간</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>표시 시작시간</div>
<div data-ax-td-wrap>
<input class="form-control form-control-inline" name="ban_timer_start" value="<?=element('ban_timer_start', $view)?>"> <input class="form-control form-control-inline" name="ban_timer_start" value="<?=element('ban_timer_start', $view)?>">
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">표기 종료시간</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>표시 종료시간</div>
<div data-ax-td-wrap>
<input class="form-control form-control-inline" name="ban_timer_end" value="<?=element('ban_timer_end', $view)?>"> <input class="form-control form-control-inline" name="ban_timer_end" value="<?=element('ban_timer_end', $view)?>">
</div> </div>
</div> </div>
<hr>
<?php
for($i=1; $i<=5; $i++):
if( $banner_group["bng_ext{$i}_use"] === 'Y' ) :
?>
<div class="form-group">
<label class="control-label"><?=$banner_group["bng_ext{$i}"]?></label>
<div class="controls">
<input class="form-control form-control-inline" name="ban_ext<?=$i?>" value="<?=element('ban_ext'.$i, $view)?>">
</div> </div>
</div> </div>
<?php
endif;
endfor;
?>
<div class="text-center MT10"> <div class="text-center MT10">
<button class="btn btn-primary">저장하기</button> <button class="btn btn-primary">저장하기</button>

56
wheeparam/views/themes/admin/management/banner_group_form.php

@ -1,41 +1,55 @@
<?=form_open(NULL, array('class'=>'form-flex'))?>
<?=form_open(NULL, array('class'=>'form-flex','autocomplete'=>'off'))?>
<input type="hidden" name="bng_idx" value="<?=element('bng_idx', $view)?>"> <input type="hidden" name="bng_idx" value="<?=element('bng_idx', $view)?>">
<?=validation_errors('<p class="alert alert-danger">');?> <?=validation_errors('<p class="alert alert-danger">');?>
<div class="form-group">
<label class="control-label">그룹 고유 </label>
<div class="controls">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>그룹 고유 </div>
<div data-ax-td-wrap>
<input class="form-control" name="bng_key" value="<?=element('bng_key', $view)?>" required maxlength="10" <?=element('bng_key',$view)?'readonly':''?>> <input class="form-control" name="bng_key" value="<?=element('bng_key', $view)?>" required maxlength="10" <?=element('bng_key',$view)?'readonly':''?>>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">배너 그룹 이름</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>배너 그룹 이름</div>
<div data-ax-td-wrap>
<input class="form-control" name="bng_name" value="<?=element('bng_name', $view)?>" required maxlength="50"> <input class="form-control" name="bng_name" value="<?=element('bng_name', $view)?>" required maxlength="50">
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">권장 너비 (px)</label>
<div class="controls">
<input type="number" class="form-control" name="bng_width" value="<?=element('bng_width', $view, 0)?>">
</div> </div>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>권장 너비 (px)</div>
<div data-ax-td-wrap>
<input type="number" class="form-control text-right" name="bng_width" value="<?=element('bng_width', $view, 0)?>">
</div> </div>
<div class="form-group">
<label class="control-label">권장 높이 (px)</label>
<div class="controls">
<input type="number" class="form-control" name="bng_height" value="<?=element('bng_height', $view, 0)?>">
</div>
<div data-ax-td>
<div data-ax-td-label>권장 높이 (px)</div>
<div data-ax-td-wrap>
<input type="number" class="form-control text-right" name="bng_height" value="<?=element('bng_height', $view, 0)?>">
</div> </div>
</div> </div>
<?php for($i=1; $i<=5; $i++):?>
<div class="form-group">
<label class="control-label">추가필드 <?=$i?></label>
<div class="controls">
<div class="w-check">
<label><input type="checkbox" data-toggle="disabled-checked" data-target='[name="bng_ext<?=$i?>"]' name="bng_ext<?=$i?>_use" value="Y" <?=element("bng_ext{$i}_use", $view, 'N')=='Y'?'checked':''?>><span>사용</span></label>
</div> </div>
<?php for($i=1; $i<=5; $i++):?>
<div data-ax-tr>
<div data-ax-td>
<div data-ax-td-label>추가필드 <?=$i?></div>
<div data-ax-td-wrap>
<input class="form-control form-control-inline" name="bng_ext<?=$i?>" value="<?=element('bng_ext'.$i, $view, '')?>"> <input class="form-control form-control-inline" name="bng_ext<?=$i?>" value="<?=element('bng_ext'.$i, $view, '')?>">
</div> </div>
</div> </div>
<div data-ax-td>
<div data-ax-td-wrap>
<label class="w-check"><input type="checkbox" data-toggle="disabled-checked" data-target='[name="bng_ext<?=$i?>"]' name="bng_ext<?=$i?>_use" value="Y" <?=element("bng_ext{$i}_use", $view, 'N')=='Y'?'checked':''?>><span>사용</span></label>
</div>
</div>
</div>
<?php endfor;?> <?php endfor;?>
</div>
<div class="text-center MT10"> <div class="text-center MT10">
<button class="btn btn-primary">저장하기</button> <button class="btn btn-primary">저장하기</button>
</div> </div>

47
wheeparam/views/themes/admin/management/faq.php

@ -19,21 +19,20 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="W50">순서</th>
<th class="W20"></th>
<th>분류이름</th> <th>분류이름</th>
<th class="W50">등록</th> <th class="W50">등록</th>
<th class="W175">관리</th>
<th class="W125">관리</th>
</tr> </tr>
</thead> </thead>
<tbody id="faq-category-list">
<tbody data-toggle="sortable" data-key="fac_idx" data-sort="fac_sort" data-table="faq_category">
<?php foreach($faq_category['list'] as $row) :?> <?php foreach($faq_category['list'] as $row) :?>
<tr>
<td class="text-center W50"><i class="far fa-bars sort-handle-icon"></i><input type="hidden" name="fac_idx[]" value="<?=$row['fac_idx']?>"></td>
<td class="<?=isset($fac_idx)&&$fac_idx==$row['fac_idx']?'active':''?>"><?=$row['fac_title']?></td>
<tr class="<?=isset($fac_idx)&&$fac_idx==$row['fac_idx']?'active':''?>">
<td class="text-center"><span class="move-grip"></span><input type="hidden" name="fac_idx[]" value="<?=$row['fac_idx']?>"></td>
<td class=""><i class="far <?=isset($fac_idx)&&$fac_idx==$row['fac_idx']?'fa-folder-open':'fa-folder'?>"></i>&nbsp;<a href="<?=base_url('admin/management/faq/'.$row['fac_idx'])?>"><?=$row['fac_title']?></a></td>
<td class="text-right W50"><?=number_format($row['fac_count'])?></td> <td class="text-right W50"><?=number_format($row['fac_count'])?></td>
<td class="text-center W175">
<a href="<?=base_url('admin/management/faq/'.$row['fac_idx'])?>" class="btn btn-default btn-sm"><i class="far <?=isset($fac_idx)&&$fac_idx==$row['fac_idx']?'fa-folder-open':'fa-folder'?>"></i> 관리</a>
<button type="button" class="btn btn-default btn-sm" onclick="faq.category.form('<?=$row['fac_idx']?>');"><i class="far fa-pencil"></i> 수정</button>
<td class="text-center">
<button type="button" class="btn btn-default btn-sm MR5" onclick="faq.category.form('<?=$row['fac_idx']?>');"><i class="far fa-pencil"></i> 수정</button>
<button type="button" class="btn btn-danger btn-sm" onclick="faq.category.remove('<?=$row['fac_idx']?>');"><i class="far fa-trash"></i> 삭제</button> <button type="button" class="btn btn-danger btn-sm" onclick="faq.category.remove('<?=$row['fac_idx']?>');"><i class="far fa-trash"></i> 삭제</button>
</td> </td>
</tr> </tr>
@ -63,15 +62,15 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="W50">순서</th>
<th class="W20"></th>
<th>FAQ 제목</th> <th>FAQ 제목</th>
<th class="W150">관리</th> <th class="W150">관리</th>
</tr> </tr>
</thead> </thead>
<tbody id="faq-list">
<tbody data-toggle="sortable" data-key="faq_idx" data-sort="faq_sort" data-table="faq">
<?php foreach($faq_list['list'] as $row) :?> <?php foreach($faq_list['list'] as $row) :?>
<tr> <tr>
<td class="text-center W50"><i class="far fa-bars sort-handle-icon"></i><input type="hidden" name="faq_idx[]" value="<?=$row['faq_idx']?>"></td>
<td class="text-center"><span class="move-grip"></span><input type="hidden" name="faq_idx[]" value="<?=$row['faq_idx']?>"></td>
<td><?=$row['faq_title']?></td> <td><?=$row['faq_title']?></td>
<td class="text-center W150"> <td class="text-center W150">
<button type="button" class="btn btn-default btn-sm" onclick="faq.form('<?=$row['fac_idx']?>','<?=$row['faq_idx']?>');"><i class="far fa-pencil"></i> 수정</button> <button type="button" class="btn btn-default btn-sm" onclick="faq.form('<?=$row['fac_idx']?>','<?=$row['faq_idx']?>');"><i class="far fa-pencil"></i> 수정</button>
@ -91,27 +90,3 @@
</div> </div>
</div> </div>
<script>
$("#faq-category-list").sortable({
handle : 'i.far.fa-bars',
update: function(){
var sort_array = [];
$("#faq-category-list input[name='fac_idx[]']").each(function(){
sort_array.push( $(this).val() );
});
$.post('/ajax/faq/category_sort',{sort_idx:sort_array});
}
});
$("#faq-list").sortable({
handle : 'i.far.fa-bars',
update: function(){
var sort_array = [];
$("#faq-list input[name='faq_idx[]']").each(function(){
sort_array.push( $(this).val() );
});
$.post('/ajax/faq/sort',{sort_idx:sort_array});
}
});
</script>

21
wheeparam/views/themes/admin/management/faq_category_form.php

@ -2,21 +2,26 @@
<?=form_open(NULL,array("class"=>"form-flex","autocomplete"=>"off")) ?> <?=form_open(NULL,array("class"=>"form-flex","autocomplete"=>"off")) ?>
<?=validation_errors('<p class="alert alert-danger">') ?> <?=validation_errors('<p class="alert alert-danger">') ?>
<input type="hidden" name="mode" value="<?=element('fac_idx', $view)?'UPDATE':'INSERT'?>"> <input type="hidden" name="mode" value="<?=element('fac_idx', $view)?'UPDATE':'INSERT'?>">
<div class="form-group">
<label class="control-label">그룹 이름</label>
<div class="controls">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>FAQ 그룹 이름</div>
<div data-ax-td-wrap>
<input type="text" class="form-control" name="fac_title" value="<?=element('fac_title', $view) ?>" required maxlength="50" autofocus> <input type="text" class="form-control" name="fac_title" value="<?=element('fac_title', $view) ?>" required maxlength="50" autofocus>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">고유 </label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>FAQ 그룹 이름</div>
<div data-ax-td-wrap>
<input type="text" maxlength="20" name="fac_idx" value="<?=element('fac_idx', $view) ?>" class="form-control" <?= element('fac_idx', $view) ? 'readonly="readonly"' : 'required="required"' ?>> <input type="text" maxlength="20" name="fac_idx" value="<?=element('fac_idx', $view) ?>" class="form-control" <?= element('fac_idx', $view) ? 'readonly="readonly"' : 'required="required"' ?>>
<p class="help-block"><?= base_url("faq/" . element('fac_idx', $view)) ?></p> <p class="help-block"><?= base_url("faq/" . element('fac_idx', $view)) ?></p>
</div> </div>
</div> </div>
<div class="H10"></div>
<div class="text-center">
</div>
</div>
<div class="text-center MT15">
<button class="btn btn-primary"><i class="far fa-check-circle"></i> 확인</button> <button class="btn btn-primary"><i class="far fa-check-circle"></i> 확인</button>
<button type="button" class="btn btn-default" onclick="parent.APP.MODAL.close();">닫기</button> <button type="button" class="btn btn-default" onclick="parent.APP.MODAL.close();">닫기</button>
</div> </div>

29
wheeparam/views/themes/admin/management/faq_form.php

@ -2,26 +2,33 @@
<input type="hidden" name="faq_idx" value="<?=element('faq_idx', $view)?>"> <input type="hidden" name="faq_idx" value="<?=element('faq_idx', $view)?>">
<input type="hidden" name="fac_idx" value="<?=element('fac_idx', $faq_group)?>"> <input type="hidden" name="fac_idx" value="<?=element('fac_idx', $faq_group)?>">
<?=validation_errors('<p class="alert alert-danger">') ?> <?=validation_errors('<p class="alert alert-danger">') ?>
<div class="form-group">
<label class="control-label">그룹 이름</label>
<div class="controls">
<div data-ax-tbl>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>그룹 이름</div>
<div data-ax-td-wrap>
<p class="form-control-static"><?=$faq_group['fac_title']?></p> <p class="form-control-static"><?=$faq_group['fac_title']?></p>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">FAQ 이름</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>FAQ 이름</div>
<div data-ax-td-wrap>
<input type="text" class="form-control" name="faq_title" value="<?=element('faq_title', $view) ?>" required maxlength="50" autofocus> <input type="text" class="form-control" name="faq_title" value="<?=element('faq_title', $view) ?>" required maxlength="50" autofocus>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label">FAQ 내용</label>
<div class="controls">
</div>
<div data-ax-tr>
<div data-ax-td class="width-100">
<div data-ax-td-label>FAQ 내용</div>
<div data-ax-td-wrap>
<?=get_editor('faq_content', element('faq_content', $view), 'form-control', true, 'ckeditor')?> <?=get_editor('faq_content', element('faq_content', $view), 'form-control', true, 'ckeditor')?>
</div> </div>
</div> </div>
<div class="H10"></div>
<div class="text-center">
</div>
</div>
<div class="text-center MT10">
<button class="btn btn-primary"><i class="far fa-check-circle"></i> 확인</button> <button class="btn btn-primary"><i class="far fa-check-circle"></i> 확인</button>
<button type="button" class="btn btn-default" onclick="parent.APP.MODAL.close();">닫기</button> <button type="button" class="btn btn-default" onclick="parent.APP.MODAL.close();">닫기</button>
</div> </div>

2
wheeparam/views/themes/admin/statics/browser.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

2
wheeparam/views/themes/admin/statics/device.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

2
wheeparam/views/themes/admin/statics/keyword.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

2
wheeparam/views/themes/admin/statics/os.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

2
wheeparam/views/themes/admin/statics/referrer.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

2
wheeparam/views/themes/admin/statics/times.php

@ -10,7 +10,7 @@
<div data-ax-td> <div data-ax-td>
<div data-ax-td-label>일자 검색</div> <div data-ax-td-label>일자 검색</div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="startdate" data-toggle="datepicker" value="<?=$startdate?>">
<input class="form-control" name="startdate" data-toggle="datepicker" data-chained-datepicker="[name='enddate']" value="<?=$startdate?>">
</div> </div>
<div data-ax-td-wrap> <div data-ax-td-wrap>
<input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>"> <input class="form-control" name="enddate" data-toggle="datepicker" value="<?=$enddate?>">

Loading…
Cancel
Save