-(function() {
- var run_pipeline_button_state = function() {
- var a = $('a.editable.required.editable-empty');
- if (a.length > 0) {
- $("#run-pipeline-button").addClass("disabled");
+function run_pipeline_button_state() {
+ var a = $('a.editable.required.editable-empty,input.form-control.required[value=]');
+ if (a.length > 0) {
+ $(".run-pipeline-button").addClass("disabled");
+ }
+ else {
+ $(".run-pipeline-button").removeClass("disabled");
+ }
+}
+
+$(document).on('editable:success', function(event, tag, response, newValue) {
+ var $tag = $(tag);
+ if ($('.run-pipeline-button').length == 0)
+ return;
+ if ($tag.hasClass("required")) {
+ if (newValue && newValue.trim() != "") {
+ $tag.removeClass("editable-empty");
+ $tag.parent().css("background-color", "");
+ $tag.parent().prev().css("background-color", "");