commit/galaxy-central: carlfeberhard: History panel: use require definitions for tag and annotation editor views
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/fd27b9e4cda8/ Changeset: fd27b9e4cda8 User: carlfeberhard Date: 2014-03-19 21:26:31 Summary: History panel: use require definitions for tag and annotation editor views Affected #: 5 files diff -r 7ce48f2a34dd5d4cbac5d85bf94119380b15eeee -r fd27b9e4cda804e3bfbb9d94f076539ec1465ce5 static/scripts/mvc/annotations.js --- a/static/scripts/mvc/annotations.js +++ b/static/scripts/mvc/annotations.js @@ -1,3 +1,6 @@ +define([ +], function(){ +// ============================================================================= /** A view on any model that has a 'annotation' attribute */ var AnnotationEditor = Backbone.View.extend( LoggableMixin ).extend( HiddenUntilActivatedViewMixin ).extend({ @@ -69,3 +72,8 @@ /** string rep */ toString : function(){ return [ 'AnnotationEditor(', this.model + '', ')' ].join(''); } }); +// ============================================================================= +return { + AnnotationEditor : AnnotationEditor +}; +}); diff -r 7ce48f2a34dd5d4cbac5d85bf94119380b15eeee -r fd27b9e4cda804e3bfbb9d94f076539ec1465ce5 static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -1,7 +1,9 @@ define([ "mvc/dataset/hda-model", - "mvc/dataset/hda-base" -], function( hdaModel, hdaBase ){ + "mvc/dataset/hda-base", + "mvc/tags", + "mvc/annotations" +], function( hdaModel, hdaBase, tagsMod, annotationsMod ){ //============================================================================== /** @class Editing view for HistoryDatasetAssociation. * @name HDAEditView @@ -338,7 +340,7 @@ _renderTags : function( $where ){ var view = this; - this.tagsEditor = new TagsEditor({ + this.tagsEditor = new tagsMod.TagsEditor({ model : this.model, el : $where.find( '.tags-display' ), onshowFirstTime : function(){ this.render(); }, @@ -355,7 +357,7 @@ }, _renderAnnotation : function( $where ){ var view = this; - this.annotationEditor = new AnnotationEditor({ + this.annotationEditor = new annotationsMod.AnnotationEditor({ model : this.model, el : $where.find( '.annotation-display' ), onshowFirstTime : function(){ this.render(); }, diff -r 7ce48f2a34dd5d4cbac5d85bf94119380b15eeee -r fd27b9e4cda804e3bfbb9d94f076539ec1465ce5 static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -1,8 +1,10 @@ define([ "mvc/dataset/hda-model", "mvc/dataset/hda-edit", - "mvc/history/readonly-history-panel" -], function( hdaModel, hdaEdit, readonlyPanel ){ + "mvc/history/readonly-history-panel", + "mvc/tags", + "mvc/annotations" +], function( hdaModel, hdaEdit, readonlyPanel, tagsMod, annotationsMod ){ /* ============================================================================= TODO: @@ -101,7 +103,7 @@ /** render the tags sub-view controller */ _renderTags : function( $where ){ var panel = this; - this.tagsEditor = new TagsEditor({ + this.tagsEditor = new tagsMod.TagsEditor({ model : this.model, el : $where.find( '.history-controls .tags-display' ), onshowFirstTime : function(){ this.render(); }, @@ -122,7 +124,7 @@ /** render the annotation sub-view controller */ _renderAnnotation : function( $where ){ var panel = this; - this.annotationEditor = new AnnotationEditor({ + this.annotationEditor = new annotationsMod.AnnotationEditor({ model : this.model, el : $where.find( '.history-controls .annotation-display' ), onshowFirstTime : function(){ this.render(); }, diff -r 7ce48f2a34dd5d4cbac5d85bf94119380b15eeee -r fd27b9e4cda804e3bfbb9d94f076539ec1465ce5 static/scripts/mvc/tags.js --- a/static/scripts/mvc/tags.js +++ b/static/scripts/mvc/tags.js @@ -1,3 +1,6 @@ +define([ +], function(){ +// ============================================================================= /** A view on any model that has a 'tags' attribute (a list of tag strings) * Incorporates the select2 jQuery plugin for tags display/editing: * http://ivaynberg.github.io/select2/ @@ -103,3 +106,9 @@ /** string rep */ toString : function(){ return [ 'TagsEditor(', this.model + '', ')' ].join(''); } }); + +// ============================================================================= +return { + TagsEditor : TagsEditor +}; +}); diff -r 7ce48f2a34dd5d4cbac5d85bf94119380b15eeee -r fd27b9e4cda804e3bfbb9d94f076539ec1465ce5 templates/webapps/galaxy/history/history_panel.mako --- a/templates/webapps/galaxy/history/history_panel.mako +++ b/templates/webapps/galaxy/history/history_panel.mako @@ -92,9 +92,7 @@ <%def name="history_panel_javascripts()"> ${h.js( "utils/localization", - "mvc/base-mvc", - "mvc/tags", - "mvc/annotations" + "mvc/base-mvc" )} ${localize_js_strings([ Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org