diff --git a/module/mr/config.php b/module/mr/config.php index 3d38ccd826..bd8af69819 100644 --- a/module/mr/config.php +++ b/module/mr/config.php @@ -6,8 +6,12 @@ $config->mr->create->skippedFields = 'projectID,repo,job,compile'; $config->mr->create->requiredFields = 'gitlabID,sourceProject,sourceBranch,targetProject,targetBranch,title'; $config->mr->edit = new stdclass; +$config->mr->edit->skippedFields = 'projectID,repo,job,compile'; $config->mr->edit->requiredFields = 'gitlabID,sourceProject,sourceBranch,targetProject,targetBranch,title'; +$config->mr->editor = new stdclass(); +$config->mr->editor->diff = array('id' => 'commentText', 'tools' => 'simpleTools'); + $config->mr->maps = new stdclass; $config->mr->maps->sync = array(); $config->mr->maps->sync['title'] = 'title|field|'; @@ -24,4 +28,4 @@ $config->mr->maps->sync['mergeStatus'] = 'merge_status|field|'; $config->mrapproval = new stdclass(); $config->mrapproval->create = new stdclass(); $config->mrapproval->create->skippedFields = ''; -$config->mrapproval->create->requiredFields = 'mrID,account,date,action'; \ No newline at end of file +$config->mrapproval->create->requiredFields = 'mrID,account,date,action'; diff --git a/module/mr/js/edit.js b/module/mr/js/edit.js new file mode 100644 index 0000000000..dbeab4b753 --- /dev/null +++ b/module/mr/js/edit.js @@ -0,0 +1,20 @@ +$(function () { + $('#repo').change(function () { + repoID = $(this).val(); + jobUrl = createLink('mr', 'ajaxGetJobList', "repoID=" + repoID); + $.get(jobUrl, function (response) { + $('#job').html('').append(response); + $('#job').chosen().trigger("chosen:updated");; + }); + }); + + $('#job').change(function () { + jobID = $(this).val(); + compileUrl = createLink('mr', 'ajaxGetCompileList', "job=" + jobID); + $.get(compileUrl, function (response) { + $('#compile').html('').append(response); + $('#compile').chosen().trigger("chosen:updated");; + }); + }); + +}); diff --git a/module/mr/view/create.html.php b/module/mr/view/create.html.php index 7715f689ad..549e56b64f 100644 --- a/module/mr/view/create.html.php +++ b/module/mr/view/create.html.php @@ -52,17 +52,17 @@