* Change to new writing method.

This commit is contained in:
wangxuepeng
2023-11-17 15:30:47 +08:00
parent 2ce0e28a02
commit d9ff6e5656
6 changed files with 33 additions and 27 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ declare(strict_types=1);
namespace zin;
formPanel
(
set::id('setCodeForm'),
setID('setCodeForm'),
set::actions(array('submit')),
formRow
(
+1 -1
View File
@@ -26,7 +26,7 @@ else
include $this->app->getConfigRoot() . 'timezones.php';
formPanel
(
set::id('timezoneForm'),
setID('timezoneForm'),
set::actions(array('submit')),
set::actionsClass('w-1/3'),
formRow
+6 -6
View File
@@ -17,14 +17,14 @@ to::header
span
(
$lang->testcase->automation,
set::className('article-h1')
setClass('article-h1')
),
icon
(
'help',
set::className('text-gray'),
set::id('automationTip'),
set('data-toggle', 'tooltip'),
setClass('text-gray'),
setID('automationTip'),
setData(array('toggle' => 'tooltip')),
set('title', 'tooltip')
)
);
@@ -57,10 +57,10 @@ formPanel
),
div
(
set::className('input-group-btn'),
setClass('input-group-btn'),
a
(
set::className('btn'),
setClass('btn'),
$lang->zanode->create,
set::href(createLink('zanode', 'create')),
set::target('_blank')
+1 -1
View File
@@ -34,7 +34,7 @@ div
formBatchPanel
(
set::id('batchCreateTodoForm'),
setID('batchCreateTodoForm'),
set::customFields(array('list' => $customFields, 'show' => explode(',', $showFields), 'key' => 'batchCreateFields')),
on::change('[data-name="type"]', 'changeType'),
+11 -11
View File
@@ -59,9 +59,9 @@ formPanel
set::seg(true),
control
(
set::id('date'),
setID('date'),
setClass('date'),
set::name('date'),
set::className('date'),
set::value('today'),
set::type('datePicker'),
on::change('changeCreateDate')
@@ -70,10 +70,10 @@ formPanel
setClass('input-group-addon'),
checkbox
(
set::id('switchDate'),
setID('switchDate'),
setClass($lang->todo->periods['future']),
set::name('switchDate'),
set::text($lang->todo->periods['future']),
set::className($lang->todo->periods['future']),
on::change("zui.DatePicker.query('#date').render({disabled: e.target.checked})")
)
),
@@ -81,7 +81,7 @@ formPanel
setClass('input-group-addon'),
checkbox
(
set::id('cycle'),
setID('cycle'),
set::name('cycle'),
set::value('1'),
set::text($lang->todo->cycle),
@@ -132,10 +132,10 @@ formPanel
),
control
(
setID('configDate'),
set::type('datePicker'),
set::id('configDate'),
set::name('config[date]'),
set::className('cycle-date'),
setClass('cycle-date'),
on::change("e.target.closest('.input-group').classList.toggle('has-error', !e.target.value)")
)
)
@@ -353,8 +353,8 @@ formPanel
setClass('items-center ml-4'),
checkbox
(
setID('private'),
set::name('private'),
set::id('private'),
set::text($lang->todo->private),
set::value(1),
on::change("zui.Picker.query('#assignedTo').render({disabled: e.target.checked})")
@@ -364,7 +364,7 @@ formPanel
set::icon('help'),
toggle::tooltip(array('placement' => 'top-start', 'title' => $lang->todo->privateTip)),
set::square(true),
set::className('ghost h-6 mt-0.5 tooltip-btn')
setClass('ghost h-6 mt-0.5 tooltip-btn')
)
)
),
@@ -376,8 +376,8 @@ formPanel
set(array('id' => 'nameBox', 'required' => true, 'label' => $lang->todo->name, 'class' => 'name-box')),
div
(
setClass('w-full'),
setID('nameInputBox'),
setClass('w-full'),
input(set(array('id' => 'name', 'name' => 'name')))
)
),
@@ -402,9 +402,9 @@ formPanel
),
formGroup
(
setID('status'),
set::width('1/3'),
set::label($lang->todo->status),
set::id('status'),
set::name('status'),
set::items($lang->todo->statusList),
set::required(true)
+13 -7
View File
@@ -120,8 +120,8 @@ if(hasPriv('task', 'create'))
(
div
(
set::className('toolbar gap-4 w-full justify-center'),
btn($lang->todo->reasonList['task'], set::id('toTaskButton'), setClass('primary')),
setClass('toolbar gap-4 w-full justify-center'),
btn($lang->todo->reasonList['task'], setID('toTaskButton'), setClass('primary')),
on::click('toTask')
)
),
@@ -165,8 +165,8 @@ if(hasPriv('bug', 'create'))
(
div
(
set::className('toolbar gap-4 w-full justify-center'),
btn($lang->todo->reasonList['bug'], set::id('toBugButton'), setClass('primary')),
setClass('toolbar gap-4 w-full justify-center'),
btn($lang->todo->reasonList['bug'], setID('toBugButton'), setClass('primary')),
on::click('toBug')
)
),
@@ -318,9 +318,15 @@ $fnGenerateFrom = function() use ($app, $lang, $config, $todo)
a
(
set::href(createLink($todo->type, 'view', "id={$todo->objectID}", '', false)),
set('data-toggle', 'modal'),
set('data-data-type', 'html'),
set('data-type', 'ajax'),
setData
(
array
(
'toggle' => 'modal',
'data-type' => 'html',
'type' => 'ajax'
)
),
$todo->name
)
);