Skip to content

Commit

Permalink
break multi stage defaults out to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Jun 10, 2016
1 parent c250129 commit ed5539b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion pathway/__init__.py
Expand Up @@ -30,9 +30,10 @@ class PathwayPlugin(plugins.OpalPlugin):
'js/pathway/controllers/modal_pathway.js',
'js/pathway/controllers/find_patient.js',
'js/pathway/controllers/line_controller.js',
'js/pathway/controllers/multi_stage_default.js',
'js/pathway/controllers/multi_save.js',
'js/pathway/services/multi_stage_form.js',
'js/pathway/services/pathway_loader.js',
'js/pathway/controllers/multi_save.js',
]
}

Expand Down
13 changes: 13 additions & 0 deletions pathway/static/js/pathway/controllers/multi_stage_default.js
@@ -0,0 +1,13 @@
angular.module('opal.controllers').controller("MultistageDefault", function(){
this.valid = function(){
return true;
};

this.toSave = function(editing){
// does nothing;
};

this.showNext = function(editing){
return true;
}
});
3 changes: 2 additions & 1 deletion pathway/static/js/pathway/controllers/pathway.js
@@ -1,5 +1,6 @@
angular.module('opal.controllers').controller('PathwayController', function(
$scope, $http, $q, pathwayLoader, multistage, $routeParams, Options, episode
$scope, $http, $q, pathwayLoader, multistage, $routeParams, Options, episode,
$window
){
"use strict";

Expand Down
15 changes: 1 addition & 14 deletions pathway/static/js/pathway/services/multi_stage_form.js
@@ -1,17 +1,4 @@
angular.module('opal.services').controller("MultistageDefault", function(){
this.valid = function(){
return true;
};

this.toSave = function(editing){
// does nothing;
};

this.showNext = function(editing){
return true;
}
})
.provider('multistage', function(){
angular.module('opal.services').provider('multistage', function(){
var multistageProvider = {
$get: [
'$http', '$q', '$rootScope', '$document', '$templateRequest',
Expand Down

0 comments on commit ed5539b

Please sign in to comment.