(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;

This commit is contained in:
Carl Eberhard
2012-11-09 15:38:51 -05:00
parent f0cdf264bc
commit 9d95495bde
36 changed files with 694 additions and 591 deletions
+447
View File
@@ -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,
//};});
+47 -424
View File
@@ -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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
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' ) ) ){
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
// 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' ) )
|| ( !this.model.get( 'for_editing' ) ) ){
|| ( !this.model.get( 'accessible' ) ) ){
this.editButton = null;
return null;
}
@@ -216,7 +63,6 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
};
// 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
// 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
// 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
};
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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
// 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
// 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
},
// ................................................................................ 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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
//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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
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 @@ var HDAView = BaseView.extend( LoggableMixin ).extend({
});
//------------------------------------------------------------------------------
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' ]
};
//==============================================================================
+1 -4
View File
@@ -43,10 +43,7 @@ var HistoryDatasetAssociation = BaseModel.extend( LoggableMixin ).extend({
// 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
+18 -17
View File
@@ -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:
BUG: not loading deleted datasets
FIXED: history_contents, show: state_ids returns all ids now (incl. deleted)
fixed:
BUG: not loading deleted datasets
FIXED: history_contents, show: state_ids returns all ids now (incl. deleted)
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 @@ var HistoryPanel = BaseView.extend( LoggableMixin ).extend({
// 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 @@ var HistoryPanel = BaseView.extend( LoggableMixin ).extend({
// 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 HistoryPanel = BaseView.extend( LoggableMixin ).extend({
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 @@ var HistoryPanel = BaseView.extend( LoggableMixin ).extend({
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 );
});
},
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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(",")+")")}});
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(",")+")")}});
File diff suppressed because one or more lines are too long
@@ -0,0 +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})})();
@@ -0,0 +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""}})})();
@@ -0,0 +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""}})})();
@@ -0,0 +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""}})})();
@@ -0,0 +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})})();
@@ -0,0 +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})})();
@@ -0,0 +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})})();
@@ -0,0 +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})})();
@@ -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})})();
@@ -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""}})})();
@@ -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""}})})();
@@ -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""}})})();
@@ -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})})();
@@ -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})})();
@@ -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})})();
@@ -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})})();
@@ -210,9 +210,11 @@ def main( options, args ):
# 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__':
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-annotationArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-displayApps'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-downloadLinks'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-failedMetaData'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
@@ -1,13 +1,13 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) {
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 href=\"";
buffer += "\n <a class=\"metadata-dbkey\" href=\"";
stack1 = depth0.urls;
stack1 = stack1 == null || stack1 === false ? stack1 : stack1.edit;
stack1 = typeof stack1 === functionType ? stack1() : stack1;
@@ -21,7 +21,7 @@ function program1(depth0,data) {
function program3(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n <span class=\"";
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; }
@@ -35,11 +35,11 @@ function program3(depth0,data) {
function program5(depth0,data) {
var buffer = "", stack1, foundHelper;
buffer += "\n<div class=\"hda-info\">";
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";
buffer += escapeExpression(stack1) + " </div>\n";
return buffer;}
buffer += "<div class=\"hda-summary\">\n ";
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-tagArea'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
@@ -1,11 +1,11 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-titleLink'] = template(function (Handlebars,depth0,helpers,partials,data) {
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 += "<a href=\"javascript:void(0);\"><span class=\"historyItemTitle\">";
buffer += "<span class=\"historyItemTitle\">";
foundHelper = helpers.hid;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
@@ -13,6 +13,6 @@ templates['template-history-titleLink'] = template(function (Handlebars,depth0,h
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>";
buffer += escapeExpression(stack1) + "</span>";
return buffer;});
})();
@@ -1,6 +1,6 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-warning-messages'] = template(function (Handlebars,depth0,helpers,partials,data) {
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;
+118
View File
@@ -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>
+1 -105
View File
@@ -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}}
+31 -13
View File
@@ -233,27 +233,33 @@ ${h.templates(
"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 @@ $(function(){
width: 90%;
margin: -2px 0px -3px -4px;
font-weight: bold;
font-size: 110%;
color: black;
}
@@ -439,6 +446,17 @@ $(function(){
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>