commit/galaxy-central: carlfeberhard: History panel: replace fugue sprites with font-awesome icons, style changes; pack scripts
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f6eb9dc06cdd/ Changeset: f6eb9dc06cdd User: carlfeberhard Date: 2013-10-30 19:00:06 Summary: History panel: replace fugue sprites with font-awesome icons, style changes; pack scripts Affected #: 22 files diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/mvc/dataset/hda-base.js --- a/static/scripts/mvc/dataset/hda-base.js +++ b/static/scripts/mvc/dataset/hda-base.js @@ -135,32 +135,6 @@ return [ this._render_displayButton() ]; }, - _render_iconButton : function( options ){ - options = options || {}; - //options.classes = [ 'icon-button', 'menu-button' ].concat( options.classes || [] ); - options.classes = [ 'icon-btn' ].concat( options.classes || [] ); - //options.classes = [ 'btn' ].concat( options.classes || [] ); - //options.classes = options.classes || []; - if( options.disabled ){ - options.classes.push( 'disabled' ); - } - - var button = [ - '<a class="', options.classes.join( ' ' ), '"', - (( options.title )? ( ' title="' + options.title + '"' ):( '' )), - (( options.target )? ( ' target="' + options.target + '"' ):( '' )), - ' href="', (( options.href )?( options.href ):( 'javascript:void(0);' )), '">', - // could go with something less specific here - like 'html' - '<span class="', options.faIcon, '"></span>', - '</a>' - ].join( '' ); - button = $( button ); - if( _.isFunction( options.onClick ) ){ - button.click( options.onClick ); - } - return button; - }, - /** Render icon-button to display this hda in the galaxy main iframe. * @returns {jQuery} rendered DOM */ @@ -171,7 +145,6 @@ || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.DISCARDED ) || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NEW ) || ( !this.model.get( 'accessible' ) ) ){ - this.displayButton = null; return null; } @@ -182,12 +155,12 @@ // show a disabled display if the data's been purged if( this.model.get( 'purged' ) ){ - displayBtnData.enabled = false; + displayBtnData.disabled = true; displayBtnData.title = _l( 'Cannot display datasets removed from disk' ); // disable if still uploading } else if( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.UPLOAD ){ - displayBtnData.enabled = false; + displayBtnData.disabled = true; displayBtnData.title = _l( 'This dataset must finish uploading before it can be viewed' ); } else { @@ -207,11 +180,10 @@ }); }; } + //return new IconButtonView({ model : new IconButton( displayBtnData ) }).render().$el; - this.displayButton = new IconButtonView({ model : new IconButton( displayBtnData ) }); - return this.displayButton.render().$el; - //displayBtnData.faIcon = 'fa-icon-eye-open'; - //return this._render_iconButton( displayBtnData ); + displayBtnData.faIcon = 'fa-eye'; + return faIconButton( displayBtnData ); }, // ......................................................................... primary actions @@ -226,8 +198,12 @@ // return either: a single download icon-button (if there are no meta files) if( _.isEmpty( meta_files ) ){ - return $([ '<a href="', urls.download, '" title="', _l( 'Download' ), - '" class="icon-button disk"></a>' ].join( '' ) ); + return $([ + //'<a href="', urls.download, '" title="', _l( 'Download' ), '" class="icon-button disk"></a>' + '<a href="' + urls.download + '" title="' + _l( 'Download' ) + '" class="icon-btn">', + '<span class="fa fa-floppy-o"></span>', + '</a>' + ].join( '' ) ); } // or a popupmenu with links to download assoc. meta files (if there are meta files) @@ -235,7 +211,7 @@ var menuId = 'dataset-' + this.model.get( 'id' ) + '-popup', html = [ '<div popupmenu="' + menuId + '">', - '<a class="action-button" href="' + urls.download + '">', _l( 'Download Dataset' ), '</a>', + '<a href="' + urls.download + '">', _l( 'Download Dataset' ), '</a>', '<a>' + _l( 'Additional Files' ) + '</a>', _.map( meta_files, function( meta_file ){ @@ -245,10 +221,15 @@ '</a>' ].join( '' ); }).join( '\n' ), + '</div>', - '</div>', - '<div style="float:left;" class="menubutton split popup" id="' + menuId + '">', - '<a href="' + urls.download + '" title="' + _l( 'Download' ) + '" class="icon-button disk"></a>', + '<div class="icon-btn-group">', + '<a href="' + urls.download + '" title="' + _l( 'Download' ) + '" class="icon-btn">', + '<span class="fa fa-floppy-o"></span>', + // join these w/o whitespace or there'll be a gap when rendered + '</a><a class="icon-btn popup" id="' + menuId + '">', + '<span class="fa fa-caret-down"></span>', + '</a>', '</div>' ].join( '\n' ); return $( html ); @@ -259,12 +240,18 @@ */ _render_showParamsButton : function(){ // gen. safe to show in all cases - return new IconButtonView({ model : new IconButton({ + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'View details' ), + // href : this.urls.show_params, + // target : 'galaxy_main', + // icon_class : 'information' + //}) }).render().$el; + return faIconButton({ title : _l( 'View details' ), href : this.urls.show_params, target : 'galaxy_main', - icon_class : 'information' - }) }).render().$el; + faIcon : 'fa-info-circle' + }); }, // ......................................................................... state body renderers @@ -272,6 +259,7 @@ * @returns {jQuery} rendered DOM */ _render_body : function(){ + console.debug( 'model:', this.model.toJSON() ); var $body = $( '<div>Error: unknown dataset state "' + this.model.get( 'state' ) + '".</div>' ), // cheesy: get function by assumed matching name renderFn = this[ '_render_body_' + this.model.get( 'state' ) ]; diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -57,11 +57,9 @@ // don't show edit while uploading, in-accessible // DO show if in error (ala previous history panel) if( ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NEW ) - || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.UPLOAD ) || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.DISCARDED ) || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) || ( !this.model.get( 'accessible' ) ) ){ - this.editButton = null; return null; } @@ -82,13 +80,18 @@ } else if( deleted ){ editBtnData.title = _l( 'Undelete dataset to edit attributes' ); } + + // disable if still uploading + } else if( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.UPLOAD ){ + editBtnData.disabled = true; + editBtnData.title = _l( 'This dataset must finish uploading before it can be edited' ); } + - //this.editButton = new IconButtonView({ model : new IconButton( editBtnData ) }); - //return this.editButton.render().$el; - return new IconButtonView({ model : new IconButton( editBtnData ) }).render().$el; - //editBtnData.faIcon = 'fa-icon-pencil'; - //return this._render_iconButton( editBtnData ); + //return new IconButtonView({ model : new IconButton( editBtnData ) }).render().$el; + + editBtnData.faIcon = 'fa-pencil'; + return faIconButton( editBtnData ); }, /** Render icon-button to delete this hda. @@ -99,7 +102,6 @@ if( ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NEW ) || ( this.model.get( 'state' ) === hdaModel.HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) || ( !this.model.get( 'accessible' ) ) ){ - this.deleteButton = null; return null; } @@ -109,7 +111,7 @@ title : _l( 'Delete' ), href : delete_url, icon_class : 'delete', - on_click : function() { + onclick : function() { // ...bler... tooltips being left behind in DOM (hover out never called on deletion) self.$el.find( '.menu-button.delete' ).trigger( 'mouseout' ); self.model[ 'delete' ](); @@ -122,11 +124,10 @@ enabled : false }; } - //this.deleteButton = new IconButtonView({ model : new IconButton( deleteBtnData ) }); - //return this.deleteButton.render().$el; - return new IconButtonView({ model : new IconButton( deleteBtnData ) }).render().$el; - //deleteBtnData.faIcon = 'fa-icon-remove'; - //return this._render_iconButton( deleteBtnData ); + //return new IconButtonView({ model : new IconButton( deleteBtnData ) }).render().$el; + + deleteBtnData.faIcon = 'fa-times'; + return faIconButton( deleteBtnData ); }, // ......................................................................... primary actions @@ -135,28 +136,41 @@ */ _render_errButton : function(){ if( this.model.get( 'state' ) !== hdaModel.HistoryDatasetAssociation.STATES.ERROR ){ - this.errButton = null; return null; } - return new IconButtonView({ model : new IconButton({ + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'View or report this error' ), + // href : this.urls.report_error, + // target : 'galaxy_main', + // icon_class : 'bug' + //})}).render().$el; + + return faIconButton({ title : _l( 'View or report this error' ), href : this.urls.report_error, target : 'galaxy_main', - icon_class : 'bug' - })}).render().$el; + faIcon : 'fa-bug' + }); }, /** Render icon-button to re-run the job that created this hda. * @returns {jQuery} rendered DOM */ _render_rerunButton : function(){ - return new IconButtonView({ model : new IconButton({ + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'Run this job again' ), + // href : this.urls.rerun, + // target : 'galaxy_main', + // icon_class : 'arrow-circle' + //}) }).render().$el; + + return faIconButton({ title : _l( 'Run this job again' ), href : this.urls.rerun, target : 'galaxy_main', - icon_class : 'arrow-circle' - }) }).render().$el; + faIcon : 'fa-refresh' + }); }, /** Render an icon-button or popupmenu based on the number of applicable visualizations @@ -167,7 +181,6 @@ var visualizations = this.model.get( 'visualizations' ); if( ( !this.model.hasData() ) || ( _.isEmpty( visualizations ) ) ){ - this.visualizationsButton = null; return null; } @@ -178,7 +191,6 @@ } if( !this.urls.visualization ){ - this.visualizationsButton = null; return null; } @@ -193,13 +205,19 @@ if( dbkey ){ params.dbkey = dbkey; } // render the icon from template - this.visualizationsButton = new IconButtonView({ model : new IconButton({ + //var visualizationsButton = new IconButtonView({ model : new IconButton({ + // title : _l( 'Visualize' ), + // href : this.urls.visualization, + // icon_class : 'chart_curve' + //})}); + //var $icon = visualizationsButton.render().addClass( 'visualize-icon' ); // needed? + ////return visualizationsButton.render().$el; + + var $icon = faIconButton({ title : _l( 'Visualize' ), href : this.urls.visualization, - icon_class : 'chart_curve' - })}); - var $icon = this.visualizationsButton.render().$el; - $icon.addClass( 'visualize-icon' ); // needed? + faIcon : 'fa-bar-chart-o' + }); // map a function to each visualization in the icon's attributes // create a popupmenu from that map @@ -244,16 +262,19 @@ _render_visualizationsFrameworkButton : function( visualizations ){ if( !( this.model.hasData() ) || !( visualizations && !_.isEmpty( visualizations ) ) ){ - this.visualizationsButton = null; return null; } // render the icon from template - this.visualizationsButton = new IconButtonView({ model : new IconButton({ + //var visualizationsButton = new IconButtonView({ model : new IconButton({ + // title : _l( 'Visualize' ), + // icon_class : 'chart_curve' + //})}); + //var $icon = visualizationsButton.render().$el; + var $icon = faIconButton({ title : _l( 'Visualize' ), - icon_class : 'chart_curve' - })}); - var $icon = this.visualizationsButton.render().$el; + faIcon : 'fa-bar-chart-o' + }); $icon.addClass( 'visualize-icon' ); // needed? // No need for popup menu because there's a single visualization. @@ -278,16 +299,21 @@ */ _render_tagButton : function(){ if( !this.hasUser || !this.urls.tags.get ){ - this.tagButton = null; return null; } - return new IconButtonView({ model : new IconButton({ + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'Edit dataset tags' ), + // target : 'galaxy_main', + // href : this.urls.tags.get, + // icon_class : 'tags' + //})}).render().$el; + + return faIconButton({ title : _l( 'Edit dataset tags' ), - target : 'galaxy_main', - href : this.urls.tags.get, - icon_class : 'tags' - })}).render().$el; + classes : 'dataset-tag-btn', + faIcon : 'fa-tags' + }); }, /** Render icon-button to load and display annotation html. @@ -295,15 +321,19 @@ */ _render_annotateButton : function(){ if( !this.hasUser || !this.urls.annotation.get ){ - this.annotateButton = null; return null; } - return new IconButtonView({ model : new IconButton({ + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'Edit dataset annotation' ), + // target : 'galaxy_main', + // icon_class : 'annotate' + //})}).render().$el; + return faIconButton({ title : _l( 'Edit dataset annotation' ), - target : 'galaxy_main', - icon_class : 'annotate' - })}).render().$el; + classes : 'dataset-annotate-btn', + faIcon : 'fa-comment' + }); }, // ......................................................................... state body renderers @@ -315,7 +345,7 @@ // add a message box about the failure at the top of the body then render the remaining body as STATES.OK var $link = $( '<a/>' ).attr({ href: this.urls.edit, target: 'galaxy_main' }) .text( _l( 'set it manually or retry auto-detection' ) ), - $span = $( '<span/>' ).text( _l( 'You may be able to' ) + ' ' ).append( $link ), + $span = $( '<span/>' ).text( '. ' + _l( 'You may be able to' ) + ' ' ).append( $link ), $body = hdaBase.HDABaseView.prototype._render_body_failed_metadata.call( this ); $body.find( '.warningmessagesmall strong' ).append( $span ); return $body; @@ -365,13 +395,13 @@ // ......................................................................... events /** event map */ events : { - 'click .dataset-title-bar' : 'toggleBodyVisibility', - 'click .dataset-undelete' : function( ev ){ this.model.undelete(); return false; }, - 'click .dataset-unhide' : function( ev ){ this.model.unhide(); return false; }, - 'click .dataset-purge' : 'confirmPurge', + 'click .dataset-title-bar' : 'toggleBodyVisibility', + 'click .dataset-undelete' : function( ev ){ this.model.undelete(); return false; }, + 'click .dataset-unhide' : function( ev ){ this.model.unhide(); return false; }, + 'click .dataset-purge' : 'confirmPurge', - 'click a.icon-button.tags' : 'loadAndDisplayTags', - 'click a.icon-button.annotate' : 'loadAndDisplayAnnotation' + 'click .dataset-tag-btn' : 'loadAndDisplayTags', + 'click .dataset-annotate-btn' : 'loadAndDisplayAnnotation' }, /** listener for item purge */ @@ -424,8 +454,7 @@ this.log( this + '.loadAndDisplayAnnotation', event ); var view = this, $annotationArea = this.$el.find( '.annotation-display' ), - $annotationElem = $annotationArea.find( '.annotation' ), - setAnnotationUrl = this.urls.annotation.set; + $annotationElem = $annotationArea.find( '.annotation' ); // Show or hide annotation area; if showing annotation area and it's empty, fill it. if ( $annotationArea.is( ":hidden" ) ){ diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/mvc/dataset/hda-model.js --- a/static/scripts/mvc/dataset/hda-model.js +++ b/static/scripts/mvc/dataset/hda-model.js @@ -116,6 +116,13 @@ }, // ........................................................................ common queries + toJSON : function(){ + var json = Backbone.Model.prototype.toJSON.call( this ); + //HACK: this should be done on the server side when setting + json.misc_info = jQuery.trim( json.misc_info ); + return json; + }, + /** Is this hda deleted or purged? */ isDeletedOrPurged : function(){ return ( this.get( 'deleted' ) || this.get( 'purged' ) ); diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -50,16 +50,7 @@ className : 'history-panel', /** (in ms) that jquery effects will use */ - //fxSpeed : 'fast', - fxSpeed : 400, - - /** event map */ - events : { - 'click .icon-button.tags' : 'loadAndDisplayTags', -//TODO: switch to common close (X) idiom - // allow (error) messages to be clicked away - 'click .message-container' : 'clearMessages' - }, + fxSpeed : 'fast', datasetsSelector : '.datasets-list', emptyMsgSelector : '.empty-history-message', @@ -616,7 +607,6 @@ }, function( next ){ //TODO: ideally, these would be set up before the fade in (can't because of async save text) - panel._setUpBehaviours(); if( callback ){ callback.call( this ); } panel.trigger( 'rendered', this ); } @@ -624,27 +614,6 @@ return this; }, - /** render with history data */ - renderModel : function( ){ - var $newRender = $( '<div/>' ); - // render the main template, tooltips - //NOTE: this is done before the items, since item views should handle theirs themselves - var templateFn = ( !Galaxy.currUser.isAnonymous() )?( HistoryPanel.templates.historyPanel ) - :( HistoryPanel.templates.anonHistoryPanel ); - $newRender.append( templateFn( this.model.toJSON() ) ); - - $newRender.find( '[title]' ).tooltip({ placement: 'bottom' }); - - // render hda views (if any and any shown (show_deleted/hidden) - //TODO: this seems too elaborate - if( !this.model.hdas.length - || !this.renderItems( $newRender.find( this.datasetsSelector ) ) ){ - // if history is empty or no hdas would be rendered, show the empty message - $newRender.find( this.emptyMsgSelector ).show(); - } - return $newRender; - }, - /** render with no history data */ renderWithoutModel : function( ){ // we'll always need the message container @@ -654,12 +623,119 @@ return $newRender.append( $msgContainer ); }, + /** render with history data */ + renderModel : function( ){ + var $newRender = $( '<div/>' ); + + // render based on anonymity, set up behaviors + if( Galaxy.currUser.isAnonymous() ){ + $newRender.append( HistoryPanel.templates.anonHistoryPanel( this.model.toJSON() ) ); + + } else { + $newRender.append( HistoryPanel.templates.historyPanel( this.model.toJSON() ) ); + $newRender.find( '.history-secondary-actions' ).append([ + this._render_tagButton(), + this._render_annotateButton() + ]); + } + this._setUpBehaviours( $newRender ); + + // render hda views (if any and any shown (show_deleted/hidden) + //TODO: this seems too elaborate + if( !this.model.hdas.length + || !this.renderHdas( $newRender.find( this.datasetsSelector ) ) ){ + // if history is empty or no hdas would be rendered, show the empty message + $newRender.find( this.emptyMsgSelector ).show(); + } + return $newRender; + }, + + /** Render icon-button to load and display tagging html. + * @returns {jQuery} rendered DOM + */ + _render_tagButton : function(){ + return faIconButton({ + title : _l( 'Edit history tags' ), + classes : 'history-tag-button', + faIcon : 'fa-tags' + }); + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'Edit history tags' ), + // icon_class : 'tags' + //})}).render().$el; + }, + + /** Render icon-button to load and display annotation html. + * @returns {jQuery} rendered DOM + */ + _render_annotateButton : function(){ + return faIconButton({ + title : _l( 'Edit history tags' ), + classes : 'history-annotate-button', + faIcon : 'fa-comment' + }); + //return new IconButtonView({ model : new IconButton({ + // title : _l( 'Edit history annotation' ), + // icon_class : 'annotate' + //})}).render().$el; + }, + + /** Set up HistoryPanel js/widget behaviours + */ + //TODO: these should be either sub-MVs, or handled by events + _setUpBehaviours : function( $where ){ + $where = $where || this.$el; + $where.find( '[title]' ).tooltip({ placement: 'bottom' }); + + // anon users shouldn't have access to any of the following + if( !this.model || !Galaxy.currUser || Galaxy.currUser.isAnonymous() ){ return; } + + // annotation slide down + var panel = this, + // need specific selector ('annotation-display' is used in HDAs, too) + $historyAnnotationArea = $where.find( '.history-controls .annotation-display' ); + $where.find( '.history-controls .history-annotate-button' ).click( function() { + if( $historyAnnotationArea.is( ":hidden" ) ){ + //HACK: for whitespace added to annotation + var $anno = panel.$el.find( '.history-controls .annotation' ); + $anno.text( jQuery.trim( $anno.text() ) ); + $historyAnnotationArea.slideDown( panel.fxSpeed ); + + } else { + $historyAnnotationArea.slideUp( panel.fxSpeed ); + } + return false; + }); + //<em>{{#local}}Describe or add notes to history{{/local}}</em> + + $where.find( '.history-name' ).make_text_editable({ + on_finish: function( newName ){ + $where.find( '.history-name' ).text( newName ); + panel.model.save({ name: newName }) + .fail( function(){ + $where.find( '.history-name' ).text( panel.model.previous( 'name' ) ); + }); + } + }); + + $where.find( '.history-controls .annotation' ).make_text_editable({ + use_textarea : true, + on_finish: function( newAnnotation ){ + $where.find( '.history-controls .annotation' ).text( newAnnotation ); + panel.model.save({ annotation: newAnnotation }) + .fail( function(){ + $where.find( '.history-controls .annotation' ).text( panel.model.previous( 'annotation' ) ); + }); + } + }); + }, + /** Set up/render a view for each HDA to be shown, init with model and listeners. * HDA views are cached to the map this.hdaViews (using the model.id as key). * @param {jQuery} $whereTo what dom element to prepend the HDA views to * @returns the number of visible hda views */ - renderItems : function( $whereTo ){ + renderHdas : function( $whereTo ){ this.hdaViews = {}; var historyView = this, // only render the shown hdas @@ -676,49 +752,15 @@ return visibleHdas.length; }, - /** Set up HistoryPanel js/widget behaviours - */ - //TODO: these should be either sub-MVs, or handled by events - _setUpBehaviours : function(){ - // anon users shouldn't have access to any of these - if( !this.model || !Galaxy.currUser || Galaxy.currUser.isAnonymous() ){ return; } - - // annotation slide down - var panel = this, - // need specific selector ('annotation-display' is used in HDAs, too) - $historyAnnotationArea = this.$el.find( '.history-controls .annotation-display' ); - this.$el.find( '.history-controls .icon-button.annotate' ).click( function() { - if( $historyAnnotationArea.is( ":hidden" ) ){ - $historyAnnotationArea.slideDown( panel.fxSpeed ); - } else { - $historyAnnotationArea.slideUp( panel.fxSpeed ); - } - return false; - }); - - this.$el.find( '.history-name' ).make_text_editable({ - on_finish: function( newName ){ - panel.$el.find( '.history-name' ).text( newName ); - panel.model.save({ name: newName }) - .fail( function(){ - panel.$el.find( '.history-name' ).text( panel.model.previous( 'name' ) ); - }); - } - }); - - this.$el.find( '.history-controls .annotation' ).make_text_editable({ - use_textarea : true, - on_finish: function( newAnnotation ){ - panel.$el.find( '.history-controls .annotation' ).text( newAnnotation ); - panel.model.save({ annotation: newAnnotation }) - .fail( function(){ - panel.$el.find( '.history-controls .annotation' ).text( panel.model.previous( 'annotation' ) ); - }); - } - }); + // ------------------------------------------------------------------------ panel events + /** event map */ + events : { + 'click .history-tag-button' : 'loadAndDisplayTags', +//TODO: switch to common close (X) idiom + // allow (error) messages to be clicked away + 'click .message-container' : 'clearMessages' }, - // ------------------------------------------------------------------------ panel events /** Update the history size display (curr. upper right of panel). */ updateHistoryDiskSize : function(){ diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/mvc/ui.js --- a/static/scripts/mvc/ui.js +++ b/static/scripts/mvc/ui.js @@ -5,10 +5,8 @@ /** * backbone model for icon buttons */ -var IconButton = Backbone.Model.extend( -{ - defaults: - { +var IconButton = Backbone.Model.extend({ + defaults: { title : "", icon_class : "", on_click : null, @@ -26,105 +24,85 @@ /** * backbone view for icon buttons */ -var IconButtonView = Backbone.View.extend( -{ - // initialize - initialize: function() - { +var IconButtonView = Backbone.View.extend({ + + initialize : function(){ // better rendering this way this.model.attributes.tooltip_config = { placement : 'bottom' }; - this.model.bind('change', this.render, this); + this.model.bind( 'change', this.render, this ); }, - - // render - render: function() - { + + render : function( ){ // hide tooltip - this.$el.tooltip('hide'); + this.$el.tooltip( 'hide' ); - // create element - var new_elem = this.template(this.model.attributes); - + var new_elem = this.template( this.model.toJSON() ); // configure tooltip - new_elem.tooltip(this.model.get('tooltip_config')); - - // replace - this.$el.replaceWith(new_elem); - this.setElement(new_elem); - - // return + new_elem.tooltip( this.model.get( 'tooltip_config' )); + this.$el.replaceWith( new_elem ); + this.setElement( new_elem ); return this; }, - // events - events: - { + events : { 'click' : 'click' }, - // click - click: function( event ) - { + click : function( event ){ // if on_click pass to that function - if(this.model.attributes.on_click) - { - this.model.attributes.on_click(event); + if( _.isFunction( this.model.get( 'on_click' ) ) ){ + this.model.get( 'on_click' )( event ); return false; } - - // otherwise, bubble up (to href or whatever) + // otherwise, bubble up ( to href or whatever ) return true; }, // generate html element - template: function(options) - { - // initialize + template: function( options ){ var buffer = 'title="' + options.title + '" class="icon-button'; - // is menu button - if(options.is_menu_button) + if( options.is_menu_button ){ buffer += ' menu-button'; + } - // add icon class buffer += ' ' + options.icon_class; - // add enabled/disabled class - if(!options.enabled) + if( !options.enabled ){ buffer += '_disabled'; + } // close class tag buffer += '"'; - // add id - if(options.id) + if( options.id ){ buffer += ' id="' + options.id + '"'; + } - // add href buffer += ' href="' + options.href + '"'; - // add target for href - if(options.target) + if( options.target ){ buffer += ' target="' + options.target + '"'; - + } // set visibility - if(!options.visible) + if( !options.visible ){ buffer += ' style="display: none;"'; + } // enabled/disabled - if (options.enabled) + if ( options.enabled ){ buffer = '<a ' + buffer + '/>'; - else + } else { buffer = '<span ' + buffer + '/>'; + } // return element - return $(buffer); + return $( buffer ); } -}); +} ); // define collection -var IconButtonCollection = Backbone.Collection.extend( -{ +var IconButtonCollection = Backbone.Collection.extend({ model: IconButton }); @@ -132,24 +110,18 @@ * menu with multiple icon buttons * views are not needed nor used for individual buttons */ -var IconButtonMenuView = Backbone.View.extend( -{ - // tag +var IconButtonMenuView = Backbone.View.extend({ + tagName: 'div', - // initialize - initialize: function() - { + initialize: function(){ this.render(); }, - // render - render: function() - { + render: function(){ // initialize icon buttons var self = this; - this.collection.each(function(button) - { + this.collection.each(function(button){ // create and add icon button to menu var elt = $('<a/>').attr('href', 'javascript:void(0)') @@ -160,13 +132,15 @@ .click(button.attributes.on_click); // configure tooltip - if (button.attributes.tooltip_config) + if (button.attributes.tooltip_config){ elt.tooltip(button.attributes.tooltip_config); + } // add popup menu to icon var menu_options = button.get('options'); - if (menu_options) + if (menu_options){ make_popupmenu(elt, menu_options); + } }); // return @@ -187,8 +161,7 @@ // create and initialize menu var buttons = new IconButtonCollection( - _.map(config, function(button_config) - { + _.map(config, function(button_config){ return new IconButton(_.extend(button_config, global_config)); }) ); @@ -406,33 +379,27 @@ * @returns {Object[]} the options array to initialize a PopupMenu */ //TODO: lose parent and selector, pass in array of links, use map to return options -PopupMenu.convertLinksToOptions = function( $parent, selector ) -{ - $parent = $($parent); +PopupMenu.convertLinksToOptions = function( $parent, selector ){ + $parent = $( $parent ); selector = selector || 'a'; var options = []; - $parent.find( selector ).each( function( elem, i ) - { + $parent.find( selector ).each( function( elem, i ){ var option = {}, $link = $( elem ); // convert link text to the option text (html) and the href into the option func option.html = $link.text(); - if( linkHref ) - { + if( $link.attr( 'href' ) ){ var linkHref = $link.attr( 'href' ), linkTarget = $link.attr( 'target' ), confirmText = $link.attr( 'confirm' ); - option.func = function() - { + option.func = function(){ // if there's a "confirm" attribute, throw up a confirmation dialog, and // if the user cancels - do nothing if( ( confirmText ) && ( !confirm( confirmText ) ) ){ return; } // if there's no confirm attribute, or the user accepted the confirm dialog: - var f; - switch( linkTarget ) - { + switch( linkTarget ){ // relocate the center panel case '_parent': window.parent.location = linkHref; @@ -443,15 +410,6 @@ window.top.location = linkHref; break; - // Http request target is a window named demolocal on the local box - //TODO: I still don't understand this option (where the hell does f get set? confirm?) - case 'demo': - if( f === undefined || f.closed ){ - f = window.open( linkHref, linkTarget ); - f.creator = self; - } - break; - // relocate this panel default: window.location = linkHref; @@ -505,5 +463,30 @@ $buttonElement.addClass( 'popup' ); }); return popupMenusCreated; -} +}; +var faIconButton = function( options ){ + //FFS + options = options || {}; + options.tooltipConfig = options.tooltipConfig || { placement: 'bottom' }; + + options.classes = [ 'icon-btn' ].concat( options.classes || [] ); + if( options.disabled ){ + options.classes.push( 'disabled' ); + } + + var html = [ + '<a class="', options.classes.join( ' ' ), '"', + (( options.title )? ( ' title="' + options.title + '"' ):( '' )), + (( options.target )? ( ' target="' + options.target + '"' ):( '' )), + ' href="', (( options.href )?( options.href ):( 'javascript:void(0);' )), '">', + // could go with something less specific here - like 'html' + '<span class="fa ', options.faIcon, '"></span>', + '</a>' + ].join( '' ); + var $button = $( html ).tooltip( options.tooltipConfig ); + if( _.isFunction( options.onclick ) ){ + $button.click( options.onclick ); + } + return $button; +}; diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/mvc/dataset/hda-base.js --- a/static/scripts/packed/mvc/dataset/hda-base.js +++ b/static/scripts/packed/mvc/dataset/hda-base.js @@ -1,1 +1,1 @@ -define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"dataset hda history-panel-hda",id:function(){return"hda-"+this.model.get("id")},fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(d,c){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(e){e=(e===undefined)?(true):(e);var c=this;this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();var d=$(a.templates.skeleton(this.model.toJSON()));d.find(".dataset-primary-actions").append(this._render_titleButtons());d.children(".dataset-body").replaceWith(this._render_body());this._setUpBehaviors(d);if(e){$(c).queue(function(f){this.$el.fadeOut(c.fxSpeed,f)})}$(c).queue(function(f){this.$el.empty().attr("class",c.className).addClass("state-"+c.model.get("state")).append(d.children());f()});if(e){$(c).queue(function(f){this.$el.fadeIn(c.fxSpeed,f)})}$(c).queue(function(f){this.trigger("rendered",c);if(this.model.inReadyState()){this.trigger("rendered:ready",c)}f()});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_titleButtons:function(){return[this._render_displayButton()]},_render_iconButton:function(c){c=c||{};c.classes=["icon-btn"].concat(c.classes||[]);if(c.disabled){c.classes.push("disabled")}var d=['<a class="',c.classes.join(" "),'"',((c.title)?(' title="'+c.title+'"'):("")),((c.target)?(' target="'+c.target+'"'):("")),' href="',((c.href)?(c.href):("javascript:void(0);")),'">','<span class="',c.faIcon,'"></span>',"</a>"].join("");d=$(d);if(_.isFunction(c.onClick)){d.click(c.onClick)}return d},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.enabled=false;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.enabled=false;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}this.displayButton=new IconButtonView({model:new IconButton(d)});return this.displayButton.render().$el},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var d=this.urls,e=this.model.get("meta_files");if(_.isEmpty(e)){return $(['<a href="',d.download,'" title="',_l("Download"),'" class="icon-button disk"></a>'].join(""))}var f="dataset-"+this.model.get("id")+"-popup",c=['<div popupmenu="'+f+'">','<a class="action-button" href="'+d.download+'">',_l("Download Dataset"),"</a>","<a>"+_l("Additional Files")+"</a>",_.map(e,function(g){return['<a class="action-button" href="',d.meta_download+g.file_type,'">',_l("Download")," ",g.file_type,"</a>"].join("")}).join("\n"),"</div>",'<div style="float:left;" class="menubutton split popup" id="'+f+'">','<a href="'+d.download+'" title="'+_l("Download")+'" class="icon-button disk"></a>',"</div>"].join("\n");return $(c)},_render_showParamsButton:function(){return new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})}).render().$el},_render_body:function(){var d=$('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'),c=this["_render_body_"+this.model.get("state")];if(_.isFunction(c)){d=c.call(this)}if(this.expanded){d.show()}return d},_render_stateBodyHelper:function(c,f){f=f||[];var d=this,e=$(a.templates.body(_.extend(this.model.toJSON(),{body:c})));e.find(".dataset-actions .left").append(_.map(f,function(g){return g.call(d)}));return e},_render_body_new:function(){return this._render_stateBodyHelper("<div>"+_l("This is a new dataset and not all of its data are available yet")+"</div>")},_render_body_noPermission:function(){return this._render_stateBodyHelper("<div>"+_l("You do not have permission to view this dataset")+"</div>")},_render_body_discarded:function(){return this._render_stateBodyHelper("<div>"+_l("The job creating this dataset was cancelled before completion")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_queued:function(){return this._render_stateBodyHelper("<div>"+_l("This job is waiting to run")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_upload:function(){return this._render_stateBodyHelper("<div>"+_l("This dataset is currently uploading")+"</div>")},_render_body_setting_metadata:function(){return this._render_stateBodyHelper("<div>"+_l("Metadata is being auto-detected")+"</div>")},_render_body_running:function(){return this._render_stateBodyHelper("<div>"+_l("This job is currently running")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_paused:function(){return this._render_stateBodyHelper("<div>"+_l('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume')+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_error:function(){var c=_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>";if(!this.model.get("purged")){c="<div>"+this.model.get("misc_blurb")+"</div>"+c}return this._render_stateBodyHelper(c,this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton]))},_render_body_empty:function(){return this._render_stateBodyHelper("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>",this.defaultPrimaryActionButtonRenderers)},_render_body_failed_metadata:function(){var c=$('<div class="warningmessagesmall"></div>').append($("<strong/>").text(_l("An error occurred setting the metadata for this dataset"))),d=this._render_body_ok();d.prepend(c);return d},_render_body_ok:function(){var c=this,e=$(a.templates.body(this.model.toJSON())),d=[this._render_downloadButton].concat(this.defaultPrimaryActionButtonRenderers);e.find(".dataset-actions .left").append(_.map(d,function(f){return f.call(c)}));if(this.model.isDeletedOrPurged()){return e}return e},events:{"click .dataset-title-bar":"toggleBodyVisibility"},toggleBodyVisibility:function(d,c){var e=this.$el.find(".dataset-body");c=(c===undefined)?(!e.is(":visible")):(c);if(c){this.expandBody()}else{this.collapseBody()}},expandBody:function(){var c=this;function d(){c.render(false).$el.children(".dataset-body").slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})}if(this.model.inReadyState()&&!this.model.hasDetails()){this.model.fetch({silent:true}).always(function(e){d()})}else{d()}},collapseBody:function(){var c=this;this.$el.children(".dataset-body").slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={skeleton:Handlebars.templates["template-hda-skeleton"],body:Handlebars.templates["template-hda-body"]};return{HDABaseView:a}}); \ No newline at end of file +define(["mvc/dataset/hda-model"],function(b){var a=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"dataset hda history-panel-hda",id:function(){return"hda-"+this.model.get("id")},fxSpeed:"fast",initialize:function(c){if(c.logger){this.logger=this.model.logger=c.logger}this.log(this+".initialize:",c);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.expanded=c.expanded||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(d,c){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(e){e=(e===undefined)?(true):(e);var c=this;this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();var d=$(a.templates.skeleton(this.model.toJSON()));d.find(".dataset-primary-actions").append(this._render_titleButtons());d.children(".dataset-body").replaceWith(this._render_body());this._setUpBehaviors(d);if(e){$(c).queue(function(f){this.$el.fadeOut(c.fxSpeed,f)})}$(c).queue(function(f){this.$el.empty().attr("class",c.className).addClass("state-"+c.model.get("state")).append(d.children());f()});if(e){$(c).queue(function(f){this.$el.fadeIn(c.fxSpeed,f)})}$(c).queue(function(f){this.trigger("rendered",c);if(this.model.inReadyState()){this.trigger("rendered:ready",c)}f()});return this},_setUpBehaviors:function(c){c=c||this.$el;make_popup_menus(c);c.find("[title]").tooltip({placement:"bottom"})},_render_titleButtons:function(){return[this._render_displayButton()]},_render_displayButton:function(){if((this.model.get("state")===b.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===b.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){return null}var d={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){d.disabled=true;d.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===b.HistoryDatasetAssociation.STATES.UPLOAD){d.disabled=true;d.title=_l("This dataset must finish uploading before it can be viewed")}else{d.title=_l("View data");d.href=this.urls.display;var c=this;d.on_click=function(){Galaxy.frame_manager.frame_new({title:"Data Viewer: "+c.model.get("name"),type:"url",location:"center",content:c.urls.display})}}}d.faIcon="fa-eye";return faIconButton(d)},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var d=this.urls,e=this.model.get("meta_files");if(_.isEmpty(e)){return $(['<a href="'+d.download+'" title="'+_l("Download")+'" class="icon-btn">','<span class="fa fa-floppy-o"></span>',"</a>"].join(""))}var f="dataset-"+this.model.get("id")+"-popup",c=['<div popupmenu="'+f+'">','<a href="'+d.download+'">',_l("Download Dataset"),"</a>","<a>"+_l("Additional Files")+"</a>",_.map(e,function(g){return['<a class="action-button" href="',d.meta_download+g.file_type,'">',_l("Download")," ",g.file_type,"</a>"].join("")}).join("\n"),"</div>",'<div class="icon-btn-group">','<a href="'+d.download+'" title="'+_l("Download")+'" class="icon-btn">','<span class="fa fa-floppy-o"></span>','</a><a class="icon-btn popup" id="'+f+'">','<span class="fa fa-caret-down"></span>',"</a>","</div>"].join("\n");return $(c)},_render_showParamsButton:function(){return faIconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",faIcon:"fa-info-circle"})},_render_body:function(){console.debug("model:",this.model.toJSON());var d=$('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'),c=this["_render_body_"+this.model.get("state")];if(_.isFunction(c)){d=c.call(this)}if(this.expanded){d.show()}return d},_render_stateBodyHelper:function(c,f){f=f||[];var d=this,e=$(a.templates.body(_.extend(this.model.toJSON(),{body:c})));e.find(".dataset-actions .left").append(_.map(f,function(g){return g.call(d)}));return e},_render_body_new:function(){return this._render_stateBodyHelper("<div>"+_l("This is a new dataset and not all of its data are available yet")+"</div>")},_render_body_noPermission:function(){return this._render_stateBodyHelper("<div>"+_l("You do not have permission to view this dataset")+"</div>")},_render_body_discarded:function(){return this._render_stateBodyHelper("<div>"+_l("The job creating this dataset was cancelled before completion")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_queued:function(){return this._render_stateBodyHelper("<div>"+_l("This job is waiting to run")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_upload:function(){return this._render_stateBodyHelper("<div>"+_l("This dataset is currently uploading")+"</div>")},_render_body_setting_metadata:function(){return this._render_stateBodyHelper("<div>"+_l("Metadata is being auto-detected")+"</div>")},_render_body_running:function(){return this._render_stateBodyHelper("<div>"+_l("This job is currently running")+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_paused:function(){return this._render_stateBodyHelper("<div>"+_l('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume')+"</div>",this.defaultPrimaryActionButtonRenderers)},_render_body_error:function(){var c=_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>";if(!this.model.get("purged")){c="<div>"+this.model.get("misc_blurb")+"</div>"+c}return this._render_stateBodyHelper(c,this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton]))},_render_body_empty:function(){return this._render_stateBodyHelper("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>",this.defaultPrimaryActionButtonRenderers)},_render_body_failed_metadata:function(){var c=$('<div class="warningmessagesmall"></div>').append($("<strong/>").text(_l("An error occurred setting the metadata for this dataset"))),d=this._render_body_ok();d.prepend(c);return d},_render_body_ok:function(){var c=this,e=$(a.templates.body(this.model.toJSON())),d=[this._render_downloadButton].concat(this.defaultPrimaryActionButtonRenderers);e.find(".dataset-actions .left").append(_.map(d,function(f){return f.call(c)}));if(this.model.isDeletedOrPurged()){return e}return e},events:{"click .dataset-title-bar":"toggleBodyVisibility"},toggleBodyVisibility:function(d,c){var e=this.$el.find(".dataset-body");c=(c===undefined)?(!e.is(":visible")):(c);if(c){this.expandBody()}else{this.collapseBody()}},expandBody:function(){var c=this;function d(){c.render(false).$el.children(".dataset-body").slideDown(c.fxSpeed,function(){c.expanded=true;c.trigger("body-expanded",c.model.get("id"))})}if(this.model.inReadyState()&&!this.model.hasDetails()){this.model.fetch({silent:true}).always(function(e){d()})}else{d()}},collapseBody:function(){var c=this;this.$el.children(".dataset-body").slideUp(c.fxSpeed,function(){c.expanded=false;c.trigger("body-collapsed",c.model.get("id"))})},remove:function(d){var c=this;this.$el.fadeOut(c.fxSpeed,function(){c.$el.remove();c.off();if(d){d()}})},toString:function(){var c=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+c+")"}});a.templates={skeleton:Handlebars.templates["template-hda-skeleton"],body:Handlebars.templates["template-hda-body"]};return{HDABaseView:a}}); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/mvc/dataset/hda-edit.js --- a/static/scripts/packed/mvc/dataset/hda-edit.js +++ b/static/scripts/packed/mvc/dataset/hda-edit.js @@ -1,1 +1,1 @@ -define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_render_titleButtons:function(){return a.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(g||i){h.enabled=false;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}return new IconButtonView({model:new IconButton(h)}).render().$el},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var g=this,h=g.urls["delete"],i={title:_l("Delete"),href:h,icon_class:"delete",on_click:function(){g.$el.find(".menu-button.delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){i={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}return new IconButtonView({model:new IconButton(i)}).render().$el},_render_errButton:function(){if(this.model.get("state")!==d.HistoryDatasetAssociation.STATES.ERROR){this.errButton=null;return null}return new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})}).render().$el},_render_rerunButton:function(){return new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})}).render().$el},_render_visualizationsButton:function(){var g=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(g))){this.visualizationsButton=null;return null}if(_.isObject(g[0])){return this._render_visualizationsFrameworkButton(g)}if(!this.urls.visualization){this.visualizationsButton=null;return null}var i=this.model.get("dbkey"),l=this.urls.visualization,j={},m={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(i){m.dbkey=i}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:this.urls.visualization,icon_class:"chart_curve"})});var h=this.visualizationsButton.render().$el;h.addClass("visualize-icon");function k(n){switch(n){case"trackster":return b(l,m,i);case"scatterplot":return e(l,m);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:l+"/"+n+"?"+$.param(m)})}}}if(g.length===1){h.attr("title",g[0]);h.click(k(g[0]))}else{_.each(g,function(o){var n=o.charAt(0).toUpperCase()+o.slice(1);j[_l(n)]=k(o)});make_popupmenu(h,j)}return h},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),icon_class:"chart_curve"})});var i=this.visualizationsButton.render().$el;i.addClass("visualize-icon");if(_.keys(g).length===1){i.attr("title",_.keys(g)[0]);i.attr("href",_.values(g)[0])}else{var j=[];_.each(g,function(k){j.push(k)});var h=new PopupMenu(i,j)}return i},_render_tagButton:function(){if(!this.hasUser||!this.urls.tags.get){this.tagButton=null;return null}return new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})}).render().$el},_render_annotateButton:function(){if(!this.hasUser||!this.urls.annotation.get){this.annotateButton=null;return null}return new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})}).render().$el},_render_body_failed_metadata:function(){var h=$("<a/>").attr({href:this.urls.edit,target:"galaxy_main"}).text(_l("set it manually or retry auto-detection")),g=$("<span/>").text(_l("You may be able to")+" ").append(h),i=a.HDABaseView.prototype._render_body_failed_metadata.call(this);i.find(".warningmessagesmall strong").append(g);return i},_render_body_error:function(){var g=a.HDABaseView.prototype._render_body_error.call(this);g.find(".dataset-actions .left").prepend(this._render_errButton());return g},_render_body_ok:function(){var g=a.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return g}this.makeDbkeyEditLink(g);g.find(".dataset-actions .left").append(this._render_visualizationsButton());g.find(".dataset-actions .right").append([this._render_tagButton(),this._render_annotateButton()]);return g},makeDbkeyEditLink:function(g){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){g.find(".dataset-dbkey .value").replaceWith($('<a target="galaxy_main">?</a>').attr("href",this.urls.edit))}},events:{"click .dataset-title-bar":"toggleBodyVisibility","click .dataset-undelete":function(g){this.model.undelete();return false},"click .dataset-unhide":function(g){this.model.unhide();return false},"click .dataset-purge":"confirmPurge","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},confirmPurge:function c(g){this.model.purge();return false},loadAndDisplayTags:function(i){this.log(this+".loadAndDisplayTags",i);var g=this,h=this.$el.find(".tags-display"),j=h.find(".tags");if(h.is(":hidden")){if(!jQuery.trim(j.html())){var k=$.ajax(this.urls.tags.get);k.fail(function(n,l,m){g.log("Tagging failed",n,l,m);g.trigger("error",g,n,{},_l("Tagging failed"))});k.done(function(l){j.html(l);j.find("[title]").tooltip();h.slideDown(g.fxSpeed)})}else{h.slideDown(g.fxSpeed)}}else{h.slideUp(g.fxSpeed)}return false},loadAndDisplayAnnotation:function(k){this.log(this+".loadAndDisplayAnnotation",k);var i=this,h=this.$el.find(".annotation-display"),g=h.find(".annotation"),j=this.urls.annotation.set;if(h.is(":hidden")){if(!jQuery.trim(g.html())){var l=$.ajax(this.urls.annotation.get);l.fail(function(o,m,n){i.log("Annotation failed",o,m,n);i.trigger("error",i,o,{},_l("Annotation failed"))});l.done(function(m){m=m||"<em>"+_l("Describe or add notes to dataset")+"</em>";g.html(m);h.find("[title]").tooltip();g.make_text_editable({use_textarea:true,on_finish:function(n){g.text(n);i.model.save({annotation:n},{silent:true}).fail(function(){g.text(i.model.previous("annotation"))})}});h.slideDown(i.fxSpeed)})}else{h.slideDown(i.fxSpeed)}}else{h.slideUp(i.fxSpeed)}return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});function e(g,h){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(h),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i)})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:m})}}})}});return false}}return{HDAEditView:f}}); \ No newline at end of file +define(["mvc/dataset/hda-model","mvc/dataset/hda-base"],function(d,a){var f=a.HDABaseView.extend(LoggableMixin).extend({initialize:function(g){a.HDABaseView.prototype.initialize.call(this,g);this.hasUser=g.hasUser;this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_render_titleButtons:function(){return a.HDABaseView.prototype._render_titleButtons.call(this).concat([this._render_editButton(),this._render_deleteButton()])},_render_editButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var i=this.model.get("purged"),g=this.model.get("deleted"),h={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(g||i){h.enabled=false;if(i){h.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(g){h.title=_l("Undelete dataset to edit attributes")}}}else{if(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD){h.disabled=true;h.title=_l("This dataset must finish uploading before it can be edited")}}h.faIcon="fa-pencil";return faIconButton(h)},_render_deleteButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var g=this,h=g.urls["delete"],i={title:_l("Delete"),href:h,icon_class:"delete",onclick:function(){g.$el.find(".menu-button.delete").trigger("mouseout");g.model["delete"]()}};if(this.model.get("deleted")||this.model.get("purged")){i={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}i.faIcon="fa-times";return faIconButton(i)},_render_errButton:function(){if(this.model.get("state")!==d.HistoryDatasetAssociation.STATES.ERROR){return null}return faIconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",faIcon:"fa-bug"})},_render_rerunButton:function(){return faIconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",faIcon:"fa-refresh"})},_render_visualizationsButton:function(){var g=this.model.get("visualizations");if((!this.model.hasData())||(_.isEmpty(g))){return null}if(_.isObject(g[0])){return this._render_visualizationsFrameworkButton(g)}if(!this.urls.visualization){return null}var i=this.model.get("dbkey"),l=this.urls.visualization,j={},m={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(i){m.dbkey=i}var h=faIconButton({title:_l("Visualize"),href:this.urls.visualization,faIcon:"fa-bar-chart-o"});function k(n){switch(n){case"trackster":return b(l,m,i);case"scatterplot":return e(l,m);default:return function(){Galaxy.frame_manager.frame_new({title:"Visualization",type:"url",content:l+"/"+n+"?"+$.param(m)})}}}if(g.length===1){h.attr("title",g[0]);h.click(k(g[0]))}else{_.each(g,function(o){var n=o.charAt(0).toUpperCase()+o.slice(1);j[_l(n)]=k(o)});make_popupmenu(h,j)}return h},_render_visualizationsFrameworkButton:function(g){if(!(this.model.hasData())||!(g&&!_.isEmpty(g))){return null}var i=faIconButton({title:_l("Visualize"),faIcon:"fa-bar-chart-o"});i.addClass("visualize-icon");if(_.keys(g).length===1){i.attr("title",_.keys(g)[0]);i.attr("href",_.values(g)[0])}else{var j=[];_.each(g,function(k){j.push(k)});var h=new PopupMenu(i,j)}return i},_render_tagButton:function(){if(!this.hasUser||!this.urls.tags.get){return null}return faIconButton({title:_l("Edit dataset tags"),classes:"dataset-tag-btn",faIcon:"fa-tags"})},_render_annotateButton:function(){if(!this.hasUser||!this.urls.annotation.get){return null}return faIconButton({title:_l("Edit dataset annotation"),classes:"dataset-annotate-btn",faIcon:"fa-comment"})},_render_body_failed_metadata:function(){var h=$("<a/>").attr({href:this.urls.edit,target:"galaxy_main"}).text(_l("set it manually or retry auto-detection")),g=$("<span/>").text(". "+_l("You may be able to")+" ").append(h),i=a.HDABaseView.prototype._render_body_failed_metadata.call(this);i.find(".warningmessagesmall strong").append(g);return i},_render_body_error:function(){var g=a.HDABaseView.prototype._render_body_error.call(this);g.find(".dataset-actions .left").prepend(this._render_errButton());return g},_render_body_ok:function(){var g=a.HDABaseView.prototype._render_body_ok.call(this);if(this.model.isDeletedOrPurged()){return g}this.makeDbkeyEditLink(g);g.find(".dataset-actions .left").append(this._render_visualizationsButton());g.find(".dataset-actions .right").append([this._render_tagButton(),this._render_annotateButton()]);return g},makeDbkeyEditLink:function(g){if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){g.find(".dataset-dbkey .value").replaceWith($('<a target="galaxy_main">?</a>').attr("href",this.urls.edit))}},events:{"click .dataset-title-bar":"toggleBodyVisibility","click .dataset-undelete":function(g){this.model.undelete();return false},"click .dataset-unhide":function(g){this.model.unhide();return false},"click .dataset-purge":"confirmPurge","click .dataset-tag-btn":"loadAndDisplayTags","click .dataset-annotate-btn":"loadAndDisplayAnnotation"},confirmPurge:function c(g){this.model.purge();return false},loadAndDisplayTags:function(i){this.log(this+".loadAndDisplayTags",i);var g=this,h=this.$el.find(".tags-display"),j=h.find(".tags");if(h.is(":hidden")){if(!jQuery.trim(j.html())){var k=$.ajax(this.urls.tags.get);k.fail(function(n,l,m){g.log("Tagging failed",n,l,m);g.trigger("error",g,n,{},_l("Tagging failed"))});k.done(function(l){j.html(l);j.find("[title]").tooltip();h.slideDown(g.fxSpeed)})}else{h.slideDown(g.fxSpeed)}}else{h.slideUp(g.fxSpeed)}return false},loadAndDisplayAnnotation:function(j){this.log(this+".loadAndDisplayAnnotation",j);var i=this,h=this.$el.find(".annotation-display"),g=h.find(".annotation");if(h.is(":hidden")){if(!jQuery.trim(g.html())){var k=$.ajax(this.urls.annotation.get);k.fail(function(n,l,m){i.log("Annotation failed",n,l,m);i.trigger("error",i,n,{},_l("Annotation failed"))});k.done(function(l){l=l||"<em>"+_l("Describe or add notes to dataset")+"</em>";g.html(l);h.find("[title]").tooltip();g.make_text_editable({use_textarea:true,on_finish:function(m){g.text(m);i.model.save({annotation:m},{silent:true}).fail(function(){g.text(i.model.previous("annotation"))})}});h.slideDown(i.fxSpeed)})}else{h.slideDown(i.fxSpeed)}}else{h.slideUp(i.fxSpeed)}return false},toString:function(){var g=(this.model)?(this.model+""):("(no model)");return"HDAView("+g+")"}});function e(g,h){action=function(){Galaxy.frame_manager.frame_new({title:"Scatterplot",type:"url",content:g+"/scatterplot?"+$.param(h),location:"center"});$("div.popmenu-wrapper").remove();return false};return action}function b(g,i,h){return function(){var j={};if(h){j["f-dbkey"]=h}$.ajax({url:g+"/list_tracks?"+$.param(j),dataType:"html",error:function(){alert(("Could not add this dataset to browser")+".")},success:function(k){var l=window.parent;l.Galaxy.modal.show({title:"View Data in a New or Saved Visualization",buttons:{Cancel:function(){l.Galaxy.modal.hide()},"View in saved visualization":function(){l.Galaxy.modal.show({title:"Add Data to Saved Visualization",body:k,buttons:{Cancel:function(){l.Galaxy.modal.hide()},"Add to visualization":function(){$(l.document).find("input[name=id]:checked").each(function(){l.Galaxy.modal.hide();var m=$(this).val();i.id=m;l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:g+"/trackster?"+$.param(i)})})}}})},"View in new visualization":function(){l.Galaxy.modal.hide();var m=g+"/trackster?"+$.param(i);l.Galaxy.frame_manager.frame_new({title:"Trackster",type:"url",content:m})}}})}});return false}}return{HDAEditView:f}}); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/mvc/dataset/hda-model.js --- a/static/scripts/packed/mvc/dataset/hda-model.js +++ b/static/scripts/packed/mvc/dataset/hda-model.js @@ -1,1 +1,1 @@ -define([],function(){var d=Backbone.Model.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:""},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var i=this.get("id");if(!i){return{}}var h={purge:galaxy_config.root+"datasets/"+i+"/purge_async",display:galaxy_config.root+"datasets/"+i+"/display/?preview=True",edit:galaxy_config.root+"datasets/"+i+"/edit",download:galaxy_config.root+"datasets/"+i+"/display?to_ext="+this.get("file_ext"),report_error:galaxy_config.root+"dataset/errors?id="+i,rerun:galaxy_config.root+"tool_runner/rerun?id="+i,show_params:galaxy_config.root+"datasets/"+i+"/show_params",visualization:galaxy_config.root+"visualization",annotation:{get:galaxy_config.root+"dataset/get_annotation_async?id="+i,set:galaxy_config.root+"dataset/annotate_async?id="+i},tags:{get:galaxy_config.root+"tag/get_tagging_elt_async?item_id="+i+"&item_class=HistoryDatasetAssociation",set:galaxy_config.root+"tag/retag?item_id="+i+"&item_class=HistoryDatasetAssociation"},meta_download:galaxy_config.root+"dataset/get_metadata_file?hda_id="+i+"&metadata_name="};return h},initialize:function(h){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",d.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(i,h){this.log(this+" has changed state:",i,h);if(this.inReadyState()){this.trigger("state:ready",i,h,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(i,j){var h=true;if((!i)&&(this.get("deleted")||this.get("purged"))){h=false}if((!j)&&(!this.get("visible"))){h=false}return h},hidden:function(){return !this.get("visible")},inReadyState:function(){var h=_.contains(d.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||h)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function c(h){return this.save({deleted:true},h)},undelete:function a(h){return this.save({deleted:false},h)},hide:function b(h){return this.save({visible:false},h)},unhide:function g(h){return this.save({visible:true},h)},purge:function f(h){h=h||{};h.url=galaxy_config.root+"datasets/"+this.get("id")+"/purge_async";var i=this,j=jQuery.ajax(h);j.done(function(m,k,l){i.set("purged",true)});j.fail(function(o,k,n){var l=_l("Unable to purge this dataset");var m=("Removal of datasets by users is not allowed in this Galaxy instance");if(o.responseJSON&&o.responseJSON.error){l=o.responseJSON.error}else{if(o.responseText.indexOf(m)!==-1){l=m}}o.responseText=l;i.trigger("error",i,o,h,_l(l),{error:l})})},searchKeys:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],search:function(h){var i=this;h=h.toLowerCase();return _.filter(this.searchKeys,function(k){var j=i.get(k);return(_.isString(j)&&j.toLowerCase().indexOf(h)!==-1)})},matches:function(h){return !!this.search(h).length},toString:function(){var h=this.get("id")||"";if(this.get("name")){h=this.get("hid")+' :"'+this.get("name")+'",'+h}return"HDA("+h+")"}});d.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};d.READY_STATES=[d.STATES.NEW,d.STATES.OK,d.STATES.EMPTY,d.STATES.PAUSED,d.STATES.FAILED_METADATA,d.STATES.NOT_VIEWABLE,d.STATES.DISCARDED,d.STATES.ERROR];d.NOT_READY_STATES=[d.STATES.UPLOAD,d.STATES.QUEUED,d.STATES.RUNNING,d.STATES.SETTING_METADATA];var e=Backbone.Collection.extend(LoggableMixin).extend({model:d,urlRoot:galaxy_config.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(i,h){h=h||{};this.historyId=h.historyId},ids:function(){return this.map(function(h){return h.id})},notReady:function(){return this.filter(function(h){return !h.inReadyState()})},running:function(){var h=[];this.each(function(i){if(!i.inReadyState()){h.push(i.get("id"))}});return h},getByHid:function(h){return _.first(this.filter(function(i){return i.get("hid")===h}))},getVisible:function(h,i){return this.filter(function(j){return j.isVisible(h,i)})},fetchAllDetails:function(){return this.fetch({data:{details:"all"}})},matches:function(h){return this.filter(function(i){return i.matches(h)})},set:function(j,h){var i=this;j=_.map(j,function(l){var m=i.get(l.id);if(!m){return l}var k=m.toJSON();_.extend(k,l);return k});Backbone.Collection.prototype.set.call(this,j,h)},toString:function(){return("HDACollection()")}});return{HistoryDatasetAssociation:d,HDACollection:e}}); \ No newline at end of file +define([],function(){var d=Backbone.Model.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"new",deleted:false,visible:true,accessible:true,purged:false,data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:""},urlRoot:"api/histories/",url:function(){return this.urlRoot+this.get("history_id")+"/contents/"+this.get("id")},urls:function(){var i=this.get("id");if(!i){return{}}var h={purge:galaxy_config.root+"datasets/"+i+"/purge_async",display:galaxy_config.root+"datasets/"+i+"/display/?preview=True",edit:galaxy_config.root+"datasets/"+i+"/edit",download:galaxy_config.root+"datasets/"+i+"/display?to_ext="+this.get("file_ext"),report_error:galaxy_config.root+"dataset/errors?id="+i,rerun:galaxy_config.root+"tool_runner/rerun?id="+i,show_params:galaxy_config.root+"datasets/"+i+"/show_params",visualization:galaxy_config.root+"visualization",annotation:{get:galaxy_config.root+"dataset/get_annotation_async?id="+i,set:galaxy_config.root+"dataset/annotate_async?id="+i},tags:{get:galaxy_config.root+"tag/get_tagging_elt_async?item_id="+i+"&item_class=HistoryDatasetAssociation",set:galaxy_config.root+"tag/retag?item_id="+i+"&item_class=HistoryDatasetAssociation"},meta_download:galaxy_config.root+"dataset/get_metadata_file?hda_id="+i+"&metadata_name="};return h},initialize:function(h){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",d.STATES.NOT_VIEWABLE)}this._setUpListeners()},_setUpListeners:function(){this.on("change:state",function(i,h){this.log(this+" has changed state:",i,h);if(this.inReadyState()){this.trigger("state:ready",i,h,this.previous("state"))}})},toJSON:function(){var h=Backbone.Model.prototype.toJSON.call(this);h.misc_info=jQuery.trim(h.misc_info);return h},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(i,j){var h=true;if((!i)&&(this.get("deleted")||this.get("purged"))){h=false}if((!j)&&(!this.get("visible"))){h=false}return h},hidden:function(){return !this.get("visible")},inReadyState:function(){var h=_.contains(d.READY_STATES,this.get("state"));return(this.isDeletedOrPurged()||h)},hasDetails:function(){return _.has(this.attributes,"genome_build")},hasData:function(){return(this.get("file_size")>0)},"delete":function c(h){return this.save({deleted:true},h)},undelete:function a(h){return this.save({deleted:false},h)},hide:function b(h){return this.save({visible:false},h)},unhide:function g(h){return this.save({visible:true},h)},purge:function f(h){h=h||{};h.url=galaxy_config.root+"datasets/"+this.get("id")+"/purge_async";var i=this,j=jQuery.ajax(h);j.done(function(m,k,l){i.set("purged",true)});j.fail(function(o,k,n){var l=_l("Unable to purge this dataset");var m=("Removal of datasets by users is not allowed in this Galaxy instance");if(o.responseJSON&&o.responseJSON.error){l=o.responseJSON.error}else{if(o.responseText.indexOf(m)!==-1){l=m}}o.responseText=l;i.trigger("error",i,o,h,_l(l),{error:l})})},searchKeys:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],search:function(h){var i=this;h=h.toLowerCase();return _.filter(this.searchKeys,function(k){var j=i.get(k);return(_.isString(j)&&j.toLowerCase().indexOf(h)!==-1)})},matches:function(h){return !!this.search(h).length},toString:function(){var h=this.get("id")||"";if(this.get("name")){h=this.get("hid")+' :"'+this.get("name")+'",'+h}return"HDA("+h+")"}});d.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};d.READY_STATES=[d.STATES.NEW,d.STATES.OK,d.STATES.EMPTY,d.STATES.PAUSED,d.STATES.FAILED_METADATA,d.STATES.NOT_VIEWABLE,d.STATES.DISCARDED,d.STATES.ERROR];d.NOT_READY_STATES=[d.STATES.UPLOAD,d.STATES.QUEUED,d.STATES.RUNNING,d.STATES.SETTING_METADATA];var e=Backbone.Collection.extend(LoggableMixin).extend({model:d,urlRoot:galaxy_config.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(i,h){h=h||{};this.historyId=h.historyId},ids:function(){return this.map(function(h){return h.id})},notReady:function(){return this.filter(function(h){return !h.inReadyState()})},running:function(){var h=[];this.each(function(i){if(!i.inReadyState()){h.push(i.get("id"))}});return h},getByHid:function(h){return _.first(this.filter(function(i){return i.get("hid")===h}))},getVisible:function(h,i){return this.filter(function(j){return j.isVisible(h,i)})},fetchAllDetails:function(){return this.fetch({data:{details:"all"}})},matches:function(h){return this.filter(function(i){return i.matches(h)})},set:function(j,h){var i=this;j=_.map(j,function(l){var m=i.get(l.id);if(!m){return l}var k=m.toJSON();_.extend(k,l);return k});Backbone.Collection.prototype.set.call(this,j,h)},toString:function(){return("HDACollection()")}});return{HistoryDatasetAssociation:d,HDACollection:e}}); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/mvc/history/history-panel.js --- a/static/scripts/packed/mvc/history/history-panel.js +++ b/static/scripts/packed/mvc/history/history-panel.js @@ -1,1 +1,1 @@ -define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:400,events:{"click .icon-button.tags":"loadAndDisplayTags","click .message-container":"clearMessages"},datasetsSelector:".datasets-list",emptyMsgSelector:".empty-history-message",msgsSelector:".message-container",initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator("loading history...")});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===0&&j.readyState===0){}else{if(j&&j.status===502){}else{if(!this.$el.find(this.msgsSelector).is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("history:")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(this.hdaViews[f.id])}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find(f.emptyMsgSelector);if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find(f.datasetsSelector);f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(this.hdaViews[e.id])}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(this.hdaViews[e.id])}},removeHdaView:function(f){if(!f){return}var e=this;f.$el.fadeOut(e.fxSpeed,function(){f.off();f.remove();delete e.hdaViews[f.model.id];if(_.isEmpty(e.hdaViews)){e.$el.find(e.emptyMsgSelector).fadeIn(e.fxSpeed,function(){e.trigger("empty-history",e)})}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){e._setUpBehaviours();if(g){g.call(this)}e.trigger("rendered",this)}]);return this},renderModel:function(){var e=$("<div/>");var f=(!Galaxy.currUser.isAnonymous())?(c.templates.historyPanel):(c.templates.anonHistoryPanel);e.append(f(this.model.toJSON()));e.find("[title]").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(e.find(this.datasetsSelector))){e.find(this.emptyMsgSelector).show()}return e},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").addClass("message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderItems:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(h){f.prepend(e.createHdaView(h).$el)});return g.length},_setUpBehaviours:function(){if(!this.model||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){return}var e=this,f=this.$el.find(".history-controls .annotation-display");this.$el.find(".history-controls .icon-button.annotate").click(function(){if(f.is(":hidden")){f.slideDown(e.fxSpeed)}else{f.slideUp(e.fxSpeed)}return false});this.$el.find(".history-name").make_text_editable({on_finish:function(g){e.$el.find(".history-name").text(g);e.model.save({name:g}).fail(function(){e.$el.find(".history-name").text(e.model.previous("name"))})}});this.$el.find(".history-controls .annotation").make_text_editable({use_textarea:true,on_finish:function(g){e.$el.find(".history-controls .annotation").text(g);e.model.save({annotation:g}).fail(function(){e.$el.find(".history-controls .annotation").text(e.model.previous("annotation"))})}})},updateHistoryDiskSize:function(){this.$el.find(".history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},loadAndDisplayTags:function(g){var e=this,f=this.$el.find(".history-controls .tags-display"),h=f.find(".tags");if(f.is(":hidden")){if(!jQuery.trim(h.html())){var i=jQuery.ajax(e.model.tagUrl());i.fail(function(l,j,k){e.log("Error loading tag area html",l,k,j);e.trigger("error",e,l,null,_l("Error loading tags"))});i.done(function(j){h.html(j);h.find("[title]").tooltip();f.slideDown(e.fxSpeed)})}else{f.slideDown(e.fxSpeed)}}else{f.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(f,e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find(this.msgsSelector),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find(this.msgsSelector);e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find(".quota-message");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find(".quota-message");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"],anonHistoryPanel:Handlebars.templates["template-history-historyPanel-anon"]};return{HistoryPanel:c}}); \ No newline at end of file +define(["mvc/history/history-model","mvc/dataset/hda-base","mvc/dataset/hda-edit"],function(d,b,a){var c=Backbone.View.extend(LoggableMixin).extend({HDAView:a.HDAEditView,tagName:"div",className:"history-panel",fxSpeed:"fast",datasetsSelector:".datasets-list",emptyMsgSelector:".empty-history-message",msgsSelector:".message-container",initialize:function(e){e=e||{};if(e.logger){this.logger=e.logger}this.log(this+".initialize:",e);this._setUpListeners();this.hdaViews={};this.indicator=new LoadingIndicator(this.$el);if(this.model){this._setUpWebStorage(e.initiallyExpanded,e.show_deleted,e.show_hidden);this._setUpModelEventHandlers()}if(e.onready){e.onready.call(this)}},_setUpListeners:function(){this.on("error",function(f,i,e,h,g){this.errorHandler(f,i,e,h,g)});this.on("loading-history",function(){this.showLoadingIndicator("loading history...")});this.on("loading-done",function(){this.hideLoadingIndicator()});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});this.on("switched-history current-history new-history",function(){if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});if(this.logger){this.on("all",function(e){this.log(this+"",arguments)},this)}},errorHandler:function(g,j,f,i,h){var e=this._parseErrorMessage(g,j,f,i,h);if(j&&j.status===0&&j.readyState===0){}else{if(j&&j.status===502){}else{if(!this.$el.find(this.msgsSelector).is(":visible")){this.once("rendered",function(){this.displayMessage("error",e.message,e.details)})}else{this.displayMessage("error",e.message,e.details)}}}},_parseErrorMessage:function(h,l,g,k,j){var f=Galaxy.currUser,e={message:this._bePolite(k),details:{user:(f instanceof User)?(f.toJSON()):(f+""),source:(h instanceof Backbone.Model)?(h.toJSON()):(h+""),xhr:l,options:(l)?(_.omit(g,"xhr")):(g)}};_.extend(e.details,j||{});if(l&&_.isFunction(l.getAllResponseHeaders)){var i=l.getAllResponseHeaders();i=_.compact(i.split("\n"));i=_.map(i,function(m){return m.split(": ")});e.details.xhr.responseHeaders=_.object(i)}return e},_bePolite:function(e){e=e||_l("An error occurred while getting updates from the server");return e+". "+_l("Please contact a Galaxy administrator if the problem persists.")},loadCurrentHistory:function(f){var e=this;return this.loadHistoryWithHDADetails("current",f).then(function(h,g){e.trigger("current-history",e)})},switchToHistory:function(h,g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories/"+h+"/set_as_current")};return this.loadHistoryWithHDADetails(h,g,f).then(function(j,i){e.trigger("switched-history",e)})},createNewHistory:function(g){var e=this,f=function(){return jQuery.post(galaxy_config.root+"api/histories",{current:true})};return this.loadHistory(undefined,g,f).then(function(i,h){e.trigger("new-history",e)})},loadHistoryWithHDADetails:function(h,g,f,j){var e=this,i=function(k){return e.getExpandedHdaIds(k.id)};return this.loadHistory(h,g,f,j,i)},loadHistory:function(h,g,f,k,i){this.trigger("loading-history",this);g=g||{};var e=this;var j=d.History.getHistoryData(h,{historyFn:f,hdaFn:k,hdaDetailIds:g.initiallyExpanded||i});return this._loadHistoryFromXHR(j,g).fail(function(n,l,m){e.trigger("error",e,n,g,_l("An error was encountered while "+l),{historyId:h,history:m||{}})}).always(function(){e.trigger("loading-done",e)})},_loadHistoryFromXHR:function(g,f){var e=this;g.then(function(h,i){e.setModel(h,i,f)});g.fail(function(i,h){e.render()});return g},setModel:function(g,e,f){f=f||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){g.user=Galaxy.currUser.toJSON()}this.model=new d.History(g,e,f);this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers();this.trigger("new-model",this);this.render();return this},refreshHdas:function(f,e){if(this.model){return this.model.refresh(f,e)}return $.when()},_setUpWebStorage:function(f,e,g){this.storage=new PersistentStorage(this._getStorageKey(this.model.get("id")),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(f){this.storage.set("exandedHdas",f)}if((e===true)||(e===false)){this.storage.set("show_deleted",e)}if((g===true)||(g===false)){this.storage.set("show_hidden",g)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},_getStorageKey:function(e){if(!e){throw new Error("_getStorageKey needs valid id: "+e)}return("history:"+e)},clearWebStorage:function(){for(var e in sessionStorage){if(e.indexOf("history:")===0){sessionStorage.removeItem(e)}}},getStoredOptions:function(f){if(!f||f==="current"){return(this.storage)?(this.storage.get()):({})}var e=sessionStorage.getItem(this._getStorageKey(f));return(e===null)?({}):(JSON.parse(e))},getExpandedHdaIds:function(e){var f=this.getStoredOptions(e).expandedHdas;return((_.isEmpty(f))?([]):(_.keys(f)))},_setUpModelEventHandlers:function(){this.model.on("error error:hdas",function(f,h,e,g){this.errorHandler(f,h,e,g)},this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("add",this.addHdaView,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this);this.model.hdas.on("state:ready",function(f,g,e){if((!f.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(this.hdaViews[f.id])}},this)},addHdaView:function(h){this.log("add."+this,h);var f=this;if(!h.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function g(j){var i=f.$el.find(f.emptyMsgSelector);if(i.is(":visible")){i.fadeOut(f.fxSpeed,j)}else{j()}},function e(j){f.scrollToTop();var i=f.$el.find(f.datasetsSelector);f.createHdaView(h).$el.hide().prependTo(i).slideDown(f.fxSpeed)}])},createHdaView:function(g){var f=g.get("id"),e=this.storage.get("expandedHdas").get(f),h=new this.HDAView({model:g,expanded:e,hasUser:this.model.hasUser(),logger:this.logger});this._setUpHdaListeners(h);this.hdaViews[f]=h;return h.render()},_setUpHdaListeners:function(f){var e=this;f.on("body-expanded",function(g){e.storage.get("expandedHdas").set(g,true)});f.on("body-collapsed",function(g){e.storage.get("expandedHdas").deleteKey(g)});f.on("error",function(h,j,g,i){e.errorHandler(h,j,g,i)})},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(this.hdaViews[e.id])}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(this.hdaViews[e.id])}},removeHdaView:function(f){if(!f){return}var e=this;f.$el.fadeOut(e.fxSpeed,function(){f.off();f.remove();delete e.hdaViews[f.model.id];if(_.isEmpty(e.hdaViews)){e.$el.find(e.emptyMsgSelector).fadeIn(e.fxSpeed,function(){e.trigger("empty-history",e)})}})},render:function(g){var e=this,f;if(this.model){f=this.renderModel()}else{f=this.renderWithoutModel()}$(e).queue("fx",[function(h){if(e.$el.is(":visible")){e.$el.fadeOut(e.fxSpeed,h)}else{h()}},function(h){e.$el.empty();if(f){e.$el.append(f.children())}e.$el.fadeIn(e.fxSpeed,h)},function(h){if(g){g.call(this)}e.trigger("rendered",this)}]);return this},renderWithoutModel:function(){var e=$("<div/>"),f=$("<div/>").addClass("message-container").css({"margin-left":"4px","margin-right":"4px"});return e.append(f)},renderModel:function(){var e=$("<div/>");if(Galaxy.currUser.isAnonymous()){e.append(c.templates.anonHistoryPanel(this.model.toJSON()))}else{e.append(c.templates.historyPanel(this.model.toJSON()));e.find(".history-secondary-actions").append([this._render_tagButton(),this._render_annotateButton()])}this._setUpBehaviours(e);if(!this.model.hdas.length||!this.renderHdas(e.find(this.datasetsSelector))){e.find(this.emptyMsgSelector).show()}return e},_render_tagButton:function(){return faIconButton({title:_l("Edit history tags"),classes:"history-tag-button",faIcon:"fa-tags"})},_render_annotateButton:function(){return faIconButton({title:_l("Edit history tags"),classes:"history-annotate-button",faIcon:"fa-comment"})},_setUpBehaviours:function(e){e=e||this.$el;e.find("[title]").tooltip({placement:"bottom"});if(!this.model||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){return}var f=this,g=e.find(".history-controls .annotation-display");e.find(".history-controls .history-annotate-button").click(function(){if(g.is(":hidden")){var h=f.$el.find(".history-controls .annotation");h.text(jQuery.trim(h.text()));g.slideDown(f.fxSpeed)}else{g.slideUp(f.fxSpeed)}return false});e.find(".history-name").make_text_editable({on_finish:function(h){e.find(".history-name").text(h);f.model.save({name:h}).fail(function(){e.find(".history-name").text(f.model.previous("name"))})}});e.find(".history-controls .annotation").make_text_editable({use_textarea:true,on_finish:function(h){e.find(".history-controls .annotation").text(h);f.model.save({annotation:h}).fail(function(){e.find(".history-controls .annotation").text(f.model.previous("annotation"))})}})},renderHdas:function(f){this.hdaViews={};var e=this,g=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(g,function(h){f.prepend(e.createHdaView(h).$el)});return g.length},events:{"click .history-tag-button":"loadAndDisplayTags","click .message-container":"clearMessages"},updateHistoryDiskSize:function(){this.$el.find(".history-size").text(this.model.get("nice_size"))},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(e){e.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},loadAndDisplayTags:function(g){var e=this,f=this.$el.find(".history-controls .tags-display"),h=f.find(".tags");if(f.is(":hidden")){if(!jQuery.trim(h.html())){var i=jQuery.ajax(e.model.tagUrl());i.fail(function(l,j,k){e.log("Error loading tag area html",l,k,j);e.trigger("error",e,l,null,_l("Error loading tags"))});i.done(function(j){h.html(j);h.find("[title]").tooltip();f.slideDown(e.fxSpeed)})}else{f.slideDown(e.fxSpeed)}}else{f.slideUp(e.fxSpeed)}return false},showLoadingIndicator:function(f,e,g){e=(e!==undefined)?(e):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,g)}else{this.$el.fadeOut(e);this.indicator.show(f,e,g)}},hideLoadingIndicator:function(e,f){e=(e!==undefined)?(e):(this.fxSpeed);if(this.indicator){this.indicator.hide(e,f)}},displayMessage:function(j,k,i){var g=this;this.scrollToTop();var h=this.$el.find(this.msgsSelector),e=$("<div/>").addClass(j+"message").html(k);if(!_.isEmpty(i)){var f=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(g.messageToModalOptions(j,k,i));return false});e.append(" ",f)}return h.html(e)},messageToModalOptions:function(i,k,h){var e=this,j=$("<div/>"),g={title:"Details"};function f(l){l=_.omit(l,_.functions(l));return["<table>",_.map(l,function(n,m){n=(_.isObject(n))?(f(n)):(n);return'<tr><td style="vertical-align: top; color: grey">'+m+'</td><td style="padding-left: 8px">'+n+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(h)){g.body=j.append(f(h))}else{g.body=j.html(h)}g.buttons={Ok:function(){Galaxy.modal.hide();e.clearMessages()}};return g},clearMessages:function(){var e=this.$el.find(this.msgsSelector);e.empty()},scrollPosition:function(){return this.$el.parent().scrollTop()},scrollTo:function(e){this.$el.parent().scrollTop(e)},scrollToTop:function(){this.$el.parent().scrollTop(0);return this},scrollIntoView:function(f,g){if(!g){this.$el.parent().parent().scrollTop(f);return this}var e=window,h=this.$el.parent().parent(),j=$(e).innerHeight(),i=(j/2)-(g/2);$(h).scrollTop(f-i);return this},scrollToId:function(f){if((!f)||(!this.hdaViews[f])){return this}var e=this.hdaViews[f].$el;this.scrollIntoView(e.offset().top,e.outerHeight());return this},scrollToHid:function(e){var f=this.model.hdas.getByHid(e);if(!f){return this}return this.scrollToId(f.id)},connectToQuotaMeter:function(e){if(!e){return this}this.listenTo(e,"quota:over",this.showQuotaMessage);this.listenTo(e,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(e&&e.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var e=this.$el.find(".quota-message");if(e.is(":hidden")){e.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var e=this.$el.find(".quota-message");if(!e.is(":hidden")){e.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(e){if(!e){return this}this.on("new-storage",function(g,f){if(e&&g){e.findItemByHtml(_l("Include Deleted Datasets")).checked=g.get("show_deleted");e.findItemByHtml(_l("Include Hidden Datasets")).checked=g.get("show_hidden")}});return this},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});c.templates={historyPanel:Handlebars.templates["template-history-historyPanel"],anonHistoryPanel:Handlebars.templates["template-history-historyPanel-anon"]};return{HistoryPanel:c}}); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/mvc/ui.js --- a/static/scripts/packed/mvc/ui.js +++ b/static/scripts/packed/mvc/ui.js @@ -1,1 +1,1 @@ -var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.attributes);a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(this.model.attributes.on_click){this.model.attributes.on_click(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b||$("<div/>");this.options=a||[];var c=this;this.$button.click(function(d){c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body");this.$el.css(this._getShownPosition(a));this._setUpCloseBehavior();this.$el.show()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+e+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var b=this;var a=function(c){c.one("click.close_popup",function(){b.remove()})};a($(window.document));a($(window.top.document));_.each(window.top.frames,function(c){a($(c.document))})},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(j){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}var i;switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;case"demo":if(i===undefined||i.closed){i=window.open(j,k);i.creator=self}break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a}; \ No newline at end of file +var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b||$("<div/>");this.options=a||[];var c=this;this.$button.click(function(d){c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body");this.$el.css(this._getShownPosition(a));this._setUpCloseBehavior();this.$el.show()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+e+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var b=this;var a=function(c){c.one("click.close_popup",function(){b.remove()})};a($(window.document));a($(window.top.document));_.each(window.top.frames,function(c){a($(c.document))})},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((a.target)?(' target="'+a.target+'"'):("")),' href="',((a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c}; \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/templates/compiled/history-templates.js --- a/static/scripts/packed/templates/compiled/history-templates.js +++ b/static/scripts/packed/templates/compiled/history-templates.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(j,v,t,o,C){this.compilerInfo=[4,">= 1.0.0"];t=this.merge(t,j.helpers);C=C||{};var u="",l,e="function",d=this.escapeExpression,s=this,c=t.blockHelperMissing;function r(G,F){var D="",E;D+="\n ";if(E=t.body){E=E.call(G,{hash:{},data:F})}else{E=G.body;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+='\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return D}function q(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';E=t["if"].call(G,G.misc_blurb,{hash:{},inverse:s.noop,fn:s.program(4,p,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.data_type,{hash:{},inverse:s.noop,fn:s.program(6,n,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.metadata_dbkey,{hash:{},inverse:s.noop,fn:s.program(9,i,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.misc_info,{hash:{},inverse:s.noop,fn:s.program(12,A,F),data:F});if(E||E===0){D+=E}D+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';E=t.unless.call(G,G.deleted,{hash:{},inverse:s.noop,fn:s.program(14,z,F),data:F});if(E||E===0){D+=E}D+="\n\n ";return D}function p(G,F){var D="",E;D+='\n <div class="dataset-blurb">\n <span class="value">';if(E=t.misc_blurb){E=E.call(G,{hash:{},data:F})}else{E=G.misc_blurb;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function n(H,G){var D="",F,E;D+='\n <div class="dataset-datatype">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(7,m,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">';if(F=t.data_type){F=F.call(H,{hash:{},data:G})}else{F=H.data_type;F=typeof F===e?F.apply(H):F}D+=d(F)+"</span>\n </div>\n ";return D}function m(E,D){return"format"}function i(H,G){var D="",F,E;D+='\n <div class="dataset-dbkey">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(10,B,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">\n ';if(F=t.metadata_dbkey){F=F.call(H,{hash:{},data:G})}else{F=H.metadata_dbkey;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </span>\n </div>\n ";return D}function B(E,D){return"database"}function A(G,F){var D="",E;D+='\n <div class="dataset-info">\n <span class="value">';if(E=t.misc_info){E=E.call(G,{hash:{},data:F})}else{E=G.misc_info;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function z(H,G){var D="",F,E;D+='\n \n <div class="tags-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(15,y,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(17,x,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div id="dataset-';if(F=t.id){F=F.call(H,{hash:{},data:G})}else{F=H.id;F=typeof F===e?F.apply(H):F}D+=d(F)+'-annotation" class="annotation editable-text"\n title="';E={hash:{},inverse:s.noop,fn:s.program(19,w,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='"></div>\n </div>\n\n <div class="dataset-display-applications">\n ';F=t.each.call(H,H.display_apps,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+="\n\n ";F=t.each.call(H,H.display_types,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+='\n </div>\n\n <div class="dataset-peek">\n ';F=t["if"].call(H,H.peek,{hash:{},inverse:s.noop,fn:s.program(25,f,G),data:G});if(F||F===0){D+=F}D+="\n </div>\n\n ";return D}function y(E,D){return"Tags"}function x(E,D){return"Annotation"}function w(E,D){return"Edit dataset annotation"}function k(G,F){var D="",E;D+='\n <div class="display-application">\n <span class="display-application-location">';if(E=t.label){E=E.call(G,{hash:{},data:F})}else{E=G.label;E=typeof E===e?E.apply(G):E}D+=d(E)+'</span>\n <span class="display-application-links">\n ';E=t.each.call(G,G.links,{hash:{},inverse:s.noop,fn:s.program(22,h,F),data:F});if(E||E===0){D+=E}D+="\n </span>\n </div>\n ";return D}function h(H,G){var D="",F,E;D+='\n <a target="';if(F=t.target){F=F.call(H,{hash:{},data:G})}else{F=H.target;F=typeof F===e?F.apply(H):F}D+=d(F)+'" href="';if(F=t.href){F=F.call(H,{hash:{},data:G})}else{F=H.href;F=typeof F===e?F.apply(H):F}D+=d(F)+'">';E={hash:{},inverse:s.noop,fn:s.program(23,g,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</a>\n ";return D}function g(F,E){var D;if(D=t.text){D=D.call(F,{hash:{},data:E})}else{D=F.text;D=typeof D===e?D.apply(F):D}return d(D)}function f(G,F){var D="",E;D+='\n <pre class="peek">';if(E=t.peek){E=E.call(G,{hash:{},data:F})}else{E=G.peek;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+="</pre>\n ";return D}u+='<div class="dataset-body">\n ';l=t["if"].call(v,v.body,{hash:{},inverse:s.program(3,q,C),fn:s.program(1,r,C),data:C});if(l||l===0){u+=l}u+="\n</div>";return u})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n \n Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it\n or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk\n </strong></div>\n ';return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it\n </strong></div>\n ';return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-primary-actions"></div>\n\n <div class="dataset-title-bar">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n <div class="clear"></div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel-anon"]=b(function(g,r,p,k,u){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);u=u||{};var q="",i,f,o=this,e="function",c=p.blockHelperMissing,d=this.escapeExpression;function n(z,y){var v="",x,w;v+='\n <div class="history-name" title="';w={hash:{},inverse:o.noop,fn:o.program(2,m,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+='">\n ';if(x=p.name){x=x.call(z,{hash:{},data:y})}else{x=z.name;x=typeof x===e?x.apply(z):x}v+=d(x)+"\n </div>\n ";return v}function m(w,v){return"You must be logged in to edit your history name"}function l(y,x){var v="",w;v+='\n <div class="history-size">';if(w=p.nice_size){w=w.call(y,{hash:{},data:x})}else{w=y.nice_size;w=typeof w===e?w.apply(y):w}v+=d(w)+"</div>\n ";return v}function j(y,x){var v="",w;v+='\n \n <div class="';if(w=p.status){w=w.call(y,{hash:{},data:x})}else{w=y.status;w=typeof w===e?w.apply(y):w}v+=d(w)+'message">';if(w=p.message){w=w.call(y,{hash:{},data:x})}else{w=y.message;w=typeof w===e?w.apply(y):w}v+=d(w)+"</div>\n ";return v}function h(w,v){return"You are over your disk quota"}function t(w,v){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function s(w,v){return"Your history is empty. Click 'Get Data' on the left pane to start"}q+='<div class="history-controls">\n\n <div class="history-title">\n \n ';i=p["if"].call(r,r.name,{hash:{},inverse:o.noop,fn:o.program(1,n,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=p["if"].call(r,r.nice_size,{hash:{},inverse:o.noop,fn:o.program(4,l,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="message-container">\n ';i=p["if"].call(r,r.message,{hash:{},inverse:o.noop,fn:o.program(6,j,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:o.noop,fn:o.program(8,h,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+=".\n ";f={hash:{},inverse:o.noop,fn:o.program(10,t,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='.\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:o.noop,fn:o.program(12,s,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+="\n </div>";return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(k,x,v,p,E){this.compilerInfo=[4,">= 1.0.0"];v=this.merge(v,k.helpers);E=E||{};var w="",n,h,t=this,e="function",c=v.blockHelperMissing,d=this.escapeExpression;function s(J,I){var F="",H,G;F+='\n <div class="history-name editable-text" title="';G={hash:{},inverse:t.noop,fn:t.program(2,r,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+='">\n ';if(H=v.name){H=H.call(J,{hash:{},data:I})}else{H=J.name;H=typeof H===e?H.apply(J):H}F+=d(H)+"\n </div>\n ";return F}function r(G,F){return"Click to rename history"}function q(I,H){var F="",G;F+='\n <div class="history-size">';if(G=v.nice_size){G=G.call(I,{hash:{},data:H})}else{G=I.nice_size;G=typeof G===e?G.apply(I):G}F+=d(G)+"</div>\n ";return F}function o(G,F){return"Edit history tags"}function m(G,F){return"Edit history annotation"}function D(J,I){var F="",H,G;F+='\n <div class="warningmessagesmall"><strong>\n ';G={hash:{},inverse:t.noop,fn:t.program(11,C,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+="\n </strong></div>\n ";return F}function C(G,F){return"You are currently viewing a deleted history!"}function B(I,H){var F="",G;F+='\n \n <div class="';if(G=v.status){G=G.call(I,{hash:{},data:H})}else{G=I.status;G=typeof G===e?G.apply(I):G}F+=d(G)+'message">';if(G=v.message){G=G.call(I,{hash:{},data:H})}else{G=I.message;G=typeof G===e?G.apply(I):G}F+=d(G)+"</div>\n ";return F}function A(G,F){return"You are over your disk quota"}function z(G,F){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function y(G,F){return"Tags"}function l(G,F){return"Annotation"}function j(G,F){return"Click to edit annotation"}function i(I,H){var F="",G;F+="\n ";if(G=v.annotation){G=G.call(I,{hash:{},data:H})}else{G=I.annotation;G=typeof G===e?G.apply(I):G}F+=d(G)+"\n ";return F}function g(J,I){var F="",H,G;F+="\n <em>";G={hash:{},inverse:t.noop,fn:t.program(28,f,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+="</em>\n ";return F}function f(G,F){return"Describe or add notes to history"}function u(G,F){return"Your history is empty. Click 'Get Data' on the left pane to start"}w+='<div class="history-controls">\n\n <div class="history-title">\n ';n=v["if"].call(x,x.name,{hash:{},inverse:t.noop,fn:t.program(1,s,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n\n <div class="history-subtitle clear">\n ';n=v["if"].call(x,x.nice_size,{hash:{},inverse:t.noop,fn:t.program(4,q,E),data:E});if(n||n===0){w+=n}w+='\n\n <div class="history-secondary-actions">\n <a title="';h={hash:{},inverse:t.noop,fn:t.program(6,o,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='"\n class="icon-button tags" href="javascript:void(0)"></a>\n <a title="';h={hash:{},inverse:t.noop,fn:t.program(8,m,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='"\n class="icon-button annotate" href="javascript:void(0)"></a>\n </div>\n </div>\n\n ';n=v["if"].call(x,x.deleted,{hash:{},inverse:t.noop,fn:t.program(10,D,E),data:E});if(n||n===0){w+=n}w+='\n\n <div class="message-container">\n ';n=v["if"].call(x,x.message,{hash:{},inverse:t.noop,fn:t.program(13,B,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n\n <div class="quota-message errormessage">\n ';h={hash:{},inverse:t.noop,fn:t.program(15,A,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+=".\n ";h={hash:{},inverse:t.noop,fn:t.program(17,z,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='.\n </div>\n \n \n \n <div class="tags-display">\n <label class="prompt">';h={hash:{},inverse:t.noop,fn:t.program(19,y,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';h={hash:{},inverse:t.noop,fn:t.program(21,l,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='</label>\n <div class="annotation editable-text" title="';h={hash:{},inverse:t.noop,fn:t.program(23,j,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='">\n ';n=v["if"].call(x,x.annotation,{hash:{},inverse:t.program(27,g,E),fn:t.program(25,i,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';h={hash:{},inverse:t.noop,fn:t.program(30,u,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+="\n </div>";return w})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(j,v,t,o,C){this.compilerInfo=[4,">= 1.0.0"];t=this.merge(t,j.helpers);C=C||{};var u="",l,e="function",d=this.escapeExpression,s=this,c=t.blockHelperMissing;function r(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';if(E=t.body){E=E.call(G,{hash:{},data:F})}else{E=G.body;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+='\n </div>\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return D}function q(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';E=t["if"].call(G,G.misc_blurb,{hash:{},inverse:s.noop,fn:s.program(4,p,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.data_type,{hash:{},inverse:s.noop,fn:s.program(6,n,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.metadata_dbkey,{hash:{},inverse:s.noop,fn:s.program(9,i,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.misc_info,{hash:{},inverse:s.noop,fn:s.program(12,A,F),data:F});if(E||E===0){D+=E}D+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';E=t.unless.call(G,G.deleted,{hash:{},inverse:s.noop,fn:s.program(14,z,F),data:F});if(E||E===0){D+=E}D+="\n\n ";return D}function p(G,F){var D="",E;D+='\n <div class="dataset-blurb">\n <span class="value">';if(E=t.misc_blurb){E=E.call(G,{hash:{},data:F})}else{E=G.misc_blurb;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function n(H,G){var D="",F,E;D+='\n <div class="dataset-datatype">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(7,m,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">';if(F=t.data_type){F=F.call(H,{hash:{},data:G})}else{F=H.data_type;F=typeof F===e?F.apply(H):F}D+=d(F)+"</span>\n </div>\n ";return D}function m(E,D){return"format"}function i(H,G){var D="",F,E;D+='\n <div class="dataset-dbkey">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(10,B,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">\n ';if(F=t.metadata_dbkey){F=F.call(H,{hash:{},data:G})}else{F=H.metadata_dbkey;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </span>\n </div>\n ";return D}function B(E,D){return"database"}function A(G,F){var D="",E;D+='\n <div class="dataset-info">\n <span class="value">';if(E=t.misc_info){E=E.call(G,{hash:{},data:F})}else{E=G.misc_info;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function z(H,G){var D="",F,E;D+='\n \n <div class="tags-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(15,y,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(17,x,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div id="dataset-';if(F=t.id){F=F.call(H,{hash:{},data:G})}else{F=H.id;F=typeof F===e?F.apply(H):F}D+=d(F)+'-annotation" class="annotation editable-text"\n title="';E={hash:{},inverse:s.noop,fn:s.program(19,w,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='"></div>\n </div>\n\n <div class="dataset-display-applications">\n ';F=t.each.call(H,H.display_apps,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+="\n\n ";F=t.each.call(H,H.display_types,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+='\n </div>\n\n <div class="dataset-peek">\n ';F=t["if"].call(H,H.peek,{hash:{},inverse:s.noop,fn:s.program(25,f,G),data:G});if(F||F===0){D+=F}D+="\n </div>\n\n ";return D}function y(E,D){return"Tags"}function x(E,D){return"Annotation"}function w(E,D){return"Edit dataset annotation"}function k(G,F){var D="",E;D+='\n <div class="display-application">\n <span class="display-application-location">';if(E=t.label){E=E.call(G,{hash:{},data:F})}else{E=G.label;E=typeof E===e?E.apply(G):E}D+=d(E)+'</span>\n <span class="display-application-links">\n ';E=t.each.call(G,G.links,{hash:{},inverse:s.noop,fn:s.program(22,h,F),data:F});if(E||E===0){D+=E}D+="\n </span>\n </div>\n ";return D}function h(H,G){var D="",F,E;D+='\n <a target="';if(F=t.target){F=F.call(H,{hash:{},data:G})}else{F=H.target;F=typeof F===e?F.apply(H):F}D+=d(F)+'" href="';if(F=t.href){F=F.call(H,{hash:{},data:G})}else{F=H.href;F=typeof F===e?F.apply(H):F}D+=d(F)+'">';E={hash:{},inverse:s.noop,fn:s.program(23,g,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</a>\n ";return D}function g(F,E){var D;if(D=t.text){D=D.call(F,{hash:{},data:E})}else{D=F.text;D=typeof D===e?D.apply(F):D}return d(D)}function f(G,F){var D="",E;D+='\n <pre class="peek">';if(E=t.peek){E=E.call(G,{hash:{},data:F})}else{E=G.peek;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+="</pre>\n ";return D}u+='<div class="dataset-body">\n ';l=t["if"].call(v,v.body,{hash:{},inverse:s.program(3,q,C),fn:s.program(1,r,C),data:C});if(l||l===0){u+=l}u+="\n</div>";return u})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(j,v,t,o,C){this.compilerInfo=[4,">= 1.0.0"];t=this.merge(t,j.helpers);C=C||{};var u="",l,e="function",d=this.escapeExpression,s=this,c=t.blockHelperMissing;function r(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';if(E=t.body){E=E.call(G,{hash:{},data:F})}else{E=G.body;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+='\n </div>\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return D}function q(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';E=t["if"].call(G,G.misc_blurb,{hash:{},inverse:s.noop,fn:s.program(4,p,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.data_type,{hash:{},inverse:s.noop,fn:s.program(6,n,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.metadata_dbkey,{hash:{},inverse:s.noop,fn:s.program(9,i,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.misc_info,{hash:{},inverse:s.noop,fn:s.program(12,A,F),data:F});if(E||E===0){D+=E}D+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';E=t.unless.call(G,G.deleted,{hash:{},inverse:s.noop,fn:s.program(14,z,F),data:F});if(E||E===0){D+=E}D+="\n\n ";return D}function p(G,F){var D="",E;D+='\n <div class="dataset-blurb">\n <span class="value">';if(E=t.misc_blurb){E=E.call(G,{hash:{},data:F})}else{E=G.misc_blurb;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function n(H,G){var D="",F,E;D+='\n <div class="dataset-datatype">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(7,m,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">';if(F=t.data_type){F=F.call(H,{hash:{},data:G})}else{F=H.data_type;F=typeof F===e?F.apply(H):F}D+=d(F)+"</span>\n </div>\n ";return D}function m(E,D){return"format"}function i(H,G){var D="",F,E;D+='\n <div class="dataset-dbkey">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(10,B,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">\n ';if(F=t.metadata_dbkey){F=F.call(H,{hash:{},data:G})}else{F=H.metadata_dbkey;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </span>\n </div>\n ";return D}function B(E,D){return"database"}function A(G,F){var D="",E;D+='\n <div class="dataset-info">\n <span class="value">';if(E=t.misc_info){E=E.call(G,{hash:{},data:F})}else{E=G.misc_info;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function z(H,G){var D="",F,E;D+='\n \n <div class="tags-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(15,y,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(17,x,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div id="dataset-';if(F=t.id){F=F.call(H,{hash:{},data:G})}else{F=H.id;F=typeof F===e?F.apply(H):F}D+=d(F)+'-annotation" class="annotation editable-text"\n title="';E={hash:{},inverse:s.noop,fn:s.program(19,w,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='"></div>\n </div>\n\n <div class="dataset-display-applications">\n ';F=t.each.call(H,H.display_apps,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+="\n\n ";F=t.each.call(H,H.display_types,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+='\n </div>\n\n <div class="dataset-peek">\n ';F=t["if"].call(H,H.peek,{hash:{},inverse:s.noop,fn:s.program(25,f,G),data:G});if(F||F===0){D+=F}D+="\n </div>\n\n ";return D}function y(E,D){return"Tags"}function x(E,D){return"Annotation"}function w(E,D){return"Edit dataset annotation"}function k(G,F){var D="",E;D+='\n <div class="display-application">\n <span class="display-application-location">';if(E=t.label){E=E.call(G,{hash:{},data:F})}else{E=G.label;E=typeof E===e?E.apply(G):E}D+=d(E)+'</span>\n <span class="display-application-links">\n ';E=t.each.call(G,G.links,{hash:{},inverse:s.noop,fn:s.program(22,h,F),data:F});if(E||E===0){D+=E}D+="\n </span>\n </div>\n ";return D}function h(H,G){var D="",F,E;D+='\n <a target="';if(F=t.target){F=F.call(H,{hash:{},data:G})}else{F=H.target;F=typeof F===e?F.apply(H):F}D+=d(F)+'" href="';if(F=t.href){F=F.call(H,{hash:{},data:G})}else{F=H.href;F=typeof F===e?F.apply(H):F}D+=d(F)+'">';E={hash:{},inverse:s.noop,fn:s.program(23,g,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</a>\n ";return D}function g(F,E){var D;if(D=t.text){D=D.call(F,{hash:{},data:E})}else{D=F.text;D=typeof D===e?D.apply(F):D}return d(D)}function f(G,F){var D="",E;D+='\n <pre class="peek">';if(E=t.peek){E=E.call(G,{hash:{},data:F})}else{E=G.peek;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+="</pre>\n ";return D}u+='<div class="dataset-body">\n ';l=t["if"].call(v,v.body,{hash:{},inverse:s.program(3,q,C),fn:s.program(1,r,C),data:C});if(l||l===0){u+=l}u+="\n</div>";return u})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n \n Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it\n or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk\n </strong></div>\n ';return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it\n </strong></div>\n ';return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-primary-actions"></div>\n <div class="dataset-title-bar clear">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n \n Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it\n or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk\n </strong></div>\n ';return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it\n </strong></div>\n ';return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-primary-actions"></div>\n <div class="dataset-title-bar clear">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel-anon"]=b(function(g,r,p,k,u){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);u=u||{};var q="",i,f,o=this,e="function",c=p.blockHelperMissing,d=this.escapeExpression;function n(z,y){var v="",x,w;v+='\n <div class="history-name" title="';w={hash:{},inverse:o.noop,fn:o.program(2,m,y),data:y};if(x=p.local){x=x.call(z,w)}else{x=z.local;x=typeof x===e?x.apply(z):x}if(!p.local){x=c.call(z,x,w)}if(x||x===0){v+=x}v+='">\n ';if(x=p.name){x=x.call(z,{hash:{},data:y})}else{x=z.name;x=typeof x===e?x.apply(z):x}v+=d(x)+"\n </div>\n ";return v}function m(w,v){return"You must be logged in to edit your history name"}function l(y,x){var v="",w;v+='\n <div class="history-size">';if(w=p.nice_size){w=w.call(y,{hash:{},data:x})}else{w=y.nice_size;w=typeof w===e?w.apply(y):w}v+=d(w)+"</div>\n ";return v}function j(y,x){var v="",w;v+='\n \n <div class="';if(w=p.status){w=w.call(y,{hash:{},data:x})}else{w=y.status;w=typeof w===e?w.apply(y):w}v+=d(w)+'message">';if(w=p.message){w=w.call(y,{hash:{},data:x})}else{w=y.message;w=typeof w===e?w.apply(y):w}v+=d(w)+"</div>\n ";return v}function h(w,v){return"You are over your disk quota"}function t(w,v){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function s(w,v){return"Your history is empty. Click 'Get Data' on the left pane to start"}q+='<div class="history-controls">\n\n <div class="history-title">\n \n ';i=p["if"].call(r,r.name,{hash:{},inverse:o.noop,fn:o.program(1,n,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=p["if"].call(r,r.nice_size,{hash:{},inverse:o.noop,fn:o.program(4,l,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="message-container">\n ';i=p["if"].call(r,r.message,{hash:{},inverse:o.noop,fn:o.program(6,j,u),data:u});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:o.noop,fn:o.program(8,h,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+=".\n ";f={hash:{},inverse:o.noop,fn:o.program(10,t,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='.\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:o.noop,fn:o.program(12,s,u),data:u};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+="\n </div>";return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(i,u,s,n,A){this.compilerInfo=[4,">= 1.0.0"];s=this.merge(s,i.helpers);A=A||{};var t="",k,f,r=this,e="function",c=s.blockHelperMissing,d=this.escapeExpression;function q(F,E){var B="",D,C;B+='\n <div class="history-name" title="';C={hash:{},inverse:r.noop,fn:r.program(2,p,E),data:E};if(D=s.local){D=D.call(F,C)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!s.local){D=c.call(F,D,C)}if(D||D===0){B+=D}B+='">\n ';if(D=s.name){D=D.call(F,{hash:{},data:E})}else{D=F.name;D=typeof D===e?D.apply(F):D}B+=d(D)+"\n </div>\n ";return B}function p(C,B){return"Click to rename history"}function o(E,D){var B="",C;B+='\n <div class="history-size">';if(C=s.nice_size){C=C.call(E,{hash:{},data:D})}else{C=E.nice_size;C=typeof C===e?C.apply(E):C}B+=d(C)+"</div>\n ";return B}function m(F,E){var B="",D,C;B+='\n <div class="warningmessagesmall"><strong>\n ';C={hash:{},inverse:r.noop,fn:r.program(7,l,E),data:E};if(D=s.local){D=D.call(F,C)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!s.local){D=c.call(F,D,C)}if(D||D===0){B+=D}B+="\n </strong></div>\n ";return B}function l(C,B){return"You are currently viewing a deleted history!"}function h(E,D){var B="",C;B+='\n \n <div class="';if(C=s.status){C=C.call(E,{hash:{},data:D})}else{C=E.status;C=typeof C===e?C.apply(E):C}B+=d(C)+'message">';if(C=s.message){C=C.call(E,{hash:{},data:D})}else{C=E.message;C=typeof C===e?C.apply(E):C}B+=d(C)+"</div>\n ";return B}function z(C,B){return"You are over your disk quota"}function y(C,B){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function x(C,B){return"Tags"}function w(C,B){return"Annotation"}function v(C,B){return"Click to edit annotation"}function j(D,C){var B;if(B=s.annotation){B=B.call(D,{hash:{},data:C})}else{B=D.annotation;B=typeof B===e?B.apply(D):B}return d(B)}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}t+='<div class="history-controls">\n\n <div class="history-title">\n ';k=s["if"].call(u,u.name,{hash:{},inverse:r.noop,fn:r.program(1,q,A),data:A});if(k||k===0){t+=k}t+='\n </div>\n\n <div class="history-subtitle clear">\n ';k=s["if"].call(u,u.nice_size,{hash:{},inverse:r.noop,fn:r.program(4,o,A),data:A});if(k||k===0){t+=k}t+='\n\n <div class="history-secondary-actions">\n </div>\n </div>\n\n ';k=s["if"].call(u,u.deleted,{hash:{},inverse:r.noop,fn:r.program(6,m,A),data:A});if(k||k===0){t+=k}t+='\n\n <div class="message-container">\n ';k=s["if"].call(u,u.message,{hash:{},inverse:r.noop,fn:r.program(9,h,A),data:A});if(k||k===0){t+=k}t+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:r.noop,fn:r.program(11,z,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+=".\n ";f={hash:{},inverse:r.noop,fn:r.program(13,y,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='.\n </div>\n \n \n \n <div class="tags-display">\n <label class="prompt">';f={hash:{},inverse:r.noop,fn:r.program(15,x,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';f={hash:{},inverse:r.noop,fn:r.program(17,w,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='</label>\n <div class="annotation" title="';f={hash:{},inverse:r.noop,fn:r.program(19,v,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='"\n \n >';k=s["if"].call(u,u.annotation,{hash:{},inverse:r.noop,fn:r.program(21,j,A),data:A});if(k||k===0){t+=k}t+='</div>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:r.noop,fn:r.program(23,g,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+="\n </div>";return t})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(k,w,u,p,C){this.compilerInfo=[4,">= 1.0.0"];u=this.merge(u,k.helpers);C=C||{};var v="",m,g,t=this,e="function",c=u.blockHelperMissing,d=this.escapeExpression;function s(H,G){var D="",F,E;D+='\n <div class="history-name" title="';E={hash:{},inverse:t.noop,fn:t.program(2,r,G),data:G};if(F=u.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!u.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='">\n ';if(F=u.name){F=F.call(H,{hash:{},data:G})}else{F=H.name;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </div>\n ";return D}function r(E,D){return"Click to rename history"}function q(G,F){var D="",E;D+='\n <div class="history-size">';if(E=u.nice_size){E=E.call(G,{hash:{},data:F})}else{E=G.nice_size;E=typeof E===e?E.apply(G):E}D+=d(E)+"</div>\n ";return D}function o(H,G){var D="",F,E;D+='\n <div class="warningmessagesmall"><strong>\n ';E={hash:{},inverse:t.noop,fn:t.program(7,n,G),data:G};if(F=u.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!u.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="\n </strong></div>\n ";return D}function n(E,D){return"You are currently viewing a deleted history!"}function j(G,F){var D="",E;D+='\n \n <div class="';if(E=u.status){E=E.call(G,{hash:{},data:F})}else{E=G.status;E=typeof E===e?E.apply(G):E}D+=d(E)+'message">';if(E=u.message){E=E.call(G,{hash:{},data:F})}else{E=G.message;E=typeof E===e?E.apply(G):E}D+=d(E)+"</div>\n ";return D}function B(E,D){return"You are over your disk quota"}function A(E,D){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function z(E,D){return"Tags"}function y(E,D){return"Annotation"}function x(E,D){return"Click to edit annotation"}function l(G,F){var D="",E;D+="\n ";if(E=u.annotation){E=E.call(G,{hash:{},data:F})}else{E=G.annotation;E=typeof E===e?E.apply(G):E}D+=d(E)+"\n ";return D}function i(H,G){var D="",F,E;D+="\n <em>";E={hash:{},inverse:t.noop,fn:t.program(24,h,G),data:G};if(F=u.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!u.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</em>\n ";return D}function h(E,D){return"Describe or add notes to history"}function f(E,D){return"Your history is empty. Click 'Get Data' on the left pane to start"}v+='<div class="history-controls">\n\n <div class="history-title">\n ';m=u["if"].call(w,w.name,{hash:{},inverse:t.noop,fn:t.program(1,s,C),data:C});if(m||m===0){v+=m}v+='\n </div>\n\n <div class="history-subtitle clear">\n ';m=u["if"].call(w,w.nice_size,{hash:{},inverse:t.noop,fn:t.program(4,q,C),data:C});if(m||m===0){v+=m}v+='\n\n <div class="history-secondary-actions">\n </div>\n </div>\n\n ';m=u["if"].call(w,w.deleted,{hash:{},inverse:t.noop,fn:t.program(6,o,C),data:C});if(m||m===0){v+=m}v+='\n\n <div class="message-container">\n ';m=u["if"].call(w,w.message,{hash:{},inverse:t.noop,fn:t.program(9,j,C),data:C});if(m||m===0){v+=m}v+='\n </div>\n\n <div class="quota-message errormessage">\n ';g={hash:{},inverse:t.noop,fn:t.program(11,B,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+=".\n ";g={hash:{},inverse:t.noop,fn:t.program(13,A,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+='.\n </div>\n \n \n \n <div class="tags-display">\n <label class="prompt">';g={hash:{},inverse:t.noop,fn:t.program(15,z,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';g={hash:{},inverse:t.noop,fn:t.program(17,y,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+='</label>\n <div class="annotation" title="';g={hash:{},inverse:t.noop,fn:t.program(19,x,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+='">\n ';m=u["if"].call(w,w.annotation,{hash:{},inverse:t.program(23,i,C),fn:t.program(21,l,C),data:C});if(m||m===0){v+=m}v+='\n </div>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';g={hash:{},inverse:t.noop,fn:t.program(26,f,C),data:C};if(m=u.local){m=m.call(w,g)}else{m=w.local;m=typeof m===e?m.apply(w):m}if(!u.local){m=c.call(w,m,g)}if(m||m===0){v+=m}v+="\n </div>";return v})})(); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/templates/compiled/template-hda-body.js --- a/static/scripts/packed/templates/compiled/template-hda-body.js +++ b/static/scripts/packed/templates/compiled/template-hda-body.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(j,v,t,o,C){this.compilerInfo=[4,">= 1.0.0"];t=this.merge(t,j.helpers);C=C||{};var u="",l,e="function",d=this.escapeExpression,s=this,c=t.blockHelperMissing;function r(G,F){var D="",E;D+="\n ";if(E=t.body){E=E.call(G,{hash:{},data:F})}else{E=G.body;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+='\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return D}function q(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';E=t["if"].call(G,G.misc_blurb,{hash:{},inverse:s.noop,fn:s.program(4,p,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.data_type,{hash:{},inverse:s.noop,fn:s.program(6,n,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.metadata_dbkey,{hash:{},inverse:s.noop,fn:s.program(9,i,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.misc_info,{hash:{},inverse:s.noop,fn:s.program(12,A,F),data:F});if(E||E===0){D+=E}D+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';E=t.unless.call(G,G.deleted,{hash:{},inverse:s.noop,fn:s.program(14,z,F),data:F});if(E||E===0){D+=E}D+="\n\n ";return D}function p(G,F){var D="",E;D+='\n <div class="dataset-blurb">\n <span class="value">';if(E=t.misc_blurb){E=E.call(G,{hash:{},data:F})}else{E=G.misc_blurb;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function n(H,G){var D="",F,E;D+='\n <div class="dataset-datatype">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(7,m,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">';if(F=t.data_type){F=F.call(H,{hash:{},data:G})}else{F=H.data_type;F=typeof F===e?F.apply(H):F}D+=d(F)+"</span>\n </div>\n ";return D}function m(E,D){return"format"}function i(H,G){var D="",F,E;D+='\n <div class="dataset-dbkey">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(10,B,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">\n ';if(F=t.metadata_dbkey){F=F.call(H,{hash:{},data:G})}else{F=H.metadata_dbkey;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </span>\n </div>\n ";return D}function B(E,D){return"database"}function A(G,F){var D="",E;D+='\n <div class="dataset-info">\n <span class="value">';if(E=t.misc_info){E=E.call(G,{hash:{},data:F})}else{E=G.misc_info;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function z(H,G){var D="",F,E;D+='\n \n <div class="tags-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(15,y,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(17,x,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div id="dataset-';if(F=t.id){F=F.call(H,{hash:{},data:G})}else{F=H.id;F=typeof F===e?F.apply(H):F}D+=d(F)+'-annotation" class="annotation editable-text"\n title="';E={hash:{},inverse:s.noop,fn:s.program(19,w,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='"></div>\n </div>\n\n <div class="dataset-display-applications">\n ';F=t.each.call(H,H.display_apps,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+="\n\n ";F=t.each.call(H,H.display_types,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+='\n </div>\n\n <div class="dataset-peek">\n ';F=t["if"].call(H,H.peek,{hash:{},inverse:s.noop,fn:s.program(25,f,G),data:G});if(F||F===0){D+=F}D+="\n </div>\n\n ";return D}function y(E,D){return"Tags"}function x(E,D){return"Annotation"}function w(E,D){return"Edit dataset annotation"}function k(G,F){var D="",E;D+='\n <div class="display-application">\n <span class="display-application-location">';if(E=t.label){E=E.call(G,{hash:{},data:F})}else{E=G.label;E=typeof E===e?E.apply(G):E}D+=d(E)+'</span>\n <span class="display-application-links">\n ';E=t.each.call(G,G.links,{hash:{},inverse:s.noop,fn:s.program(22,h,F),data:F});if(E||E===0){D+=E}D+="\n </span>\n </div>\n ";return D}function h(H,G){var D="",F,E;D+='\n <a target="';if(F=t.target){F=F.call(H,{hash:{},data:G})}else{F=H.target;F=typeof F===e?F.apply(H):F}D+=d(F)+'" href="';if(F=t.href){F=F.call(H,{hash:{},data:G})}else{F=H.href;F=typeof F===e?F.apply(H):F}D+=d(F)+'">';E={hash:{},inverse:s.noop,fn:s.program(23,g,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</a>\n ";return D}function g(F,E){var D;if(D=t.text){D=D.call(F,{hash:{},data:E})}else{D=F.text;D=typeof D===e?D.apply(F):D}return d(D)}function f(G,F){var D="",E;D+='\n <pre class="peek">';if(E=t.peek){E=E.call(G,{hash:{},data:F})}else{E=G.peek;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+="</pre>\n ";return D}u+='<div class="dataset-body">\n ';l=t["if"].call(v,v.body,{hash:{},inverse:s.program(3,q,C),fn:s.program(1,r,C),data:C});if(l||l===0){u+=l}u+="\n</div>";return u})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(j,v,t,o,C){this.compilerInfo=[4,">= 1.0.0"];t=this.merge(t,j.helpers);C=C||{};var u="",l,e="function",d=this.escapeExpression,s=this,c=t.blockHelperMissing;function r(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';if(E=t.body){E=E.call(G,{hash:{},data:F})}else{E=G.body;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+='\n </div>\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return D}function q(G,F){var D="",E;D+='\n <div class="dataset-summary">\n ';E=t["if"].call(G,G.misc_blurb,{hash:{},inverse:s.noop,fn:s.program(4,p,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.data_type,{hash:{},inverse:s.noop,fn:s.program(6,n,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.metadata_dbkey,{hash:{},inverse:s.noop,fn:s.program(9,i,F),data:F});if(E||E===0){D+=E}D+="\n\n ";E=t["if"].call(G,G.misc_info,{hash:{},inverse:s.noop,fn:s.program(12,A,F),data:F});if(E||E===0){D+=E}D+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';E=t.unless.call(G,G.deleted,{hash:{},inverse:s.noop,fn:s.program(14,z,F),data:F});if(E||E===0){D+=E}D+="\n\n ";return D}function p(G,F){var D="",E;D+='\n <div class="dataset-blurb">\n <span class="value">';if(E=t.misc_blurb){E=E.call(G,{hash:{},data:F})}else{E=G.misc_blurb;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function n(H,G){var D="",F,E;D+='\n <div class="dataset-datatype">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(7,m,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">';if(F=t.data_type){F=F.call(H,{hash:{},data:G})}else{F=H.data_type;F=typeof F===e?F.apply(H):F}D+=d(F)+"</span>\n </div>\n ";return D}function m(E,D){return"format"}function i(H,G){var D="",F,E;D+='\n <div class="dataset-dbkey">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(10,B,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <span class="value">\n ';if(F=t.metadata_dbkey){F=F.call(H,{hash:{},data:G})}else{F=H.metadata_dbkey;F=typeof F===e?F.apply(H):F}D+=d(F)+"\n </span>\n </div>\n ";return D}function B(E,D){return"database"}function A(G,F){var D="",E;D+='\n <div class="dataset-info">\n <span class="value">';if(E=t.misc_info){E=E.call(G,{hash:{},data:F})}else{E=G.misc_info;E=typeof E===e?E.apply(G):E}D+=d(E)+"</span>\n </div>\n ";return D}function z(H,G){var D="",F,E;D+='\n \n <div class="tags-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(15,y,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';E={hash:{},inverse:s.noop,fn:s.program(17,x,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='</label>\n <div id="dataset-';if(F=t.id){F=F.call(H,{hash:{},data:G})}else{F=H.id;F=typeof F===e?F.apply(H):F}D+=d(F)+'-annotation" class="annotation editable-text"\n title="';E={hash:{},inverse:s.noop,fn:s.program(19,w,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+='"></div>\n </div>\n\n <div class="dataset-display-applications">\n ';F=t.each.call(H,H.display_apps,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+="\n\n ";F=t.each.call(H,H.display_types,{hash:{},inverse:s.noop,fn:s.program(21,k,G),data:G});if(F||F===0){D+=F}D+='\n </div>\n\n <div class="dataset-peek">\n ';F=t["if"].call(H,H.peek,{hash:{},inverse:s.noop,fn:s.program(25,f,G),data:G});if(F||F===0){D+=F}D+="\n </div>\n\n ";return D}function y(E,D){return"Tags"}function x(E,D){return"Annotation"}function w(E,D){return"Edit dataset annotation"}function k(G,F){var D="",E;D+='\n <div class="display-application">\n <span class="display-application-location">';if(E=t.label){E=E.call(G,{hash:{},data:F})}else{E=G.label;E=typeof E===e?E.apply(G):E}D+=d(E)+'</span>\n <span class="display-application-links">\n ';E=t.each.call(G,G.links,{hash:{},inverse:s.noop,fn:s.program(22,h,F),data:F});if(E||E===0){D+=E}D+="\n </span>\n </div>\n ";return D}function h(H,G){var D="",F,E;D+='\n <a target="';if(F=t.target){F=F.call(H,{hash:{},data:G})}else{F=H.target;F=typeof F===e?F.apply(H):F}D+=d(F)+'" href="';if(F=t.href){F=F.call(H,{hash:{},data:G})}else{F=H.href;F=typeof F===e?F.apply(H):F}D+=d(F)+'">';E={hash:{},inverse:s.noop,fn:s.program(23,g,G),data:G};if(F=t.local){F=F.call(H,E)}else{F=H.local;F=typeof F===e?F.apply(H):F}if(!t.local){F=c.call(H,F,E)}if(F||F===0){D+=F}D+="</a>\n ";return D}function g(F,E){var D;if(D=t.text){D=D.call(F,{hash:{},data:E})}else{D=F.text;D=typeof D===e?D.apply(F):D}return d(D)}function f(G,F){var D="",E;D+='\n <pre class="peek">';if(E=t.peek){E=E.call(G,{hash:{},data:F})}else{E=G.peek;E=typeof E===e?E.apply(G):E}if(E||E===0){D+=E}D+="</pre>\n ";return D}u+='<div class="dataset-body">\n ';l=t["if"].call(v,v.body,{hash:{},inverse:s.program(3,q,C),fn:s.program(1,r,C),data:C});if(l||l===0){u+=l}u+="\n</div>";return u})})(); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/templates/compiled/template-hda-skeleton.js --- a/static/scripts/packed/templates/compiled/template-hda-skeleton.js +++ b/static/scripts/packed/templates/compiled/template-hda-skeleton.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n \n Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it\n or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk\n </strong></div>\n ';return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it\n </strong></div>\n ';return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-primary-actions"></div>\n\n <div class="dataset-title-bar">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n <div class="clear"></div>\n\n <div class="dataset-body"></div>\n</div>';return q})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n \n Click <a href="javascript:void(0);" class="dataset-undelete">here</a> to undelete it\n or <a href="javascript:void(0);" class="dataset-purge">here</a> to immediately remove it from disk\n </strong></div>\n ';return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+='\n \n Click <a href="javascript:void(0);" class="dataset-unhide">here</a> to unhide it\n </strong></div>\n ';return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-primary-actions"></div>\n <div class="dataset-title-bar clear">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})(); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/packed/templates/compiled/template-history-historyPanel.js --- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js +++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(k,x,v,p,E){this.compilerInfo=[4,">= 1.0.0"];v=this.merge(v,k.helpers);E=E||{};var w="",n,h,t=this,e="function",c=v.blockHelperMissing,d=this.escapeExpression;function s(J,I){var F="",H,G;F+='\n <div class="history-name editable-text" title="';G={hash:{},inverse:t.noop,fn:t.program(2,r,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+='">\n ';if(H=v.name){H=H.call(J,{hash:{},data:I})}else{H=J.name;H=typeof H===e?H.apply(J):H}F+=d(H)+"\n </div>\n ";return F}function r(G,F){return"Click to rename history"}function q(I,H){var F="",G;F+='\n <div class="history-size">';if(G=v.nice_size){G=G.call(I,{hash:{},data:H})}else{G=I.nice_size;G=typeof G===e?G.apply(I):G}F+=d(G)+"</div>\n ";return F}function o(G,F){return"Edit history tags"}function m(G,F){return"Edit history annotation"}function D(J,I){var F="",H,G;F+='\n <div class="warningmessagesmall"><strong>\n ';G={hash:{},inverse:t.noop,fn:t.program(11,C,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+="\n </strong></div>\n ";return F}function C(G,F){return"You are currently viewing a deleted history!"}function B(I,H){var F="",G;F+='\n \n <div class="';if(G=v.status){G=G.call(I,{hash:{},data:H})}else{G=I.status;G=typeof G===e?G.apply(I):G}F+=d(G)+'message">';if(G=v.message){G=G.call(I,{hash:{},data:H})}else{G=I.message;G=typeof G===e?G.apply(I):G}F+=d(G)+"</div>\n ";return F}function A(G,F){return"You are over your disk quota"}function z(G,F){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function y(G,F){return"Tags"}function l(G,F){return"Annotation"}function j(G,F){return"Click to edit annotation"}function i(I,H){var F="",G;F+="\n ";if(G=v.annotation){G=G.call(I,{hash:{},data:H})}else{G=I.annotation;G=typeof G===e?G.apply(I):G}F+=d(G)+"\n ";return F}function g(J,I){var F="",H,G;F+="\n <em>";G={hash:{},inverse:t.noop,fn:t.program(28,f,I),data:I};if(H=v.local){H=H.call(J,G)}else{H=J.local;H=typeof H===e?H.apply(J):H}if(!v.local){H=c.call(J,H,G)}if(H||H===0){F+=H}F+="</em>\n ";return F}function f(G,F){return"Describe or add notes to history"}function u(G,F){return"Your history is empty. Click 'Get Data' on the left pane to start"}w+='<div class="history-controls">\n\n <div class="history-title">\n ';n=v["if"].call(x,x.name,{hash:{},inverse:t.noop,fn:t.program(1,s,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n\n <div class="history-subtitle clear">\n ';n=v["if"].call(x,x.nice_size,{hash:{},inverse:t.noop,fn:t.program(4,q,E),data:E});if(n||n===0){w+=n}w+='\n\n <div class="history-secondary-actions">\n <a title="';h={hash:{},inverse:t.noop,fn:t.program(6,o,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='"\n class="icon-button tags" href="javascript:void(0)"></a>\n <a title="';h={hash:{},inverse:t.noop,fn:t.program(8,m,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='"\n class="icon-button annotate" href="javascript:void(0)"></a>\n </div>\n </div>\n\n ';n=v["if"].call(x,x.deleted,{hash:{},inverse:t.noop,fn:t.program(10,D,E),data:E});if(n||n===0){w+=n}w+='\n\n <div class="message-container">\n ';n=v["if"].call(x,x.message,{hash:{},inverse:t.noop,fn:t.program(13,B,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n\n <div class="quota-message errormessage">\n ';h={hash:{},inverse:t.noop,fn:t.program(15,A,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+=".\n ";h={hash:{},inverse:t.noop,fn:t.program(17,z,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='.\n </div>\n \n \n \n <div class="tags-display">\n <label class="prompt">';h={hash:{},inverse:t.noop,fn:t.program(19,y,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';h={hash:{},inverse:t.noop,fn:t.program(21,l,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='</label>\n <div class="annotation editable-text" title="';h={hash:{},inverse:t.noop,fn:t.program(23,j,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+='">\n ';n=v["if"].call(x,x.annotation,{hash:{},inverse:t.program(27,g,E),fn:t.program(25,i,E),data:E});if(n||n===0){w+=n}w+='\n </div>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';h={hash:{},inverse:t.noop,fn:t.program(30,u,E),data:E};if(n=v.local){n=n.call(x,h)}else{n=x.local;n=typeof n===e?n.apply(x):n}if(!v.local){n=c.call(x,n,h)}if(n||n===0){w+=n}w+="\n </div>";return w})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(i,u,s,n,A){this.compilerInfo=[4,">= 1.0.0"];s=this.merge(s,i.helpers);A=A||{};var t="",k,f,r=this,e="function",c=s.blockHelperMissing,d=this.escapeExpression;function q(F,E){var B="",D,C;B+='\n <div class="history-name" title="';C={hash:{},inverse:r.noop,fn:r.program(2,p,E),data:E};if(D=s.local){D=D.call(F,C)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!s.local){D=c.call(F,D,C)}if(D||D===0){B+=D}B+='">\n ';if(D=s.name){D=D.call(F,{hash:{},data:E})}else{D=F.name;D=typeof D===e?D.apply(F):D}B+=d(D)+"\n </div>\n ";return B}function p(C,B){return"Click to rename history"}function o(E,D){var B="",C;B+='\n <div class="history-size">';if(C=s.nice_size){C=C.call(E,{hash:{},data:D})}else{C=E.nice_size;C=typeof C===e?C.apply(E):C}B+=d(C)+"</div>\n ";return B}function m(F,E){var B="",D,C;B+='\n <div class="warningmessagesmall"><strong>\n ';C={hash:{},inverse:r.noop,fn:r.program(7,l,E),data:E};if(D=s.local){D=D.call(F,C)}else{D=F.local;D=typeof D===e?D.apply(F):D}if(!s.local){D=c.call(F,D,C)}if(D||D===0){B+=D}B+="\n </strong></div>\n ";return B}function l(C,B){return"You are currently viewing a deleted history!"}function h(E,D){var B="",C;B+='\n \n <div class="';if(C=s.status){C=C.call(E,{hash:{},data:D})}else{C=E.status;C=typeof C===e?C.apply(E):C}B+=d(C)+'message">';if(C=s.message){C=C.call(E,{hash:{},data:D})}else{C=E.message;C=typeof C===e?C.apply(E):C}B+=d(C)+"</div>\n ";return B}function z(C,B){return"You are over your disk quota"}function y(C,B){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function x(C,B){return"Tags"}function w(C,B){return"Annotation"}function v(C,B){return"Click to edit annotation"}function j(D,C){var B;if(B=s.annotation){B=B.call(D,{hash:{},data:C})}else{B=D.annotation;B=typeof B===e?B.apply(D):B}return d(B)}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}t+='<div class="history-controls">\n\n <div class="history-title">\n ';k=s["if"].call(u,u.name,{hash:{},inverse:r.noop,fn:r.program(1,q,A),data:A});if(k||k===0){t+=k}t+='\n </div>\n\n <div class="history-subtitle clear">\n ';k=s["if"].call(u,u.nice_size,{hash:{},inverse:r.noop,fn:r.program(4,o,A),data:A});if(k||k===0){t+=k}t+='\n\n <div class="history-secondary-actions">\n </div>\n </div>\n\n ';k=s["if"].call(u,u.deleted,{hash:{},inverse:r.noop,fn:r.program(6,m,A),data:A});if(k||k===0){t+=k}t+='\n\n <div class="message-container">\n ';k=s["if"].call(u,u.message,{hash:{},inverse:r.noop,fn:r.program(9,h,A),data:A});if(k||k===0){t+=k}t+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:r.noop,fn:r.program(11,z,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+=".\n ";f={hash:{},inverse:r.noop,fn:r.program(13,y,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='.\n </div>\n \n \n \n <div class="tags-display">\n <label class="prompt">';f={hash:{},inverse:r.noop,fn:r.program(15,x,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='</label>\n <div class="tags"></div>\n </div>\n\n \n <div class="annotation-display">\n <label class="prompt">';f={hash:{},inverse:r.noop,fn:r.program(17,w,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='</label>\n <div class="annotation" title="';f={hash:{},inverse:r.noop,fn:r.program(19,v,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+='"\n \n >';k=s["if"].call(u,u.annotation,{hash:{},inverse:r.noop,fn:r.program(21,j,A),data:A});if(k||k===0){t+=k}t+='</div>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:r.noop,fn:r.program(23,g,A),data:A};if(k=s.local){k=k.call(u,f)}else{k=u.local;k=typeof k===e?k.apply(u):k}if(!s.local){k=c.call(u,k,f)}if(k||k===0){t+=k}t+="\n </div>";return t})})(); \ No newline at end of file diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/templates/compiled/history-templates.js --- a/static/scripts/templates/compiled/history-templates.js +++ b/static/scripts/templates/compiled/history-templates.js @@ -8,11 +8,232 @@ function program1(depth0,data) { var buffer = "", stack1; - buffer += "\n "; + buffer += "\n <div class=\"dataset-summary\">\n "; if (stack1 = helpers.body) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.body; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; + buffer += "\n </div>\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; + return buffer; + } + +function program3(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"dataset-summary\">\n "; + stack1 = helpers['if'].call(depth0, depth0.misc_blurb, {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers['if'].call(depth0, depth0.data_type, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers['if'].call(depth0, depth0.metadata_dbkey, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>" + + "\n\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; + stack1 = helpers.unless.call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + return buffer; + } +function program4(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"dataset-blurb\">\n <span class=\"value\">"; + if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n </div>\n "; + return buffer; + } + +function program6(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"dataset-datatype\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <span class=\"value\">"; + if (stack1 = helpers.data_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n </div>\n "; + return buffer; + } +function program7(depth0,data) { + + + return "format"; + } + +function program9(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"dataset-dbkey\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(10, program10, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <span class=\"value\">\n "; + if (stack1 = helpers.metadata_dbkey) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "\n </span>\n </div>\n "; + return buffer; + } +function program10(depth0,data) { + + + return "database"; + } + +function program12(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"dataset-info\">\n <span class=\"value\">"; + if (stack1 = helpers.misc_info) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n </div>\n "; + return buffer; + } + +function program14(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n " + + "\n <div class=\"tags-display\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <div class=\"tags\"></div>\n </div>\n\n " + + "\n <div class=\"annotation-display\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <div id=\"dataset-"; + if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "-annotation\" class=\"annotation editable-text\"\n title=\""; + options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\"></div>\n </div>\n\n <div class=\"dataset-display-applications\">\n "; + stack1 = helpers.each.call(depth0, depth0.display_apps, {hash:{},inverse:self.noop,fn:self.program(21, program21, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers.each.call(depth0, depth0.display_types, {hash:{},inverse:self.noop,fn:self.program(21, program21, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n\n <div class=\"dataset-peek\">\n "; + stack1 = helpers['if'].call(depth0, depth0.peek, {hash:{},inverse:self.noop,fn:self.program(25, program25, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n\n "; + return buffer; + } +function program15(depth0,data) { + + + return "Tags"; + } + +function program17(depth0,data) { + + + return "Annotation"; + } + +function program19(depth0,data) { + + + return "Edit dataset annotation"; + } + +function program21(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"display-application\">\n <span class=\"display-application-location\">"; + if (stack1 = helpers.label) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n <span class=\"display-application-links\">\n "; + stack1 = helpers.each.call(depth0, depth0.links, {hash:{},inverse:self.noop,fn:self.program(22, program22, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </span>\n </div>\n "; + return buffer; + } +function program22(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <a target=\""; + if (stack1 = helpers.target) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "\" href=\""; + if (stack1 = helpers.href) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "\">"; + options = {hash:{},inverse:self.noop,fn:self.program(23, program23, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</a>\n "; + return buffer; + } +function program23(depth0,data) { + + var stack1; + if (stack1 = helpers.text) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + return escapeExpression(stack1); + } + +function program25(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <pre class=\"peek\">"; + if (stack1 = helpers.peek) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.peek; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</pre>\n "; + return buffer; + } + + buffer += "<div class=\"dataset-body\">\n "; + stack1 = helpers['if'].call(depth0, depth0.body, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n</div>"; + return buffer; + }); +})();(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-body'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"dataset-summary\">\n "; + if (stack1 = helpers.body) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.body; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; return buffer; } @@ -333,7 +554,7 @@ buffer += "\n\n "; stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n </div>\n\n <div class=\"dataset-primary-actions\"></div>\n\n <div class=\"dataset-title-bar\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">"; + buffer += "\n </div>\n\n <div class=\"dataset-primary-actions\"></div>\n <div class=\"dataset-title-bar clear\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">"; if (stack1 = helpers.hid) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) @@ -341,7 +562,132 @@ if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "</span>\n </div>\n </div>\n <div class=\"clear\"></div>\n\n <div class=\"dataset-body\"></div>\n</div>"; + + "</span>\n </div>\n </div>\n\n <div class=\"dataset-body\"></div>\n</div>"; + return buffer; + }); +})();(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-skeleton'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"errormessagesmall\">\n "; + options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ":\n "; + options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n "; + return buffer; + } +function program2(depth0,data) { + + + return "There was an error getting the data for this dataset"; + } + +function program4(depth0,data) { + + var stack1; + if (stack1 = helpers.error) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.error; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + return escapeExpression(stack1); + } + +function program6(depth0,data) { + + var buffer = "", stack1; + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.purged, {hash:{},inverse:self.program(10, program10, data),fn:self.program(7, program7, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + return buffer; + } +function program7(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"warningmessagesmall\"><strong>\n "; + options = {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </strong></div>\n\n "; + return buffer; + } +function program8(depth0,data) { + + + return "This dataset has been deleted and removed from disk."; + } + +function program10(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"warningmessagesmall\"><strong>\n "; + options = {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n " + + "\n " + + "\n Click <a href=\"javascript:void(0);\" class=\"dataset-undelete\">here</a> to undelete it\n or <a href=\"javascript:void(0);\" class=\"dataset-purge\">here</a> to immediately remove it from disk\n </strong></div>\n "; + return buffer; + } +function program11(depth0,data) { + + + return "This dataset has been deleted."; + } + +function program13(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"warningmessagesmall\"><strong>\n "; + options = {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n " + + "\n Click <a href=\"javascript:void(0);\" class=\"dataset-unhide\">here</a> to unhide it\n </strong></div>\n "; + return buffer; + } +function program14(depth0,data) { + + + return "This dataset has been hidden."; + } + + buffer += "<div class=\"dataset hda\">\n <div class=\"dataset-warnings\">\n "; + stack1 = helpers['if'].call(depth0, depth0.error, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n "; + stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n\n <div class=\"dataset-primary-actions\"></div>\n <div class=\"dataset-title-bar clear\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">"; + if (stack1 = helpers.hid) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n <span class=\"dataset-name\">"; + if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</span>\n </div>\n </div>\n\n <div class=\"dataset-body\"></div>\n</div>"; return buffer; }); })();(function() { @@ -461,7 +807,7 @@ function program1(depth0,data) { var buffer = "", stack1, options; - buffer += "\n <div class=\"history-name editable-text\" title=\""; + buffer += "\n <div class=\"history-name\" title=\""; options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } @@ -493,21 +839,9 @@ function program6(depth0,data) { - - return "Edit history tags"; - } - -function program8(depth0,data) { - - - return "Edit history annotation"; - } - -function program10(depth0,data) { - var buffer = "", stack1, options; buffer += "\n <div class=\"warningmessagesmall\"><strong>\n "; - options = {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } @@ -515,13 +849,13 @@ buffer += "\n </strong></div>\n "; return buffer; } -function program11(depth0,data) { +function program7(depth0,data) { return "You are currently viewing a deleted history!"; } -function program13(depth0,data) { +function program9(depth0,data) { var buffer = "", stack1; buffer += "\n " @@ -537,37 +871,215 @@ return buffer; } -function program15(depth0,data) { +function program11(depth0,data) { return "You are over your disk quota"; } -function program17(depth0,data) { +function program13(depth0,data) { return "Tool execution is on hold until your disk usage drops below your allocated quota"; } -function program19(depth0,data) { +function program15(depth0,data) { return "Tags"; } -function program21(depth0,data) { +function program17(depth0,data) { return "Annotation"; } -function program23(depth0,data) { +function program19(depth0,data) { return "Click to edit annotation"; } -function program25(depth0,data) { +function program21(depth0,data) { + + var stack1; + if (stack1 = helpers.annotation) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.annotation; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + return escapeExpression(stack1); + } + +function program23(depth0,data) { + + + return "Your history is empty. Click 'Get Data' on the left pane to start"; + } + + buffer += "<div class=\"history-controls\">\n\n <div class=\"history-title\">\n "; + stack1 = helpers['if'].call(depth0, depth0.name, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n "; + stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n <div class=\"history-secondary-actions\">\n </div>\n </div>\n\n "; + stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n <div class=\"message-container\">\n "; + stack1 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n\n <div class=\"quota-message errormessage\">\n "; + options = {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ".\n "; + options = {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ".\n </div>\n \n " + + "\n " + + "\n <div class=\"tags-display\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <div class=\"tags\"></div>\n </div>\n\n " + + "\n <div class=\"annotation-display\">\n <label class=\"prompt\">"; + options = {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</label>\n <div class=\"annotation\" title=\""; + options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\"\n " + + "\n >"; + stack1 = helpers['if'].call(depth0, depth0.annotation, {hash:{},inverse:self.noop,fn:self.program(21, program21, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</div>\n </div>\n\n </div>" + + "\n\n " + + "\n <div class=\"datasets-list\"></div>\n\n <div class=\"empty-history-message infomessagesmall\">\n "; + options = {hash:{},inverse:self.noop,fn:self.program(23, program23, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>"; + return buffer; + }); +})();(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-history-historyPanel'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, options, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; + +function program1(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"history-name\" title=\""; + options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\">\n "; + if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "\n </div>\n "; + return buffer; + } +function program2(depth0,data) { + + + return "Click to rename history"; + } + +function program4(depth0,data) { + + var buffer = "", stack1; + buffer += "\n <div class=\"history-size\">"; + if (stack1 = helpers.nice_size) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</div>\n "; + return buffer; + } + +function program6(depth0,data) { + + var buffer = "", stack1, options; + buffer += "\n <div class=\"warningmessagesmall\"><strong>\n "; + options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </strong></div>\n "; + return buffer; + } +function program7(depth0,data) { + + + return "You are currently viewing a deleted history!"; + } + +function program9(depth0,data) { + + var buffer = "", stack1; + buffer += "\n " + + "\n <div class=\""; + if (stack1 = helpers.status) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "message\">"; + if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + buffer += escapeExpression(stack1) + + "</div>\n "; + return buffer; + } + +function program11(depth0,data) { + + + return "You are over your disk quota"; + } + +function program13(depth0,data) { + + + return "Tool execution is on hold until your disk usage drops below your allocated quota"; + } + +function program15(depth0,data) { + + + return "Tags"; + } + +function program17(depth0,data) { + + + return "Annotation"; + } + +function program19(depth0,data) { + + + return "Click to edit annotation"; + } + +function program21(depth0,data) { var buffer = "", stack1; buffer += "\n "; @@ -578,11 +1090,11 @@ return buffer; } -function program27(depth0,data) { +function program23(depth0,data) { var buffer = "", stack1, options; buffer += "\n <em>"; - options = {hash:{},inverse:self.noop,fn:self.program(28, program28, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } @@ -590,13 +1102,13 @@ buffer += "</em>\n "; return buffer; } -function program28(depth0,data) { +function program24(depth0,data) { return "Describe or add notes to history"; } -function program30(depth0,data) { +function program26(depth0,data) { return "Your history is empty. Click 'Get Data' on the left pane to start"; @@ -608,32 +1120,20 @@ buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n "; stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(4, program4, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n <div class=\"history-secondary-actions\">\n <a title=\""; - options = {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data}; - if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\"\n class=\"icon-button tags\" href=\"javascript:void(0)\"></a>\n <a title=\""; - options = {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data}; - if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\"\n class=\"icon-button annotate\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n\n "; - stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(10, program10, data),data:data}); + buffer += "\n\n <div class=\"history-secondary-actions\">\n </div>\n </div>\n\n "; + stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n <div class=\"message-container\">\n "; - stack1 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}); + stack1 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n </div>\n\n <div class=\"quota-message errormessage\">\n "; - options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += ".\n "; - options = {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } @@ -641,31 +1141,31 @@ buffer += ".\n </div>\n \n " + "\n " + "\n <div class=\"tags-display\">\n <label class=\"prompt\">"; - options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "</label>\n <div class=\"tags\"></div>\n </div>\n\n " + "\n <div class=\"annotation-display\">\n <label class=\"prompt\">"; - options = {hash:{},inverse:self.noop,fn:self.program(21, program21, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(17, program17, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "</label>\n <div class=\"annotation editable-text\" title=\""; - options = {hash:{},inverse:self.noop,fn:self.program(23, program23, data),data:data}; + buffer += "</label>\n <div class=\"annotation\" title=\""; + options = {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\">\n "; - stack1 = helpers['if'].call(depth0, depth0.annotation, {hash:{},inverse:self.program(27, program27, data),fn:self.program(25, program25, data),data:data}); + stack1 = helpers['if'].call(depth0, depth0.annotation, {hash:{},inverse:self.program(23, program23, data),fn:self.program(21, program21, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n </div>\n </div>\n\n </div>" + "\n\n " + "\n <div class=\"datasets-list\"></div>\n\n <div class=\"empty-history-message infomessagesmall\">\n "; - options = {hash:{},inverse:self.noop,fn:self.program(30, program30, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data}; if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/templates/compiled/template-hda-body.js --- a/static/scripts/templates/compiled/template-hda-body.js +++ b/static/scripts/templates/compiled/template-hda-body.js @@ -8,11 +8,11 @@ function program1(depth0,data) { var buffer = "", stack1; - buffer += "\n "; + buffer += "\n <div class=\"dataset-summary\">\n "; if (stack1 = helpers.body) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.body; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; + buffer += "\n </div>\n <div class=\"dataset-actions clear\">\n <div class=\"left\"></div>\n <div class=\"right\"></div>\n </div>\n\n "; return buffer; } diff -r 840c5240ac202eadf431e8c69a75971585f0d023 -r f6eb9dc06cdd17664342569a4dd2bd1383eac0c1 static/scripts/templates/compiled/template-hda-skeleton.js --- a/static/scripts/templates/compiled/template-hda-skeleton.js +++ b/static/scripts/templates/compiled/template-hda-skeleton.js @@ -112,7 +112,7 @@ buffer += "\n\n "; stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n </div>\n\n <div class=\"dataset-primary-actions\"></div>\n\n <div class=\"dataset-title-bar\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">"; + buffer += "\n </div>\n\n <div class=\"dataset-primary-actions\"></div>\n <div class=\"dataset-title-bar clear\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">"; if (stack1 = helpers.hid) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) @@ -120,7 +120,7 @@ if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "</span>\n </div>\n </div>\n <div class=\"clear\"></div>\n\n <div class=\"dataset-body\"></div>\n</div>"; + + "</span>\n </div>\n </div>\n\n <div class=\"dataset-body\"></div>\n</div>"; return buffer; }); })(); \ No newline at end of file This diff is so big that we needed to truncate the remainder. 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