1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c5c9a85e1bb8/ Changeset: c5c9a85e1bb8 User: carlfeberhard Date: 2013-04-11 22:48:47 Summary: history panel: move history options menu code into index.mako, localization pass; pack scripts Affected #: 10 files diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/mvc/dataset/hda-base.js --- a/static/scripts/mvc/dataset/hda-base.js +++ b/static/scripts/mvc/dataset/hda-base.js @@ -436,7 +436,7 @@ * @param {jQuery} parent DOM to which to append this body */ _render_body_new : function( parent ){ - var newMsg = 'This is a new dataset and not all of its data are available yet'; + var newMsg = _l( 'This is a new dataset and not all of its data are available yet' ); parent.append( $( '<div>' + _l( newMsg ) + '</div>' ) ); }, @@ -512,7 +512,7 @@ * @param {jQuery} parent DOM to which to append this body */ _render_body_empty : function( parent ){ - //TODO: replace i with dataset-misc-info class + //TODO: replace i with dataset-misc-info class //?? why are we showing the file size when we know it's zero?? parent.append( $( '<div>' + _l( 'No data' ) + ': <i>' + this.model.get( 'misc_blurb' ) + '</i></div>' ) ); parent.append( this._render_primaryActionButtons( this.defaultPrimaryActionButtonRenderers )); diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/packed/mvc/dataset/hda-base.js --- a/static/scripts/packed/mvc/dataset/hda-base.js +++ b/static/scripts/packed/mvc/dataset/hda-base.js @@ -1,1 +1,1 @@ -var HDABaseView=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urlTemplates=a.urlTemplates;this.expanded=a.expanded||false;this.model.bind("change",function(c,d){var b=_.without(_.keys(d.changes),"display_apps","display_types");if(b.length){this.render()}else{if(this.expanded){this._render_displayApps()}}},this)},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);this.urls=this._renderUrls(this.urlTemplates,this.model.toJSON());a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this._setUpBehaviors(a);this.body=$(this._render_body());a.append(this.body);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},_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{try{c[f]=_.template(e,a)}catch(g){throw (b+"._renderUrls error: "+g+"\n rendering:"+e+"\n with "+JSON.stringify(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}})},_setUpBehaviors:function(a){a=a||this.$el;make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("View data");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(c){c=c||this.$el;var d=c.find("div.display-apps"),a=this.model.get("display_types"),b=this.model.get("display_apps");if((!this.model.hasData())||(!c||!c.length)||(!d.length)){return}d.html(null);if(!_.isEmpty(a)){d.append(HDABaseView.templates.displayApps({displayApps:a}))}if(!_.isEmpty(b)){d.append(HDABaseView.templates.displayApps({displayApps:b}))}},_render_peek:function(){var a=this.model.get("peek");if(!a){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(a))},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(a);a.css("display","block")}return a},_render_body_html:function(a){a.html("");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NEW:this._render_body_new(a);break;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.PAUSED:this._render_body_paused(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 "'+this.model.get("state")+'".</div>'))}a.append('<div style="clear: both"></div>');this._setUpBehaviors(a)},_render_body_new:function(b){var a="This is a new dataset and not all of its data are available yet";b.append($("<div>"+_l(a)+"</div>"))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+"</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+"</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(a){a.append($("<div>"+_l("Job is paused. Use the history menu to resume")+"</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+"</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayAppArea());this._render_displayApps(a);a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this;this.expanded=(a===undefined)?(!this.body.is(":visible")):(a);if(this.expanded){b._render_body_html(b.body);this.body.slideDown("fast",function(){b.trigger("body-expanded",b.model.get("id"))})}else{this.body.slideUp("fast",function(){b.trigger("body-collapsed",b.model.get("id"))})}},remove:function(b){var a=this;this.$el.fadeOut("fast",function(){a.$el.remove();if(b){b()}})},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]}; \ No newline at end of file +var HDABaseView=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urlTemplates=a.urlTemplates;this.expanded=a.expanded||false;this.model.bind("change",function(c,d){var b=_.without(_.keys(d.changes),"display_apps","display_types");if(b.length){this.render()}else{if(this.expanded){this._render_displayApps()}}},this)},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);this.urls=this._renderUrls(this.urlTemplates,this.model.toJSON());a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this._setUpBehaviors(a);this.body=$(this._render_body());a.append(this.body);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},_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{try{c[f]=_.template(e,a)}catch(g){throw (b+"._renderUrls error: "+g+"\n rendering:"+e+"\n with "+JSON.stringify(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}})},_setUpBehaviors:function(a){a=a||this.$el;make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"})},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("View data");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayAppArea:function(){return $("<div/>").addClass("display-apps")},_render_displayApps:function(c){c=c||this.$el;var d=c.find("div.display-apps"),a=this.model.get("display_types"),b=this.model.get("display_apps");if((!this.model.hasData())||(!c||!c.length)||(!d.length)){return}d.html(null);if(!_.isEmpty(a)){d.append(HDABaseView.templates.displayApps({displayApps:a}))}if(!_.isEmpty(b)){d.append(HDABaseView.templates.displayApps({displayApps:b}))}},_render_peek:function(){var a=this.model.get("peek");if(!a){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(a))},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: none");if(this.expanded){this._render_body_html(a);a.css("display","block")}return a},_render_body_html:function(a){a.html("");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NEW:this._render_body_new(a);break;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.PAUSED:this._render_body_paused(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 "'+this.model.get("state")+'".</div>'))}a.append('<div style="clear: both"></div>');this._setUpBehaviors(a)},_render_body_new:function(b){var a=_l("This is a new dataset and not all of its data are available yet");b.append($("<div>"+_l(a)+"</div>"))},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+"</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+"</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(a){a.append($("<div>"+_l("Job is paused. Use the history menu to resume")+"</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+"</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred with this dataset")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(_.extend(this.model.toJSON(),{urls:this.urls}))));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayAppArea());this._render_displayApps(a);a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this;this.expanded=(a===undefined)?(!this.body.is(":visible")):(a);if(this.expanded){b._render_body_html(b.body);this.body.slideDown("fast",function(){b.trigger("body-expanded",b.model.get("id"))})}else{this.body.slideUp("fast",function(){b.trigger("body-collapsed",b.model.get("id"))})}},remove:function(b){var a=this;this.$el.fadeOut("fast",function(){a.$el.remove();if(b){b()}})},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]}; \ No newline at end of file diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/packed/templates/compiled/template-hda-hdaSummary.js --- a/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js +++ b/static/scripts/packed/templates/compiled/template-hda-hdaSummary.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,m,f,l,k){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||g.helpers;k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var p="",r,q;p+='\n <a class="metadata-dbkey" href="'+j(((r=((r=t.urls),r==null||r===false?r:r.edit)),typeof r===h?r.apply(t):r))+'" target="galaxy_main">';if(q=f.metadata_dbkey){q=q.call(t,{hash:{},data:s})}else{q=t.metadata_dbkey;q=typeof q===h?q.apply(t):q}p+=j(q)+"</a>\n ";return p}function c(s,r){var p="",q;p+='\n <span class="metadata-dbkey ';if(q=f.metadata_dbkey){q=q.call(s,{hash:{},data:r})}else{q=s.metadata_dbkey;q=typeof q===h?q.apply(s):q}p+=j(q)+'">';if(q=f.metadata_dbkey){q=q.call(s,{hash:{},data:r})}else{q=s.metadata_dbkey;q=typeof q===h?q.apply(s):q}p+=j(q)+"</span>\n ";return p}function n(s,r){var p="",q;p+='\n<div class="hda-info"> ';if(q=f.misc_info){q=q.call(s,{hash:{},data:r})}else{q=s.misc_info;q=typeof q===h?q.apply(s):q}p+=j(q)+" </div>\n";return p}i+='<div class="hda-summary">\n ';if(d=f.misc_blurb){d=d.call(m,{hash:{},data:k})}else{d=m.misc_blurb;d=typeof d===h?d.apply(m):d}i+=j(d)+'<br />\n format: <span class="';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+'">';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+"</span>,\n database:\n ";d=f["if"].call(m,m.dbkey_unknown_and_editable,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n</div>\n";d=f["if"].call(m,m.misc_info,{hash:{},inverse:o.noop,fn:o.program(5,n,k),data:k});if(d||d===0){i+=d}return i})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-hdaSummary"]=b(function(g,m,f,l,k){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||g.helpers;k=k||{};var i="",d,s,h="function",j=this.escapeExpression,r=this,n=f.blockHelperMissing;function e(u,t){return"format: "}function c(u,t){return"database: "}function q(x,w){var t="",v,u;t+='\n <a class="metadata-dbkey" href="'+j(((v=((v=x.urls),v==null||v===false?v:v.edit)),typeof v===h?v.apply(x):v))+'" target="galaxy_main">';if(u=f.metadata_dbkey){u=u.call(x,{hash:{},data:w})}else{u=x.metadata_dbkey;u=typeof u===h?u.apply(x):u}t+=j(u)+"</a>\n ";return t}function p(w,v){var t="",u;t+='\n <span class="metadata-dbkey ';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+'">';if(u=f.metadata_dbkey){u=u.call(w,{hash:{},data:v})}else{u=w.metadata_dbkey;u=typeof u===h?u.apply(w):u}t+=j(u)+"</span>\n ";return t}function o(w,v){var t="",u;t+='\n<div class="hda-info"> ';if(u=f.misc_info){u=u.call(w,{hash:{},data:v})}else{u=w.misc_info;u=typeof u===h?u.apply(w):u}t+=j(u)+" </div>\n";return t}i+='<div class="hda-summary">\n ';if(d=f.misc_blurb){d=d.call(m,{hash:{},data:k})}else{d=m.misc_blurb;d=typeof d===h?d.apply(m):d}i+=j(d)+"<br />\n ";s={hash:{},inverse:r.noop,fn:r.program(1,e,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+='<span class="';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+'">';if(d=f.data_type){d=d.call(m,{hash:{},data:k})}else{d=m.data_type;d=typeof d===h?d.apply(m):d}i+=j(d)+"</span>,\n ";s={hash:{},inverse:r.noop,fn:r.program(3,c,k),data:k};if(d=f.local){d=d.call(m,s)}else{d=m.local;d=typeof d===h?d.apply(m):d}if(!f.local){d=n.call(m,d,s)}if(d||d===0){i+=d}i+="\n ";d=f["if"].call(m,m.dbkey_unknown_and_editable,{hash:{},inverse:r.program(7,p,k),fn:r.program(5,q,k),data:k});if(d||d===0){i+=d}i+="\n</div>\n";d=f["if"].call(m,m.misc_info,{hash:{},inverse:r.noop,fn:r.program(9,o,k),data:k});if(d||d===0){i+=d}return i})})(); \ No newline at end of file diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a 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(m,B,z,s,I){this.compilerInfo=[2,">= 1.0.0-rc.3"];z=z||m.helpers;I=I||{};var A="",p,l,h,w=this,e="function",c=z.blockHelperMissing,d=this.escapeExpression;function v(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(2,u,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function u(K,J){return"Click to rename history"}function t(N,M){var J="",L,K;J+='\n <div id="history-name" class="tooltip"\n title="';K={hash:{},inverse:w.noop,fn:w.program(5,r,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">';if(L=z.name){L=L.call(N,{hash:{},data:M})}else{L=N.name;L=typeof L===e?L.apply(N):L}J+=d(L)+"</div>\n ";return J}function r(K,J){return"You must be logged in to edit your history name"}function q(N,M){var J="",L,K;J+='\n <a id="history-tag" title="';K={hash:{},inverse:w.noop,fn:w.program(8,o,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';K={hash:{},inverse:w.noop,fn:w.program(10,H,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return J}function o(K,J){return"Edit history tags"}function H(K,J){return"Edit history annotation"}function G(N,M){var J="",L,K;J+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(13,F,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';K={hash:{},inverse:w.noop,fn:w.program(15,E,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';K={hash:{},inverse:w.noop,fn:w.program(17,D,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+='">\n ';L=z["if"].call(N,N.annotation,{hash:{},inverse:w.program(21,n,M),fn:w.program(19,C,M),data:M});if(L||L===0){J+=L}J+="\n </div>\n </div>\n </div>\n </div>\n ";return J}function F(K,J){return"Tags"}function E(K,J){return"Annotation"}function D(K,J){return"Click to edit annotation"}function C(M,L){var J="",K;J+="\n ";if(K=z.annotation){K=K.call(M,{hash:{},data:L})}else{K=M.annotation;K=typeof K===e?K.apply(M):K}J+=d(K)+"\n ";return J}function n(N,M){var J="",L,K;J+="\n <em>";K={hash:{},inverse:w.noop,fn:w.program(22,k,M),data:M};if(L=z.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!z.local){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="</em>\n ";return J}function k(K,J){return"Describe or add notes to history"}function j(N,M){var J="",L,K;J+="\n ";K={hash:{},inverse:w.noop,fn:w.program(25,i,M),data:M};if(L=z.warningmessagesmall){L=L.call(N,K)}else{L=N.warningmessagesmall;L=typeof L===e?L.apply(N):L}if(!z.warningmessagesmall){L=c.call(N,L,K)}if(L||L===0){J+=L}J+="\n ";return J}function i(M,L){var K,J;J={hash:{},inverse:w.noop,fn:w.program(26,g,L),data:L};if(K=z.local){K=K.call(M,J)}else{K=M.local;K=typeof K===e?K.apply(M):K}if(!z.local){K=c.call(M,K,J)}if(K||K===0){return K}else{return""}}function g(K,J){return"You are currently viewing a deleted history!"}function f(M,L){var J="",K;J+='\n <div class="';if(K=z.status){K=K.call(M,{hash:{},data:L})}else{K=M.status;K=typeof K===e?K.apply(M):K}J+=d(K)+'message">';if(K=z.message){K=K.call(M,{hash:{},data:L})}else{K=M.message;K=typeof K===e?K.apply(M):K}J+=d(K)+"</div>\n ";return J}function y(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 x(K,J){return"Your history is empty. Click 'Get Data' on the left pane to start"}A+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.program(4,t,I),fn:w.program(1,v,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=z.nice_size){l=l.call(B,{hash:{},data:I})}else{l=B.nice_size;l=typeof l===e?l.apply(B):l}A+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(7,q,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=z["if"].call(B,((p=B.user),p==null||p===false?p:p.email),{hash:{},inverse:w.noop,fn:w.program(12,G,I),data:I});if(l||l===0){A+=l}A+="\n\n ";l=z["if"].call(B,B.deleted,{hash:{},inverse:w.noop,fn:w.program(24,j,I),data:I});if(l||l===0){A+=l}A+='\n\n <div id="message-container">\n ';l=z["if"].call(B,B.message,{hash:{},inverse:w.noop,fn:w.program(28,f,I),data:I});if(l||l===0){A+=l}A+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:w.noop,fn:w.program(30,y,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+='\n </div>\n </div>\n</div>\n\n<div id="';if(l=z.id){l=l.call(B,{hash:{},data:I})}else{l=B.id;l=typeof l===e?l.apply(B):l}A+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:w.noop,fn:w.program(32,x,I),data:I};if(l=z.local){l=l.call(B,h)}else{l=B.local;l=typeof l===e?l.apply(B):l}if(!z.local){l=c.call(B,l,h)}if(l||l===0){A+=l}A+="\n</div>";return A})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(m,C,A,s,J){this.compilerInfo=[2,">= 1.0.0-rc.3"];A=A||m.helpers;J=J||{};var B="",p,l,h,x=this,e="function",c=A.blockHelperMissing,d=this.escapeExpression;function v(O,N){var K="",M,L;K+='\n <div id="history-name" class="tooltip editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(2,u,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function u(L,K){return"Click to rename history"}function t(O,N){var K="",M,L;K+='\n <div id="history-name" class="tooltip"\n title="';L={hash:{},inverse:x.noop,fn:x.program(5,r,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">';if(M=A.name){M=M.call(O,{hash:{},data:N})}else{M=O.name;M=typeof M===e?M.apply(O):M}K+=d(M)+"</div>\n ";return K}function r(L,K){return"You must be logged in to edit your history name"}function q(O,N){var K="",M,L;K+='\n <a id="history-tag" title="';L={hash:{},inverse:x.noop,fn:x.program(8,o,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';L={hash:{},inverse:x.noop,fn:x.program(10,I,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n ';return K}function o(L,K){return"Edit history tags"}function I(L,K){return"Edit history annotation"}function H(O,N){var K="",M,L;K+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(13,G,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>';L={hash:{},inverse:x.noop,fn:x.program(15,F,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+=':</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text"\n title="';L={hash:{},inverse:x.noop,fn:x.program(17,E,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+='">\n ';M=A["if"].call(O,O.annotation,{hash:{},inverse:x.program(21,n,N),fn:x.program(19,D,N),data:N});if(M||M===0){K+=M}K+="\n </div>\n </div>\n </div>\n </div>\n ";return K}function G(L,K){return"Tags"}function F(L,K){return"Annotation"}function E(L,K){return"Click to edit annotation"}function D(N,M){var K="",L;K+="\n ";if(L=A.annotation){L=L.call(N,{hash:{},data:M})}else{L=N.annotation;L=typeof L===e?L.apply(N):L}K+=d(L)+"\n ";return K}function n(O,N){var K="",M,L;K+="\n <em>";L={hash:{},inverse:x.noop,fn:x.program(22,k,N),data:N};if(M=A.local){M=M.call(O,L)}else{M=O.local;M=typeof M===e?M.apply(O):M}if(!A.local){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="</em>\n ";return K}function k(L,K){return"Describe or add notes to history"}function j(O,N){var K="",M,L;K+="\n ";L={hash:{},inverse:x.noop,fn:x.program(25,i,N),data:N};if(M=A.warningmessagesmall){M=M.call(O,L)}else{M=O.warningmessagesmall;M=typeof M===e?M.apply(O):M}if(!A.warningmessagesmall){M=c.call(O,M,L)}if(M||M===0){K+=M}K+="\n ";return K}function i(N,M){var L,K;K={hash:{},inverse:x.noop,fn:x.program(26,g,M),data:M};if(L=A.local){L=L.call(N,K)}else{L=N.local;L=typeof L===e?L.apply(N):L}if(!A.local){L=c.call(N,L,K)}if(L||L===0){return L}else{return""}}function g(L,K){return"You are currently viewing a deleted history!"}function f(N,M){var K="",L;K+='\n <div class="';if(L=A.status){L=L.call(N,{hash:{},data:M})}else{L=N.status;L=typeof L===e?L.apply(N):L}K+=d(L)+'message">';if(L=A.message){L=L.call(N,{hash:{},data:M})}else{L=N.message;L=typeof L===e?L.apply(N):L}K+=d(L)+"</div>\n ";return K}function z(L,K){return"You are over your disk quota"}function y(L,K){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function w(L,K){return"Your history is empty. Click 'Get Data' on the left pane to start"}B+='<div id="history-controls">\n\n <div id="history-title-area" class="historyLinks">\n \n <div id="history-name-container">\n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.program(4,t,J),fn:x.program(1,v,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';if(l=A.nice_size){l=l.call(C,{hash:{},data:J})}else{l=C.nice_size;l=typeof l===e?l.apply(C):l}B+=d(l)+'</div>\n\n <div id="history-secondary-links" style="float: right;">\n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(7,q,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n <div style="clear: both;"></div>\n </div>\n\n \n \n ';l=A["if"].call(C,((p=C.user),p==null||p===false?p:p.email),{hash:{},inverse:x.noop,fn:x.program(12,H,J),data:J});if(l||l===0){B+=l}B+="\n\n ";l=A["if"].call(C,C.deleted,{hash:{},inverse:x.noop,fn:x.program(24,j,J),data:J});if(l||l===0){B+=l}B+='\n\n <div id="message-container">\n ';l=A["if"].call(C,C.message,{hash:{},inverse:x.noop,fn:x.program(28,f,J),data:J});if(l||l===0){B+=l}B+='\n </div>\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n ';h={hash:{},inverse:x.noop,fn:x.program(30,z,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+=".\n ";h={hash:{},inverse:x.noop,fn:x.program(32,y,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+='.\n </div>\n </div>\n</div>\n\n<div id="';if(l=A.id){l=l.call(C,{hash:{},data:J})}else{l=C.id;l=typeof l===e?l.apply(C):l}B+=d(l)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';h={hash:{},inverse:x.noop,fn:x.program(34,w,J),data:J};if(l=A.local){l=l.call(C,h)}else{l=C.local;l=typeof l===e?l.apply(C):l}if(!A.local){l=c.call(C,l,h)}if(l||l===0){B+=l}B+="\n</div>";return B})})(); \ No newline at end of file diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/templates/compiled/template-hda-hdaSummary.js --- a/static/scripts/templates/compiled/template-hda-hdaSummary.js +++ b/static/scripts/templates/compiled/template-hda-hdaSummary.js @@ -3,10 +3,22 @@ templates['template-hda-hdaSummary'] = template(function (Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [2,'>= 1.0.0-rc.3']; helpers = helpers || Handlebars.helpers; data = data || {}; - var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; + var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; function program1(depth0,data) { + + return "format: "; + } + +function program3(depth0,data) { + + + return "database: "; + } + +function program5(depth0,data) { + var buffer = "", stack1, stack2; buffer += "\n <a class=\"metadata-dbkey\" href=\"" + escapeExpression(((stack1 = ((stack1 = depth0.urls),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) @@ -18,7 +30,7 @@ return buffer; } -function program3(depth0,data) { +function program7(depth0,data) { var buffer = "", stack1; buffer += "\n <span class=\"metadata-dbkey "; @@ -33,7 +45,7 @@ return buffer; } -function program5(depth0,data) { +function program9(depth0,data) { var buffer = "", stack1; buffer += "\n<div class=\"hda-info\"> "; @@ -48,7 +60,13 @@ if (stack1 = helpers.misc_blurb) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.misc_blurb; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "<br />\n format: <span class=\""; + + "<br />\n "; + options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "<span class=\""; if (stack1 = helpers.data_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) @@ -56,11 +74,17 @@ if (stack1 = helpers.data_type) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.data_type; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "</span>,\n database:\n "; - stack1 = helpers['if'].call(depth0, depth0.dbkey_unknown_and_editable, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data}); + + "</span>,\n "; + options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data}; + if (stack1 = helpers.local) { stack1 = stack1.call(depth0, options); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, options); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.dbkey_unknown_and_editable, {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n</div>\n"; - stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data}); + stack1 = helpers['if'].call(depth0, depth0.misc_info, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } return buffer; }); diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a 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 @@ -199,12 +199,18 @@ function program30(depth0,data) { - return "You are over your disk quota.\n Tool execution is on hold until your disk usage drops below your allocated quota."; + return "You are over your disk quota"; } function program32(depth0,data) { + return "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"; } @@ -237,12 +243,18 @@ else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); } if(stack2 || stack2 === 0) { buffer += stack2; } - buffer += "\n </div>\n </div>\n</div>\n\n<div id=\""; + buffer += ".\n "; + options = {hash:{},inverse:self.noop,fn:self.program(32, program32, data),data:data}; + if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); } + else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } + if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); } + if(stack2 || stack2 === 0) { buffer += stack2; } + buffer += ".\n </div>\n </div>\n</div>\n\n<div id=\""; if (stack2 = helpers.id) { stack2 = stack2.call(depth0, {hash:{},data:data}); } else { stack2 = depth0.id; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } buffer += escapeExpression(stack2) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n "; - options = {hash:{},inverse:self.noop,fn:self.program(32, program32, data),data:data}; + options = {hash:{},inverse:self.noop,fn:self.program(34, program34, data),data:data}; if (stack2 = helpers.local) { stack2 = stack2.call(depth0, options); } else { stack2 = depth0.local; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } if (!helpers.local) { stack2 = blockHelperMissing.call(depth0, stack2, options); } diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/templates/hda-templates.html --- a/static/scripts/templates/hda-templates.html +++ b/static/scripts/templates/hda-templates.html @@ -46,8 +46,8 @@ <script type="text/template" class="template-hda" id="template-hda-hdaSummary"><div class="hda-summary"> {{ misc_blurb }}<br /> - format: <span class="{{ data_type }}">{{ data_type }}</span>, - database: + {{#local}}format: {{/local}}<span class="{{ data_type }}">{{ data_type }}</span>, + {{#local}}database: {{/local}} {{#if dbkey_unknown_and_editable }} <a class="metadata-dbkey" href="{{ urls.edit }}" target="galaxy_main">{{ metadata_dbkey }}</a> {{else}} diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a static/scripts/templates/history-templates.html --- a/static/scripts/templates/history-templates.html +++ b/static/scripts/templates/history-templates.html @@ -63,15 +63,15 @@ {{/if}} <div id="message-container"> - {{#if message}} + {{#if message}}{{! should already be localized }} <div class="{{status}}message">{{message}}</div> {{/if}} </div><div id="quota-message-container" style="display: none"><div id="quota-message" class="errormessage"> - {{#local}}You are over your disk quota. - Tool execution is on hold until your disk usage drops below your allocated quota.{{/local}} + {{#local}}You are over your disk quota{{/local}}. + {{#local}}Tool execution is on hold until your disk usage drops below your allocated quota{{/local}}. </div></div></div> diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a templates/webapps/galaxy/root/history.mako --- a/templates/webapps/galaxy/root/history.mako +++ b/templates/webapps/galaxy/root/history.mako @@ -65,10 +65,8 @@ 'Delete', 'Job is waiting to run', 'View Details', - 'Run this job again', 'Job is currently running', - 'View Details', - 'Run this job again', + #'Run this job again', 'Metadata is being Auto-Detected.', 'No data: ', 'format: ', @@ -207,9 +205,6 @@ "template-hda-tagArea", "template-hda-annotationArea", "template-hda-displayApps", - - "template-user-quotaMeter-quota", - "template-user-quotaMeter-usage" )} ##TODO: fix: curr hasta be _after_ h.templates bc these use those templates - move somehow @@ -323,86 +318,16 @@ // set it up to be accessible across iframes top.Galaxy.currHistoryPanel = historyPanel; - //ANOTHER cross-frame element is the history-options-button... - // in this case, we need to change the popupmenu options listed to include some functions for this history - // these include: current (1 & 2) 'show/hide' delete and hidden functions, and (3) the collapse all option //TODO: the options-menu stuff need to be moved out when iframes are removed - (function(){ - // don't try this if the history panel is in it's own window - if( top.document === window.document ){ - return; - } - - // lots of wtf here...due to infernalframes - //TODO: this is way tooo acrobatic - var $historyButtonWindow = $( top.document ), - HISTORY_MENU_BUTTON_ID = 'history-options-button', - $historyMenuButton = $historyButtonWindow.find( '#' + HISTORY_MENU_BUTTON_ID ), - // jq data in another frame can only be accessed by the jQuery in that frame, - // get the jQuery from the top frame (that contains the history-options-button) - START_INSERTING_AT_INDEX = 11, - COLLAPSE_OPTION_TEXT = _l("Collapse Expanded Datasets"), - DELETED_OPTION_TEXT = _l("Include Deleted Datasets"), - HIDDEN_OPTION_TEXT = _l("Include Hidden Datasets"); - windowJQ = $( top )[0].jQuery, - popupMenu = ( windowJQ && $historyMenuButton[0] )?( windowJQ.data( $historyMenuButton[0], 'PopupMenu' ) ) - :( null ); - //console.debug( - // '$historyButtonWindow:', $historyButtonWindow, - // '$historyMenuButton:', $historyMenuButton, - // 'windowJQ:', windowJQ, - // 'popupmenu:', popupMenu - //); - if( !popupMenu ){ return; } - - // since the history frame reloads so often (compared to the main window), - // we need to check whether these options are there already before we add them again - // In IE, however, NOT re-adding them creates a 'cant execute from freed script' error: - // so...we need to re-add the function in either case (just not the option itself) - //NOTE: we use the global Galaxy.currHistoryPanel here - // because these remain bound in the main window even if panel refreshes - //TODO: too much boilerplate - //TODO: ugh...(in general) - var collapseOption = popupMenu.findItemByHtml( COLLAPSE_OPTION_TEXT ); - if( !collapseOption ){ - collapseOption = { - html : COLLAPSE_OPTION_TEXT - }; - popupMenu.addItem( collapseOption, START_INSERTING_AT_INDEX ) - } - collapseOption.func = function() { - Galaxy.currHistoryPanel.collapseAllHdaBodies(); - }; - - var deletedOption = popupMenu.findItemByHtml( DELETED_OPTION_TEXT ); - if( !deletedOption ){ - deletedOption = { - html : DELETED_OPTION_TEXT - }; - popupMenu.addItem( deletedOption, START_INSERTING_AT_INDEX + 1 ) - } - deletedOption.func = function( clickEvent, thisMenuOption ){ - var show_deleted = Galaxy.currHistoryPanel.toggleShowDeleted(); - thisMenuOption.checked = show_deleted; - }; - // whether was there or added, update the checked option to reflect the panel's settings on the panel render - deletedOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_deleted' ); - - var hiddenOption = popupMenu.findItemByHtml( HIDDEN_OPTION_TEXT ); - if( !hiddenOption ){ - hiddenOption = { - html : HIDDEN_OPTION_TEXT - }; - popupMenu.addItem( hiddenOption, START_INSERTING_AT_INDEX + 2 ) - } - hiddenOption.func = function( clickEvent, thisMenuOption ){ - var show_hidden = Galaxy.currHistoryPanel.toggleShowHidden(); - thisMenuOption.checked = show_hidden; - }; - // whether was there or added, update the checked option to reflect the panel's settings on the panel render - hiddenOption.checked = Galaxy.currHistoryPanel.storage.get( 'show_hidden' ); - })(); + //TODO: move to pub-sub + //TODO: same strings ("Include...") here as in index.mako - brittle + if( ( top.document !== window.document ) && ( Galaxy.historyOptionsMenu ) ){ + Galaxy.historyOptionsMenu.findItemByHtml( "${"Include Deleted Datasets"}" ).checked = + Galaxy.currHistoryPanel.storage.get( 'show_deleted' ); + Galaxy.historyOptionsMenu.findItemByHtml( "${"Include Hidden Datasets"}" ).checked = + Galaxy.currHistoryPanel.storage.get( 'show_hidden' ); + } return; }); diff -r d5c4b1457c9e24bdbead55e0ac8fb4472aa340d6 -r c5c9a85e1bb88a609118d29d595e0136d44dff2a templates/webapps/galaxy/root/index.mako --- a/templates/webapps/galaxy/root/index.mako +++ b/templates/webapps/galaxy/root/index.mako @@ -12,7 +12,7 @@ // set up history options menu $(function(){ // Init history options. - $("#history-options-button").css( "position", "relative" ); + //$("#history-options-button").css( "position", "relative" ); var popupmenu = PopupMenu.make_popupmenu( $("#history-options-button"), { "${_("History Lists")}": null, "${_("Saved Histories")}": function() { @@ -43,6 +43,21 @@ "${_("Resume Paused Jobs")}": function() { galaxy_history.location = "${h.url_for( controller='history', action='resume_paused_jobs', current=True)}"; }, + "${_("Collapse Expanded Datasets")}": function() { + if( Galaxy && Galaxy.currHistoryPanel ){ + Galaxy.currHistoryPanel.collapseAllHdaBodies(); + } + }, + "${_("Include Deleted Datasets")}": function( clickEvent, thisMenuOption ) { + if( Galaxy && Galaxy.currHistoryPanel ){ + thisMenuOption.checked = Galaxy.currHistoryPanel.toggleShowDeleted(); + } + }, + "${_("Include Hidden Datasets")}": function( clickEvent, thisMenuOption ) { + if( Galaxy && Galaxy.currHistoryPanel ){ + thisMenuOption.checked = Galaxy.currHistoryPanel.toggleShowHidden(); + } + }, "${_("Unhide Hidden Datasets")}": function() { if ( confirm( "Really unhide all hidden datasets?" ) ) { galaxy_main.location = "${h.url_for( controller='history', action='unhide_datasets', current=True )}"; @@ -79,6 +94,8 @@ galaxy_main.location = "${h.url_for( controller='history', action='import_archive' )}"; } }); + // since we need to communicate state of hpanel with the options menu, cache the popupmenu here + Galaxy.historyOptionsMenu = popupmenu; // Fix iFrame scrolling on iOS if( navigator.userAgent.match( /(iPhone|iPod|iPad)/i ) ) { 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.