1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/65fddffc937d/ changeset: 65fddffc937d user: carlfeberhard date: 2012-11-09 17:01:48 summary: (alt)history: standardize custom broadcasted events, localize all strings; base-mvc, GalaxyLocalization: add (commented-out) code to store non-localized strings that are attempting to be localized; pack scripts; affected #: 33 files diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/base-mvc.js --- a/static/scripts/mvc/base-mvc.js +++ b/static/scripts/mvc/base-mvc.js @@ -79,15 +79,17 @@ * GalaxyLocalization.setLocalizedString( original, localized ) * GalaxyLocalization.setLocalizedString({ original1 : localized1, original2 : localized2 }) * get with either: - * _l( original ) + * GalaxyLocalization.localize( string ) + * _l( string ) */ //TODO: move to Galaxy.Localization (maybe galaxy.base.js) var GalaxyLocalization = jQuery.extend( {}, { ALIAS_NAME : '_l', localizedStrings : {}, - + + // Set a single English string -> localized string association, or set an entire map of those associations + // Pass in either two strings (english, localized) or just an obj (map) of english : localized setLocalizedString : function( str_or_obj, localizedString ){ - // pass in either two strings (english, translated) or an obj (map) of english : translated attributes //console.debug( this + '.setLocalizedString:', str_or_obj, localizedString ); var self = this; @@ -115,16 +117,19 @@ } }, + // Attempt to get a localized string for strToLocalize. If not found, return the original strToLocalize localize : function( strToLocalize ){ //console.debug( this + '.localize:', strToLocalize ); + + //// uncomment this section to cache strings that need to be localized but haven't been + //if( !_.has( this.localizedStrings, strToLocalize ) ){ + // //console.debug( 'localization NOT found:', strToLocalize ); + // if( !this.nonLocalized ){ this.nonLocalized = {}; } + // this.nonLocalized[ strToLocalize ] = false; + //} + // return the localized version if it's there, the strToLocalize if not - var retStr = strToLocalize; - if( _.has( this.localizedStrings, strToLocalize ) ){ - //console.debug( 'found' ); - retStr = this.localizedStrings[ strToLocalize ]; - } - //console.debug( 'returning:', retStr ); - return retStr; + return this.localizedStrings[ strToLocalize ] || strToLocalize; }, toString : function(){ return 'GalaxyLocalization'; } @@ -247,4 +252,3 @@ return returnedStorage; }; - diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/dataset/hda-edit.js --- a/static/scripts/mvc/dataset/hda-edit.js +++ b/static/scripts/mvc/dataset/hda-edit.js @@ -68,6 +68,7 @@ }, // ................................................................................ RENDER MAIN + // events: rendered, rendered:ready, rendered:initial, rendered:ready:initial render : function(){ var view = this, id = this.model.get( 'id' ), @@ -101,8 +102,8 @@ 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() ){ @@ -179,10 +180,10 @@ // show a disabled display if the data's been purged if( this.model.get( 'purged' ) ){ displayBtnData.enabled = false; - displayBtnData.title = 'Cannot display datasets removed from disk'; + displayBtnData.title = _l( 'Cannot display datasets removed from disk' ); } else { - displayBtnData.title = 'Display data in browser'; + displayBtnData.title = _l( 'Display data in browser' ); displayBtnData.href = this.urls.display; } @@ -208,7 +209,7 @@ var purged = this.model.get( 'purged' ), deleted = this.model.get( 'deleted' ), editBtnData = { - title : 'Edit attributes', + title : _l( 'Edit Attributes' ), href : this.urls.edit, target : 'galaxy_main', icon_class : 'edit' @@ -219,9 +220,9 @@ if( deleted || purged ){ editBtnData.enabled = false; if( purged ){ - editBtnData.title = 'Cannot edit attributes of datasets removed from disk'; + editBtnData.title = _l( 'Cannot edit attributes of datasets removed from disk' ); } else if( deleted ){ - editBtnData.title = 'Undelete dataset to edit attributes'; + editBtnData.title = _l( 'Undelete dataset to edit attributes' ); } } @@ -239,14 +240,14 @@ } var deleteBtnData = { - title : 'Delete', + 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' ) ){ deleteBtnData = { - title : 'Dataset is already deleted', + title : _l( 'Dataset is already deleted' ), icon_class : 'delete', enabled : false }; @@ -306,7 +307,7 @@ || ( !this.model.get( 'for_editing' ) ) ){ return null; } this.errButton = new IconButtonView({ model : new IconButton({ - title : 'View or report this error', + title : _l( 'View or report this error' ), href : this.urls.report_error, target : 'galaxy_main', icon_class : 'bug' @@ -318,7 +319,7 @@ _render_showParamsButton : function(){ // gen. safe to show in all cases this.showParamsButton = new IconButtonView({ model : new IconButton({ - title : 'View details', + title : _l( 'View details' ), href : this.urls.show_params, target : 'galaxy_main', icon_class : 'information' @@ -330,7 +331,7 @@ _render_rerunButton : function(){ if( !this.model.get( 'for_editing' ) ){ return null; } this.rerunButton = new IconButtonView({ model : new IconButton({ - title : 'Run this job again', + title : _l( 'Run this job again' ), href : this.urls.rerun, target : 'galaxy_main', icon_class : 'arrow-circle' @@ -360,7 +361,7 @@ // render the icon from template this.visualizationsButton = new IconButtonView({ model : new IconButton({ - title : 'Visualize', + title : _l( 'Visualize' ), href : visualization_url, icon_class : 'chart_curve' })}); @@ -395,7 +396,7 @@ _.each( visualizations, function( visualization ) { //TODO: move to utils var titleCaseVisualization = visualization.charAt( 0 ).toUpperCase() + visualization.slice( 1 ); - popup_menu_dict[ titleCaseVisualization ] = create_viz_action( visualization ); + popup_menu_dict[ _l( titleCaseVisualization ) ] = create_viz_action( visualization ); }); make_popupmenu( $icon, popup_menu_dict ); } @@ -426,7 +427,7 @@ || ( !this.urls.tags.get ) ){ return null; } this.tagButton = new IconButtonView({ model : new IconButton({ - title : 'Edit dataset tags', + title : _l( 'Edit dataset tags' ), target : 'galaxy_main', href : this.urls.tags.get, icon_class : 'tags' @@ -442,7 +443,7 @@ || ( !this.urls.annotation.get ) ){ return null; } this.annotateButton = new IconButtonView({ model : new IconButton({ - title : 'Edit dataset annotation', + title : _l( 'Edit dataset annotation' ), target : 'galaxy_main', icon_class : 'annotate' })}); @@ -509,15 +510,15 @@ //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>You do not have permission to view dataset.</div>' ) ); + parent.append( $( '<div>' + _l( 'You do not have permission to view dataset' ) + '.</div>' ) ); }, _render_body_uploading : function( parent ){ - parent.append( $( '<div>Dataset is uploading</div>' ) ); + parent.append( $( '<div>' + _l( 'Dataset is uploading' ) + '</div>' ) ); }, _render_body_queued : function( parent ){ - parent.append( $( '<div>Job is waiting to run.</div>' ) ); + parent.append( $( '<div>' + _l( 'Job is waiting to run' ) + '.</div>' ) ); parent.append( this._render_primaryActionButtons([ this._render_showParamsButton, this._render_rerunButton @@ -525,7 +526,7 @@ }, _render_body_running : function( parent ){ - parent.append( '<div>Job is currently running.</div>' ); + parent.append( '<div>' + _l( 'Job is currently running' ) + '.</div>' ); parent.append( this._render_primaryActionButtons([ this._render_showParamsButton, this._render_rerunButton @@ -536,7 +537,7 @@ if( !this.model.get( 'purged' ) ){ parent.append( $( '<div>' + this.model.get( 'misc_blurb' ) + '</div>' ) ); } - parent.append( ( 'An error occurred running this job: ' + 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, @@ -547,7 +548,7 @@ }, _render_body_discarded : function( parent ){ - parent.append( '<div>The job creating this dataset was cancelled before completion.</div>' ); + 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 @@ -555,13 +556,13 @@ }, _render_body_setting_metadata : function( parent ){ - parent.append( $( '<div>Metadata is being auto-detected.</div>' ) ); + 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>No data: <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) ); + 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 @@ -700,7 +701,7 @@ $.ajax({ //TODO: the html from this breaks a couple of times url: this.urls.tags.get, - error: function() { alert( "Tagging failed" ); }, + error: function() { alert( _l( "Tagging failed" ) ); }, success: function(tag_elt_html) { tagElt.html(tag_elt_html); tagElt.find(".tooltip").tooltip(); @@ -733,10 +734,10 @@ // Need to fill annotation element. $.ajax({ url: this.urls.annotation.get, - error: function(){ alert( "Annotations failed" ); }, + error: function(){ alert( _l( "Annotations failed" ) ); }, success: function( htmlFromAjax ){ if( htmlFromAjax === "" ){ - htmlFromAjax = "<em>Describe or add notes to dataset</em>"; + htmlFromAjax = "<em>" + _l( "Describe or add notes to dataset" ) + "</em>"; } annotationElem.html( htmlFromAjax ); annotationArea.find(".tooltip").tooltip(); @@ -761,18 +762,22 @@ }, // expand/collapse body - //side effect: trigger event + // event: body-visible, body-hidden toggleBodyVisibility : function( event, expanded ){ - var $body = this.$el.find( '.historyItemBody' ); + 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' ); + $body.slideDown( 'fast', function(){ + hdaView.trigger( 'body-visible', hdaView.model.get( 'id' ) ); + }); } else { - $body.slideUp( 'fast' ); + $body.slideUp( 'fast', function(){ + hdaView.trigger( 'body-hidden', hdaView.model.get( 'id' ) ); + }); } - this.trigger( 'toggleBodyVisibility', this.model.get( 'id' ), expanded ); }, // ................................................................................ UTILTIY @@ -823,17 +828,17 @@ $.ajax({ url: vis_url + '/list_tracks?f-' + $.param(params), dataType: "html", - error: function() { alert( "Could not add this dataset to browser." ); }, + error: function() { alert( _l( "Could not add this dataset to browser" ) + '.' ); }, success: function(table_html) { var parent = window.parent; - parent.show_modal("View Data in a New or Saved Visualization", "", { + parent.show_modal( _l( "View Data in a New or Saved Visualization" ), "", { "Cancel": function() { parent.hide_modal(); }, "View in saved visualization": function() { // Show new modal with saved visualizations. - parent.show_modal("Add Data to Saved Visualization", table_html, { + parent.show_modal( _l( "Add Data to Saved Visualization" ), table_html, { "Cancel": function() { parent.hide_modal(); }, diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/history/history-model.js --- a/static/scripts/mvc/history/history-model.js +++ b/static/scripts/mvc/history/history-model.js @@ -9,7 +9,7 @@ //TODO: bind change events from items and collection to this (itemLengths, states) // uncomment this out see log messages - logger : console, + //logger : console, // values from api (may need more) defaults : { @@ -47,14 +47,15 @@ //this.on( 'change', function( currModel, changedList ){ // this.log( this + ' has changed:', currModel, changedList ); //}); - this.bind( 'all', function( event ){ - //this.log( this + '', arguments ); - console.info( this + '', arguments ); - }); + //this.bind( 'all', function( event ){ + // //this.log( this + '', arguments ); + // console.info( this + '', arguments ); + //}); }, // get data via the api (alternative to sending options,hdas to initialize) //TODO: this needs work - move to more straightforward deferred + // events: loaded, loaded:user, loaded:hdas loadFromApi : function( historyId, success ){ var history = this; @@ -66,11 +67,12 @@ history.fetch() ).then( function( userResponse, historyResponse ){ - console.warn( 'fetched user: ', userResponse[0] ); - console.warn( 'fetched history: ', historyResponse[0] ); + //console.warn( 'fetched user: ', userResponse[0] ); + //console.warn( 'fetched history: ', historyResponse[0] ); history.attributes.user = userResponse[0]; //? meh. - history.trigger( 'loaded', historyResponse ); - history.log( history ); + + history.trigger( 'loaded:user', userResponse[0] ); + history.trigger( 'loaded', historyResponse[0] ); }).then( function(){ // ...then the hdas (using contents?ids=...) @@ -82,6 +84,7 @@ //console.warn( 'fetched hdas', hdas ); history.hdas.reset( hdas ); history.checkForUpdates(); + history.trigger( 'loaded:hdas', hdas ); if( success ){ callback( history ); } }); @@ -98,17 +101,22 @@ }, // get the history's state from it's cummulative ds states, delay + update if needed + // events: ready checkForUpdates : function( datasets ){ // get overall History state from collection, run updater if History has running/queued hdas // boiling it down on the client to running/not if( this.hdas.running().length ){ this.stateUpdater(); + + } else { + this.trigger( 'ready' ); } return this; }, // update this history, find any hda's running/queued, update ONLY those that have changed states, // set up to run this again in some interval of time + // events: ready stateUpdater : function(){ var history = this, oldState = this.get( 'state' ), @@ -148,13 +156,17 @@ setTimeout( function(){ history.stateUpdater(); }, 4000 ); + + // otherwise, we're now in a 'ready' state (no hdas running) + } else { + history.trigger( 'ready' ); } }).error( function( xhr, status, error ){ if( console && console.warn ){ console.warn( 'Error getting history updates from the server:', xhr, status, error ); } - alert( 'Error getting history updates from the server.\n' + error ); + alert( _l( 'Error getting history updates from the server.' ) + '\n' + error ); }); }, @@ -172,7 +184,7 @@ var HistoryCollection = Backbone.Collection.extend( LoggableMixin ).extend({ model : History, urlRoot : 'api/histories', - logger : console + //logger : console }); //============================================================================== diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -7,14 +7,15 @@ TODO: 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 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: quotaMsg not showing when 100% (on load) BUG: imported, shared history with unaccessible dataset errs in historycontents when getting history (entire history is inaccessible) ??: still happening? @@ -199,6 +200,7 @@ }, // render urls, historyView body, and hdas (if any are shown), fade out, swap, fade in, set up behaviours + // events: rendered, rendered:initial render : function(){ var historyView = this, setUpQueueName = historyView.toString() + '.set-up', @@ -298,7 +300,6 @@ // set up HistoryView->HDAView listeners 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 ){ @@ -307,9 +308,6 @@ historyView.storage.get( 'expandedHdas' ).deleteKey( id ); } }); - - // rendering listeners - hdaView.bind( 'rendered:ready', function(){ historyView.trigger( 'hda:rendered:ready' ); }); }, // set up js/widget behaviours: tooltips, @@ -336,8 +334,6 @@ async_save_text( "history-annotation-container", "history-annotation", this.urls.annotate, "new_annotation", 18, true, 4 ); - - //this.$( 'button' ).button(); }, // update the history size display (curr. upper right of panel) @@ -397,7 +393,7 @@ $.ajax({ //TODO: the html from this breaks a couple of times url: view.urls.tag, - error: function() { alert( "Tagging failed" ); }, + error: function() { alert( _l( "Tagging failed" ) ); }, success: function(tag_elt_html) { //view.log( view + ' tag elt html (ajax)', tag_elt_html ); tagElt.html(tag_elt_html); diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/user/user-model.js --- a/static/scripts/mvc/user/user-model.js +++ b/static/scripts/mvc/user/user-model.js @@ -1,9 +1,10 @@ var User = BaseModel.extend( LoggableMixin ).extend({ //logger : console, + urlRoot : 'api/users', defaults : { id : null, - username : "(anonymous user)", + username : '(' + _l( "anonymous user" ) + ')', email : "", total_disk_usage : 0, nice_total_disk_usage : "0 bytes" @@ -16,7 +17,7 @@ this.on( 'change', function( model, data ){ this.log( this + ' has changed:', model, data.changes ); }); }, - urlRoot : 'api/users', + // events: loaded loadFromApi : function( idOrCurrent, options ){ idOrCurrent = idOrCurrent || User.CURRENT_ID_STR; options = options || {}; @@ -26,6 +27,8 @@ model.trigger( 'loaded', newModel, response ); if( userFn ){ userFn( newModel, response ); } }; + + // requests for the current user must have a sep. constructed url (fetch don't work, ma) if( idOrCurrent === User.CURRENT_ID_STR ){ options.url = this.urlRoot + '/' + User.CURRENT_ID_STR; } @@ -55,6 +58,6 @@ // (stub) collection for users (shouldn't be common unless admin UI) var UserCollection = Backbone.Collection.extend( LoggableMixin ).extend({ model : User, - logger : console, urlRoot : 'api/users' + //logger : console, }); diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/mvc/user/user-quotameter.js --- a/static/scripts/mvc/user/user-quotameter.js +++ b/static/scripts/mvc/user/user-quotameter.js @@ -9,31 +9,11 @@ options : { warnAtPercent : 85, - errorAtPercent : 100, - - // the quota/usage bar is in the masthead - meterDocument : window.top.document, - containerSelector : '.quota-meter-container', - meterSelector : '#quota-meter', - barSelector : '#quota-meter-bar', - textSelector : '#quota-meter-text', - - // the quota message currently displays in the history panel - msgDocument : ( top.frames.galaxy_history )?( top.frames.galaxy_history.document ) - :( top.document ), - msgSelector : '#quota-message-container', - - warnClass : 'quota-meter-bar-warn', - errorClass : 'quota-meter-bar-error', - usageTemplate : 'Using <%= nice_total_disk_usage %>', - quotaTemplate : 'Using <%= quota_percent %>%', - meterTemplate : '', // see where I'm going? - animationSpeed : 'fast' + errorAtPercent : 100 }, initialize : function( options ){ this.log( this + '.initialize:', options ); - _.extend( this.options, options ); //this.bind( 'all', function( event, data ){ this.log( this + ' event:', event, data ); }, this ); @@ -51,6 +31,7 @@ && this.model.get( 'quota_percent' ) >= this.options.errorAtPercent ); }, + // events: quota:over, quota:under, quota:under:approaching, quota:under:ok _render_quota : function(){ var modelJson = this.model.toJSON(), //prevPercent = this.model.previous( 'quota_percent' ), diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/base-mvc.js --- a/static/scripts/packed/mvc/base-mvc.js +++ b/static/scripts/packed/mvc/base-mvc.js @@ -1,1 +1,1 @@ -var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){return this.logger.log.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(b){var a=b;if(_.has(this.localizedStrings,b)){a=this.localizedStrings[b]}return a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;var e=function(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this.save();return this},deleteKey:function(j){delete i[j];this.save();return this},save:function(){return h.save()},toString:function(){return("StorageRecursionHelper("+i+")")}}};var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);f.save=function(h){c(g,f.get())};f.destroy=function(){a(g)};f.toString=function(){return"PersistantStorage("+data+")"};return f}; \ No newline at end of file +var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){return this.logger.log.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(a){return this.localizedStrings[a]||a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;var e=function(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this.save();return this},deleteKey:function(j){delete i[j];this.save();return this},save:function(){return h.save()},toString:function(){return("StorageRecursionHelper("+i+")")}}};var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);f.save=function(h){c(g,f.get())};f.destroy=function(){a(g)};f.toString=function(){return"PersistantStorage("+data+")"};return f}; \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 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="Cannot display datasets removed from disk"}else{a.title="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:"Edit attributes",href:this.urls.edit,target:"galaxy_main",icon_class:"edit"};if(a||c){b.enabled=false;if(c){b.title="Cannot edit attributes of datasets removed from disk"}else{if(a){b.title="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:"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:"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:"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:"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:"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:"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[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:"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:"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>You do not have permission to view dataset.</div>"))},_render_body_uploading:function(a){a.append($("<div>Dataset is uploading</div>"))},_render_body_queued:function(a){a.append($("<div>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>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(("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>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>Metadata is being auto-detected.</div>"))},_render_body_empty:function(a){a.append($("<div>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("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("Annotations failed")},success:function(e){if(e===""){e="<em>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(b,a){var c=this.$el.find(".historyItemBody");a=(a===undefined)?(!c.is(":visible")):(a);if(a){c.slideDown("fast")}else{c.slideUp("fast")}this.trigger("toggleBodyVisibility",this.model.get("id"),a)},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("Could not add this dataset to browser.")},success:function(e){var f=window.parent;f.show_modal("View Data in a New or Saved Visualization","",{Cancel:function(){f.hide_modal()},"View in saved visualization":function(){f.show_modal("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 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 diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/history/history-model.js --- a/static/scripts/packed/mvc/history/history-model.js +++ b/static/scripts/packed/mvc/history/history-model.js @@ -1,1 +1,1 @@ -var History=BaseModel.extend(LoggableMixin).extend({logger:console,defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}this.bind("all",function(c){console.info(this+"",arguments)})},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){console.warn("fetched user: ",e[0]);console.warn("fetched history: ",d[0]);b.attributes.user=e[0];b.trigger("loaded",d);b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console}); \ No newline at end of file +var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}else{c.trigger("ready")}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert(_l("Error getting history updates from the server.")+"\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",}); \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 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)}});b.bind("rendered:ready",function(){a.trigger("hda:rendered:ready")})},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("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",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 diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/user/user-model.js --- a/static/scripts/packed/mvc/user/user-model.js +++ b/static/scripts/packed/mvc/user/user-model.js @@ -1,1 +1,1 @@ -var User=BaseModel.extend(LoggableMixin).extend({defaults:{id:null,username:"(anonymous user)",email:"",total_disk_usage:0,nice_total_disk_usage:"0 bytes"},initialize:function(a){this.log("User.initialize:",a);this.on("loaded",function(b,c){this.log(this+" has loaded:",b,c)});this.on("change",function(b,c){this.log(this+" has changed:",b,c.changes)})},urlRoot:"api/users",loadFromApi:function(d,b){d=d||User.CURRENT_ID_STR;b=b||{};var a=this,c=b.success;b.success=function(f,e){a.trigger("loaded",f,e);if(c){c(f,e)}};if(d===User.CURRENT_ID_STR){b.url=this.urlRoot+"/"+User.CURRENT_ID_STR}return BaseModel.prototype.fetch.call(this,b)},toString:function(){var a=[this.get("username")];if(this.get("id")){a.unshift(this.get("id"));a.push(this.get("email"))}return"User("+a.join(":")+")"}});User.CURRENT_ID_STR="current";User.getCurrentUserFromApi=function(b){var a=new User();a.loadFromApi(User.CURRENT_ID_STR,b);return a};var UserCollection=Backbone.Collection.extend(LoggableMixin).extend({model:User,logger:console,urlRoot:"api/users"}); \ No newline at end of file +var User=BaseModel.extend(LoggableMixin).extend({urlRoot:"api/users",defaults:{id:null,username:"("+_l("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"0 bytes"},initialize:function(a){this.log("User.initialize:",a);this.on("loaded",function(b,c){this.log(this+" has loaded:",b,c)});this.on("change",function(b,c){this.log(this+" has changed:",b,c.changes)})},loadFromApi:function(d,b){d=d||User.CURRENT_ID_STR;b=b||{};var a=this,c=b.success;b.success=function(f,e){a.trigger("loaded",f,e);if(c){c(f,e)}};if(d===User.CURRENT_ID_STR){b.url=this.urlRoot+"/"+User.CURRENT_ID_STR}return BaseModel.prototype.fetch.call(this,b)},toString:function(){var a=[this.get("username")];if(this.get("id")){a.unshift(this.get("id"));a.push(this.get("email"))}return"User("+a.join(":")+")"}});User.CURRENT_ID_STR="current";User.getCurrentUserFromApi=function(b){var a=new User();a.loadFromApi(User.CURRENT_ID_STR,b);return a};var UserCollection=Backbone.Collection.extend(LoggableMixin).extend({model:User,urlRoot:"api/users"}); \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/mvc/user/user-quotameter.js --- a/static/scripts/packed/mvc/user/user-quotameter.js +++ b/static/scripts/packed/mvc/user/user-quotameter.js @@ -1,1 +1,1 @@ -var UserQuotaMeter=BaseView.extend(LoggableMixin).extend({options:{warnAtPercent:85,errorAtPercent:100,meterDocument:window.top.document,containerSelector:".quota-meter-container",meterSelector:"#quota-meter",barSelector:"#quota-meter-bar",textSelector:"#quota-meter-text",msgDocument:(top.frames.galaxy_history)?(top.frames.galaxy_history.document):(top.document),msgSelector:"#quota-message-container",warnClass:"quota-meter-bar-warn",errorClass:"quota-meter-bar-error",usageTemplate:"Using <%= nice_total_disk_usage %>",quotaTemplate:"Using <%= quota_percent %>%",meterTemplate:"",animationSpeed:"fast"},initialize:function(a){this.log(this+".initialize:",a);_.extend(this.options,a);this.model.bind("change:quota_percent change:total_disk_usage",this.render,this)},update:function(a){this.log(this+" updating user data...",a);this.model.loadFromApi(this.model.get("id"),a);return this},isOverQuota:function(){return(this.model.get("quota_percent")!==null&&this.model.get("quota_percent")>=this.options.errorAtPercent)},_render_quota:function(){var a=this.model.toJSON(),b=a.quota_percent,c=$(UserQuotaMeter.templates.quota(a));if(this.isOverQuota()){c.addClass("progress-danger");c.find("#quota-meter-text").css("color","white");this.trigger("quota:over",a)}else{if(b>=this.options.warnAtPercent){c.addClass("progress-warning");this.trigger("quota:under quota:under:approaching",a)}else{c.addClass("progress-success");this.trigger("quota:under quota:under:ok",a)}}return c},_render_usage:function(){var a=$(UserQuotaMeter.templates.usage(this.model.toJSON()));this.log(this+".rendering usage:",a);return a},render:function(){var a=null;this.log(this+".model.quota_percent:",this.model.get("quota_percent"));if((this.model.get("quota_percent")===null)||(this.model.get("quota_percent")===undefined)){a=this._render_usage()}else{a=this._render_quota()}this.$el.html(a);return this},toString:function(){return"UserQuotaMeter("+this.model+")"}});UserQuotaMeter.templates={quota:Handlebars.templates["template-user-quotaMeter-quota"],usage:Handlebars.templates["template-user-quotaMeter-usage"]}; \ No newline at end of file +var UserQuotaMeter=BaseView.extend(LoggableMixin).extend({options:{warnAtPercent:85,errorAtPercent:100},initialize:function(a){this.log(this+".initialize:",a);_.extend(this.options,a);this.model.bind("change:quota_percent change:total_disk_usage",this.render,this)},update:function(a){this.log(this+" updating user data...",a);this.model.loadFromApi(this.model.get("id"),a);return this},isOverQuota:function(){return(this.model.get("quota_percent")!==null&&this.model.get("quota_percent")>=this.options.errorAtPercent)},_render_quota:function(){var a=this.model.toJSON(),b=a.quota_percent,c=$(UserQuotaMeter.templates.quota(a));if(this.isOverQuota()){c.addClass("progress-danger");c.find("#quota-meter-text").css("color","white");this.trigger("quota:over",a)}else{if(b>=this.options.warnAtPercent){c.addClass("progress-warning");this.trigger("quota:under quota:under:approaching",a)}else{c.addClass("progress-success");this.trigger("quota:under quota:under:ok",a)}}return c},_render_usage:function(){var a=$(UserQuotaMeter.templates.usage(this.model.toJSON()));this.log(this+".rendering usage:",a);return a},render:function(){var a=null;this.log(this+".model.quota_percent:",this.model.get("quota_percent"));if((this.model.get("quota_percent")===null)||(this.model.get("quota_percent")===undefined)){a=this._render_usage()}else{a=this._render_quota()}this.$el.html(a);return this},toString:function(){return"UserQuotaMeter("+this.model+")"}});UserQuotaMeter.templates={quota:Handlebars.templates["template-user-quotaMeter-quota"],usage:Handlebars.templates["template-user-quotaMeter-usage"]}; \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-annotationArea.js --- a/static/scripts/packed/templates/compiled/template-history-annotationArea.js +++ b/static/scripts/packed/templates/compiled/template-history-annotationArea.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-annotationArea"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='\n<div id="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'-annotation-area" class="annotation-area" style="display: none;">\n <strong>Annotation:</strong>\n <div id="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'-anotation-elt" class="annotation-elt tooltip editable-text"\n style="margin: 1px 0px 1px 0px" title="Edit dataset annotation">\n </div>\n</div>';return h})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-displayApps.js --- a/static/scripts/packed/templates/compiled/template-history-displayApps.js +++ b/static/scripts/packed/templates/compiled/template-history-displayApps.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-displayApps"]=b(function(g,l,f,k,j){f=f||g.helpers;var c,h="function",i=this.escapeExpression,m=this;function e(r,q){var o="",p,n;o+="\n ";n=f.label;if(n){p=n.call(r,{hash:{}})}else{p=r.label;p=typeof p===h?p():p}o+=i(p)+"\n ";p=r.links;p=f.each.call(r,p,{hash:{},inverse:m.noop,fn:m.program(2,d,q)});if(p||p===0){o+=p}o+="\n <br />\n";return o}function d(r,q){var o="",p,n;o+='\n <a target="';n=f.target;if(n){p=n.call(r,{hash:{}})}else{p=r.target;p=typeof p===h?p():p}o+=i(p)+'" href="';n=f.href;if(n){p=n.call(r,{hash:{}})}else{p=r.href;p=typeof p===h?p():p}o+=i(p)+'">';n=f.text;if(n){p=n.call(r,{hash:{}})}else{p=r.text;p=typeof p===h?p():p}o+=i(p)+"</a>\n ";return o}c=l.displayApps;c=f.each.call(l,c,{hash:{},inverse:m.noop,fn:m.program(1,e,j)});if(c||c===0){return c}else{return""}})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-downloadLinks.js --- a/static/scripts/packed/templates/compiled/template-history-downloadLinks.js +++ b/static/scripts/packed/templates/compiled/template-history-downloadLinks.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-downloadLinks"]=b(function(g,l,f,k,j){f=f||g.helpers;var c,h="function",i=this.escapeExpression,m=this;function e(s,r){var p="",q,o;p+="\n";p+='\n<div popupmenu="dataset-';o=f.id;if(o){q=o.call(s,{hash:{}})}else{q=s.id;q=typeof q===h?q():q}p+=i(q)+'-popup">\n <a class="action-button" href="';q=s.urls;q=q==null||q===false?q:q.download;q=typeof q===h?q():q;p+=i(q)+'">Download Dataset</a>\n <a>Additional Files</a>\n ';q=s.urls;q=q==null||q===false?q:q.meta_download;q=f.each.call(s,q,{hash:{},inverse:m.noop,fn:m.program(2,d,r)});if(q||q===0){p+=q}p+='\n</div>\n<div style="float:left;" class="menubutton split popup" id="dataset-';o=f.id;if(o){q=o.call(s,{hash:{}})}else{q=s.id;q=typeof q===h?q():q}p+=i(q)+'-popup">\n <a href="';q=s.urls;q=q==null||q===false?q:q.download;q=typeof q===h?q():q;p+=i(q)+'" title="Download" class="icon-button disk tooltip"></a>\n</div>\n';return p}function d(s,r){var p="",q,o;p+='\n <a class="action-button" href="';o=f.url;if(o){q=o.call(s,{hash:{}})}else{q=s.url;q=typeof q===h?q():q}p+=i(q)+'">Download ';o=f.file_type;if(o){q=o.call(s,{hash:{}})}else{q=s.file_type;q=typeof q===h?q():q}p+=i(q)+"</a>\n ";return p}function n(r,q){var o="",p;o+="\n";o+='\n<a href="';p=r.urls;p=p==null||p===false?p:p.download;p=typeof p===h?p():p;o+=i(p)+'" title="Download" class="icon-button disk tooltip"></a>\n';return o}c=l.urls;c=c==null||c===false?c:c.meta_download;c=f["if"].call(l,c,{hash:{},inverse:m.program(4,n,j),fn:m.program(1,e,j)});if(c||c===0){return c}else{return""}})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-failedMetaData.js --- a/static/scripts/packed/templates/compiled/template-history-failedMetaData.js +++ b/static/scripts/packed/templates/compiled/template-history-failedMetaData.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-failedMetaData"]=b(function(f,l,e,k,j){e=e||f.helpers;var c,h,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(r,q){var o="",p;o+='\nAn error occurred setting the metadata for this dataset.\nYou may be able to <a href="';p=r.urls;p=p==null||p===false?p:p.edit;p=typeof p===g?p():p;o+=i(p)+'" target="galaxy_main">set it manually or retry auto-detection</a>.\n';return o}h=e.warningmessagesmall;if(h){c=h.call(l,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}else{c=l.warningmessagesmall;c=typeof c===g?c():c}if(!e.warningmessagesmall){c=m.call(l,c,{hash:{},inverse:n.noop,fn:n.program(1,d,j)})}if(c||c===0){return c}else{return""}})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-historyPanel.js --- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js +++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,t,r,n,B){r=r||g.helpers;var s="",k,j,e="function",d=this.escapeExpression,q=this,c=r.blockHelperMissing;function p(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function o(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function m(D,C){return"Click to see more actions"}function l(G,F){var D="",E,C;D+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return D}function i(D,C){return"Edit history tags"}function A(D,C){return"Edit history annotation"}function z(G,F){var D="",E,C;D+="\n ";C=r.warningmessagesmall;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}else{E=G.warningmessagesmall;E=typeof E===e?E():E}if(!r.warningmessagesmall){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}if(E||E===0){D+=E}D+="\n ";return D}function y(F,E){var D,C;C=r.local;if(C){D=C.call(F,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}else{D=F.local;D=typeof D===e?D():D}if(!r.local){D=c.call(F,D,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}if(D||D===0){return D}else{return""}}function x(D,C){return"You are currently viewing a deleted history!"}function w(F,E){var C="",D;C+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';D=F.annotation;D=r["if"].call(F,D,{hash:{},inverse:q.program(19,u,E),fn:q.program(17,v,E)});if(D||D===0){C+=D}C+="\n </div>\n </div>\n </div>\n </div>\n ";return C}function v(G,F){var D="",E,C;D+="\n ";C=r.annotation;if(C){E=C.call(G,{hash:{}})}else{E=G.annotation;E=typeof E===e?E():E}D+=d(E)+"\n ";return D}function u(D,C){return"\n <em>Describe or add notes to history</em>\n "}function h(G,F){var D="",E,C;D+='\n <div id="message-container">\n <div class="';C=r.status;if(C){E=C.call(G,{hash:{}})}else{E=G.status;E=typeof E===e?E():E}D+=d(E)+'message">\n ';C=r.message;if(C){E=C.call(G,{hash:{}})}else{E=G.message;E=typeof E===e?E():E}D+=d(E)+"\n </div><br />\n </div>\n ";return D}function f(D,C){return"Your history is empty. Click 'Get Data' on the left pane to start"}s+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.program(3,o,B),fn:q.program(1,p,B)});if(k||k===0){s+=k}s+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}if(k||k===0){s+=k}s+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';j=r.nice_size;if(j){k=j.call(t,{hash:{}})}else{k=t.nice_size;k=typeof k===e?k():k}s+=d(k)+"</div>\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(7,l,B)});if(k||k===0){s+=k}s+='\n <div style="clear: both;"></div>\n </div>\n\n ';k=t.deleted;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(12,z,B)});if(k||k===0){s+=k}s+="\n\n ";s+="\n ";s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(16,w,B)});if(k||k===0){s+=k}s+="\n\n ";k=t.message;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(21,h,B)});if(k||k===0){s+=k}s+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';j=r.id;if(j){k=j.call(t,{hash:{}})}else{k=t.id;k=typeof k===e?k():k}s+=d(k)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}if(k||k===0){s+=k}s+="\n</div>";return s})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(k,A,y,q,I){y=y||k.helpers;var z="",n,m,v=this,e="function",c=y.blockHelperMissing,d=this.escapeExpression;function t(N,M){var K="",L,J;K+='\n <div id="history-name" class="tooltip editable-text"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(2,s,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(2,s,M)})}if(L||L===0){K+=L}K+='">';J=y.name;if(J){L=J.call(N,{hash:{}})}else{L=N.name;L=typeof L===e?L():L}K+=d(L)+"</div>\n ";return K}function s(K,J){return"Click to rename history"}function r(N,M){var K="",L,J;K+='\n <div id="history-name" class="tooltip"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(5,p,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(5,p,M)})}if(L||L===0){K+=L}K+='">';J=y.name;if(J){L=J.call(N,{hash:{}})}else{L=N.name;L=typeof L===e?L():L}K+=d(L)+"</div>\n ";return K}function p(K,J){return"You must be logged in to edit your history name"}function o(K,J){return"Click to see more actions"}function j(N,M){var K="",L,J;K+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(10,H,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(10,H,M)})}if(L||L===0){K+=L}K+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(12,G,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(12,G,M)})}if(L||L===0){K+=L}K+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return K}function H(K,J){return"Edit history tags"}function G(K,J){return"Edit history annotation"}function F(N,M){var K="",L,J;K+="\n ";J=y.warningmessagesmall;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(15,E,M)})}else{L=N.warningmessagesmall;L=typeof L===e?L():L}if(!y.warningmessagesmall){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(15,E,M)})}if(L||L===0){K+=L}K+="\n ";return K}function E(M,L){var K,J;J=y.local;if(J){K=J.call(M,{hash:{},inverse:v.noop,fn:v.program(16,D,L)})}else{K=M.local;K=typeof K===e?K():K}if(!y.local){K=c.call(M,K,{hash:{},inverse:v.noop,fn:v.program(16,D,L)})}if(K||K===0){return K}else{return""}}function D(K,J){return"You are currently viewing a deleted history!"}function C(N,M){var K="",L,J;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(19,B,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(19,B,M)})}if(L||L===0){K+=L}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(21,l,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(21,l,M)})}if(L||L===0){K+=L}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(23,i,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(23,i,M)})}if(L||L===0){K+=L}K+='">\n ';L=N.annotation;L=y["if"].call(N,L,{hash:{},inverse:v.program(27,g,M),fn:v.program(25,h,M)});if(L||L===0){K+=L}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function B(K,J){return"Tags"}function l(K,J){return"Annotation"}function i(K,J){return"Click to edit annotation"}function h(N,M){var K="",L,J;K+="\n ";J=y.annotation;if(J){L=J.call(N,{hash:{}})}else{L=N.annotation;L=typeof L===e?L():L}K+=d(L)+"\n ";return K}function g(N,M){var K="",L,J;K+="\n <em>";J=y.local;if(J){L=J.call(N,{hash:{},inverse:v.noop,fn:v.program(28,f,M)})}else{L=N.local;L=typeof L===e?L():L}if(!y.local){L=c.call(N,L,{hash:{},inverse:v.noop,fn:v.program(28,f,M)})}if(L||L===0){K+=L}K+="</em>\n ";return K}function f(K,J){return"Describe or add notes to history"}function x(N,M){var K="",L,J;K+='\n <div id="message-container">\n <div class="';J=y.status;if(J){L=J.call(N,{hash:{}})}else{L=N.status;L=typeof L===e?L():L}K+=d(L)+'message">\n ';J=y.message;if(J){L=J.call(N,{hash:{}})}else{L=N.message;L=typeof L===e?L():L}K+=d(L)+"\n </div><br />\n </div>\n ";return K}function w(K,J){return"You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."}function u(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}z+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';z+="\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.program(4,r,I),fn:v.program(1,t,I)});if(n||n===0){z+=n}z+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(7,o,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(7,o,I)})}if(n||n===0){z+=n}z+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';m=y.nice_size;if(m){n=m.call(A,{hash:{}})}else{n=A.nice_size;n=typeof n===e?n():n}z+=d(n)+"</div>\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(9,j,I)});if(n||n===0){z+=n}z+='\n <div style="clear: both;"></div>\n </div>\n\n ';n=A.deleted;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(14,F,I)});if(n||n===0){z+=n}z+="\n\n ";z+="\n ";z+="\n ";n=A.user;n=n==null||n===false?n:n.email;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(18,C,I)});if(n||n===0){z+=n}z+="\n\n ";n=A.message;n=y["if"].call(A,n,{hash:{},inverse:v.noop,fn:v.program(30,x,I)});if(n||n===0){z+=n}z+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(32,w,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(32,w,I)})}if(n||n===0){z+=n}z+='\n </div>\n </div>\n</div>\n\n<div id="';m=y.id;if(m){n=m.call(A,{hash:{}})}else{n=A.id;n=typeof n===e?n():n}z+=d(n)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';m=y.local;if(m){n=m.call(A,{hash:{},inverse:v.noop,fn:v.program(34,u,I)})}else{n=A.local;n=typeof n===e?n():n}if(!y.local){n=c.call(A,n,{hash:{},inverse:v.noop,fn:v.program(34,u,I)})}if(n||n===0){z+=n}z+="\n</div>";return z})})(); \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-tagArea.js --- a/static/scripts/packed/templates/compiled/template-history-tagArea.js +++ b/static/scripts/packed/templates/compiled/template-history-tagArea.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-tagArea"]=b(function(g,h,e,d,f){e=e||g.helpers;var c="";c+='\n<div class="tag-area" style="display: none;">\n <strong>Tags:</strong>\n <div class="tag-elt">\n </div>\n</div>';return c})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-history-warning-messages.js --- a/static/scripts/packed/templates/compiled/template-history-warning-messages.js +++ b/static/scripts/packed/templates/compiled/template-history-warning-messages.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-warning-messages"]=b(function(f,s,q,k,w){q=q||f.helpers;var r="",h,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(z,y){var x;x=z.purged;x=q.unless.call(z,x,{hash:{},inverse:p.noop,fn:p.program(2,n,y)});if(x||x===0){return x}else{return""}}function n(B,A){var y="",z,x;y+="\n";x=q.warningmessagesmall;if(x){z=x.call(B,{hash:{},inverse:p.noop,fn:p.program(3,m,A)})}else{z=B.warningmessagesmall;z=typeof z===e?z():z}if(!q.warningmessagesmall){z=c.call(B,z,{hash:{},inverse:p.noop,fn:p.program(3,m,A)})}if(z||z===0){y+=z}y+="\n";return y}function m(A,z){var x="",y;x+="\n This dataset has been deleted.\n ";y=A.urls;y=y==null||y===false?y:y.undelete;y=q["if"].call(A,y,{hash:{},inverse:p.noop,fn:p.program(4,l,z)});if(y||y===0){x+=y}x+="\n";return x}function l(B,A){var y="",z,x;y+='\n Click <a href="';z=B.urls;z=z==null||z===false?z:z.undelete;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemUndelete" id="historyItemUndeleter-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to undelete it\n ';z=B.urls;z=z==null||z===false?z:z.purge;z=q["if"].call(B,z,{hash:{},inverse:p.noop,fn:p.program(5,j,A)});if(z||z===0){y+=z}y+="\n ";return y}function j(B,A){var y="",z,x;y+='\n or <a href="';z=B.urls;z=z==null||z===false?z:z.purge;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemPurge" id="historyItemPurger-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to immediately remove it from disk\n ';return y}function i(A,z){var y,x;x=q.warningmessagesmall;if(x){y=x.call(A,{hash:{},inverse:p.noop,fn:p.program(8,g,z)})}else{y=A.warningmessagesmall;y=typeof y===e?y():y}if(!q.warningmessagesmall){y=c.call(A,y,{hash:{},inverse:p.noop,fn:p.program(8,g,z)})}if(y||y===0){return y}else{return""}}function g(y,x){return"\n This dataset has been deleted and removed from disk.\n"}function v(A,z){var y,x;x=q.warningmessagesmall;if(x){y=x.call(A,{hash:{},inverse:p.noop,fn:p.program(11,u,z)})}else{y=A.warningmessagesmall;y=typeof y===e?y():y}if(!q.warningmessagesmall){y=c.call(A,y,{hash:{},inverse:p.noop,fn:p.program(11,u,z)})}if(y||y===0){return y}else{return""}}function u(A,z){var x="",y;x+="\n This dataset has been hidden.\n ";y=A.urls;y=y==null||y===false?y:y.unhide;y=q["if"].call(A,y,{hash:{},inverse:p.noop,fn:p.program(12,t,z)});if(y||y===0){x+=y}x+="\n";return x}function t(B,A){var y="",z,x;y+='\n Click <a href="';z=B.urls;z=z==null||z===false?z:z.unhide;z=typeof z===e?z():z;y+=d(z)+'" class="historyItemUnhide" id="historyItemUnhider-';x=q.id;if(x){z=x.call(B,{hash:{}})}else{z=B.id;z=typeof z===e?z():z}y+=d(z)+'"\n target="galaxy_history">here</a> to unhide it\n ';return y}h=s.deleted;h=q["if"].call(s,h,{hash:{},inverse:p.noop,fn:p.program(1,o,w)});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(7,i,w)});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(10,v,w)});if(h||h===0){r+=h}return r})})(); \ No newline at end of file +(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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js --- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js +++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-quota.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';g=d.quota_percent;if(g){c=g.call(l,{hash:{}})}else{c=l.quota_percent;c=typeof c===f?c():c}h+=i(c)+'%"></div>\n ';h+='\n <div id="quota-meter-text" class="quota-meter-text"style="top: 6px">\n Using ';g=d.quota_percent;if(g){c=g.call(l,{hash:{}})}else{c=l.quota_percent;c=typeof c===f?c():c}h+=i(c)+"%\n </div>\n</div>";return h})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-quota"]=b(function(f,m,e,l,k){e=e||f.helpers;var i="",c,h,g="function",j=this.escapeExpression,o=this,n=e.blockHelperMissing;function d(q,p){return"Using"}i+='<div id="quota-meter" class="quota-meter progress">\n <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: ';h=e.quota_percent;if(h){c=h.call(m,{hash:{}})}else{c=m.quota_percent;c=typeof c===g?c():c}i+=j(c)+'%"></div>\n ';i+='\n <div id="quota-meter-text" class="quota-meter-text"style="top: 6px">\n ';h=e.local;if(h){c=h.call(m,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}else{c=m.local;c=typeof c===g?c():c}if(!e.local){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}if(c||c===0){i+=c}i+=" ";h=e.quota_percent;if(h){c=h.call(m,{hash:{}})}else{c=m.quota_percent;c=typeof c===g?c():c}i+=j(c)+"%\n </div>\n</div>";return i})})(); \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js --- a/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js +++ b/static/scripts/packed/templates/compiled/template-user-quotaMeter-usage.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='\n<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n Using ';g=d.nice_total_disk_usage;if(g){c=g.call(l,{hash:{}})}else{c=l.nice_total_disk_usage;c=typeof c===f?c():c}h+=i(c)+"\n </div>\n</div>";return h})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-user-quotaMeter-usage"]=b(function(f,m,e,l,k){e=e||f.helpers;var i="",c,h,o=this,g="function",n=e.blockHelperMissing,j=this.escapeExpression;function d(q,p){return"Using"}i+='\n<div id="quota-meter" class="quota-meter" style="background-color: transparent">\n <div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white">\n ';h=e.local;if(h){c=h.call(m,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}else{c=m.local;c=typeof c===g?c():c}if(!e.local){c=n.call(m,c,{hash:{},inverse:o.noop,fn:o.program(1,d,k)})}if(c||c===0){i+=c}i+=" ";h=e.nice_total_disk_usage;if(h){c=h.call(m,{hash:{}})}else{c=m.nice_total_disk_usage;c=typeof c===g?c():c}i+=j(c)+"\n </div>\n</div>";return i})})(); \ No newline at end of file diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-annotationArea.js --- a/static/scripts/templates/compiled/template-history-annotationArea.js +++ b/static/scripts/templates/compiled/template-history-annotationArea.js @@ -2,17 +2,38 @@ 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; + 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>Annotation:</strong>\n <div id=\""; + 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=\"Edit dataset annotation\">\n </div>\n</div>"; + 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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-displayApps.js --- a/static/scripts/templates/compiled/template-history-displayApps.js +++ b/static/scripts/templates/compiled/template-history-displayApps.js @@ -2,7 +2,7 @@ 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; + var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; function program1(depth0,data) { @@ -29,11 +29,20 @@ 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; } - buffer += escapeExpression(stack1) + "</a>\n "; - return buffer;} + return escapeExpression(stack1);} stack1 = depth0.displayApps; stack1 = helpers.each.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)}); diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-downloadLinks.js --- a/static/scripts/templates/compiled/template-history-downloadLinks.js +++ b/static/scripts/templates/compiled/template-history-downloadLinks.js @@ -2,7 +2,7 @@ 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; + var stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; function program1(depth0,data) { @@ -16,10 +16,22 @@ stack1 = depth0.urls; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\">Download Dataset</a>\n <a>Additional Files</a>\n "; + 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(2, program2, data)}); + 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; @@ -29,36 +41,77 @@ stack1 = depth0.urls; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.download; stack1 = typeof stack1 === functionType ? stack1() : stack1; - buffer += escapeExpression(stack1) + "\" title=\"Download\" class=\"icon-button disk tooltip\"></a>\n</div>\n"; + 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) + "\">Download "; + 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 program4(depth0,data) { +function program9(depth0,data) { - var buffer = "", stack1; + + 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=\"Download\" class=\"icon-button disk tooltip\"></a>\n"; + 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(4, program4, data),fn:self.program(1, program1, data)}); + 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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-failedMetaData.js --- a/static/scripts/templates/compiled/template-history-failedMetaData.js +++ b/static/scripts/templates/compiled/template-history-failedMetaData.js @@ -2,17 +2,27 @@ 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, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; + var stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; function program1(depth0,data) { - var buffer = "", stack1; - buffer += "\nAn error occurred setting the metadata for this dataset.\nYou may be able to <a href=\""; + 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)}); } diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-historyPanel.js --- a/static/scripts/templates/compiled/template-history-historyPanel.js +++ b/static/scripts/templates/compiled/template-history-historyPanel.js @@ -2,95 +2,148 @@ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['template-history-historyPanel'] = 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; + var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; function program1(depth0,data) { var buffer = "", stack1, foundHelper; - buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\"Click to rename history\">"; + buffer += "\n <div id=\"history-name\" class=\"tooltip editable-text\"\n title=\""; + 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 += "\">"; foundHelper = helpers.name; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } buffer += escapeExpression(stack1) + "</div>\n "; return buffer;} +function program2(depth0,data) { + + + return "Click to rename history";} -function program3(depth0,data) { +function program4(depth0,data) { var buffer = "", stack1, foundHelper; - buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\"You must be logged in to edit your history name\">"; + buffer += "\n <div id=\"history-name\" class=\"tooltip\"\n title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, 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(5, program5, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\">"; foundHelper = helpers.name; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1() : stack1; } buffer += escapeExpression(stack1) + "</div>\n "; return buffer;} +function program5(depth0,data) { + + + return "You must be logged in to edit your history name";} -function program5(depth0,data) { +function program7(depth0,data) { return "Click to see more actions";} -function program7(depth0,data) { +function program9(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\""; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, 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(8, program8, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\""; - foundHelper = helpers.local; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, 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(10, program10, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" 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 += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n "; return buffer;} -function program8(depth0,data) { +function program10(depth0,data) { return "Edit history tags";} -function program10(depth0,data) { +function program12(depth0,data) { return "Edit history annotation";} -function program12(depth0,data) { +function program14(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n "; foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(15, program15, 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(13, program13, data)}); } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(15, program15, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n "; return buffer;} -function program13(depth0,data) { +function program15(depth0,data) { var stack1, foundHelper; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(16, program16, 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(14, program14, data)}); } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)}); } if(stack1 || stack1 === 0) { return stack1; } else { return ''; }} -function program14(depth0,data) { +function program16(depth0,data) { return "You are currently viewing a deleted history!";} -function program16(depth0,data) { +function program18(depth0,data) { - var buffer = "", stack1; - buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n "; + var buffer = "", stack1, foundHelper; + buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(19, program19, 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(19, program19, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ":</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, 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(21, program21, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += ":</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\"\n title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, 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(23, program23, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\">\n "; stack1 = depth0.annotation; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(19, program19, data),fn:self.program(17, program17, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(27, program27, data),fn:self.program(25, program25, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n </div>\n </div>\n </div>\n </div>\n "; return buffer;} -function program17(depth0,data) { +function program19(depth0,data) { + + + return "Tags";} + +function program21(depth0,data) { + + + return "Annotation";} + +function program23(depth0,data) { + + + return "Click to edit annotation";} + +function program25(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n "; @@ -100,12 +153,23 @@ buffer += escapeExpression(stack1) + "\n "; return buffer;} -function program19(depth0,data) { +function program27(depth0,data) { + var buffer = "", stack1, foundHelper; + buffer += "\n <em>"; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(28, program28, 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(28, program28, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "</em>\n "; + return buffer;} +function program28(depth0,data) { - return "\n <em>Describe or add notes to history</em>\n ";} + + return "Describe or add notes to history";} -function program21(depth0,data) { +function program30(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n <div id=\"message-container\">\n <div class=\""; @@ -119,7 +183,12 @@ buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n "; return buffer;} -function program23(depth0,data) { +function program32(depth0,data) { + + + return "You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota.";} + +function program34(depth0,data) { return "Your history is empty. Click 'Get Data' on the left pane to start";} @@ -128,13 +197,13 @@ buffer += "\n "; stack1 = depth0.user; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n </div>\n\n <a id=\"history-action-popup\" class=\"tooltip\" title=\""; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); } + 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(5, program5, data)}); } + 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 += "\"\n href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">"; foundHelper = helpers.nice_size; @@ -143,32 +212,38 @@ buffer += escapeExpression(stack1) + "</div>\n "; stack1 = depth0.user; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(9, program9, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n "; stack1 = depth0.deleted; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n "; buffer += "\n "; buffer += "\n "; stack1 = depth0.user; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(18, program18, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n "; stack1 = depth0.message; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(30, program30, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\""; + buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n "; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(32, program32, 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(32, program32, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n </div>\n </div>\n</div>\n\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) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n "; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(34, program34, 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(23, program23, data)}); } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(34, program34, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n</div>"; return buffer;}); diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-tagArea.js --- a/static/scripts/templates/compiled/template-history-tagArea.js +++ b/static/scripts/templates/compiled/template-history-tagArea.js @@ -2,9 +2,19 @@ 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 = ""; + 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>Tags:</strong>\n <div class=\"tag-elt\">\n </div>\n</div>"; + 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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-history-warning-messages.js --- a/static/scripts/templates/compiled/template-history-warning-messages.js +++ b/static/scripts/templates/compiled/template-history-warning-messages.js @@ -24,17 +24,29 @@ return buffer;} function program3(depth0,data) { - var buffer = "", stack1; - buffer += "\n This dataset has been deleted.\n "; + 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(4, program4, data)}); + 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; @@ -46,11 +58,11 @@ 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(5, program5, data)}); + 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 program5(depth0,data) { +function program7(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n or <a href=\""; @@ -64,40 +76,62 @@ buffer += escapeExpression(stack1) + "\"\n target=\"galaxy_history\">here</a> to immediately remove it from disk\n "; return buffer;} -function program7(depth0,data) { +function program9(depth0,data) { var stack1, foundHelper; foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); } + 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(8, program8, data)}); } + 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 program8(depth0,data) { +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 "\n This dataset has been deleted and removed from disk.\n";} + + return "This dataset has been deleted and removed from disk.";} -function program10(depth0,data) { +function program13(depth0,data) { var stack1, foundHelper; foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } + 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(11, program11, data)}); } + 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 program11(depth0,data) { +function program14(depth0,data) { - var buffer = "", stack1; - buffer += "\n This dataset has been hidden.\n "; + 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(12, program12, data)}); + 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 program12(depth0,data) { +function program15(depth0,data) { + + + return "This dataset has been hidden.";} + +function program17(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n Click <a href=\""; @@ -116,11 +150,11 @@ 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(7, program7, data)}); + 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(10, program10, data)}); + 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 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-user-quotaMeter-quota.js --- a/static/scripts/templates/compiled/template-user-quotaMeter-quota.js +++ b/static/scripts/templates/compiled/template-user-quotaMeter-quota.js @@ -2,15 +2,25 @@ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['template-user-quotaMeter-quota'] = template(function (Handlebars,depth0,helpers,partials,data) { helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression; + var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; +function program1(depth0,data) { + + + return "Using";} buffer += "<div id=\"quota-meter\" class=\"quota-meter progress\">\n <div id=\"quota-meter-bar\" class=\"quota-meter-bar bar\" style=\"width: "; foundHelper = helpers.quota_percent; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.quota_percent; stack1 = typeof stack1 === functionType ? stack1() : stack1; } buffer += escapeExpression(stack1) + "%\"></div>\n "; - buffer += "\n <div id=\"quota-meter-text\" class=\"quota-meter-text\"style=\"top: 6px\">\n Using "; + buffer += "\n <div id=\"quota-meter-text\" class=\"quota-meter-text\"style=\"top: 6px\">\n "; + 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 += " "; foundHelper = helpers.quota_percent; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.quota_percent; stack1 = typeof stack1 === functionType ? stack1() : stack1; } diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/compiled/template-user-quotaMeter-usage.js --- a/static/scripts/templates/compiled/template-user-quotaMeter-usage.js +++ b/static/scripts/templates/compiled/template-user-quotaMeter-usage.js @@ -2,10 +2,20 @@ var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['template-user-quotaMeter-usage'] = template(function (Handlebars,depth0,helpers,partials,data) { helpers = helpers || Handlebars.helpers; - var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression; + var buffer = "", stack1, foundHelper, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing, escapeExpression=this.escapeExpression; +function program1(depth0,data) { + + + return "Using";} - buffer += "\n<div id=\"quota-meter\" class=\"quota-meter\" style=\"background-color: transparent\">\n <div id=\"quota-meter-text\" class=\"quota-meter-text\" style=\"top: 6px; color: white\">\n Using "; + buffer += "\n<div id=\"quota-meter\" class=\"quota-meter\" style=\"background-color: transparent\">\n <div id=\"quota-meter-text\" class=\"quota-meter-text\" style=\"top: 6px; color: white\">\n "; + 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 += " "; foundHelper = helpers.nice_total_disk_usage; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.nice_total_disk_usage; stack1 = typeof stack1 === functionType ? stack1() : stack1; } diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/history-templates.html --- a/static/scripts/templates/history-templates.html +++ b/static/scripts/templates/history-templates.html @@ -1,8 +1,9 @@ <script type="text/template" class="template-history" id="template-history-warning-messages"> {{#if deleted}}{{#unless purged}} {{#warningmessagesmall}} - This dataset has been deleted. + {{#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}} @@ -14,11 +15,11 @@ {{/unless}}{{/if}} {{#if purged}}{{#warningmessagesmall}} - This dataset has been deleted and removed from disk. + {{#local}}This dataset has been deleted and removed from disk.{{/local}} {{/warningmessagesmall}}{{/if}} {{#unless visible}}{{#warningmessagesmall}} - This dataset has been hidden. + {{#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 @@ -48,7 +49,7 @@ <script type="text/template" class="template-history" id="template-history-failedMetaData"> {{#warningmessagesmall}} -An error occurred setting the metadata for this dataset. +{{#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> @@ -57,25 +58,25 @@ {{#if urls.meta_download}} {{! this will be built using a popupmenu }} <div popupmenu="dataset-{{ id }}-popup"> - <a class="action-button" href="{{ urls.download }}">Download Dataset</a> - <a>Additional Files</a> + <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 }}">Download {{ file_type }}</a> + <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="Download" class="icon-button disk tooltip"></a> + <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="Download" class="icon-button disk tooltip"></a> +<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>Tags:</strong> + <strong>{{#local}}Tags{{/local}}:</strong><div class="tag-elt"></div></div> @@ -84,9 +85,9 @@ <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>Annotation:</strong> + <strong>{{#local}}Annotation{{/local}}:</strong><div id="{{ id }}-anotation-elt" class="annotation-elt tooltip editable-text" - style="margin: 1px 0px 1px 0px" title="Edit dataset annotation"> + style="margin: 1px 0px 1px 0px" title="{{#local}}Edit dataset annotation{{/local}}"></div></div></script> @@ -95,7 +96,7 @@ {{#each displayApps}} {{label}} {{#each links}} - <a target="{{target}}" href="{{href}}">{{text}}</a> + <a target="{{target}}" href="{{href}}">{{#local}}{{text}}{{/local}}</a> {{/each}} <br /> {{/each}} @@ -113,10 +114,10 @@ {{! TODO: factor out conditional css }} {{#if user.email}} <div id="history-name" class="tooltip editable-text" - title="Click to rename history">{{name}}</div> + title="{{#local}}Click to rename history{{/local}}">{{name}}</div> {{else}} <div id="history-name" class="tooltip" - title="You must be logged in to edit your history name">{{name}}</div> + title="{{#local}}You must be logged in to edit your history name{{/local}}">{{name}}</div> {{/if}} </div> @@ -150,18 +151,19 @@ <div id="history-tag-annotation"><div id="history-tag-area" style="display: none"> - <strong>Tags:</strong> + <strong>{{#local}}Tags{{/local}}:</strong><div class="tag-elt"></div></div><div id="history-annotation-area" style="display: none"> - <strong>Annotation / Notes:</strong> + <strong>{{#local}}Annotation{{/local}}:</strong><div id="history-annotation-container"> - <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation"> + <div id="history-annotation" class="tooltip editable-text" + title="{{#local}}Click to edit annotation{{/local}}"> {{#if annotation}} {{annotation}} {{else}} - <em>Describe or add notes to history</em> + <em>{{#local}}Describe or add notes to history{{/local}}</em> {{/if}} </div></div> @@ -179,7 +181,8 @@ <div id="quota-message-container" style="display: none"><div id="quota-message" class="errormessage"> - You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota. + {{#local}}You are over your disk quota. + Tool execution is on hold until your disk usage drops below your allocated quota.{{/local}} </div></div></div> diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 static/scripts/templates/ui-templates.html --- a/static/scripts/templates/ui-templates.html +++ b/static/scripts/templates/ui-templates.html @@ -3,7 +3,7 @@ <div id="quota-meter-bar" class="quota-meter-bar bar" style="width: {{quota_percent}}%"></div> {{! TODO: remove the hardcoded style }} <div id="quota-meter-text" class="quota-meter-text"style="top: 6px"> - Using {{ quota_percent }}% + {{#local}}Using{{/local}} {{ quota_percent }}% </div></div></script> @@ -12,7 +12,7 @@ {{! TODO: remove the hardcoded styles }} <div id="quota-meter" class="quota-meter" style="background-color: transparent"><div id="quota-meter-text" class="quota-meter-text" style="top: 6px; color: white"> - Using {{ nice_total_disk_usage }} + {{#local}}Using{{/local}} {{ nice_total_disk_usage }} </div></div></script> diff -r 29d47f28af664cf58941085332666de032a7e7d5 -r 65fddffc937dec062dcf4044cd9d1cd4be2f83e7 templates/root/alternate_history.mako --- a/templates/root/alternate_history.mako +++ b/templates/root/alternate_history.mako @@ -15,6 +15,37 @@ ## a list of localized strings used in the backbone views, etc. (to be loaded and cached) ##! change on per page basis <% + ## havent been localized + ##[ + ## "anonymous user", + ## "Click to rename history", + ## "Click to see more actions", + ## "Edit history tags", + ## "Edit history annotation", + ## "Tags", + ## "Annotation", + ## "Click to edit annotation", + ## "You are over your disk ...w your allocated quota.", + ## "Show deleted", + ## "Show hidden", + ## "Display data in browser", + ## "Edit Attributes", + ## "Download", + ## "View details", + ## "Run this job again", + ## "Visualize", + ## "Edit dataset tags", + ## "Edit dataset annotation", + ## "Trackster", + ## "Circster", + ## "Scatterplot", + ## "GeneTrack", + ## "Local", + ## "Web", + ## "Current", + ## "main", + ## "Using" + ##] strings_to_localize = [ # from history.mako @@ -193,6 +224,7 @@ "libs/jquery/jstorage", "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging", "libs/json2", + ##"libs/bootstrap", "libs/backbone/backbone-relational", "mvc/base-mvc", "mvc/ui" )} @@ -220,7 +252,6 @@ ${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" )} @@ -251,6 +282,7 @@ top.Galaxy.paths = galaxy_paths; + top.Galaxy.localization = GalaxyLocalization; window.Galaxy = top.Galaxy; } @@ -289,30 +321,27 @@ // i don't like this history+user relationship, but user authentication changes views/behaviour history.user = user; - //var historyPanel = new HistoryPanel({ - // model : new History( history, hdas ), + var historyPanel = new HistoryPanel({ + model : new History( history, hdas ), + urlTemplates : galaxy_paths.attributes, + logger : console, + // is page sending in show settings? if so override history's + show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, + show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } + }); + historyPanel.render(); + + // ...or LOAD FROM THE API + //historyPanel = new HistoryPanel({ + // model: new History(), // urlTemplates : galaxy_paths.attributes, // logger : console, // // is page sending in show settings? if so override history's // show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, // show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } //}); - //historyPanel.render(); + //historyPanel.model.loadFromApi( history.id ); - // ...or LOAD FROM THE API - historyPanel = new HistoryPanel({ - model: new History(), - urlTemplates : galaxy_paths.attributes, - logger : console, - // is page sending in show settings? if so override history's - show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, - show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } - }); - historyPanel.model.loadFromApi( history.id, historyPanel.show_deleted ); - - if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; } - if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); } - // QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history) // create it and join them here for now (via events) @@ -331,7 +360,7 @@ quotaMeter.bind( 'quota:over', historyPanel.showQuotaMessage, historyPanel ); quotaMeter.bind( 'quota:under', historyPanel.hideQuotaMessage, historyPanel ); // having to add this to handle re-render of hview while overquota (the above do not fire) - historyPanel.on( 'rendered', function(){ + historyPanel.on( 'rendered rendered:initial', function(){ if( quotaMeter.isOverQuota() ){ historyPanel.showQuotaMessage(); } @@ -344,6 +373,9 @@ }, quotaMeter ); + if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; } + if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); } + return; }); </script> @@ -388,6 +420,13 @@ color: black; } + #quota-message-container { + margin: 8px 0px 5px 0px; + } + #quota-message { + margin: 0px; + } + #history-subtitle-area { /*border: 1px solid green;*/ } @@ -397,7 +436,7 @@ } #history-tag-area, #history-annotation-area { - margin-top: 10px; + margin: 10px 0px 10px 0px; } </style> 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.