1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/d30d2888780f/ changeset: d30d2888780f user: carlfeberhard date: 2012-11-09 21:38:51 summary: (alt)history: subclass on for_editing flag: now hda-edit.js, hda-base.js; split hda and history templates; compile_templates.py: don't stop removal loop for error on single file; pack_scripts; affected #: 44 files diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-base.js --- /dev/null +++ b/static/scripts/mvc/dataset/hda-base.js @@ -0,0 +1,447 @@ +//define([ +// "../mvc/base-mvc" +//], function(){ +//============================================================================== +/** read only view for HistoryDatasetAssociations + * + */ +var HDABaseView = BaseView.extend( LoggableMixin ).extend({ + //??TODO: add alias in initialize this.hda = this.model? + // view for HistoryDatasetAssociation model above + + // uncomment this out see log messages + //logger : console, + + tagName : "div", + className : "historyItemContainer", + + // ................................................................................ SET UP + initialize : function( attributes ){ + this.log( this + '.initialize:', attributes ); + + // which buttons go in most states (ok/failed meta are more complicated) + this.defaultPrimaryActionButtonRenderers = [ + this._render_showParamsButton + ]; + + // render urlTemplates (gen. provided by GalaxyPaths) to urls + if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); } + this.urls = this.renderUrls( attributes.urlTemplates, this.model.toJSON() ); + + // whether the body of this hda is expanded (shown) + this.expanded = attributes.expanded || false; + + // re-render the entire view on any model change + this.model.bind( 'change', this.render, this ); + //this.bind( 'all', function( event ){ + // this.log( event ); + //}, this ); + }, + + // urlTemplates is a map (or nested map) of underscore templates (currently, anyhoo) + // use the templates to create the apropo urls for each action this ds could use + renderUrls : function( urlTemplates, modelJson ){ + var hdaView = this, + urls = {}; + _.each( urlTemplates, function( urlTemplateOrObj, urlKey ){ + // object == nested templates: recurse + if( _.isObject( urlTemplateOrObj ) ){ + urls[ urlKey ] = hdaView.renderUrls( urlTemplateOrObj, modelJson ); + + // string == template: + } else { + // meta_down load is a special case (see renderMetaDownloadUrls) + //TODO: should be a better (gen.) way to handle this case + if( urlKey === 'meta_download' ){ + urls[ urlKey ] = hdaView.renderMetaDownloadUrls( urlTemplateOrObj, modelJson ); + } else { + urls[ urlKey ] = _.template( urlTemplateOrObj, modelJson ); + } + } + }); + return urls; + }, + + // there can be more than one meta_file to download, so return a list of url and file_type for each + renderMetaDownloadUrls : function( urlTemplate, modelJson ){ + return _.map( modelJson.meta_files, function( meta_file ){ + return { + url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }), + file_type : meta_file.file_type + }; + }); + }, + + // ................................................................................ RENDER MAIN + // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial + render : function(){ + var view = this, + id = this.model.get( 'id' ), + state = this.model.get( 'state' ), + itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ), + initialRender = ( this.$el.children().size() === 0 ); + + //console.debug( this + '.render, initial?:', initialRender ); + this.$el.attr( 'id', 'historyItemContainer-' + id ); + + itemWrapper + .addClass( 'historyItemWrapper' ).addClass( 'historyItem' ) + .addClass( 'historyItem-' + state ); + + itemWrapper.append( this._render_warnings() ); + itemWrapper.append( this._render_titleBar() ); + this.body = $( this._render_body() ); + itemWrapper.append( this.body ); + + //TODO: move to own function: setUpBehaviours + // we can potentially skip this step and call popupmenu directly on the download button + make_popup_menus( itemWrapper ); + + // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.) + itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' }); + + // transition... + this.$el.fadeOut( 'fast', function(){ + view.$el.children().remove(); + view.$el.append( itemWrapper ).fadeIn( 'fast', function(){ + view.log( view + ' rendered:', view.$el ); + + var renderedEventName = 'rendered'; + if( initialRender ){ + renderedEventName += ':initial'; + } else if( view.model.inReadyState() ){ + renderedEventName += ':ready'; + } + view.trigger( renderedEventName ); + }); + }); + return this; + }, + + // ................................................................................ RENDER WARNINGS + // hda warnings including: is deleted, is purged, is hidden (including links to further actions (undelete, etc.)) + _render_warnings : function(){ + // jQ errs on building dom with whitespace - if there are no messages, trim -> '' + return $( jQuery.trim( HDABaseView.templates.messages( this.model.toJSON() ))); + }, + + // ................................................................................ RENDER TITLEBAR + // the part of an hda always shown (whether the body is expanded or not): title link, title buttons + _render_titleBar : function(){ + var titleBar = $( '<div class="historyItemTitleBar" style="overflow: hidden"></div>' ); + titleBar.append( this._render_titleButtons() ); + titleBar.append( '<span class="state-icon"></span>' ); + titleBar.append( this._render_titleLink() ); + return titleBar; + }, + + // ................................................................................ display, edit attr, delete + // icon-button group for the common, most easily accessed actions + //NOTE: these are generally displayed for almost every hda state (tho poss. disabled) + _render_titleButtons : function(){ + // render the display, edit attr and delete icon-buttons + var buttonDiv = $( '<div class="historyItemButtons"></div>' ); + buttonDiv.append( this._render_displayButton() ); + return buttonDiv; + }, + + // icon-button to display this hda in the galaxy main iframe + _render_displayButton : function(){ + // don't show display if not in ready state, error'd, or not accessible + if( ( !this.model.inReadyState() ) + || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR ) + || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) + || ( !this.model.get( 'accessible' ) ) ){ + this.displayButton = null; + return null; + } + + var displayBtnData = { + icon_class : 'display', + target : 'galaxy_main' + }; + + // show a disabled display if the data's been purged + if( this.model.get( 'purged' ) ){ + displayBtnData.enabled = false; + displayBtnData.title = _l( 'Cannot display datasets removed from disk' ); + + } else { + displayBtnData.title = _l( 'Display data in browser' ); + displayBtnData.href = this.urls.display; + } + + this.displayButton = new IconButtonView({ model : new IconButton( displayBtnData ) }); + return this.displayButton.render().$el; + }, + + // ................................................................................ titleLink + // render the hid and hda.name as a link (that will expand the body) + _render_titleLink : function(){ + return $( jQuery.trim( HDABaseView.templates.titleLink( + _.extend( this.model.toJSON(), { urls: this.urls } ) + ))); + }, + + // ................................................................................ RENDER BODY + // render the data/metadata summary (format, size, misc info, etc.) + _render_hdaSummary : function(){ + var modelData = _.extend( this.model.toJSON(), { urls: this.urls } ); + return HDABaseView.templates.hdaSummary( modelData ); + }, + + // ................................................................................ primary actions + // render the icon-buttons gen. placed underneath the hda summary + _render_primaryActionButtons : function( buttonRenderingFuncs ){ + var view = this, + primaryActionButtons = $( '<div/>' ).attr( 'id', 'primary-actions-' + this.model.get( 'id' ) ); + _.each( buttonRenderingFuncs, function( fn ){ + primaryActionButtons.append( fn.call( view ) ); + }); + return primaryActionButtons; + }, + + // icon-button/popupmenu to down the data (and/or the associated meta files (bai, etc.)) for this hda + _render_downloadButton : function(){ + // don't show anything if the data's been purged + if( this.model.get( 'purged' ) || !this.model.hasData() ){ return null; } + + // return either: a single download icon-button (if there are no meta files) + // or a popupmenu with links to download assoc. meta files (if there are meta files) + var downloadLinkHTML = HDABaseView.templates.downloadLinks( + _.extend( this.model.toJSON(), { urls: this.urls } ) + ); + //this.log( this + '_render_downloadButton, downloadLinkHTML:', downloadLinkHTML ); + return $( downloadLinkHTML ); + }, + + // icon-button to show the input and output (stdout/err) for the job that created this hda + _render_showParamsButton : function(){ + // gen. safe to show in all cases + this.showParamsButton = new IconButtonView({ model : new IconButton({ + title : _l( 'View details' ), + href : this.urls.show_params, + target : 'galaxy_main', + icon_class : 'information' + }) }); + return this.showParamsButton.render().$el; + }, + + // ................................................................................ other elements + // render links to external genome display applications (igb, gbrowse, etc.) + //TODO: not a fan of the style on these + _render_displayApps : function(){ + if( !this.model.hasData() ){ return null; } + + var displayAppsDiv = $( '<div/>' ).addClass( 'display-apps' ); + if( !_.isEmpty( this.model.get( 'display_types' ) ) ){ + //this.log( this + 'display_types:', this.model.get( 'urls' ).display_types ); + //TODO:?? does this ever get used? + displayAppsDiv.append( + HDABaseView.templates.displayApps({ displayApps : this.model.get( 'display_types' ) }) + ); + } + if( !_.isEmpty( this.model.get( 'display_apps' ) ) ){ + //this.log( this + 'display_apps:', this.model.get( 'urls' ).display_apps ); + displayAppsDiv.append( + HDABaseView.templates.displayApps({ displayApps : this.model.get( 'display_apps' ) }) + ); + } + return displayAppsDiv; + }, + + // render the data peek + //TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible + _render_peek : function(){ + if( !this.model.get( 'peek' ) ){ return null; } + return $( '<div/>' ).append( + $( '<pre/>' ) + .attr( 'id', 'peek' + this.model.get( 'id' ) ) + .addClass( 'peek' ) + .append( this.model.get( 'peek' ) ) + ); + }, + + // ................................................................................ state body renderers + // _render_body fns for the various states + //TODO: only render these on expansion (or already expanded) + _render_body_not_viewable : function( parent ){ + //TODO: revisit - still showing display, edit, delete (as common) - that CAN'T be right + parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '.</div>' ) ); + }, + + _render_body_uploading : function( parent ){ + parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) ); + }, + + _render_body_queued : function( parent ){ + parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) ); + parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers )); + }, + + _render_body_running : function( parent ){ + parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' ); + parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers )); + }, + + _render_body_error : function( parent ){ + if( !this.model.get( 'purged' ) ){ + parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) ); + } + parent.append( ( _l( 'An error occurred running this job' ) + ': ' + + '<i>' + $.trim( this.model.get( 'misc_info' ) ) + '</i>' ) ); + parent.append( this._render_primaryActionButtons( + this.defaultPrimaryActionButtonRenderers.concat([ this._render_downloadButton ]) + )); + }, + + _render_body_discarded : function( parent ){ + parent.append( '<div>' + _l( 'The job creating this dataset was cancelled before completion' ) + '.</div>' ); + parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers )); + }, + + _render_body_setting_metadata : function( parent ){ + parent.append( $( '<div>' + _l( 'Metadata is being auto-detected' ) + '.</div>' ) ); + }, + + _render_body_empty : function( parent ){ + //TODO: replace i with dataset-misc-info class + //?? why are we showing the file size when we know it's zero?? + parent.append( $( '<div>' + _l( 'No data' ) + ': <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) ); + parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers )); + }, + + _render_body_failed_metadata : function( parent ){ + //TODO: the css for this box is broken (unlike the others) + // add a message box about the failure at the top of the body... + parent.append( $( HDABaseView.templates.failedMetadata( this.model.toJSON() ) ) ); + //...then render the remaining body as STATES.OK (only diff between these states is the box above) + this._render_body_ok( parent ); + }, + + _render_body_ok : function( parent ){ + // most common state renderer and the most complicated + parent.append( this._render_hdaSummary() ); + + // return shortened form if del'd + //TODO: is this correct? maybe only on purged + if( this.model.isDeletedOrPurged() ){ + parent.append( this._render_primaryActionButtons([ + this._render_downloadButton, + this._render_showParamsButton + ])); + return; + } + + //NOTE: change the order here + parent.append( this._render_primaryActionButtons([ + this._render_downloadButton, + this._render_showParamsButton + ])); + parent.append( '<div class="clear"/>' ); + + parent.append( this._render_displayApps() ); + parent.append( this._render_peek() ); + }, + + _render_body : function(){ + //this.log( this + '_render_body' ); + + var body = $( '<div/>' ) + .attr( 'id', 'info-' + this.model.get( 'id' ) ) + .addClass( 'historyItemBody' ) + .attr( 'style', 'display: block' ); + + //TODO: not a fan of this dispatch + switch( this.model.get( 'state' ) ){ + case HistoryDatasetAssociation.STATES.NOT_VIEWABLE : + this._render_body_not_viewable( body ); + break; + case HistoryDatasetAssociation.STATES.UPLOAD : + this._render_body_uploading( body ); + break; + case HistoryDatasetAssociation.STATES.QUEUED : + this._render_body_queued( body ); + break; + case HistoryDatasetAssociation.STATES.RUNNING : + this._render_body_running( body ); + break; + case HistoryDatasetAssociation.STATES.ERROR : + this._render_body_error( body ); + break; + case HistoryDatasetAssociation.STATES.DISCARDED : + this._render_body_discarded( body ); + break; + case HistoryDatasetAssociation.STATES.SETTING_METADATA : + this._render_body_setting_metadata( body ); + break; + case HistoryDatasetAssociation.STATES.EMPTY : + this._render_body_empty( body ); + break; + case HistoryDatasetAssociation.STATES.FAILED_METADATA : + this._render_body_failed_metadata( body ); + break; + case HistoryDatasetAssociation.STATES.OK : + this._render_body_ok( body ); + break; + default: + //??: no body? + body.append( $( '<div>Error: unknown dataset state "' + state + '".</div>' ) ); + } + body.append( '<div style="clear: both"></div>' ); + + if( this.expanded ){ + body.show(); + } else { + body.hide(); + } + return body; + }, + + // ................................................................................ EVENTS + events : { + 'click .historyItemTitle' : 'toggleBodyVisibility' + }, + + // expand/collapse body + // event: body-visible, body-hidden + toggleBodyVisibility : function( event, expanded ){ + var hdaView = this, + $body = this.$el.find( '.historyItemBody' ); + expanded = ( expanded === undefined )?( !$body.is( ':visible' ) ):( expanded ); + //this.log( 'toggleBodyVisibility, expanded:', expanded, '$body:', $body ); + + if( expanded ){ + $body.slideDown( 'fast', function(){ + hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) ); + }); + } else { + $body.slideUp( 'fast', function(){ + hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) ); + }); + } + }, + + // ................................................................................ UTILTIY + toString : function(){ + var modelString = ( this.model )?( this.model + '' ):( '(no model)' ); + return 'HDABaseView(' + modelString + ')'; + } +}); + +//------------------------------------------------------------------------------ +HDABaseView.templates = { + warningMsg : Handlebars.templates[ 'template-warningmessagesmall' ], + + messages : Handlebars.templates[ 'template-hda-warning-messages' ], + titleLink : Handlebars.templates[ 'template-hda-titleLink' ], + hdaSummary : Handlebars.templates[ 'template-hda-hdaSummary' ], + downloadLinks : Handlebars.templates[ 'template-hda-downloadLinks' ], + failedMetadata : Handlebars.templates[ 'template-hda-failedMetaData' ], + displayApps : Handlebars.templates[ 'template-hda-displayApps' ] +}; + +//============================================================================== +//return { +// HDABaseView : HDABaseView, +//};}); diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -2,155 +2,32 @@ // "../mvc/base-mvc" //], function(){ //============================================================================== -/** View for editing (working with - as opposed to viewing/read-only) an hda +/** editing view for HistoryDatasetAssociations * */ -var HDAView = BaseView.extend( LoggableMixin ).extend({ - //??TODO: add alias in initialize this.hda = this.model? - // view for HistoryDatasetAssociation model above +var HDAEditView = HDABaseView.extend({ - // uncomment this out see log messages - //logger : console, - - tagName : "div", - className : "historyItemContainer", - // ................................................................................ SET UP initialize : function( attributes ){ - this.log( this + '.initialize:', attributes ); + HDABaseView.prototype.initialize.call( this, attributes ); - // render urlTemplates (gen. provided by GalaxyPaths) to urls - if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); } - this.urls = this.renderUrls( attributes.urlTemplates, this.model.toJSON() ); - - // whether the body of this hda is expanded (shown) - this.expanded = attributes.expanded || false; - - // re-render the entire view on any model change - this.model.bind( 'change', this.render, this ); - //this.bind( 'all', function( event ){ - // this.log( event ); - //}, this ); - }, - - // urlTemplates is a map (or nested map) of underscore templates (currently, anyhoo) - // use the templates to create the apropo urls for each action this ds could use - renderUrls : function( urlTemplates, modelJson ){ - var hdaView = this, - urls = {}; - _.each( urlTemplates, function( urlTemplateOrObj, urlKey ){ - // object == nested templates: recurse - if( _.isObject( urlTemplateOrObj ) ){ - urls[ urlKey ] = hdaView.renderUrls( urlTemplateOrObj, modelJson ); - - // string == template: - } else { - // meta_down load is a special case (see renderMetaDownloadUrls) - //TODO: should be a better (gen.) way to handle this case - if( urlKey === 'meta_download' ){ - urls[ urlKey ] = hdaView.renderMetaDownloadUrls( urlTemplateOrObj, modelJson ); - } else { - urls[ urlKey ] = _.template( urlTemplateOrObj, modelJson ); - } - } - }); - return urls; + // which buttons go in most states (ok/failed meta are more complicated) + // HDAEdit gets the rerun button on almost all states + this.defaultPrimaryActionButtonRenderers = [ + this._render_showParamsButton, + this._render_rerunButton + ]; }, - // there can be more than one meta_file to download, so return a list of url and file_type for each - renderMetaDownloadUrls : function( urlTemplate, modelJson ){ - return _.map( modelJson.meta_files, function( meta_file ){ - return { - url : _.template( urlTemplate, { id: modelJson.id, file_type: meta_file.file_type }), - file_type : meta_file.file_type - }; - }); - }, - - // ................................................................................ RENDER MAIN - // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial - render : function(){ - var view = this, - id = this.model.get( 'id' ), - state = this.model.get( 'state' ), - itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ), - initialRender = ( this.$el.children().size() === 0 ); - - //console.debug( this + '.render, initial?:', initialRender ); - - this._clearReferences(); - this.$el.attr( 'id', 'historyItemContainer-' + id ); - - itemWrapper - .addClass( 'historyItemWrapper' ).addClass( 'historyItem' ) - .addClass( 'historyItem-' + state ); - - itemWrapper.append( this._render_warnings() ); - itemWrapper.append( this._render_titleBar() ); - this.body = $( this._render_body() ); - itemWrapper.append( this.body ); - - //TODO: move to own function: setUpBehaviours - // we can potentially skip this step and call popupmenu directly on the download button - make_popup_menus( itemWrapper ); - - // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.) - itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' }); - - // transition... - this.$el.fadeOut( 'fast', function(){ - view.$el.children().remove(); - view.$el.append( itemWrapper ).fadeIn( 'fast', function(){ - view.log( view + ' rendered:', view.$el ); - - var renderedEventName = 'rendered'; - if( initialRender ){ - renderedEventName += ':initial'; - } else if( view.model.inReadyState() ){ - renderedEventName += ':ready'; - } - view.trigger( renderedEventName ); - }); - }); - return this; - }, - - //NOTE: button renderers have the side effect of caching their IconButtonViews to this view - // clear out cached sub-views, dom refs, etc. from prev. render - _clearReferences : function(){ - //??TODO: we should reset these in the button logic checks (i.e. if not needed this.button = null; return null) - //?? do we really need these - not so far - //TODO: at least move these to a map - this.displayButton = null; - this.editButton = null; - this.deleteButton = null; - this.errButton = null; - this.showParamsButton = null; - this.rerunButton = null; - this.visualizationsButton = null; - this.tagButton = null; - this.annotateButton = null; - }, - // ................................................................................ RENDER WARNINGS // hda warnings including: is deleted, is purged, is hidden (including links to further actions (undelete, etc.)) _render_warnings : function(){ // jQ errs on building dom with whitespace - if there are no messages, trim -> '' - return $( jQuery.trim( HDAView.templates.messages( + return $( jQuery.trim( HDABaseView.templates.messages( _.extend( this.model.toJSON(), { urls: this.urls } ) ))); }, - // ................................................................................ RENDER TITLEBAR - // the part of an hda always shown (whether the body is expanded or not): title link, title buttons - _render_titleBar : function(){ - var titleBar = $( '<div class="historyItemTitleBar" style="overflow: hidden"></div>' ); - titleBar.append( this._render_titleButtons() ); - titleBar.append( '<span class="state-icon"></span>' ); - titleBar.append( this._render_titleLink() ); - return titleBar; - }, - // ................................................................................ display, edit attr, delete // icon-button group for the common, most easily accessed actions //NOTE: these are generally displayed for almost every hda state (tho poss. disabled) @@ -163,46 +40,16 @@ return buttonDiv; }, - // icon-button to display this hda in the galaxy main iframe - _render_displayButton : function(){ - // don't show display if not in ready state, error'd, or not accessible - if( ( !this.model.inReadyState() ) + // icon-button to edit the attributes (format, permissions, etc.) this hda + _render_editButton : function(){ + // don't show edit while uploading + //TODO??: error? + //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible) + if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD ) || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR ) || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) || ( !this.model.get( 'accessible' ) ) ){ - return null; - } - - var displayBtnData = { - icon_class : 'display' - }; - - // show a disabled display if the data's been purged - if( this.model.get( 'purged' ) ){ - displayBtnData.enabled = false; - displayBtnData.title = _l( 'Cannot display datasets removed from disk' ); - - } else { - displayBtnData.title = _l( 'Display data in browser' ); - displayBtnData.href = this.urls.display; - } - - if( this.model.get( 'for_editing' ) ){ - displayBtnData.target = 'galaxy_main'; - } - - this.displayButton = new IconButtonView({ model : new IconButton( displayBtnData ) }); - return this.displayButton.render().$el; - }, - - // icon-button to edit the attributes (format, permissions, etc.) this hda - _render_editButton : function(){ - // don't show edit while uploading, or if editable - if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.UPLOAD ) - || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.ERROR ) - || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) - || ( !this.model.get( 'accessible' ) ) - || ( !this.model.get( 'for_editing' ) ) ){ + this.editButton = null; return null; } @@ -216,7 +63,6 @@ }; // disable if purged or deleted and explain why in the tooltip - //TODO: if for_editing if( deleted || purged ){ editBtnData.enabled = false; if( purged ){ @@ -233,9 +79,10 @@ // icon-button to delete this hda _render_deleteButton : function(){ // don't show delete if... - if( ( !this.model.get( 'for_editing' ) ) - || ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) + //TODO??: not viewable/accessible are essentially the same (not viewable set from accessible) + if( ( this.model.get( 'state' ) === HistoryDatasetAssociation.STATES.NOT_VIEWABLE ) || ( !this.model.get( 'accessible' ) ) ){ + this.deleteButton = null; return null; } @@ -255,14 +102,6 @@ this.deleteButton = new IconButtonView({ model : new IconButton( deleteBtnData ) }); return this.deleteButton.render().$el; }, - - // ................................................................................ titleLink - // render the hid and hda.name as a link (that will expand the body) - _render_titleLink : function(){ - return $( jQuery.trim( HDAView.templates.titleLink( - _.extend( this.model.toJSON(), { urls: this.urls } ) - ))); - }, // ................................................................................ RENDER BODY // render the data/metadata summary (format, size, misc info, etc.) @@ -271,40 +110,19 @@ // if there's no dbkey and it's editable : pass a flag to the template to render a link to editing in the '?' if( this.model.get( 'metadata_dbkey' ) === '?' && !this.model.isDeletedOrPurged() ){ + //TODO: use HDABaseView and select/replace base on this switch _.extend( modelData, { dbkey_unknown_and_editable : true }); } - return HDAView.templates.hdaSummary( modelData ); + return HDABaseView.templates.hdaSummary( modelData ); }, // ................................................................................ primary actions - // render the icon-buttons gen. placed underneath the hda summary - _render_primaryActionButtons : function( buttonRenderingFuncs ){ - var primaryActionButtons = $( '<div/>' ).attr( 'id', 'primary-actions-' + this.model.get( 'id' ) ), - view = this; - _.each( buttonRenderingFuncs, function( fn ){ - primaryActionButtons.append( fn.call( view ) ); - }); - return primaryActionButtons; - }, - - // icon-button/popupmenu to down the data (and/or the associated meta files (bai, etc.)) for this hda - _render_downloadButton : function(){ - // don't show anything if the data's been purged - if( this.model.get( 'purged' ) ){ return null; } - - // return either: a single download icon-button (if there are no meta files) - // or a popupmenu with links to download assoc. meta files (if there are meta files) - var downloadLinkHTML = HDAView.templates.downloadLinks( - _.extend( this.model.toJSON(), { urls: this.urls } ) - ); - //this.log( this + '_render_downloadButton, downloadLinkHTML:', downloadLinkHTML ); - return $( downloadLinkHTML ); - }, - // icon-button to show the input and output (stdout/err) for the job that created this hda - _render_errButton : function(){ - if( ( this.model.get( 'state' ) !== HistoryDatasetAssociation.STATES.ERROR ) - || ( !this.model.get( 'for_editing' ) ) ){ return null; } + _render_errButton : function(){ + if( this.model.get( 'state' ) !== HistoryDatasetAssociation.STATES.ERROR ){ + this.errButton = null; + return null; + } this.errButton = new IconButtonView({ model : new IconButton({ title : _l( 'View or report this error' ), @@ -315,21 +133,8 @@ return this.errButton.render().$el; }, - // icon-button to show the input and output (stdout/err) for the job that created this hda - _render_showParamsButton : function(){ - // gen. safe to show in all cases - this.showParamsButton = new IconButtonView({ model : new IconButton({ - title : _l( 'View details' ), - href : this.urls.show_params, - target : 'galaxy_main', - icon_class : 'information' - }) }); - return this.showParamsButton.render().$el; - }, - // icon-button to re run the job that created this hda _render_rerunButton : function(){ - if( !this.model.get( 'for_editing' ) ){ return null; } this.rerunButton = new IconButtonView({ model : new IconButton({ title : _l( 'Run this job again' ), href : this.urls.rerun, @@ -352,10 +157,10 @@ }; if( !( this.model.hasData() ) - || !( this.model.get( 'for_editing' ) ) || !( visualizations && visualizations.length ) || !( visualization_url ) ){ //console.warn( 'NOT rendering visualization icon' ) + this.visualizationsButton = null; return null; } @@ -422,9 +227,12 @@ // icon-button to load and display tagging html //TODO: these should be a sub-MV _render_tagButton : function(){ + //TODO: check for User if( !( this.model.hasData() ) - || !( this.model.get( 'for_editing' ) ) - || ( !this.urls.tags.get ) ){ return null; } + || ( !this.urls.tags.get ) ){ + this.tagButton = null; + return null; + } this.tagButton = new IconButtonView({ model : new IconButton({ title : _l( 'Edit dataset tags' ), @@ -438,9 +246,12 @@ // icon-button to load and display annotation html //TODO: these should be a sub-MV _render_annotateButton : function(){ + //TODO: check for User if( !( this.model.hasData() ) - || !( this.model.get( 'for_editing' ) ) - || ( !this.urls.annotation.get ) ){ return null; } + || ( !this.urls.annotation.get ) ){ + this.annotateButton = null; + return null; + } this.annotateButton = new IconButtonView({ model : new IconButton({ title : _l( 'Edit dataset annotation' ), @@ -451,130 +262,34 @@ }, // ................................................................................ other elements - // render links to external genome display applications (igb, gbrowse, etc.) - //TODO: not a fan of the style on these - _render_displayApps : function(){ - if( !this.model.hasData() ){ return null; } - - var displayAppsDiv = $( '<div/>' ).addClass( 'display-apps' ); - if( !_.isEmpty( this.model.get( 'display_types' ) ) ){ - //this.log( this + 'display_types:', this.model.get( 'urls' ).display_types ); - //TODO:?? does this ever get used? - displayAppsDiv.append( - HDAView.templates.displayApps({ displayApps : this.model.get( 'display_types' ) }) - ); - } - if( !_.isEmpty( this.model.get( 'display_apps' ) ) ){ - //this.log( this + 'display_apps:', this.model.get( 'urls' ).display_apps ); - displayAppsDiv.append( - HDAView.templates.displayApps({ displayApps : this.model.get( 'display_apps' ) }) - ); - } - return displayAppsDiv; - }, - //TODO: into sub-MV + //TODO: check for User // render the area used to load tag display _render_tagArea : function(){ if( !this.urls.tags.set ){ return null; } //TODO: move to mvc/tags.js - return $( HDAView.templates.tagArea( + return $( HDAEditView.templates.tagArea( _.extend( this.model.toJSON(), { urls: this.urls } ) )); }, //TODO: into sub-MV + //TODO: check for User // render the area used to load annotation display _render_annotationArea : function(){ if( !this.urls.annotation.get ){ return null; } //TODO: move to mvc/annotations.js - return $( HDAView.templates.annotationArea( + return $( HDAEditView.templates.annotationArea( _.extend( this.model.toJSON(), { urls: this.urls } ) )); }, - - // render the data peek - //TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible - _render_peek : function(){ - if( !this.model.get( 'peek' ) ){ return null; } - return $( '<div/>' ).append( - $( '<pre/>' ) - .attr( 'id', 'peek' + this.model.get( 'id' ) ) - .addClass( 'peek' ) - .append( this.model.get( 'peek' ) ) - ); - }, // ................................................................................ state body renderers - // _render_body fns for the various states - //TODO: only render these on expansion (or already expanded) - _render_body_not_viewable : function( parent ){ - //TODO: revisit - still showing display, edit, delete (as common) - that CAN'T be right - parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '.</div>' ) ); - }, - - _render_body_uploading : function( parent ){ - parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) ); - }, - - _render_body_queued : function( parent ){ - parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) ); - parent.append( this._render_primaryActionButtons([ - this._render_showParamsButton, - this._render_rerunButton - ])); - }, - - _render_body_running : function( parent ){ - parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' ); - parent.append( this._render_primaryActionButtons([ - this._render_showParamsButton, - this._render_rerunButton - ])); - }, - _render_body_error : function( parent ){ - if( !this.model.get( 'purged' ) ){ - parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) ); - } - parent.append( ( _l( 'An error occurred running this job' ) + ': ' - + '<i>' + $.trim( this.model.get( 'misc_info' ) ) + '</i>' ) ); - parent.append( this._render_primaryActionButtons([ - this._render_downloadButton, - this._render_errButton, - this._render_showParamsButton, - this._render_rerunButton - ])); - }, - - _render_body_discarded : function( parent ){ - parent.append( '<div>' + _l( 'The job creating this dataset was cancelled before completion' ) + '.</div>' ); - parent.append( this._render_primaryActionButtons([ - this._render_showParamsButton, - this._render_rerunButton - ])); - }, - - _render_body_setting_metadata : function( parent ){ - parent.append( $( '<div>' + _l( 'Metadata is being auto-detected' ) + '.</div>' ) ); - }, - - _render_body_empty : function( parent ){ - //TODO: replace i with dataset-misc-info class - //?? why are we showing the file size when we know it's zero?? - parent.append( $( '<div>' + _l( 'No data' ) + ': <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) ); - parent.append( this._render_primaryActionButtons([ - this._render_showParamsButton, - this._render_rerunButton - ])); - }, - - _render_body_failed_metadata : function( parent ){ - //TODO: the css for this box is broken (unlike the others) - // add a message box about the failure at the top of the body... - parent.append( $( HDAView.templates.failedMetadata( this.model.toJSON() ) ) ); - //...then render the remaining body as STATES.OK (only diff between these states is the box above) - this._render_body_ok( parent ); + // overridden to prepend error report button to primary actions strip + HDABaseView.prototype._render_body_error.call( this, parent ); + var primaryActions = parent.find( '#primary-actions-' + this.model.get( 'id' ) ); + primaryActions.prepend( this._render_errButton() ); }, _render_body_ok : function( parent ){ @@ -595,7 +310,6 @@ //NOTE: change the order here parent.append( this._render_primaryActionButtons([ this._render_downloadButton, - this._render_errButton, this._render_showParamsButton, this._render_rerunButton, this._render_visualizationsButton @@ -611,70 +325,6 @@ parent.append( this._render_displayApps() ); parent.append( this._render_peek() ); - - //TODO??: still needed? - //// If Mozilla, hide scrollbars in hidden items since they cause animation bugs - //if ( $.browser.mozilla ) { - // $( "div.historyItemBody" ).each( function() { - // if ( !$(this).is(":visible") ) { $(this).find( "pre.peek" ).css( "overflow", "hidden" ); } - // }); - //} - }, - - _render_body : function(){ - //this.log( this + '_render_body' ); - //this.log( 'state:', state, 'for_editing', for_editing ); - - //TODO: incorrect id (encoded - use hid?) - var body = $( '<div/>' ) - .attr( 'id', 'info-' + this.model.get( 'id' ) ) - .addClass( 'historyItemBody' ) - .attr( 'style', 'display: block' ); - - //TODO: not a fan of this dispatch - switch( this.model.get( 'state' ) ){ - case HistoryDatasetAssociation.STATES.NOT_VIEWABLE : - this._render_body_not_viewable( body ); - break; - case HistoryDatasetAssociation.STATES.UPLOAD : - this._render_body_uploading( body ); - break; - case HistoryDatasetAssociation.STATES.QUEUED : - this._render_body_queued( body ); - break; - case HistoryDatasetAssociation.STATES.RUNNING : - this._render_body_running( body ); - break; - case HistoryDatasetAssociation.STATES.ERROR : - this._render_body_error( body ); - break; - case HistoryDatasetAssociation.STATES.DISCARDED : - this._render_body_discarded( body ); - break; - case HistoryDatasetAssociation.STATES.SETTING_METADATA : - this._render_body_setting_metadata( body ); - break; - case HistoryDatasetAssociation.STATES.EMPTY : - this._render_body_empty( body ); - break; - case HistoryDatasetAssociation.STATES.FAILED_METADATA : - this._render_body_failed_metadata( body ); - break; - case HistoryDatasetAssociation.STATES.OK : - this._render_body_ok( body ); - break; - default: - //??: no body? - body.append( $( '<div>Error: unknown dataset state "' + state + '".</div>' ) ); - } - body.append( '<div style="clear: both"></div>' ); - - if( this.expanded ){ - body.show(); - } else { - body.hide(); - } - return body; }, // ................................................................................ EVENTS @@ -761,25 +411,6 @@ return false; }, - // expand/collapse body - // event: body-visible, body-hidden - toggleBodyVisibility : function( event, expanded ){ - var hdaView = this, - $body = this.$el.find( '.historyItemBody' ); - expanded = ( expanded === undefined )?( !$body.is( ':visible' ) ):( expanded ); - //this.log( 'toggleBodyVisibility, expanded:', expanded, '$body:', $body ); - - if( expanded ){ - $body.slideDown( 'fast', function(){ - hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) ); - }); - } else { - $body.slideUp( 'fast', function(){ - hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) ); - }); - } - }, - // ................................................................................ UTILTIY toString : function(){ var modelString = ( this.model )?( this.model + '' ):( '(no model)' ); @@ -788,17 +419,9 @@ }); //------------------------------------------------------------------------------ -HDAView.templates = { - warningMsg : Handlebars.templates[ 'template-warningmessagesmall' ], - - messages : Handlebars.templates[ 'template-history-warning-messages' ], - titleLink : Handlebars.templates[ 'template-history-titleLink' ], - hdaSummary : Handlebars.templates[ 'template-history-hdaSummary' ], - downloadLinks : Handlebars.templates[ 'template-history-downloadLinks' ], - failedMetadata : Handlebars.templates[ 'template-history-failedMetaData' ], - tagArea : Handlebars.templates[ 'template-history-tagArea' ], - annotationArea : Handlebars.templates[ 'template-history-annotationArea' ], - displayApps : Handlebars.templates[ 'template-history-displayApps' ] +HDAEditView.templates = { + tagArea : Handlebars.templates[ 'template-hda-tagArea' ], + annotationArea : Handlebars.templates[ 'template-hda-annotationArea' ] }; //============================================================================== diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/dataset/hda-model.js --- a/static/scripts/mvc/dataset/hda-model.js +++ b/static/scripts/mvc/dataset/hda-model.js @@ -43,10 +43,7 @@ // aka. !hidden visible : false, // based on trans.user (is_admin or security_agent.can_access_dataset( <user_roles>, hda.dataset )) - accessible : false, - - //TODO: this needs to be removed (it is a function of the view type (e.g. HDAForEditingView)) - for_editing : true + accessible : false }, // fetch location of this history in the api diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -5,26 +5,26 @@ Backbone.js implementation of history panel TODO: + refactoring on for_editing: + uhoh: purge link in warning message in history_common.mako conditional on trans.app.config.allow_user_dataset_purge + bug: rerun still doesn't take encoded ids + anon user, mako template init: - bug: rename url seems to be wrong url BUG: shouldn't have tag/anno buttons (on hdas) Check for user in hdaView somehow logged in, mako template: - BUG: quotaMsg not showing when 100% (on load) bug: rename not being changed locally - render() shows old name, refresh: new name + TODO: editable text to MV, might also just use REST.update on history BUG: meter is not updating RELIABLY on change:nice_size BUG: am able to start upload even if over quota - 'runs' forever bug: quotaMeter bar rendering square in chrome - BUG: imported, shared history with unaccessible dataset errs in historycontents when getting history - (entire history is inaccessible) - ??: still happening? from loadFromApi: + + fixed: BUG: not loading deleted datasets FIXED: history_contents, show: state_ids returns all ids now (incl. deleted) - - fixed: BUG: upload, history size, doesn't change FIXED: using change:nice_size to trigger re-render of history size BUG: delete uploading hda - now in state 'discarded'! ...new state to handle @@ -112,6 +112,8 @@ // direct attachment to existing element el : 'body.historyPage', + //HDAView : HDABaseView, + HDAView : HDAEditView, // init with the model, urlTemplates, set up storage, bind HDACollection events //NOTE: this will create or load PersistantStorage keyed under 'HistoryView.<id>' @@ -122,9 +124,9 @@ // set up url templates //TODO: prob. better to put this in class scope (as the handlebars templates), but... // they're added to GalaxyPaths on page load (after this file is loaded) - if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); } - if( !attributes.urlTemplates.history ){ throw( 'HDAView needs urlTemplates.history on initialize' ); } - if( !attributes.urlTemplates.hda ){ throw( 'HDAView needs urlTemplates.hda on initialize' ); } + if( !attributes.urlTemplates ){ throw( this + ' needs urlTemplates on initialize' ); } + if( !attributes.urlTemplates.history ){ throw( this + ' needs urlTemplates.history on initialize' ); } + if( !attributes.urlTemplates.hda ){ throw( this + ' needs urlTemplates.hda on initialize' ); } this.urlTemplates = attributes.urlTemplates.history; this.hdaUrlTemplates = attributes.urlTemplates.hda; @@ -283,7 +285,7 @@ var hdaId = hda.get( 'id' ), expanded = historyView.storage.get( 'expandedHdas' ).get( hdaId ); - historyView.hdaViews[ hdaId ] = new HDAView({ + historyView.hdaViews[ hdaId ] = new historyView.HDAView({ model : hda, expanded : expanded, urlTemplates : historyView.hdaUrlTemplates @@ -301,12 +303,11 @@ setUpHdaListeners : function( hdaView ){ var historyView = this; // use storage to maintain a list of hdas whose bodies are expanded - hdaView.bind( 'toggleBodyVisibility', function( id, visible ){ - if( visible ){ - historyView.storage.get( 'expandedHdas' ).set( id, true ); - } else { - historyView.storage.get( 'expandedHdas' ).deleteKey( id ); - } + hdaView.bind( 'body-visible', function( id ){ + historyView.storage.get( 'expandedHdas' ).set( id, true ); + }); + hdaView.bind( 'body-hidden', function( id ){ + historyView.storage.get( 'expandedHdas' ).deleteKey( id ); }); }, diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/mvc/dataset/hda-base.js --- /dev/null +++ b/static/scripts/packed/mvc/dataset/hda-base.js @@ -0,0 +1,1 @@ +var HDABaseView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-visible",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-hidden",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetaData"],displayApps:Handlebars.templates["template-hda-displayApps"]}; \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df 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 @@ -var HDAView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this.renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b.renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b.renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this._clearReferences();this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_clearReferences:function(){this.displayButton=null;this.editButton=null;this.deleteButton=null;this.errButton=null;this.showParamsButton=null;this.rerunButton=null;this.visualizationsButton=null;this.tagButton=null;this.annotateButton=null},_render_warnings:function(){return $(jQuery.trim(HDAView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={icon_class:"display"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}if(this.model.get("for_editing")){a.target="galaxy_main"}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))||(!this.model.get("for_editing"))){return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((!this.model.get("for_editing"))||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){return null}var a={title:_l("Delete"),href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDAView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDAView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var b=$("<div/>").attr("id","primary-actions-"+this.model.get("id")),a=this;_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")){return null}var a=HDAView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_errButton:function(){if((this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR)||(!this.model.get("for_editing"))){return null}this.errButton=new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_rerunButton:function(){if(!this.model.get("for_editing")){return null}this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(this.model.get("for_editing"))||!(a&&a.length)||!(f)){return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.tags.get)){return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||!(this.model.get("for_editing"))||(!this.urls.annotation.get)){return null}this.annotateButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDAView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton]))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons([this._render_showParamsButton,this._render_rerunButton]))},_render_body_failed_metadata:function(a){a.append($(HDAView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_errButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-visible",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-hidden",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-history-warning-messages"],titleLink:Handlebars.templates["template-history-titleLink"],hdaSummary:Handlebars.templates["template-history-hdaSummary"],downloadLinks:Handlebars.templates["template-history-downloadLinks"],failedMetadata:Handlebars.templates["template-history-failedMetaData"],tagArea:Handlebars.templates["template-history-tagArea"],annotationArea:Handlebars.templates["template-history-annotationArea"],displayApps:Handlebars.templates["template-history-displayApps"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}}; \ No newline at end of file +var HDAEditView=HDABaseView.extend({initialize:function(a){HDABaseView.prototype.initialize.call(this,a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton,this._render_rerunButton]},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());a.append(this._render_editButton());a.append(this._render_deleteButton());return a},_render_editButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.UPLOAD)||(this.model.get("state")===HistoryDatasetAssociation.STATES.ERROR)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.editButton=null;return null}var c=this.model.get("purged"),a=this.model.get("deleted"),b={title:_l("Edit Attributes"),href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title=_l("Cannot edit attributes of datasets removed from disk")}else{if(a){b.title=_l("Undelete dataset to edit attributes")}}}this.editButton=new IconButtonView({model:new IconButton(b)});return this.editButton.render().$el},_render_deleteButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.deleteButton=null;return null}var a={title:_l("Delete"),href:this.urls["delete"],id:"historyItemDeleter-"+this.model.get("id"),icon_class:"delete"};if(this.model.get("deleted")||this.model.get("purged")){a={title:_l("Dataset is already deleted"),icon_class:"delete",enabled:false}}this.deleteButton=new IconButtonView({model:new IconButton(a)});return this.deleteButton.render().$el},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});if(this.model.get("metadata_dbkey")==="?"&&!this.model.isDeletedOrPurged()){_.extend(a,{dbkey_unknown_and_editable:true})}return HDABaseView.templates.hdaSummary(a)},_render_errButton:function(){if(this.model.get("state")!==HistoryDatasetAssociation.STATES.ERROR){this.errButton=null;return null}this.errButton=new IconButtonView({model:new IconButton({title:_l("View or report this error"),href:this.urls.report_error,target:"galaxy_main",icon_class:"bug"})});return this.errButton.render().$el},_render_rerunButton:function(){this.rerunButton=new IconButtonView({model:new IconButton({title:_l("Run this job again"),href:this.urls.rerun,target:"galaxy_main",icon_class:"arrow-circle"})});return this.rerunButton.render().$el},_render_visualizationsButton:function(){var c=this.model.get("dbkey"),a=this.model.get("visualizations"),f=this.urls.visualization,d={},g={dataset_id:this.model.get("id"),hda_ldda:"hda"};if(!(this.model.hasData())||!(a&&a.length)||!(f)){this.visualizationsButton=null;return null}this.visualizationsButton=new IconButtonView({model:new IconButton({title:_l("Visualize"),href:f,icon_class:"chart_curve"})});var b=this.visualizationsButton.render().$el;b.addClass("visualize-icon");if(c){g.dbkey=c}function e(h){switch(h){case"trackster":return create_trackster_action_fn(f,g,c);case"scatterplot":return create_scatterplot_action_fn(f,g);default:return function(){window.parent.location=f+"/"+h+"?"+$.param(g)}}}if(a.length===1){b.attr("title",a[0]);b.click(e(a[0]))}else{_.each(a,function(i){var h=i.charAt(0).toUpperCase()+i.slice(1);d[_l(h)]=e(i)});make_popupmenu(b,d)}return b},_render_secondaryActionButtons:function(b){var c=$("<div/>"),a=this;c.attr("style","float: right;").attr("id","secondary-actions-"+this.model.get("id"));_.each(b,function(d){c.append(d.call(a))});return c},_render_tagButton:function(){if(!(this.model.hasData())||(!this.urls.tags.get)){this.tagButton=null;return null}this.tagButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset tags"),target:"galaxy_main",href:this.urls.tags.get,icon_class:"tags"})});return this.tagButton.render().$el},_render_annotateButton:function(){if(!(this.model.hasData())||(!this.urls.annotation.get)){this.annotateButton=null;return null}this.annotateButton=new IconButtonView({model:new IconButton({title:_l("Edit dataset annotation"),target:"galaxy_main",icon_class:"annotate"})});return this.annotateButton.render().$el},_render_tagArea:function(){if(!this.urls.tags.set){return null}return $(HDAEditView.templates.tagArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_annotationArea:function(){if(!this.urls.annotation.get){return null}return $(HDAEditView.templates.annotationArea(_.extend(this.model.toJSON(),{urls:this.urls})))},_render_body_error:function(a){HDABaseView.prototype._render_body_error.call(this,a);var b=a.find("#primary-actions-"+this.model.get("id"));b.prepend(this._render_errButton())},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton,this._render_rerunButton,this._render_visualizationsButton]));a.append(this._render_secondaryActionButtons([this._render_tagButton,this._render_annotateButton]));a.append('<div class="clear"/>');a.append(this._render_tagArea());a.append(this._render_annotationArea());a.append(this._render_displayApps());a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility","click a.icon-button.tags":"loadAndDisplayTags","click a.icon-button.annotate":"loadAndDisplayAnnotation"},loadAndDisplayTags:function(b){this.log(this+".loadAndDisplayTags",b);var c=this.$el.find(".tag-area"),a=c.find(".tag-elt");if(c.is(":hidden")){if(!jQuery.trim(a.html())){$.ajax({url:this.urls.tags.get,error:function(){alert(_l("Tagging failed"))},success:function(d){a.html(d);a.find(".tooltip").tooltip();c.slideDown("fast")}})}else{c.slideDown("fast")}}else{c.slideUp("fast")}return false},loadAndDisplayAnnotation:function(b){this.log(this+".loadAndDisplayAnnotation",b);var d=this.$el.find(".annotation-area"),c=d.find(".annotation-elt"),a=this.urls.annotation.set;if(d.is(":hidden")){if(!jQuery.trim(c.html())){$.ajax({url:this.urls.annotation.get,error:function(){alert(_l("Annotations failed"))},success:function(e){if(e===""){e="<em>"+_l("Describe or add notes to dataset")+"</em>"}c.html(e);d.find(".tooltip").tooltip();async_save_text(c.attr("id"),c.attr("id"),a,"new_annotation",18,true,4);d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDAView("+a+")"}});HDAEditView.templates={tagArea:Handlebars.templates["template-hda-tagArea"],annotationArea:Handlebars.templates["template-hda-annotationArea"]};function create_scatterplot_action_fn(a,b){action=function(){var d=$(window.parent.document).find("iframe#galaxy_main"),c=a+"/scatterplot?"+$.param(b);d.attr("src",c);$("div.popmenu-wrapper").remove();return false};return action}function create_trackster_action_fn(a,c,b){return function(){var d={};if(b){d.dbkey=b}$.ajax({url:a+"/list_tracks?f-"+$.param(d),dataType:"html",error:function(){alert(_l("Could not add this dataset to browser")+".")},success:function(e){var f=window.parent;f.show_modal(_l("View Data in a New or Saved Visualization"),"",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal(_l("Add Data to Saved Visualization"),e,{Cancel:function(){f.hide_modal()},"Add to visualization":function(){$(f.document).find("input[name=id]:checked").each(function(){var g=$(this).val();c.id=g;f.location=a+"/trackster?"+$.param(c)})}})},"View in new visualization":function(){f.location=a+"/trackster?"+$.param(c)}})}});return false}}; \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df 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 @@ -var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false,for_editing:true},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}}); \ No newline at end of file +var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false},url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.NEW)||(a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",OK:"ok",EMPTY:"empty",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return}var b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}}); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df 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 @@ -var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw ("HDAView needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw ("HDAView needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("toggleBodyVisibility",function(d,c){if(c){a.storage.get("expandedHdas").set(d,true)}else{a.storage.get("expandedHdas").deleteKey(d)}})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]}; \ No newline at end of file +var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,initialize:function(a){this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log("this.storage:",this.storage.get());this.log("show_deleted:",a.show_deleted,"show_hidden",a.show_hidden);if((a.show_deleted===true)||(a.show_deleted===false)){this.storage.set("show_deleted",a.show_deleted)}if((a.show_hidden===true)||(a.show_hidden===false)){this.storage.set("show_hidden",a.show_hidden)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log("this.show_deleted:",this.show_deleted,"show_hidden",this.show_hidden);this.log("(now) this.storage:",this.storage.get());this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("all",this.all,this);this.hdaViews={};this.urls={}},add:function(a){},addAll:function(){this.render()},all:function(a){},renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this.renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});this.setUpActionButton(c.find("#history-action-popup"));if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b.setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},setUpActionButton:function(e){var c=this,d=(this.storage.get("show_deleted"))?("Hide deleted"):("Show deleted"),a=(this.storage.get("show_hidden"))?("Hide hidden"):("Show hidden"),b={};b[_l("refresh")]=function(){window.location.reload()};b[_l("collapse all")]=function(){c.hideAllHdaBodies()};b[_l(d)]=function(){c.toggleShowDeleted()};b[_l(a)]=function(){c.toggleShowHidden()};make_popupmenu(e,b)},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates});a.setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},setUpHdaListeners:function(b){var a=this;b.bind("body-visible",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-hidden",function(c){a.storage.get("expandedHdas").deleteKey(c)})},setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},events:{"click #history-tag":"loadAndDisplayTags"},showQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(b.is(":hidden")){b.slideDown("fast")}},hideQuotaMessage:function(a){var b=this.$el.find("#quota-message-container");if(!b.is(":hidden")){b.slideUp("fast")}},toggleShowDeleted:function(a,c,b){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},hideAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryView("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]}; \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-annotationArea.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-annotationArea.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-annotationArea"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this,o=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}j+='\n<div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}if(d||d===0){j+=d}j+=':</strong>\n <div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}if(d||d===0){j+=d}j+='">\n </div>\n</div>';return j})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-displayApps.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-displayApps.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-displayApps"]=b(function(h,m,g,l,k){g=g||h.helpers;var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(t,s){var q="",r,p;q+="\n ";p=g.label;if(p){r=p.call(t,{hash:{}})}else{r=t.label;r=typeof r===i?r():r}q+=j(r)+"\n ";r=t.links;r=g.each.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,e,s)});if(r||r===0){q+=r}q+="\n <br />\n";return q}function e(t,s){var q="",r,p;q+='\n <a target="';p=g.target;if(p){r=p.call(t,{hash:{}})}else{r=t.target;r=typeof r===i?r():r}q+=j(r)+'" href="';p=g.href;if(p){r=p.call(t,{hash:{}})}else{r=t.href;r=typeof r===i?r():r}q+=j(r)+'">';p=g.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}else{r=t.local;r=typeof r===i?r():r}if(!g.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}if(r||r===0){q+=r}q+="</a>\n ";return q}function c(s,r){var q,p;p=g.text;if(p){q=p.call(s,{hash:{}})}else{q=s.text;q=typeof q===i?q():q}return j(q)}d=m.displayApps;d=g.each.call(m,d,{hash:{},inverse:o.noop,fn:o.program(1,f,k)});if(d||d===0){return d}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-downloadLinks.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-downloadLinks.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-downloadLinks"]=b(function(g,q,p,k,t){p=p||g.helpers;var h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w,u;v+="\n";v+='\n<div popupmenu="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a class="action-button" href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}if(w||w===0){v+=w}v+="</a>\n <a>";u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}if(w||w===0){v+=w}v+="</a>\n ";w=y.urls;w=w==null||w===false?w:w.meta_download;w=p.each.call(y,w,{hash:{},inverse:o.noop,fn:o.program(6,j,x)});if(w||w===0){v+=w}v+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n</div>\n';return v}function m(v,u){return"Download Dataset"}function l(v,u){return"Additional Files"}function j(y,x){var v="",w,u;v+='\n <a class="action-button" href="';u=p.url;if(u){w=u.call(y,{hash:{}})}else{w=y.url;w=typeof w===e?w():w}v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}if(w||w===0){v+=w}v+=" ";u=p.file_type;if(u){w=u.call(y,{hash:{}})}else{w=y.file_type;w=typeof w===e?w():w}v+=d(w)+"</a>\n ";return v}function i(v,u){return"Download"}function f(v,u){return"Download"}function s(y,x){var v="",w,u;v+="\n";v+='\n<a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n';return v}function r(v,u){return"Download"}h=q.urls;h=h==null||h===false?h:h.meta_download;h=p["if"].call(q,h,{hash:{},inverse:o.program(11,s,t),fn:o.program(1,n,t)});if(h||h===0){return h}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-failedMetaData.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-failedMetaData.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-failedMetaData"]=b(function(g,m,f,l,k){f=f||g.helpers;var c,i,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var q="",r,p;q+="\n";p=f.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}else{r=t.local;r=typeof r===h?r():r}if(!f.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}if(r||r===0){q+=r}q+='\nYou may be able to <a href="';r=t.urls;r=r==null||r===false?r:r.edit;r=typeof r===h?r():r;q+=j(r)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return q}function d(q,p){return"An error occurred setting the metadata for this dataset."}i=f.warningmessagesmall;if(i){c=i.call(m,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}else{c=m.warningmessagesmall;c=typeof c===h?c():c}if(!f.warningmessagesmall){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}if(c||c===0){return c}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-hdaSummary.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this;function e(u,t){var r="",s,q;r+='\n <a class="metadata-dbkey" href="';s=u.urls;s=s==null||s===false?s:s.edit;s=typeof s===h?s():s;r+=k(s)+'" target="galaxy_main">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</a>\n ";return r}function c(u,t){var r="",s,q;r+='\n <span class="metadata-dbkey ';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+'">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</span>\n ";return r}function o(u,t){var r="",s,q;r+='\n<div class="hda-info"> ';q=f.misc_info;if(q){s=q.call(u,{hash:{}})}else{s=u.misc_info;s=typeof s===h?s():s}r+=k(s)+" </div>\n";return r}j+='<div class="hda-summary">\n ';i=f.misc_blurb;if(i){d=i.call(n,{hash:{}})}else{d=n.misc_blurb;d=typeof d===h?d():d}j+=k(d)+'<br />\n format: <span class="';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+'">';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+"</span>,\n database:\n ";d=n.dbkey_unknown_and_editable;d=f["if"].call(n,d,{hash:{},inverse:p.program(3,c,l),fn:p.program(1,e,l)});if(d||d===0){j+=d}j+="\n</div>\n";d=n.misc_info;d=f["if"].call(n,d,{hash:{},inverse:p.noop,fn:p.program(5,o,l)});if(d||d===0){j+=d}return j})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-tagArea.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-tagArea.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-tagArea"]=b(function(f,l,e,k,j){e=e||f.helpers;var i="",c,h,n=this,g="function",m=e.blockHelperMissing;function d(p,o){return"Tags"}i+='\n<div class="tag-area" style="display: none;">\n <strong>';h=e.local;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.local;c=typeof c===g?c():c}if(!e.local){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){i+=c}i+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return i})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-titleLink.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-titleLink.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-titleLink"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<span class="historyItemTitle">';g=d.hid;if(g){c=g.call(l,{hash:{}})}else{c=l.hid;c=typeof c===f?c():c}h+=i(c)+": ";g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+"</span>";return h})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-hda-warning-messages.js --- /dev/null +++ b/static/scripts/packed/templates/compiled/template-hda-warning-messages.js @@ -0,0 +1,1 @@ +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-warning-messages"]=b(function(g,s,q,k,z){q=q||g.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=C.purged;A=q.unless.call(C,A,{hash:{},inverse:p.noop,fn:p.program(2,n,B)});if(A||A===0){return A}else{return""}}function n(E,D){var B="",C,A;B+="\n";A=q.warningmessagesmall;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}else{C=E.warningmessagesmall;C=typeof C===e?C():C}if(!q.warningmessagesmall){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}if(C||C===0){B+=C}B+="\n";return B}function m(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.undelete;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(6,j,D)});if(C||C===0){B+=C}B+="\n";return B}function l(B,A){return"This dataset has been deleted."}function j(E,D){var B="",C,A;B+="\n ";B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.undelete;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUndelete" id="historyItemUndeleter-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to undelete it\n ';C=E.urls;C=C==null||C===false?C:C.purge;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(7,i,D)});if(C||C===0){B+=C}B+="\n ";return B}function i(E,D){var B="",C,A;B+='\n or <a href="';C=E.urls;C=C==null||C===false?C:C.purge;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemPurge" id="historyItemPurger-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return B}function f(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}if(B||B===0){return B}else{return""}}function y(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}if(C||C===0){B+=C}B+="\n";return B}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}if(B||B===0){return B}else{return""}}function v(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.unhide;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(17,t,D)});if(C||C===0){B+=C}B+="\n";return B}function u(B,A){return"This dataset has been hidden."}function t(E,D){var B="",C,A;B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.unhide;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUnhide" id="historyItemUnhider-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to unhide it\n ';return B}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,z)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(9,f,z)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(13,w,z)});if(h||h===0){r+=h}return r})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-annotationArea.js --- a/static/scripts/packed/templates/compiled/template-history-annotationArea.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-annotationArea"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this,o=f.blockHelperMissing;function e(r,q){return"Annotation"}function c(r,q){return"Edit dataset annotation"}j+='\n<div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(1,e,l)})}if(d||d===0){j+=d}j+=':</strong>\n <div id="';i=f.id;if(i){d=i.call(n,{hash:{}})}else{d=n.id;d=typeof d===h?d():d}j+=k(d)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="';i=f.local;if(i){d=i.call(n,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}else{d=n.local;d=typeof d===h?d():d}if(!f.local){d=o.call(n,d,{hash:{},inverse:p.noop,fn:p.program(3,c,l)})}if(d||d===0){j+=d}j+='">\n </div>\n</div>';return j})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-displayApps.js --- a/static/scripts/packed/templates/compiled/template-history-displayApps.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-displayApps"]=b(function(h,m,g,l,k){g=g||h.helpers;var d,i="function",j=this.escapeExpression,o=this,n=g.blockHelperMissing;function f(t,s){var q="",r,p;q+="\n ";p=g.label;if(p){r=p.call(t,{hash:{}})}else{r=t.label;r=typeof r===i?r():r}q+=j(r)+"\n ";r=t.links;r=g.each.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,e,s)});if(r||r===0){q+=r}q+="\n <br />\n";return q}function e(t,s){var q="",r,p;q+='\n <a target="';p=g.target;if(p){r=p.call(t,{hash:{}})}else{r=t.target;r=typeof r===i?r():r}q+=j(r)+'" href="';p=g.href;if(p){r=p.call(t,{hash:{}})}else{r=t.href;r=typeof r===i?r():r}q+=j(r)+'">';p=g.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}else{r=t.local;r=typeof r===i?r():r}if(!g.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(3,c,s)})}if(r||r===0){q+=r}q+="</a>\n ";return q}function c(s,r){var q,p;p=g.text;if(p){q=p.call(s,{hash:{}})}else{q=s.text;q=typeof q===i?q():q}return j(q)}d=m.displayApps;d=g.each.call(m,d,{hash:{},inverse:o.noop,fn:o.program(1,f,k)});if(d||d===0){return d}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-downloadLinks.js --- a/static/scripts/packed/templates/compiled/template-history-downloadLinks.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-downloadLinks"]=b(function(g,q,p,k,t){p=p||g.helpers;var h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(y,x){var v="",w,u;v+="\n";v+='\n<div popupmenu="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a class="action-button" href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(2,m,x)})}if(w||w===0){v+=w}v+="</a>\n <a>";u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(4,l,x)})}if(w||w===0){v+=w}v+="</a>\n ";w=y.urls;w=w==null||w===false?w:w.meta_download;w=p.each.call(y,w,{hash:{},inverse:o.noop,fn:o.program(6,j,x)});if(w||w===0){v+=w}v+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';u=p.id;if(u){w=u.call(y,{hash:{}})}else{w=y.id;w=typeof w===e?w():w}v+=d(w)+'-popup">\n <a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(9,f,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n</div>\n';return v}function m(v,u){return"Download Dataset"}function l(v,u){return"Additional Files"}function j(y,x){var v="",w,u;v+='\n <a class="action-button" href="';u=p.url;if(u){w=u.call(y,{hash:{}})}else{w=y.url;w=typeof w===e?w():w}v+=d(w)+'">';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(7,i,x)})}if(w||w===0){v+=w}v+=" ";u=p.file_type;if(u){w=u.call(y,{hash:{}})}else{w=y.file_type;w=typeof w===e?w():w}v+=d(w)+"</a>\n ";return v}function i(v,u){return"Download"}function f(v,u){return"Download"}function s(y,x){var v="",w,u;v+="\n";v+='\n<a href="';w=y.urls;w=w==null||w===false?w:w.download;w=typeof w===e?w():w;v+=d(w)+'" title="';u=p.local;if(u){w=u.call(y,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}else{w=y.local;w=typeof w===e?w():w}if(!p.local){w=c.call(y,w,{hash:{},inverse:o.noop,fn:o.program(12,r,x)})}if(w||w===0){v+=w}v+='" class="icon-button disk tooltip"></a>\n';return v}function r(v,u){return"Download"}h=q.urls;h=h==null||h===false?h:h.meta_download;h=p["if"].call(q,h,{hash:{},inverse:o.program(11,s,t),fn:o.program(1,n,t)});if(h||h===0){return h}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-failedMetaData.js --- a/static/scripts/packed/templates/compiled/template-history-failedMetaData.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-failedMetaData"]=b(function(g,m,f,l,k){f=f||g.helpers;var c,i,o=this,h="function",n=f.blockHelperMissing,j=this.escapeExpression;function e(t,s){var q="",r,p;q+="\n";p=f.local;if(p){r=p.call(t,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}else{r=t.local;r=typeof r===h?r():r}if(!f.local){r=n.call(t,r,{hash:{},inverse:o.noop,fn:o.program(2,d,s)})}if(r||r===0){q+=r}q+='\nYou may be able to <a href="';r=t.urls;r=r==null||r===false?r:r.edit;r=typeof r===h?r():r;q+=j(r)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return q}function d(q,p){return"An error occurred setting the metadata for this dataset."}i=f.warningmessagesmall;if(i){c=i.call(m,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}else{c=m.warningmessagesmall;c=typeof c===h?c():c}if(!f.warningmessagesmall){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,e,k)})}if(c||c===0){return c}else{return""}})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-hdaSummary.js --- a/static/scripts/packed/templates/compiled/template-history-hdaSummary.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-hdaSummary"]=b(function(g,n,f,m,l){f=f||g.helpers;var j="",d,i,h="function",k=this.escapeExpression,p=this;function e(u,t){var r="",s,q;r+='\n <a href="';s=u.urls;s=s==null||s===false?s:s.edit;s=typeof s===h?s():s;r+=k(s)+'" target="galaxy_main">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</a>\n ";return r}function c(u,t){var r="",s,q;r+='\n <span class="';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+'">';q=f.metadata_dbkey;if(q){s=q.call(u,{hash:{}})}else{s=u.metadata_dbkey;s=typeof s===h?s():s}r+=k(s)+"</span>\n ";return r}function o(u,t){var r="",s,q;r+='\n<div class="hda-info">';q=f.misc_info;if(q){s=q.call(u,{hash:{}})}else{s=u.misc_info;s=typeof s===h?s():s}r+=k(s)+"</div>\n";return r}j+='<div class="hda-summary">\n ';i=f.misc_blurb;if(i){d=i.call(n,{hash:{}})}else{d=n.misc_blurb;d=typeof d===h?d():d}j+=k(d)+'<br />\n format: <span class="';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+'">';i=f.data_type;if(i){d=i.call(n,{hash:{}})}else{d=n.data_type;d=typeof d===h?d():d}j+=k(d)+"</span>,\n database:\n ";d=n.dbkey_unknown_and_editable;d=f["if"].call(n,d,{hash:{},inverse:p.program(3,c,l),fn:p.program(1,e,l)});if(d||d===0){j+=d}j+="\n</div>\n";d=n.misc_info;d=f["if"].call(n,d,{hash:{},inverse:p.noop,fn:p.program(5,o,l)});if(d||d===0){j+=d}return j})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-tagArea.js --- a/static/scripts/packed/templates/compiled/template-history-tagArea.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-tagArea"]=b(function(f,l,e,k,j){e=e||f.helpers;var i="",c,h,n=this,g="function",m=e.blockHelperMissing;function d(p,o){return"Tags"}i+='\n<div class="tag-area" style="display: none;">\n <strong>';h=e.local;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.local;c=typeof c===g?c():c}if(!e.local){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){i+=c}i+=':</strong>\n <div class="tag-elt">\n </div>\n</div>';return i})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-titleLink.js --- a/static/scripts/packed/templates/compiled/template-history-titleLink.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-titleLink"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<a href="javascript:void(0);"><span class="historyItemTitle">';g=d.hid;if(g){c=g.call(l,{hash:{}})}else{c=l.hid;c=typeof c===f?c():c}h+=i(c)+": ";g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+"</span></a>";return h})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/packed/templates/compiled/template-history-warning-messages.js --- a/static/scripts/packed/templates/compiled/template-history-warning-messages.js +++ /dev/null @@ -1,1 +0,0 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-warning-messages"]=b(function(g,s,q,k,z){q=q||g.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var A;A=C.purged;A=q.unless.call(C,A,{hash:{},inverse:p.noop,fn:p.program(2,n,B)});if(A||A===0){return A}else{return""}}function n(E,D){var B="",C,A;B+="\n";A=q.warningmessagesmall;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}else{C=E.warningmessagesmall;C=typeof C===e?C():C}if(!q.warningmessagesmall){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(3,m,D)})}if(C||C===0){B+=C}B+="\n";return B}function m(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(4,l,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.undelete;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(6,j,D)});if(C||C===0){B+=C}B+="\n";return B}function l(B,A){return"This dataset has been deleted."}function j(E,D){var B="",C,A;B+="\n ";B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.undelete;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUndelete" id="historyItemUndeleter-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to undelete it\n ';C=E.urls;C=C==null||C===false?C:C.purge;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(7,i,D)});if(C||C===0){B+=C}B+="\n ";return B}function i(E,D){var B="",C,A;B+='\n or <a href="';C=E.urls;C=C==null||C===false?C:C.purge;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemPurge" id="historyItemPurger-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return B}function f(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(10,y,C)})}if(B||B===0){return B}else{return""}}function y(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(11,x,D)})}if(C||C===0){B+=C}B+="\n";return B}function x(B,A){return"This dataset has been deleted and removed from disk."}function w(D,C){var B,A;A=q.warningmessagesmall;if(A){B=A.call(D,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}else{B=D.warningmessagesmall;B=typeof B===e?B():B}if(!q.warningmessagesmall){B=c.call(D,B,{hash:{},inverse:p.noop,fn:p.program(14,v,C)})}if(B||B===0){return B}else{return""}}function v(E,D){var B="",C,A;B+="\n ";A=q.local;if(A){C=A.call(E,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(15,u,D)})}if(C||C===0){B+=C}B+="\n ";C=E.urls;C=C==null||C===false?C:C.unhide;C=q["if"].call(E,C,{hash:{},inverse:p.noop,fn:p.program(17,t,D)});if(C||C===0){B+=C}B+="\n";return B}function u(B,A){return"This dataset has been hidden."}function t(E,D){var B="",C,A;B+='\n Click <a href="';C=E.urls;C=C==null||C===false?C:C.unhide;C=typeof C===e?C():C;B+=d(C)+'" class="historyItemUnhide" id="historyItemUnhider-';A=q.id;if(A){C=A.call(E,{hash:{}})}else{C=E.id;C=typeof C===e?C():C}B+=d(C)+'"\n target="galaxy_history">here</a> to unhide it\n ';return B}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,z)});if(h||h===0){r+=h}r+="\n\n";h=s.purged;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(9,f,z)});if(h||h===0){r+=h}r+="\n\n";h=s.visible;h=q.unless.call(s,h,{hash:{},inverse:p.noop,fn:p.program(13,w,z)});if(h||h===0){r+=h}return r})})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compile_templates.py --- a/static/scripts/templates/compile_templates.py +++ b/static/scripts/templates/compile_templates.py @@ -210,9 +210,11 @@ # delete multi template intermediate files print "\nCleaning up intermediate multi-template template files:" for filename in multi_template_template_filenames: - print 'removing', filename - os.remove( filename ) - + try: + print 'removing', filename + os.remove( filename ) + except Exception, exc: + print exc # ------------------------------------------------------------------------------ if __name__ == '__main__': diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-annotationArea.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-annotationArea.js @@ -0,0 +1,39 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + + return "Annotation";} + +function program3(depth0,data) { + + + return "Edit dataset annotation";} + + buffer += "\n<div id=\""; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ":</strong>\n <div id=\""; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\">\n </div>\n</div>"; + return buffer;}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-displayApps.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-displayApps.js @@ -0,0 +1,51 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n "; + foundHelper = helpers.label; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\n "; + stack1 = depth0.links; + stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n <br />\n"; + return buffer;} +function program2(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n <a target=\""; + foundHelper = helpers.target; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\" href=\""; + foundHelper = helpers.href; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\">"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</a>\n "; + return buffer;} +function program3(depth0,data) { + + var stack1, foundHelper; + foundHelper = helpers.text; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + return escapeExpression(stack1);} + + stack1 = depth0.displayApps; + stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-downloadLinks.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-downloadLinks.js @@ -0,0 +1,117 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n"; + buffer += "\n<div popupmenu=\"dataset-"; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "-popup\">\n <a class=\"action-button\" href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\">"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</a>\n <a>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</a>\n "; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download; + stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-"; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "-popup\">\n <a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n"; + return buffer;} +function program2(depth0,data) { + + + return "Download Dataset";} + +function program4(depth0,data) { + + + return "Additional Files";} + +function program6(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n <a class=\"action-button\" href=\""; + foundHelper = helpers.url; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\">"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += " "; + foundHelper = helpers.file_type; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "</a>\n "; + return buffer;} +function program7(depth0,data) { + + + return "Download";} + +function program9(depth0,data) { + + + return "Download";} + +function program11(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n"; + buffer += "\n<a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\" class=\"icon-button disk tooltip\"></a>\n"; + return buffer;} +function program12(depth0,data) { + + + return "Download";} + + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(11, program11, data),fn:self.program(1, program1, data)}); + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-failedMetaData.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-failedMetaData.js @@ -0,0 +1,33 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; + +function program1(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\nYou may be able to <a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n"; + return buffer;} +function program2(depth0,data) { + + + return "An error occurred setting the metadata for this dataset.";} + + foundHelper = helpers.warningmessagesmall; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-hdaSummary.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-hdaSummary.js @@ -0,0 +1,66 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this; + +function program1(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n <a class=\"metadata-dbkey\" href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">"; + foundHelper = helpers.metadata_dbkey; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "</a>\n "; + return buffer;} + +function program3(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n <span class=\"metadata-dbkey "; + foundHelper = helpers.metadata_dbkey; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\">"; + foundHelper = helpers.metadata_dbkey; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "</span>\n "; + return buffer;} + +function program5(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n<div class=\"hda-info\"> "; + foundHelper = helpers.misc_info; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + " </div>\n"; + return buffer;} + + buffer += "<div class=\"hda-summary\">\n "; + foundHelper = helpers.misc_blurb; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "<br />\n format: <span class=\""; + foundHelper = helpers.data_type; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\">"; + foundHelper = helpers.data_type; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "</span>,\n database:\n "; + stack1 = depth0.dbkey_unknown_and_editable; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n</div>\n"; + stack1 = depth0.misc_info; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + return buffer;}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-tagArea.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-tagArea.js @@ -0,0 +1,20 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + + return "Tags";} + + buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>"; + return buffer;}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-titleLink.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-titleLink.js @@ -0,0 +1,18 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression; + + + buffer += "<span class=\"historyItemTitle\">"; + foundHelper = helpers.hid; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + ": "; + foundHelper = helpers.name; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "</span>"; + return buffer;}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-hda-warning-messages.js --- /dev/null +++ b/static/scripts/templates/compiled/template-hda-warning-messages.js @@ -0,0 +1,160 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['template-hda-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) { + helpers = helpers || Handlebars.helpers; + var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + +function program1(depth0,data) { + + var stack1; + stack1 = depth0.purged; + stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }} +function program2(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n"; + foundHelper = helpers.warningmessagesmall; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer;} +function program3(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n "; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer;} +function program4(depth0,data) { + + + return "This dataset has been deleted.";} + +function program6(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n "; + buffer += "\n Click <a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-"; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n "; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + return buffer;} +function program7(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n or <a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" class=\"historyItemPurge\" id=\"historyItemPurger-"; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n "; + return buffer;} + +function program9(depth0,data) { + + var stack1, foundHelper; + foundHelper = helpers.warningmessagesmall; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } + else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }} +function program10(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n "; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer;} +function program11(depth0,data) { + + + return "This dataset has been deleted and removed from disk.";} + +function program13(depth0,data) { + + var stack1, foundHelper; + foundHelper = helpers.warningmessagesmall; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } + else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } + if(stack1 || stack1 === 0) { return stack1; } + else { return ''; }} +function program14(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n "; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer;} +function program15(depth0,data) { + + + return "This dataset has been hidden.";} + +function program17(depth0,data) { + + var buffer = "", stack1, foundHelper; + buffer += "\n Click <a href=\""; + stack1 = depth0.urls; + stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide; + stack1 = typeof stack1 === functionType ? stack1() : stack1; + buffer += escapeExpression(stack1) + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-"; + foundHelper = helpers.id; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } + else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to unhide it\n "; + return buffer;} + + stack1 = depth0.deleted; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n"; + stack1 = depth0.purged; + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n\n"; + stack1 = depth0.visible; + stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); + if(stack1 || stack1 === 0) { buffer += stack1; } + return buffer;}); +})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-annotationArea.js --- a/static/scripts/templates/compiled/template-history-annotationArea.js +++ /dev/null @@ -1,39 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; - -function program1(depth0,data) { - - - return "Annotation";} - -function program3(depth0,data) { - - - return "Edit dataset annotation";} - - buffer += "\n<div id=\""; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "-annotation-area\" class=\"annotation-area\" style=\"display: none;\">\n <strong>"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += ":</strong>\n <div id=\""; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "-anotation-elt\" class=\"annotation-elt tooltip editable-text\"\n style=\"margin: 1px 0px 1px 0px\" title=\""; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\">\n </div>\n</div>"; - return buffer;}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-displayApps.js --- a/static/scripts/templates/compiled/template-history-displayApps.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n "; - foundHelper = helpers.label; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.label; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\n "; - stack1 = depth0.links; - stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n <br />\n"; - return buffer;} -function program2(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n <a target=\""; - foundHelper = helpers.target; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.target; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\" href=\""; - foundHelper = helpers.href; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.href; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\">"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "</a>\n "; - return buffer;} -function program3(depth0,data) { - - var stack1, foundHelper; - foundHelper = helpers.text; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - return escapeExpression(stack1);} - - stack1 = depth0.displayApps; - stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-downloadLinks.js --- a/static/scripts/templates/compiled/template-history-downloadLinks.js +++ /dev/null @@ -1,117 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n"; - buffer += "\n<div popupmenu=\"dataset-"; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "-popup\">\n <a class=\"action-button\" href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\">"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "</a>\n <a>"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "</a>\n "; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download; - stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n</div>\n<div style=\"float:left;\" class=\"menubutton split popup\" id=\"dataset-"; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "-popup\">\n <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" title=\""; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\" class=\"icon-button disk tooltip\"></a>\n</div>\n"; - return buffer;} -function program2(depth0,data) { - - - return "Download Dataset";} - -function program4(depth0,data) { - - - return "Additional Files";} - -function program6(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n <a class=\"action-button\" href=\""; - foundHelper = helpers.url; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.url; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\">"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += " "; - foundHelper = helpers.file_type; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.file_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</a>\n "; - return buffer;} -function program7(depth0,data) { - - - return "Download";} - -function program9(depth0,data) { - - - return "Download";} - -function program11(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n"; - buffer += "\n<a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" title=\""; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\" class=\"icon-button disk tooltip\"></a>\n"; - return buffer;} -function program12(depth0,data) { - - - return "Download";} - - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.meta_download; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(11, program11, data),fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-failedMetaData.js --- a/static/scripts/templates/compiled/template-history-failedMetaData.js +++ /dev/null @@ -1,33 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\nYou may be able to <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">set it manually or retry auto-detection</a>.\n"; - return buffer;} -function program2(depth0,data) { - - - return "An error occurred setting the metadata for this dataset.";} - - foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-hdaSummary.js --- a/static/scripts/templates/compiled/template-history-hdaSummary.js +++ /dev/null @@ -1,66 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this; - -function program1(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" target=\"galaxy_main\">"; - foundHelper = helpers.metadata_dbkey; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</a>\n "; - return buffer;} - -function program3(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n <span class=\""; - foundHelper = helpers.metadata_dbkey; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\">"; - foundHelper = helpers.metadata_dbkey; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.metadata_dbkey; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</span>\n "; - return buffer;} - -function program5(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n<div class=\"hda-info\">"; - foundHelper = helpers.misc_info; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.misc_info; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</div>\n"; - return buffer;} - - buffer += "<div class=\"hda-summary\">\n "; - foundHelper = helpers.misc_blurb; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "<br />\n format: <span class=\""; - foundHelper = helpers.data_type; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\">"; - foundHelper = helpers.data_type; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</span>,\n database:\n "; - stack1 = depth0.dbkey_unknown_and_editable; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n</div>\n"; - stack1 = depth0.misc_info; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - return buffer;}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-tagArea.js --- a/static/scripts/templates/compiled/template-history-tagArea.js +++ /dev/null @@ -1,20 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing; - -function program1(depth0,data) { - - - return "Tags";} - - buffer += "\n<div class=\"tag-area\" style=\"display: none;\">\n <strong>"; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += ":</strong>\n <div class=\"tag-elt\">\n </div>\n</div>"; - return buffer;}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-titleLink.js --- a/static/scripts/templates/compiled/template-history-titleLink.js +++ /dev/null @@ -1,18 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression; - - - buffer += "<a href=\"javascript:void(0);\"><span class=\"historyItemTitle\">"; - foundHelper = helpers.hid; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + ": "; - foundHelper = helpers.name; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "</span></a>"; - return buffer;}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/compiled/template-history-warning-messages.js --- a/static/scripts/templates/compiled/template-history-warning-messages.js +++ /dev/null @@ -1,160 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['template-history-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) { - helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; - -function program1(depth0,data) { - - var stack1; - stack1 = depth0.purged; - stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(2, program2, data)}); - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }} -function program2(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n"; - foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(3, program3, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n"; - return buffer;} -function program3(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n "; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(4, program4, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n"; - return buffer;} -function program4(depth0,data) { - - - return "This dataset has been deleted.";} - -function program6(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n "; - buffer += "\n Click <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.undelete; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" class=\"historyItemUndelete\" id=\"historyItemUndeleter-"; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to undelete it\n "; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - return buffer;} -function program7(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n or <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.purge; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" class=\"historyItemPurge\" id=\"historyItemPurger-"; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n "; - return buffer;} - -function program9(depth0,data) { - - var stack1, foundHelper; - foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } - else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }} -function program10(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n "; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n"; - return buffer;} -function program11(depth0,data) { - - - return "This dataset has been deleted and removed from disk.";} - -function program13(depth0,data) { - - var stack1, foundHelper; - foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } - else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } - if(stack1 || stack1 === 0) { return stack1; } - else { return ''; }} -function program14(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n "; - foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(17, program17, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n"; - return buffer;} -function program15(depth0,data) { - - - return "This dataset has been hidden.";} - -function program17(depth0,data) { - - var buffer = "", stack1, foundHelper; - buffer += "\n Click <a href=\""; - stack1 = depth0.urls; - stack1 = stack1 == null || stack1 === false ? stack1 : stack1.unhide; - stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" class=\"historyItemUnhide\" id=\"historyItemUnhider-"; - foundHelper = helpers.id; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } - else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to unhide it\n "; - return buffer;} - - stack1 = depth0.deleted; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n"; - stack1 = depth0.purged; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n"; - stack1 = depth0.visible; - stack1 = helpers.unless.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); - if(stack1 || stack1 === 0) { buffer += stack1; } - return buffer;}); -})(); \ No newline at end of file diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/hda-templates.html --- /dev/null +++ b/static/scripts/templates/hda-templates.html @@ -0,0 +1,118 @@ +<!-- ---------------------------------------------------------------------- WARNING BOXES --> +<script type="text/template" class="template-hda" id="template-hda-warning-messages"> +{{#if deleted}}{{#unless purged}} +{{#warningmessagesmall}} + {{#local}}This dataset has been deleted.{{/local}} + {{#if urls.undelete}} + {{! how in the hell would you localize this? }} + Click <a href="{{ urls.undelete }}" class="historyItemUndelete" id="historyItemUndeleter-{{ id }}" + target="galaxy_history">here</a> to undelete it + {{#if urls.purge}} + or <a href="{{ urls.purge }}" class="historyItemPurge" id="historyItemPurger-{{ id }}" + target="galaxy_history">here</a> to immediately remove it from disk + {{/if}} + {{/if}} +{{/warningmessagesmall}} +{{/unless}}{{/if}} + +{{#if purged}}{{#warningmessagesmall}} + {{#local}}This dataset has been deleted and removed from disk.{{/local}} +{{/warningmessagesmall}}{{/if}} + +{{#unless visible}}{{#warningmessagesmall}} + {{#local}}This dataset has been hidden.{{/local}} + {{#if urls.unhide}} + Click <a href="{{ urls.unhide }}" class="historyItemUnhide" id="historyItemUnhider-{{ id }}" + target="galaxy_history">here</a> to unhide it + {{/if}} +{{/warningmessagesmall}}{{/unless}} +</script> + + +<!-- ---------------------------------------------------------------------- TITLE/NAME --> +<script type="text/template" class="template-hda" id="template-hda-titleLink"> +<span class="historyItemTitle">{{ hid }}: {{ name }}</span> +</script> + + +<!-- ---------------------------------------------------------------------- SUMMARY INFO (ok state) --> +<script type="text/template" class="template-hda" id="template-hda-hdaSummary"> +<div class="hda-summary"> + {{ misc_blurb }}<br /> + format: <span class="{{ data_type }}">{{ data_type }}</span>, + database: + {{#if dbkey_unknown_and_editable }} + <a class="metadata-dbkey" href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a> + {{else}} + <span class="metadata-dbkey {{ metadata_dbkey }}">{{ metadata_dbkey }}</span> + {{/if}} +</div> +{{#if misc_info}} +<div class="hda-info"> {{ misc_info }} </div> +{{/if}} +</script> + + +<!-- ---------------------------------------------------------------------- FAILED META WARNING --> +<script type="text/template" class="template-hda" id="template-hda-failedMetaData"> +{{#warningmessagesmall}} +{{#local}}An error occurred setting the metadata for this dataset.{{/local}} +You may be able to <a href="{{ urls.edit }}" target="galaxy_main">set it manually or retry auto-detection</a>. +{{/warningmessagesmall}} +</script> + + +<!-- ---------------------------------------------------------------------- DOWNLOAD POPUP --> +<script type="text/template" class="template-hda" id="template-hda-downloadLinks"> +{{#if urls.meta_download}} +{{! this will be built using a popupmenu }} +<div popupmenu="dataset-{{ id }}-popup"> + <a class="action-button" href="{{ urls.download }}">{{#local}}Download Dataset{{/local}}</a> + <a>{{#local}}Additional Files{{/local}}</a> + {{#each urls.meta_download}} + <a class="action-button" href="{{ url }}">{{#local}}Download{{/local}} {{ file_type }}</a> + {{/each}} +</div> +<div style="float:left;" class="menubutton split popup" id="dataset-{{ id }}-popup"> + <a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a> +</div> +{{else}} +{{! otherwise a simple icon button }} +<a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a> +{{/if}} +</script> + + +<!-- ---------------------------------------------------------------------- TAG AREA --> +<script type="text/template" class="template-hda" id="template-hda-tagArea"> +{{! TODO: move to mvc/tag.js templates }} +<div class="tag-area" style="display: none;"> + <strong>{{#local}}Tags{{/local}}:</strong> + <div class="tag-elt"> + </div> +</div> +</script> + + +<!-- ---------------------------------------------------------------------- ANNOTATION AREA --> +<script type="text/template" class="template-hda" id="template-hda-annotationArea"> +{{! TODO: move to mvc/annotations.js templates, editable-text }} +<div id="{{ id }}-annotation-area" class="annotation-area" style="display: none;"> + <strong>{{#local}}Annotation{{/local}}:</strong> + <div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text" + style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}"> + </div> +</div> +</script> + + +<!-- ---------------------------------------------------------------------- DISPLAY_APP LINKS --> +<script type="text/template" class="template-hda" id="template-hda-displayApps"> +{{#each displayApps}} + {{label}} + {{#each links}} + <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a> + {{/each}} + <br /> +{{/each}} +</script> diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df static/scripts/templates/history-templates.html --- a/static/scripts/templates/history-templates.html +++ b/static/scripts/templates/history-templates.html @@ -1,115 +1,11 @@ -<script type="text/template" class="template-history" id="template-history-warning-messages"> -{{#if deleted}}{{#unless purged}} -{{#warningmessagesmall}} - {{#local}}This dataset has been deleted.{{/local}} - {{#if urls.undelete}} - {{! how in the hell would you localize this? }} - Click <a href="{{ urls.undelete }}" class="historyItemUndelete" id="historyItemUndeleter-{{ id }}" - target="galaxy_history">here</a> to undelete it - {{#if urls.purge}} - or <a href="{{ urls.purge }}" class="historyItemPurge" id="historyItemPurger-{{ id }}" - target="galaxy_history">here</a> to immediately remove it from disk - {{/if}} - {{/if}} -{{/warningmessagesmall}} -{{/unless}}{{/if}} - -{{#if purged}}{{#warningmessagesmall}} - {{#local}}This dataset has been deleted and removed from disk.{{/local}} -{{/warningmessagesmall}}{{/if}} - -{{#unless visible}}{{#warningmessagesmall}} - {{#local}}This dataset has been hidden.{{/local}} - {{#if urls.unhide}} - Click <a href="{{ urls.unhide }}" class="historyItemUnhide" id="historyItemUnhider-{{ id }}" - target="galaxy_history">here</a> to unhide it - {{/if}} -{{/warningmessagesmall}}{{/unless}} -</script> - -<script type="text/template" class="template-history" id="template-history-titleLink"> -<a href="javascript:void(0);"><span class="historyItemTitle">{{ hid }}: {{ name }}</span></a> -</script> - -<script type="text/template" class="template-history" id="template-history-hdaSummary"> -<div class="hda-summary"> - {{ misc_blurb }}<br /> - format: <span class="{{ data_type }}">{{ data_type }}</span>, - database: - {{#if dbkey_unknown_and_editable }} - <a href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a> - {{else}} - <span class="{{ metadata_dbkey }}">{{ metadata_dbkey }}</span> - {{/if}} -</div> -{{#if misc_info}} -<div class="hda-info">{{ misc_info }}</div> -{{/if}} -</script> - -<script type="text/template" class="template-history" id="template-history-failedMetaData"> -{{#warningmessagesmall}} -{{#local}}An error occurred setting the metadata for this dataset.{{/local}} -You may be able to <a href="{{ urls.edit }}" target="galaxy_main">set it manually or retry auto-detection</a>. -{{/warningmessagesmall}} -</script> - -<script type="text/template" class="template-history" id="template-history-downloadLinks"> -{{#if urls.meta_download}} -{{! this will be built using a popupmenu }} -<div popupmenu="dataset-{{ id }}-popup"> - <a class="action-button" href="{{ urls.download }}">{{#local}}Download Dataset{{/local}}</a> - <a>{{#local}}Additional Files{{/local}}</a> - {{#each urls.meta_download}} - <a class="action-button" href="{{ url }}">{{#local}}Download{{/local}} {{ file_type }}</a> - {{/each}} -</div> -<div style="float:left;" class="menubutton split popup" id="dataset-{{ id }}-popup"> - <a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a> -</div> -{{else}} -{{! otherwise a simple icon button }} -<a href="{{ urls.download }}" title="{{#local}}Download{{/local}}" class="icon-button disk tooltip"></a> -{{/if}} -</script> - -<script type="text/template" class="template-history" id="template-history-tagArea"> -{{! TODO: move to mvc/tag.js templates }} -<div class="tag-area" style="display: none;"> - <strong>{{#local}}Tags{{/local}}:</strong> - <div class="tag-elt"> - </div> -</div> -</script> - -<script type="text/template" class="template-history" id="template-history-annotationArea"> -{{! TODO: move to mvc/annotations.js templates, editable-text }} -<div id="{{ id }}-annotation-area" class="annotation-area" style="display: none;"> - <strong>{{#local}}Annotation{{/local}}:</strong> - <div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text" - style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}"> - </div> -</div> -</script> - -<script type="text/template" class="template-history" id="template-history-displayApps"> -{{#each displayApps}} - {{label}} - {{#each links}} - <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a> - {{/each}} - <br /> -{{/each}} -</script> - <!-- History panel/page - the main container for hdas (gen. on the left hand of the glx page) --><script type="text/template" class="template-history" id="template-history-historyPanel"> -{{! history name (if any) }} <div id="history-controls"><div id="history-title-area" class="historyLinks"> + {{! history name (if any) }} <div id="history-name-container" style="float: left;"> {{! TODO: factor out conditional css }} {{#if user.email}} diff -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 -r d30d2888780f44d815d4463e337bf0f62996e2df templates/root/alternate_history.mako --- a/templates/root/alternate_history.mako +++ b/templates/root/alternate_history.mako @@ -233,27 +233,33 @@ "helpers-common-templates", "template-warningmessagesmall", - "template-history-warning-messages", - "template-history-titleLink", - "template-history-failedMetadata", - "template-history-hdaSummary", - "template-history-downloadLinks", - "template-history-tagArea", - "template-history-annotationArea", - "template-history-displayApps", - "template-history-historyPanel", + "template-hda-warning-messages", + "template-hda-titleLink", + "template-hda-failedMetadata", + "template-hda-hdaSummary", + "template-hda-downloadLinks", + "template-hda-tagArea", + "template-hda-annotationArea", + "template-hda-displayApps", + "template-user-quotaMeter-quota", "template-user-quotaMeter-usage" )} ##TODO: fix: curr hasta be _after_ h.templates bc these use those templates - move somehow ${h.js( - "mvc/dataset/hda-model", "mvc/dataset/hda-edit", - "mvc/history/history-model", "mvc/history/history-panel", - ##"mvc/tags", "mvc/annotations", - "mvc/user/user-model", "mvc/user/user-quotameter" + "mvc/user/user-model", "mvc/user/user-quotameter", + + "mvc/dataset/hda-model", + "mvc/dataset/hda-base", + "mvc/dataset/hda-edit", + ##"mvc/dataset/hda-readonly", + + ##"mvc/tags", "mvc/annotations" + + "mvc/history/history-model", "mvc/history/history-panel" )} <script type="text/javascript"> @@ -417,6 +423,7 @@ width: 90%; margin: -2px 0px -3px -4px; font-weight: bold; + font-size: 110%; color: black; } @@ -439,6 +446,17 @@ margin: 10px 0px 10px 0px; } + .historyItemTitle { + text-decoration: none; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + } + .historyItemTitle:hover { + text-decoration: underline; + } + </style><noscript> 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.