* [story#60464,1h] add check all.
This commit is contained in:
@@ -647,6 +647,24 @@ class pivotState
|
||||
return $funcs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process check all.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function processCheckAll()
|
||||
{
|
||||
$from = $this->sqlBuilder['from'];
|
||||
$joins = $this->sqlBuilder['joins'];
|
||||
if($from['select'] == '*') $this->sqlBuilder['from']['select'] = array_keys($this->getTableDescList($from['alias']));
|
||||
|
||||
foreach($joins as $index => $join)
|
||||
{
|
||||
if($join['select'] == '*') $this->sqlBuilder['joins'][$index]['select'] = array_keys($this->getTableDescList($join['alias']));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate func alias.
|
||||
*
|
||||
|
||||
@@ -33,10 +33,12 @@ class fieldSelectPanel extends wg
|
||||
|
||||
protected function build()
|
||||
{
|
||||
list($table, $alias, $col) = $this->prop(array('table', 'alias', 'col'));
|
||||
global $lang;
|
||||
list($table, $alias, $fields, $values, $col) = $this->prop(array('table', 'alias', 'fields', 'values', 'col'));
|
||||
|
||||
$panelClass = $col == 1 ? "w-full" : 'w-1/' . min($col, 6) . '-gap-4';
|
||||
$checkClass = 'checkbox-col-' . max(floor(6 / $col), 1);
|
||||
$isCheckedAll = count($fields) == count($values);
|
||||
$panelClass = $col == 1 ? "w-full" : 'w-1/' . min($col, 6) . '-gap-4';
|
||||
$checkClass = 'checkbox-col-' . max(floor(6 / $col), 1);
|
||||
|
||||
return panel
|
||||
(
|
||||
@@ -45,21 +47,21 @@ class fieldSelectPanel extends wg
|
||||
set::title("$table({$alias})"),
|
||||
set::headingClass('bg-gray-100 relative'),
|
||||
set::bodyClass('h-70 overflow-y-auto'),
|
||||
/*to::heading
|
||||
to::heading
|
||||
(
|
||||
div
|
||||
(
|
||||
setClass('absolute right-4'),
|
||||
checkbox
|
||||
setClass('absolute right-4 flex gap-x-2'),
|
||||
btn
|
||||
(
|
||||
setClass('select-field-checkbox'),
|
||||
set::name("{$alias}all"),
|
||||
set::text($lang->bi->allFields),
|
||||
set::value('*'),
|
||||
set('data-alias', $alias)
|
||||
setClass('p-0 check-all'),
|
||||
set('data-alias', $alias),
|
||||
set('data-checked', $isCheckedAll),
|
||||
set::type('ghost'),
|
||||
$isCheckedAll ? $lang->bi->cancelAll : $lang->bi->checkAll
|
||||
)
|
||||
)
|
||||
),*/
|
||||
),
|
||||
checkList
|
||||
(
|
||||
setClass("flex justify-start gap-x-0 checkbox-col $checkClass"),
|
||||
|
||||
@@ -38,6 +38,8 @@ $lang->bi->addFunc = 'Add function';
|
||||
$lang->bi->emptyFuncs = 'Empty function。';
|
||||
$lang->bi->addWhere = 'Add group';
|
||||
$lang->bi->emptyWheres = 'Empty where。';
|
||||
$lang->bi->checkAll = 'Check All';
|
||||
$lang->bi->cancelAll = 'Cancel All';
|
||||
|
||||
$lang->bi->whereGroupTitle = 'The %s group';
|
||||
$lang->bi->addWhereGroup = 'Add group';
|
||||
|
||||
@@ -38,6 +38,8 @@ $lang->bi->addFunc = 'Add function';
|
||||
$lang->bi->emptyFuncs = 'Empty function。';
|
||||
$lang->bi->addWhere = 'Add group';
|
||||
$lang->bi->emptyWheres = 'Empty where。';
|
||||
$lang->bi->checkAll = 'Check All';
|
||||
$lang->bi->cancelAll = 'Cancel All';
|
||||
|
||||
$lang->bi->whereGroupTitle = 'The %s group';
|
||||
$lang->bi->addWhereGroup = 'Add group';
|
||||
|
||||
@@ -38,6 +38,8 @@ $lang->bi->addFunc = 'Add function';
|
||||
$lang->bi->emptyFuncs = 'Empty function。';
|
||||
$lang->bi->addWhere = 'Add group';
|
||||
$lang->bi->emptyWheres = 'Empty where。';
|
||||
$lang->bi->checkAll = 'Check All';
|
||||
$lang->bi->cancelAll = 'Cancel All';
|
||||
|
||||
$lang->bi->whereGroupTitle = 'The %s group';
|
||||
$lang->bi->addWhereGroup = 'Add group';
|
||||
|
||||
@@ -42,6 +42,8 @@ $lang->bi->addFunc = '新增函数字段';
|
||||
$lang->bi->emptyFuncs = '暂未新增函数字段。';
|
||||
$lang->bi->addWhere = '添加组';
|
||||
$lang->bi->emptyWheres = '暂未添加确定性查询条件。';
|
||||
$lang->bi->checkAll = '全选';
|
||||
$lang->bi->cancelAll = '取消全选';
|
||||
|
||||
$lang->bi->whereGroupTitle = '第%s组确定性查询条件';
|
||||
$lang->bi->addWhereGroup = '添加组';
|
||||
|
||||
Reference in New Issue
Block a user