diff --git a/client/galaxy/scripts/mvc/dataset/dataset-li-edit.js b/client/galaxy/scripts/mvc/dataset/dataset-li-edit.js
index 4a3e5685147..f0990db9c0a 100644
--- a/client/galaxy/scripts/mvc/dataset/dataset-li-edit.js
+++ b/client/galaxy/scripts/mvc/dataset/dataset-li-edit.js
@@ -257,12 +257,26 @@ var DatasetListItemEdit = _super.extend(
// ......................................................................... events
/** event map */
events : _.extend( _.clone( _super.prototype.events ), {
- 'click .undelete-link' : function( ev ){ this.model.undelete(); return false; },
- 'click .purge-link' : '_confirmPurge'
+ 'click .undelete-link' : '_clickUndeleteLink',
+ 'click .purge-link' : '_clickPurgeLink',
+
+ 'click .edit-btn' : function( ev ){ this.trigger( 'edit', this, ev ); },
+ 'click .delete-btn' : function( ev ){ this.trigger( 'delete', this, ev ); },
+ 'click .rerun-btn' : function( ev ){ this.trigger( 'rerun', this, ev ); },
+ 'click .report-err-btn' : function( ev ){ this.trigger( 'report-err', this, ev ); },
+ 'click .visualization-btn' : function( ev ){ this.trigger( 'visualize', this, ev ); },
+ 'click .dbkey a' : function( ev ){ this.trigger( 'edit', this, ev ); }
}),
- /** listener for item purge */
- _confirmPurge : function _confirmPurge( ev ){
+
+ /** listener for item undelete (in the messages section) */
+ _clickUndeleteLink : function( ev ){
+ this.model.undelete();
+ return false;
+ },
+
+ /** listener for item purge (in the messages section) */
+ _clickPurgeLink : function( ev ){
//TODO: confirm dialog
this.model.purge();
return false;
diff --git a/client/galaxy/scripts/mvc/dataset/dataset-li.js b/client/galaxy/scripts/mvc/dataset/dataset-li.js
index 8c86876e613..d17cd482f09 100644
--- a/client/galaxy/scripts/mvc/dataset/dataset-li.js
+++ b/client/galaxy/scripts/mvc/dataset/dataset-li.js
@@ -313,6 +313,13 @@ var DatasetListItemView = _super.extend(
].join( '\n' ));
},
+ // ......................................................................... misc
+ events : _.extend( _.clone( _super.prototype.events ), {
+ 'click .display-btn' : function( ev ){ this.trigger( 'display', this, ev ); },
+ 'click .params-btn' : function( ev ){ this.trigger( 'params', this, ev ); },
+ 'click .download-btn' : function( ev ){ this.trigger( 'download', this, ev ); }
+ }),
+
// ......................................................................... misc
/** String representation */
toString : function(){
diff --git a/client/galaxy/scripts/mvc/history/history-panel-edit-current.js b/client/galaxy/scripts/mvc/history/history-panel-edit-current.js
index c96217f4c73..9805371c1f7 100644
--- a/client/galaxy/scripts/mvc/history/history-panel-edit-current.js
+++ b/client/galaxy/scripts/mvc/history/history-panel-edit-current.js
@@ -14,7 +14,13 @@ var HistoryPanelPrefs = BASE_MVC.SessionStorageModel.extend(
/** should the tags editor be shown or hidden initially? */
tagsEditorShown : false,
/** should the annotation editor be shown or hidden initially? */
- annotationEditorShown : false
+ annotationEditorShown : false,
+ ///** what is the currently focused content (dataset or collection) in the current history?
+ // * (the history panel will highlight and scroll to the focused content view)
+ // */
+ //focusedContentId : null
+ /** Current scroll position */
+ scrollPosition : 0
},
toString : function(){
return 'HistoryPanelPrefs(' + JSON.stringify( this.toJSON() ) + ')';
@@ -70,6 +76,20 @@ var CurrentHistoryPanel = _super.extend(
/** sub-views that will overlay this panel (collections) */
this.panelStack = [];
+
+ /** id of currently focused content */
+ this.currentContentId = attributes.currentContentId || null;
+ //NOTE: purposely not sent to localstorage since panel recreation roughly lines up with a reset of this value
+ },
+
+ /** Override to cache the current scroll position with a listener */
+ _setUpListeners : function(){
+ _super.prototype._setUpListeners.call( this );
+
+ var panel = this;
+ this.$scrollContainer().on( 'scroll', function( ev ){
+ panel.preferences.set( 'scrollPosition', $( this ).scrollTop() );
+ });
},
// ------------------------------------------------------------------------ loading history/item models
@@ -243,11 +263,34 @@ var CurrentHistoryPanel = _super.extend(
});
},
+ /** Override to scroll to cached position (in prefs) after swapping */
+ _swapNewRender : function( $newRender ){
+ _super.prototype._swapNewRender.call( this, $newRender );
+ var panel = this;
+
+ _.delay( function(){
+ var pos = panel.preferences.get( 'scrollPosition' );
+ if( pos ){
+ panel.scrollTo( pos );
+ }
+ }, 10 );
+ //TODO: is this enough of a delay on larger histories?
+
+ return this;
+ },
+
// ------------------------------------------------------------------------ sub-views
// reverse HID order
- /** Override to reverse order of views - newest contents on top */
+ /** Override to reverse order of views - newest contents on top
+ * and add the current-content highlight class to currentContentId's view
+ */
_attachItems : function( $whereTo ){
+ var panel = this;
this.$list( $whereTo ).append( this.views.reverse().map( function( view ){
+ // add current content
+ if( panel.currentContentId && view.model.id === panel.currentContentId ){
+ view.$el.addClass( 'current-content' );
+ }
return view.$el;
}));
return this;
@@ -298,9 +341,26 @@ var CurrentHistoryPanel = _super.extend(
view.on( 'collapsed:drilldown', function( v, drilldown ){
this._collapseDrilldownPanel( drilldown );
}, this );
+
+ // when content is manipulated, make it the current-content
+ view.on( 'display edit params rerun report-err visualize', function( v, ev ){
+ this.setCurrentContent( v );
+ }, this );
+
return this;
},
+ /** display 'current content': add a visible highlight and store the id of a content item */
+ setCurrentContent : function( view ){
+ this.$( '.history-content.current-content' ).removeClass( 'current-content' );
+ if( view ){
+ view.$el.addClass( 'current-content' );
+ this.currentContentId = view.model.id;
+ } else {
+ this.currentContentId = null;
+ }
+ },
+
/** Handle drill down by hiding this panels list and controls and showing the sub-panel */
_expandDrilldownPanel : function( drilldown ){
this.panelStack.push( drilldown );
diff --git a/client/galaxy/scripts/mvc/list/list-panel.js b/client/galaxy/scripts/mvc/list/list-panel.js
index 8437d6b31b9..eb20f49d4b8 100644
--- a/client/galaxy/scripts/mvc/list/list-panel.js
+++ b/client/galaxy/scripts/mvc/list/list-panel.js
@@ -679,28 +679,28 @@ var ListPanel = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend(
},
/** set the current scroll position of the panel in its parent */
- scrollTo : function( pos ){
- this.$scrollContainer().scrollTop( pos );
+ scrollTo : function( pos, speed ){
+ speed = speed || 0;
+ this.$scrollContainer().animate({ scrollTop: pos }, speed );
return this;
},
/** Scrolls the panel to the top. */
- scrollToTop : function(){
- this.$scrollContainer().scrollTop( 0 );
- return this;
+ scrollToTop : function( speed ){
+ return this.scrollTo( 0, speed );
},
/** */
- scrollToItem : function( view ){
+ scrollToItem : function( view, speed ){
if( !view ){ return this; }
- var itemTop = view.$el.offset().top;
- this.$scrollContainer().scrollTop( itemTop );
- return this;
+ //var itemTop = view.$el.offset().top;
+ var itemTop = view.$el.position().top;
+ return this.scrollTo( itemTop, speed );
},
/** Scrolls the panel to show the content with the given id. */
- scrollToId : function( id ){
- return this.scrollToItem( this.viewFromModelId( id ) );
+ scrollToId : function( id, speed ){
+ return this.scrollToItem( this.viewFromModelId( id ), speed );
},
// ------------------------------------------------------------------------ panel events
diff --git a/static/scripts/mvc/dataset/dataset-li-edit.js b/static/scripts/mvc/dataset/dataset-li-edit.js
index 4a3e5685147..f0990db9c0a 100644
--- a/static/scripts/mvc/dataset/dataset-li-edit.js
+++ b/static/scripts/mvc/dataset/dataset-li-edit.js
@@ -257,12 +257,26 @@ var DatasetListItemEdit = _super.extend(
// ......................................................................... events
/** event map */
events : _.extend( _.clone( _super.prototype.events ), {
- 'click .undelete-link' : function( ev ){ this.model.undelete(); return false; },
- 'click .purge-link' : '_confirmPurge'
+ 'click .undelete-link' : '_clickUndeleteLink',
+ 'click .purge-link' : '_clickPurgeLink',
+
+ 'click .edit-btn' : function( ev ){ this.trigger( 'edit', this, ev ); },
+ 'click .delete-btn' : function( ev ){ this.trigger( 'delete', this, ev ); },
+ 'click .rerun-btn' : function( ev ){ this.trigger( 'rerun', this, ev ); },
+ 'click .report-err-btn' : function( ev ){ this.trigger( 'report-err', this, ev ); },
+ 'click .visualization-btn' : function( ev ){ this.trigger( 'visualize', this, ev ); },
+ 'click .dbkey a' : function( ev ){ this.trigger( 'edit', this, ev ); }
}),
- /** listener for item purge */
- _confirmPurge : function _confirmPurge( ev ){
+
+ /** listener for item undelete (in the messages section) */
+ _clickUndeleteLink : function( ev ){
+ this.model.undelete();
+ return false;
+ },
+
+ /** listener for item purge (in the messages section) */
+ _clickPurgeLink : function( ev ){
//TODO: confirm dialog
this.model.purge();
return false;
diff --git a/static/scripts/mvc/dataset/dataset-li.js b/static/scripts/mvc/dataset/dataset-li.js
index 8c86876e613..d17cd482f09 100644
--- a/static/scripts/mvc/dataset/dataset-li.js
+++ b/static/scripts/mvc/dataset/dataset-li.js
@@ -313,6 +313,13 @@ var DatasetListItemView = _super.extend(
].join( '\n' ));
},
+ // ......................................................................... misc
+ events : _.extend( _.clone( _super.prototype.events ), {
+ 'click .display-btn' : function( ev ){ this.trigger( 'display', this, ev ); },
+ 'click .params-btn' : function( ev ){ this.trigger( 'params', this, ev ); },
+ 'click .download-btn' : function( ev ){ this.trigger( 'download', this, ev ); }
+ }),
+
// ......................................................................... misc
/** String representation */
toString : function(){
diff --git a/static/scripts/mvc/history/history-panel-edit-current.js b/static/scripts/mvc/history/history-panel-edit-current.js
index c96217f4c73..9805371c1f7 100644
--- a/static/scripts/mvc/history/history-panel-edit-current.js
+++ b/static/scripts/mvc/history/history-panel-edit-current.js
@@ -14,7 +14,13 @@ var HistoryPanelPrefs = BASE_MVC.SessionStorageModel.extend(
/** should the tags editor be shown or hidden initially? */
tagsEditorShown : false,
/** should the annotation editor be shown or hidden initially? */
- annotationEditorShown : false
+ annotationEditorShown : false,
+ ///** what is the currently focused content (dataset or collection) in the current history?
+ // * (the history panel will highlight and scroll to the focused content view)
+ // */
+ //focusedContentId : null
+ /** Current scroll position */
+ scrollPosition : 0
},
toString : function(){
return 'HistoryPanelPrefs(' + JSON.stringify( this.toJSON() ) + ')';
@@ -70,6 +76,20 @@ var CurrentHistoryPanel = _super.extend(
/** sub-views that will overlay this panel (collections) */
this.panelStack = [];
+
+ /** id of currently focused content */
+ this.currentContentId = attributes.currentContentId || null;
+ //NOTE: purposely not sent to localstorage since panel recreation roughly lines up with a reset of this value
+ },
+
+ /** Override to cache the current scroll position with a listener */
+ _setUpListeners : function(){
+ _super.prototype._setUpListeners.call( this );
+
+ var panel = this;
+ this.$scrollContainer().on( 'scroll', function( ev ){
+ panel.preferences.set( 'scrollPosition', $( this ).scrollTop() );
+ });
},
// ------------------------------------------------------------------------ loading history/item models
@@ -243,11 +263,34 @@ var CurrentHistoryPanel = _super.extend(
});
},
+ /** Override to scroll to cached position (in prefs) after swapping */
+ _swapNewRender : function( $newRender ){
+ _super.prototype._swapNewRender.call( this, $newRender );
+ var panel = this;
+
+ _.delay( function(){
+ var pos = panel.preferences.get( 'scrollPosition' );
+ if( pos ){
+ panel.scrollTo( pos );
+ }
+ }, 10 );
+ //TODO: is this enough of a delay on larger histories?
+
+ return this;
+ },
+
// ------------------------------------------------------------------------ sub-views
// reverse HID order
- /** Override to reverse order of views - newest contents on top */
+ /** Override to reverse order of views - newest contents on top
+ * and add the current-content highlight class to currentContentId's view
+ */
_attachItems : function( $whereTo ){
+ var panel = this;
this.$list( $whereTo ).append( this.views.reverse().map( function( view ){
+ // add current content
+ if( panel.currentContentId && view.model.id === panel.currentContentId ){
+ view.$el.addClass( 'current-content' );
+ }
return view.$el;
}));
return this;
@@ -298,9 +341,26 @@ var CurrentHistoryPanel = _super.extend(
view.on( 'collapsed:drilldown', function( v, drilldown ){
this._collapseDrilldownPanel( drilldown );
}, this );
+
+ // when content is manipulated, make it the current-content
+ view.on( 'display edit params rerun report-err visualize', function( v, ev ){
+ this.setCurrentContent( v );
+ }, this );
+
return this;
},
+ /** display 'current content': add a visible highlight and store the id of a content item */
+ setCurrentContent : function( view ){
+ this.$( '.history-content.current-content' ).removeClass( 'current-content' );
+ if( view ){
+ view.$el.addClass( 'current-content' );
+ this.currentContentId = view.model.id;
+ } else {
+ this.currentContentId = null;
+ }
+ },
+
/** Handle drill down by hiding this panels list and controls and showing the sub-panel */
_expandDrilldownPanel : function( drilldown ){
this.panelStack.push( drilldown );
diff --git a/static/scripts/mvc/list/list-panel.js b/static/scripts/mvc/list/list-panel.js
index 8437d6b31b9..eb20f49d4b8 100644
--- a/static/scripts/mvc/list/list-panel.js
+++ b/static/scripts/mvc/list/list-panel.js
@@ -679,28 +679,28 @@ var ListPanel = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend(
},
/** set the current scroll position of the panel in its parent */
- scrollTo : function( pos ){
- this.$scrollContainer().scrollTop( pos );
+ scrollTo : function( pos, speed ){
+ speed = speed || 0;
+ this.$scrollContainer().animate({ scrollTop: pos }, speed );
return this;
},
/** Scrolls the panel to the top. */
- scrollToTop : function(){
- this.$scrollContainer().scrollTop( 0 );
- return this;
+ scrollToTop : function( speed ){
+ return this.scrollTo( 0, speed );
},
/** */
- scrollToItem : function( view ){
+ scrollToItem : function( view, speed ){
if( !view ){ return this; }
- var itemTop = view.$el.offset().top;
- this.$scrollContainer().scrollTop( itemTop );
- return this;
+ //var itemTop = view.$el.offset().top;
+ var itemTop = view.$el.position().top;
+ return this.scrollTo( itemTop, speed );
},
/** Scrolls the panel to show the content with the given id. */
- scrollToId : function( id ){
- return this.scrollToItem( this.viewFromModelId( id ) );
+ scrollToId : function( id, speed ){
+ return this.scrollToItem( this.viewFromModelId( id ), speed );
},
// ------------------------------------------------------------------------ panel events
diff --git a/static/scripts/packed/mvc/dataset/dataset-li-edit.js b/static/scripts/packed/mvc/dataset/dataset-li-edit.js
index 8b4563710e0..e61034a908d 100644
--- a/static/scripts/packed/mvc/dataset/dataset-li-edit.js
+++ b/static/scripts/packed/mvc/dataset/dataset-li-edit.js
@@ -1 +1 @@
-define(["mvc/dataset/states","mvc/dataset/dataset-li","mvc/tags","mvc/annotations","mvc/base-mvc","utils/localization"],function(g,d,e,a,h,b){var f=d.DatasetListItemView;var i=f.extend({initialize:function(j){f.prototype.initialize.call(this,j);this.hasUser=j.hasUser;this.purgeAllowed=j.purgeAllowed||false;this.tagsEditorShown=j.tagsEditorShown||false;this.annotationEditorShown=j.annotationEditorShown||false},_renderPrimaryActions:function(){var j=f.prototype._renderPrimaryActions.call(this);if(this.model.get("state")===g.NOT_VIEWABLE){return j}return f.prototype._renderPrimaryActions.call(this).concat([this._renderEditButton(),this._renderDeleteButton()])},_renderEditButton:function(){if((this.model.get("state")===g.DISCARDED)||(!this.model.get("accessible"))){return null}var l=this.model.get("purged"),j=this.model.get("deleted"),k={title:b("Edit attributes"),href:this.model.urls.edit,target:this.linkTarget,faIcon:"fa-pencil",classes:"edit-btn"};if(j||l){k.disabled=true;if(l){k.title=b("Cannot edit attributes of datasets removed from disk")}else{if(j){k.title=b("Undelete dataset to edit attributes")}}}else{if(_.contains([g.UPLOAD,g.NEW],this.model.get("state"))){k.disabled=true;k.title=b("This dataset is not yet editable")}}return faIconButton(k)},_renderDeleteButton:function(){if((!this.model.get("accessible"))){return null}var j=this,k=this.model.isDeletedOrPurged();return faIconButton({title:!k?b("Delete"):b("Dataset is already deleted"),disabled:k,faIcon:"fa-times",classes:"delete-btn",onclick:function(){j.$el.find(".icon-btn.delete-btn").trigger("mouseout");j.model["delete"]()}})},_renderDetails:function(){var j=f.prototype._renderDetails.call(this),k=this.model.get("state");if(!this.model.isDeletedOrPurged()&&_.contains([g.OK,g.FAILED_METADATA],k)){this._renderTags(j);this._renderAnnotation(j);this._makeDbkeyEditLink(j)}this._setUpBehaviors(j);return j},_renderSecondaryActions:function(){var j=f.prototype._renderSecondaryActions.call(this);switch(this.model.get("state")){case g.UPLOAD:case g.NEW:case g.NOT_VIEWABLE:return j;case g.ERROR:j.unshift(this._renderErrButton());return j.concat([this._renderRerunButton()]);case g.OK:case g.FAILED_METADATA:return j.concat([this._renderRerunButton(),this._renderVisualizationsButton()])}return j.concat([this._renderRerunButton()])},_renderErrButton:function(){return faIconButton({title:b("View or report this error"),href:this.model.urls.report_error,classes:"report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_renderRerunButton:function(){return faIconButton({title:b("Run this job again"),href:this.model.urls.rerun,classes:"rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_renderVisualizationsButton:function(){var j=this.model.get("visualizations");if((this.model.isDeletedOrPurged())||(!this.hasUser)||(!this.model.hasData())||(_.isEmpty(j))){return null}if(!_.isObject(j[0])){this.warn("Visualizations have been switched off");return null}var k=$(this.templates.visualizations(j,this));this._addScratchBookFn(k.find(".visualization-link").addBack(".visualization-link"));return k},_addScratchBookFn:function(j){j.click(function(k){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:$(this).attr("href")});k.preventDefault();k.stopPropagation()}})},_renderTags:function(j){if(!this.hasUser){return}var k=this;this.tagsEditor=new e.TagsEditor({model:this.model,el:j.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){k.tagsEditorShown=true},onhide:function(){k.tagsEditorShown=false},$activator:faIconButton({title:b("Edit dataset tags"),classes:"tag-btn",faIcon:"fa-tags"}).appendTo(j.find(".actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(j){if(!this.hasUser){return}var k=this;this.annotationEditor=new a.AnnotationEditor({model:this.model,el:j.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){k.annotationEditorShown=true},onhide:function(){k.annotationEditorShown=false},$activator:faIconButton({title:b("Edit dataset annotation"),classes:"annotate-btn",faIcon:"fa-comment"}).appendTo(j.find(".actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},_makeDbkeyEditLink:function(j){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var k=$('? ').attr("href",this.model.urls.edit).attr("target",this.linkTarget);j.find(".dbkey .value").replaceWith(k)}},events:_.extend(_.clone(f.prototype.events),{"click .undelete-link":function(j){this.model.undelete();return false},"click .purge-link":"_confirmPurge"}),_confirmPurge:function c(j){this.model.purge();return false},toString:function(){var j=(this.model)?(this.model+""):("(no model)");return"HDAEditView("+j+")"}});i.prototype.templates=(function(){var k=_.extend({},f.prototype.templates.warnings,{failed_metadata:h.wrapTemplate(['<% if( dataset.state === "failed_metadata" ){ %>','
","<% } %>"],"dataset"),deleted:h.wrapTemplate(["<% if( dataset.deleted && !dataset.purged ){ %>",'',b("This dataset has been deleted"),'
',b("Undelete it")," ","<% if( view.purgeAllowed ){ %>",'
',b("Permanently remove it from disk")," ","<% } %>","
","<% } %>"],"dataset")});var j=h.wrapTemplate(["<% if( visualizations.length === 1 ){ %>",'">',' '," ","<% } else { %>",'","<% } %>"],"visualizations");return _.extend({},f.prototype.templates,{warnings:k,visualizations:j})}());return{DatasetListItemEdit:i}});
\ No newline at end of file
+define(["mvc/dataset/states","mvc/dataset/dataset-li","mvc/tags","mvc/annotations","mvc/base-mvc","utils/localization"],function(b,h,g,e,c,d){var f=h.DatasetListItemView;var a=f.extend({initialize:function(i){f.prototype.initialize.call(this,i);this.hasUser=i.hasUser;this.purgeAllowed=i.purgeAllowed||false;this.tagsEditorShown=i.tagsEditorShown||false;this.annotationEditorShown=i.annotationEditorShown||false},_renderPrimaryActions:function(){var i=f.prototype._renderPrimaryActions.call(this);if(this.model.get("state")===b.NOT_VIEWABLE){return i}return f.prototype._renderPrimaryActions.call(this).concat([this._renderEditButton(),this._renderDeleteButton()])},_renderEditButton:function(){if((this.model.get("state")===b.DISCARDED)||(!this.model.get("accessible"))){return null}var k=this.model.get("purged"),i=this.model.get("deleted"),j={title:d("Edit attributes"),href:this.model.urls.edit,target:this.linkTarget,faIcon:"fa-pencil",classes:"edit-btn"};if(i||k){j.disabled=true;if(k){j.title=d("Cannot edit attributes of datasets removed from disk")}else{if(i){j.title=d("Undelete dataset to edit attributes")}}}else{if(_.contains([b.UPLOAD,b.NEW],this.model.get("state"))){j.disabled=true;j.title=d("This dataset is not yet editable")}}return faIconButton(j)},_renderDeleteButton:function(){if((!this.model.get("accessible"))){return null}var i=this,j=this.model.isDeletedOrPurged();return faIconButton({title:!j?d("Delete"):d("Dataset is already deleted"),disabled:j,faIcon:"fa-times",classes:"delete-btn",onclick:function(){i.$el.find(".icon-btn.delete-btn").trigger("mouseout");i.model["delete"]()}})},_renderDetails:function(){var i=f.prototype._renderDetails.call(this),j=this.model.get("state");if(!this.model.isDeletedOrPurged()&&_.contains([b.OK,b.FAILED_METADATA],j)){this._renderTags(i);this._renderAnnotation(i);this._makeDbkeyEditLink(i)}this._setUpBehaviors(i);return i},_renderSecondaryActions:function(){var i=f.prototype._renderSecondaryActions.call(this);switch(this.model.get("state")){case b.UPLOAD:case b.NEW:case b.NOT_VIEWABLE:return i;case b.ERROR:i.unshift(this._renderErrButton());return i.concat([this._renderRerunButton()]);case b.OK:case b.FAILED_METADATA:return i.concat([this._renderRerunButton(),this._renderVisualizationsButton()])}return i.concat([this._renderRerunButton()])},_renderErrButton:function(){return faIconButton({title:d("View or report this error"),href:this.model.urls.report_error,classes:"report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_renderRerunButton:function(){return faIconButton({title:d("Run this job again"),href:this.model.urls.rerun,classes:"rerun-btn",target:this.linkTarget,faIcon:"fa-refresh"})},_renderVisualizationsButton:function(){var i=this.model.get("visualizations");if((this.model.isDeletedOrPurged())||(!this.hasUser)||(!this.model.hasData())||(_.isEmpty(i))){return null}if(!_.isObject(i[0])){this.warn("Visualizations have been switched off");return null}var j=$(this.templates.visualizations(i,this));this._addScratchBookFn(j.find(".visualization-link").addBack(".visualization-link"));return j},_addScratchBookFn:function(i){i.click(function(j){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Visualization",type:"url",content:$(this).attr("href")});j.preventDefault();j.stopPropagation()}})},_renderTags:function(i){if(!this.hasUser){return}var j=this;this.tagsEditor=new g.TagsEditor({model:this.model,el:i.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){j.tagsEditorShown=true},onhide:function(){j.tagsEditorShown=false},$activator:faIconButton({title:d("Edit dataset tags"),classes:"tag-btn",faIcon:"fa-tags"}).appendTo(i.find(".actions .right"))});if(this.tagsEditorShown){this.tagsEditor.toggle(true)}},_renderAnnotation:function(i){if(!this.hasUser){return}var j=this;this.annotationEditor=new e.AnnotationEditor({model:this.model,el:i.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){j.annotationEditorShown=true},onhide:function(){j.annotationEditorShown=false},$activator:faIconButton({title:d("Edit dataset annotation"),classes:"annotate-btn",faIcon:"fa-comment"}).appendTo(i.find(".actions .right"))});if(this.annotationEditorShown){this.annotationEditor.toggle(true)}},_makeDbkeyEditLink:function(i){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){var j=$('? ').attr("href",this.model.urls.edit).attr("target",this.linkTarget);i.find(".dbkey .value").replaceWith(j)}},events:_.extend(_.clone(f.prototype.events),{"click .undelete-link":"_clickUndeleteLink","click .purge-link":"_clickPurgeLink","click .edit-btn":function(i){this.trigger("edit",this,i)},"click .delete-btn":function(i){this.trigger("delete",this,i)},"click .rerun-btn":function(i){this.trigger("rerun",this,i)},"click .report-err-btn":function(i){this.trigger("report-err",this,i)},"click .visualization-btn":function(i){this.trigger("visualize",this,i)},"click .dbkey a":function(i){this.trigger("edit",this,i)}}),_clickUndeleteLink:function(i){this.model.undelete();return false},_clickPurgeLink:function(i){this.model.purge();return false},toString:function(){var i=(this.model)?(this.model+""):("(no model)");return"HDAEditView("+i+")"}});a.prototype.templates=(function(){var j=_.extend({},f.prototype.templates.warnings,{failed_metadata:c.wrapTemplate(['<% if( dataset.state === "failed_metadata" ){ %>','","<% } %>"],"dataset"),deleted:c.wrapTemplate(["<% if( dataset.deleted && !dataset.purged ){ %>",'',d("This dataset has been deleted"),'
',d("Undelete it")," ","<% if( view.purgeAllowed ){ %>",'
',d("Permanently remove it from disk")," ","<% } %>","
","<% } %>"],"dataset")});var i=c.wrapTemplate(["<% if( visualizations.length === 1 ){ %>",'">',' '," ","<% } else { %>",'","<% } %>"],"visualizations");return _.extend({},f.prototype.templates,{warnings:j,visualizations:i})}());return{DatasetListItemEdit:a}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/dataset/dataset-li.js b/static/scripts/packed/mvc/dataset/dataset-li.js
index c5179212b2b..0548e8f8be1 100644
--- a/static/scripts/packed/mvc/dataset/dataset-li.js
+++ b/static/scripts/packed/mvc/dataset/dataset-li.js
@@ -1 +1 @@
-define(["mvc/list/list-item","mvc/dataset/states","mvc/base-mvc","utils/localization"],function(d,a,b,c){var f=d.ListItemView;var e=f.extend({className:f.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(g){if(g.logger){this.logger=this.model.logger=g.logger}this.log(this+".initialize:",g);f.prototype.initialize.call(this,g);this.linkTarget=g.linkTarget||"_blank";this._setUpListeners()},_setUpListeners:function(){f.prototype._setUpListeners.call(this);this.model.on("change",function(h,g){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},_fetchModelDetails:function(){var g=this;if(g.model.inReadyState()&&!g.model.hasDetails()){return g.model.fetch({silent:true})}return jQuery.when()},remove:function(h,i){var g=this;h=h||this.fxSpeed;this.$el.fadeOut(h,function(){Backbone.View.prototype.remove.call(g);if(i){i.call(g)}})},render:function(g){return f.prototype.render.call(this,g)},_swapNewRender:function(g){f.prototype._swapNewRender.call(this,g);if(this.model.has("state")){this.$el.addClass("state-"+this.model.get("state"))}return this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var i=this.model.get("state");if((i===a.NOT_VIEWABLE)||(i===a.DISCARDED)||(!this.model.get("accessible"))){return null}var h={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged")){h.disabled=true;h.title=c("Cannot display datasets removed from disk")}else{if(i===a.UPLOAD){h.disabled=true;h.title=c("This dataset must finish uploading before it can be viewed")}else{if(i===a.NEW){h.disabled=true;h.title=c("This dataset is not yet viewable")}else{h.title=c("View data");h.href=this.model.urls.display;var g=this;h.onclick=function(j){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Data Viewer: "+g.model.get("name"),type:"other",content:function(k){require(["mvc/data"],function(l){var m=new l.TabularDataset({id:g.model.get("id")});$.when(m.fetch()).then(function(){l.createTabularDatasetChunkedView({model:m,parent_elt:k,embedded:true,height:"100%"})})})}});j.preventDefault()}}}}}h.faIcon="fa-eye";return faIconButton(h)},_renderDetails:function(){if(this.model.get("state")===a.NOT_VIEWABLE){return $(this.templates.noAccess(this.model.toJSON(),this))}var g=f.prototype._renderDetails.call(this);g.find(".actions .left").empty().append(this._renderSecondaryActions());g.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages());g.find(".display-applications").html(this._renderDisplayApplications());this._setUpBehaviors(g);return g},_renderSummary:function(){var g=this.model.toJSON(),h=this.templates.summaries[g.state];h=h||this.templates.summaries.unknown;return h(g,this)},_renderDetailMessages:function(){var g=this,i=$('
'),h=g.model.toJSON();_.each(g.templates.detailMessages,function(j){i.append($(j(h,g)))});return i},_renderDisplayApplications:function(){if(this.model.isDeletedOrPurged()){return""}return[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){this.debug("_renderSecondaryActions");switch(this.model.get("state")){case a.NOT_VIEWABLE:return[];case a.OK:case a.FAILED_METADATA:case a.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return faIconButton({title:c("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle"})},_renderDownloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}if(!_.isEmpty(this.model.get("meta_files"))){return this._renderMetaFileDownloadButton()}return $(['',' '," "].join(""))},_renderMetaFileDownloadButton:function(){var g=this.model.urls;return $(['"].join("\n"))},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"DatasetListItemView("+g+")"}});e.prototype.templates=(function(){var i=_.extend({},f.prototype.templates.warnings,{failed_metadata:b.wrapTemplate(['<% if( model.state === "failed_metadata" ){ %>','',c("An error occurred setting the metadata for this dataset"),"
","<% } %>"]),error:b.wrapTemplate(["<% if( model.error ){ %>",'',c("There was an error getting the data for this dataset"),": <%- model.error %>","
","<% } %>"]),purged:b.wrapTemplate(["<% if( model.purged ){ %>",'',c("This dataset has been deleted and removed from disk"),"
","<% } %>"]),deleted:b.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'',c("This dataset has been deleted"),"
","<% } %>"])});var j=b.wrapTemplate(['','
','
","<% if( !dataset.deleted && !dataset.purged ){ %>",'
','
','
',"<% if( dataset.peek ){ %>",'
<%= dataset.peek %> ',"<% } %>","<% } %>","
"],"dataset");var h=b.wrapTemplate(['','
',c("You do not have permission to view this dataset"),"
","
"],"dataset");var k={};k[a.OK]=k[a.FAILED_METADATA]=b.wrapTemplate(["<% if( dataset.misc_blurb ){ %>",'','<%- dataset.misc_blurb %> ',"
","<% } %>","<% if( dataset.file_ext ){ %>",'','',c("format")," ",'<%- dataset.file_ext %> ',"
","<% } %>","<% if( dataset.metadata_dbkey ){ %>",'','',c("database")," ",'',"<%- dataset.metadata_dbkey %>"," ","
","<% } %>","<% if( dataset.misc_info ){ %>",'','<%- dataset.misc_info %> ',"
","<% } %>"],"dataset");k[a.NEW]=b.wrapTemplate(["",c("This is a new dataset and not all of its data are available yet"),"
"],"dataset");k[a.NOT_VIEWABLE]=b.wrapTemplate(["",c("You do not have permission to view this dataset"),"
"],"dataset");k[a.DISCARDED]=b.wrapTemplate(["",c("The job creating this dataset was cancelled before completion"),"
"],"dataset");k[a.QUEUED]=b.wrapTemplate(["",c("This job is waiting to run"),"
"],"dataset");k[a.RUNNING]=b.wrapTemplate(["",c("This job is currently running"),"
"],"dataset");k[a.UPLOAD]=b.wrapTemplate(["",c("This dataset is currently uploading"),"
"],"dataset");k[a.SETTING_METADATA]=b.wrapTemplate(["",c("Metadata is being auto-detected"),"
"],"dataset");k[a.PAUSED]=b.wrapTemplate(["",c('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
"],"dataset");k[a.ERROR]=b.wrapTemplate(["<% if( !dataset.purged ){ %>","<%- dataset.misc_blurb %>
","<% } %>",'',c("An error occurred with this dataset"),": ",'<%- dataset.misc_info %>
'],"dataset");k[a.EMPTY]=b.wrapTemplate(["",c("No data"),": <%- dataset.misc_blurb %>
"],"dataset");k.unknown=b.wrapTemplate(['Error: unknown dataset state: "<%- dataset.state %>"
'],"dataset");var l={resubmitted:b.wrapTemplate(["<% if( model.resubmitted ){ %>",'',c("The job creating this dataset has been resubmitted"),"
","<% } %>"])};var g=b.wrapTemplate(["<% _.each( apps, function( app ){ %>",'','
<%- app.label %> ','
',"<% _.each( app.links, function( link ){ %>",'',"<% print( _l( link.text ) ); %>"," ","<% }); %>"," ","
","<% }); %>"],"apps");return _.extend({},f.prototype.templates,{warnings:i,details:j,noAccess:h,summaries:k,detailMessages:l,displayApplications:g})}());return{DatasetListItemView:e}});
\ No newline at end of file
+define(["mvc/list/list-item","mvc/dataset/states","mvc/base-mvc","utils/localization"],function(d,a,b,c){var f=d.ListItemView;var e=f.extend({className:f.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(g){if(g.logger){this.logger=this.model.logger=g.logger}this.log(this+".initialize:",g);f.prototype.initialize.call(this,g);this.linkTarget=g.linkTarget||"_blank";this._setUpListeners()},_setUpListeners:function(){f.prototype._setUpListeners.call(this);this.model.on("change",function(h,g){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},_fetchModelDetails:function(){var g=this;if(g.model.inReadyState()&&!g.model.hasDetails()){return g.model.fetch({silent:true})}return jQuery.when()},remove:function(h,i){var g=this;h=h||this.fxSpeed;this.$el.fadeOut(h,function(){Backbone.View.prototype.remove.call(g);if(i){i.call(g)}})},render:function(g){return f.prototype.render.call(this,g)},_swapNewRender:function(g){f.prototype._swapNewRender.call(this,g);if(this.model.has("state")){this.$el.addClass("state-"+this.model.get("state"))}return this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var i=this.model.get("state");if((i===a.NOT_VIEWABLE)||(i===a.DISCARDED)||(!this.model.get("accessible"))){return null}var h={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged")){h.disabled=true;h.title=c("Cannot display datasets removed from disk")}else{if(i===a.UPLOAD){h.disabled=true;h.title=c("This dataset must finish uploading before it can be viewed")}else{if(i===a.NEW){h.disabled=true;h.title=c("This dataset is not yet viewable")}else{h.title=c("View data");h.href=this.model.urls.display;var g=this;h.onclick=function(j){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Data Viewer: "+g.model.get("name"),type:"other",content:function(k){require(["mvc/data"],function(l){var m=new l.TabularDataset({id:g.model.get("id")});$.when(m.fetch()).then(function(){l.createTabularDatasetChunkedView({model:m,parent_elt:k,embedded:true,height:"100%"})})})}});j.preventDefault()}}}}}h.faIcon="fa-eye";return faIconButton(h)},_renderDetails:function(){if(this.model.get("state")===a.NOT_VIEWABLE){return $(this.templates.noAccess(this.model.toJSON(),this))}var g=f.prototype._renderDetails.call(this);g.find(".actions .left").empty().append(this._renderSecondaryActions());g.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages());g.find(".display-applications").html(this._renderDisplayApplications());this._setUpBehaviors(g);return g},_renderSummary:function(){var g=this.model.toJSON(),h=this.templates.summaries[g.state];h=h||this.templates.summaries.unknown;return h(g,this)},_renderDetailMessages:function(){var g=this,i=$('
'),h=g.model.toJSON();_.each(g.templates.detailMessages,function(j){i.append($(j(h,g)))});return i},_renderDisplayApplications:function(){if(this.model.isDeletedOrPurged()){return""}return[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){this.debug("_renderSecondaryActions");switch(this.model.get("state")){case a.NOT_VIEWABLE:return[];case a.OK:case a.FAILED_METADATA:case a.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return faIconButton({title:c("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle"})},_renderDownloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}if(!_.isEmpty(this.model.get("meta_files"))){return this._renderMetaFileDownloadButton()}return $(['',' '," "].join(""))},_renderMetaFileDownloadButton:function(){var g=this.model.urls;return $(['"].join("\n"))},events:_.extend(_.clone(f.prototype.events),{"click .display-btn":function(g){this.trigger("display",this,g)},"click .params-btn":function(g){this.trigger("params",this,g)},"click .download-btn":function(g){this.trigger("download",this,g)}}),toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"DatasetListItemView("+g+")"}});e.prototype.templates=(function(){var i=_.extend({},f.prototype.templates.warnings,{failed_metadata:b.wrapTemplate(['<% if( model.state === "failed_metadata" ){ %>','',c("An error occurred setting the metadata for this dataset"),"
","<% } %>"]),error:b.wrapTemplate(["<% if( model.error ){ %>",'',c("There was an error getting the data for this dataset"),": <%- model.error %>","
","<% } %>"]),purged:b.wrapTemplate(["<% if( model.purged ){ %>",'',c("This dataset has been deleted and removed from disk"),"
","<% } %>"]),deleted:b.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'',c("This dataset has been deleted"),"
","<% } %>"])});var j=b.wrapTemplate(['','
','
","<% if( !dataset.deleted && !dataset.purged ){ %>",'
','
','
',"<% if( dataset.peek ){ %>",'
<%= dataset.peek %> ',"<% } %>","<% } %>","
"],"dataset");var h=b.wrapTemplate(['','
',c("You do not have permission to view this dataset"),"
","
"],"dataset");var k={};k[a.OK]=k[a.FAILED_METADATA]=b.wrapTemplate(["<% if( dataset.misc_blurb ){ %>",'','<%- dataset.misc_blurb %> ',"
","<% } %>","<% if( dataset.file_ext ){ %>",'','',c("format")," ",'<%- dataset.file_ext %> ',"
","<% } %>","<% if( dataset.metadata_dbkey ){ %>",'','',c("database")," ",'',"<%- dataset.metadata_dbkey %>"," ","
","<% } %>","<% if( dataset.misc_info ){ %>",'','<%- dataset.misc_info %> ',"
","<% } %>"],"dataset");k[a.NEW]=b.wrapTemplate(["",c("This is a new dataset and not all of its data are available yet"),"
"],"dataset");k[a.NOT_VIEWABLE]=b.wrapTemplate(["",c("You do not have permission to view this dataset"),"
"],"dataset");k[a.DISCARDED]=b.wrapTemplate(["",c("The job creating this dataset was cancelled before completion"),"
"],"dataset");k[a.QUEUED]=b.wrapTemplate(["",c("This job is waiting to run"),"
"],"dataset");k[a.RUNNING]=b.wrapTemplate(["",c("This job is currently running"),"
"],"dataset");k[a.UPLOAD]=b.wrapTemplate(["",c("This dataset is currently uploading"),"
"],"dataset");k[a.SETTING_METADATA]=b.wrapTemplate(["",c("Metadata is being auto-detected"),"
"],"dataset");k[a.PAUSED]=b.wrapTemplate(["",c('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
"],"dataset");k[a.ERROR]=b.wrapTemplate(["<% if( !dataset.purged ){ %>","<%- dataset.misc_blurb %>
","<% } %>",'',c("An error occurred with this dataset"),": ",'<%- dataset.misc_info %>
'],"dataset");k[a.EMPTY]=b.wrapTemplate(["",c("No data"),": <%- dataset.misc_blurb %>
"],"dataset");k.unknown=b.wrapTemplate(['Error: unknown dataset state: "<%- dataset.state %>"
'],"dataset");var l={resubmitted:b.wrapTemplate(["<% if( model.resubmitted ){ %>",'',c("The job creating this dataset has been resubmitted"),"
","<% } %>"])};var g=b.wrapTemplate(["<% _.each( apps, function( app ){ %>",'','
<%- app.label %> ','
',"<% _.each( app.links, function( link ){ %>",'',"<% print( _l( link.text ) ); %>"," ","<% }); %>"," ","
","<% }); %>"],"apps");return _.extend({},f.prototype.templates,{warnings:i,details:j,noAccess:h,summaries:k,detailMessages:l,displayApplications:g})}());return{DatasetListItemView:e}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/history/history-panel-edit-current.js b/static/scripts/packed/mvc/history/history-panel-edit-current.js
index 98f612b9eaf..303f9fc8da6 100644
--- a/static/scripts/packed/mvc/history/history-panel-edit-current.js
+++ b/static/scripts/packed/mvc/history/history-panel-edit-current.js
@@ -1 +1 @@
-define(["mvc/history/history-model","mvc/history/history-panel-edit","mvc/collection/collection-panel","mvc/base-mvc","utils/localization"],function(d,c,a,h,b){var e=h.SessionStorageModel.extend({defaults:{tagsEditorShown:false,annotationEditorShown:false},toString:function(){return"HistoryPanelPrefs("+JSON.stringify(this.toJSON())+")"}});e.storageKey=function f(){return("history-panel")};var g=c.HistoryPanelEdit;var i=g.extend({className:g.prototype.className+" current-history-panel",emptyMsg:b("This history is empty. Click 'Get Data' on the left tool menu to start"),noneFoundMsg:b("No matching datasets found"),HDCAViewClass:g.prototype.HDCAViewClass.extend({foldoutStyle:"drilldown"}),initialize:function(j){j=j||{};this.preferences=new e(_.extend({id:e.storageKey()},_.pick(j,_.keys(e.prototype.defaults))));g.prototype.initialize.call(this,j);this.panelStack=[]},loadCurrentHistory:function(k){this.debug(this+".loadCurrentHistory");var j=this;return this.loadHistoryWithDetails("current",k).then(function(m,l){j.trigger("current-history",j)})},switchToHistory:function(m,l){var j=this,k=function(){return jQuery.getJSON(galaxy_config.root+"history/set_as_current?id="+m)};return this.loadHistoryWithDetails(m,l,k).then(function(o,n){j.trigger("switched-history",j)})},createNewHistory:function(l){if(!Galaxy||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){this.displayMessage("error",b("You must be logged in to create histories"));return $.when()}var j=this,k=function(){return jQuery.getJSON(galaxy_config.root+"history/create_new_current")};return this.loadHistory(undefined,l,k).then(function(n,m){j.trigger("new-history",j)})},setModel:function(k,j,l){g.prototype.setModel.call(this,k,j,l);if(this.model){this.log("checking for updates");this.model.checkForUpdates()}return this},_setUpCollectionListeners:function(){g.prototype._setUpCollectionListeners.call(this);this.collection.on("state:ready",function(k,l,j){if((!k.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeItemView(this.viewFromModel(k))}},this)},_setUpModelListeners:function(){g.prototype._setUpModelListeners.call(this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}},_buildNewRender:function(){if(!this.model){return $()}var j=g.prototype._buildNewRender.call(this);j.find(".search").prependTo(j.find(".controls"));this._renderQuotaMessage(j);return j},_renderQuotaMessage:function(j){j=j||this.$el;return $(this.templates.quotaMsg({},this)).prependTo(j.find(".messages"))},_renderEmptyMessage:function(l){var k=this,j=k.$emptyMessage(l),m=$(".toolMenuContainer");if((_.isEmpty(k.views)&&!k.searchFor)&&(Galaxy&&Galaxy.upload&&m.size())){j.empty();j.html([b("This history is empty"),". ",b("You can "),'',b("load your own data")," ",b(" or "),'',b("get data from an external source")," "].join(""));j.find(".uploader-link").click(function(n){Galaxy.upload._eventShow(n)});j.find(".get-data-link").click(function(n){m.parent().scrollTop(0);m.find('span:contains("Get Data")').click()});return j.show()}return g.prototype._renderEmptyMessage.call(this,l)},_renderTags:function(j){var k=this;g.prototype._renderTags.call(this,j);if(this.preferences.get("tagsEditorShown")){this.tagsEditor.toggle(true)}this.tagsEditor.on("hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(l){k.preferences.set("tagsEditorShown",l.hidden)})},_renderAnnotation:function(j){var k=this;g.prototype._renderAnnotation.call(this,j);if(this.preferences.get("annotationEditorShown")){this.annotationEditor.toggle(true)}this.annotationEditor.on("hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(l){k.preferences.set("annotationEditorShown",l.hidden)})},_attachItems:function(j){this.$list(j).append(this.views.reverse().map(function(k){return k.$el}));return this},addItemView:function(o,p,n){this.log(this+".addItemView:",o);var l=this;if(!l._filterItem(o)){return undefined}if(l.panelStack.length){return this._collapseDrilldownPanel()}var k=l._createItemView(o);l.views.unshift(k);l.scrollToTop();$({}).queue([function m(r){var q=l.$emptyMessage();if(q.is(":visible")){q.fadeOut(l.fxSpeed,r)}else{r()}},function j(q){l.$list().prepend(k.render(0).$el.hide());k.$el.slideDown(l.fxSpeed)}]);return k},_setUpItemViewListeners:function(k){var j=this;g.prototype._setUpItemViewListeners.call(j,k);k.on("expanded:drilldown",function(m,l){this._expandDrilldownPanel(l)},this);k.on("collapsed:drilldown",function(m,l){this._collapseDrilldownPanel(l)},this);return this},_expandDrilldownPanel:function(j){this.panelStack.push(j);this.$("> .controls").add(this.$list()).hide();j.parentName=this.model.get("name");this.$el.append(j.render().$el)},_collapseDrilldownPanel:function(j){this.panelStack.pop();this.render()},connectToQuotaMeter:function(j){if(!j){return this}this.listenTo(j,"quota:over",this.showQuotaMessage);this.listenTo(j,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(j&&j.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var j=this.$el.find(".quota-message");if(j.is(":hidden")){j.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var j=this.$el.find(".quota-message");if(!j.is(":hidden")){j.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(j){if(!j){return this}this.on("new-storage",function(l,k){if(j&&l){j.findItemByHtml(b("Include Deleted Datasets")).checked=l.get("show_deleted");j.findItemByHtml(b("Include Hidden Datasets")).checked=l.get("show_hidden")}});return this},toString:function(){return"CurrentHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});i.prototype.templates=(function(){var j=h.wrapTemplate(['',b("You are over your disk quota"),". ",b("Tool execution is on hold until your disk usage drops below your allocated quota"),".","
"],"history");return _.extend(_.clone(g.prototype.templates),{quotaMsg:j})}());return{CurrentHistoryPanel:i}});
\ No newline at end of file
+define(["mvc/history/history-model","mvc/history/history-panel-edit","mvc/collection/collection-panel","mvc/base-mvc","utils/localization"],function(d,c,a,h,b){var e=h.SessionStorageModel.extend({defaults:{tagsEditorShown:false,annotationEditorShown:false,scrollPosition:0},toString:function(){return"HistoryPanelPrefs("+JSON.stringify(this.toJSON())+")"}});e.storageKey=function f(){return("history-panel")};var g=c.HistoryPanelEdit;var i=g.extend({className:g.prototype.className+" current-history-panel",emptyMsg:b("This history is empty. Click 'Get Data' on the left tool menu to start"),noneFoundMsg:b("No matching datasets found"),HDCAViewClass:g.prototype.HDCAViewClass.extend({foldoutStyle:"drilldown"}),initialize:function(j){j=j||{};this.preferences=new e(_.extend({id:e.storageKey()},_.pick(j,_.keys(e.prototype.defaults))));g.prototype.initialize.call(this,j);this.panelStack=[];this.currentContentId=j.currentContentId||null},_setUpListeners:function(){g.prototype._setUpListeners.call(this);var j=this;this.$scrollContainer().on("scroll",function(k){j.preferences.set("scrollPosition",$(this).scrollTop())})},loadCurrentHistory:function(k){this.debug(this+".loadCurrentHistory");var j=this;return this.loadHistoryWithDetails("current",k).then(function(m,l){j.trigger("current-history",j)})},switchToHistory:function(m,l){var j=this,k=function(){return jQuery.getJSON(galaxy_config.root+"history/set_as_current?id="+m)};return this.loadHistoryWithDetails(m,l,k).then(function(o,n){j.trigger("switched-history",j)})},createNewHistory:function(l){if(!Galaxy||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){this.displayMessage("error",b("You must be logged in to create histories"));return $.when()}var j=this,k=function(){return jQuery.getJSON(galaxy_config.root+"history/create_new_current")};return this.loadHistory(undefined,l,k).then(function(n,m){j.trigger("new-history",j)})},setModel:function(k,j,l){g.prototype.setModel.call(this,k,j,l);if(this.model){this.log("checking for updates");this.model.checkForUpdates()}return this},_setUpCollectionListeners:function(){g.prototype._setUpCollectionListeners.call(this);this.collection.on("state:ready",function(k,l,j){if((!k.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeItemView(this.viewFromModel(k))}},this)},_setUpModelListeners:function(){g.prototype._setUpModelListeners.call(this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}},_buildNewRender:function(){if(!this.model){return $()}var j=g.prototype._buildNewRender.call(this);j.find(".search").prependTo(j.find(".controls"));this._renderQuotaMessage(j);return j},_renderQuotaMessage:function(j){j=j||this.$el;return $(this.templates.quotaMsg({},this)).prependTo(j.find(".messages"))},_renderEmptyMessage:function(l){var k=this,j=k.$emptyMessage(l),m=$(".toolMenuContainer");if((_.isEmpty(k.views)&&!k.searchFor)&&(Galaxy&&Galaxy.upload&&m.size())){j.empty();j.html([b("This history is empty"),". ",b("You can "),'',b("load your own data")," ",b(" or "),'',b("get data from an external source")," "].join(""));j.find(".uploader-link").click(function(n){Galaxy.upload._eventShow(n)});j.find(".get-data-link").click(function(n){m.parent().scrollTop(0);m.find('span:contains("Get Data")').click()});return j.show()}return g.prototype._renderEmptyMessage.call(this,l)},_renderTags:function(j){var k=this;g.prototype._renderTags.call(this,j);if(this.preferences.get("tagsEditorShown")){this.tagsEditor.toggle(true)}this.tagsEditor.on("hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(l){k.preferences.set("tagsEditorShown",l.hidden)})},_renderAnnotation:function(j){var k=this;g.prototype._renderAnnotation.call(this,j);if(this.preferences.get("annotationEditorShown")){this.annotationEditor.toggle(true)}this.annotationEditor.on("hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(l){k.preferences.set("annotationEditorShown",l.hidden)})},_swapNewRender:function(k){g.prototype._swapNewRender.call(this,k);var j=this;_.delay(function(){var l=j.preferences.get("scrollPosition");if(l){j.scrollTo(l)}},10);return this},_attachItems:function(k){var j=this;this.$list(k).append(this.views.reverse().map(function(l){if(j.currentContentId&&l.model.id===j.currentContentId){l.$el.addClass("current-content")}return l.$el}));return this},addItemView:function(o,p,n){this.log(this+".addItemView:",o);var l=this;if(!l._filterItem(o)){return undefined}if(l.panelStack.length){return this._collapseDrilldownPanel()}var k=l._createItemView(o);l.views.unshift(k);l.scrollToTop();$({}).queue([function m(r){var q=l.$emptyMessage();if(q.is(":visible")){q.fadeOut(l.fxSpeed,r)}else{r()}},function j(q){l.$list().prepend(k.render(0).$el.hide());k.$el.slideDown(l.fxSpeed)}]);return k},_setUpItemViewListeners:function(k){var j=this;g.prototype._setUpItemViewListeners.call(j,k);k.on("expanded:drilldown",function(m,l){this._expandDrilldownPanel(l)},this);k.on("collapsed:drilldown",function(m,l){this._collapseDrilldownPanel(l)},this);k.on("display edit params rerun report-err visualize",function(l,m){this.setCurrentContent(l)},this);return this},setCurrentContent:function(j){this.$(".history-content.current-content").removeClass("current-content");if(j){j.$el.addClass("current-content");this.currentContentId=j.model.id}else{this.currentContentId=null}},_expandDrilldownPanel:function(j){this.panelStack.push(j);this.$("> .controls").add(this.$list()).hide();j.parentName=this.model.get("name");this.$el.append(j.render().$el)},_collapseDrilldownPanel:function(j){this.panelStack.pop();this.render()},connectToQuotaMeter:function(j){if(!j){return this}this.listenTo(j,"quota:over",this.showQuotaMessage);this.listenTo(j,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(j&&j.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var j=this.$el.find(".quota-message");if(j.is(":hidden")){j.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var j=this.$el.find(".quota-message");if(!j.is(":hidden")){j.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(j){if(!j){return this}this.on("new-storage",function(l,k){if(j&&l){j.findItemByHtml(b("Include Deleted Datasets")).checked=l.get("show_deleted");j.findItemByHtml(b("Include Hidden Datasets")).checked=l.get("show_hidden")}});return this},toString:function(){return"CurrentHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});i.prototype.templates=(function(){var j=h.wrapTemplate(['',b("You are over your disk quota"),". ",b("Tool execution is on hold until your disk usage drops below your allocated quota"),".","
"],"history");return _.extend(_.clone(g.prototype.templates),{quotaMsg:j})}());return{CurrentHistoryPanel:i}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/list/list-panel.js b/static/scripts/packed/mvc/list/list-panel.js
index f0267b21a53..22f6e92a47d 100644
--- a/static/scripts/packed/mvc/list/list-panel.js
+++ b/static/scripts/packed/mvc/list/list-panel.js
@@ -1 +1 @@
-define(["mvc/list/list-item","mvc/base-mvc","utils/localization"],function(d,b,c){var e=Backbone.View.extend(b.LoggableMixin).extend({viewClass:d.ListItemView,collectionClass:Backbone.Collection,tagName:"div",className:"list-panel",fxSpeed:"fast",emptyMsg:c("This list is empty"),noneFoundMsg:c("No matching items found"),searchPlaceholder:c("search"),multiselectActions:[],initialize:function(f,g){f=f||{};if(f.logger){this.logger=f.logger}this.log(this+".initialize:",f);this.fxSpeed=_.has(f,"fxSpeed")?(f.fxSpeed):(this.fxSpeed);this.filters=[];this.searchFor=f.searchFor||"";this.indicator=new LoadingIndicator(this.$el);this.selecting=(f.selecting!==undefined)?f.selecting:true;this.selected=f.selected||[];this.lastSelected=null;this.viewClass=f.viewClass||this.viewClass;this.views=[];this.collection=f.collection||(new this.collectionClass([]));this.filters=f.filters||[];this.$scrollContainer=f.$scrollContainer||this.$scrollContainer;this.title=f.title||"";this.subtitle=f.subtitle||"";this.multiselectActions=f.multiselectActions||this.multiselectActions;this.actionsPopup=null;this._setUpListeners()},freeViews:function(){_.each(this.views,function(f){f.off()});this.views=[];return this},_setUpListeners:function(){this.off();this.on("error",function(g,j,f,i,h){console.error(g,j,f,i,h)},this);this.on("loading",function(){this._showLoadingIndicator("loading...",40)},this);this.on("loading-done",function(){this._hideLoadingIndicator(40)},this);this.once("rendered",function(){this.trigger("rendered:initial",this)},this);if(this.logger){this.on("all",function(f){this.log(this+"",arguments)},this)}this._setUpCollectionListeners();this._setUpViewListeners();return this},_setUpCollectionListeners:function(){this.log(this+"._setUpCollectionListeners",this.collection);this.collection.off();this.collection.on("error",function(g,j,f,i,h){this.trigger("error",g,j,f,i,h)},this);this.collection.on("reset",function(){this.renderItems()},this);this.collection.on("add",this.addItemView,this);this.collection.on("remove",this.removeItemView,this);if(this.logger){this.collection.on("all",function(f){this.info(this+"(collection)",arguments)},this)}return this},_setUpViewListeners:function(){this.log(this+"._setUpViewListeners");this.on("view:selected",function(f,g){if(g&&g.shiftKey&&this.lastSelected){var h=this.viewFromModelId(this.lastSelected);if(h){this.selectRange(f,h)}}this.selected.push(f.model.id);this.lastSelected=f.model.id},this);this.on("view:de-selected",function(f,g){this.selected=_.without(this.selected,f.model.id)},this)},render:function(g){this.log(this+".render",g);var f=this._buildNewRender();this._setUpBehaviors(f);this._queueNewRender(f,g);return this},_buildNewRender:function(){this.debug(this+"(ListPanel)._buildNewRender");var f=$(this.templates.el({},this));this._renderControls(f);this._renderTitle(f);this._renderSubtitle(f);this._renderSearch(f);this.renderItems(f);return f},_renderControls:function(g){this.debug(this+"(ListPanel)._renderControls");var f=$(this.templates.controls({},this));g.find(".controls").replaceWith(f);return f},_renderTitle:function(f){},_renderSubtitle:function(f){},_queueNewRender:function(g,h){h=(h===undefined)?(this.fxSpeed):(h);var f=this;f.log("_queueNewRender:",g,h);$(f).queue("fx",[function(i){this.$el.fadeOut(h,i)},function(i){f._swapNewRender(g);i()},function(i){this.$el.fadeIn(h,i)},function(i){f.trigger("rendered",f);i()}])},_swapNewRender:function(f){this.$el.empty().attr("class",this.className).append(f.children());if(this.selecting){this.showSelectors(0)}return this},_setUpBehaviors:function(f){f=f||this.$el;f.find(".controls [title]").tooltip({placement:"bottom"});return this},$scrollContainer:function(){return this.$el.parent().parent()},$list:function(f){return(f||this.$el).find("> .list-items")},$messages:function(f){return(f||this.$el).find("> .controls .messages")},$emptyMessage:function(f){return(f||this.$el).find("> .empty-message")},renderItems:function(h){h=h||this.$el;var f=this;f.log(this+".renderItems",h);var g=f.$list(h);f.views=f._filterCollection().map(function(i){return f._createItemView(i).render(0)});g.empty();if(f.views.length){f._attachItems(h);f.$emptyMessage(h).hide()}else{f._renderEmptyMessage(h).show()}return f.views},_filterCollection:function(){var f=this;return f.collection.filter(_.bind(f._filterItem,f))},_filterItem:function(g){var f=this;return(_.every(f.filters.map(function(h){return h.call(g)})))&&(!f.searchFor||g.matchesAll(f.searchFor))},_createItemView:function(h){var i=this._getItemViewClass(h),g=_.extend(this._getItemViewOptions(h),{model:h}),f=new i(g);this._setUpItemViewListeners(f);return f},_getItemViewClass:function(f){return this.viewClass},_getItemViewOptions:function(f){return{fxSpeed:this.fxSpeed,expanded:false,selectable:this.selecting,selected:_.contains(this.selected,f.id),draggable:this.dragging}},_setUpItemViewListeners:function(g){var f=this;g.on("all",function(){var h=Array.prototype.slice.call(arguments,0);h[0]="view:"+h[0];f.trigger.apply(f,h)});return f},_attachItems:function(f){this.$list(f).append(this.views.map(function(g){return g.$el}));return this},_renderEmptyMessage:function(f){this.debug("_renderEmptyMessage",f,this.searchFor);var g=this.searchFor?this.noneFoundMsg:this.emptyMsg;return this.$emptyMessage(f).text(g)},expandAll:function(){_.each(this.views,function(f){f.expand()})},collapseAll:function(){_.each(this.views,function(f){f.collapse()})},addItemView:function(i,j,h){this.log(this+".addItemView:",i);var g=this;if(!g._filterItem(i)){return undefined}var f=g._createItemView(i);g.views.push(f);$(f).queue("fx",[function(k){g.$emptyMessage().fadeOut(g.fxSpeed,k)},function(k){g.$list().append(f.render().$el);k()}]);return f},removeItemView:function(i,j,h){this.log(this+".removeItemView:",i);var g=this,f=g.viewFromModel(i);if(!f){return undefined}$({}).queue("fx",[function(k){f.$el.fadeOut(g.fxSpeed,k)},function(k){g.views=_.without(g.views,f);f.remove();if(!g.views.length){g._renderEmptyMessage().fadeIn(g.fxSpeed,k)}else{k()}}]);return f},viewFromModelId:function(g){for(var f=0;f",'
','
','
',""]);var f=b.wrapTemplate(['','
",'
<%= view.subtitle %>
','
','
','
",'
','
','',c("All")," ",'',c("None")," ","
","
","
"]);return{el:g,controls:f}}());var a=e.extend({modelCollectionKey:"contents",initialize:function(f){e.prototype.initialize.call(this,f);this.selecting=(f.selecting!==undefined)?f.selecting:false;this.setModel(this.model,f)},setModel:function(g,f){f=f||{};this.debug(this+".setModel:",g,f);this.freeModel();this.freeViews();if(g){this.model=g;if(this.logger){this.model.logger=this.logger}this._setUpModelListeners();this.collection.off();this.collection=(this.model[this.modelCollectionKey])?this.model[this.modelCollectionKey]:(f.collection||(new this.collectionClass([])));this._setUpCollectionListeners();this.trigger("new-model",this)}return this},freeModel:function(){if(this.model){this.stopListening(this.model)}return this},_setUpModelListeners:function(){this.log(this+"._setUpModelListeners",this.model);this.model.on("error",function(){this.trigger.apply(panel,arguments)},this);return this},_renderControls:function(g){this.debug(this+"(ListPanel)._renderControls");var h=this.model?this.model.toJSON():{},f=$(this.templates.controls(h,this));g.find(".controls").replaceWith(f);return f},toString:function(){return"ModelListPanel("+this.model+")"}});a.prototype.templates=(function(){var f=b.wrapTemplate(['','
",'
<%= view.subtitle %>
','
','
','
",'
','
','',c("All")," ",'',c("None")," ","
","
","
"]);return _.extend(_.clone(e.prototype.templates),{controls:f})}());return{ListPanel:e,ModelListPanel:a}});
\ No newline at end of file
+define(["mvc/list/list-item","mvc/base-mvc","utils/localization"],function(d,b,c){var e=Backbone.View.extend(b.LoggableMixin).extend({viewClass:d.ListItemView,collectionClass:Backbone.Collection,tagName:"div",className:"list-panel",fxSpeed:"fast",emptyMsg:c("This list is empty"),noneFoundMsg:c("No matching items found"),searchPlaceholder:c("search"),multiselectActions:[],initialize:function(f,g){f=f||{};if(f.logger){this.logger=f.logger}this.log(this+".initialize:",f);this.fxSpeed=_.has(f,"fxSpeed")?(f.fxSpeed):(this.fxSpeed);this.filters=[];this.searchFor=f.searchFor||"";this.indicator=new LoadingIndicator(this.$el);this.selecting=(f.selecting!==undefined)?f.selecting:true;this.selected=f.selected||[];this.lastSelected=null;this.viewClass=f.viewClass||this.viewClass;this.views=[];this.collection=f.collection||(new this.collectionClass([]));this.filters=f.filters||[];this.$scrollContainer=f.$scrollContainer||this.$scrollContainer;this.title=f.title||"";this.subtitle=f.subtitle||"";this.multiselectActions=f.multiselectActions||this.multiselectActions;this.actionsPopup=null;this._setUpListeners()},freeViews:function(){_.each(this.views,function(f){f.off()});this.views=[];return this},_setUpListeners:function(){this.off();this.on("error",function(g,j,f,i,h){console.error(g,j,f,i,h)},this);this.on("loading",function(){this._showLoadingIndicator("loading...",40)},this);this.on("loading-done",function(){this._hideLoadingIndicator(40)},this);this.once("rendered",function(){this.trigger("rendered:initial",this)},this);if(this.logger){this.on("all",function(f){this.log(this+"",arguments)},this)}this._setUpCollectionListeners();this._setUpViewListeners();return this},_setUpCollectionListeners:function(){this.log(this+"._setUpCollectionListeners",this.collection);this.collection.off();this.collection.on("error",function(g,j,f,i,h){this.trigger("error",g,j,f,i,h)},this);this.collection.on("reset",function(){this.renderItems()},this);this.collection.on("add",this.addItemView,this);this.collection.on("remove",this.removeItemView,this);if(this.logger){this.collection.on("all",function(f){this.info(this+"(collection)",arguments)},this)}return this},_setUpViewListeners:function(){this.log(this+"._setUpViewListeners");this.on("view:selected",function(f,g){if(g&&g.shiftKey&&this.lastSelected){var h=this.viewFromModelId(this.lastSelected);if(h){this.selectRange(f,h)}}this.selected.push(f.model.id);this.lastSelected=f.model.id},this);this.on("view:de-selected",function(f,g){this.selected=_.without(this.selected,f.model.id)},this)},render:function(g){this.log(this+".render",g);var f=this._buildNewRender();this._setUpBehaviors(f);this._queueNewRender(f,g);return this},_buildNewRender:function(){this.debug(this+"(ListPanel)._buildNewRender");var f=$(this.templates.el({},this));this._renderControls(f);this._renderTitle(f);this._renderSubtitle(f);this._renderSearch(f);this.renderItems(f);return f},_renderControls:function(g){this.debug(this+"(ListPanel)._renderControls");var f=$(this.templates.controls({},this));g.find(".controls").replaceWith(f);return f},_renderTitle:function(f){},_renderSubtitle:function(f){},_queueNewRender:function(g,h){h=(h===undefined)?(this.fxSpeed):(h);var f=this;f.log("_queueNewRender:",g,h);$(f).queue("fx",[function(i){this.$el.fadeOut(h,i)},function(i){f._swapNewRender(g);i()},function(i){this.$el.fadeIn(h,i)},function(i){f.trigger("rendered",f);i()}])},_swapNewRender:function(f){this.$el.empty().attr("class",this.className).append(f.children());if(this.selecting){this.showSelectors(0)}return this},_setUpBehaviors:function(f){f=f||this.$el;f.find(".controls [title]").tooltip({placement:"bottom"});return this},$scrollContainer:function(){return this.$el.parent().parent()},$list:function(f){return(f||this.$el).find("> .list-items")},$messages:function(f){return(f||this.$el).find("> .controls .messages")},$emptyMessage:function(f){return(f||this.$el).find("> .empty-message")},renderItems:function(h){h=h||this.$el;var f=this;f.log(this+".renderItems",h);var g=f.$list(h);f.views=f._filterCollection().map(function(i){return f._createItemView(i).render(0)});g.empty();if(f.views.length){f._attachItems(h);f.$emptyMessage(h).hide()}else{f._renderEmptyMessage(h).show()}return f.views},_filterCollection:function(){var f=this;return f.collection.filter(_.bind(f._filterItem,f))},_filterItem:function(g){var f=this;return(_.every(f.filters.map(function(h){return h.call(g)})))&&(!f.searchFor||g.matchesAll(f.searchFor))},_createItemView:function(h){var i=this._getItemViewClass(h),g=_.extend(this._getItemViewOptions(h),{model:h}),f=new i(g);this._setUpItemViewListeners(f);return f},_getItemViewClass:function(f){return this.viewClass},_getItemViewOptions:function(f){return{fxSpeed:this.fxSpeed,expanded:false,selectable:this.selecting,selected:_.contains(this.selected,f.id),draggable:this.dragging}},_setUpItemViewListeners:function(g){var f=this;g.on("all",function(){var h=Array.prototype.slice.call(arguments,0);h[0]="view:"+h[0];f.trigger.apply(f,h)});return f},_attachItems:function(f){this.$list(f).append(this.views.map(function(g){return g.$el}));return this},_renderEmptyMessage:function(f){this.debug("_renderEmptyMessage",f,this.searchFor);var g=this.searchFor?this.noneFoundMsg:this.emptyMsg;return this.$emptyMessage(f).text(g)},expandAll:function(){_.each(this.views,function(f){f.expand()})},collapseAll:function(){_.each(this.views,function(f){f.collapse()})},addItemView:function(i,j,h){this.log(this+".addItemView:",i);var g=this;if(!g._filterItem(i)){return undefined}var f=g._createItemView(i);g.views.push(f);$(f).queue("fx",[function(k){g.$emptyMessage().fadeOut(g.fxSpeed,k)},function(k){g.$list().append(f.render().$el);k()}]);return f},removeItemView:function(i,j,h){this.log(this+".removeItemView:",i);var g=this,f=g.viewFromModel(i);if(!f){return undefined}$({}).queue("fx",[function(k){f.$el.fadeOut(g.fxSpeed,k)},function(k){g.views=_.without(g.views,f);f.remove();if(!g.views.length){g._renderEmptyMessage().fadeIn(g.fxSpeed,k)}else{k()}}]);return f},viewFromModelId:function(g){for(var f=0;f",'
','
','
',""]);var f=b.wrapTemplate(['','
",'
<%= view.subtitle %>
','
','
','
",'
','
','',c("All")," ",'',c("None")," ","
","
","
"]);return{el:g,controls:f}}());var a=e.extend({modelCollectionKey:"contents",initialize:function(f){e.prototype.initialize.call(this,f);this.selecting=(f.selecting!==undefined)?f.selecting:false;this.setModel(this.model,f)},setModel:function(g,f){f=f||{};this.debug(this+".setModel:",g,f);this.freeModel();this.freeViews();if(g){this.model=g;if(this.logger){this.model.logger=this.logger}this._setUpModelListeners();this.collection.off();this.collection=(this.model[this.modelCollectionKey])?this.model[this.modelCollectionKey]:(f.collection||(new this.collectionClass([])));this._setUpCollectionListeners();this.trigger("new-model",this)}return this},freeModel:function(){if(this.model){this.stopListening(this.model)}return this},_setUpModelListeners:function(){this.log(this+"._setUpModelListeners",this.model);this.model.on("error",function(){this.trigger.apply(panel,arguments)},this);return this},_renderControls:function(g){this.debug(this+"(ListPanel)._renderControls");var h=this.model?this.model.toJSON():{},f=$(this.templates.controls(h,this));g.find(".controls").replaceWith(f);return f},toString:function(){return"ModelListPanel("+this.model+")"}});a.prototype.templates=(function(){var f=b.wrapTemplate(['','
",'
<%= view.subtitle %>
','
','
','
",'
','
','',c("All")," ",'',c("None")," ","
","
","
"]);return _.extend(_.clone(e.prototype.templates),{controls:f})}());return{ListPanel:e,ModelListPanel:a}});
\ No newline at end of file
diff --git a/static/style/blue/base.css b/static/style/blue/base.css
index 50c1be2a1d1..a4c6433d575 100644
--- a/static/style/blue/base.css
+++ b/static/style/blue/base.css
@@ -1954,6 +1954,9 @@ div.permissionContainer{padding-left:20px}
.history-panel .controls .list-actions .list-action-popup-btn{float:right}
.history-panel .list-item.history-content{border-width:1px 0px 0px 0px}.history-panel .list-item.history-content:last-child{border-width:1px 0px 1px 0px}
.history-panel .empty-message{margin:0px 10px 0px 10px}
+.history-panel .dataset-collection .subtitle{margin-top:2px;font-size:90%;color:#777}
+.history-panel .dataset-collection-panel .controls{padding:0px}
+.history-panel .dataset-collection-panel .list-items{margin-top:0px}
.annotated-history-panel .controls{margin:0px}.annotated-history-panel .controls .name{font-size:150%;margin-bottom:4px}
.annotated-history-panel .controls .subtitle{color:black}.annotated-history-panel .controls .subtitle:not(:empty){margin:0px 0px 0px 4px}
.annotated-history-panel .controls .messages:not(:empty){margin-top:16px}
@@ -1965,9 +1968,8 @@ div.permissionContainer{padding-left:20px}
.annotated-history-panel table.list-items>tbody>tr>td:nth-child(2){padding:8px 16px 8px 16px;white-space:pre-wrap}
.annotated-history-panel table.list-items>tbody>tr>td>.list-item{border:0px}
.annotated-history-panel .empty-message{margin-top:8px}
-.history-panel .dataset-collection .subtitle{margin-top:2px;font-size:90%;color:#777}
-.history-panel .dataset-collection-panel .controls{padding:0px}
-.history-panel .dataset-collection-panel .list-items{margin-top:0px}
+.current-history-panel .list-item.history-content.current-content{border:2px solid black;border-bottom-width:2px}.current-history-panel .list-item.history-content.current-content .title-bar{padding:5px 8px 6px 6px}
+.current-history-panel .list-item.history-content.current-content .details{padding:0px 8px 5px 6px}
body.historyPage{background:#dfe5f9;color:#000;margin:5px;border:0;padding:0}
div.historyLinks{margin:5px 5px}
div.historyItem{margin:0 -5px;padding:8px 10px;border-top:solid #bfbfbf 1px;border-right:none;word-wrap:break-word;background:#eee}div.historyItem .state-icon{display:inline-block;vertical-align:middle;width:16px;height:16px;background-position:0 1px;background-repeat:no-repeat}
diff --git a/static/style/src/less/history.less b/static/style/src/less/history.less
index 3fea074ceb8..16de169c10a 100644
--- a/static/style/src/less/history.less
+++ b/static/style/src/less/history.less
@@ -488,6 +488,27 @@
}
}
+
+// ---------------------------------------------------------------------------- collections nested in histories
+.history-panel {
+ .dataset-collection {
+ .subtitle {
+ margin-top: 2px;
+ font-size: 90%;
+ color: #777;
+ }
+ }
+ .dataset-collection-panel {
+ .controls {
+ padding: 0px;
+ }
+ .list-items {
+ margin-top: 0px;
+ }
+ }
+}
+
+
// ---------------------------------------------------------------------------- annotated-history-panel
.annotated-history-panel {
.controls {
@@ -566,21 +587,31 @@
}
-// ---------------------------------------------------------------------------- collections nested in histories
-.history-panel {
- .dataset-collection {
- .subtitle {
- margin-top: 2px;
- font-size: 90%;
- color: #777;
+// ---------------------------------------------------------------------------- current-history-panel
+.current-history-panel {
+ .list-item.history-content.current-content {
+ //border-top: 2px solid black;
+ //border-right: 1px solid black;
+ //border-bottom: 2px solid black;
+ //border-left: 1px solid black;
+
+ //.title-bar {
+ // border-color: black;
+ // background: black;
+ // color: white;
+ //}
+
+ //position: relative;
+ //margin-left: -24px;
+ //z-index: 1000;
+
+ border: 2px solid black;
+ border-bottom-width: 2px;
+ .title-bar {
+ padding: 5px 8px 6px 6px;
}
- }
- .dataset-collection-panel {
- .controls {
- padding: 0px;
- }
- .list-items {
- margin-top: 0px;
+ .details {
+ padding: 0px 8px 5px 6px;
}
}
}