Files
galaxy/static/scripts/mvc/annotation.js
T
carlfeberhard c4f8a30bbd UI, history: correct current dataset, tags, annos
Correct the 'currently used dataset' indicator (the left, blue border)
making sure it clears when non-dataset related content loads in the
center panel.

Correct the toggling of tags and annotations in the current history
view forcing the subviews to show/hide based on the history view
and not by toggling them individually.
2016-04-04 11:12:54 -04:00

2 lines
1.2 KiB
JavaScript

define(["mvc/base-mvc","utils/localization","ui/editable-text"],function(a,b){var c=Backbone.View.extend(a.LoggableMixin).extend(a.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"annotation-display",initialize:function(a){a=a||{},this.tooltipConfig=a.tooltipConfig||{placement:"bottom"},this.listenTo(this.model,"change:annotation",function(){this.render()}),this.hiddenUntilActivated(a.$activator,a)},render:function(){var a=this;return this.$el.html(this._template()),this.$annotation().make_text_editable({use_textarea:!0,on_finish:function(b){a.$annotation().text(b),a.model.save({annotation:b},{silent:!0}).fail(function(){a.$annotation().text(a.model.previous("annotation"))})}}),this},_template:function(){var a=this.model.get("annotation");return['<label class="prompt">',b("Annotation"),"</label>",'<div class="annotation">',_.escape(a),"</div>"].join("")},$annotation:function(){return this.$el.find(".annotation")},remove:function(){this.$annotation.off(),this.stopListening(this.model),Backbone.View.prototype.remove.call(this)},toString:function(){return["AnnotationEditor(",this.model+"",")"].join("")}});return{AnnotationEditor:c}});
//# sourceMappingURL=../../maps/mvc/annotation.js.map