+ [task#129964,doing,0.5h] add default value for job triger page.

This commit is contained in:
caoyanyi
2024-10-12 13:52:06 +08:00
committed by 田淑杰
parent aeb48e710a
commit a3f39ecb95
2 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -86,7 +86,7 @@ window.changeTriggerType = function(event)
}
if(type != 'tag' || repo.SCM == 'Subversion') $parentDom.append(eval(`${type}Field`).replace(/%s/g, window.triggerCount));
if(type != 'commit') eval(`window.${type}BlockInit()`);
if(window[`${type}BlockInit`]) eval(`window.${type}BlockInit()`);
$parentDom.find('.hidden').removeClass('hidden');
}
@@ -155,7 +155,7 @@ window.tagBlockInit = function()
items: options,
name: `svnDir[]`,
required: true,
defaultValue: options.length ? options[0].value : ''
defaultValue: job.svnDir
});
}
@@ -163,6 +163,7 @@ window.scheduleBlockInit = function()
{
$('#scheduleTime' + window.triggerCount).addClass('form-group-wrapper picker-box');
new zui.TimePicker('#scheduleTime' + window.triggerCount, {
name: 'atTime'
name: 'atTime',
defaultValue: job.atTime
})
}
+3 -1
View File
@@ -9,6 +9,7 @@ declare(strict_types=1);
* @link https://www.zentao.net
*/
namespace zin;
jsVar('job', $job);
jsVar('repo', $repo);
jsVar('dirs', !empty($dirs) ? $dirs : '');
jsVar('triggerRepeat', $lang->job->triggerRepeat);
@@ -53,7 +54,8 @@ jsVar('scheduleField', div
set::label(''),
set::name('atDay[]'),
set::control('checkListInline'),
set::items($lang->datepicker->dayNames)
set::items($lang->datepicker->dayNames),
set::value($job->atDay)
)
),
formRow