Show correct subworkflow name

This commit is contained in:
guerler
2015-12-16 17:12:23 -05:00
parent 530ceb13be
commit 12014cc225
4 changed files with 9 additions and 4 deletions
@@ -576,7 +576,7 @@ EditorFormView = Backbone.View.extend({
}
});
var $add = $( '<a/>' ).attr( 'href', '#' ).html( workflow.name ).on( 'click', function() {
self.add_node_for_subworkflow( workflow.id, workflow.name );
self.add_node_for_subworkflow( workflow.latest_id, workflow.name );
});
$section.find( '.toolSectionBg' ).append( $( '<div/>' ).addClass( 'toolTitle' ).append( $add ).append( copy.$el ) );
}
+6 -1
View File
@@ -346,6 +346,11 @@ class SubWorkflowModule( WorkflowModule ):
def default_state( Class ):
return dict( )
def get_name( self ):
if hasattr( self, 'subworkflow' ) and hasattr( self.subworkflow, 'name' ):
return self.subworkflow.name
return self.name
def get_errors( self ):
return None
@@ -459,7 +464,7 @@ class SubWorkflowModule( WorkflowModule ):
module=self, form=form )
def _abstract_config_form( self ):
form = formbuilder.FormBuilder( title=self.name )
form = formbuilder.FormBuilder( title=self.get_name() )
return form
def check_and_update_state( self ):
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long