Add "After latest" button in the build actions form
This commit is contained in:
parent
c7f2310250
commit
85ccd68f07
|
@ -244,6 +244,8 @@
|
||||||
onchange="this.form['start-after-id'].disabled = !this.checked" />
|
onchange="this.form['start-after-id'].disabled = !this.checked" />
|
||||||
<label for="build-action-start-after">After</label>
|
<label for="build-action-start-after">After</label>
|
||||||
<input type="text" name="start-after-id" value="" placeholder="build action ID" disabled="disabled" />
|
<input type="text" name="start-after-id" value="" placeholder="build action ID" disabled="disabled" />
|
||||||
|
<input type="button" name="start-after-latest" value="After latest"
|
||||||
|
title="Start after the first action displayed on the current page of the build actions table" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,6 +34,17 @@ export function initBuildActionsForm()
|
||||||
handleBuildActionPresetChange();
|
handleBuildActionPresetChange();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// allow selecting to start after the latest build action
|
||||||
|
const buildActionsFormElements = buildActionsForm.elements;
|
||||||
|
buildActionsFormElements['start-after-latest'].onclick = function() {
|
||||||
|
const condElement = buildActionsFormElements['start-condition'];
|
||||||
|
const idElement = buildActionsFormElements['start-after-id'];
|
||||||
|
const id = document.getElementById('build-actions-list')?.getElementsByTagName('table')[0]?.tBodies[0]?.getElementsByTagName('tr')[0]?.dataset.id;
|
||||||
|
condElement.value = 'after';
|
||||||
|
idElement.disabled = false;
|
||||||
|
idElement.value = id || '';
|
||||||
|
};
|
||||||
|
|
||||||
queryBuildActions();
|
queryBuildActions();
|
||||||
handleBuildActionTypeChange();
|
handleBuildActionTypeChange();
|
||||||
buildActionsForm.dataset.initialized = true;
|
buildActionsForm.dataset.initialized = true;
|
||||||
|
|
Loading…
Reference in New Issue