component.create_model = function() { client.post_project_models( { pid: component.project._id(), type: "cca", name: component.model.name(), description: component.model.description(), marking: component.model.marking(), success: function(mid) { component.model._id(mid); client.put_model_inputs( { mid: component.model._id(), sid: component.original._id(), success: function() { // component.tab(1); } }); }, error: dialog.ajax_error("Error creating model."), }); }
component.create_model = function() { client.post_project_models({ pid: component.project._id(), type: "parameter-image", name: component.model.name(), description: component.model.description(), marking: component.model.marking(), success: function(mid) { component.model._id(mid); component.remote.focus(true); }, error: dialog.ajax_error("Error creating model."), }); };
component.create_model = function() { client.post_project_models({ pid: component.project._id(), type: "VS", name: component.model.name(), description: component.model.description(), marking: component.model.marking(), success: function(mid) { component.model._id(mid); //component.tab(1); }, error: dialog.ajax_error("Error creating model.") }); };
component.create_model = function(formElement) { // Validating formElement.classList.add('was-validated'); // If valid... if (formElement.checkValidity() === true) { // Clearing form validation formElement.classList.remove('was-validated'); // Creating new model client.post_project_models( { pid: component.project._id(), type: component.model.type(), name: component.model.name(), description: component.model.description(), marking: component.model.marking(), success: function(mid) { component.model._id(mid); client.put_model_inputs( { mid: component.model._id(), sid: component.original._id(), "deep-copy": true, success: function() { list_uris(); component.tab(1); }, error: dialog.ajax_error("Error duplicating model artifacts: "), }); }, error: dialog.ajax_error("Error creating model."), }); } };