Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -7,7 +7,7 @@ $lang->datatable->hide = 'Hide';
|
||||
$lang->datatable->reset = 'Reset';
|
||||
|
||||
$lang->datatable->custom = 'Custom Columns';
|
||||
$lang->datatable->customTip = 'Check Columns to Display';
|
||||
$lang->datatable->customTip = 'Check Columns to Display,Drag Column name to Sort';
|
||||
$lang->datatable->table = 'Switch to Common Table';
|
||||
$lang->datatable->datatable = 'Switch to Advanced Table';
|
||||
$lang->datatable->required = 'Required';
|
||||
|
||||
@@ -7,7 +7,7 @@ $lang->datatable->hide = '隐藏';
|
||||
$lang->datatable->reset = '恢复默认';
|
||||
|
||||
$lang->datatable->custom = '自定义列';
|
||||
$lang->datatable->customTip = '勾选需要显示的列';
|
||||
$lang->datatable->customTip = '勾选需要显示的列,拖动列名进行排序。';
|
||||
$lang->datatable->table = '简单表格';
|
||||
$lang->datatable->datatable = '高级表格';
|
||||
$lang->datatable->required = '必选';
|
||||
|
||||
@@ -7,7 +7,7 @@ $lang->datatable->hide = '隱藏';
|
||||
$lang->datatable->reset = '恢復預設';
|
||||
|
||||
$lang->datatable->custom = '自定義列';
|
||||
$lang->datatable->customTip = '勾選需要顯示的列';
|
||||
$lang->datatable->customTip = '勾選需要顯示的列,拖動列名進行排序。';
|
||||
$lang->datatable->table = '簡單表格';
|
||||
$lang->datatable->datatable = '高級表格';
|
||||
$lang->datatable->required = '必選';
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
?>
|
||||
<style>
|
||||
.cols-list {margin-bottom: 10px;}
|
||||
.cols-list .col {border: 1px solid #ddd; height: 30px; line-height: 29px; padding: 0 10px; border-bottom: none; background: #fff; float:none}
|
||||
.cols-list .col {border: 1px solid #ddd; height: 30px; line-height: 29px; padding: 0 10px; border-bottom: none; background: #fff; float:none; padding-left: 6px;}
|
||||
.cols-list .checkbox-primary {display: inline-block; position: relative; top: -1px;}
|
||||
.cols-list .checkbox-primary > label {padding: 0; width: 23px;}
|
||||
.cols-list .col.drag-shadow {border: 1px solid #ddd;}
|
||||
.cols-list {border-bottom: 1px solid #ddd}
|
||||
.cols-list .col:hover {background: #edf3fe}
|
||||
.cols-list .col:hover {background: #E9F2FB}
|
||||
.cols-list .col.require:hover {background: none}
|
||||
.cols-list .col .actions {line-height: 30px; vertical-align: top;}
|
||||
.cols-list .col .form-control {display: inline-block; width: 50px; padding: 0px 5px; height: 20px; line-height: 20px; border-color: transparent; position: relative; top: -2px}
|
||||
@@ -26,7 +28,7 @@
|
||||
.cols-list .col .btn.show-hide {font-size: 13px}
|
||||
.cols-list .col .title {cursor: pointer; display: inline-block; width: 500px;}
|
||||
.cols-list .col .title-bar {white-space:nowrap; cursor: pointer; display: inline-block; width: 300px; background: #f1f1f1; border-left: 1px solid #ddd; border-right: 1px solid #ddd; padding-left: 6px; position: relative; max-width: 500px; min-width: 30px}
|
||||
.cols-list .col .title .icon-move {position: absolute; left: -26px; background: #fff; top: 5px; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 5px;}
|
||||
.cols-list .col .title .icon-move {width: 20px; height: 20px; line-height: 20px; text-align: center; position: relative; left: 3px;}
|
||||
.cols-list .col:hover .title-bar {background: #eee; transition: width 0.3s;}
|
||||
.cols-list .col.require .title {cursor: default;}
|
||||
.cols-list .col.disabled .title {opacity: 0.5;}
|
||||
@@ -39,20 +41,25 @@
|
||||
.cols-list .col.drop-to, .cols-list .col.drag-from {opacity: 0.5; visibility: visible; background: #e5e5e5}
|
||||
.cols-list .col .btn.disabled, .cols-list .col.disabled .btn.disabled, .cols-list .col .btn.disabled .label-hide {border: none; color: #aaa; cursor: not-allowed; background: none}
|
||||
.cols-list .col .icon-move {opacity: 0; transition:all 0.2s; cursor: move;}
|
||||
.cols-list .col:hover .icon-move {opacity: 1}
|
||||
.cols-list .col:hover .icon-move {opacity: 0.7;}
|
||||
.cols-list.sort-disabled .icon-move {display: none;}
|
||||
#customDatatable .form-actions {margin-top: 10px;}
|
||||
#customDatatable .form-actions .checkbox-primary {margin-bottom: 10px; margin-left: 7px;}
|
||||
</style>
|
||||
<div class='modal-dialog' id='customDatatable' style='width: 800px'>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-header'>
|
||||
<button class="close" data-dismiss="modal">×</button>
|
||||
<h4 class='modal-title'><?php echo $lang->datatable->custom?></h4>
|
||||
<button class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
|
||||
<h4 class='modal-title'>
|
||||
<?php echo $lang->datatable->custom?>
|
||||
<small><?php echo $lang->datatable->customTip ?></small>
|
||||
</h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<div id='colsFixedLeft' class='cols-list'></div>
|
||||
<div id='colsFixedFlex' class='cols-list'></div>
|
||||
<div id='colsFixedRight' class='cols-list'></div>
|
||||
<div class='cols-list cols-list-origin'>
|
||||
<div class='cols-list template' id="originCols">
|
||||
<?php foreach ($cols as $key => $col):?>
|
||||
<?php
|
||||
$required = $col['required'] == 'yes';
|
||||
@@ -63,17 +70,17 @@
|
||||
<div class='actions pull-right'>
|
||||
<?php if(isset($col['name'])) echo html::hidden('name', $col['name'])?>
|
||||
<span><span class='text-muted'><?php echo $lang->datatable->width?></span> <input type='text' id='width' class='form-control' value='<?php echo $col['width']?>'><?php echo $autoWidth ? ' ' : 'px' ?></span>
|
||||
<button type='button' class='btn btn-link show-hide<?php echo $required ? ' disabled' : '' ?>'><span class='label-show'><?php echo $lang->datatable->show?></span><span class='text-muted'>/</span><span class='label-hide'><?php echo $lang->datatable->hide?></span></button>
|
||||
</div>
|
||||
<i class='icon-ok'></i> <span class='title'><span class='title-bar'><strong><?php echo $col['title']?></strong><i class='icon-move'></i></span></span> <?php if($required) echo "<span class='text-muted'>({$lang->datatable->required})</span>"?>
|
||||
<div class="checkbox-primary"><label></label></div>
|
||||
<span class='title'><span class='title-bar'><strong><?php echo $col['title']?></strong><i class='icon-move'></i></span></span> <?php if($required) echo "<span class='text-muted'>({$lang->datatable->required})</span>"?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class='actions text-left'>
|
||||
<div class='form-actions text-left'>
|
||||
<?php if(common::hasPriv('datatable', 'setGlobal')) echo html::checkbox('global', array(1 => $lang->datatable->setGlobal));?>
|
||||
<button type='button' class='btn btn-primary btn-save' id='btnSaveCustom'><?php echo $lang->save ?></button>
|
||||
<button type='button' class='btn btn-default' data-dismiss='modal'><?php echo $lang->close ?></button>
|
||||
<button type='button' class='btn btn-default' id='resetBtn'><?php echo $lang->datatable->reset ?></button>
|
||||
<button type='button' class='btn' data-dismiss='modal'><?php echo $lang->close ?></button>
|
||||
<button type='button' class='btn' id='resetBtn'><?php echo $lang->datatable->reset ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,11 +94,11 @@ $(function()
|
||||
{
|
||||
var setting = JSON.parse('<?php echo $setting;?>');
|
||||
|
||||
var $cols = $('.col').addClass('disabled');
|
||||
var $cols = $('#originCols .col').addClass('disabled');
|
||||
$cols.filter('.fixed-left').appendTo('#colsFixedLeft');
|
||||
$cols.filter('.fixed-flex, .fixed-no').appendTo('#colsFixedFlex');
|
||||
$cols.filter('.fixed-right').appendTo('#colsFixedRight');
|
||||
$('.cols-list-origin').remove();
|
||||
$('#originCols').remove();
|
||||
|
||||
if(typeof setting[0] === 'string')
|
||||
{
|
||||
@@ -124,14 +131,15 @@ $(function()
|
||||
col = {id: col, disabled: false};
|
||||
}
|
||||
var $col = $cols.filter('[data-key=' + col.id + ']');
|
||||
$col.toggleClass('disabled', !col.show);
|
||||
$col.attr('data-order', col.order);
|
||||
$col.toggleClass('disabled', !col.show).attr('data-order', col.order);
|
||||
$col.find('.checkbox-primary').toggleClass('checked', !!col.show);
|
||||
if(col.width) $col.find('input#width').val(col.width.replace('px', ''));
|
||||
}
|
||||
|
||||
$('.cols-list').on('click', '.col:not(.require) .show-hide, .col:not(.require) .title', function()
|
||||
$('.cols-list').on('click', '.col:not(.require) .title, .col:not(.require) .checkbox-primary', function()
|
||||
{
|
||||
$(this).closest('.col').toggleClass('disabled');
|
||||
var $col = $(this).closest('.col').toggleClass('disabled');
|
||||
$col.find('.checkbox-primary').toggleClass('checked', !$col.hasClass('disabled'));
|
||||
}).each(function()
|
||||
{
|
||||
var $list = $(this),
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -91,6 +91,7 @@
|
||||
<glyph unicode="" glyph-name="cards-view" d="M170.667 682.666h284.444v-341.333h-341.333v284.444c0 31.419 25.47 56.889 56.889 56.889zM113.778 227.555h341.333v-341.333h-284.444c-31.419 0-56.889 25.47-56.889 56.889v284.444zM568.889 682.666h284.444c31.419 0 56.889-25.47 56.889-56.889v-284.444h-341.333v341.333zM568.889 227.555h341.333v-284.444c0-31.419-25.47-56.889-56.889-56.889h-284.444v341.333z" />
|
||||
<glyph unicode="" glyph-name="star-empty" d="M470.699 732.995l0.544-0.792c-0.184 0.262-0.365 0.526-0.544 0.792zM77.153 423.114l0.508-0.728c-0.167 0.244-0.336 0.487-0.508 0.728zM200.729-145.098l0.941 0.325c-0.315-0.105-0.629-0.213-0.941-0.325zM824.385-145.389c-0.338 0.12-0.676 0.237-1.014 0.35l1.014-0.35zM757.134-190.319l-0.003 0.953c-0.003-0.318-0.002-0.636 0.003-0.953zM644.954 479.437l-132.36 192.597-148.368-215.689-251.154-84.722 155.067-222.304-0.080-26.96-0.725-244.475 244.818 84.478 244.785-84.475-0.794 271.434 155.064 222.292-250.146 84.389zM841.552 122.612l0.915-312.681c0.18-12.182-5.080-22.937-13.389-29.807-11.038-7.887-22.398-9.799-33.372-5.883l-283.557 97.851-283.585-97.855c-10.969-3.918-22.318-2.005-31.082 4.146-10.595 8.595-15.848 19.364-15.681 31.547l0.923 312.681-175.56 251.683c-6.94 9.732-8.716 21.66-5.859 32.304 4.526 13.219 12.658 21.795 23.75 25.386l284.967 96.134 173.667 252.467c6.679 9.949 16.966 15.422 27.534 15.858 13.34-0.428 23.602-5.89 30.286-15.831l173.77-252.844 283.926-95.786c11.092-3.585 19.228-12.167 22.879-22.577 3.737-13.442 1.965-25.367-4.973-35.116l-175.56-251.68z" />
|
||||
<glyph unicode="" glyph-name="star" d="M841.552 122.612l0.915-312.681c0.18-12.182-5.080-22.937-13.389-29.807-11.038-7.887-22.398-9.799-33.372-5.883l-283.557 97.851-283.585-97.855c-10.969-3.918-22.318-2.005-31.082 4.146-10.595 8.595-15.848 19.364-15.681 31.547l0.923 312.681-175.56 251.683c-6.94 9.732-8.716 21.66-5.859 32.304 4.526 13.219 12.658 21.795 23.75 25.386l284.967 96.134 173.667 252.467c6.679 9.949 16.966 15.422 27.534 15.858 13.34-0.428 23.602-5.89 30.286-15.831l173.77-252.844 283.926-95.786c11.092-3.585 19.228-12.167 22.879-22.577 3.737-13.442 1.965-25.367-4.973-35.116l-175.56-251.68z" />
|
||||
<glyph unicode="" glyph-name="move" d="M963.488 267.876c4.142 8.283 4.142 20.711 0 33.136-4.142 4.142-4.142 8.283-8.283 12.426l-124.263 124.263c-16.568 16.568-41.421 16.568-57.99 0s-16.568-41.421 0-57.99l53.848-53.848h-273.378v273.378l53.848-53.848c8.283-8.283 16.568-12.426 28.995-12.426s20.711 4.142 28.995 12.426c16.568 16.568 16.568 41.421 0 57.99l-124.263 124.263c-4.142 4.142-8.283 8.283-12.426 8.283-8.283 4.142-20.711 4.142-33.136 0-4.142-4.142-8.283-4.142-12.426-8.283l-124.263-124.263c-16.568-16.568-16.568-41.421 0-57.99s41.421-16.568 57.99 0l53.848 53.848v-273.378h-273.378l53.848 53.848c16.568 16.568 16.568 41.421 0 57.99s-41.421 16.568-57.99 0l-124.263-124.263c-4.142-4.142-8.283-8.283-8.283-12.426-4.142-8.283-4.142-20.711 0-33.136 4.142-4.142 4.142-8.283 8.283-12.426l124.263-124.263c8.283-8.283 16.568-12.426 28.995-12.426s20.711 4.142 28.995 12.426c16.568 16.568 16.568 41.421 0 57.99l-53.848 53.848h273.378v-273.378l-53.848 53.848c-16.568 16.568-41.421 16.568-57.99 0s-16.568-41.421 0-57.99l124.263-124.263c4.142-4.142 8.283-8.283 12.426-8.283 4.142-4.142 12.426-4.142 16.568-4.142s12.426 0 16.568 4.142c4.142 4.142 8.283 4.142 12.426 8.283l124.263 124.263c16.568 16.568 16.568 41.421 0 57.99s-41.421 16.568-57.99 0l-53.848-53.848v273.378h273.378l-53.848-53.848c-16.568-16.568-16.568-41.421 0-57.99 8.283-8.283 20.711-12.426 28.995-12.426s20.711 4.142 28.995 12.426l124.263 124.263c4.142 4.142 8.283 8.283 8.283 12.426z" />
|
||||
<glyph unicode="" glyph-name="arrow-left" d="M810.667 327.111h-494.933l226.133 226.133c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-298.667-298.667c-4.267-4.267-8.533-8.533-8.533-12.8-4.267-8.533-4.267-21.333 0-34.133 4.267-4.267 4.267-8.533 8.533-12.8l298.667-298.667c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-226.133 226.133h494.933c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667z" />
|
||||
<glyph unicode="" glyph-name="code" d="M632.794 70.731l213.713 213.713-213.713 213.713 65.043 65.043 278.756-278.756-278.756-278.756-65.043 65.043zM391.206 70.731l-213.713 213.713 213.713 213.713-65.043 65.043-278.756-278.756 278.756-278.756 65.043 65.043z" />
|
||||
<glyph unicode="" glyph-name="home" d="M426.667-56.889v256h170.667v-256h213.333v341.333h128l-426.667 384-426.667-384h128v-341.333h213.333z" />
|
||||
|
||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 79 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user