\n Use the following controls to how the chart is displayed.\n The slide controls can be moved by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys.\n Move the focus between controls by using the tab or shift+tab keys on your keyboard.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n
\n Use the following control to change which columns are used by the chart. Click any cell\n from the last three rows of the table to select the column for the appropriate data.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n
\n\n
\n
X Column: which column values will be used for the x axis of the chart.
\n
Y Column: which column values will be used for the y axis of the chart.
\n
ID Column: an additional column value displayed when the user hovers over a data point.\n It may be useful to select unique or categorical identifiers here (such as gene ids).\n
\n Note: If it can be determined from the dataset\'s filetype that a column is not numeric,\n that column choice may be disabled for either the x or y axis.\n
\n Use the following controls to how the chart is displayed.\n The slide controls can be moved by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys.\n Move the focus between controls by using the tab or shift+tab keys on your keyboard.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n
\n Use the following control to change which columns are used by the chart. Click any cell\n from the last three rows of the table to select the column for the appropriate data.\n Use the \'Draw\' button to render (or re-render) the chart with the current settings.\n
\n\n
\n
X Column: which column values will be used for the x axis of the chart.
\n
Y Column: which column values will be used for the y axis of the chart.
\n
ID Column: an additional column value displayed when the user hovers over a data point.\n It may be useful to select unique or categorical identifiers here (such as gene ids).\n
\n Note: If it can be determined from the dataset\'s filetype that a column is not numeric,\n that column choice may be disabled for either the x or y axis.\n
"].join(""))}));c.empty().append(f)},toggleStats:function(a){var b=this.$el.find(".stats-display");a=void 0===a?b.is(":hidden"):a,a?(this.$el.find("svg").hide(),b.show(),this.$el.find(".controls .stats-toggle-btn").text("Plot")):(b.hide(),this.$el.find("svg").show(),this.$el.find(".controls .stats-toggle-btn").text("Stats"))},toString:function(){return"ScatterplotView()"}}),ScatterplotModel=Visualization.extend({defaults:{type:"scatterplot",config:{pagination:{currPage:0,perPage:3e3},width:400,height:400,margin:{top:16,right:16,bottom:40,left:54},xTicks:10,xLabel:"X",yTicks:10,yLabel:"Y",datapointSize:4,animDuration:500,scale:1,translate:[0,0]}}});
\ No newline at end of file
diff --git a/config/plugins/visualizations/scatterplot/templates/scatterplot.mako b/config/plugins/visualizations/scatterplot/templates/scatterplot.mako
index 08e26b0cf2f..b03fde73834 100644
--- a/config/plugins/visualizations/scatterplot/templates/scatterplot.mako
+++ b/config/plugins/visualizations/scatterplot/templates/scatterplot.mako
@@ -32,7 +32,6 @@ ${h.js( 'libs/jquery/jquery',
'libs/backbone/backbone',
'libs/d3',
'libs/handlebars.runtime',
- 'mvc/base-mvc',
'mvc/ui',
'mvc/visualization/visualization-model' )}
diff --git a/static/scripts/mvc/annotations.js b/static/scripts/mvc/annotations.js
index 7a86029f7be..b85cd7a6f17 100644
--- a/static/scripts/mvc/annotations.js
+++ b/static/scripts/mvc/annotations.js
@@ -1,9 +1,12 @@
define([
-], function(){
+ "mvc/base-mvc"
+], function( baseMVC ){
// =============================================================================
/** A view on any model that has a 'annotation' attribute
*/
-var AnnotationEditor = Backbone.View.extend( LoggableMixin ).extend( HiddenUntilActivatedViewMixin ).extend({
+var AnnotationEditor = Backbone.View
+ .extend( baseMVC.LoggableMixin )
+ .extend( baseMVC.HiddenUntilActivatedViewMixin ).extend({
tagName : 'div',
className : 'annotation-display',
diff --git a/static/scripts/mvc/base-mvc.js b/static/scripts/mvc/base-mvc.js
index 6a8bdeb5386..b73396aedb7 100644
--- a/static/scripts/mvc/base-mvc.js
+++ b/static/scripts/mvc/base-mvc.js
@@ -1,3 +1,6 @@
+define([
+], function(){
+//ASSUMES: backbone
//==============================================================================
/** @class Mixin to add logging capabilities to an object.
* Designed to allow switching an objects log output off/on at one central
@@ -188,3 +191,10 @@ var HiddenUntilActivatedViewMixin = /** @lends hiddenUntilActivatedMixin# */{
return this.HUAVOptions.showFn.apply( this.HUAVOptions.$elementShown, arguments );
}
};
+
+//==============================================================================
+return {
+ LoggableMixin : LoggableMixin,
+ SessionStorageModel : SessionStorageModel,
+ HiddenUntilActivatedViewMixin : HiddenUntilActivatedViewMixin
+};});
diff --git a/static/scripts/mvc/dataset/hda-base.js b/static/scripts/mvc/dataset/hda-base.js
index 60d9b6e5fef..79a23f110dd 100644
--- a/static/scripts/mvc/dataset/hda-base.js
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -1,7 +1,8 @@
define([
- "mvc/dataset/hda-model"
-], function( hdaModel ){
-/* global Backbone, LoggableMixin, HistoryDatasetAssociation, HDABaseView */
+ "mvc/dataset/hda-model",
+ "mvc/base-mvc"
+], function( hdaModel, baseMVC ){
+/* global Backbone */
//==============================================================================
/** @class Read only view for HistoryDatasetAssociation.
* @name HDABaseView
@@ -11,7 +12,7 @@ define([
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var HDABaseView = Backbone.View.extend( LoggableMixin ).extend(
+var HDABaseView = Backbone.View.extend( baseMVC.LoggableMixin ).extend(
/** @lends HDABaseView.prototype */{
///** logger used to record this.log messages, commonly set to console */
diff --git a/static/scripts/mvc/dataset/hda-edit.js b/static/scripts/mvc/dataset/hda-edit.js
index 95d0729d9f4..45dc9748ade 100644
--- a/static/scripts/mvc/dataset/hda-edit.js
+++ b/static/scripts/mvc/dataset/hda-edit.js
@@ -13,7 +13,7 @@ define([
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var HDAEditView = hdaBase.HDABaseView.extend( LoggableMixin ).extend(
+var HDAEditView = hdaBase.HDABaseView.extend(
/** @lends HDAEditView.prototype */{
// ......................................................................... set up
diff --git a/static/scripts/mvc/dataset/hda-model.js b/static/scripts/mvc/dataset/hda-model.js
index d38b00955c6..1761b07a52b 100644
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -1,5 +1,6 @@
define([
-], function(){
+ "mvc/base-mvc"
+], function( baseMVC ){
//==============================================================================
/** @class (HDA) model for a Galaxy dataset
* related to a history.
@@ -10,7 +11,7 @@ define([
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var HistoryDatasetAssociation = Backbone.Model.extend( LoggableMixin ).extend(
+var HistoryDatasetAssociation = Backbone.Model.extend( baseMVC.LoggableMixin ).extend(
/** @lends HistoryDatasetAssociation.prototype */{
///** logger used to record this.log messages, commonly set to console */
@@ -401,7 +402,7 @@ HistoryDatasetAssociation.NOT_READY_STATES = [
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var HDACollection = Backbone.Collection.extend( LoggableMixin ).extend(
+var HDACollection = Backbone.Collection.extend( baseMVC.LoggableMixin ).extend(
/** @lends HDACollection.prototype */{
model : HistoryDatasetAssociation,
diff --git a/static/scripts/mvc/history/current-history-panel.js b/static/scripts/mvc/history/current-history-panel.js
index 29163feeaf3..b1bf29a9d06 100644
--- a/static/scripts/mvc/history/current-history-panel.js
+++ b/static/scripts/mvc/history/current-history-panel.js
@@ -1,11 +1,12 @@
define([
"mvc/dataset/hda-edit",
- "mvc/history/history-panel"
-], function( hdaEdit, hpanel ){
+ "mvc/history/history-panel",
+ "mvc/base-mvc"
+], function( hdaEdit, hpanel, baseMVC ){
// ============================================================================
/** session storage for history panel preferences (and to maintain state)
*/
-var HistoryPanelPrefs = SessionStorageModel.extend({
+var HistoryPanelPrefs = baseMVC.SessionStorageModel.extend({
defaults : {
/** is the panel currently showing the search/filter controls? */
searching : false,
diff --git a/static/scripts/mvc/history/history-model.js b/static/scripts/mvc/history/history-model.js
index 7594ab7c2de..0b09f02f9fe 100644
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -1,6 +1,7 @@
define([
- "mvc/dataset/hda-model"
-], function( hdaModel ){
+ "mvc/dataset/hda-model",
+ "mvc/base-mvc"
+], function( hdaModel, baseMVC ){
//==============================================================================
/** @class Model for a Galaxy history resource - both a record of user
* tool use and a collection of the datasets those tools produced.
@@ -11,7 +12,7 @@ define([
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var History = Backbone.Model.extend( LoggableMixin ).extend(
+var History = Backbone.Model.extend( baseMVC.LoggableMixin ).extend(
/** @lends History.prototype */{
///** logger used to record this.log messages, commonly set to console */
@@ -114,13 +115,6 @@ var History = Backbone.Model.extend( LoggableMixin ).extend(
},
// ........................................................................ common queries
- /** is this model already associated with a user? */
-//TODO: remove
- hasUser : function(){
- var user = this.get( 'user' );
- return !!( user && user.id );
- },
-
/** T/F is this history owned by the current user (Galaxy.currUser)
* Note: that this will return false for an anon user even if the history is theirs.
*/
@@ -295,7 +289,7 @@ History.getHistoryData = function getHistoryData( historyId, options ){
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var HistoryCollection = Backbone.Collection.extend( LoggableMixin ).extend(
+var HistoryCollection = Backbone.Collection.extend( baseMVC.LoggableMixin ).extend(
/** @lends HistoryCollection.prototype */{
model : History,
urlRoot : galaxy_config.root + 'api/histories'
diff --git a/static/scripts/mvc/history/history-panel.js b/static/scripts/mvc/history/history-panel.js
index 0f9ab5e1615..77cc702a4a3 100644
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -84,7 +84,7 @@ var HistoryPanel = readonlyPanel.ReadOnlyHistoryPanel.extend(
$newRender.append( HistoryPanel.templates.historyPanel( this.model.toJSON() ) );
this.$emptyMessage( $newRender ).text( this.emptyMsg );
- if( Galaxy.currUser.id && Galaxy.currUser.id === this.model.get( 'user_id' ) ){
+ if( Galaxy && Galaxy.currUser && Galaxy.currUser.id && Galaxy.currUser.id === this.model.get( 'user_id' ) ){
this._renderTags( $newRender );
this._renderAnnotation( $newRender );
}
diff --git a/static/scripts/mvc/history/readonly-history-panel.js b/static/scripts/mvc/history/readonly-history-panel.js
index e6a9b421b55..d3c0b2c1028 100644
--- a/static/scripts/mvc/history/readonly-history-panel.js
+++ b/static/scripts/mvc/history/readonly-history-panel.js
@@ -1,10 +1,11 @@
define([
"mvc/history/history-model",
- "mvc/dataset/hda-base"
-], function( historyModel, hdaBase ){
+ "mvc/dataset/hda-base",
+ "mvc/base-mvc"
+], function( historyModel, hdaBase, baseMVC ){
// ============================================================================
/** session storage for individual history preferences */
-var HistoryPrefs = SessionStorageModel.extend({
+var HistoryPrefs = baseMVC.SessionStorageModel.extend({
defaults : {
//TODO:?? expandedHdas to array?
expandedHdas : {},
@@ -71,7 +72,7 @@ TODO:
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var ReadOnlyHistoryPanel = Backbone.View.extend( LoggableMixin ).extend(
+var ReadOnlyHistoryPanel = Backbone.View.extend( baseMVC.LoggableMixin ).extend(
/** @lends ReadOnlyHistoryPanel.prototype */{
/** logger used to record this.log messages, commonly set to console */
@@ -311,11 +312,11 @@ var ReadOnlyHistoryPanel = Backbone.View.extend( LoggableMixin ).extend(
attributes = attributes || {};
//this.log( 'JSONToModel:', newHistoryJSON, newHdaJSON.length, attributes );
- // set up the new model and render
- if( Galaxy && Galaxy.currUser ){
-//TODO: global
- newHistoryJSON.user = Galaxy.currUser.toJSON();
- }
+// // set up the new model and render
+// if( Galaxy && Galaxy.currUser ){
+////TODO: global
+// newHistoryJSON.user = Galaxy.currUser.toJSON();
+// }
var model = new historyModel.History( newHistoryJSON, newHdaJSON, attributes );
this.setModel( model );
return this;
@@ -334,10 +335,10 @@ var ReadOnlyHistoryPanel = Backbone.View.extend( LoggableMixin ).extend(
if( model ){
// set up the new model with user, logger, storage, events
- if( Galaxy && Galaxy.currUser ){
-//TODO: global
- model.user = Galaxy.currUser.toJSON();
- }
+// if( Galaxy && Galaxy.currUser ){
+////TODO: global
+// model.user = Galaxy.currUser.toJSON();
+// }
this.model = model;
if( this.logger ){
this.model.logger = this.logger;
diff --git a/static/scripts/mvc/tags.js b/static/scripts/mvc/tags.js
index fdd90d22cb7..200f78c927d 100644
--- a/static/scripts/mvc/tags.js
+++ b/static/scripts/mvc/tags.js
@@ -1,11 +1,12 @@
define([
-], function(){
+ "mvc/base-mvc"
+], function( baseMVC ){
// =============================================================================
/** A view on any model that has a 'tags' attribute (a list of tag strings)
* Incorporates the select2 jQuery plugin for tags display/editing:
* http://ivaynberg.github.io/select2/
*/
-var TagsEditor = Backbone.View.extend( LoggableMixin ).extend( HiddenUntilActivatedViewMixin ).extend({
+var TagsEditor = Backbone.View.extend( baseMVC.LoggableMixin ).extend( baseMVC.HiddenUntilActivatedViewMixin ).extend({
tagName : 'div',
className : 'tags-display',
diff --git a/static/scripts/mvc/user/user-model.js b/static/scripts/mvc/user/user-model.js
index fe80dc575b8..eee83e9cfe7 100644
--- a/static/scripts/mvc/user/user-model.js
+++ b/static/scripts/mvc/user/user-model.js
@@ -1,3 +1,7 @@
+define([
+ "mvc/base-mvc"
+], function( baseMVC ){
+//==============================================================================
/** @class Model for a Galaxy user (including anonymous users).
* @name User
*
@@ -6,7 +10,7 @@
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var User = Backbone.Model.extend( LoggableMixin ).extend(
+var User = Backbone.Model.extend( baseMVC.LoggableMixin ).extend(
/** @lends User.prototype */{
///** logger used to record this.log messages, commonly set to console */
@@ -107,8 +111,14 @@ User.getCurrentUserFromApi = function( options ){
};
// (stub) collection for users (shouldn't be common unless admin UI)
-var UserCollection = Backbone.Collection.extend( LoggableMixin ).extend({
+var UserCollection = Backbone.Collection.extend( baseMVC.LoggableMixin ).extend({
model : User,
urlRoot : galaxy_config.root + 'api/users'
//logger : console,
});
+
+
+//==============================================================================
+return {
+ User : User
+};});
diff --git a/static/scripts/mvc/user/user-quotameter.js b/static/scripts/mvc/user/user-quotameter.js
index 8d04f4cf6e2..c2095cc8873 100644
--- a/static/scripts/mvc/user/user-quotameter.js
+++ b/static/scripts/mvc/user/user-quotameter.js
@@ -1,3 +1,7 @@
+define([
+ "mvc/base-mvc"
+], function( baseMVC ){
+//==============================================================================
/** @class View to display a user's disk/storage usage
* either as a progress bar representing the percentage of a quota used
* or a simple text element displaying the human readable size used.
@@ -8,7 +12,7 @@
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var UserQuotaMeter = Backbone.View.extend( LoggableMixin ).extend(
+var UserQuotaMeter = Backbone.View.extend( baseMVC.LoggableMixin ).extend(
/** @lends UserQuotaMeter.prototype */{
///** logger used to record this.log messages, commonly set to console */
@@ -149,3 +153,9 @@ var UserQuotaMeter = Backbone.View.extend( LoggableMixin ).extend(
return 'UserQuotaMeter(' + this.model + ')';
}
});
+
+
+//==============================================================================
+return {
+ UserQuotaMeter : UserQuotaMeter
+};});
diff --git a/static/scripts/mvc/visualization/visualization-model.js b/static/scripts/mvc/visualization/visualization-model.js
index 83ae3e8b398..7e9b1d2e775 100644
--- a/static/scripts/mvc/visualization/visualization-model.js
+++ b/static/scripts/mvc/visualization/visualization-model.js
@@ -5,11 +5,9 @@
/** @class Model for a saved Galaxy visualization.
*
* @augments Backbone.Model
- * @borrows LoggableMixin#logger as #logger
- * @borrows LoggableMixin#log as #log
* @constructs
*/
-var Visualization = Backbone.Model.extend( LoggableMixin ).extend(
+var Visualization = Backbone.Model.extend(
/** @lends Visualization.prototype */{
///** logger used to record this.log messages, commonly set to console */
@@ -31,7 +29,7 @@ var Visualization = Backbone.Model.extend( LoggableMixin ).extend(
* @see Backbone.Model#initialize
*/
initialize : function( data ){
- this.log( this + '.initialize', data, this.attributes );
+ //this.log( this + '.initialize', data, this.attributes );
// munge config sub-object here since bbone won't handle defaults with this
if( _.isObject( data.config ) && _.isObject( this.defaults.config ) ){
@@ -84,7 +82,7 @@ var Visualization = Backbone.Model.extend( LoggableMixin ).extend(
* @borrows LoggableMixin#log as #log
* @constructs
*/
-var VisualizationCollection = Backbone.Collection.extend( LoggableMixin ).extend(
+var VisualizationCollection = Backbone.Collection.extend(
/** @lends VisualizationCollection.prototype */{
model : Visualization,
diff --git a/static/scripts/packed/mvc/annotations.js b/static/scripts/packed/mvc/annotations.js
index cf70adbd885..68261ac042f 100644
--- a/static/scripts/packed/mvc/annotations.js
+++ b/static/scripts/packed/mvc/annotations.js
@@ -1 +1 @@
-define([],function(){var a=Backbone.View.extend(LoggableMixin).extend(HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"annotation-display",initialize:function(b){b=b||{};this.tooltipConfig=b.tooltipConfig||{placement:"bottom"};this.listenTo(this.model,"change:annotation",function(){this.render()});this.hiddenUntilActivated(b.$activator,b)},render:function(){var b=this;this.$el.html(this._template());this.$el.find("[title]").tooltip(this.tooltipConfig);this.$annotation().make_text_editable({use_textarea:true,on_finish:function(c){b.$annotation().text(c);b.model.save({annotation:c},{silent:true}).fail(function(){b.$annotation().text(b.model.previous("annotation"))})}});return this},_template:function(){var b=this.model.get("annotation");return['",'
',b,"
"].join("")},$annotation:function(){return this.$el.find(".annotation")},remove:function(){this.$annotation.off();this.stopListening(this.model);Backbone.View.prototype.remove.call(this)},toString:function(){return["AnnotationEditor(",this.model+"",")"].join("")}});return{AnnotationEditor:a}});
\ No newline at end of file
+define(["mvc/base-mvc"],function(a){var b=Backbone.View.extend(a.LoggableMixin).extend(a.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"annotation-display",initialize:function(c){c=c||{};this.tooltipConfig=c.tooltipConfig||{placement:"bottom"};this.listenTo(this.model,"change:annotation",function(){this.render()});this.hiddenUntilActivated(c.$activator,c)},render:function(){var c=this;this.$el.html(this._template());this.$el.find("[title]").tooltip(this.tooltipConfig);this.$annotation().make_text_editable({use_textarea:true,on_finish:function(d){c.$annotation().text(d);c.model.save({annotation:d},{silent:true}).fail(function(){c.$annotation().text(c.model.previous("annotation"))})}});return this},_template:function(){var c=this.model.get("annotation");return['",'
',c,"
"].join("")},$annotation:function(){return this.$el.find(".annotation")},remove:function(){this.$annotation.off();this.stopListening(this.model);Backbone.View.prototype.remove.call(this)},toString:function(){return["AnnotationEditor(",this.model+"",")"].join("")}});return{AnnotationEditor:b}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/base-mvc.js b/static/scripts/packed/mvc/base-mvc.js
index f2edb4cfc36..06d343ec724 100644
--- a/static/scripts/packed/mvc/base-mvc.js
+++ b/static/scripts/packed/mvc/base-mvc.js
@@ -1 +1 @@
-var LoggableMixin={logger:null,log:function(){if(this.logger){var a=this.logger.log;if(typeof this.logger.log==="object"){a=Function.prototype.bind.call(this.logger.log,this.logger)}return a.apply(this.logger,arguments)}return undefined}};var SessionStorageModel=Backbone.Model.extend({initialize:function(b){b.id=(!_.isString(b.id))?(_.uniqueId()):(b.id);this.id=b.id;var a=(!this.isNew())?(this._read(this)):({});this.clear({silent:true});this.save(_.extend({},this.defaults,a,b),{silent:true});this.on("change",function(){this.save()})},sync:function(d,b,a){if(!a.silent){b.trigger("request",b,{},a)}var c;switch(d){case"create":c=this._create(b);break;case"read":c=this._read(b);break;case"update":c=this._update(b);break;case"delete":c=this._delete(b);break}if(c!==undefined||c!==null){if(a.success){a.success()}}else{if(a.error){a.error()}}return c},_create:function(a){var b=a.toJSON(),c=sessionStorage.setItem(a.id,JSON.stringify(b));return(c===null)?(c):(b)},_read:function(a){return JSON.parse(sessionStorage.getItem(a.id))},_update:function(a){return a._create(a)},_delete:function(a){return sessionStorage.removeItem(a.id)},isNew:function(){return !sessionStorage.hasOwnProperty(this.id)},_log:function(){return JSON.stringify(this.toJSON(),null," ")},toString:function(){return"SessionStorageModel("+this.id+")"}});(function(){SessionStorageModel.prototype=_.omit(SessionStorageModel.prototype,"url","urlRoot")}());var HiddenUntilActivatedViewMixin={hiddenUntilActivated:function(a,c){c=c||{};this.HUAVOptions={$elementShown:this.$el,showFn:jQuery.prototype.toggle,showSpeed:"fast"};_.extend(this.HUAVOptions,c||{});this.HUAVOptions.hasBeenShown=this.HUAVOptions.$elementShown.is(":visible");this.hidden=this.isHidden();if(a){var b=this;a.on("click",function(d){b.toggle(b.HUAVOptions.showSpeed)})}},isHidden:function(){return(this.HUAVOptions.$elementShown.is(":hidden"))},toggle:function(){if(this.hidden){if(!this.HUAVOptions.hasBeenShown){if(_.isFunction(this.HUAVOptions.onshowFirstTime)){this.HUAVOptions.hasBeenShown=true;this.HUAVOptions.onshowFirstTime.call(this)}}if(_.isFunction(this.HUAVOptions.onshow)){this.HUAVOptions.onshow.call(this);this.trigger("hiddenUntilActivated:shown",this)}this.hidden=false}else{if(_.isFunction(this.HUAVOptions.onhide)){this.HUAVOptions.onhide.call(this);this.trigger("hiddenUntilActivated:hidden",this)}this.hidden=true}return this.HUAVOptions.showFn.apply(this.HUAVOptions.$elementShown,arguments)}};
\ No newline at end of file
+define([],function(){var c={logger:null,log:function(){if(this.logger){var d=this.logger.log;if(typeof this.logger.log==="object"){d=Function.prototype.bind.call(this.logger.log,this.logger)}return d.apply(this.logger,arguments)}return undefined}};var a=Backbone.Model.extend({initialize:function(e){e.id=(!_.isString(e.id))?(_.uniqueId()):(e.id);this.id=e.id;var d=(!this.isNew())?(this._read(this)):({});this.clear({silent:true});this.save(_.extend({},this.defaults,d,e),{silent:true});this.on("change",function(){this.save()})},sync:function(g,e,d){if(!d.silent){e.trigger("request",e,{},d)}var f;switch(g){case"create":f=this._create(e);break;case"read":f=this._read(e);break;case"update":f=this._update(e);break;case"delete":f=this._delete(e);break}if(f!==undefined||f!==null){if(d.success){d.success()}}else{if(d.error){d.error()}}return f},_create:function(d){var e=d.toJSON(),f=sessionStorage.setItem(d.id,JSON.stringify(e));return(f===null)?(f):(e)},_read:function(d){return JSON.parse(sessionStorage.getItem(d.id))},_update:function(d){return d._create(d)},_delete:function(d){return sessionStorage.removeItem(d.id)},isNew:function(){return !sessionStorage.hasOwnProperty(this.id)},_log:function(){return JSON.stringify(this.toJSON(),null," ")},toString:function(){return"SessionStorageModel("+this.id+")"}});(function(){a.prototype=_.omit(a.prototype,"url","urlRoot")}());var b={hiddenUntilActivated:function(d,f){f=f||{};this.HUAVOptions={$elementShown:this.$el,showFn:jQuery.prototype.toggle,showSpeed:"fast"};_.extend(this.HUAVOptions,f||{});this.HUAVOptions.hasBeenShown=this.HUAVOptions.$elementShown.is(":visible");this.hidden=this.isHidden();if(d){var e=this;d.on("click",function(g){e.toggle(e.HUAVOptions.showSpeed)})}},isHidden:function(){return(this.HUAVOptions.$elementShown.is(":hidden"))},toggle:function(){if(this.hidden){if(!this.HUAVOptions.hasBeenShown){if(_.isFunction(this.HUAVOptions.onshowFirstTime)){this.HUAVOptions.hasBeenShown=true;this.HUAVOptions.onshowFirstTime.call(this)}}if(_.isFunction(this.HUAVOptions.onshow)){this.HUAVOptions.onshow.call(this);this.trigger("hiddenUntilActivated:shown",this)}this.hidden=false}else{if(_.isFunction(this.HUAVOptions.onhide)){this.HUAVOptions.onhide.call(this);this.trigger("hiddenUntilActivated:hidden",this)}this.hidden=true}return this.HUAVOptions.showFn.apply(this.HUAVOptions.$elementShown,arguments)}};return{LoggableMixin:c,SessionStorageModel:a,HiddenUntilActivatedViewMixin:b}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/dataset/hda-base.js b/static/scripts/packed/mvc/dataset/hda-base.js
index a736e41de9a..1c446a61b23 100644
--- a/static/scripts/packed/mvc/dataset/hda-base.js
+++ b/static/scripts/packed/mvc/dataset/hda-base.js
@@ -1 +1 @@
-define(["mvc/dataset/hda-model"],function(c){var b=Backbone.View.extend(LoggableMixin).extend({tagName:"div",className:"dataset hda history-panel-hda",id:function(){return"hda-"+this.model.get("id")},fxSpeed:"fast",initialize:function(e){if(e.logger){this.logger=this.model.logger=e.logger}this.log(this+".initialize:",e);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.linkTarget=e.linkTarget||"_blank";this.selectable=e.selectable||false;this.selected=e.selected||false;this.expanded=e.expanded||false;this.draggable=e.draggable||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(f,e){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(g){g=(g===undefined)?(true):(g);var e=this;this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();var f=this._buildNewRender();if(g){$(e).queue(function(h){this.$el.fadeOut(e.fxSpeed,h)})}$(e).queue(function(h){this.$el.empty().attr("class",e.className).addClass("state-"+e.model.get("state")).append(f.children());if(this.selectable){this.showSelector(0)}h()});if(g){$(e).queue(function(h){this.$el.fadeIn(e.fxSpeed,h)})}$(e).queue(function(h){this.trigger("rendered",e);if(this.model.inReadyState()){this.trigger("rendered:ready",e)}if(this.draggable){this.draggableOn()}h()});return this},_buildNewRender:function(){var e=$(b.templates.skeleton(this.model.toJSON()));e.find(".dataset-primary-actions").append(this._render_titleButtons());e.children(".dataset-body").replaceWith(this._render_body());this._setUpBehaviors(e);return e},_setUpBehaviors:function(e){e=e||this.$el;make_popup_menus(e);e.find("[title]").tooltip({placement:"bottom"})},_render_titleButtons:function(){return[this._render_displayButton()]},_render_displayButton:function(){if((this.model.get("state")===c.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===c.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===c.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){return null}var f={target:this.linkTarget,classes:"dataset-display"};if(this.model.get("purged")){f.disabled=true;f.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===c.HistoryDatasetAssociation.STATES.UPLOAD){f.disabled=true;f.title=_l("This dataset must finish uploading before it can be viewed")}else{f.title=_l("View data");f.href=this.urls.display;var e=this;f.onclick=function(){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Data Viewer: "+e.model.get("name"),type:"url",content:e.urls.display})}}}}f.faIcon="fa-eye";return faIconButton(f)},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var f=this.urls,g=this.model.get("meta_files");if(_.isEmpty(g)){return $(['','',""].join(""))}var h="dataset-"+this.model.get("id")+"-popup",e=['
"].join("");b.templates={skeleton:function(e){return _.template(a,e,{variable:"hda"})},body:function(e){return _.template(d,e,{variable:"hda"})}};return{HDABaseView:b}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/base-mvc"],function(d,b){var c=Backbone.View.extend(b.LoggableMixin).extend({tagName:"div",className:"dataset hda history-panel-hda",id:function(){return"hda-"+this.model.get("id")},fxSpeed:"fast",initialize:function(f){if(f.logger){this.logger=this.model.logger=f.logger}this.log(this+".initialize:",f);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];this.linkTarget=f.linkTarget||"_blank";this.selectable=f.selectable||false;this.selected=f.selected||false;this.expanded=f.expanded||false;this.draggable=f.draggable||false;this._setUpListeners()},_setUpListeners:function(){this.model.on("change",function(g,f){if(this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()){this.model.fetch()}else{this.render()}},this)},render:function(h){h=(h===undefined)?(true):(h);var f=this;this.$el.find("[title]").tooltip("destroy");this.urls=this.model.urls();var g=this._buildNewRender();if(h){$(f).queue(function(i){this.$el.fadeOut(f.fxSpeed,i)})}$(f).queue(function(i){this.$el.empty().attr("class",f.className).addClass("state-"+f.model.get("state")).append(g.children());if(this.selectable){this.showSelector(0)}i()});if(h){$(f).queue(function(i){this.$el.fadeIn(f.fxSpeed,i)})}$(f).queue(function(i){this.trigger("rendered",f);if(this.model.inReadyState()){this.trigger("rendered:ready",f)}if(this.draggable){this.draggableOn()}i()});return this},_buildNewRender:function(){var f=$(c.templates.skeleton(this.model.toJSON()));f.find(".dataset-primary-actions").append(this._render_titleButtons());f.children(".dataset-body").replaceWith(this._render_body());this._setUpBehaviors(f);return f},_setUpBehaviors:function(f){f=f||this.$el;make_popup_menus(f);f.find("[title]").tooltip({placement:"bottom"})},_render_titleButtons:function(){return[this._render_displayButton()]},_render_displayButton:function(){if((this.model.get("state")===d.HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.DISCARDED)||(this.model.get("state")===d.HistoryDatasetAssociation.STATES.NEW)||(!this.model.get("accessible"))){return null}var g={target:this.linkTarget,classes:"dataset-display"};if(this.model.get("purged")){g.disabled=true;g.title=_l("Cannot display datasets removed from disk")}else{if(this.model.get("state")===d.HistoryDatasetAssociation.STATES.UPLOAD){g.disabled=true;g.title=_l("This dataset must finish uploading before it can be viewed")}else{g.title=_l("View data");g.href=this.urls.display;var f=this;g.onclick=function(){if(Galaxy.frame&&Galaxy.frame.active){Galaxy.frame.add({title:"Data Viewer: "+f.model.get("name"),type:"url",content:f.urls.display})}}}}g.faIcon="fa-eye";return faIconButton(g)},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var g=this.urls,h=this.model.get("meta_files");if(_.isEmpty(h)){return $(['','',""].join(""))}var i="dataset-"+this.model.get("id")+"-popup",f=['
',_l("You are currently viewing a deleted history!"),"
","<% } %>",'
',"<% if( history.message ){ %>",'
<%= history.message %>
',"<% } %>","
",'
',_l("You are over your disk quota."),_l("Tool execution is on hold until your disk usage drops below your allocated quota."),"
",'','','
','
','",'","
",'","
","
",'','
',_l("Your history is empty. Click 'Get Data' on the left pane to start"),"
"].join("");h.templates={historyPanel:function(j){return _.template(i,j,{variable:"history"})}};return{ReadOnlyHistoryPanel:h}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/tags.js b/static/scripts/packed/mvc/tags.js
index 00d40e3d7a2..6207be60746 100644
--- a/static/scripts/packed/mvc/tags.js
+++ b/static/scripts/packed/mvc/tags.js
@@ -1 +1 @@
-define([],function(){var a=Backbone.View.extend(LoggableMixin).extend(HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",initialize:function(b){this.listenTo(this.model,"change:tags",function(){this.render()});this.hiddenUntilActivated(b.$activator,b)},render:function(){var b=this;this.$el.html(this._template());this.$input().select2({placeholder:"Add tags",width:"100%",tags:function(){return b._getTagsUsed()}});this._setUpBehaviors();return this},_template:function(){return['",''].join("")},tagsToCSV:function(){var b=this.model.get("tags");if(!_.isArray(b)||_.isEmpty(b)){return""}return b.sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){return Galaxy.currUser.get("tags_used")},_setUpBehaviors:function(){var b=this;this.$input().on("change",function(c){b.model.save({tags:c.val},{silent:true});if(c.added){b._addNewTagToTagsUsed(c.added.text+"")}})},_addNewTagToTagsUsed:function(b){var c=Galaxy.currUser.get("tags_used");if(!_.contains(c,b)){c.push(b);c.sort();Galaxy.currUser.set("tags_used",c)}},remove:function(){this.$input.off();this.stopListening(this.model);Backbone.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",this.model+"",")"].join("")}});return{TagsEditor:a}});
\ No newline at end of file
+define(["mvc/base-mvc"],function(a){var b=Backbone.View.extend(a.LoggableMixin).extend(a.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",initialize:function(c){this.listenTo(this.model,"change:tags",function(){this.render()});this.hiddenUntilActivated(c.$activator,c)},render:function(){var c=this;this.$el.html(this._template());this.$input().select2({placeholder:"Add tags",width:"100%",tags:function(){return c._getTagsUsed()}});this._setUpBehaviors();return this},_template:function(){return['",''].join("")},tagsToCSV:function(){var c=this.model.get("tags");if(!_.isArray(c)||_.isEmpty(c)){return""}return c.sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){return Galaxy.currUser.get("tags_used")},_setUpBehaviors:function(){var c=this;this.$input().on("change",function(d){c.model.save({tags:d.val},{silent:true});if(d.added){c._addNewTagToTagsUsed(d.added.text+"")}})},_addNewTagToTagsUsed:function(c){var d=Galaxy.currUser.get("tags_used");if(!_.contains(d,c)){d.push(c);d.sort();Galaxy.currUser.set("tags_used",d)}},remove:function(){this.$input.off();this.stopListening(this.model);Backbone.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",this.model+"",")"].join("")}});return{TagsEditor:b}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/user/user-model.js b/static/scripts/packed/mvc/user/user-model.js
index 65b63f5c67d..eda4c9ed941 100644
--- a/static/scripts/packed/mvc/user/user-model.js
+++ b/static/scripts/packed/mvc/user/user-model.js
@@ -1 +1 @@
-var User=Backbone.Model.extend(LoggableMixin).extend({urlRoot:galaxy_config.root+"api/users",defaults:{id:null,username:"("+_l("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null},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)})},isAnonymous:function(){return(!this.get("email"))},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 Backbone.Model.prototype.fetch.call(this,b)},clearSessionStorage:function(){for(var a in sessionStorage){if(a.indexOf("history:")===0){sessionStorage.removeItem(a)}else{if(a==="history-panel"){sessionStorage.removeItem(a)}}}},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:galaxy_config.root+"api/users"});
\ No newline at end of file
+define(["mvc/base-mvc"],function(a){var c=Backbone.Model.extend(a.LoggableMixin).extend({urlRoot:galaxy_config.root+"api/users",defaults:{id:null,username:"("+_l("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null},initialize:function(d){this.log("User.initialize:",d);this.on("loaded",function(e,f){this.log(this+" has loaded:",e,f)});this.on("change",function(e,f){this.log(this+" has changed:",e,f.changes)})},isAnonymous:function(){return(!this.get("email"))},loadFromApi:function(g,e){g=g||c.CURRENT_ID_STR;e=e||{};var d=this,f=e.success;e.success=function(i,h){d.trigger("loaded",i,h);if(f){f(i,h)}};if(g===c.CURRENT_ID_STR){e.url=this.urlRoot+"/"+c.CURRENT_ID_STR}return Backbone.Model.prototype.fetch.call(this,e)},clearSessionStorage:function(){for(var d in sessionStorage){if(d.indexOf("history:")===0){sessionStorage.removeItem(d)}else{if(d==="history-panel"){sessionStorage.removeItem(d)}}}},toString:function(){var d=[this.get("username")];if(this.get("id")){d.unshift(this.get("id"));d.push(this.get("email"))}return"User("+d.join(":")+")"}});c.CURRENT_ID_STR="current";c.getCurrentUserFromApi=function(e){var d=new c();d.loadFromApi(c.CURRENT_ID_STR,e);return d};var b=Backbone.Collection.extend(a.LoggableMixin).extend({model:c,urlRoot:galaxy_config.root+"api/users"});return{User:c}});
\ No newline at end of file
diff --git a/static/scripts/packed/mvc/user/user-quotameter.js b/static/scripts/packed/mvc/user/user-quotameter.js
index e37ab437ec5..c26f3ca19bf 100644
--- a/static/scripts/packed/mvc/user/user-quotameter.js
+++ b/static/scripts/packed/mvc/user/user-quotameter.js
@@ -1 +1 @@
-var UserQuotaMeter=Backbone.View.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(),c=a.quota_percent,b=$(this._templateQuotaMeter(a)),d=b.find(".progress-bar");if(this.isOverQuota()){d.attr("class","progress-bar progress-bar-danger");b.find(".quota-meter-text").css("color","white");this.trigger("quota:over",a)}else{if(c>=this.options.warnAtPercent){d.attr("class","progress-bar progress-bar-warning");this.trigger("quota:under quota:under:approaching",a)}else{d.attr("class","progress-bar progress-bar-success");this.trigger("quota:under quota:under:ok",a)}}return b},_render_usage:function(){var a=$(this._templateUsage(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);this.$el.find(".quota-meter-text").tooltip();return this},_templateQuotaMeter:function(a){return['