galaxy-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions
commit/galaxy-central: dan: Fix for server error caused by unicode substitution in url_for.
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1480f00e6bdc/
Changeset: 1480f00e6bdc
Branch: stable
User: dan
Date: 2014-02-18 21:09:46
Summary: Fix for server error caused by unicode substitution in url_for.
Affected #: 1 file
diff -r 15e8a74a95215bf2cc775e9848ca4a5ecc7e945f -r 1480f00e6bdcebe043b695fa1daaa0220fc0c086 templates/webapps/galaxy/mobile/history/detail.mako
--- a/templates/webapps/galaxy/mobile/history/detail.mako
+++ b/templates/webapps/galaxy/mobile/history/detail.mako
@@ -12,7 +12,7 @@
if data.state in ['no state','',None]:
data_state = "queued"
else:
- data_state = data.state
+ data_state = str( data.state )
%><li id="historyItemContainer-${data.id}">
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.
1
0
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c36dc4155beb/
Changeset: c36dc4155beb
User: dannon
Date: 2014-02-20 19:10:00
Summary: Add PyYAML 3.10 egg.
Affected #: 1 file
diff -r c7fa535a805f0cc654984fe9344ba70c90238a15 -r c36dc4155beb0ae5e117ca33e0ad231535186d6d eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -25,6 +25,7 @@
pysam = 0.4.2
pysqlite = 2.5.6
python_lzo = 1.08_2.03_static
+PyYAML = 3.10
threadframe = 0.2
guppy = 0.1.10
SQLAlchemy = 0.7.9
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.
1
0
commit/galaxy-central: carlfeberhard: Browser tests: update empty history message
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c7fa535a805f/
Changeset: c7fa535a805f
User: carlfeberhard
Date: 2014-02-20 17:56:45
Summary: Browser tests: update empty history message
Affected #: 2 files
diff -r baf2a8cc97ed720e10b6148254d7dd7478d8e839 -r c7fa535a805f0cc654984fe9344ba70c90238a15 test/casperjs/history-panel-tests.js
--- a/test/casperjs/history-panel-tests.js
+++ b/test/casperjs/history-panel-tests.js
@@ -95,7 +95,7 @@
this.test.assertExists( emptyMsgSelector, emptyMsgSelector + ' exists' );
this.test.assertVisible( emptyMsgSelector, 'Empty history message is visible' );
this.test.assertSelectorHasText( emptyMsgSelector, emptyMsgStr,
- 'Message contains "' + emptyMsgStr + '"' );
+ 'Message contains\n"' + emptyMsgStr + '":\n"' + this.fetchText( emptyMsgSelector ) + '"' );
});
// ------------------------------------------------------------------- name editing
@@ -157,7 +157,7 @@
spaceghost.tools.uploadFile( filepathToUpload, function uploadCallback( _uploadInfo ){
this.test.comment( 'uploaded file should appear in history' );
- this.debug( 'uploaded HDA info: ' + this.jsonStr( _uploadInfo ) );
+ //this.debug( 'uploaded HDA info: ' + this.jsonStr( _uploadInfo ) );
var hasHda = _uploadInfo.hdaElement,
hasClass = _uploadInfo.hdaElement.attributes[ 'class' ],
hasOkClass = _uploadInfo.hdaElement.attributes[ 'class' ].indexOf( wrapperOkClassName ) !== -1;
diff -r baf2a8cc97ed720e10b6148254d7dd7478d8e839 -r c7fa535a805f0cc654984fe9344ba70c90238a15 test/casperjs/modules/historypanel.js
--- a/test/casperjs/modules/historypanel.js
+++ b/test/casperjs/modules/historypanel.js
@@ -388,7 +388,7 @@
},
newName : 'Unnamed history',
newSize : '0 bytes',
- emptyMsg : "Your history is empty. Click 'Get Data' on the left pane to start"
+ emptyMsg : "This history is empty. Click 'Get Data' on the left pane to start"
},
hda : {
datasetFetchErrorMsg : 'There was an error getting the data for this dataset'
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.
1
0
commit/galaxy-central: dan: Fix for ToolEvaluator with optional Dataset Input selected with multiple inputs.
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/baf2a8cc97ed/
Changeset: baf2a8cc97ed
User: dan
Date: 2014-02-20 17:52:52
Summary: Fix for ToolEvaluator with optional Dataset Input selected with multiple inputs.
Affected #: 1 file
diff -r d01fc0370afece3ef77b63a116fd9a1c2105c2e4 -r baf2a8cc97ed720e10b6148254d7dd7478d8e839 lib/galaxy/tools/evaluation.py
--- a/lib/galaxy/tools/evaluation.py
+++ b/lib/galaxy/tools/evaluation.py
@@ -232,10 +232,11 @@
tool=self,
name=name,
)
- real_path = data.file_name
- if real_path in input_dataset_paths:
- dataset_path = input_dataset_paths[ real_path ]
- wrapper_kwds[ 'dataset_path' ] = dataset_path
+ if data:
+ real_path = data.file_name
+ if real_path in input_dataset_paths:
+ dataset_path = input_dataset_paths[ real_path ]
+ wrapper_kwds[ 'dataset_path' ] = dataset_path
param_dict[name] = DatasetFilenameWrapper( data, **wrapper_kwds )
if data:
for child in data.children:
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.
1
0
commit/galaxy-central: clayton_turner: Added ignore lines starting with specific characters to group tool
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ad5156120f53/
Changeset: ad5156120f53
User: clayton_turner
Date: 2014-02-10 22:00:30
Summary: Added ignore lines starting with specific characters to group tool
Affected #: 2 files
diff -r c458a0fe1ba816098fed03370f425f346bb1df68 -r ad5156120f533aeecc1dc69d92ef19ec68a6223b tools/stats/grouping.py
--- a/tools/stats/grouping.py
+++ b/tools/stats/grouping.py
@@ -37,7 +37,22 @@
round_val = []
data_ary = []
- for var in sys.argv[5:]:
+ if sys.argv[5] != "None":
+ oldfile = open(inputfile,'r')
+ oldfilelines = oldfile.readlines()
+ newinputfile = inputfile+'2'
+ newfile = open(newinputfile,'w')
+ asciitodelete = sys.argv[5].split(',')
+ for i in range(len(asciitodelete)):
+ asciitodelete[i] = chr(int(asciitodelete[i]))
+ for line in oldfilelines:
+ if line[0] not in asciitodelete:
+ newfile.write(line)
+ oldfile.close()
+ newfile.close()
+ inputfile = newinputfile
+
+ for var in sys.argv[6:]:
op, col, do_round = var.split()
ops.append(op)
cols.append(col)
diff -r c458a0fe1ba816098fed03370f425f346bb1df68 -r ad5156120f533aeecc1dc69d92ef19ec68a6223b tools/stats/grouping.xml
--- a/tools/stats/grouping.xml
+++ b/tools/stats/grouping.xml
@@ -6,6 +6,7 @@
$input1
$groupcol
$ignorecase
+ $ignorelines
#for $op in $operations
'${op.optype}
${op.opcol}
@@ -18,6 +19,24 @@
<param name="ignorecase" type="boolean" truevalue="1" falsevalue="0"><label>Ignore case while grouping?</label></param>
+ <param name="ignorelines" type="select" display="checkboxes" multiple="True" label="Ignore lines beginning with these characters" help="lines beginning with these are not grouped">
+ <option value="62">></option>
+ <option value="64">@</option>
+ <option value="43">+</option>
+ <option value="60"><</option>
+ <option value="42">*</option>
+ <option value="45">-</option>
+ <option value="61">=</option>
+ <option value="124">|</option>
+ <option value="63">?</option>
+ <option value="36">$</option>
+ <option value="46">.</option>
+ <option value="58">:</option>
+ <option value="38">&</option>
+ <option value="37">%</option>
+ <option value="94">^</option>
+ <option value="35">#</option>
+ </param><repeat name="operations" title="Operation"><param name="optype" type="select" label="Type"><option value="mean">Mean</option>
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.
1
0
commit/galaxy-central: carlfeberhard: History published/shared/display as slug: use annotated-history-panel, search open by default, preserve whitespace in annotations, replace import button with 'switch to' if owned by user viewing; Annotated History Panel: panel view of history that shows datasets as a table with additional dataset info in a left cell
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8e4196a87a2b/
Changeset: 8e4196a87a2b
User: carlfeberhard
Date: 2014-02-20 17:34:19
Summary: History published/shared/display as slug: use annotated-history-panel, search open by default, preserve whitespace in annotations, replace import button with 'switch to' if owned by user viewing; Annotated History Panel: panel view of history that shows datasets as a table with additional dataset info in a left cell
Affected #: 10 files
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -760,7 +760,9 @@
return self.get_inaccessible_hda_dict( trans, hda )
hda_dict[ 'accessible' ] = True
+ #TODO: I'm unclear as to which access pattern is right
hda_dict[ 'annotation' ] = hda.get_item_annotation_str( trans.sa_session, trans.user, hda )
+ #annotation = getattr( hda, 'annotation', hda.get_item_annotation_str( trans.sa_session, trans.user, hda ) )
# ---- return here if deleted AND purged OR can't access
purged = ( hda.purged or hda.dataset.purged )
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -904,8 +904,9 @@
@web.expose
def display_by_username_and_slug( self, trans, username, slug ):
- """ Display history based on a username and slug. """
-
+ """
+ Display history based on a username and slug.
+ """
# Get history.
session = trans.sa_session
user = session.query( model.User ).filter_by( username=username ).first()
@@ -931,7 +932,19 @@
user_item_rating = 0
ave_item_rating, num_ratings = self.get_ave_item_rating_data( trans.sa_session, history )
+ # create ownership flag for template, dictify models
+ # note: adding original annotation since this is published - get_dict returns user-based annos
+ user_is_owner = trans.user == history.user
+ hda_dicts = []
+ for hda in datasets:
+ hda_dict = self.get_hda_dict( trans, hda )
+ hda_dict[ 'annotation' ] = hda.annotation
+ hda_dicts.append( hda_dict )
+ history_dict = self.get_history_dict( trans, history, hda_dictionaries=hda_dicts )
+ history_dict[ 'annotation' ] = history.annotation
+
return trans.stream_template_mako( "history/display.mako", item=history, item_data=datasets,
+ user_is_owner=user_is_owner, history_dict=history_dict, hda_dicts=hda_dicts,
user_item_rating = user_item_rating, ave_item_rating=ave_item_rating, num_ratings=num_ratings )
@web.expose
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/scripts/mvc/history/annotated-history-panel.js
--- /dev/null
+++ b/static/scripts/mvc/history/annotated-history-panel.js
@@ -0,0 +1,118 @@
+define([
+ "mvc/dataset/hda-model",
+ "mvc/dataset/hda-base",
+ "mvc/history/readonly-history-panel"
+], function( hdaModel, hdaBase, readonlyPanel ){
+/* =============================================================================
+TODO:
+
+============================================================================= */
+/** @class View/Controller for a tabular view of the history model.
+ * @name AnnotatedHistoryPanel
+ *
+ * As ReadOnlyHistoryPanel, but with:
+ * history annotation always shown
+ * datasets displayed in a table:
+ * datasets in left cells, dataset annotations in the right
+ *
+ * @augments Backbone.View
+ * @borrows LoggableMixin#logger as #logger
+ * @borrows LoggableMixin#log as #log
+ * @constructs
+ */
+var AnnotatedHistoryPanel = readonlyPanel.ReadOnlyHistoryPanel.extend(
+/** @lends HistoryPanel.prototype */{
+
+ ///** logger used to record this.log messages, commonly set to console */
+ //// comment this out to suppress log output
+ //logger : console,
+
+ className : 'annotated-history-panel',
+
+ /** class to use for constructing the HDA views */
+ HDAViewClass : hdaBase.HDABaseView,
+
+ // ------------------------------------------------------------------------ panel rendering
+ renderModel : function( ){
+ // huh?
+ this.$el.addClass( this.className );
+ var $newRender = readonlyPanel.ReadOnlyHistoryPanel.prototype.renderModel.call( this ),
+ // move datasets from div to table
+ $datasetsList = $newRender.find( this.datasetsSelector ),
+ $datasetsTable = $( '<table/>' ).addClass( 'datasets-list datasets-table' );
+ $datasetsTable.append( $datasetsList.children() );
+ $newRender.find( this.datasetsSelector ).replaceWith( $datasetsTable );
+ //TODO: it's possible to do this with css only, right?
+
+ // add history annotation under subtitle
+ $newRender.find( '.history-subtitle' ).after( this.renderHistoryAnnotation() );
+
+ // hide search button, move search bar beneath controls (instead of above title), show, and set up
+ $newRender.find( '.history-search-btn' ).hide();
+ $newRender.find( '.history-controls' ).after( $newRender.find( '.history-search-controls' ).show() );
+ this.setUpSearchInput( $newRender.find( '.history-search-input' ) );
+
+ return $newRender;
+ },
+
+ renderHistoryAnnotation : function(){
+ var annotation = this.model.get( 'annotation' );
+ if( !annotation ){ return null; }
+ return $([
+ '<div class="history-annotation">', annotation, '</div>'
+ ].join( '' ));
+ },
+
+ renderHdas : function( $whereTo ){
+ $whereTo = $whereTo || this.$el;
+ var hdaViews = readonlyPanel.ReadOnlyHistoryPanel.prototype.renderHdas.call( this, $whereTo );
+ $whereTo.find( this.datasetsSelector ).prepend( $( '<tr/>' ).addClass( 'headers' ).append([
+ $( '<th/>' ).text( _l( 'Dataset' ) ),
+ $( '<th/>' ).text( _l( 'Annotation' ) )
+ ]));
+ return hdaViews;
+ },
+
+ // ------------------------------------------------------------------------ hda sub-views
+ attachHdaView : function( hdaView, $whereTo ){
+ $whereTo = $whereTo || this.$el;
+ // build a row around the dataset with the std hdaView in the first cell and the annotation in the next
+ var stateClass = _.find( hdaView.el.classList, function( c ){ return ( /^state\-/ ).test( c ); }),
+ annotation = hdaView.model.get( 'annotation' ) || '',
+ $tr = $( '<tr/>' ).addClass( 'dataset-row' ).append([
+ $( '<td/>' ).addClass( 'dataset-container' ).append( hdaView.$el )
+ // visually match the cell bg to the dataset at runtime (prevents the empty space)
+ // (getting bg via jq on hidden elem doesn't work on chrome/webkit - so use states)
+ //.css( 'background-color', hdaView.$el.css( 'background-color' ) ),
+ .addClass( stateClass? stateClass.replace( '-', '-color-' ): '' ),
+ $( '<td/>' ).addClass( 'additional-info' ).text( annotation )
+ ]);
+ $whereTo.find( this.datasetsSelector ).append( $tr );
+ },
+
+ // ------------------------------------------------------------------------ panel events
+ /** event map */
+ events : _.extend( _.clone( readonlyPanel.ReadOnlyHistoryPanel.prototype.events ), {
+ 'click tr' : function( ev ){
+ //if( !ev.target.hasAttribute( 'href' ) ){
+ $( ev.currentTarget ).find( '.dataset-title-bar' ).click();
+ //}
+ },
+ // prevent propagation on icon btns so they won't bubble up to tr and toggleBodyVisibility
+ 'click .icon-btn' : function( ev ){
+ ev.stopPropagation();
+ }
+ }),
+
+ // ........................................................................ misc
+ /** Return a string rep of the history */
+ toString : function(){
+ return 'AnnotatedHistoryPanel(' + (( this.model )?( this.model.get( 'name' )):( '' )) + ')';
+ }
+});
+
+//==============================================================================
+ return {
+ AnnotatedHistoryPanel : AnnotatedHistoryPanel
+ };
+});
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/scripts/mvc/history/readonly-history-panel.js
--- a/static/scripts/mvc/history/readonly-history-panel.js
+++ b/static/scripts/mvc/history/readonly-history-panel.js
@@ -526,7 +526,6 @@
$whereTo = $whereTo || this.$el;
var historyView = this,
newHdaViews = {},
- $datasetsList = $whereTo.find( this.datasetsSelector ),
// only render the shown hdas
//TODO: switch to more general filtered pattern
visibleHdas = this.model.hdas.getVisible(
@@ -536,7 +535,7 @@
);
//console.debug( 'renderHdas, visibleHdas:', visibleHdas, $whereTo );
//TODO: prepend to sep div, add as one
- $datasetsList.empty();
+ $whereTo.find( this.datasetsSelector ).empty();
if( visibleHdas.length ){
visibleHdas.each( function( hda ){
@@ -547,7 +546,7 @@
if( _.contains( historyView.selectedHdaIds, hdaId ) ){
hdaView.selected = true;
}
- $datasetsList.prepend( hdaView.render().$el );
+ historyView.attachHdaView( hdaView.render(), $whereTo );
});
$whereTo.find( this.emptyMsgSelector ).hide();
@@ -561,6 +560,12 @@
return this.hdaViews;
},
+ attachHdaView : function( hdaView, $whereTo ){
+ $whereTo = $whereTo || this.$el;
+ var $datasetsList = $whereTo.find( this.datasetsSelector );
+ $datasetsList.prepend( hdaView.$el );
+ },
+
/** Add an hda view to the panel for the given hda
* @param {HistoryDatasetAssociation} hda
*/
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/scripts/packed/mvc/history/annotated-history-panel.js
--- /dev/null
+++ b/static/scripts/packed/mvc/history/annotated-history-panel.js
@@ -0,0 +1,1 @@
+define(["mvc/dataset/hda-model","mvc/dataset/hda-base","mvc/history/readonly-history-panel"],function(c,a,b){var d=b.ReadOnlyHistoryPanel.extend({className:"annotated-history-panel",HDAViewClass:a.HDABaseView,renderModel:function(){this.$el.addClass(this.className);var g=b.ReadOnlyHistoryPanel.prototype.renderModel.call(this),e=g.find(this.datasetsSelector),f=$("<table/>").addClass("datasets-list datasets-table");f.append(e.children());g.find(this.datasetsSelector).replaceWith(f);g.find(".history-subtitle").after(this.renderHistoryAnnotation());g.find(".history-search-btn").hide();g.find(".history-controls").after(g.find(".history-search-controls").show());this.setUpSearchInput(g.find(".history-search-input"));return g},renderHistoryAnnotation:function(){var e=this.model.get("annotation");if(!e){return null}return $(['<div class="history-annotation">',e,"</div>"].join(""))},renderHdas:function(f){f=f||this.$el;var e=b.ReadOnlyHistoryPanel.prototype.renderHdas.call(this,f);f.find(this.datasetsSelector).prepend($("<tr/>").addClass("headers").append([$("<th/>").text(_l("Dataset")),$("<th/>").text(_l("Annotation"))]));return e},attachHdaView:function(h,f){f=f||this.$el;var i=_.find(h.el.classList,function(j){return(/^state\-/).test(j)}),e=h.model.get("annotation")||"",g=$("<tr/>").addClass("dataset-row").append([$("<td/>").addClass("dataset-container").append(h.$el).addClass(i?i.replace("-","-color-"):""),$("<td/>").addClass("additional-info").text(e)]);f.find(this.datasetsSelector).append(g)},events:_.extend(_.clone(b.ReadOnlyHistoryPanel.prototype.events),{"click tr":function(e){$(e.currentTarget).find(".dataset-title-bar").click()},"click .icon-btn":function(e){e.stopPropagation()}}),toString:function(){return"AnnotatedHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});return{AnnotatedHistoryPanel:d}});
\ No newline at end of file
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/scripts/packed/mvc/history/readonly-history-panel.js
--- a/static/scripts/packed/mvc/history/readonly-history-panel.js
+++ b/static/scripts/packed/mvc/history/readonly-history-panel.js
@@ -1,1 +1,1 @@
-define(["mvc/history/history-model","mvc/dataset/hda-base"],function(e,a){var d=SessionStorageModel.extend({defaults:{expandedHdas:{},show_deleted:false,show_hidden:false},addExpandedHda:function(f){this.save("expandedHdas",_.extend(this.get("expandedHdas"),_.object([f],[true])))},removeExpandedHda:function(f){this.save("expandedHdas",_.omit(this.get("expandedHdas"),f))},toString:function(){return"HistoryPrefs("+this.id+")"}});d.historyStorageKey=function c(f){if(!f){throw new Error("HistoryPrefs.historyStorageKey needs valid id: "+f)}return("history:"+f)};var b=Backbone.View.extend(LoggableMixin).extend({HDAViewClass:a.HDABaseView,tagName:"div",className:"history-panel",fxSpeed:"fast",datasetsSelector:".datasets-list",msgsSelector:".message-container",emptyMsgSelector:".empty-history-message",emptyMsg:_l("This history is empty"),noneFoundMsg:_l("No matching datasets found"),initialize:function(f){f=f||{};if(f.logger){this.logger=f.logger}this.log(this+".initialize:",f);this.linkTarget=f.linkTarget||"_blank";this.fxSpeed=_.has(f,"fxSpeed")?(f.fxSpeed):(this.fxSpeed);this.hdaViews={};this.indicator=new LoadingIndicator(this.$el);this.filters=[];this.searchFor="";this._setUpListeners();if(this.model){this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers()}if(f.onready){f.onready.call(this)}},_setUpListeners:function(){this.on("error",function(g,j,f,i,h){this.errorHandler(g,j,f,i,h)});this.on("loading-history",function(){this.showLoadingIndicator("loading history...",40)});this.on("loading-done",function(){this.hideLoadingIndicator(40);if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});if(this.logger){this.on("all",function(f){this.log(this+"",arguments)},this)}},errorHandler:function(h,k,g,j,i){var f=this._parseErrorMessage(h,k,g,j,i);if(k&&k.status===0&&k.readyState===0){}else{if(k&&k.status===502){}else{if(!this.$el.find(this.msgsSelector).is(":visible")){this.once("rendered",function(){this.displayMessage("error",f.message,f.details)})}else{this.displayMessage("error",f.message,f.details)}}}},_parseErrorMessage:function(i,m,h,l,k){var g=Galaxy.currUser,f={message:this._bePolite(l),details:{user:(g instanceof User)?(g.toJSON()):(g+""),source:(i instanceof Backbone.Model)?(i.toJSON()):(i+""),xhr:m,options:(m)?(_.omit(h,"xhr")):(h)}};_.extend(f.details,k||{});if(m&&_.isFunction(m.getAllResponseHeaders)){var j=m.getAllResponseHeaders();j=_.compact(j.split("\n"));j=_.map(j,function(n){return n.split(": ")});f.details.xhr.responseHeaders=_.object(j)}return f},_bePolite:function(f){f=f||_l("An error occurred while getting updates from the server");return f+". "+_l("Please contact a Galaxy administrator if the problem persists.")},loadHistoryWithHDADetails:function(i,h,g,k){var f=this,j=function(l){return f.getExpandedHdaIds(l.id)};return this.loadHistory(i,h,g,k,j)},loadHistory:function(i,h,g,l,j){this.trigger("loading-history",this);h=h||{};var f=this;var k=e.History.getHistoryData(i,{historyFn:g,hdaFn:l,hdaDetailIds:h.initiallyExpanded||j});return this._loadHistoryFromXHR(k,h).fail(function(o,m,n){f.trigger("error",f,o,h,_l("An error was encountered while "+m),{historyId:i,history:n||{}})}).always(function(){f.trigger("loading-done",f)})},_loadHistoryFromXHR:function(h,g){var f=this;h.then(function(i,j){f.setModel(i,j,g)});h.fail(function(j,i){f.render()});return h},setModel:function(h,f,g){g=g||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){h.user=Galaxy.currUser.toJSON()}this.model=new e.History(h,f,g);this._setUpWebStorage(g.initiallyExpanded,g.show_deleted,g.show_hidden);this._setUpModelEventHandlers();this.selectedHdaIds=[];this.trigger("new-model",this);this.render();return this},_setUpWebStorage:function(g,f,h){this.storage=new d({id:d.historyStorageKey(this.model.get("id"))});if(_.isObject(g)){this.storage.set("exandedHdas",g)}if(_.isBoolean(f)){this.storage.set("show_deleted",f)}if(_.isBoolean(h)){this.storage.set("show_hidden",h)}this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var f in sessionStorage){if(f.indexOf("history:")===0){sessionStorage.removeItem(f)}}},getStoredOptions:function(g){if(!g||g==="current"){return(this.storage)?(this.storage.get()):({})}var f=sessionStorage.getItem(d.historyStorageKey(g));return(f===null)?({}):(JSON.parse(f))},getExpandedHdaIds:function(f){var g=this.getStoredOptions(f).expandedHdas;return((_.isEmpty(g))?([]):(_.keys(g)))},_setUpModelEventHandlers:function(){this.model.hdas.on("add",this.addHdaView,this);this.model.on("error error:hdas",function(g,i,f,h){this.errorHandler(g,i,f,h)},this)},render:function(h,i){h=(h===undefined)?(this.fxSpeed):(h);var f=this,g;if(this.model){g=this.renderModel()}else{g=this.renderWithoutModel()}$(f).queue("fx",[function(j){if(h&&f.$el.is(":visible")){f.$el.fadeOut(h,j)}else{j()}},function(j){f.$el.empty();if(g){f.$el.append(g.children())}j()},function(j){if(h&&!f.$el.is(":visible")){f.$el.fadeIn(h,j)}else{j()}},function(j){if(i){i.call(this)}f.trigger("rendered",this);j()}]);return this},renderWithoutModel:function(){var f=$("<div/>"),g=$("<div/>").addClass("message-container").css({"margin-left":"4px","margin-right":"4px"});return f.append(g)},renderModel:function(){var f=$("<div/>");f.append(b.templates.historyPanel(this.model.toJSON()));f.find(".history-secondary-actions").prepend(this._renderSearchButton());this._setUpBehaviours(f);this.renderHdas(f);return f},_renderSearchButton:function(f){return faIconButton({title:_l("Search datasets"),classes:"history-search-btn",faIcon:"fa-search"})},_setUpBehaviours:function(f){f=f||this.$el;f.find("[title]").tooltip({placement:"bottom"})},createHdaView:function(g){var f=g.get("id"),h=new this.HDAViewClass({model:g,linkTarget:this.linkTarget,expanded:this.storage.get("expandedHdas")[f],hasUser:this.model.ownedByCurrUser(),logger:this.logger});this._setUpHdaListeners(h);return h},_setUpHdaListeners:function(g){var f=this;g.on("body-expanded",function(h){f.storage.addExpandedHda(h)});g.on("body-collapsed",function(h){f.storage.removeExpandedHda(h)});g.on("error",function(i,k,h,j){f.errorHandler(i,k,h,j)})},renderHdas:function(h){h=h||this.$el;var g=this,j={},f=h.find(this.datasetsSelector),i=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"),this.filters);f.empty();if(i.length){i.each(function(l){var k=l.get("id"),m=g.createHdaView(l);j[k]=m;if(_.contains(g.selectedHdaIds,k)){m.selected=true}f.prepend(m.render().$el)});h.find(this.emptyMsgSelector).hide()}else{h.find(this.emptyMsgSelector).text((this.model.hdas.length&&this.searchFor)?(this.noneFoundMsg):(this.emptyMsg)).show()}this.hdaViews=j;return this.hdaViews},addHdaView:function(i){this.log("add."+this,i);var g=this;if(!i.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function h(k){var j=g.$el.find(g.emptyMsgSelector);if(j.is(":visible")){j.fadeOut(g.fxSpeed,k)}else{k()}},function f(k){g.scrollToTop();var j=g.$el.find(g.datasetsSelector),l=g.createHdaView(i);g.hdaViews[i.id]=l;l.render().$el.hide().prependTo(j).slideDown(g.fxSpeed)}])},refreshHdas:function(g,f){if(this.model){return this.model.refresh(g,f)}return $.when()},events:{"click .message-container":"clearMessages","click .history-search-btn":"toggleSearchControls"},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(f){f.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.renderHdas();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.renderHdas();return this.storage.get("show_hidden")},setUpSearchInput:function(g){var h=this,k=".history-search-input";function j(l){h.searchFor=l;h.filters=[function(m){return m.matchesAll(h.searchFor)}];h.trigger("search:searching",l,h);h.renderHdas()}function f(l){if(h.model.hdas.haveDetails()){j(l);return}h.$el.find(k).searchInput("toggle-loading");h.model.hdas.fetchAllDetails({silent:true}).always(function(){h.$el.find(k).searchInput("toggle-loading")}).done(function(){j(l)})}function i(){h.searchFor="";h.filters=[];h.trigger("search:clear",h);h.renderHdas()}g.searchInput({initialVal:h.searchFor,name:"history-search",placeholder:"search datasets",classes:"history-search",onfirstsearch:f,onsearch:j,onclear:i});return g},showSearchControls:function(g){g=(g===undefined)?(this.fxSpeed):(g);var f=this.$el.find(".history-search-controls"),h=f.find(".history-search-input");if(!h.children().size()){this.setUpSearchInput(h)}f.slideDown(g,function(){$(this).find("input").focus()})},hideSearchControls:function(f){f=(f===undefined)?(this.fxSpeed):(f);this.$el.find(".history-search-controls").slideUp(f)},toggleSearchControls:function(f){speed=(jQuery.type(f)==="number")?(f):(this.fxSpeed);if(this.$el.find(".history-search-controls").is(":visible")){this.hideSearchControls(speed)}else{this.showSearchControls(speed)}},showLoadingIndicator:function(g,f,h){f=(f!==undefined)?(f):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,h)}else{this.$el.fadeOut(f);this.indicator.show(g,f,h)}},hideLoadingIndicator:function(f,g){f=(f!==undefined)?(f):(this.fxSpeed);if(this.indicator){this.indicator.hide(f,g)}},displayMessage:function(k,l,j){var h=this;this.scrollToTop();var i=this.$el.find(this.msgsSelector),f=$("<div/>").addClass(k+"message").html(l);if(!_.isEmpty(j)){var g=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(h._messageToModalOptions(k,l,j));return false});f.append(" ",g)}return i.html(f)},_messageToModalOptions:function(j,l,i){var f=this,k=$("<div/>"),h={title:"Details"};function g(m){m=_.omit(m,_.functions(m));return["<table>",_.map(m,function(o,n){o=(_.isObject(o))?(g(o)):(o);return'<tr><td style="vertical-align: top; color: grey">'+n+'</td><td style="padding-left: 8px">'+o+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(i)){h.body=k.append(g(i))}else{h.body=k.html(i)}h.buttons={Ok:function(){Galaxy.modal.hide();f.clearMessages()}};return h},clearMessages:function(){var f=this.$el.find(this.msgsSelector);f.empty()},scrollPosition:function(){return this.$el.scrollTop()},scrollTo:function(f){this.$el.scrollTop(f);return this},scrollToTop:function(){this.$el.scrollTop(0);return this},scrollIntoView:function(k,g){if(g===undefined){this.scrollTo(k);return this}var f=window,j=this.$el.parent(),i=$(f).innerHeight(),h=(i/2)-(g/2);this.scrollTo(k-h);return this},scrollToId:function(g){if((!g)||(!this.hdaViews[g])){return this}var f=this.hdaViews[g].$el;this.scrollIntoView(f.offset().top,f.outerHeight());return this},scrollToHid:function(f){var g=this.model.hdas.getByHid(f);if(!g){return this}return this.scrollToId(g.id)},toString:function(){return"ReadOnlyHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});b.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{ReadOnlyHistoryPanel:b}});
\ No newline at end of file
+define(["mvc/history/history-model","mvc/dataset/hda-base"],function(e,a){var d=SessionStorageModel.extend({defaults:{expandedHdas:{},show_deleted:false,show_hidden:false},addExpandedHda:function(f){this.save("expandedHdas",_.extend(this.get("expandedHdas"),_.object([f],[true])))},removeExpandedHda:function(f){this.save("expandedHdas",_.omit(this.get("expandedHdas"),f))},toString:function(){return"HistoryPrefs("+this.id+")"}});d.historyStorageKey=function c(f){if(!f){throw new Error("HistoryPrefs.historyStorageKey needs valid id: "+f)}return("history:"+f)};var b=Backbone.View.extend(LoggableMixin).extend({HDAViewClass:a.HDABaseView,tagName:"div",className:"history-panel",fxSpeed:"fast",datasetsSelector:".datasets-list",msgsSelector:".message-container",emptyMsgSelector:".empty-history-message",emptyMsg:_l("This history is empty"),noneFoundMsg:_l("No matching datasets found"),initialize:function(f){f=f||{};if(f.logger){this.logger=f.logger}this.log(this+".initialize:",f);this.linkTarget=f.linkTarget||"_blank";this.fxSpeed=_.has(f,"fxSpeed")?(f.fxSpeed):(this.fxSpeed);this.hdaViews={};this.indicator=new LoadingIndicator(this.$el);this.filters=[];this.searchFor="";this._setUpListeners();if(this.model){this._setUpWebStorage(f.initiallyExpanded,f.show_deleted,f.show_hidden);this._setUpModelEventHandlers()}if(f.onready){f.onready.call(this)}},_setUpListeners:function(){this.on("error",function(g,j,f,i,h){this.errorHandler(g,j,f,i,h)});this.on("loading-history",function(){this.showLoadingIndicator("loading history...",40)});this.on("loading-done",function(){this.hideLoadingIndicator(40);if(_.isEmpty(this.hdaViews)){this.trigger("empty-history",this)}});this.once("rendered",function(){this.trigger("rendered:initial",this);return false});if(this.logger){this.on("all",function(f){this.log(this+"",arguments)},this)}},errorHandler:function(h,k,g,j,i){var f=this._parseErrorMessage(h,k,g,j,i);if(k&&k.status===0&&k.readyState===0){}else{if(k&&k.status===502){}else{if(!this.$el.find(this.msgsSelector).is(":visible")){this.once("rendered",function(){this.displayMessage("error",f.message,f.details)})}else{this.displayMessage("error",f.message,f.details)}}}},_parseErrorMessage:function(i,m,h,l,k){var g=Galaxy.currUser,f={message:this._bePolite(l),details:{user:(g instanceof User)?(g.toJSON()):(g+""),source:(i instanceof Backbone.Model)?(i.toJSON()):(i+""),xhr:m,options:(m)?(_.omit(h,"xhr")):(h)}};_.extend(f.details,k||{});if(m&&_.isFunction(m.getAllResponseHeaders)){var j=m.getAllResponseHeaders();j=_.compact(j.split("\n"));j=_.map(j,function(n){return n.split(": ")});f.details.xhr.responseHeaders=_.object(j)}return f},_bePolite:function(f){f=f||_l("An error occurred while getting updates from the server");return f+". "+_l("Please contact a Galaxy administrator if the problem persists.")},loadHistoryWithHDADetails:function(i,h,g,k){var f=this,j=function(l){return f.getExpandedHdaIds(l.id)};return this.loadHistory(i,h,g,k,j)},loadHistory:function(i,h,g,l,j){this.trigger("loading-history",this);h=h||{};var f=this;var k=e.History.getHistoryData(i,{historyFn:g,hdaFn:l,hdaDetailIds:h.initiallyExpanded||j});return this._loadHistoryFromXHR(k,h).fail(function(o,m,n){f.trigger("error",f,o,h,_l("An error was encountered while "+m),{historyId:i,history:n||{}})}).always(function(){f.trigger("loading-done",f)})},_loadHistoryFromXHR:function(h,g){var f=this;h.then(function(i,j){f.setModel(i,j,g)});h.fail(function(j,i){f.render()});return h},setModel:function(h,f,g){g=g||{};if(this.model){this.model.clearUpdateTimeout();this.stopListening(this.model);this.stopListening(this.model.hdas)}this.hdaViews={};if(Galaxy&&Galaxy.currUser){h.user=Galaxy.currUser.toJSON()}this.model=new e.History(h,f,g);this._setUpWebStorage(g.initiallyExpanded,g.show_deleted,g.show_hidden);this._setUpModelEventHandlers();this.selectedHdaIds=[];this.trigger("new-model",this);this.render();return this},_setUpWebStorage:function(g,f,h){this.storage=new d({id:d.historyStorageKey(this.model.get("id"))});if(_.isObject(g)){this.storage.set("exandedHdas",g)}if(_.isBoolean(f)){this.storage.set("show_deleted",f)}if(_.isBoolean(h)){this.storage.set("show_hidden",h)}this.trigger("new-storage",this.storage,this);this.log(this+" (init'd) storage:",this.storage.get())},clearWebStorage:function(){for(var f in sessionStorage){if(f.indexOf("history:")===0){sessionStorage.removeItem(f)}}},getStoredOptions:function(g){if(!g||g==="current"){return(this.storage)?(this.storage.get()):({})}var f=sessionStorage.getItem(d.historyStorageKey(g));return(f===null)?({}):(JSON.parse(f))},getExpandedHdaIds:function(f){var g=this.getStoredOptions(f).expandedHdas;return((_.isEmpty(g))?([]):(_.keys(g)))},_setUpModelEventHandlers:function(){this.model.hdas.on("add",this.addHdaView,this);this.model.on("error error:hdas",function(g,i,f,h){this.errorHandler(g,i,f,h)},this)},render:function(h,i){h=(h===undefined)?(this.fxSpeed):(h);var f=this,g;if(this.model){g=this.renderModel()}else{g=this.renderWithoutModel()}$(f).queue("fx",[function(j){if(h&&f.$el.is(":visible")){f.$el.fadeOut(h,j)}else{j()}},function(j){f.$el.empty();if(g){f.$el.append(g.children())}j()},function(j){if(h&&!f.$el.is(":visible")){f.$el.fadeIn(h,j)}else{j()}},function(j){if(i){i.call(this)}f.trigger("rendered",this);j()}]);return this},renderWithoutModel:function(){var f=$("<div/>"),g=$("<div/>").addClass("message-container").css({"margin-left":"4px","margin-right":"4px"});return f.append(g)},renderModel:function(){var f=$("<div/>");f.append(b.templates.historyPanel(this.model.toJSON()));f.find(".history-secondary-actions").prepend(this._renderSearchButton());this._setUpBehaviours(f);this.renderHdas(f);return f},_renderSearchButton:function(f){return faIconButton({title:_l("Search datasets"),classes:"history-search-btn",faIcon:"fa-search"})},_setUpBehaviours:function(f){f=f||this.$el;f.find("[title]").tooltip({placement:"bottom"})},createHdaView:function(g){var f=g.get("id"),h=new this.HDAViewClass({model:g,linkTarget:this.linkTarget,expanded:this.storage.get("expandedHdas")[f],hasUser:this.model.ownedByCurrUser(),logger:this.logger});this._setUpHdaListeners(h);return h},_setUpHdaListeners:function(g){var f=this;g.on("body-expanded",function(h){f.storage.addExpandedHda(h)});g.on("body-collapsed",function(h){f.storage.removeExpandedHda(h)});g.on("error",function(i,k,h,j){f.errorHandler(i,k,h,j)})},renderHdas:function(g){g=g||this.$el;var f=this,i={},h=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"),this.filters);g.find(this.datasetsSelector).empty();if(h.length){h.each(function(k){var j=k.get("id"),l=f.createHdaView(k);i[j]=l;if(_.contains(f.selectedHdaIds,j)){l.selected=true}f.attachHdaView(l.render(),g)});g.find(this.emptyMsgSelector).hide()}else{g.find(this.emptyMsgSelector).text((this.model.hdas.length&&this.searchFor)?(this.noneFoundMsg):(this.emptyMsg)).show()}this.hdaViews=i;return this.hdaViews},attachHdaView:function(h,g){g=g||this.$el;var f=g.find(this.datasetsSelector);f.prepend(h.$el)},addHdaView:function(i){this.log("add."+this,i);var g=this;if(!i.isVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"))){return}$({}).queue([function h(k){var j=g.$el.find(g.emptyMsgSelector);if(j.is(":visible")){j.fadeOut(g.fxSpeed,k)}else{k()}},function f(k){g.scrollToTop();var j=g.$el.find(g.datasetsSelector),l=g.createHdaView(i);g.hdaViews[i.id]=l;l.render().$el.hide().prependTo(j).slideDown(g.fxSpeed)}])},refreshHdas:function(g,f){if(this.model){return this.model.refresh(g,f)}return $.when()},events:{"click .message-container":"clearMessages","click .history-search-btn":"toggleSearchControls"},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(f){f.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.renderHdas();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.renderHdas();return this.storage.get("show_hidden")},setUpSearchInput:function(g){var h=this,k=".history-search-input";function j(l){h.searchFor=l;h.filters=[function(m){return m.matchesAll(h.searchFor)}];h.trigger("search:searching",l,h);h.renderHdas()}function f(l){if(h.model.hdas.haveDetails()){j(l);return}h.$el.find(k).searchInput("toggle-loading");h.model.hdas.fetchAllDetails({silent:true}).always(function(){h.$el.find(k).searchInput("toggle-loading")}).done(function(){j(l)})}function i(){h.searchFor="";h.filters=[];h.trigger("search:clear",h);h.renderHdas()}g.searchInput({initialVal:h.searchFor,name:"history-search",placeholder:"search datasets",classes:"history-search",onfirstsearch:f,onsearch:j,onclear:i});return g},showSearchControls:function(g){g=(g===undefined)?(this.fxSpeed):(g);var f=this.$el.find(".history-search-controls"),h=f.find(".history-search-input");if(!h.children().size()){this.setUpSearchInput(h)}f.slideDown(g,function(){$(this).find("input").focus()})},hideSearchControls:function(f){f=(f===undefined)?(this.fxSpeed):(f);this.$el.find(".history-search-controls").slideUp(f)},toggleSearchControls:function(f){speed=(jQuery.type(f)==="number")?(f):(this.fxSpeed);if(this.$el.find(".history-search-controls").is(":visible")){this.hideSearchControls(speed)}else{this.showSearchControls(speed)}},showLoadingIndicator:function(g,f,h){f=(f!==undefined)?(f):(this.fxSpeed);if(!this.indicator){this.indicator=new LoadingIndicator(this.$el,this.$el.parent())}if(!this.$el.is(":visible")){this.indicator.show(0,h)}else{this.$el.fadeOut(f);this.indicator.show(g,f,h)}},hideLoadingIndicator:function(f,g){f=(f!==undefined)?(f):(this.fxSpeed);if(this.indicator){this.indicator.hide(f,g)}},displayMessage:function(k,l,j){var h=this;this.scrollToTop();var i=this.$el.find(this.msgsSelector),f=$("<div/>").addClass(k+"message").html(l);if(!_.isEmpty(j)){var g=$('<a href="javascript:void(0)">Details</a>').click(function(){Galaxy.modal.show(h._messageToModalOptions(k,l,j));return false});f.append(" ",g)}return i.html(f)},_messageToModalOptions:function(j,l,i){var f=this,k=$("<div/>"),h={title:"Details"};function g(m){m=_.omit(m,_.functions(m));return["<table>",_.map(m,function(o,n){o=(_.isObject(o))?(g(o)):(o);return'<tr><td style="vertical-align: top; color: grey">'+n+'</td><td style="padding-left: 8px">'+o+"</td></tr>"}).join(""),"</table>"].join("")}if(_.isObject(i)){h.body=k.append(g(i))}else{h.body=k.html(i)}h.buttons={Ok:function(){Galaxy.modal.hide();f.clearMessages()}};return h},clearMessages:function(){var f=this.$el.find(this.msgsSelector);f.empty()},scrollPosition:function(){return this.$el.scrollTop()},scrollTo:function(f){this.$el.scrollTop(f);return this},scrollToTop:function(){this.$el.scrollTop(0);return this},scrollIntoView:function(k,g){if(g===undefined){this.scrollTo(k);return this}var f=window,j=this.$el.parent(),i=$(f).innerHeight(),h=(i/2)-(g/2);this.scrollTo(k-h);return this},scrollToId:function(g){if((!g)||(!this.hdaViews[g])){return this}var f=this.hdaViews[g].$el;this.scrollIntoView(f.offset().top,f.outerHeight());return this},scrollToHid:function(f){var g=this.model.hdas.getByHid(f);if(!g){return this}return this.scrollToId(g.id)},toString:function(){return"ReadOnlyHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});b.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};return{ReadOnlyHistoryPanel:b}});
\ No newline at end of file
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/style/blue/base.css
--- a/static/style/blue/base.css
+++ b/static/style/blue/base.css
@@ -1684,6 +1684,19 @@
.dataset.state-discarded{background:#eee}.dataset.state-discarded .state-icon:before{content:"\f014"}
.dataset.state-noPermission{background:#eee;filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60}.dataset.state-noPermission .state-icon{font-size:20px}.dataset.state-noPermission .state-icon:before{content:"\f023"}
.dataset.state-new{background:#eee}.dataset.state-new .state-icon:before{content:"\f06a"}
+.annotated-history-panel{padding-top:10px}.annotated-history-panel [class$=messagesmall]{margin:8px 0px 8px 0px}
+.annotated-history-panel .history-controls{margin:0px 0px 16px 4px;padding:0px}.annotated-history-panel .history-controls .history-name{font-size:150%}
+.annotated-history-panel .history-controls .history-subtitle{margin:0px;padding:0px 0px 0px 4px;padding-left:4px}
+.annotated-history-panel .history-controls .history-annotation{border:1px solid lightgrey;border-width:1px 0px 0px 0px;padding:4px 0px 4px 0px;margin:4px;white-space:pre-wrap}
+.annotated-history-panel .history-controls .history-annotation:empty{display:none}
+.annotated-history-panel .history-controls .history-search-controls{padding:16px 0px 0px 0px}
+.annotated-history-panel table.datasets-list{width:100%;table-layout:fixed}.annotated-history-panel table.datasets-list .headers{border-bottom:2px solid grey}
+.annotated-history-panel table.datasets-list .headers th{padding:8px}
+.annotated-history-panel table.datasets-list .dataset-row{cursor:pointer;border-bottom:1px solid grey}
+.annotated-history-panel table.datasets-list .dataset-row>td{margin:0px;padding:0px;vertical-align:top}
+.annotated-history-panel table.datasets-list .dataset-row>td:nth-child(1){width:50%}
+.annotated-history-panel table.datasets-list .dataset-row>td:nth-child(2){padding:8px 16px 8px 16px;white-space:pre-wrap}
+.annotated-history-panel table.datasets-list .dataset-row .dataset{border:0px}
.hda .hda-hid:after{content:':'}
body.historyPage{background:#dfe5f9;color:#000;margin:5px;border:0;padding:0}
div.historyLinks{margin:5px 5px}
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 static/style/src/less/history.less
--- a/static/style/src/less/history.less
+++ b/static/style/src/less/history.less
@@ -688,6 +688,78 @@
}
+// ---------------------------------------------------------------------------- annotated-history-panel
+.annotated-history-panel {
+ //TODO: most of these styles are specific to history/display.mako and not to this type of panel in general
+ //TODO: some of these styles are also overrides of history-panel - remove those from hpanel and revisit this
+ padding-top: 10px;
+
+ [class$=messagesmall] {
+ margin: 8px 0px 8px 0px;
+ }
+
+ .history-controls {
+ margin: 0px 0px 16px 4px;
+ padding: 0px;
+
+ .history-name {
+ font-size: 150%;
+ }
+ .history-subtitle {
+ margin: 0px;
+ padding: 0px 0px 0px 4px;
+ padding-left: 4px;
+ }
+
+ .history-annotation {
+ border: 1px solid lightgrey;
+ border-width: 1px 0px 0px 0px;
+ padding: 4px 0px 4px 0px;
+ margin: 4px;
+ white-space: pre-wrap;
+ }
+ .history-annotation:empty {
+ display: none;
+ }
+
+ .history-search-controls {
+ padding: 16px 0px 0px 0px;
+ }
+ }
+
+ table.datasets-list {
+ width: 100%;
+ table-layout: fixed;
+
+ .headers {
+ border-bottom: 2px solid grey;
+ }
+ .headers th {
+ padding: 8px;
+ }
+ .dataset-row {
+ cursor: pointer;
+ border-bottom: 1px solid grey;
+ }
+ .dataset-row > td {
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+ }
+ .dataset-row > td:nth-child(1) {
+ width: 50%;
+ }
+ .dataset-row > td:nth-child(2) {
+ /* top and bottom should be <= title-bar padding */
+ padding: 8px 16px 8px 16px;
+ white-space: pre-wrap;
+ }
+ .dataset-row .dataset {
+ border: 0px;
+ }
+ }
+}
+
// ---------------------------------------------------------------------------- hdas
.hda .hda-hid:after {
content: ':';
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 templates/display_base.mako
--- a/templates/display_base.mako
+++ b/templates/display_base.mako
@@ -85,7 +85,7 @@
});
// Init history boxes.
- init_history_items( $("div.historyItemWrapper"), false, "nochanges" );
+ //init_history_items( $("div.historyItemWrapper"), false, "nochanges" );
// Init user item rating.
$('.user_rating_star').rating({
@@ -115,7 +115,7 @@
<%def name="stylesheets()">
${parent.stylesheets()}
${h.css( "autocomplete_tagging", "embed_item", "jquery.rating" )}
- ${h.css( "history", "autocomplete_tagging", "trackster", "library",
+ ${h.css( "autocomplete_tagging", "trackster", "library",
"jquery-ui/smoothness/jquery-ui" )}
<style type="text/css">
diff -r 32eadec01e3ebeb076b68938269e22f45fb202bb -r 8e4196a87a2b78521241adf104f524a5ea05caa1 templates/webapps/galaxy/history/display.mako
--- a/templates/webapps/galaxy/history/display.mako
+++ b/templates/webapps/galaxy/history/display.mako
@@ -1,84 +1,74 @@
<%inherit file="/display_base.mako"/>
-<%namespace file="/root/history_common.mako" import="render_dataset" />
+<%namespace file="history_panel.mako" import="history_panel_javascripts" />
## Set vars so that there's no need to change the code below.
-<%
+<%
history = published_item
datasets = published_item_data
%><%def name="javascripts()">
${parent.javascripts()}
+ ${history_panel_javascripts()}
</%def><%def name="stylesheets()">
${parent.stylesheets()}
- ${h.css( "history" )}
<style type="text/css">
- .historyItemBody {
- display: none;
- }
- .column {
- float: left;
- padding: 10px;
- margin: 20px;
- background: #666;
- border: 5px solid #ccc;
- width: 300px;
- }
</style>
-
- <noscript>
- <style>
- .historyItemBody {
- display: block;
- }
- </style>
- </noscript></%def><%def name="render_item_links( history )">
- <a
- href="${h.url_for( controller='/history', action='imp', id=trans.security.encode_id(history.id) )}"
- class="icon-button import"
- ## Needed to overwide initial width so that link is floated left appropriately.
- style="width: 100%"
- title="Import history">Import history</a>
+<%
+ encoded_history_id = history_dict[ 'id' ]
+ import_url = h.url_for( controller='history', action='imp', id=encoded_history_id )
+ switch_url = h.url_for( controller='history', action='switch_to_history', hist_id=encoded_history_id )
+%>
+ ## Needed to overwide initial width so that link is floated left appropriately.
+ %if not user_is_owner:
+ <a href="${import_url}" style="width: 100%" title="${_('Make a copy of this history and switch to it')}">
+ ${_('Import history')}
+ </a>
+ %else:
+ <a href="${switch_url}" style="width: 100%" title="${_('Make this history your current history')}">
+ ${_('Switch to this history')}
+ </a>
+ %endif
+</%def>
+
+<%def name="render_item_header( item )"></%def><%def name="render_item( history, datasets )">
- %if history.deleted:
- <div class="warningmessagesmall">
- ${_('You are currently viewing a deleted history!')}
- </div>
- <p></p>
- %endif
- %if not datasets:
- <div class="infomessagesmall" id="emptyHistoryMessage">
- %else:
- ## Render requested datasets, ordered from newest to oldest, including annotations.
- <table class="annotated-item">
- <tr><th>Dataset</th><th class="annotation">Annotation</th></tr>
- %for data in datasets:
- <tr>
- %if data.visible:
- <td>
- <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}">
- ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )}
- </div>
- </td>
- <td class="annotation">
- %if hasattr( data, "annotation") and data.annotation is not None:
- ${data.annotation}
- %endif
- </td>
- %endif
- </tr>
- %endfor
- </table>
- <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">
- %endif
- ${_("This history is empty.")}
- </div>
+<div id="history-${ history_dict[ 'id' ] }" class="history-panel">
+</div>
+<script type="text/javascript">
+ var debugging = JSON.parse( sessionStorage.getItem( 'debugging' ) ) || false,
+ historyJSON = ${h.to_json_string( history_dict )},
+ hdaJSON = ${h.to_json_string( hda_dicts )};
+ //window.historyJSON = historyJSON;
+ window.hdaJSON = hdaJSON;
+
+ require.config({
+ baseUrl : "${h.url_for( '/static/scripts' )}"
+ })([ 'mvc/history/annotated-history-panel' ], function( panelMod ){
+ // history module is already in the dpn chain from the panel. We can re-scope it here.
+ var historyModel = require( 'mvc/history/history-model' ),
+ hdaBaseView = require( 'mvc/dataset/hda-base' ),
+ history = new historyModel.History( historyJSON, hdaJSON, {
+ logger: ( debugging )?( console ):( null )
+ });
+
+ window.historyPanel = new panelMod.AnnotatedHistoryPanel({
+ show_deleted : false,
+ show_hidden : false,
+ el : $( "#history-" + historyJSON.id ),
+ model : history,
+ onready : function(){
+ this.render();
+ }
+ });
+ });
+</script></%def>
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.
1
0
commit/galaxy-central: dan: Rework logic for setting selection of DataToolParameter. Fixes issue seen with rerun where incorrect options were selected.
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/32eadec01e3e/
Changeset: 32eadec01e3e
User: dan
Date: 2014-02-20 17:31:07
Summary: Rework logic for setting selection of DataToolParameter. Fixes issue seen with rerun where incorrect options were selected.
Affected #: 1 file
diff -r 01a572fb8b4c463efa1b2091298fad3ec7ea2958 -r 32eadec01e3ebeb076b68938269e22f45fb202bb lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -1621,7 +1621,7 @@
if type( value ) != list:
value = [ value ]
field = form_builder.SelectField( self.name, self.multiple, None, self.refresh_on_change, refresh_on_change_values=self.refresh_on_change_values )
-
+
# CRUCIAL: the dataset_collector function needs to be local to DataToolParameter.get_html_field()
def dataset_collector( hdas, parent_hid ):
current_user_roles = trans.get_current_user_roles()
@@ -1659,20 +1659,18 @@
# Also collect children via association object
dataset_collector( hda.children, hid )
dataset_collector( history.active_datasets_children_and_roles, None )
- some_data = bool( field.options )
- if some_data:
- if value is None or len( field.options ) == 1:
- # Ensure that the last item is always selected
- a, b, c = field.options[-1]
- if self.optional:
- field.options[-1] = a, b, False
- else:
- field.options[-1] = a, b, True
+
+ set_selected = field.get_selected( return_label=True, return_value=True, multi=False ) is not None
+ # Ensure than an item is always selected
if self.optional:
- if not value:
+ if set_selected:
+ field.add_option( "Selection is Optional", 'None', False )
+ else:
field.add_option( "Selection is Optional", 'None', True )
- else:
- field.add_option( "Selection is Optional", 'None', False )
+ elif not set_selected and bool( field.options ):
+ # Select the last item
+ a, b, c = field.options[-1]
+ field.options[-1] = a, b, True
return field
def get_initial_value( self, trans, context, history=None ):
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/01a572fb8b4c/
Changeset: 01a572fb8b4c
User: inithello
Date: 2014-02-20 17:18:30
Summary: Enable specifying the install database connection when executing the install and test framework.
Affected #: 2 files
diff -r 952558f0dc0ba52355e87ef2d0ccef37f7f51bec -r 01a572fb8b4c463efa1b2091298fad3ec7ea2958 test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
@@ -412,6 +412,13 @@
database_connection = os.environ[ 'GALAXY_INSTALL_TEST_DBURI' ]
else:
database_connection = 'sqlite:///' + os.path.join( galaxy_db_path, 'install_and_test_repositories.sqlite' )
+ if 'GALAXY_INSTALL_TEST_INSTALL_DBURI' in os.environ:
+ install_database_connection = os.environ[ 'GALAXY_INSTALL_TEST_INSTALL_DBURI' ]
+ elif asbool( os.environ.get( 'GALAXY_TEST_INSTALL_DB_MERGED', default_install_db_merged ) ):
+ install_database_connection = galaxy_database_connection
+ else:
+ install_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
+ install_database_connection = 'sqlite:///%s' % install_galaxy_db_path
kwargs = {}
for dir in [ galaxy_test_tmp_dir ]:
try:
@@ -419,6 +426,7 @@
except OSError:
pass
print "Database connection: ", database_connection
+ print "Install database connection: ", install_database_connection
# Generate the shed_tool_data_table_conf.xml file.
file( shed_tool_data_table_conf_file, 'w' ).write( install_and_test_base_util.tool_data_table_conf_xml_template )
os.environ[ 'GALAXY_INSTALL_TEST_SHED_TOOL_DATA_TABLE_CONF' ] = shed_tool_data_table_conf_file
@@ -446,6 +454,7 @@
datatype_converters_config_file = "datatype_converters_conf.xml.sample",
file_path = galaxy_file_path,
id_secret = install_and_test_base_util.galaxy_encode_secret,
+ install_database_connection = install_database_connection,
job_config_file = galaxy_job_conf_file,
job_queue_workers = 5,
log_destination = "stdout",
diff -r 952558f0dc0ba52355e87ef2d0ccef37f7f51bec -r 01a572fb8b4c463efa1b2091298fad3ec7ea2958 test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
@@ -264,6 +264,13 @@
database_connection = os.environ[ 'GALAXY_INSTALL_TEST_DBURI' ]
else:
database_connection = 'sqlite:///' + os.path.join( galaxy_db_path, 'install_and_test_repositories.sqlite' )
+ if 'GALAXY_INSTALL_TEST_INSTALL_DBURI' in os.environ:
+ install_database_connection = os.environ[ 'GALAXY_INSTALL_TEST_INSTALL_DBURI' ]
+ elif asbool( os.environ.get( 'GALAXY_TEST_INSTALL_DB_MERGED', default_install_db_merged ) ):
+ install_database_connection = galaxy_database_connection
+ else:
+ install_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
+ install_database_connection = 'sqlite:///%s' % install_galaxy_db_path
kwargs = {}
for dir in [ galaxy_test_tmp_dir ]:
try:
@@ -271,6 +278,7 @@
except OSError:
pass
print "Database connection: ", database_connection
+ print "Install database connection: ", install_database_connection
# Generate the shed_tool_data_table_conf.xml file.
file( shed_tool_data_table_conf_file, 'w' ).write( install_and_test_base_util.tool_data_table_conf_xml_template )
os.environ[ 'GALAXY_INSTALL_TEST_SHED_TOOL_DATA_TABLE_CONF' ] = shed_tool_data_table_conf_file
@@ -298,6 +306,7 @@
datatype_converters_config_file = "datatype_converters_conf.xml.sample",
file_path = galaxy_file_path,
id_secret = install_and_test_base_util.galaxy_encode_secret,
+ install_database_connection = install_database_connection,
job_config_file = galaxy_job_conf_file,
job_queue_workers = 5,
log_destination = "stdout",
https://bitbucket.org/galaxy/galaxy-central/commits/6674cb6ced26/
Changeset: 6674cb6ced26
Branch: trevorw/specify-thirdparty-cookies-must-not-be-b-1392909850239
User: inithello
Date: 2014-02-20 17:19:23
Summary: Close branch trevorw/specify-thirdparty-cookies-must-not-be-b-1392909850239.
Affected #: 2 files
diff -r c4145b92bc2a9e63778950aef4d53723bcd353ee -r 6674cb6ced267ba83d543f98fe1fe0b7e7de7324 lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -4,9 +4,14 @@
import logging
import os
import shutil
+import sys
import tempfile
-import shutil
import td_common_util
+import time
+import shlex
+
+from subprocess import PIPE, Popen
+from threading import Thread
from contextlib import contextmanager
from galaxy.util import unicodify
from galaxy.util.template import fill_template
@@ -16,12 +21,19 @@
eggs.require( 'paramiko' )
eggs.require( 'Fabric' )
+from fabric import state
from fabric.api import env
from fabric.api import hide
from fabric.api import lcd
from fabric.api import local
from fabric.api import settings
from fabric.api import prefix
+from fabric.operations import _AttributeString
+
+try:
+ from Queue import Queue, Empty
+except ImportError:
+ from queue import Queue, Empty
log = logging.getLogger( __name__ )
@@ -120,6 +132,22 @@
if int( version.split( "." )[ 0 ] ) < 1:
raise NotImplementedError( "Install Fabric version 1.0 or later." )
+def enqueue_output( stdout, stdout_queue, stderr, stderr_queue ):
+ stdout_logger = logging.getLogger( 'fabric_util.STDOUT' )
+ stderr_logger = logging.getLogger( 'fabric_util.STDERR' )
+ for line in iter( stdout.readline, b'' ):
+ output = line.rstrip()
+ stdout_logger.debug( output )
+ stdout_queue.put( output )
+ stdout.close()
+ stdout_queue.put(None)
+ for line in iter( stderr.readline, b'' ):
+ output = line.rstrip()
+ stderr_logger.debug( output )
+ stderr_queue.put( output )
+ stderr.close()
+ stderr_queue.put(None)
+
def file_append( text, file_path, skip_if_contained=True, make_executable=True ):
'''
Append a line to a file unless skip_if_contained is True and the line already exists in the file. This method creates the file
@@ -168,10 +196,9 @@
for shell_file_path in shell_file_paths:
env_file_builder.append_line( action="source", value=shell_file_path )
-def handle_command( app, tool_dependency, install_dir, cmd, return_output=False ):
+def handle_command( app, tool_dependency, install_dir, cmd, return_output=False, use_fabric=False ):
context = app.install_model.context
- with settings( warn_only=True ):
- output = local( cmd, capture=True )
+ output = run_local_command( cmd, capture_output=True, stream_output=True )
log_results( cmd, output, os.path.join( install_dir, INSTALLATION_LOG ) )
if output.return_code:
tool_dependency.status = app.install_model.ToolDependency.installation_status.ERROR
@@ -263,7 +290,7 @@
set_prior_environment_commands.append( 'echo "%s: $%s"' % ( inherited_env_var_name, inherited_env_var_name ) )
command = ' ; '.join( set_prior_environment_commands )
# Run the command and capture the output.
- command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True )
+ command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True, use_fabric=True )
# And extract anything labeled with the name of the environment variable we're populating here.
if '%s: ' % inherited_env_var_name in command_return:
environment_variable_value = command_return.split( '\n' )
@@ -370,7 +397,7 @@
filtered_actions = actions[ 1: ]
return_code = handle_command( app, tool_dependency, install_dir, action_dict[ 'command' ] )
if return_code:
- return tool_dependency
+ return tool_dependency
dir = package_name
elif action_type == 'download_file':
# <action type="download_file">http://effectors.org/download/version/TTSS_GUI-1.0.1.jar</action>
@@ -645,7 +672,7 @@
elif action_type == 'shell_command':
with settings( warn_only=True ):
cmd = install_environment.build_command( action_dict[ 'command' ] )
- return_code = handle_command( app, tool_dependency, install_dir, cmd )
+ return_code = handle_command( app, tool_dependency, install_dir, cmd, use_fabric=False )
if return_code:
return tool_dependency
elif action_type == 'template_command':
@@ -755,6 +782,31 @@
if os.path.exists( work_dir ):
local( 'rm -rf %s' % work_dir )
+def run_local_command( command, capture_output=True, stream_output=True ):
+ wrapped_command = shlex.split( "/bin/sh -c '%s'" % command )
+ log.debug( 'Executing command %s in path %s.' % ( command, state.env['lcwd'] ) )
+ stdout_queue = Queue()
+ stderr_queue = Queue()
+ process_handle = Popen( wrapped_command, stdout=PIPE, stderr=PIPE, bufsize=1, close_fds=False, cwd=state.env['lcwd'] )
+ stdio_thread = Thread( target=enqueue_output, args=( process_handle.stdout, stdout_queue, process_handle.stderr, stderr_queue ) )
+ stdio_thread.daemon = True
+ stdio_thread.start()
+ stdout, stderr = wait_for_process( process_handle, stream_output, stdout_queue, stderr_queue )
+ # Handle error condition (deal with stdout being None, too)
+ output = _AttributeString( stdout.strip() if stdout else "" )
+ errors = _AttributeString( stderr.strip() if stderr else "" )
+ output.failed = False
+ output.return_code = process_handle.returncode
+ output.stderr = errors
+ if process_handle.returncode not in env.ok_ret_codes:
+ output.failed = True
+ message = "local() encountered an error (return code %s) while executing '%s'" % ( process_handle.returncode, command )
+ log.error( message )
+ output.succeeded = not output.failed
+ # If we were capturing, this will be a string; otherwise it will be None.
+ if capture_output:
+ return output
+
def set_galaxy_environment( galaxy_user, tool_dependency_dir, host='localhost', shell='/bin/bash -l -c' ):
"""General Galaxy environment configuration. This method is not currently used."""
env.user = galaxy_user
@@ -764,3 +816,21 @@
env.use_sudo = False
env.safe_cmd = local
return env
+
+def wait_for_process( process_handle, stream_output, stdout_queue, stderr_queue ):
+ standard_out = []
+ standard_err = []
+ process_handle.wait()
+ while True:
+ line = stdout_queue.get()
+ if line is None:
+ break
+ standard_out.append(line)
+ while True:
+ line = stderr_queue.get()
+ if line is None:
+ break
+ standard_err.append(line)
+ stdout = '\n'.join( standard_out )
+ stderr = '\n'.join( standard_err )
+ return stdout, stderr
diff -r c4145b92bc2a9e63778950aef4d53723bcd353ee -r 6674cb6ced267ba83d543f98fe1fe0b7e7de7324 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -1719,7 +1719,7 @@
"""
if text:
if app.name == 'galaxy':
- route_to_images = 'admin_toolshed/static/images/%s' % encoded_repository_id
+ route_to_images = '/admin_toolshed/static/images/%s' % encoded_repository_id
else:
# We're in the tool shed.
route_to_images = '/repository/static/images/%s' % encoded_repository_id
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c4145b92bc2a/
Changeset: c4145b92bc2a
Branch: trevorw/specify-thirdparty-cookies-must-not-be-b-1392909850239
User: trevorw
Date: 2014-02-20 16:27:57
Summary: specify third-party cookies must not be blocked - repository.py
third-party cookies are normally (and hopefully) disabled for privacy
Affected #: 1 file
diff -r eae95d5fa975e1eef4de219564cb976720f18440 -r c4145b92bc2a9e63778950aef4d53723bcd353ee lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -870,7 +870,7 @@
'admin_toolshed/update_to_changeset_revision?tool_shed_url=%s&name=%s&owner=%s&changeset_revision=%s&latest_changeset_revision=' % \
( web.url_for( '/', qualified=True ), repository.name, repository.user.username, changeset_revision ) )
else:
- message = 'Unable to check for updates due to an invalid Galaxy URL: <b>%s</b>. You may need to enable cookies in your browser. ' % galaxy_url
+ message = 'Unable to check for updates due to an invalid Galaxy URL: <b>%s</b>. You may need to enable third-party cookies in your browser. ' % galaxy_url
return trans.show_error_message( message )
if changeset_revision == repository.tip( trans.app ):
# If changeset_revision is the repository tip, there are no additional updates.
@@ -2047,7 +2047,7 @@
return trans.response.send_redirect( url )
else:
message = 'Repository installation is not possible due to an invalid Galaxy URL: <b>%s</b>. ' % galaxy_url
- message += 'You may need to enable cookies in your browser. '
+ message += 'You may need to enable third-party cookies in your browser. '
status = 'error'
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_valid_categories',
https://bitbucket.org/galaxy/galaxy-central/commits/952558f0dc0b/
Changeset: 952558f0dc0b
User: greg
Date: 2014-02-20 17:14:38
Summary: Merged in trevorw/galaxy-central-2/trevorw/specify-thirdparty-cookies-must-not-be-b-1392909850239 (pull request #326)
specify third-party cookies must not be blocked - repository.py
Affected #: 1 file
diff -r 3158b15d961f6bef5db25b26d4bc0593f1b58d57 -r 952558f0dc0ba52355e87ef2d0ccef37f7f51bec lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -870,7 +870,7 @@
'admin_toolshed/update_to_changeset_revision?tool_shed_url=%s&name=%s&owner=%s&changeset_revision=%s&latest_changeset_revision=' % \
( web.url_for( '/', qualified=True ), repository.name, repository.user.username, changeset_revision ) )
else:
- message = 'Unable to check for updates due to an invalid Galaxy URL: <b>%s</b>. You may need to enable cookies in your browser. ' % galaxy_url
+ message = 'Unable to check for updates due to an invalid Galaxy URL: <b>%s</b>. You may need to enable third-party cookies in your browser. ' % galaxy_url
return trans.show_error_message( message )
if changeset_revision == repository.tip( trans.app ):
# If changeset_revision is the repository tip, there are no additional updates.
@@ -2047,7 +2047,7 @@
return trans.response.send_redirect( url )
else:
message = 'Repository installation is not possible due to an invalid Galaxy URL: <b>%s</b>. ' % galaxy_url
- message += 'You may need to enable cookies in your browser. '
+ message += 'You may need to enable third-party cookies in your browser. '
status = 'error'
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_valid_categories',
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.
1
0
commit/galaxy-central: dan: Fix for ToolEvaluator with optional Dataset Input selected.
by commits-noreply@bitbucket.org 20 Feb '14
by commits-noreply@bitbucket.org 20 Feb '14
20 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/3158b15d961f/
Changeset: 3158b15d961f
User: dan
Date: 2014-02-20 17:07:16
Summary: Fix for ToolEvaluator with optional Dataset Input selected.
Affected #: 1 file
diff -r 3789ce7ddf1ac171a10956989818b4425486c44d -r 3158b15d961f6bef5db25b26d4bc0593f1b58d57 lib/galaxy/tools/evaluation.py
--- a/lib/galaxy/tools/evaluation.py
+++ b/lib/galaxy/tools/evaluation.py
@@ -181,9 +181,11 @@
tool=self,
name=input.name
)
- real_path = dataset.file_name
- if real_path in input_dataset_paths:
- wrapper_kwds[ "dataset_path" ] = input_dataset_paths[ real_path ]
+ if dataset:
+ #A None dataset does not have a filename
+ real_path = dataset.file_name
+ if real_path in input_dataset_paths:
+ wrapper_kwds[ "dataset_path" ] = input_dataset_paths[ real_path ]
input_values[ input.name ] = \
DatasetFilenameWrapper( dataset, **wrapper_kwds )
elif isinstance( input, SelectToolParameter ):
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.
1
0
4 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c82a791e23a6/
Changeset: c82a791e23a6
User: natefoo
Date: 2014-02-20 16:51:42
Summary: Remove obsolete DRMAA_python egg from eggs.ini.
Affected #: 1 file
diff -r 9c673e0ea8919fea6941f24fdf6936686840bb71 -r c82a791e23a62b0821ad0b0f1bccc49541eb3583 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -9,12 +9,11 @@
[general]
repository = http://eggs.galaxyproject.org
; these eggs must be scrambled for your local environment
-no_auto = pbs_python DRMAA_python
+no_auto = pbs_python
[eggs:platform]
bx_python = 0.7.1
Cheetah = 2.2.2
-DRMAA_python = 0.2
MarkupSafe = 0.12
mercurial = 2.2.3
MySQL_python = 1.2.3c1
https://bitbucket.org/galaxy/galaxy-central/commits/59e325832026/
Changeset: 59e325832026
User: natefoo
Date: 2014-02-20 16:52:19
Summary: Minor updates to comments/documentation in universe_wsgi.ini.sample
Affected #: 1 file
diff -r c82a791e23a62b0821ad0b0f1bccc49541eb3583 -r 59e325832026a2f3cbdb031eef02c8ef690c3f03 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -3,7 +3,7 @@
# environment. To tune the application for a multi-user production
# environment, see the documentation at:
#
-# http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Production%20Server
+# http://usegalaxy.org/production
#
# Throughout this sample configuration file, except where stated otherwise,
@@ -11,7 +11,7 @@
# values are set to the default value.
# Examples of many of these options are explained in more detail in the wiki:
#
-# http://wiki.g2.bx.psu.edu/Admin/Config
+# https://wiki.galaxyproject.org/Admin/Config
#
# Config hackers are encouraged to check there before asking for help.
@@ -140,9 +140,12 @@
# Other tool config files must include the tool_path as an attribute in the <toolbox> tag.
#tool_path = tools
-# Path to the directory in which managed tool dependencies are placed. To use
-# the dependency system, see the documentation at:
-# http://wiki.g2.bx.psu.edu/Admin/Config/Tool%20Dependencies
+# Path to the directory in which tool dependencies are placed. This is used by
+# the tool shed to install dependencies and can also be used by administrators
+# to manually install or link to dependencies. For details, see:
+# https://wiki.galaxyproject.org/Admin/Config/ToolDependencies
+# If this option is not set to a valid path, installing tools with dependencies
+# from the Tool Shed will fail.
#tool_dependency_dir = None
# Enable automatic polling of relative tool sheds to see if any updates
@@ -169,7 +172,7 @@
# Directory where data used by tools is located, see the samples in that
# directory and the wiki for help:
-# http://wiki.g2.bx.psu.edu/Admin/Data%20Integration
+# https://wiki.galaxyproject.org/Admin/DataIntegration
#tool_data_path = tool-data
# Directory where chrom len files are kept, currently mainly used by trackster
@@ -196,6 +199,10 @@
# directory.
#cluster_files_directory = database/pbs
+# Mako templates are compiled as needed and cached for reuse, this directory is
+# used for the cache
+#template_cache_path = database/compiled_templates
+
# External service types config file, defines what types of external_services configurations
# are available in Galaxy.
#external_service_type_config_file = external_service_types_conf.xml
@@ -532,7 +539,7 @@
# -- Data Libraries
# These library upload options are described in much more detail in the wiki:
-# http://wiki.g2.bx.psu.edu/Admin/Data%20Libraries/Uploading%20Library%20Files
+# https://wiki.galaxyproject.org/Admin/DataLibraries/UploadingLibraryFiles
# Add an option to the library upload form which allows administrators to
# upload a directory of files.
@@ -590,7 +597,7 @@
# User authentication can be delegated to an upstream proxy server (usually
# Apache). The upstream proxy should set a REMOTE_USER header in the request.
# Enabling remote user disables regular logins. For more information, see:
-# http://wiki.g2.bx.psu.edu/Admin/Config/Apache%20Proxy
+# https://wiki.galaxyproject.org/Admin/Config/ApacheProxy
#use_remote_user = False
# If use_remote_user is enabled and your external authentication
@@ -618,7 +625,7 @@
# users (email addresses). These users will have access to the Admin section
# of the server, and will have access to create users, groups, roles,
# libraries, and more. For more information, see:
-# http://wiki.g2.bx.psu.edu/Admin/Interface
+# https://wiki.galaxyproject.org/Admin/Interface
#admin_users = None
# Force everyone to log in (disable anonymous access).
@@ -723,8 +730,8 @@
# separate Galaxy into multiple processes. There are more than one way to do
# this, and they are explained in detail in the documentation:
#
-# http://wiki.g2.bx.psu.edu/Admin/Config/Performance/Web%20Application%20Scal…
-#
+# https://wiki.galaxyproject.org/Admin/Config/Performance/Scaling
+
# By default, Galaxy manages and executes jobs from within a single process and
# notifies itself of new jobs via in-memory queues. Jobs are run locally on
# the system on which Galaxy is started. Advanced job running capabilities can
https://bitbucket.org/galaxy/galaxy-central/commits/3789ce7ddf1a/
Changeset: 3789ce7ddf1a
User: natefoo
Date: 2014-02-20 16:52:31
Summary: Remove empty/renamed sections in tool_conf.xml.main
Affected #: 1 file
diff -r 59e325832026a2f3cbdb031eef02c8ef690c3f03 -r 3789ce7ddf1ac171a10956989818b4425486c44d tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -154,9 +154,6 @@
<tool file="multivariate_stats/kpca.xml" /><tool file="multivariate_stats/kcca.xml" /></section>
- <section id="clustal" name="Multiple Alignments">
- <tool file="rgenetics/rgClustalw.xml" />
- </section><section id="hgv" name="Phenotype Association"><tool file="evolution/codingSnps.xml" /><tool file="evolution/add_scores.xml" />
@@ -227,8 +224,4 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section id="ngs-rna-tools" name="NGS: RNA Analysis">
- <label id="rna_seq" text="RNA-seq" />
- <label id="filtering" text="Filtering" />
- </section></toolbox>
https://bitbucket.org/galaxy/galaxy-central/commits/15e8a74a9521/
Changeset: 15e8a74a9521
Branch: stable
User: natefoo
Date: 2014-02-20 16:52:31
Summary: Remove empty/renamed sections in tool_conf.xml.main
Affected #: 1 file
diff -r a89bbdfd4a71671d575d9a0a3a9f8abeba3f7b21 -r 15e8a74a95215bf2cc775e9848ca4a5ecc7e945f tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -154,9 +154,6 @@
<tool file="multivariate_stats/kpca.xml" /><tool file="multivariate_stats/kcca.xml" /></section>
- <section id="clustal" name="Multiple Alignments">
- <tool file="rgenetics/rgClustalw.xml" />
- </section><section id="hgv" name="Phenotype Association"><tool file="evolution/codingSnps.xml" /><tool file="evolution/add_scores.xml" />
@@ -227,8 +224,4 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section id="ngs-rna-tools" name="NGS: RNA Analysis">
- <label id="rna_seq" text="RNA-seq" />
- <label id="filtering" text="Filtering" />
- </section></toolbox>
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.
1
0
commit/galaxy-central: dannon: Update boto to 2.25.0 in anticipation of supporting VPC
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/eae95d5fa975/
Changeset: eae95d5fa975
User: dannon
Date: 2014-02-20 01:33:27
Summary: Update boto to 2.25.0 in anticipation of supporting VPC
Affected #: 1 file
diff -r 85c38536c31583ef06db42c1f54d6248b79f96a5 -r eae95d5fa975e1eef4de219564cb976720f18440 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -35,7 +35,7 @@
amqp = 1.4.3
anyjson = 0.3.3
Beaker = 1.4
-boto = 2.5.2
+boto = 2.25.0
decorator = 3.1.2
docutils = 0.7
drmaa = 0.6
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a89bbdfd4a71/
Changeset: a89bbdfd4a71
Branch: stable
User: inithello
Date: 2014-02-19 22:34:01
Summary: Ensure that symlinks are moved before regular files, since this can in some cases causes a 'No such file or directory' error when the symlink target is moved before the symlink itself.
Affected #: 1 file
diff -r 0770af01a257818ee82f11a191d4305880ea0b91 -r a89bbdfd4a71671d575d9a0a3a9f8abeba3f7b21 lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
@@ -303,9 +303,19 @@
destination_directory = os.path.join( destination_dir )
if not os.path.isdir( destination_directory ):
os.makedirs( destination_directory )
+ symlinks = []
+ regular_files = []
for file_name in os.listdir( source_directory ):
source_file = os.path.join( source_directory, file_name )
destination_file = os.path.join( destination_directory, file_name )
+ files_tuple = ( source_file, destination_file )
+ if os.path.islink( source_file ):
+ symlinks.append( files_tuple )
+ else:
+ regular_files.append( files_tuple )
+ for source_file, destination_file in symlinks:
+ shutil.move( source_file, destination_file )
+ for source_file, destination_file in regular_files:
shutil.move( source_file, destination_file )
def move_file( current_dir, source, destination, rename_to=None ):
https://bitbucket.org/galaxy/galaxy-central/commits/85c38536c315/
Changeset: 85c38536c315
User: inithello
Date: 2014-02-19 22:34:22
Summary: Merge with a89bbdfd4a71671d575d9a0a3a9f8abeba3f7b21
Affected #: 1 file
diff -r ee315625cf4e394bca8a05f25c82e78c978ed50c -r 85c38536c31583ef06db42c1f54d6248b79f96a5 lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py
@@ -303,9 +303,19 @@
destination_directory = os.path.join( destination_dir )
if not os.path.isdir( destination_directory ):
os.makedirs( destination_directory )
+ symlinks = []
+ regular_files = []
for file_name in os.listdir( source_directory ):
source_file = os.path.join( source_directory, file_name )
destination_file = os.path.join( destination_directory, file_name )
+ files_tuple = ( source_file, destination_file )
+ if os.path.islink( source_file ):
+ symlinks.append( files_tuple )
+ else:
+ regular_files.append( files_tuple )
+ for source_file, destination_file in symlinks:
+ shutil.move( source_file, destination_file )
+ for source_file, destination_file in regular_files:
shutil.move( source_file, destination_file )
def move_file( current_dir, source, destination, rename_to=None ):
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.
1
0
commit/galaxy-central: dan: Fix for DatasetListWrapper with optional inputs.
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ee315625cf4e/
Changeset: ee315625cf4e
User: dan
Date: 2014-02-19 22:15:48
Summary: Fix for DatasetListWrapper with optional inputs.
Affected #: 1 file
diff -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b -r ee315625cf4e394bca8a05f25c82e78c978ed50c lib/galaxy/tools/wrappers.py
--- a/lib/galaxy/tools/wrappers.py
+++ b/lib/galaxy/tools/wrappers.py
@@ -206,10 +206,12 @@
datasets = [datasets]
def to_wrapper( dataset ):
- real_path = dataset.file_name
wrapper_kwds = kwargs.copy()
- if real_path in dataset_paths:
- wrapper_kwds[ "dataset_path" ] = dataset_paths[ real_path ]
+ if dataset:
+ #A None dataset does not have a filename
+ real_path = dataset.file_name
+ if real_path in dataset_paths:
+ wrapper_kwds[ "dataset_path" ] = dataset_paths[ real_path ]
return DatasetFilenameWrapper( dataset, **wrapper_kwds )
list.__init__( self, map( to_wrapper, datasets ) )
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a94e57976adf/
Changeset: a94e57976adf
User: inithello
Date: 2014-02-19 21:21:12
Summary: Fix for situation where duplicate database records would be created if a repository was uninstalled and reinstalled after getting updates from the tool shed.
Affected #: 2 files
diff -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 -r a94e57976adf8cee859bbe14e8275b73b16206bc lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -1381,7 +1381,7 @@
repository_dependencies = repository_dependency_util.get_repository_dependencies_for_installed_tool_shed_repository( trans, tool_shed_repository )
repo_info_dict = repository_util.create_repo_info_dict( trans=trans,
repository_clone_url=repository_clone_url,
- changeset_revision=tool_shed_repository.changeset_revision,
+ changeset_revision=tool_shed_repository.installed_changeset_revision,
ctx_rev=tool_shed_repository.ctx_rev,
repository_owner=tool_shed_repository.owner,
repository_name=tool_shed_repository.name,
diff -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 -r a94e57976adf8cee859bbe14e8275b73b16206bc lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -1617,6 +1617,13 @@
except:
pass
+def __repository_query( app ):
+ if app.name == "galaxy":
+ query = app.install_model.context.query( app.install_model.ToolShedRepository )
+ else:
+ query = app.model.context.query( app.model.Repository )
+ return query
+
def repository_was_previously_installed( trans, tool_shed_url, repository_name, repo_info_tuple ):
"""
Find out if a repository is already installed into Galaxy - there are several scenarios where this
@@ -1866,10 +1873,3 @@
for arg in args:
parts.append( arg.strip( '/' ) )
return '/'.join( parts )
-
-def __repository_query( app ):
- if app.name == "galaxy":
- query = app.install_model.context.query( app.install_model.ToolShedRepository )
- else:
- query = app.model.context.query( app.model.Repository )
- return query
https://bitbucket.org/galaxy/galaxy-central/commits/c38c0a6893e4/
Changeset: c38c0a6893e4
User: inithello
Date: 2014-02-19 21:23:45
Summary: Situations where a migration warning would be incorrectly displayed, and tools with matching filenames would be removed from the tool_conf.xml after running a migration script.
Affected #: 9 files
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b lib/tool_shed/galaxy_install/install_manager.py
--- a/lib/tool_shed/galaxy_install/install_manager.py
+++ b/lib/tool_shed/galaxy_install/install_manager.py
@@ -186,8 +186,7 @@
# Tools outside of sections.
file_path = elem.get( 'file', None )
if file_path:
- file_name = suc.strip_path( file_path )
- if file_name in tool_configs_to_filter:
+ if file_path in tool_configs_to_filter:
root.remove( elem )
persist_required = True
elif elem.tag == 'section':
@@ -196,8 +195,7 @@
if section_elem.tag == 'tool':
file_path = section_elem.get( 'file', None )
if file_path:
- file_name = suc.strip_path( file_path )
- if file_name in tool_configs_to_filter or file_path in tool_configs_to_filter:
+ if file_path in tool_configs_to_filter:
elem.remove( section_elem )
persist_required = True
if persist_required:
@@ -221,8 +219,7 @@
if proprietary_tool_panel_elem.tag == 'tool':
# The proprietary_tool_panel_elem looks something like <tool file="emboss_5/emboss_antigenic.xml" />.
proprietary_tool_config = proprietary_tool_panel_elem.get( 'file' )
- proprietary_name = suc.strip_path( proprietary_tool_config )
- if tool_config == proprietary_name or tool_config == proprietary_tool_config:
+ if tool_config == proprietary_tool_config:
# The tool is loaded outside of any sections.
tool_sections.append( None )
if not is_displayed:
@@ -233,8 +230,7 @@
if section_elem.tag == 'tool':
# The section_elem looks something like <tool file="emboss_5/emboss_antigenic.xml" />.
proprietary_tool_config = section_elem.get( 'file' )
- proprietary_name = suc.strip_path( proprietary_tool_config )
- if tool_config == proprietary_name or tool_config == proprietary_tool_config:
+ if tool_config == proprietary_tool_config:
# The tool is loaded inside of the section_elem.
tool_sections.append( ToolSection( proprietary_tool_panel_elem ) )
if not is_displayed:
@@ -312,8 +308,7 @@
# Tools outside of sections.
file_path = elem.get( 'file', None )
if file_path:
- name = suc.strip_path( file_path )
- if name in migrated_tool_configs or file_path in migrated_tool_configs:
+ if file_path in migrated_tool_configs:
if elem not in tool_panel_elems:
tool_panel_elems.append( elem )
elif elem.tag == 'section':
@@ -322,8 +317,7 @@
if section_elem.tag == 'tool':
file_path = section_elem.get( 'file', None )
if file_path:
- name = suc.strip_path( file_path )
- if name in migrated_tool_configs or file_path in migrated_tool_configs:
+ if file_path in migrated_tool_configs:
# Append the section, not the tool.
if elem not in tool_panel_elems:
tool_panel_elems.append( elem )
@@ -361,10 +355,8 @@
for tool_panel_dict in v:
# Keep track of tool config file names associated with entries that have been made to the
# migrated_tools_conf.xml file so they can be eliminated from all non-shed-related tool panel configs.
- tool_config_file = tool_panel_dict.get( 'tool_config', None )
- if tool_config_file:
- if tool_config_file not in tool_configs_to_filter:
- tool_configs_to_filter.append( tool_config_file )
+ if tool_config not in tool_configs_to_filter:
+ tool_configs_to_filter.append( tool_config )
else:
print 'The tool "%s" (%s) has not been enabled because it is not defined in a proprietary tool config (%s).' \
% ( guid, tool_config, ", ".join( self.proprietary_tool_confs or [] ) )
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0002_tools.xml
--- a/scripts/migrate_tools/0002_tools.xml
+++ b/scripts/migrate_tools/0002_tools.xml
@@ -2,112 +2,112 @@
<toolshed name="toolshed.g2.bx.psu.edu"><repository name="emboss_datatypes" description="Datatypes for Emboss tools" changeset_revision="a89163f31369" /><repository name="emboss_5" description="Galaxy wrappers for EMBOSS version 5.0.0 tools" changeset_revision="7334f6d0ac17">
- <tool id="EMBOSS: antigenic1" version="5.0.0" file="emboss_antigenic.xml" />
- <tool id="EMBOSS: backtranseq2" version="5.0.0" file="emboss_backtranseq.xml" />
- <tool id="EMBOSS: banana3" version="5.0.0" file="emboss_banana.xml" />
- <tool id="EMBOSS: biosed4" version="5.0.0" file="emboss_biosed.xml" />
- <tool id="EMBOSS: btwisted5" version="5.0.0" file="emboss_btwisted.xml" />
- <tool id="EMBOSS: cai_custom6" version="5.0.0" file="emboss_cai_custom.xml" />
- <tool id="EMBOSS: cai6" version="5.0.0" file="emboss_cai.xml" />
- <tool id="EMBOSS: chaos7" version="5.0.0" file="emboss_chaos.xml" />
- <tool id="EMBOSS: charge8" version="5.0.0" file="emboss_charge.xml" />
- <tool id="EMBOSS: checktrans9" version="5.0.0" file="emboss_checktrans.xml" />
- <tool id="EMBOSS: chips10" version="5.0.0" file="emboss_chips.xml" />
- <tool id="EMBOSS: cirdna11" version="5.0.0" file="emboss_cirdna.xml" />
- <tool id="EMBOSS: codcmp12" version="5.0.0" file="emboss_codcmp.xml" />
- <tool id="EMBOSS: coderet13" version="5.0.0" file="emboss_coderet.xml" />
- <tool id="EMBOSS: compseq14" version="5.0.0" file="emboss_compseq.xml" />
- <tool id="EMBOSS: cpgplot15" version="5.0.0" file="emboss_cpgplot.xml" />
- <tool id="EMBOSS: cpgreport16" version="5.0.0" file="emboss_cpgreport.xml" />
- <tool id="EMBOSS: cusp17" version="5.0.0" file="emboss_cusp.xml" />
- <tool id="EMBOSS: cutseq18" version="5.0.0" file="emboss_cutseq.xml" />
- <tool id="EMBOSS: dan19" version="5.0.0" file="emboss_dan.xml" />
- <tool id="EMBOSS: degapseq20" version="5.0.0" file="emboss_degapseq.xml" />
- <tool id="EMBOSS: descseq21" version="5.0.0" file="emboss_descseq.xml" />
- <tool id="EMBOSS: diffseq22" version="5.0.0" file="emboss_diffseq.xml" />
- <tool id="EMBOSS: digest23" version="5.0.0" file="emboss_digest.xml" />
- <tool id="EMBOSS: dotmatcher24" version="5.0.0" file="emboss_dotmatcher.xml" />
- <tool id="EMBOSS: dotpath25" version="5.0.0" file="emboss_dotpath.xml" />
- <tool id="EMBOSS: dottup26" version="5.0.0" file="emboss_dottup.xml" />
- <tool id="EMBOSS: dreg27" version="5.0.0" file="emboss_dreg.xml" />
- <tool id="EMBOSS: einverted28" version="5.0.0" file="emboss_einverted.xml" />
- <tool id="EMBOSS: epestfind29" version="5.0.0" file="emboss_epestfind.xml" />
- <tool id="EMBOSS: equicktandem31" version="5.0.0" file="emboss_equicktandem.xml" />
- <tool id="EMBOSS: est2genome32" version="5.0.0" file="emboss_est2genome.xml" />
- <tool id="EMBOSS: etandem33" version="5.0.0" file="emboss_etandem.xml" />
- <tool id="EMBOSS: extractfeat34" version="5.0.0" file="emboss_extractfeat.xml" />
- <tool id="EMBOSS: extractseq35" version="5.0.0" file="emboss_extractseq.xml" />
- <tool id="EMBOSS: freak36" version="5.0.0" file="emboss_freak.xml" />
- <tool id="EMBOSS: fuzznuc37" version="5.0.0" file="emboss_fuzznuc.xml" />
- <tool id="EMBOSS: fuzzpro38" version="5.0.0" file="emboss_fuzzpro.xml" />
- <tool id="EMBOSS: fuzztran39" version="5.0.0" file="emboss_fuzztran.xml" />
- <tool id="EMBOSS: garnier40" version="5.0.0" file="emboss_garnier.xml" />
- <tool id="EMBOSS: geecee41" version="5.0.0" file="emboss_geecee.xml" />
- <tool id="EMBOSS: getorf42" version="5.0.0" file="emboss_getorf.xml" />
- <tool id="EMBOSS: helixturnhelix43" version="5.0.0" file="emboss_helixturnhelix.xml" />
- <tool id="EMBOSS: hmoment44" version="5.0.0" file="emboss_hmoment.xml" />
- <tool id="EMBOSS: iep45" version="5.0.0" file="emboss_iep.xml" />
- <tool id="EMBOSS: infoseq46" version="5.0.0" file="emboss_infoseq.xml" />
- <tool id="EMBOSS: isochore47" version="5.0.0" file="emboss_isochore.xml" />
- <tool id="EMBOSS: lindna48" version="5.0.0" file="emboss_lindna.xml" />
- <tool id="EMBOSS: marscan49" version="5.0.0" file="emboss_marscan.xml" />
- <tool id="EMBOSS: maskfeat50" version="5.0.0" file="emboss_maskfeat.xml" />
- <tool id="EMBOSS: maskseq51" version="5.0.0" file="emboss_maskseq.xml" />
- <tool id="EMBOSS: matcher52" version="5.0.0" file="emboss_matcher.xml" />
- <tool id="EMBOSS: megamerger53" version="5.0.0" file="emboss_megamerger.xml" />
- <tool id="EMBOSS: merger54" version="5.0.0" file="emboss_merger.xml" />
- <tool id="EMBOSS: msbar55" version="5.0.0" file="emboss_msbar.xml" />
- <tool id="EMBOSS: needle56" version="5.0.0" file="emboss_needle.xml" />
- <tool id="EMBOSS: newcpgreport57" version="5.0.0" file="emboss_newcpgreport.xml" />
- <tool id="EMBOSS: newcpgseek58" version="5.0.0" file="emboss_newcpgseek.xml" />
- <tool id="EMBOSS: newseq59" version="5.0.0" file="emboss_newseq.xml" />
- <tool id="EMBOSS: noreturn60" version="5.0.0" file="emboss_noreturn.xml" />
- <tool id="EMBOSS: notseq61" version="5.0.0" file="emboss_notseq.xml" />
- <tool id="EMBOSS: nthseq62" version="5.0.0" file="emboss_nthseq.xml" />
- <tool id="EMBOSS: octanol63" version="5.0.0" file="emboss_octanol.xml" />
- <tool id="EMBOSS: oddcomp64" version="5.0.0" file="emboss_oddcomp.xml" />
- <tool id="EMBOSS: palindrome65" version="5.0.0" file="emboss_palindrome.xml" />
- <tool id="EMBOSS: pasteseq66" version="5.0.0" file="emboss_pasteseq.xml" />
- <tool id="EMBOSS: patmatdb67" version="5.0.0" file="emboss_patmatdb.xml" />
- <tool id="EMBOSS: pepcoil68" version="5.0.0" file="emboss_pepcoil.xml" />
- <tool id="EMBOSS: pepinfo69" version="5.0.0" file="emboss_pepinfo.xml" />
- <tool id="EMBOSS: pepnet70" version="5.0.0" file="emboss_pepnet.xml" />
- <tool id="EMBOSS: pepstats71" version="5.0.0" file="emboss_pepstats.xml" />
- <tool id="EMBOSS: pepwheel72" version="5.0.0" file="emboss_pepwheel.xml" />
- <tool id="EMBOSS: pepwindow73" version="5.0.0" file="emboss_pepwindow.xml" />
- <tool id="EMBOSS: pepwindowall74" version="5.0.0" file="emboss_pepwindowall.xml" />
- <tool id="EMBOSS: plotcon75" version="5.0.0" file="emboss_plotcon.xml" />
- <tool id="EMBOSS: plotorf76" version="5.0.0" file="emboss_plotorf.xml" />
- <tool id="EMBOSS: polydot77" version="5.0.0" file="emboss_polydot.xml" />
- <tool id="EMBOSS: preg78" version="5.0.0" file="emboss_preg.xml" />
- <tool id="EMBOSS: prettyplot79" version="5.0.0" file="emboss_prettyplot.xml" />
- <tool id="EMBOSS: prettyseq80" version="5.0.0" file="emboss_prettyseq.xml" />
- <tool id="EMBOSS: primersearch81" version="5.0.0" file="emboss_primersearch.xml" />
- <tool id="EMBOSS: revseq82" version="5.0.0" file="emboss_revseq.xml" />
- <tool id="EMBOSS: seqmatchall83" version="5.0.0" file="emboss_seqmatchall.xml" />
- <tool id="EMBOSS: seqret84" version="5.0.0" file="emboss_seqret.xml" />
- <tool id="EMBOSS: showfeat85" version="5.0.0" file="emboss_showfeat.xml" />
- <tool id="EMBOSS: shuffleseq87" version="5.0.0" file="emboss_shuffleseq.xml" />
- <tool id="EMBOSS: sigcleave88" version="5.0.0" file="emboss_sigcleave.xml" />
- <tool id="EMBOSS: sirna89" version="5.0.0" file="emboss_sirna.xml" />
- <tool id="EMBOSS: sixpack90" version="5.0.0" file="emboss_sixpack.xml" />
- <tool id="EMBOSS: skipseq91" version="5.0.0" file="emboss_skipseq.xml" />
- <tool id="EMBOSS: splitter92" version="5.0.0" file="emboss_splitter.xml" />
- <tool id="EMBOSS: supermatcher95" version="5.0.0" file="emboss_supermatcher.xml" />
- <tool id="EMBOSS: syco96" version="5.0.0" file="emboss_syco.xml" />
- <tool id="EMBOSS: tcode97" version="5.0.0" file="emboss_tcode.xml" />
- <tool id="EMBOSS: textsearch98" version="5.0.0" file="emboss_textsearch.xml" />
- <tool id="EMBOSS: tmap99" version="5.0.0" file="emboss_tmap.xml" />
- <tool id="EMBOSS: tranalign100" version="5.0.0" file="emboss_tranalign.xml" />
- <tool id="EMBOSS: transeq101" version="5.0.0" file="emboss_transeq.xml" />
- <tool id="EMBOSS: trimest102" version="5.0.0" file="emboss_trimest.xml" />
- <tool id="EMBOSS: trimseq103" version="5.0.0" file="emboss_trimseq.xml" />
- <tool id="EMBOSS: twofeat104" version="5.0.0" file="emboss_twofeat.xml" />
- <tool id="EMBOSS: union105" version="5.0.0" file="emboss_union.xml" />
- <tool id="EMBOSS: vectorstrip106" version="5.0.0" file="emboss_vectorstrip.xml" />
- <tool id="EMBOSS: water107" version="5.0.0" file="emboss_water.xml" />
- <tool id="EMBOSS: wobble108" version="5.0.0" file="emboss_wobble.xml" />
- <tool id="EMBOSS: wordcount109" version="5.0.0" file="emboss_wordcount.xml" />
- <tool id="EMBOSS: wordmatch110" version="5.0.0" file="emboss_wordmatch.xml" />
+ <tool id="EMBOSS: antigenic1" version="5.0.0" file="emboss_5/emboss_antigenic.xml" />
+ <tool id="EMBOSS: backtranseq2" version="5.0.0" file="emboss_5/emboss_backtranseq.xml" />
+ <tool id="EMBOSS: banana3" version="5.0.0" file="emboss_5/emboss_banana.xml" />
+ <tool id="EMBOSS: biosed4" version="5.0.0" file="emboss_5/emboss_biosed.xml" />
+ <tool id="EMBOSS: btwisted5" version="5.0.0" file="emboss_5/emboss_btwisted.xml" />
+ <tool id="EMBOSS: cai_custom6" version="5.0.0" file="emboss_5/emboss_cai_custom.xml" />
+ <tool id="EMBOSS: cai6" version="5.0.0" file="emboss_5/emboss_cai.xml" />
+ <tool id="EMBOSS: chaos7" version="5.0.0" file="emboss_5/emboss_chaos.xml" />
+ <tool id="EMBOSS: charge8" version="5.0.0" file="emboss_5/emboss_charge.xml" />
+ <tool id="EMBOSS: checktrans9" version="5.0.0" file="emboss_5/emboss_checktrans.xml" />
+ <tool id="EMBOSS: chips10" version="5.0.0" file="emboss_5/emboss_chips.xml" />
+ <tool id="EMBOSS: cirdna11" version="5.0.0" file="emboss_5/emboss_cirdna.xml" />
+ <tool id="EMBOSS: codcmp12" version="5.0.0" file="emboss_5/emboss_codcmp.xml" />
+ <tool id="EMBOSS: coderet13" version="5.0.0" file="emboss_5/emboss_coderet.xml" />
+ <tool id="EMBOSS: compseq14" version="5.0.0" file="emboss_5/emboss_compseq.xml" />
+ <tool id="EMBOSS: cpgplot15" version="5.0.0" file="emboss_5/emboss_cpgplot.xml" />
+ <tool id="EMBOSS: cpgreport16" version="5.0.0" file="emboss_5/emboss_cpgreport.xml" />
+ <tool id="EMBOSS: cusp17" version="5.0.0" file="emboss_5/emboss_cusp.xml" />
+ <tool id="EMBOSS: cutseq18" version="5.0.0" file="emboss_5/emboss_cutseq.xml" />
+ <tool id="EMBOSS: dan19" version="5.0.0" file="emboss_5/emboss_dan.xml" />
+ <tool id="EMBOSS: degapseq20" version="5.0.0" file="emboss_5/emboss_degapseq.xml" />
+ <tool id="EMBOSS: descseq21" version="5.0.0" file="emboss_5/emboss_descseq.xml" />
+ <tool id="EMBOSS: diffseq22" version="5.0.0" file="emboss_5/emboss_diffseq.xml" />
+ <tool id="EMBOSS: digest23" version="5.0.0" file="emboss_5/emboss_digest.xml" />
+ <tool id="EMBOSS: dotmatcher24" version="5.0.0" file="emboss_5/emboss_dotmatcher.xml" />
+ <tool id="EMBOSS: dotpath25" version="5.0.0" file="emboss_5/emboss_dotpath.xml" />
+ <tool id="EMBOSS: dottup26" version="5.0.0" file="emboss_5/emboss_dottup.xml" />
+ <tool id="EMBOSS: dreg27" version="5.0.0" file="emboss_5/emboss_dreg.xml" />
+ <tool id="EMBOSS: einverted28" version="5.0.0" file="emboss_5/emboss_einverted.xml" />
+ <tool id="EMBOSS: epestfind29" version="5.0.0" file="emboss_5/emboss_epestfind.xml" />
+ <tool id="EMBOSS: equicktandem31" version="5.0.0" file="emboss_5/emboss_equicktandem.xml" />
+ <tool id="EMBOSS: est2genome32" version="5.0.0" file="emboss_5/emboss_est2genome.xml" />
+ <tool id="EMBOSS: etandem33" version="5.0.0" file="emboss_5/emboss_etandem.xml" />
+ <tool id="EMBOSS: extractfeat34" version="5.0.0" file="emboss_5/emboss_extractfeat.xml" />
+ <tool id="EMBOSS: extractseq35" version="5.0.0" file="emboss_5/emboss_extractseq.xml" />
+ <tool id="EMBOSS: freak36" version="5.0.0" file="emboss_5/emboss_freak.xml" />
+ <tool id="EMBOSS: fuzznuc37" version="5.0.0" file="emboss_5/emboss_fuzznuc.xml" />
+ <tool id="EMBOSS: fuzzpro38" version="5.0.0" file="emboss_5/emboss_fuzzpro.xml" />
+ <tool id="EMBOSS: fuzztran39" version="5.0.0" file="emboss_5/emboss_fuzztran.xml" />
+ <tool id="EMBOSS: garnier40" version="5.0.0" file="emboss_5/emboss_garnier.xml" />
+ <tool id="EMBOSS: geecee41" version="5.0.0" file="emboss_5/emboss_geecee.xml" />
+ <tool id="EMBOSS: getorf42" version="5.0.0" file="emboss_5/emboss_getorf.xml" />
+ <tool id="EMBOSS: helixturnhelix43" version="5.0.0" file="emboss_5/emboss_helixturnhelix.xml" />
+ <tool id="EMBOSS: hmoment44" version="5.0.0" file="emboss_5/emboss_hmoment.xml" />
+ <tool id="EMBOSS: iep45" version="5.0.0" file="emboss_5/emboss_iep.xml" />
+ <tool id="EMBOSS: infoseq46" version="5.0.0" file="emboss_5/emboss_infoseq.xml" />
+ <tool id="EMBOSS: isochore47" version="5.0.0" file="emboss_5/emboss_isochore.xml" />
+ <tool id="EMBOSS: lindna48" version="5.0.0" file="emboss_5/emboss_lindna.xml" />
+ <tool id="EMBOSS: marscan49" version="5.0.0" file="emboss_5/emboss_marscan.xml" />
+ <tool id="EMBOSS: maskfeat50" version="5.0.0" file="emboss_5/emboss_maskfeat.xml" />
+ <tool id="EMBOSS: maskseq51" version="5.0.0" file="emboss_5/emboss_maskseq.xml" />
+ <tool id="EMBOSS: matcher52" version="5.0.0" file="emboss_5/emboss_matcher.xml" />
+ <tool id="EMBOSS: megamerger53" version="5.0.0" file="emboss_5/emboss_megamerger.xml" />
+ <tool id="EMBOSS: merger54" version="5.0.0" file="emboss_5/emboss_merger.xml" />
+ <tool id="EMBOSS: msbar55" version="5.0.0" file="emboss_5/emboss_msbar.xml" />
+ <tool id="EMBOSS: needle56" version="5.0.0" file="emboss_5/emboss_needle.xml" />
+ <tool id="EMBOSS: newcpgreport57" version="5.0.0" file="emboss_5/emboss_newcpgreport.xml" />
+ <tool id="EMBOSS: newcpgseek58" version="5.0.0" file="emboss_5/emboss_newcpgseek.xml" />
+ <tool id="EMBOSS: newseq59" version="5.0.0" file="emboss_5/emboss_newseq.xml" />
+ <tool id="EMBOSS: noreturn60" version="5.0.0" file="emboss_5/emboss_noreturn.xml" />
+ <tool id="EMBOSS: notseq61" version="5.0.0" file="emboss_5/emboss_notseq.xml" />
+ <tool id="EMBOSS: nthseq62" version="5.0.0" file="emboss_5/emboss_nthseq.xml" />
+ <tool id="EMBOSS: octanol63" version="5.0.0" file="emboss_5/emboss_octanol.xml" />
+ <tool id="EMBOSS: oddcomp64" version="5.0.0" file="emboss_5/emboss_oddcomp.xml" />
+ <tool id="EMBOSS: palindrome65" version="5.0.0" file="emboss_5/emboss_palindrome.xml" />
+ <tool id="EMBOSS: pasteseq66" version="5.0.0" file="emboss_5/emboss_pasteseq.xml" />
+ <tool id="EMBOSS: patmatdb67" version="5.0.0" file="emboss_5/emboss_patmatdb.xml" />
+ <tool id="EMBOSS: pepcoil68" version="5.0.0" file="emboss_5/emboss_pepcoil.xml" />
+ <tool id="EMBOSS: pepinfo69" version="5.0.0" file="emboss_5/emboss_pepinfo.xml" />
+ <tool id="EMBOSS: pepnet70" version="5.0.0" file="emboss_5/emboss_pepnet.xml" />
+ <tool id="EMBOSS: pepstats71" version="5.0.0" file="emboss_5/emboss_pepstats.xml" />
+ <tool id="EMBOSS: pepwheel72" version="5.0.0" file="emboss_5/emboss_pepwheel.xml" />
+ <tool id="EMBOSS: pepwindow73" version="5.0.0" file="emboss_5/emboss_pepwindow.xml" />
+ <tool id="EMBOSS: pepwindowall74" version="5.0.0" file="emboss_5/emboss_pepwindowall.xml" />
+ <tool id="EMBOSS: plotcon75" version="5.0.0" file="emboss_5/emboss_plotcon.xml" />
+ <tool id="EMBOSS: plotorf76" version="5.0.0" file="emboss_5/emboss_plotorf.xml" />
+ <tool id="EMBOSS: polydot77" version="5.0.0" file="emboss_5/emboss_polydot.xml" />
+ <tool id="EMBOSS: preg78" version="5.0.0" file="emboss_5/emboss_preg.xml" />
+ <tool id="EMBOSS: prettyplot79" version="5.0.0" file="emboss_5/emboss_prettyplot.xml" />
+ <tool id="EMBOSS: prettyseq80" version="5.0.0" file="emboss_5/emboss_prettyseq.xml" />
+ <tool id="EMBOSS: primersearch81" version="5.0.0" file="emboss_5/emboss_primersearch.xml" />
+ <tool id="EMBOSS: revseq82" version="5.0.0" file="emboss_5/emboss_revseq.xml" />
+ <tool id="EMBOSS: seqmatchall83" version="5.0.0" file="emboss_5/emboss_seqmatchall.xml" />
+ <tool id="EMBOSS: seqret84" version="5.0.0" file="emboss_5/emboss_seqret.xml" />
+ <tool id="EMBOSS: showfeat85" version="5.0.0" file="emboss_5/emboss_showfeat.xml" />
+ <tool id="EMBOSS: shuffleseq87" version="5.0.0" file="emboss_5/emboss_shuffleseq.xml" />
+ <tool id="EMBOSS: sigcleave88" version="5.0.0" file="emboss_5/emboss_sigcleave.xml" />
+ <tool id="EMBOSS: sirna89" version="5.0.0" file="emboss_5/emboss_sirna.xml" />
+ <tool id="EMBOSS: sixpack90" version="5.0.0" file="emboss_5/emboss_sixpack.xml" />
+ <tool id="EMBOSS: skipseq91" version="5.0.0" file="emboss_5/emboss_skipseq.xml" />
+ <tool id="EMBOSS: splitter92" version="5.0.0" file="emboss_5/emboss_splitter.xml" />
+ <tool id="EMBOSS: supermatcher95" version="5.0.0" file="emboss_5/emboss_supermatcher.xml" />
+ <tool id="EMBOSS: syco96" version="5.0.0" file="emboss_5/emboss_syco.xml" />
+ <tool id="EMBOSS: tcode97" version="5.0.0" file="emboss_5/emboss_tcode.xml" />
+ <tool id="EMBOSS: textsearch98" version="5.0.0" file="emboss_5/emboss_textsearch.xml" />
+ <tool id="EMBOSS: tmap99" version="5.0.0" file="emboss_5/emboss_tmap.xml" />
+ <tool id="EMBOSS: tranalign100" version="5.0.0" file="emboss_5/emboss_tranalign.xml" />
+ <tool id="EMBOSS: transeq101" version="5.0.0" file="emboss_5/emboss_transeq.xml" />
+ <tool id="EMBOSS: trimest102" version="5.0.0" file="emboss_5/emboss_trimest.xml" />
+ <tool id="EMBOSS: trimseq103" version="5.0.0" file="emboss_5/emboss_trimseq.xml" />
+ <tool id="EMBOSS: twofeat104" version="5.0.0" file="emboss_5/emboss_twofeat.xml" />
+ <tool id="EMBOSS: union105" version="5.0.0" file="emboss_5/emboss_union.xml" />
+ <tool id="EMBOSS: vectorstrip106" version="5.0.0" file="emboss_5/emboss_vectorstrip.xml" />
+ <tool id="EMBOSS: water107" version="5.0.0" file="emboss_5/emboss_water.xml" />
+ <tool id="EMBOSS: wobble108" version="5.0.0" file="emboss_5/emboss_wobble.xml" />
+ <tool id="EMBOSS: wordcount109" version="5.0.0" file="emboss_5/emboss_wordcount.xml" />
+ <tool id="EMBOSS: wordmatch110" version="5.0.0" file="emboss_5/emboss_wordmatch.xml" /></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0003_tools.xml
--- a/scripts/migrate_tools/0003_tools.xml
+++ b/scripts/migrate_tools/0003_tools.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository name="freebayes" description="Galaxy Freebayes Bayesian genetic variant detector tool" changeset_revision="213a3d6b579a">
- <tool id="freebayes" version="0.0.2 " file="freebayes.xml" />
+ <tool id="freebayes" version="0.0.2 " file="variant_detection/freebayes.xml" /></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0004_tools.xml
--- a/scripts/migrate_tools/0004_tools.xml
+++ b/scripts/migrate_tools/0004_tools.xml
@@ -2,11 +2,11 @@
<toolshed name="toolshed.g2.bx.psu.edu"><repository name="blast_datatypes" description="Datatypes for BLAST" changeset_revision="e1c29f302301" /><repository name="ncbi_blast_plus" description="Galaxy wrappers for NCBI BLAST+" changeset_revision="d375502056f1">
- <tool id="blastxml_to_tabular" version="0.0.8" file="blastxml_to_tabular.xml"/>
- <tool id="ncbi_blastn_wrapper" version="0.0.11" file="ncbi_blastn_wrapper.xml"/>
- <tool id="ncbi_blastp_wrapper" version="0.0.11" file="ncbi_blastp_wrapper.xml"/>
- <tool id="ncbi_blastx_wrapper" version="0.0.11" file="ncbi_blastx_wrapper.xml"/>
- <tool id="ncbi_tblastn_wrapper" version="0.0.11" file="ncbi_tblastn_wrapper.xml"/>
- <tool id="ncbi_tblastx_wrapper" version="0.0.11" file="ncbi_tblastx_wrapper.xml"/>
+ <tool id="blastxml_to_tabular" version="0.0.8" file="ncbi_blast_plus/blastxml_to_tabular.xml"/>
+ <tool id="ncbi_blastn_wrapper" version="0.0.11" file="ncbi_blast_plus/ncbi_blastn_wrapper.xml"/>
+ <tool id="ncbi_blastp_wrapper" version="0.0.11" file="ncbi_blast_plus/ncbi_blastp_wrapper.xml"/>
+ <tool id="ncbi_blastx_wrapper" version="0.0.11" file="ncbi_blast_plus/ncbi_blastx_wrapper.xml"/>
+ <tool id="ncbi_tblastn_wrapper" version="0.0.11" file="ncbi_blast_plus/ncbi_tblastn_wrapper.xml"/>
+ <tool id="ncbi_tblastx_wrapper" version="0.0.11" file="ncbi_blast_plus/ncbi_tblastx_wrapper.xml"/></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0005_tools.xml
--- a/scripts/migrate_tools/0005_tools.xml
+++ b/scripts/migrate_tools/0005_tools.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository name="bwa_wrappers" description="Galaxy wrappers for the BWA short read aligner." changeset_revision="ffa8aaa14f7c">
- <tool id="bwa_wrapper" version="1.2.3" file="bwa_wrapper.xml"/>
- <tool id="bwa_color_wrapper" version="1.0.2" file="bwa_color_wrapper.xml"/>
+ <tool id="bwa_wrapper" version="1.2.3" file="sr_mapping/bwa_wrapper.xml"/>
+ <tool id="bwa_color_wrapper" version="1.0.2" file="sr_mapping/bwa_color_wrapper.xml"/></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0006_tools.xml
--- a/scripts/migrate_tools/0006_tools.xml
+++ b/scripts/migrate_tools/0006_tools.xml
@@ -1,18 +1,18 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository name="picard" description="Galaxy wrappers for the Picard SAM/BAM manipulation tools." changeset_revision="e0232cbac965">
- <tool id="picard_FastqToSam" version="1.56.0" file="picard_FastqToSam.xml" />
- <tool id="picard_SamToFastq" version="1.56.1" file="picard_SamToFastq.xml" />
- <tool id="picard_BamIndexStats" version="1.56.0" file="picard_BamIndexStats.xml" />
- <tool id="PicardASMetrics" version="1.56.0" file="rgPicardASMetrics.xml" />
- <tool id="PicardGCBiasMetrics" version="1.56.0" file="rgPicardGCBiasMetrics.xml" />
- <tool id="rgEstLibComp" version="1.56.0" file="rgPicardLibComplexity.xml" />
- <tool id="PicardInsertSize" version="1.56.0" file="rgPicardInsertSize.xml" />
- <tool id="PicardHsMetrics" version="1.56.0" file="rgPicardHsMetrics.xml" />
- <tool id="picard_ARRG" version="1.56.0" file="picard_AddOrReplaceReadGroups.xml" />
- <tool id="picard_ReorderSam" version="1.56.0" file="picard_ReorderSam.xml" />
- <tool id="picard_ReplaceSamHeader" version="1.56.0" file="picard_ReplaceSamHeader.xml" />
- <tool id="rgPicFixMate" version="1.56.0" file="rgPicardFixMate.xml" />
- <tool id="rgPicardMarkDups" version="1.56.0" file="rgPicardMarkDups.xml" />
+ <tool id="picard_FastqToSam" version="1.56.0" file="picard/picard_FastqToSam.xml" />
+ <tool id="picard_SamToFastq" version="1.56.1" file="picard/picard_SamToFastq.xml" />
+ <tool id="picard_BamIndexStats" version="1.56.0" file="picard/picard_BamIndexStats.xml" />
+ <tool id="PicardASMetrics" version="1.56.0" file="picard/rgPicardASMetrics.xml" />
+ <tool id="PicardGCBiasMetrics" version="1.56.0" file="picard/rgPicardGCBiasMetrics.xml" />
+ <tool id="rgEstLibComp" version="1.56.0" file="picard/rgPicardLibComplexity.xml" />
+ <tool id="PicardInsertSize" version="1.56.0" file="picard/rgPicardInsertSize.xml" />
+ <tool id="PicardHsMetrics" version="1.56.0" file="picard/rgPicardHsMetrics.xml" />
+ <tool id="picard_ARRG" version="1.56.0" file="picard/picard_AddOrReplaceReadGroups.xml" />
+ <tool id="picard_ReorderSam" version="1.56.0" file="picard/picard_ReorderSam.xml" />
+ <tool id="picard_ReplaceSamHeader" version="1.56.0" file="picard/picard_ReplaceSamHeader.xml" />
+ <tool id="rgPicFixMate" version="1.56.0" file="picard/rgPicardFixMate.xml" />
+ <tool id="rgPicardMarkDups" version="1.56.0" file="picard/rgPicardMarkDups.xml" /></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0007_tools.xml
--- a/scripts/migrate_tools/0007_tools.xml
+++ b/scripts/migrate_tools/0007_tools.xml
@@ -1,15 +1,15 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository name="bowtie_wrappers" description="Galaxy wrappers for the Bowtie short read mapping tools." changeset_revision="0c7e4eadfb3c">
- <tool id="bowtie_wrapper" version="1.1.2" file="bowtie_wrapper.xml" />
+ <tool id="bowtie_wrapper" version="1.1.2" file="sr_mapping/bowtie_wrapper.xml" /></repository><repository name="bowtie_color_wrappers" description="Galaxy wrappers for the Bowtie short read mapping tools on color space reads" changeset_revision="fd0914e451c5">
- <tool id="bowtie_color_wrapper" version="1.1.2" file="bowtie_color_wrapper.xml" />
+ <tool id="bowtie_color_wrapper" version="1.1.2" file="sr_mapping/bowtie_color_wrapper.xml" /></repository><repository name="lastz" description="Galaxy wrappers for the Lastz alignment tool" changeset_revision="0801f8207d30">
- <tool id="lastz_wrapper_2" version="1.1.2" file="lastz_wrapper.xml" />
+ <tool id="lastz_wrapper_2" version="1.1.2" file="sr_mapping/lastz_wrapper.xml" /></repository><repository name="lastz_paired_reads" description="Galaxy wrapper for the Lastz alignment tool on paired reads" changeset_revision="96825cee5c25">
- <tool id="lastz_paired_reads_wrapper" version="1.1.1" file="lastz_paired_reads_wrapper.xml" />
+ <tool id="lastz_paired_reads_wrapper" version="1.1.1" file="sr_mapping/lastz_paired_reads_wrapper.xml" /></repository></toolshed>
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0008_tools.xml
--- a/scripts/migrate_tools/0008_tools.xml
+++ b/scripts/migrate_tools/0008_tools.xml
@@ -1,147 +1,147 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository owner="devteam" changeset_revision="dc20f447c0e2" name="bam_to_sam" description="Galaxy wrappers for the tool BAM-to-SAM: converts BAM format to SAM format">
- <tool id="bam_to_sam" version="1.0.3" file="bam_to_sam.xml" />
+ <tool id="bam_to_sam" version="1.0.3" file="samtools/bam_to_sam.xml" /></repository><repository owner="devteam" changeset_revision="586c1f0e1515" name="categorize_elements_satisfying_criteria" description="Galaxy wrappers for the tool Categorize Elements: satisfying criteria">
- <tool id="categorize_elements_satisfying_criteria" version="1.0.0" file="categorize_elements_satisfying_criteria.xml" />
+ <tool id="categorize_elements_satisfying_criteria" version="1.0.0" file="regVariation/categorize_elements_satisfying_criteria.xml" /></repository><repository owner="devteam" changeset_revision="acc3dc5d26e3" name="compute_motif_frequencies_for_all_motifs" description="Galaxy wrappers for the tool Compute Motif Frequencies For All Motifs: motif by motif">
- <tool id="compute_motif_frequencies_for_all_motifs" version="1.0.0" file="compute_motif_frequencies_for_all_motifs.xml" />
+ <tool id="compute_motif_frequencies_for_all_motifs" version="1.0.0" file="regVariation/compute_motif_frequencies_for_all_motifs.xml" /></repository><repository owner="devteam" changeset_revision="46325357b948" name="compute_motifs_frequency" description="Galaxy wrappers for the tool Compute Motif Frequencies: in indel flanking regions">
- <tool id="compute_motifs_frequency" version="1.0.0" file="compute_motifs_frequency.xml" />
+ <tool id="compute_motifs_frequency" version="1.0.0" file="regVariation/compute_motifs_frequency.xml" /></repository><repository owner="devteam" changeset_revision="4a32700dcaa2" name="ctd_batch" description="Galaxy wrappers for the tool CTD: analysis of chemicals, diseases, or genes">
- <tool id="ctdBatch_1" version="1.0.0" file="ctd.xml" />
+ <tool id="ctdBatch_1" version="1.0.0" file="phenotype_association/ctd.xml" /></repository><repository owner="devteam" changeset_revision="9a3f7a890da6" name="cuffcompare" description="Galaxy wrappers for the Cuffcompare tool.">
- <tool id="cuffcompare" version="0.0.5" file="cuffcompare_wrapper.xml" />
+ <tool id="cuffcompare" version="0.0.5" file="ngs_rna/cuffcompare_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="0dabb2ed6eb1" name="cuffdiff" description="Galaxy wrappers for the Cuffdiff tool.">
- <tool id="cuffdiff" version="0.0.6" file="cuffdiff_wrapper.xml" />
+ <tool id="cuffdiff" version="0.0.6" file="ngs_rna/cuffdiff_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="b01956f26c36" name="cufflinks" description="Galaxy wrappers for the Cufflinks tool.">
- <tool id="cufflinks" version="0.0.6" file="cufflinks_wrapper.xml" />
+ <tool id="cufflinks" version="0.0.6" file="ngs_rna/cufflinks_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="fdc55fd74f78" name="cuffmerge" description="Galaxy wrappers for the Cuffmerge tool.">
- <tool id="cuffmerge" version="0.0.5" file="cuffmerge_wrapper.xml" />
+ <tool id="cuffmerge" version="0.0.5" file="ngs_rna/cuffmerge_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="f16000dc644b" name="delete_overlapping_indels" description="Galaxy wrappers for the tool Delete Overlapping Indels: from a chromosome indels file">
- <tool id="delete_overlapping_indels" version="1.0.0" file="delete_overlapping_indels.xml" />
+ <tool id="delete_overlapping_indels" version="1.0.0" file="regVariation/delete_overlapping_indels.xml" /></repository><repository owner="devteam" changeset_revision="de839553d2a2" name="divide_pg_snp" description="Galaxy wrappers for the tool Separate pgSnp alleles: into columns">
- <tool id="dividePgSnp" version="1.0.0" file="dividePgSnpAlleles.xml" />
+ <tool id="dividePgSnp" version="1.0.0" file="phenotype_association/dividePgSnpAlleles.xml" /></repository><repository owner="devteam" changeset_revision="063ecbe59faf" name="draw_stacked_barplots" description="Galaxy wrappers for the tool Draw Stacked Bar Plots: for different categories and different criteria">
- <tool id="draw_stacked_barplots" version="1.0.0" file="draw_stacked_barplots.xml" />
+ <tool id="draw_stacked_barplots" version="1.0.0" file="regVariation/draw_stacked_barplots.xml" /></repository><repository owner="devteam" changeset_revision="f2ab5b44870d" name="fasta_clipping_histogram" description="Galaxy wrappers for the tool Length Distribution chart">
- <tool id="cshl_fasta_clipping_histogram" version="1.0.0" file="fasta_clipping_histogram.xml" />
+ <tool id="cshl_fasta_clipping_histogram" version="1.0.0" file="fastx_toolkit/fasta_clipping_histogram.xml" /></repository><repository owner="devteam" changeset_revision="8f0ae92440b8" name="fasta_formatter" description="Galaxy wrappers for the tool FASTA Width: formatter">
- <tool id="cshl_fasta_formatter" version="1.0.0" file="fasta_formatter.xml" />
+ <tool id="cshl_fasta_formatter" version="1.0.0" file="fastx_toolkit/fasta_formatter.xml" /></repository><repository owner="devteam" changeset_revision="4b41e3076a50" name="fasta_nucleotide_changer" description="Galaxy wrappers for the tool RNA/DNA: converter">
- <tool id="cshl_fasta_nucleotides_changer" version="1.0.0" file="fasta_nucleotide_changer.xml" />
+ <tool id="cshl_fasta_nucleotides_changer" version="1.0.0" file="fastx_toolkit/fasta_nucleotide_changer.xml" /></repository><repository owner="devteam" changeset_revision="e359ce20fbd9" name="fastq_quality_boxplot" description="Galaxy wrappers for the tool Draw quality score boxplot">
- <tool id="cshl_fastq_quality_boxplot" version="1.0.0" file="fastq_quality_boxplot.xml" />
+ <tool id="cshl_fastq_quality_boxplot" version="1.0.0" file="fastx_toolkit/fastq_quality_boxplot.xml" /></repository><repository owner="devteam" changeset_revision="b87c74b61d81" name="fastq_quality_converter" description="Galaxy wrappers for the tool Quality format converter: (ASCII-Numeric)">
- <tool id="cshl_fastq_quality_converter" version="1.0.0" file="fastq_quality_converter.xml" />
+ <tool id="cshl_fastq_quality_converter" version="1.0.0" file="fastx_toolkit/fastq_quality_converter.xml" /></repository><repository owner="devteam" changeset_revision="b145b9b26648" name="fastq_quality_filter" description="Galaxy wrappers for the Filter by quality tool.">
- <tool id="cshl_fastq_quality_filter" version="1.0.0" file="fastq_quality_filter.xml" />
+ <tool id="cshl_fastq_quality_filter" version="1.0.0" file="fastx_toolkit/fastq_quality_filter.xml" /></repository><repository owner="devteam" changeset_revision="04614cf6ed39" name="fastq_to_fasta" description="Galaxy wrappers for the tool FASTQ to FASTA: converter">
- <tool id="cshl_fastq_to_fasta" version="1.0.0" file="fastq_to_fasta.xml" />
+ <tool id="cshl_fastq_to_fasta" version="1.0.0" file="fastx_toolkit/fastq_to_fasta.xml" /></repository><repository owner="devteam" changeset_revision="7f9660a246c0" name="fastx_artifacts_filter" description="Galaxy wrappers for the Remove sequencing artifacts tool.">
- <tool id="cshl_fastx_artifacts_filter" version="1.0.0" file="fastx_artifacts_filter.xml" />
+ <tool id="cshl_fastx_artifacts_filter" version="1.0.0" file="fastx_toolkit/fastx_artifacts_filter.xml" /></repository><repository owner="devteam" changeset_revision="a12850d0559b" name="fastx_barcode_splitter" description="Galaxy wrappers for the Barcode Splitter tool.">
- <tool id="cshl_fastx_barcode_splitter" version="1.0.0" file="fastx_barcode_splitter.xml" />
+ <tool id="cshl_fastx_barcode_splitter" version="1.0.0" file="fastx_toolkit/fastx_barcode_splitter.xml" /></repository><repository owner="devteam" changeset_revision="2fe2d2b9e8e4" name="fastx_clipper" description="Galaxy wrappers for the tool Clip: adapter sequences">
- <tool id="cshl_fastx_clipper" version="1.0.1" file="fastx_clipper.xml" />
+ <tool id="cshl_fastx_clipper" version="1.0.1" file="fastx_toolkit/fastx_clipper.xml" /></repository><repository owner="devteam" changeset_revision="e942fd3a76a5" name="fastx_collapser" description="Galaxy wrappers for the tool Collapse: sequences">
- <tool id="cshl_fastx_collapser" version="1.0.0" file="fastx_collapser.xml" />
+ <tool id="cshl_fastx_collapser" version="1.0.0" file="fastx_toolkit/fastx_collapser.xml" /></repository><repository owner="devteam" changeset_revision="bcc5424a4a3c" name="fastx_nucleotides_distribution" description="Galaxy wrappers for the Draw nucleotides distribution chart tool.">
- <tool id="cshl_fastx_nucleotides_distribution" version="1.0.0" file="fastx_nucleotides_distribution.xml" />
+ <tool id="cshl_fastx_nucleotides_distribution" version="1.0.0" file="fastx_toolkit/fastx_nucleotides_distribution.xml" /></repository><repository owner="devteam" changeset_revision="45f077341b24" name="fastx_quality_statistics" description="Galaxy wrappers for the Compute quality statistics tool.">
- <tool id="cshl_fastx_quality_statistics" version="1.0.0" file="fastx_quality_statistics.xml" />
+ <tool id="cshl_fastx_quality_statistics" version="1.0.0" file="fastx_toolkit/fastx_quality_statistics.xml" /></repository><repository owner="devteam" changeset_revision="d7bce63e6e09" name="fastx_renamer" description="Galaxy wrappers for the Rename sequences tool.">
- <tool id="cshl_fastx_renamer" version="0.0.11" file="fastx_renamer.xml" />
+ <tool id="cshl_fastx_renamer" version="0.0.11" file="fastx_toolkit/fastx_renamer.xml" /></repository><repository owner="devteam" changeset_revision="c58871138668" name="fastx_reverse_complement" description="Galaxy wrappers for the Reverse-Complement tool.">
- <tool id="cshl_fastx_reverse_complement" version="1.0.0" file="fastx_reverse_complement.xml" />
+ <tool id="cshl_fastx_reverse_complement" version="1.0.0" file="fastx_toolkit/fastx_reverse_complement.xml" /></repository><repository owner="devteam" changeset_revision="9cb372481a71" name="fastx_trimmer" description="Galaxy wrappers for the Trim sequences tool.">
- <tool id="cshl_fastx_trimmer" version="1.0.0" file="fastx_trimmer.xml" />
+ <tool id="cshl_fastx_trimmer" version="1.0.0" file="fastx_toolkit/fastx_trimmer.xml" /></repository><repository owner="devteam" changeset_revision="64133669255f" name="hgv_fundo" description="Galaxy wrappers for the tool FunDO: human genes associated with disease terms">
- <tool id="hgv_funDo" version="1.0.0" file="funDo.xml" />
+ <tool id="hgv_funDo" version="1.0.0" file="phenotype_association/funDo.xml" /></repository><repository owner="devteam" changeset_revision="0e80ffa5b7f7" name="hgv_hilbertvis" description="Galaxy wrappers for the tool HVIS: visualization of genomic data with the Hilbert curve">
- <tool id="hgv_hilbertvis" version="1.0.0" file="hilbertvis.xml" />
+ <tool id="hgv_hilbertvis" version="1.0.0" file="phenotype_association/hilbertvis.xml" /></repository><repository owner="devteam" changeset_revision="5ad24b81dd10" name="indels_3way" description="Galaxy wrappers for the tool Fetch Indels: from 3-way alignments">
- <tool id="indels_3way" version="1.0.3" file="getIndels_3way.xml" />
+ <tool id="indels_3way" version="1.0.3" file="regVariation/getIndels_3way.xml" /></repository><repository owner="devteam" changeset_revision="4e31fad3f08e" name="microsatellite_birthdeath" description="Galaxy wrappers for the tool Identify microsatellite births and deaths: and causal mutational mechanisms from previously identified orthologous microsatellite sets">
- <tool id="microsatellite_birthdeath" version="1.0.0" file="microsatellite_birthdeath.xml" />
+ <tool id="microsatellite_birthdeath" version="1.0.0" file="regVariation/microsatellite_birthdeath.xml" /></repository><repository owner="devteam" changeset_revision="275433d3a395" name="multispecies_orthologous_microsats" description="Galaxy wrappers for the tool Extract orthologous microsatellites: for multiple (>2) species alignments">
- <tool id="multispecies_orthologous_microsats" version="1.0.0" file="multispecies_MicrosatDataGenerator_interrupted_GALAXY.xml" />
+ <tool id="multispecies_orthologous_microsats" version="1.0.0" file="regVariation/multispecies_MicrosatDataGenerator_interrupted_GALAXY.xml" /></repository><repository owner="devteam" changeset_revision="8f0af7251167" name="mutate_snp_codon" description="Galaxy wrappers for the tool Mutate Codons: with SNPs">
- <tool id="mutate_snp_codon_1" version="1.0.0" file="mutate_snp_codon.xml" />
+ <tool id="mutate_snp_codon_1" version="1.0.0" file="evolution/mutate_snp_codon.xml" /></repository><repository owner="devteam" changeset_revision="a110f9d6ae24" name="pileup_interval" description="Galaxy wrappers for the tool Pileup-to-Interval: condenses pileup format into ranges of bases">
- <tool id="pileup_interval" version="1.0.0" file="pileup_interval.xml" />
+ <tool id="pileup_interval" version="1.0.0" file="samtools/pileup_interval.xml" /></repository><repository owner="devteam" changeset_revision="ff1ba9b75337" name="pileup_parser" description="Galaxy wrappers for the tool Filter pileup: on coverage and SNPs">
- <tool id="pileup_parser" version="1.0.2" file="pileup_parser.xml" />
+ <tool id="pileup_parser" version="1.0.2" file="samtools/pileup_parser.xml" /></repository><repository owner="devteam" changeset_revision="8c737b8ddc45" name="sam2interval" description="Galaxy wrappers for the tool Convert SAM: to interval">
- <tool id="sam2interval" version="1.0.1" file="sam2interval.xml" />
+ <tool id="sam2interval" version="1.0.1" file="samtools/sam2interval.xml" /></repository><repository owner="devteam" changeset_revision="0b2424a404d9" name="sam_bitwise_flag_filter" description="Galaxy wrappers for the tool Filter SAM: on bitwise flag values">
- <tool id="sam_bw_filter" version="1.0.0" file="sam_bitwise_flag_filter.xml" />
+ <tool id="sam_bw_filter" version="1.0.0" file="samtools/sam_bitwise_flag_filter.xml" /></repository><repository owner="devteam" changeset_revision="a7a49d31c5cf" name="sam_merge" description="Galaxy wrappers for the tool Merge BAM Files: merges BAM files together">
- <tool id="sam_merge2" version="1.1.2" file="sam_merge.xml" />
+ <tool id="sam_merge2" version="1.1.2" file="samtools/sam_merge.xml" /></repository><repository owner="devteam" changeset_revision="95612c159681" name="sam_pileup" description="Galaxy wrappers for the tool Generate pileup: from BAM dataset">
- <tool id="sam_pileup" version="1.1.1" file="sam_pileup.xml" />
+ <tool id="sam_pileup" version="1.1.1" file="samtools/sam_pileup.xml" /></repository><repository owner="devteam" changeset_revision="30fdbaccb96b" name="sam_to_bam" description="Galaxy wrappers for the tool SAM-to-BAM: converts SAM format to BAM format">
- <tool id="sam_to_bam" version="1.1.2" file="sam_to_bam.xml" />
+ <tool id="sam_to_bam" version="1.1.2" file="samtools/sam_to_bam.xml" /></repository><repository owner="devteam" changeset_revision="13c4ad597626" name="samtools_flagstat" description="Galaxy wrappers for the tool flagstat: provides simple stats on BAM files">
- <tool id="samtools_flagstat" version="1.0.0" file="samtools_flagstat.xml" />
+ <tool id="samtools_flagstat" version="1.0.0" file="samtools/samtools_flagstat.xml" /></repository><repository owner="devteam" changeset_revision="44a18a94d7a9" name="samtools_mpileup" description="Galaxy wrappers for the tool MPileup: SNP and indel caller">
- <tool id="samtools_mpileup" version="0.0.1" file="samtools_mpileup.xml" />
+ <tool id="samtools_mpileup" version="0.0.1" file="samtools/samtools_mpileup.xml" /></repository><repository owner="devteam" changeset_revision="7e92b2a53aab" name="samtools_rmdup" description="Galaxy wrappers for the tool rmdup: remove PCR duplicates">
- <tool id="samtools_rmdup" version="1.0.0" file="samtools_rmdup.xml" />
+ <tool id="samtools_rmdup" version="1.0.0" file="samtools/samtools_rmdup.xml" /></repository><repository owner="devteam" changeset_revision="68ba55e96489" name="samtools_slice_bam" description="Galaxy wrappers for the tool Slice BAM: by provided regions">
- <tool id="samtools_slice_bam" version="0.0.1" file="samtools_slice_bam.xml" />
+ <tool id="samtools_slice_bam" version="0.0.1" file="samtools/samtools_slice_bam.xml" /></repository><repository owner="devteam" changeset_revision="36163bff76cc" name="split_paired_reads" description="Galaxy wrappers for the Split paired end reads tool.">
- <tool id="split_paired_reads" version="1.0.0" file="split_paired_reads.xml" />
+ <tool id="split_paired_reads" version="1.0.0" file="metag_tools/split_paired_reads.xml" /></repository><repository owner="devteam" changeset_revision="e6a85a9297b3" name="t_test_two_samples" description="Galaxy wrappers for the T Test for Two Samples tool.">
- <tool id="t_test_two_samples" version="1.0.0" file="t_test_two_samples.xml" />
+ <tool id="t_test_two_samples" version="1.0.0" file="regVariation/t_test_two_samples.xml" /></repository><repository owner="devteam" changeset_revision="acf952549b53" name="xy_plot" description="Galaxy wrappers for the tool Plotting tool: for multiple series and graph types">
- <tool id="XY_Plot_1" version="1.0.1" file="xy_plot.xml" />
+ <tool id="XY_Plot_1" version="1.0.1" file="plotting/xy_plot.xml" /></repository></toolshed>
\ No newline at end of file
diff -r a94e57976adf8cee859bbe14e8275b73b16206bc -r c38c0a6893e4831b536ce5b4e7004690aa8bb77b scripts/migrate_tools/0009_tools.xml
--- a/scripts/migrate_tools/0009_tools.xml
+++ b/scripts/migrate_tools/0009_tools.xml
@@ -1,132 +1,132 @@
<?xml version="1.0"?><toolshed name="toolshed.g2.bx.psu.edu"><repository owner="devteam" changeset_revision="96d2e31a3938" name="bowtie2" description="Bowtie2">
- <tool id="bowtie2" version="0.2" file="bowtie2_wrapper.xml" />
+ <tool id="bowtie2" version="0.2" file="ngs_rna/bowtie2_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="a0c8dc671a23" name="ccat" description="Control-based ChIP-seq Analysis Tool">
- <tool id="peakcalling_ccat" version="0.0.1" file="ccat_wrapper.xml" />
+ <tool id="peakcalling_ccat" version="0.0.1" file="peak_calling/ccat_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="7cc64024fe92" name="clustalw" description="ClustalW multiple sequence alignment program for DNA or proteins">
- <tool id="clustalw" version="0.1" file="rgClustalw.xml" />
+ <tool id="clustalw" version="0.1" file="rgenetics/rgClustalw.xml" /></repository><repository owner="devteam" changeset_revision="6708501767b6" name="dwt_cor_ava_perclass" description="Compute P-values and Correlation Coefficients for Feature Occurrences">
- <tool id="compute_p-values_correlation_coefficients_feature_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="execute_dwt_cor_aVa_perClass.xml" />
+ <tool id="compute_p-values_correlation_coefficients_feature_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="discreteWavelet/execute_dwt_cor_aVa_perClass.xml" /></repository><repository owner="devteam" changeset_revision="0f2eda4ea8dc" name="dwt_cor_avb_all" description="Compute P-values and Correlation Coefficients for Occurrences of Two Set of Features">
- <tool id="compute_p-values_correlation_coefficients_featureA_featureB_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="execute_dwt_cor_aVb_all.xml" />
+ <tool id="compute_p-values_correlation_coefficients_featureA_featureB_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="discreteWavelet/execute_dwt_cor_aVb_all.xml" /></repository><repository owner="devteam" changeset_revision="0b89b03ad760" name="dwt_ivc_all" description="Compute P-values and Second Moments for Feature Occurrences">
- <tool id="compute_p-values_second_moments_feature_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="execute_dwt_IvC_all.xml" />
+ <tool id="compute_p-values_second_moments_feature_occurrences_between_two_datasets_using_discrete_wavelet_transfom" version="1.0.0" file="discreteWavelet/execute_dwt_IvC_all.xml" /></repository><repository owner="devteam" changeset_revision="cb422b6f49d2" name="dwt_var_perclass" description="Compute P-values and Max Variances for Feature Occurrences">
- <tool id="compute_p-values_max_variances_feature_occurrences_in_one_dataset_using_discrete_wavelet_transfom" version="1.0.0" file="execute_dwt_var_perClass.xml" />
+ <tool id="compute_p-values_max_variances_feature_occurrences_in_one_dataset_using_discrete_wavelet_transfom" version="1.0.0" file="discreteWavelet/execute_dwt_var_perClass.xml" /></repository><repository owner="devteam" changeset_revision="d56c5d2e1a29" name="dwt_var_perfeature" description="Wavelet variance using Discrete Wavelet Transfoms">
- <tool id="dwt_var1" version="1.0.0" file="execute_dwt_var_perFeature.xml" />
+ <tool id="dwt_var1" version="1.0.0" file="discreteWavelet/execute_dwt_var_perFeature.xml" /></repository><repository owner="devteam" changeset_revision="7b0708761d05" name="express" description="Quantify the abundances of a set of target sequences from sampled subsequences">
- <tool id="express" version="1.1.1" file="express_wrapper.xml" />
+ <tool id="express" version="1.1.1" file="ngs_rna/express_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="e28c965eeed4" name="fastqc" description="Read QC reports using FastQC">
- <tool id="fastqc" version="1.0.0" file="rgFastQC.xml" />
+ <tool id="fastqc" version="1.0.0" file="rgenetics/rgFastQC.xml" /></repository><repository owner="devteam" changeset_revision="94306bdd58f7" name="fastq_combiner" description="Combine FASTA and QUAL into FASTQ.">
- <tool id="fastq_combiner" version="1.0.1" file="fastq_combiner.xml" />
+ <tool id="fastq_combiner" version="1.0.1" file="fastq/fastq_combiner.xml" /></repository><repository owner="devteam" changeset_revision="30d9ece6c752" name="fastq_filter" description="Filter FASTQ reads by quality score and length">
- <tool id="fastq_filter" version="1.0.0" file="fastq_filter.xml" />
+ <tool id="fastq_filter" version="1.0.0" file="fastq/fastq_filter.xml" /></repository><repository owner="devteam" changeset_revision="1298445c852b" name="fastq_groomer" description="Convert between various FASTQ quality formats.">
- <tool id="fastq_groomer" version="1.0.4" file="fastq_groomer.xml" />
+ <tool id="fastq_groomer" version="1.0.4" file="fastq/fastq_groomer.xml" /></repository><repository owner="devteam" changeset_revision="5d1e9e13e8db" name="fastq_manipulation" description="Manipulate FASTQ reads on various attributes.">
- <tool id="fastq_manipulation" version="1.0.1" file="fastq_manipulation.xml" />
+ <tool id="fastq_manipulation" version="1.0.1" file="fastq/fastq_manipulation.xml" /></repository><repository owner="devteam" changeset_revision="5a7b5751617b" name="fastq_masker_by_quality" description="FASTQ Masker by quality score">
- <tool id="fastq_masker_by_quality" version="1.0.0" file="fastq_masker_by_quality.xml" />
+ <tool id="fastq_masker_by_quality" version="1.0.0" file="fastq/fastq_masker_by_quality.xml" /></repository><repository owner="devteam" changeset_revision="f0949bc49926" name="fastq_paired_end_deinterlacer" description="FASTQ de-interlacer on paired end reads.">
- <tool id="fastq_paired_end_deinterlacer" version="1.1" file="fastq_paired_end_deinterlacer.xml" />
+ <tool id="fastq_paired_end_deinterlacer" version="1.1" file="fastq/fastq_paired_end_deinterlacer.xml" /></repository><repository owner="devteam" changeset_revision="b89bdf6acb6c" name="fastq_paired_end_interlacer" description="FASTQ interlacer on paired end reads">
- <tool id="fastq_paired_end_interlacer" version="1.1" file="fastq_paired_end_interlacer.xml" />
+ <tool id="fastq_paired_end_interlacer" version="1.1" file="fastq/fastq_paired_end_interlacer.xml" /></repository><repository owner="devteam" changeset_revision="2793d1d765b9" name="fastq_paired_end_joiner" description="FASTQ joiner on paired end reads">
- <tool id="fastq_paired_end_joiner" version="1.0.0" file="fastq_paired_end_joiner.xml" />
+ <tool id="fastq_paired_end_joiner" version="1.0.0" file="fastq/fastq_paired_end_joiner.xml" /></repository><repository owner="devteam" changeset_revision="c549e99026db" name="fastq_paired_end_splitter" description="FASTQ splitter on joined paired end reads">
- <tool id="fastq_paired_end_splitter" version="1.0.0" file="fastq_paired_end_splitter.xml" />
+ <tool id="fastq_paired_end_splitter" version="1.0.0" file="fastq/fastq_paired_end_splitter.xml" /></repository><repository owner="devteam" changeset_revision="9b7b4e0ca9db" name="fastq_stats" description="FASTQ Summary Statistics by column">
- <tool id="fastq_stats" version="1.0.0" file="fastq_stats.xml" />
+ <tool id="fastq_stats" version="1.0.0" file="fastq/fastq_stats.xml" /></repository><repository owner="devteam" changeset_revision="3571553aeb20" name="fastqtofasta" description="FASTQ to FASTA converter">
- <tool id="fastq_to_fasta_python" version="1.0.0" file="fastq_to_fasta.xml" />
+ <tool id="fastq_to_fasta_python" version="1.0.0" file="fastq/fastq_to_fasta.xml" /></repository><repository owner="devteam" changeset_revision="bc9269529e88" name="fastq_to_tabular" description="FASTQ to Tabular converter">
- <tool id="fastq_to_tabular" version="1.1.0" file="fastq_to_tabular.xml" />
+ <tool id="fastq_to_tabular" version="1.1.0" file="fastq/fastq_to_tabular.xml" /></repository><repository owner="devteam" changeset_revision="0b9feb0ed628" name="fastq_trimmer" description="FASTQ Trimmer by quality">
- <tool id="fastq_trimmer" version="1.0.0" file="fastq_trimmer.xml" />
+ <tool id="fastq_trimmer" version="1.0.0" file="fastq/fastq_trimmer.xml" /></repository><repository owner="devteam" changeset_revision="1cdcaf5fc1da" name="fastq_trimmer_by_quality" description="FASTQ Quality Trimmer by sliding window">
- <tool id="fastq_quality_trimmer" version="1.0.0" file="fastq_trimmer_by_quality.xml" />
+ <tool id="fastq_quality_trimmer" version="1.0.0" file="fastq/fastq_trimmer_by_quality.xml" /></repository><repository owner="devteam" changeset_revision="31154ff9f5e1" name="filter_transcripts_via_tracking" description="Filter Combined Transcripts">
- <tool id="filter_combined_via_tracking" version="0.1" file="filter_transcripts_via_tracking.xml" />
+ <tool id="filter_combined_via_tracking" version="0.1" file="ngs_rna/filter_transcripts_via_tracking.xml" /></repository><repository owner="devteam" changeset_revision="acf51ff24c7d" name="find_diag_hits" description="Identify sequence reads corresponding to a particular taxonomic group">
- <tool id="find_diag_hits" version="1.0.0" file="find_diag_hits.xml" />
+ <tool id="find_diag_hits" version="1.0.0" file="taxonomy/find_diag_hits.xml" /></repository><repository owner="devteam" changeset_revision="33a0e6aca936" name="freebayes_wrapper" description="Call SNPS with Freebayes">
- <tool id="freebayes_wrapper" version="0.5.0" file="freebayes.xml" />
+ <tool id="freebayes_wrapper" version="0.5.0" file="phenotype_association/freebayes.xml" /></repository><repository owner="devteam" changeset_revision="7b1b03c4465d" name="gi2taxonomy" description="Fetch taxonomic representation">
- <tool id="Fetch Taxonomic Ranks" version="1.1.0" file="gi2taxonomy.xml" />
+ <tool id="Fetch Taxonomic Ranks" version="1.1.0" file="taxonomy/gi2taxonomy.xml" /></repository><repository owner="devteam" changeset_revision="2cd5ee197ec7" name="gmaj" description="GMAJ Multiple Alignment Viewer">
- <tool id="gmaj_1" version="2.0.1" file="GMAJ.xml" />
+ <tool id="gmaj_1" version="2.0.1" file="visualization/GMAJ.xml" /></repository><repository owner="devteam" changeset_revision="33e8ed5a4601" name="lca_wrapper" description="Find lowest diagnostic rank">
- <tool id="lca1" version="1.0.1" file="lca.xml" />
+ <tool id="lca1" version="1.0.1" file="taxonomy/lca.xml" /></repository><repository owner="devteam" changeset_revision="ae2ec275332a" name="macs" description="Model-based Analysis of ChIP-Seq">
- <tool id="peakcalling_macs" version="1.0.1" file="macs_wrapper.xml" />
+ <tool id="peakcalling_macs" version="1.0.1" file="peak_calling/macs_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="8cd5945559b8" name="poisson2test" description="Poisson two-sample test">
- <tool id="poisson2test" version="1.0.0" file="poisson2test.xml" />
+ <tool id="poisson2test" version="1.0.0" file="taxonomy/poisson2test.xml" /></repository><repository owner="devteam" changeset_revision="82a8234e03f2" name="sicer" description="Statistical approach for the Identification of ChIP-Enriched Regions">
- <tool id="peakcalling_sicer" version="0.0.1" file="sicer_wrapper.xml" />
+ <tool id="peakcalling_sicer" version="0.0.1" file="peak_calling/sicer_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="9e2b9ca7f33a" name="t2ps" description="Draw phylogeny">
- <tool id="Draw_phylogram" version="1.0.0" file="t2ps_wrapper.xml" />
+ <tool id="Draw_phylogram" version="1.0.0" file="taxonomy/t2ps_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="592acb9505fc" name="t2t_report" description="Summarize taxonomy">
- <tool id="t2t_report" version="1.0.0" file="t2t_report.xml" />
+ <tool id="t2t_report" version="1.0.0" file="taxonomy/t2t_report.xml" /></repository><repository owner="devteam" changeset_revision="b334cd1095ea" name="tabular_to_fastq" description="Tabular to FASTQ converter">
- <tool id="tabular_to_fastq" version="1.0.0" file="tabular_to_fastq.xml" />
+ <tool id="tabular_to_fastq" version="1.0.0" file="fastq/tabular_to_fastq.xml" /></repository><repository owner="devteam" changeset_revision="1030acbecce6" name="tophat" description="Find splice junctions using RNA-seq data">
- <tool id="tophat" version="1.5.0" file="tophat_wrapper.xml" />
+ <tool id="tophat" version="1.5.0" file="ngs_rna/tophat_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="ffa30bedbee3" name="tophat2" description="Gapped-read mapper for RNA-seq data">
- <tool id="tophat2" version="0.6" file="tophat2_wrapper.xml" />
+ <tool id="tophat2" version="0.6" file="ngs_rna/tophat2_wrapper.xml" /></repository><repository owner="devteam" changeset_revision="b001b50f2009" name="vcf_annotate" description="Annotate a VCF file (dbSNP, hapmap)">
- <tool id="vcf_annotate" version="1.0.0" file="annotate.xml" />
+ <tool id="vcf_annotate" version="1.0.0" file="vcf_tools/annotate.xml" /></repository><repository owner="devteam" changeset_revision="76ad0b7865b9" name="vcf_extract" description="Extract reads from a specified region">
- <tool id="vcf_extract" version="1.0.0" file="extract.xml" />
+ <tool id="vcf_extract" version="1.0.0" file="vcf_tools/extract.xml" /></repository><repository owner="devteam" changeset_revision="da1a6f33b504" name="vcf_filter" description="Filter a VCF file">
- <tool id="vcf_filter" version="1.0.0" file="filter.xml" />
+ <tool id="vcf_filter" version="1.0.0" file="vcf_tools/filter.xml" /></repository><repository owner="devteam" changeset_revision="9d162bde4113" name="vcf_intersect" description="Generate the intersection of two VCF files"><tool id="vcf_intersect" version="1.0.0" file="vcf_tools/intersect.xml" /></repository><repository owner="devteam" changeset_revision="66253fc0a69b" name="weblogo3" description="Sequence Logo generator for fasta (eg Clustal alignments)">
- <tool id="rgweblogo3" version="0.4" file="rgWebLogo3.xml" />
+ <tool id="rgweblogo3" version="0.4" file="rgenetics/rgWebLogo3.xml" /></repository></toolshed>
\ No newline at end of file
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.
1
0
commit/galaxy-central: dannon: Swap amqplib for amqp. This was mostly a drop-in replacement, since it's a currently-maintained fork of amqplib, with slight updates to work with amqp 0-9-1.
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/890e70b0fd27/
Changeset: 890e70b0fd27
User: dannon
Date: 2014-02-19 20:27:10
Summary: Swap amqplib for amqp. This was mostly a drop-in replacement, since it's a currently-maintained fork of amqplib, with slight updates to work with amqp 0-9-1.
Affected #: 6 files
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -33,7 +33,6 @@
[eggs:noplatform]
amqp = 1.4.3
-amqplib = 0.6.1
anyjson = 0.3.3
Beaker = 1.4
boto = 2.5.2
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -45,7 +45,7 @@
from sqlalchemy.orm.exc import NoResultFound
eggs.require( "pexpect" )
-eggs.require( "amqplib" )
+eggs.require( "amqp" )
import logging
log = logging.getLogger( __name__ )
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 lib/galaxy/webapps/demo_sequencer/framework/__init__.py
--- a/lib/galaxy/webapps/demo_sequencer/framework/__init__.py
+++ b/lib/galaxy/webapps/demo_sequencer/framework/__init__.py
@@ -31,7 +31,7 @@
import mako.runtime
pkg_resources.require( "pexpect" )
-pkg_resources.require( "amqplib" )
+pkg_resources.require( "amqp" )
import logging
log = logging.getLogger( __name__ )
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 lib/galaxy/webapps/galaxy/controllers/requests_admin.py
--- a/lib/galaxy/webapps/galaxy/controllers/requests_admin.py
+++ b/lib/galaxy/webapps/galaxy/controllers/requests_admin.py
@@ -6,7 +6,9 @@
from galaxy import model, util
from galaxy.web.form_builder import *
from .requests_common import RequestsGrid, invalid_id_redirect
-from amqplib import client_0_8 as amqp
+from galaxy import eggs
+eggs.require("amqp")
+import amqp
import logging, os, pexpect, ConfigParser
log = logging.getLogger( __name__ )
@@ -696,8 +698,7 @@
conn = amqp.Connection( host=trans.app.config.amqp[ 'host' ] + ":" + trans.app.config.amqp[ 'port' ],
userid=trans.app.config.amqp[ 'userid' ],
password=trans.app.config.amqp[ 'password' ],
- virtual_host=trans.app.config.amqp[ 'virtual_host' ],
- insist=False )
+ virtual_host=trans.app.config.amqp[ 'virtual_host' ])
chan = conn.channel()
msg = amqp.Message( rmq_msg,
content_type='text/plain',
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 scripts/galaxy_messaging/client/amqp_publisher.py
--- a/scripts/galaxy_messaging/client/amqp_publisher.py
+++ b/scripts/galaxy_messaging/client/amqp_publisher.py
@@ -1,18 +1,23 @@
'''
-This script gets barcode data from a barcode scanner using serial communication
+This script gets barcode data from a barcode scanner using serial communication
and sends the state representated by the barcode scanner & the barcode string
-to the Galaxy LIMS RabbitMQ server. The message is sent in XML which has 2 tags,
+to the Galaxy LIMS RabbitMQ server. The message is sent in XML which has 2 tags,
barcode & state. The state of the scanner should be set in the galaxy_amq.ini
-file as a configuration variable.
+file as a configuration variable.
'''
-from amqplib import client_0_8 as amqp
+import array
import ConfigParser
-import sys, os
+import optparse
+import os
import serial
-import array
+import sys
import time
-import optparse
+
+from galaxy import eggs
+eggs.require("amqp")
+
+import amqp
xml = \
@@ -31,14 +36,14 @@
print values
data = xml % values
print data
- conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'],
- userid=amqp_config['userid'],
- password=amqp_config['password'],
- virtual_host=amqp_config['virtual_host'],
- insist=False)
+ conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'],
+ userid=amqp_config['userid'],
+ password=amqp_config['password'],
+ virtual_host=amqp_config['virtual_host'],)
+
chan = conn.channel()
- msg = amqp.Message(data,
- content_type='text/plain',
+ msg = amqp.Message(data,
+ content_type='text/plain',
application_headers={'msg_type': 'sample_state_update'})
msg.properties["delivery_mode"] = 2
chan.basic_publish(msg,
@@ -55,13 +60,13 @@
msg = s.read(bytes)
print msg
handle_scan(states, amqp_config, msg.strip())
-
-
+
+
def main():
parser = optparse.OptionParser()
- parser.add_option('-c', '--config-file', help='config file with all the AMQP config parameters',
+ parser.add_option('-c', '--config-file', help='config file with all the AMQP config parameters',
dest='config_file', action='store')
- parser.add_option('-p', '--port', help='Name of the port where the scanner is connected',
+ parser.add_option('-p', '--port', help='Name of the port where the scanner is connected',
dest='port', action='store')
(opts, args) = parser.parse_args()
config = ConfigParser.ConfigParser()
@@ -81,7 +86,7 @@
states[config.get(section, 'prefix')] = config.get(section, 'state')
count = count + 1
else:
- break
+ break
print amqp_config
print states
s = serial.Serial(int(opts.port))
@@ -90,6 +95,6 @@
s.close()
print 'Port %s is open: %s' %( opts.port, s.isOpen())
-
+
if __name__ == '__main__':
main()
diff -r dcca6c291a6972ecd9024781667eb670de191c40 -r 890e70b0fd27d78d5982930f0176c26c4bebbfc0 scripts/galaxy_messaging/server/amqp_consumer.py
--- a/scripts/galaxy_messaging/server/amqp_consumer.py
+++ b/scripts/galaxy_messaging/server/amqp_consumer.py
@@ -1,8 +1,8 @@
'''
Galaxy Messaging with AMQP (RabbitMQ)
-Galaxy uses AMQ protocol to receive messages from external sources like
+Galaxy uses AMQ protocol to receive messages from external sources like
bar code scanners. Galaxy has been tested against RabbitMQ AMQP implementation.
-For Galaxy to receive messages from a message queue the RabbitMQ server has
+For Galaxy to receive messages from a message queue the RabbitMQ server has
to be set up with a user account and other parameters listed in the [galaxy_amqp]
section in the universe_wsgi.ini config file
Once the RabbitMQ server has been setup and started with the given parameters,
@@ -32,8 +32,8 @@
from galaxy import eggs
from galaxy.web.api.requests import RequestsAPIController
import pkg_resources
-pkg_resources.require( "amqplib" )
-from amqplib import client_0_8 as amqp
+pkg_resources.require( "amqp" )
+import amqp
import logging
log = logging.getLogger("GalaxyAMQP")
@@ -45,7 +45,7 @@
log.addHandler(fh)
# data transfer script
-data_transfer_script = os.path.join( os.getcwd(),
+data_transfer_script = os.path.join( os.getcwd(),
"scripts/galaxy_messaging/server/data_transfer.py" )
global config
global config_file_name
@@ -54,13 +54,13 @@
def start_data_transfer( message ):
# fork a new process to transfer datasets
- cmd = '%s "%s" "%s" "%s"' % ( "python",
- data_transfer_script,
+ cmd = '%s "%s" "%s" "%s"' % ( "python",
+ data_transfer_script,
message.body,
config_file_name ) # Galaxy config file name
pid = subprocess.Popen(cmd, shell=True).pid
log.debug('Started process (%i): %s' % (pid, str(cmd)))
-
+
def update_sample_state( message ):
dom = xml.dom.minidom.parseString(message.body)
barcode = get_value(dom, 'barcode')
@@ -69,7 +69,7 @@
log.debug('Barcode: ' + barcode)
log.debug('State: ' + state)
log.debug('API Key: ' + api_key)
- # validate
+ # validate
if not barcode or not state or not api_key:
log.debug( 'Incomplete sample_state_update message received. Sample barcode, desired state and user API key is required.' )
return
@@ -78,13 +78,13 @@
galaxydb = GalaxyDbInterface( dbconnstr )
sample_id = galaxydb.get_sample_id( field_name='bar_code', value=barcode )
if sample_id == -1:
- log.debug( 'Invalid barcode.' )
+ log.debug( 'Invalid barcode.' )
return
galaxydb.change_state(sample_id, state)
# after updating the sample state, update request status
request_id = galaxydb.get_request_id(sample_id)
update_request( api_key, request_id )
-
+
def update_request( api_key, request_id ):
encoded_request_id = api.encode_id( config.get( "app:main", "id_secret" ), request_id )
data = dict( update_type=RequestsAPIController.update_types.REQUEST )
@@ -111,9 +111,9 @@
def main():
parser = optparse.OptionParser()
- parser.add_option('-c', '--config-file', help='Galaxy configuration file',
+ parser.add_option('-c', '--config-file', help='Galaxy configuration file',
dest='config_file', action='store')
- parser.add_option('-s', '--http-server-section', help='Name of the HTTP server section in the Galaxy configuration file',
+ parser.add_option('-s', '--http-server-section', help='Name of the HTTP server section in the Galaxy configuration file',
dest='http_server_section', action='store')
(opts, args) = parser.parse_args()
log.debug( "GALAXY LISTENER PID: " + str(os.getpid()) + " - " + str( opts ) )
@@ -129,33 +129,32 @@
for option in config.options("galaxy_amqp"):
amqp_config[option] = config.get("galaxy_amqp", option)
log.debug( str( amqp_config ) )
- # connect
- conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'],
- userid=amqp_config['userid'],
- password=amqp_config['password'],
- virtual_host=amqp_config['virtual_host'],
- insist=False)
+ # connect
+ conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'],
+ userid=amqp_config['userid'],
+ password=amqp_config['password'],
+ virtual_host=amqp_config['virtual_host'])
chan = conn.channel()
- chan.queue_declare( queue=amqp_config['queue'],
- durable=True,
- exclusive=True,
+ chan.queue_declare( queue=amqp_config['queue'],
+ durable=True,
+ exclusive=True,
auto_delete=False)
- chan.exchange_declare( exchange=amqp_config['exchange'],
- type="direct",
- durable=True,
- auto_delete=False,)
- chan.queue_bind( queue=amqp_config['queue'],
- exchange=amqp_config['exchange'],
+ chan.exchange_declare( exchange=amqp_config['exchange'],
+ type="direct",
+ durable=True,
+ auto_delete=False,)
+ chan.queue_bind( queue=amqp_config['queue'],
+ exchange=amqp_config['exchange'],
routing_key=amqp_config['routing_key'])
- chan.basic_consume( queue=amqp_config['queue'],
- no_ack=True,
- callback=recv_callback,
+ chan.basic_consume( queue=amqp_config['queue'],
+ no_ack=True,
+ callback=recv_callback,
consumer_tag="testtag")
log.debug('Connected to rabbitmq server - '+amqp_config['host']+":"+amqp_config['port'])
while True:
chan.wait()
- chan.basic_cancel("testtag")
+ chan.basic_cancel("testtag")
chan.close()
conn.close()
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.
1
0
commit/galaxy-central: carlfeberhard: History panel: remove anonymous template
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/dcca6c291a69/
Changeset: dcca6c291a69
User: carlfeberhard
Date: 2014-02-19 19:54:55
Summary: History panel: remove anonymous template
Affected #: 11 files
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/mvc/history/current-history-panel.js
--- a/static/scripts/mvc/history/current-history-panel.js
+++ b/static/scripts/mvc/history/current-history-panel.js
@@ -272,12 +272,6 @@
}
});
-//------------------------------------------------------------------------------ TEMPLATES
-CurrentHistoryPanel.templates = {
- historyPanel : Handlebars.templates[ 'template-history-historyPanel' ],
- anonHistoryPanel : Handlebars.templates[ 'template-history-historyPanel-anon' ]
-};
-
//==============================================================================
return {
CurrentHistoryPanel : CurrentHistoryPanel
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -401,12 +401,6 @@
}
});
-//------------------------------------------------------------------------------ TEMPLATES
-HistoryPanel.templates = {
- historyPanel : Handlebars.templates[ 'template-history-historyPanel' ],
- anonHistoryPanel : Handlebars.templates[ 'template-history-historyPanel-anon' ]
-};
-
//==============================================================================
return {
HistoryPanel : HistoryPanel
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/packed/mvc/history/current-history-panel.js
--- a/static/scripts/packed/mvc/history/current-history-panel.js
+++ b/static/scripts/packed/mvc/history/current-history-panel.js
@@ -1,1 +1,1 @@
-define(["mvc/dataset/hda-edit","mvc/history/history-panel"],function(b,e){var c=SessionStorageModel.extend({defaults:{searching:false,tagsEditorShown:false,annotationEditorShown:false},toString:function(){return"HistoryPanelPrefs("+JSON.stringify(this.toJSON())+")"}});c.storageKey=function d(){return("history-panel")};var a=e.HistoryPanel.extend({HDAViewClass:b.HDAEditView,emptyMsg:_l("This history is empty. Click 'Get Data' on the left pane to start"),noneFoundMsg:_l("No matching datasets found"),initialize:function(f){f=f||{};this.preferences=new c(_.extend({id:c.storageKey()},_.pick(f,_.keys(c.prototype.defaults))));e.HistoryPanel.prototype.initialize.call(this,f);if(this.model){console.debug(this.model);this.model.checkForUpdates()}},loadCurrentHistory:function(g){var f=this;return this.loadHistoryWithHDADetails("current",g).then(function(i,h){f.trigger("current-history",f)})},switchToHistory:function(i,h){var f=this,g=function(){return jQuery.post(galaxy_config.root+"api/histories/"+i+"/set_as_current")};return this.loadHistoryWithHDADetails(i,h,g).then(function(k,j){f.trigger("switched-history",f)})},createNewHistory:function(h){if(!Galaxy||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){this.displayMessage("error",_l("You must be logged in to create histories"));return $.when()}var f=this,g=function(){return jQuery.post(galaxy_config.root+"api/histories",{current:true})};return this.loadHistory(undefined,h,g).then(function(j,i){f.trigger("new-history",f)})},setModel:function(h,f,g){g=g||{};e.HistoryPanel.prototype.setModel.call(this,h,f,g);this.model.checkForUpdates();return this},_setUpModelEventHandlers:function(){e.HistoryPanel.prototype._setUpModelEventHandlers.call(this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("state:ready",function(g,h,f){if((!g.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(this.hdaViews[g.id])}},this)},render:function(h,i){h=(h===undefined)?(this.fxSpeed):(h);var f=this,g;if(this.model){g=this.renderModel()}else{g=this.renderWithoutModel()}$(f).queue("fx",[function(j){if(h&&f.$el.is(":visible")){f.$el.fadeOut(h,j)}else{j()}},function(j){f.$el.empty();if(g){f.$el.append(g.children());f.renderBasedOnPrefs()}j()},function(j){if(h&&!f.$el.is(":visible")){f.$el.fadeIn(h,j)}else{j()}},function(j){if(i){i.call(this)}f.trigger("rendered",this);j()}]);return this},renderBasedOnPrefs:function(){if(this.preferences.get("searching")){this.showSearchControls(0)}},connectToQuotaMeter:function(f){if(!f){return this}this.listenTo(f,"quota:over",this.showQuotaMessage);this.listenTo(f,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(f&&f.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var f=this.$el.find(".quota-message");if(f.is(":hidden")){f.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var f=this.$el.find(".quota-message");if(!f.is(":hidden")){f.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(f){if(!f){return this}this.on("new-storage",function(h,g){if(f&&h){f.findItemByHtml(_l("Include Deleted Datasets")).checked=h.get("show_deleted");f.findItemByHtml(_l("Include Hidden Datasets")).checked=h.get("show_hidden")}});return this},toString:function(){return"CurrentHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});a.templates={historyPanel:Handlebars.templates["template-history-historyPanel"],anonHistoryPanel:Handlebars.templates["template-history-historyPanel-anon"]};return{CurrentHistoryPanel:a}});
\ No newline at end of file
+define(["mvc/dataset/hda-edit","mvc/history/history-panel"],function(b,e){var c=SessionStorageModel.extend({defaults:{searching:false,tagsEditorShown:false,annotationEditorShown:false},toString:function(){return"HistoryPanelPrefs("+JSON.stringify(this.toJSON())+")"}});c.storageKey=function d(){return("history-panel")};var a=e.HistoryPanel.extend({HDAViewClass:b.HDAEditView,emptyMsg:_l("This history is empty. Click 'Get Data' on the left pane to start"),noneFoundMsg:_l("No matching datasets found"),initialize:function(f){f=f||{};this.preferences=new c(_.extend({id:c.storageKey()},_.pick(f,_.keys(c.prototype.defaults))));e.HistoryPanel.prototype.initialize.call(this,f);if(this.model){console.debug(this.model);this.model.checkForUpdates()}},loadCurrentHistory:function(g){var f=this;return this.loadHistoryWithHDADetails("current",g).then(function(i,h){f.trigger("current-history",f)})},switchToHistory:function(i,h){var f=this,g=function(){return jQuery.post(galaxy_config.root+"api/histories/"+i+"/set_as_current")};return this.loadHistoryWithHDADetails(i,h,g).then(function(k,j){f.trigger("switched-history",f)})},createNewHistory:function(h){if(!Galaxy||!Galaxy.currUser||Galaxy.currUser.isAnonymous()){this.displayMessage("error",_l("You must be logged in to create histories"));return $.when()}var f=this,g=function(){return jQuery.post(galaxy_config.root+"api/histories",{current:true})};return this.loadHistory(undefined,h,g).then(function(j,i){f.trigger("new-history",f)})},setModel:function(h,f,g){g=g||{};e.HistoryPanel.prototype.setModel.call(this,h,f,g);this.model.checkForUpdates();return this},_setUpModelEventHandlers:function(){e.HistoryPanel.prototype._setUpModelEventHandlers.call(this);if(Galaxy&&Galaxy.quotaMeter){this.listenTo(this.model,"change:nice_size",function(){Galaxy.quotaMeter.update()})}this.model.hdas.on("state:ready",function(g,h,f){if((!g.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(this.hdaViews[g.id])}},this)},render:function(h,i){h=(h===undefined)?(this.fxSpeed):(h);var f=this,g;if(this.model){g=this.renderModel()}else{g=this.renderWithoutModel()}$(f).queue("fx",[function(j){if(h&&f.$el.is(":visible")){f.$el.fadeOut(h,j)}else{j()}},function(j){f.$el.empty();if(g){f.$el.append(g.children());f.renderBasedOnPrefs()}j()},function(j){if(h&&!f.$el.is(":visible")){f.$el.fadeIn(h,j)}else{j()}},function(j){if(i){i.call(this)}f.trigger("rendered",this);j()}]);return this},renderBasedOnPrefs:function(){if(this.preferences.get("searching")){this.showSearchControls(0)}},connectToQuotaMeter:function(f){if(!f){return this}this.listenTo(f,"quota:over",this.showQuotaMessage);this.listenTo(f,"quota:under",this.hideQuotaMessage);this.on("rendered rendered:initial",function(){if(f&&f.isOverQuota()){this.showQuotaMessage()}});return this},showQuotaMessage:function(){var f=this.$el.find(".quota-message");if(f.is(":hidden")){f.slideDown(this.fxSpeed)}},hideQuotaMessage:function(){var f=this.$el.find(".quota-message");if(!f.is(":hidden")){f.slideUp(this.fxSpeed)}},connectToOptionsMenu:function(f){if(!f){return this}this.on("new-storage",function(h,g){if(f&&h){f.findItemByHtml(_l("Include Deleted Datasets")).checked=h.get("show_deleted");f.findItemByHtml(_l("Include Hidden Datasets")).checked=h.get("show_hidden")}});return this},toString:function(){return"CurrentHistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});return{CurrentHistoryPanel:a}});
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-define(["mvc/dataset/hda-model","mvc/dataset/hda-edit","mvc/history/readonly-history-panel"],function(c,a,b){var d=b.ReadOnlyHistoryPanel.extend({HDAViewClass:a.HDAEditView,initialize:function(e){e=e||{};this.selectedHdaIds=[];this.tagsEditor=null;this.annotationEditor=null;this.selecting=e.selecting||false;this.annotationEditorShown=e.annotationEditorShown||false;this.tagsEditorShown=e.tagsEditorShown||false;b.ReadOnlyHistoryPanel.prototype.initialize.call(this,e)},_setUpModelEventHandlers:function(){b.ReadOnlyHistoryPanel.prototype._setUpModelEventHandlers.call(this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this)},renderModel:function(){var e=$("<div/>");e.append(d.templates.historyPanel(this.model.toJSON()));if(Galaxy.currUser.id&&Galaxy.currUser.id===this.model.get("user_id")){this._renderTags(e);this._renderAnnotation(e)}e.find(".history-secondary-actions").prepend(this._renderSelectButton());e.find(".history-dataset-actions").toggle(this.selecting);e.find(".history-secondary-actions").prepend(this._renderSearchButton());this._setUpBehaviours(e);this.renderHdas(e);return e},_renderTags:function(e){var f=this;this.tagsEditor=new TagsEditor({model:this.model,el:e.find(".history-controls .tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){f.toggleHDATagEditors(true,f.fxSpeed)},onhide:function(){f.toggleHDATagEditors(false,f.fxSpeed)},$activator:faIconButton({title:_l("Edit history tags"),classes:"history-tag-btn",faIcon:"fa-tags"}).appendTo(e.find(".history-secondary-actions"))})},_renderAnnotation:function(e){var f=this;this.annotationEditor=new AnnotationEditor({model:this.model,el:e.find(".history-controls .annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){f.toggleHDAAnnotationEditors(true,f.fxSpeed)},onhide:function(){f.toggleHDAAnnotationEditors(false,f.fxSpeed)},$activator:faIconButton({title:_l("Edit history Annotation"),classes:"history-annotate-btn",faIcon:"fa-comment"}).appendTo(e.find(".history-secondary-actions"))})},_renderSelectButton:function(e){return faIconButton({title:_l("Operations on multiple datasets"),classes:"history-select-btn",faIcon:"fa-check-square-o"})},_setUpBehaviours:function(e){e=e||this.$el;e.find("[title]").tooltip({placement:"bottom"});if(!this.model){return}this._setUpDatasetActionsPopup(e);if((!Galaxy.currUser||Galaxy.currUser.isAnonymous())||(Galaxy.currUser.id!==this.model.get("user_id"))){return}var f=this;e.find(".history-name").attr("title",_l("Click to rename history")).tooltip({placement:"bottom"}).make_text_editable({on_finish:function(g){var h=f.model.get("name");if(g&&g!==h){f.$el.find(".history-name").text(g);f.model.save({name:g}).fail(function(){f.$el.find(".history-name").text(f.model.previous("name"))})}else{f.$el.find(".history-name").text(h)}}})},_setUpDatasetActionsPopup:function(e){var f=this;(new PopupMenu(e.find(".history-dataset-action-popup-btn"),[{html:_l("Hide datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.hide;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Unhide datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.unhide;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Delete datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype["delete"];f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Undelete datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.undelete;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Permanently delete datasets"),func:function(){if(confirm(_l("This will permanently remove the data in your datasets. Are you sure?"))){var g=c.HistoryDatasetAssociation.prototype.purge;f.getSelectedHdaCollection().ajaxQueue(g)}}}]))},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(this.hdaViews[e.id])}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(this.hdaViews[e.id])}},createHdaView:function(f){var e=f.get("id"),g=new this.HDAViewClass({model:f,linkTarget:this.linkTarget,expanded:this.storage.get("expandedHdas")[e],selectable:this.selecting,hasUser:this.model.ownedByCurrUser(),logger:this.logger,tagsEditorShown:(this.tagsEditor&&!this.tagsEditor.isHidden()),annotationEditorShown:(this.annotationEditor&&!this.annotationEditor.isHidden())});this._setUpHdaListeners(g);return g},_setUpHdaListeners:function(f){var e=this;b.ReadOnlyHistoryPanel.prototype._setUpHdaListeners.call(this,f);f.on("selected",function(g){var h=g.model.get("id");e.selectedHdaIds=_.union(e.selectedHdaIds,[h])});f.on("de-selected",function(g){var h=g.model.get("id");e.selectedHdaIds=_.without(e.selectedHdaIds,h)})},toggleHDATagEditors:function(e){var f=arguments;_.each(this.hdaViews,function(g){if(g.tagsEditor){g.tagsEditor.toggle.apply(g.tagsEditor,f)}})},toggleHDAAnnotationEditors:function(e){var f=arguments;_.each(this.hdaViews,function(g){if(g.annotationEditor){g.annotationEditor.toggle.apply(g.annotationEditor,f)}})},removeHdaView:function(f){if(!f){return}var e=this;f.$el.fadeOut(e.fxSpeed,function(){f.off();f.remove();delete e.hdaViews[f.model.id];if(_.isEmpty(e.hdaViews)){e.$el.find(e.emptyMsgSelector).fadeIn(e.fxSpeed,function(){e.trigger("empty-history",e)})}})},events:_.extend(_.clone(b.ReadOnlyHistoryPanel.prototype.events),{"click .history-select-btn":function(f){this.toggleSelectors(this.fxSpeed)},"click .history-select-all-datasets-btn":"selectAllDatasets","click .history-deselect-all-datasets-btn":"deselectAllDatasets"}),updateHistoryDiskSize:function(){this.$el.find(".history-size").text(this.model.get("nice_size"))},showSelectors:function(e){this.selecting=true;this.$el.find(".history-dataset-actions").slideDown(e);_.each(this.hdaViews,function(f){f.showSelector(e)});this.selectedHdaIds=[]},hideSelectors:function(e){this.selecting=false;this.$el.find(".history-dataset-actions").slideUp(e);_.each(this.hdaViews,function(f){f.hideSelector(e)});this.selectedHdaIds=[]},toggleSelectors:function(e){if(!this.selecting){this.showSelectors(e)}else{this.hideSelectors(e)}},selectAllDatasets:function(e){_.each(this.hdaViews,function(f){f.select(e)})},deselectAllDatasets:function(e){_.each(this.hdaViews,function(f){f.deselect(e)})},getSelectedHdaViews:function(){return _.filter(this.hdaViews,function(e){return e.selected})},getSelectedHdaCollection:function(){return new c.HDACollection(_.map(this.getSelectedHdaViews(),function(e){return e.model}),{historyId:this.model.id})},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});d.templates={historyPanel:Handlebars.templates["template-history-historyPanel"],anonHistoryPanel:Handlebars.templates["template-history-historyPanel-anon"]};return{HistoryPanel:d}});
\ No newline at end of file
+define(["mvc/dataset/hda-model","mvc/dataset/hda-edit","mvc/history/readonly-history-panel"],function(c,a,b){var d=b.ReadOnlyHistoryPanel.extend({HDAViewClass:a.HDAEditView,initialize:function(e){e=e||{};this.selectedHdaIds=[];this.tagsEditor=null;this.annotationEditor=null;this.selecting=e.selecting||false;this.annotationEditorShown=e.annotationEditorShown||false;this.tagsEditorShown=e.tagsEditorShown||false;b.ReadOnlyHistoryPanel.prototype.initialize.call(this,e)},_setUpModelEventHandlers:function(){b.ReadOnlyHistoryPanel.prototype._setUpModelEventHandlers.call(this);this.model.on("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.on("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.on("change:visible",this.handleHdaVisibleChange,this);this.model.hdas.on("change:purged",function(e){this.model.fetch()},this)},renderModel:function(){var e=$("<div/>");e.append(d.templates.historyPanel(this.model.toJSON()));if(Galaxy.currUser.id&&Galaxy.currUser.id===this.model.get("user_id")){this._renderTags(e);this._renderAnnotation(e)}e.find(".history-secondary-actions").prepend(this._renderSelectButton());e.find(".history-dataset-actions").toggle(this.selecting);e.find(".history-secondary-actions").prepend(this._renderSearchButton());this._setUpBehaviours(e);this.renderHdas(e);return e},_renderTags:function(e){var f=this;this.tagsEditor=new TagsEditor({model:this.model,el:e.find(".history-controls .tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){f.toggleHDATagEditors(true,f.fxSpeed)},onhide:function(){f.toggleHDATagEditors(false,f.fxSpeed)},$activator:faIconButton({title:_l("Edit history tags"),classes:"history-tag-btn",faIcon:"fa-tags"}).appendTo(e.find(".history-secondary-actions"))})},_renderAnnotation:function(e){var f=this;this.annotationEditor=new AnnotationEditor({model:this.model,el:e.find(".history-controls .annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){f.toggleHDAAnnotationEditors(true,f.fxSpeed)},onhide:function(){f.toggleHDAAnnotationEditors(false,f.fxSpeed)},$activator:faIconButton({title:_l("Edit history Annotation"),classes:"history-annotate-btn",faIcon:"fa-comment"}).appendTo(e.find(".history-secondary-actions"))})},_renderSelectButton:function(e){return faIconButton({title:_l("Operations on multiple datasets"),classes:"history-select-btn",faIcon:"fa-check-square-o"})},_setUpBehaviours:function(e){e=e||this.$el;e.find("[title]").tooltip({placement:"bottom"});if(!this.model){return}this._setUpDatasetActionsPopup(e);if((!Galaxy.currUser||Galaxy.currUser.isAnonymous())||(Galaxy.currUser.id!==this.model.get("user_id"))){return}var f=this;e.find(".history-name").attr("title",_l("Click to rename history")).tooltip({placement:"bottom"}).make_text_editable({on_finish:function(g){var h=f.model.get("name");if(g&&g!==h){f.$el.find(".history-name").text(g);f.model.save({name:g}).fail(function(){f.$el.find(".history-name").text(f.model.previous("name"))})}else{f.$el.find(".history-name").text(h)}}})},_setUpDatasetActionsPopup:function(e){var f=this;(new PopupMenu(e.find(".history-dataset-action-popup-btn"),[{html:_l("Hide datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.hide;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Unhide datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.unhide;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Delete datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype["delete"];f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Undelete datasets"),func:function(){var g=c.HistoryDatasetAssociation.prototype.undelete;f.getSelectedHdaCollection().ajaxQueue(g)}},{html:_l("Permanently delete datasets"),func:function(){if(confirm(_l("This will permanently remove the data in your datasets. Are you sure?"))){var g=c.HistoryDatasetAssociation.prototype.purge;f.getSelectedHdaCollection().ajaxQueue(g)}}}]))},handleHdaDeletionChange:function(e){if(e.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(this.hdaViews[e.id])}},handleHdaVisibleChange:function(e){if(e.hidden()&&!this.storage.get("show_hidden")){this.removeHdaView(this.hdaViews[e.id])}},createHdaView:function(f){var e=f.get("id"),g=new this.HDAViewClass({model:f,linkTarget:this.linkTarget,expanded:this.storage.get("expandedHdas")[e],selectable:this.selecting,hasUser:this.model.ownedByCurrUser(),logger:this.logger,tagsEditorShown:(this.tagsEditor&&!this.tagsEditor.isHidden()),annotationEditorShown:(this.annotationEditor&&!this.annotationEditor.isHidden())});this._setUpHdaListeners(g);return g},_setUpHdaListeners:function(f){var e=this;b.ReadOnlyHistoryPanel.prototype._setUpHdaListeners.call(this,f);f.on("selected",function(g){var h=g.model.get("id");e.selectedHdaIds=_.union(e.selectedHdaIds,[h])});f.on("de-selected",function(g){var h=g.model.get("id");e.selectedHdaIds=_.without(e.selectedHdaIds,h)})},toggleHDATagEditors:function(e){var f=arguments;_.each(this.hdaViews,function(g){if(g.tagsEditor){g.tagsEditor.toggle.apply(g.tagsEditor,f)}})},toggleHDAAnnotationEditors:function(e){var f=arguments;_.each(this.hdaViews,function(g){if(g.annotationEditor){g.annotationEditor.toggle.apply(g.annotationEditor,f)}})},removeHdaView:function(f){if(!f){return}var e=this;f.$el.fadeOut(e.fxSpeed,function(){f.off();f.remove();delete e.hdaViews[f.model.id];if(_.isEmpty(e.hdaViews)){e.$el.find(e.emptyMsgSelector).fadeIn(e.fxSpeed,function(){e.trigger("empty-history",e)})}})},events:_.extend(_.clone(b.ReadOnlyHistoryPanel.prototype.events),{"click .history-select-btn":function(f){this.toggleSelectors(this.fxSpeed)},"click .history-select-all-datasets-btn":"selectAllDatasets","click .history-deselect-all-datasets-btn":"deselectAllDatasets"}),updateHistoryDiskSize:function(){this.$el.find(".history-size").text(this.model.get("nice_size"))},showSelectors:function(e){this.selecting=true;this.$el.find(".history-dataset-actions").slideDown(e);_.each(this.hdaViews,function(f){f.showSelector(e)});this.selectedHdaIds=[]},hideSelectors:function(e){this.selecting=false;this.$el.find(".history-dataset-actions").slideUp(e);_.each(this.hdaViews,function(f){f.hideSelector(e)});this.selectedHdaIds=[]},toggleSelectors:function(e){if(!this.selecting){this.showSelectors(e)}else{this.hideSelectors(e)}},selectAllDatasets:function(e){_.each(this.hdaViews,function(f){f.select(e)})},deselectAllDatasets:function(e){_.each(this.hdaViews,function(f){f.deselect(e)})},getSelectedHdaViews:function(){return _.filter(this.hdaViews,function(e){return e.selected})},getSelectedHdaCollection:function(){return new c.HDACollection(_.map(this.getSelectedHdaViews(),function(e){return e.model}),{historyId:this.model.id})},toString:function(){return"HistoryPanel("+((this.model)?(this.model.get("name")):(""))+")"}});return{HistoryPanel:d}});
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/packed/templates/compiled/history-templates.js
--- a/static/scripts/packed/templates/compiled/history-templates.js
+++ b/static/scripts/packed/templates/compiled/history-templates.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(g,r,p,k,z){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);z=z||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(D,C){var A="",B;A+='\n <div class="dataset-summary">\n ';if(B=p.body){B=B.call(D,{hash:{},data:C})}else{B=D.body;B=typeof B===e?B.apply(D):B}if(B||B===0){A+=B}A+='\n </div>\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return A}function m(D,C){var A="",B;A+='\n <div class="dataset-summary">\n ';B=p["if"].call(D,D.misc_blurb,{hash:{},inverse:o.noop,fn:o.program(4,l,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.data_type,{hash:{},inverse:o.noop,fn:o.program(6,j,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.metadata_dbkey,{hash:{},inverse:o.noop,fn:o.program(9,f,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.misc_info,{hash:{},inverse:o.noop,fn:o.program(12,x,C),data:C});if(B||B===0){A+=B}A+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';B=p.unless.call(D,D.deleted,{hash:{},inverse:o.noop,fn:o.program(14,w,C),data:C});if(B||B===0){A+=B}A+="\n\n ";return A}function l(D,C){var A="",B;A+='\n <div class="dataset-blurb">\n <span class="value">';if(B=p.misc_blurb){B=B.call(D,{hash:{},data:C})}else{B=D.misc_blurb;B=typeof B===e?B.apply(D):B}A+=d(B)+"</span>\n </div>\n ";return A}function j(E,D){var A="",C,B;A+='\n <div class="dataset-datatype">\n <label class="prompt">';B={hash:{},inverse:o.noop,fn:o.program(7,i,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+='</label>\n <span class="value">';if(C=p.data_type){C=C.call(E,{hash:{},data:D})}else{C=E.data_type;C=typeof C===e?C.apply(E):C}A+=d(C)+"</span>\n </div>\n ";return A}function i(B,A){return"format"}function f(E,D){var A="",C,B;A+='\n <div class="dataset-dbkey">\n <label class="prompt">';B={hash:{},inverse:o.noop,fn:o.program(10,y,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+='</label>\n <span class="value">\n ';if(C=p.metadata_dbkey){C=C.call(E,{hash:{},data:D})}else{C=E.metadata_dbkey;C=typeof C===e?C.apply(E):C}A+=d(C)+"\n </span>\n </div>\n ";return A}function y(B,A){return"database"}function x(D,C){var A="",B;A+='\n <div class="dataset-info">\n <span class="value">';if(B=p.misc_info){B=B.call(D,{hash:{},data:C})}else{B=D.misc_info;B=typeof B===e?B.apply(D):B}A+=d(B)+"</span>\n </div>\n ";return A}function w(D,C){var A="",B;A+='\n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="dataset-display-applications">\n ';B=p.each.call(D,D.display_apps,{hash:{},inverse:o.noop,fn:o.program(15,v,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p.each.call(D,D.display_types,{hash:{},inverse:o.noop,fn:o.program(15,v,C),data:C});if(B||B===0){A+=B}A+='\n </div>\n\n <div class="dataset-peek">\n ';B=p["if"].call(D,D.peek,{hash:{},inverse:o.noop,fn:o.program(19,s,C),data:C});if(B||B===0){A+=B}A+="\n </div>\n\n ";return A}function v(D,C){var A="",B;A+='\n <div class="display-application">\n <span class="display-application-location">';if(B=p.label){B=B.call(D,{hash:{},data:C})}else{B=D.label;B=typeof B===e?B.apply(D):B}A+=d(B)+'</span>\n <span class="display-application-links">\n ';B=p.each.call(D,D.links,{hash:{},inverse:o.noop,fn:o.program(16,u,C),data:C});if(B||B===0){A+=B}A+="\n </span>\n </div>\n ";return A}function u(E,D){var A="",C,B;A+='\n <a target="';if(C=p.target){C=C.call(E,{hash:{},data:D})}else{C=E.target;C=typeof C===e?C.apply(E):C}A+=d(C)+'" href="';if(C=p.href){C=C.call(E,{hash:{},data:D})}else{C=E.href;C=typeof C===e?C.apply(E):C}A+=d(C)+'">';B={hash:{},inverse:o.noop,fn:o.program(17,t,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+="</a>\n ";return A}function t(C,B){var A;if(A=p.text){A=A.call(C,{hash:{},data:B})}else{A=C.text;A=typeof A===e?A.apply(C):A}return d(A)}function s(D,C){var A="",B;A+='\n <pre class="peek">';if(B=p.peek){B=B.call(D,{hash:{},data:C})}else{B=D.peek;B=typeof B===e?B.apply(D):B}if(B||B===0){A+=B}A+="</pre>\n ";return A}q+='<div class="dataset-body">\n ';h=p["if"].call(r,r.body,{hash:{},inverse:o.program(3,m,z),fn:o.program(1,n,z),data:z});if(h||h===0){q+=h}q+="\n</div>";return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="dataset-purged-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="dataset-deleted-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="dataset-hidden-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-selector"><span class="fa fa-2x fa-square-o"></span></div>\n <div class="dataset-primary-actions"></div>\n \n <div class="dataset-title-bar clear" tabindex="0">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="dataset-purged-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="dataset-deleted-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="dataset-hidden-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-selector"><span class="fa fa-2x fa-square-o"></span></div>\n <div class="dataset-primary-actions"></div>\n \n <div class="dataset-title-bar clear" tabindex="0">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel-anon"]=b(function(h,r,p,l,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,h.helpers);w=w||{};var q="",i,f,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(A,z){var x="",y;x+='\n <div class="history-name">\n ';if(y=p.name){y=y.call(A,{hash:{},data:z})}else{y=A.name;y=typeof y===e?y.apply(A):y}x+=d(y)+"\n </div>\n ";return x}function m(A,z){var x="",y;x+='\n <div class="history-size">';if(y=p.nice_size){y=y.call(A,{hash:{},data:z})}else{y=A.nice_size;y=typeof y===e?y.apply(A):y}x+=d(y)+"</div>\n ";return x}function k(A,z){var x="",y;x+='\n \n <div class="';if(y=p.status){y=y.call(A,{hash:{},data:z})}else{y=A.status;y=typeof y===e?y.apply(A):y}x+=d(y)+'message">';if(y=p.message){y=y.call(A,{hash:{},data:z})}else{y=A.message;y=typeof y===e?y.apply(A):y}x+=d(y)+"</div>\n ";return x}function j(y,x){return"You are over your disk quota"}function g(y,x){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(y,x){return"All"}function u(y,x){return"None"}function t(y,x){return"For all selected"}function s(y,x){return"Your history is empty. Click 'Get Data' on the left pane to start"}q+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n \n ';i=p["if"].call(r,r.name,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=p["if"].call(r,r.nice_size,{hash:{},inverse:o.noop,fn:o.program(3,m,w),data:w});if(i||i===0){q+=i}q+='\n\n <div class="history-secondary-actions btn-group"></div>\n </div>\n\n <div class="message-container">\n ';i=p["if"].call(r,r.message,{hash:{},inverse:o.noop,fn:o.program(5,k,w),data:w});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:o.noop,fn:o.program(7,j,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+=".\n ";f={hash:{},inverse:o.noop,fn:o.program(9,g,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='.\n </div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:o.noop,fn:o.program(11,v,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:o.noop,fn:o.program(13,u,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:o.noop,fn:o.program(15,t,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:o.noop,fn:o.program(17,s,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+="\n </div>";return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+='\n <div class="history-name">\n ';if(A=q.name){A=A.call(C,{hash:{},data:B})}else{A=C.name;A=typeof A===e?A.apply(C):A}z+=d(A)+"\n </div>\n ";return z}function n(C,B){var z="",A;z+='\n <div class="history-size">';if(A=q.nice_size){A=A.call(C,{hash:{},data:B})}else{A=C.nice_size;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function l(D,C){var z="",B,A;z+='\n <div class="warningmessagesmall"><strong>\n ';A={hash:{},inverse:p.noop,fn:p.program(6,k,C),data:C};if(B=q.local){B=B.call(D,A)}else{B=D.local;B=typeof B===e?B.apply(D):B}if(!q.local){B=c.call(D,B,A)}if(B||B===0){z+=B}z+="\n </strong></div>\n ";return z}function k(A,z){return"You are currently viewing a deleted history!"}function h(C,B){var z="",A;z+='\n \n <div class="';if(A=q.status){A=A.call(C,{hash:{},data:B})}else{A=C.status;A=typeof A===e?A.apply(C):A}z+=d(A)+'message">';if(A=q.message){A=A.call(C,{hash:{},data:B})}else{A=C.message;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function x(A,z){return"You are over your disk quota"}function w(A,z){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(A,z){return"All"}function u(A,z){return"None"}function t(A,z){return"For all selected"}function j(A,z){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n ';i=q["if"].call(s,s.name,{hash:{},inverse:p.noop,fn:p.program(1,o,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=q["if"].call(s,s.nice_size,{hash:{},inverse:p.noop,fn:p.program(3,n,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="history-secondary-actions btn-group"></div>\n </div>\n\n ';i=q["if"].call(s,s.deleted,{hash:{},inverse:p.noop,fn:p.program(5,l,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="message-container">\n ';i=q["if"].call(s,s.message,{hash:{},inverse:p.noop,fn:p.program(8,h,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:p.noop,fn:p.program(10,x,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+=".\n ";f={hash:{},inverse:p.noop,fn:p.program(12,w,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='.\n </div>\n \n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(14,v,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(16,u,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:p.noop,fn:p.program(18,t,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:p.noop,fn:p.program(20,j,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+="\n </div>";return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-body"]=b(function(g,r,p,k,z){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);z=z||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(D,C){var A="",B;A+='\n <div class="dataset-summary">\n ';if(B=p.body){B=B.call(D,{hash:{},data:C})}else{B=D.body;B=typeof B===e?B.apply(D):B}if(B||B===0){A+=B}A+='\n </div>\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';return A}function m(D,C){var A="",B;A+='\n <div class="dataset-summary">\n ';B=p["if"].call(D,D.misc_blurb,{hash:{},inverse:o.noop,fn:o.program(4,l,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.data_type,{hash:{},inverse:o.noop,fn:o.program(6,j,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.metadata_dbkey,{hash:{},inverse:o.noop,fn:o.program(9,f,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p["if"].call(D,D.misc_info,{hash:{},inverse:o.noop,fn:o.program(12,x,C),data:C});if(B||B===0){A+=B}A+='\n </div>\n\n <div class="dataset-actions clear">\n <div class="left"></div>\n <div class="right"></div>\n </div>\n\n ';B=p.unless.call(D,D.deleted,{hash:{},inverse:o.noop,fn:o.program(14,w,C),data:C});if(B||B===0){A+=B}A+="\n\n ";return A}function l(D,C){var A="",B;A+='\n <div class="dataset-blurb">\n <span class="value">';if(B=p.misc_blurb){B=B.call(D,{hash:{},data:C})}else{B=D.misc_blurb;B=typeof B===e?B.apply(D):B}A+=d(B)+"</span>\n </div>\n ";return A}function j(E,D){var A="",C,B;A+='\n <div class="dataset-datatype">\n <label class="prompt">';B={hash:{},inverse:o.noop,fn:o.program(7,i,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+='</label>\n <span class="value">';if(C=p.data_type){C=C.call(E,{hash:{},data:D})}else{C=E.data_type;C=typeof C===e?C.apply(E):C}A+=d(C)+"</span>\n </div>\n ";return A}function i(B,A){return"format"}function f(E,D){var A="",C,B;A+='\n <div class="dataset-dbkey">\n <label class="prompt">';B={hash:{},inverse:o.noop,fn:o.program(10,y,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+='</label>\n <span class="value">\n ';if(C=p.metadata_dbkey){C=C.call(E,{hash:{},data:D})}else{C=E.metadata_dbkey;C=typeof C===e?C.apply(E):C}A+=d(C)+"\n </span>\n </div>\n ";return A}function y(B,A){return"database"}function x(D,C){var A="",B;A+='\n <div class="dataset-info">\n <span class="value">';if(B=p.misc_info){B=B.call(D,{hash:{},data:C})}else{B=D.misc_info;B=typeof B===e?B.apply(D):B}A+=d(B)+"</span>\n </div>\n ";return A}function w(D,C){var A="",B;A+='\n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="dataset-display-applications">\n ';B=p.each.call(D,D.display_apps,{hash:{},inverse:o.noop,fn:o.program(15,v,C),data:C});if(B||B===0){A+=B}A+="\n\n ";B=p.each.call(D,D.display_types,{hash:{},inverse:o.noop,fn:o.program(15,v,C),data:C});if(B||B===0){A+=B}A+='\n </div>\n\n <div class="dataset-peek">\n ';B=p["if"].call(D,D.peek,{hash:{},inverse:o.noop,fn:o.program(19,s,C),data:C});if(B||B===0){A+=B}A+="\n </div>\n\n ";return A}function v(D,C){var A="",B;A+='\n <div class="display-application">\n <span class="display-application-location">';if(B=p.label){B=B.call(D,{hash:{},data:C})}else{B=D.label;B=typeof B===e?B.apply(D):B}A+=d(B)+'</span>\n <span class="display-application-links">\n ';B=p.each.call(D,D.links,{hash:{},inverse:o.noop,fn:o.program(16,u,C),data:C});if(B||B===0){A+=B}A+="\n </span>\n </div>\n ";return A}function u(E,D){var A="",C,B;A+='\n <a target="';if(C=p.target){C=C.call(E,{hash:{},data:D})}else{C=E.target;C=typeof C===e?C.apply(E):C}A+=d(C)+'" href="';if(C=p.href){C=C.call(E,{hash:{},data:D})}else{C=E.href;C=typeof C===e?C.apply(E):C}A+=d(C)+'">';B={hash:{},inverse:o.noop,fn:o.program(17,t,D),data:D};if(C=p.local){C=C.call(E,B)}else{C=E.local;C=typeof C===e?C.apply(E):C}if(!p.local){C=c.call(E,C,B)}if(C||C===0){A+=C}A+="</a>\n ";return A}function t(C,B){var A;if(A=p.text){A=A.call(C,{hash:{},data:B})}else{A=C.text;A=typeof A===e?A.apply(C):A}return d(A)}function s(D,C){var A="",B;A+='\n <pre class="peek">';if(B=p.peek){B=B.call(D,{hash:{},data:C})}else{B=D.peek;B=typeof B===e?B.apply(D):B}if(B||B===0){A+=B}A+="</pre>\n ";return A}q+='<div class="dataset-body">\n ';h=p["if"].call(r,r.body,{hash:{},inverse:o.program(3,m,z),fn:o.program(1,n,z),data:z});if(h||h===0){q+=h}q+="\n</div>";return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-hda-skeleton"]=b(function(f,r,p,k,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,f.helpers);w=w||{};var q="",h,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(B,A){var x="",z,y;x+='\n <div class="errormessagesmall">\n ';y={hash:{},inverse:o.noop,fn:o.program(2,m,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+=":\n ";y={hash:{},inverse:o.noop,fn:o.program(4,l,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </div>\n ";return x}function m(y,x){return"There was an error getting the data for this dataset"}function l(z,y){var x;if(x=p.error){x=x.call(z,{hash:{},data:y})}else{x=z.error;x=typeof x===e?x.apply(z):x}return d(x)}function j(A,z){var x="",y;x+="\n ";y=p["if"].call(A,A.purged,{hash:{},inverse:o.program(10,v,z),fn:o.program(7,i,z),data:z});if(y||y===0){x+=y}x+="\n ";return x}function i(B,A){var x="",z,y;x+='\n <div class="dataset-purged-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(8,g,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n\n ";return x}function g(y,x){return"This dataset has been deleted and removed from disk."}function v(B,A){var x="",z,y;x+='\n <div class="dataset-deleted-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(11,u,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function u(y,x){return"This dataset has been deleted."}function t(B,A){var x="",z,y;x+='\n <div class="dataset-hidden-msg warningmessagesmall"><strong>\n ';y={hash:{},inverse:o.noop,fn:o.program(14,s,A),data:A};if(z=p.local){z=z.call(B,y)}else{z=B.local;z=typeof z===e?z.apply(B):z}if(!p.local){z=c.call(B,z,y)}if(z||z===0){x+=z}x+="\n </strong></div>\n ";return x}function s(y,x){return"This dataset has been hidden."}q+='<div class="dataset hda">\n <div class="dataset-warnings">\n ';h=p["if"].call(r,r.error,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p["if"].call(r,r.deleted,{hash:{},inverse:o.noop,fn:o.program(6,j,w),data:w});if(h||h===0){q+=h}q+="\n\n ";h=p.unless.call(r,r.visible,{hash:{},inverse:o.noop,fn:o.program(13,t,w),data:w});if(h||h===0){q+=h}q+='\n </div>\n\n <div class="dataset-selector"><span class="fa fa-2x fa-square-o"></span></div>\n <div class="dataset-primary-actions"></div>\n \n <div class="dataset-title-bar clear" tabindex="0">\n <span class="dataset-state-icon state-icon"></span>\n <div class="dataset-title">\n <span class="hda-hid">';if(h=p.hid){h=h.call(r,{hash:{},data:w})}else{h=r.hid;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n <span class="dataset-name">';if(h=p.name){h=h.call(r,{hash:{},data:w})}else{h=r.name;h=typeof h===e?h.apply(r):h}q+=d(h)+'</span>\n </div>\n </div>\n\n <div class="dataset-body"></div>\n</div>';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+='\n <div class="history-name">\n ';if(A=q.name){A=A.call(C,{hash:{},data:B})}else{A=C.name;A=typeof A===e?A.apply(C):A}z+=d(A)+"\n </div>\n ";return z}function n(C,B){var z="",A;z+='\n <div class="history-size">';if(A=q.nice_size){A=A.call(C,{hash:{},data:B})}else{A=C.nice_size;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function l(D,C){var z="",B,A;z+='\n <div class="warningmessagesmall"><strong>\n ';A={hash:{},inverse:p.noop,fn:p.program(6,k,C),data:C};if(B=q.local){B=B.call(D,A)}else{B=D.local;B=typeof B===e?B.apply(D):B}if(!q.local){B=c.call(D,B,A)}if(B||B===0){z+=B}z+="\n </strong></div>\n ";return z}function k(A,z){return"You are currently viewing a deleted history!"}function h(C,B){var z="",A;z+='\n \n <div class="';if(A=q.status){A=A.call(C,{hash:{},data:B})}else{A=C.status;A=typeof A===e?A.apply(C):A}z+=d(A)+'message">';if(A=q.message){A=A.call(C,{hash:{},data:B})}else{A=C.message;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function x(A,z){return"You are over your disk quota"}function w(A,z){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(A,z){return"All"}function u(A,z){return"None"}function t(A,z){return"For all selected"}function j(A,z){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n ';i=q["if"].call(s,s.name,{hash:{},inverse:p.noop,fn:p.program(1,o,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=q["if"].call(s,s.nice_size,{hash:{},inverse:p.noop,fn:p.program(3,n,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="history-secondary-actions"></div>\n </div>\n\n ';i=q["if"].call(s,s.deleted,{hash:{},inverse:p.noop,fn:p.program(5,l,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="message-container">\n ';i=q["if"].call(s,s.message,{hash:{},inverse:p.noop,fn:p.program(8,h,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:p.noop,fn:p.program(10,x,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+=".\n ";f={hash:{},inverse:p.noop,fn:p.program(12,w,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='.\n </div>\n \n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(14,v,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(16,u,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:p.noop,fn:p.program(18,t,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:p.noop,fn:p.program(20,j,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+="\n </div>";return r})})();
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/packed/templates/compiled/template-history-historyPanel-anon.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel-anon.js
+++ /dev/null
@@ -1,1 +0,0 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel-anon"]=b(function(h,r,p,l,w){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,h.helpers);w=w||{};var q="",i,f,e="function",d=this.escapeExpression,o=this,c=p.blockHelperMissing;function n(A,z){var x="",y;x+='\n <div class="history-name">\n ';if(y=p.name){y=y.call(A,{hash:{},data:z})}else{y=A.name;y=typeof y===e?y.apply(A):y}x+=d(y)+"\n </div>\n ";return x}function m(A,z){var x="",y;x+='\n <div class="history-size">';if(y=p.nice_size){y=y.call(A,{hash:{},data:z})}else{y=A.nice_size;y=typeof y===e?y.apply(A):y}x+=d(y)+"</div>\n ";return x}function k(A,z){var x="",y;x+='\n \n <div class="';if(y=p.status){y=y.call(A,{hash:{},data:z})}else{y=A.status;y=typeof y===e?y.apply(A):y}x+=d(y)+'message">';if(y=p.message){y=y.call(A,{hash:{},data:z})}else{y=A.message;y=typeof y===e?y.apply(A):y}x+=d(y)+"</div>\n ";return x}function j(y,x){return"You are over your disk quota"}function g(y,x){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(y,x){return"All"}function u(y,x){return"None"}function t(y,x){return"For all selected"}function s(y,x){return"Your history is empty. Click 'Get Data' on the left pane to start"}q+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n \n ';i=p["if"].call(r,r.name,{hash:{},inverse:o.noop,fn:o.program(1,n,w),data:w});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=p["if"].call(r,r.nice_size,{hash:{},inverse:o.noop,fn:o.program(3,m,w),data:w});if(i||i===0){q+=i}q+='\n\n <div class="history-secondary-actions btn-group"></div>\n </div>\n\n <div class="message-container">\n ';i=p["if"].call(r,r.message,{hash:{},inverse:o.noop,fn:o.program(5,k,w),data:w});if(i||i===0){q+=i}q+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:o.noop,fn:o.program(7,j,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+=".\n ";f={hash:{},inverse:o.noop,fn:o.program(9,g,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='.\n </div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:o.noop,fn:o.program(11,v,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:o.noop,fn:o.program(13,u,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:o.noop,fn:o.program(15,t,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:o.noop,fn:o.program(17,s,w),data:w};if(i=p.local){i=i.call(r,f)}else{i=r.local;i=typeof i===e?i.apply(r):i}if(!p.local){i=c.call(r,i,f)}if(i||i===0){q+=i}q+="\n </div>";return q})})();
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/packed/templates/compiled/template-history-historyPanel.js
--- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js
+++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js
@@ -1,1 +1,1 @@
-(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+='\n <div class="history-name">\n ';if(A=q.name){A=A.call(C,{hash:{},data:B})}else{A=C.name;A=typeof A===e?A.apply(C):A}z+=d(A)+"\n </div>\n ";return z}function n(C,B){var z="",A;z+='\n <div class="history-size">';if(A=q.nice_size){A=A.call(C,{hash:{},data:B})}else{A=C.nice_size;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function l(D,C){var z="",B,A;z+='\n <div class="warningmessagesmall"><strong>\n ';A={hash:{},inverse:p.noop,fn:p.program(6,k,C),data:C};if(B=q.local){B=B.call(D,A)}else{B=D.local;B=typeof B===e?B.apply(D):B}if(!q.local){B=c.call(D,B,A)}if(B||B===0){z+=B}z+="\n </strong></div>\n ";return z}function k(A,z){return"You are currently viewing a deleted history!"}function h(C,B){var z="",A;z+='\n \n <div class="';if(A=q.status){A=A.call(C,{hash:{},data:B})}else{A=C.status;A=typeof A===e?A.apply(C):A}z+=d(A)+'message">';if(A=q.message){A=A.call(C,{hash:{},data:B})}else{A=C.message;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function x(A,z){return"You are over your disk quota"}function w(A,z){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(A,z){return"All"}function u(A,z){return"None"}function t(A,z){return"For all selected"}function j(A,z){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n ';i=q["if"].call(s,s.name,{hash:{},inverse:p.noop,fn:p.program(1,o,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=q["if"].call(s,s.nice_size,{hash:{},inverse:p.noop,fn:p.program(3,n,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="history-secondary-actions btn-group"></div>\n </div>\n\n ';i=q["if"].call(s,s.deleted,{hash:{},inverse:p.noop,fn:p.program(5,l,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="message-container">\n ';i=q["if"].call(s,s.message,{hash:{},inverse:p.noop,fn:p.program(8,h,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:p.noop,fn:p.program(10,x,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+=".\n ";f={hash:{},inverse:p.noop,fn:p.program(12,w,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='.\n </div>\n \n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(14,v,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(16,u,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:p.noop,fn:p.program(18,t,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:p.noop,fn:p.program(20,j,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+="\n </div>";return r})})();
\ No newline at end of file
+(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+='\n <div class="history-name">\n ';if(A=q.name){A=A.call(C,{hash:{},data:B})}else{A=C.name;A=typeof A===e?A.apply(C):A}z+=d(A)+"\n </div>\n ";return z}function n(C,B){var z="",A;z+='\n <div class="history-size">';if(A=q.nice_size){A=A.call(C,{hash:{},data:B})}else{A=C.nice_size;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function l(D,C){var z="",B,A;z+='\n <div class="warningmessagesmall"><strong>\n ';A={hash:{},inverse:p.noop,fn:p.program(6,k,C),data:C};if(B=q.local){B=B.call(D,A)}else{B=D.local;B=typeof B===e?B.apply(D):B}if(!q.local){B=c.call(D,B,A)}if(B||B===0){z+=B}z+="\n </strong></div>\n ";return z}function k(A,z){return"You are currently viewing a deleted history!"}function h(C,B){var z="",A;z+='\n \n <div class="';if(A=q.status){A=A.call(C,{hash:{},data:B})}else{A=C.status;A=typeof A===e?A.apply(C):A}z+=d(A)+'message">';if(A=q.message){A=A.call(C,{hash:{},data:B})}else{A=C.message;A=typeof A===e?A.apply(C):A}z+=d(A)+"</div>\n ";return z}function x(A,z){return"You are over your disk quota"}function w(A,z){return"Tool execution is on hold until your disk usage drops below your allocated quota"}function v(A,z){return"All"}function u(A,z){return"None"}function t(A,z){return"For all selected"}function j(A,z){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='<div class="history-controls">\n <div class="history-search-controls">\n <div class="history-search-input"></div>\n </div>\n\n <div class="history-title">\n ';i=q["if"].call(s,s.name,{hash:{},inverse:p.noop,fn:p.program(1,o,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="history-subtitle clear">\n ';i=q["if"].call(s,s.nice_size,{hash:{},inverse:p.noop,fn:p.program(3,n,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="history-secondary-actions"></div>\n </div>\n\n ';i=q["if"].call(s,s.deleted,{hash:{},inverse:p.noop,fn:p.program(5,l,y),data:y});if(i||i===0){r+=i}r+='\n\n <div class="message-container">\n ';i=q["if"].call(s,s.message,{hash:{},inverse:p.noop,fn:p.program(8,h,y),data:y});if(i||i===0){r+=i}r+='\n </div>\n\n <div class="quota-message errormessage">\n ';f={hash:{},inverse:p.noop,fn:p.program(10,x,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+=".\n ";f={hash:{},inverse:p.noop,fn:p.program(12,w,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='.\n </div>\n \n <div class="tags-display"></div>\n <div class="annotation-display"></div>\n\n <div class="history-dataset-actions">\n <div class="btn-group">\n <button class="history-select-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(14,v,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n <button class="history-deselect-all-datasets-btn btn btn-default"\n data-mode="select">';f={hash:{},inverse:p.noop,fn:p.program(16,u,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='</button>\n </div>\n <button class="history-dataset-action-popup-btn btn btn-default"\n >';f={hash:{},inverse:p.noop,fn:p.program(18,t,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+='...</button>\n </div>\n\n </div>\n\n \n <div class="datasets-list"></div>\n\n <div class="empty-history-message infomessagesmall">\n ';f={hash:{},inverse:p.noop,fn:p.program(20,j,y),data:y};if(i=q.local){i=i.call(s,f)}else{i=s.local;i=typeof i===e?i.apply(s):i}if(!q.local){i=c.call(s,i,f)}if(i||i===0){r+=i}r+="\n </div>";return r})})();
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/templates/compiled/history-templates.js
--- a/static/scripts/templates/compiled/history-templates.js
+++ b/static/scripts/templates/compiled/history-templates.js
@@ -302,261 +302,6 @@
});
})();(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-hda-skeleton'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div class=\"errormessagesmall\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(2, program2, 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 ";
- options = {hash:{},inverse:self.noop,fn:self.program(4, program4, 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 </div>\n ";
- return buffer;
- }
-function program2(depth0,data) {
-
-
- return "There was an error getting the data for this dataset";
- }
-
-function program4(depth0,data) {
-
- var stack1;
- if (stack1 = helpers.error) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.error; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- return escapeExpression(stack1);
- }
-
-function program6(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n ";
- stack1 = helpers['if'].call(depth0, depth0.purged, {hash:{},inverse:self.program(10, program10, data),fn:self.program(7, program7, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n ";
- return buffer;
- }
-function program7(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div class=\"dataset-purged-msg warningmessagesmall\"><strong>\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(8, program8, 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 </strong></div>\n\n ";
- return buffer;
- }
-function program8(depth0,data) {
-
-
- return "This dataset has been deleted and removed from disk.";
- }
-
-function program10(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div class=\"dataset-deleted-msg warningmessagesmall\"><strong>\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(11, program11, 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 </strong></div>\n ";
- return buffer;
- }
-function program11(depth0,data) {
-
-
- return "This dataset has been deleted.";
- }
-
-function program13(depth0,data) {
-
- var buffer = "", stack1, options;
- buffer += "\n <div class=\"dataset-hidden-msg warningmessagesmall\"><strong>\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(14, program14, 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 </strong></div>\n ";
- return buffer;
- }
-function program14(depth0,data) {
-
-
- return "This dataset has been hidden.";
- }
-
- buffer += "<div class=\"dataset hda\">\n <div class=\"dataset-warnings\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.error, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n ";
- stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n ";
- stack1 = helpers.unless.call(depth0, depth0.visible, {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"dataset-selector\"><span class=\"fa fa-2x fa-square-o\"></span></div>\n <div class=\"dataset-primary-actions\"></div>\n "
- + "\n <div class=\"dataset-title-bar clear\" tabindex=\"0\">\n <span class=\"dataset-state-icon state-icon\"></span>\n <div class=\"dataset-title\">\n <span class=\"hda-hid\">";
- if (stack1 = helpers.hid) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.hid; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</span>\n <span class=\"dataset-name\">";
- if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</span>\n </div>\n </div>\n\n <div class=\"dataset-body\"></div>\n</div>";
- return buffer;
- });
-})();(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-historyPanel-anon'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div class=\"history-name\">\n ";
- if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "\n </div>\n ";
- return buffer;
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div class=\"history-size\">";
- if (stack1 = helpers.nice_size) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-
-function program5(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n "
- + "\n <div class=\"";
- if (stack1 = helpers.status) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "message\">";
- if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-
-function program7(depth0,data) {
-
-
- return "You are over your disk quota";
- }
-
-function program9(depth0,data) {
-
-
- return "Tool execution is on hold until your disk usage drops below your allocated quota";
- }
-
-function program11(depth0,data) {
-
-
- return "All";
- }
-
-function program13(depth0,data) {
-
-
- return "None";
- }
-
-function program15(depth0,data) {
-
-
- return "For all selected";
- }
-
-function program17(depth0,data) {
-
-
- return "Your history is empty. Click 'Get Data' on the left pane to start";
- }
-
- buffer += "<div class=\"history-controls\">\n <div class=\"history-search-controls\">\n <div class=\"history-search-input\"></div>\n </div>\n\n <div class=\"history-title\">\n "
- + "\n ";
- stack1 = helpers['if'].call(depth0, depth0.name, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n <div class=\"history-secondary-actions btn-group\"></div>\n </div>\n\n <div class=\"message-container\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"quota-message errormessage\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(7, program7, 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 ";
- options = {hash:{},inverse:self.noop,fn:self.program(9, program9, 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 </div>\n\n <div class=\"history-dataset-actions\">\n <div class=\"btn-group\">\n <button class=\"history-select-all-datasets-btn btn btn-default\"\n data-mode=\"select\">";
- options = {hash:{},inverse:self.noop,fn:self.program(11, program11, 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 += "</button>\n <button class=\"history-deselect-all-datasets-btn btn btn-default\"\n data-mode=\"select\">";
- options = {hash:{},inverse:self.noop,fn:self.program(13, program13, 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 += "</button>\n </div>\n <button class=\"history-dataset-action-popup-btn btn btn-default\"\n >";
- options = {hash:{},inverse:self.noop,fn:self.program(15, program15, 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 += "...</button>\n </div>\n\n </div>"
- + "\n\n "
- + "\n <div class=\"datasets-list\"></div>\n\n <div class=\"empty-history-message infomessagesmall\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(17, program17, 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 </div>";
- return buffer;
- });
-})();(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['template-history-historyPanel'] = template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
@@ -660,7 +405,7 @@
buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n ";
stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n <div class=\"history-secondary-actions btn-group\"></div>\n </div>\n\n ";
+ buffer += "\n\n <div class=\"history-secondary-actions\"></div>\n </div>\n\n ";
stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n <div class=\"message-container\">\n ";
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/templates/compiled/template-history-historyPanel-anon.js
--- a/static/scripts/templates/compiled/template-history-historyPanel-anon.js
+++ /dev/null
@@ -1,133 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['template-history-historyPanel-anon'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div class=\"history-name\">\n ";
- if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "\n </div>\n ";
- return buffer;
- }
-
-function program3(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n <div class=\"history-size\">";
- if (stack1 = helpers.nice_size) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-
-function program5(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n "
- + "\n <div class=\"";
- if (stack1 = helpers.status) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.status; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "message\">";
- if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
- else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
- buffer += escapeExpression(stack1)
- + "</div>\n ";
- return buffer;
- }
-
-function program7(depth0,data) {
-
-
- return "You are over your disk quota";
- }
-
-function program9(depth0,data) {
-
-
- return "Tool execution is on hold until your disk usage drops below your allocated quota";
- }
-
-function program11(depth0,data) {
-
-
- return "All";
- }
-
-function program13(depth0,data) {
-
-
- return "None";
- }
-
-function program15(depth0,data) {
-
-
- return "For all selected";
- }
-
-function program17(depth0,data) {
-
-
- return "Your history is empty. Click 'Get Data' on the left pane to start";
- }
-
- buffer += "<div class=\"history-controls\">\n <div class=\"history-search-controls\">\n <div class=\"history-search-input\"></div>\n </div>\n\n <div class=\"history-title\">\n "
- + "\n ";
- stack1 = helpers['if'].call(depth0, depth0.name, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n <div class=\"history-secondary-actions btn-group\"></div>\n </div>\n\n <div class=\"message-container\">\n ";
- stack1 = helpers['if'].call(depth0, depth0.message, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n </div>\n\n <div class=\"quota-message errormessage\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(7, program7, 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 ";
- options = {hash:{},inverse:self.noop,fn:self.program(9, program9, 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 </div>\n\n <div class=\"history-dataset-actions\">\n <div class=\"btn-group\">\n <button class=\"history-select-all-datasets-btn btn btn-default\"\n data-mode=\"select\">";
- options = {hash:{},inverse:self.noop,fn:self.program(11, program11, 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 += "</button>\n <button class=\"history-deselect-all-datasets-btn btn btn-default\"\n data-mode=\"select\">";
- options = {hash:{},inverse:self.noop,fn:self.program(13, program13, 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 += "</button>\n </div>\n <button class=\"history-dataset-action-popup-btn btn btn-default\"\n >";
- options = {hash:{},inverse:self.noop,fn:self.program(15, program15, 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 += "...</button>\n </div>\n\n </div>"
- + "\n\n "
- + "\n <div class=\"datasets-list\"></div>\n\n <div class=\"empty-history-message infomessagesmall\">\n ";
- options = {hash:{},inverse:self.noop,fn:self.program(17, program17, 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 </div>";
- return buffer;
- });
-})();
\ No newline at end of file
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 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
@@ -103,7 +103,7 @@
buffer += "\n </div>\n\n <div class=\"history-subtitle clear\">\n ";
stack1 = helpers['if'].call(depth0, depth0.nice_size, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n\n <div class=\"history-secondary-actions btn-group\"></div>\n </div>\n\n ";
+ buffer += "\n\n <div class=\"history-secondary-actions\"></div>\n </div>\n\n ";
stack1 = helpers['if'].call(depth0, depth0.deleted, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n\n <div class=\"message-container\">\n ";
diff -r 538382c91a75b12f6004ea87c2f7c459f7977f91 -r dcca6c291a6972ecd9024781667eb670de191c40 static/scripts/templates/history-templates.html
--- a/static/scripts/templates/history-templates.html
+++ b/static/scripts/templates/history-templates.html
@@ -63,62 +63,3 @@
{{#local}}Your history is empty. Click 'Get Data' on the left pane to start{{/local}}
</div></script>
-
-
-<!-- history panel for anonymous users -->
-<script type="text/template" class="template-history" id="template-history-historyPanel-anon">
-
- <div class="history-controls">
- <div class="history-search-controls">
- <div class="history-search-input"></div>
- </div>
-
- <div class="history-title">
- {{! wouldn't this always be 'unnamed history'? }}
- {{#if name }}
- <div class="history-name">
- {{name}}
- </div>
- {{/if}}
- </div>
-
- <div class="history-subtitle clear">
- {{#if nice_size }}
- <div class="history-size">{{nice_size}}</div>
- {{/if}}
-
- <div class="history-secondary-actions"></div>
- </div>
-
- <div class="message-container">
- {{#if message}}
- {{! should already be localized }}
- <div class="{{status}}message">{{message}}</div>
- {{/if}}
- </div>
-
- <div class="quota-message errormessage">
- {{#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 class="history-dataset-actions">
- <div class="btn-group">
- <button class="history-select-all-datasets-btn btn btn-default"
- data-mode="select">{{#local}}All{{/local}}</button>
- <button class="history-deselect-all-datasets-btn btn btn-default"
- data-mode="select">{{#local}}None{{/local}}</button>
- </div>
- <button class="history-dataset-action-popup-btn btn btn-default"
- >{{#local}}For all selected{{/local}}...</button>
- </div>
-
- </div>{{! end history-controls }}
-
- {{! where the datasets/hdas are added }}
- <div class="datasets-list"></div>
-
- <div class="empty-history-message infomessagesmall">
- {{#local}}Your history is empty. Click 'Get Data' on the left pane to start{{/local}}
- </div>
-</script>
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.
1
0
commit/galaxy-central: guerler: Grids: Fix negative page numbers
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b31e0927331b/
Changeset: b31e0927331b
User: guerler
Date: 2014-02-19 19:20:42
Summary: Grids: Fix negative page numbers
Affected #: 2 files
diff -r 057069969de059c08a6b6e8343b10bb7cfeea926 -r b31e0927331b7890590585bc9e2d7621b05bce88 static/scripts/mvc/grid/grid-template.js
--- a/static/scripts/mvc/grid/grid-template.js
+++ b/static/scripts/mvc/grid/grid-template.js
@@ -246,7 +246,7 @@
var page_link_range = num_page_links / 2;
var min_page = cur_page_num - page_link_range
var min_offset = 0;
- if (min_page == 0) {
+ if (min_page <= 0) {
// Min page is too low.
min_page = 1;
min_offset = page_link_range - ( cur_page_num - min_page );
diff -r 057069969de059c08a6b6e8343b10bb7cfeea926 -r b31e0927331b7890590585bc9e2d7621b05bce88 static/scripts/packed/mvc/grid/grid-template.js
--- a/static/scripts/packed/mvc/grid/grid-template.js
+++ b/static/scripts/packed/mvc/grid/grid-template.js
@@ -1,1 +1,1 @@
-define([],function(){return{grid:function(b){var a="";if(b.embedded){a=this.grid_header(b)+this.grid_table(b)}else{a='<div class="loading-elt-overlay"></div><table><tr><td width="75%">'+this.grid_header(b)+'</td><td></td><td></td></tr><tr><td width="100%" id="grid-message" valign="top"></td><td></td><td></td></tr></table>'+this.grid_table(b)}if(b.info_text){a+='<br><div class="toolParamHelp" style="clear: both;">'+b.info_text+"</div>"}return a},grid_table:function(a){return'<form method="post" onsubmit="return false;"><table id="grid-table" class="grid"><thead id="grid-table-header"></thead><tbody id="grid-table-body"></tbody><tfoot id="grid-table-footer"></tfoot></table></form>'},grid_header:function(c){var b='<div class="grid-header">';if(!c.embedded){b+="<h2>"+c.title+"</h2>"}if(c.global_actions){b+='<ul class="manage-table-actions">';var d=(c.global_actions.length>=3);if(d){b+='<li><a class="action-button" id="popup-global-actions" class="menubutton">Actions</a></li><div popupmenu="popup-global-actions">'}for(i in c.global_actions){var e=c.global_actions[i];var a="";if(e.inbound){a="use-inbound"}else{a="use-outbound"}b+='<li><a class="action-button '+a+'" href="'+e.url_args+'" onclick="return false;">'+e.label+"</a></li>"}if(d){b+="</div>"}b+="</ul>"}if(c.insert){b+=c.insert}b+=this.grid_filters(c);b+="</div>";return b},header:function(b){var a="<tr>";if(b.show_item_checkboxes){a+="<th>";if(b.items.length>0){a+='<input type="checkbox" id="check_all" name=select_all_checkbox value="true"><input type="hidden" name=select_all_checkbox value="true">'}a+="</th>"}for(var c in b.columns){var d=b.columns[c];if(d.visible){a+='<th id="'+d.key+'-header">';if(d.href){a+='<a href="'+d.href+'" class="sort-link" sort_key="'+d.key+'">'+d.label+"</a>"}else{a+=d.label}a+='<span class="sort-arrow">'+d.extra+"</span></th>"}}a+="</tr>";return a},body:function(r){var k="";var s=0;var e=r.items.length;if(e==0){k+='<tr><td colspan="100"><em>No Items</em></td></tr>';s=1}for(var f in r.items){var p=r.items[f];var a=p.encode_id;var g="grid-"+f+"-popup";k+="<tr ";if(r.current_item_id==p.id){k+='class="current"'}k+=">";if(r.show_item_checkboxes){k+='<td style="width: 1.5em;"><input type="checkbox" name="id" value="'+a+'" id="'+a+'" class="grid-row-select-checkbox" /></td>'}for(j in r.columns){var d=r.columns[j];if(d.visible){var c="";if(d.nowrap){c='style="white-space:nowrap;"'}var q=p.column_config[d.label];var h=q.link;var l=q.value;var o=q.inbound;if(jQuery.type(l)==="string"){l=l.replace(/\/\//g,"/")}var b="";var n="";if(d.attach_popup){b="grid-"+f+"-popup";n="menubutton";if(h!=""){n+=" split"}n+=" popup"}k+="<td "+c+">";if(h){if(r.operations.length!=0){k+='<div id="'+b+'" class="'+n+'" style="float: left;">'}var m="";if(o){m="use-inbound"}else{m="use-outbound"}k+='<a class="label '+m+'" href="'+h+'" onclick="return false;">'+l+"</a>";if(r.operations.length!=0){k+="</div>"}}else{k+='<div id="'+b+'" class="'+n+'"><label id="'+d.label_id_prefix+a+'" for="'+a+'">'+l+"</label></div>"}k+="</td>"}}k+="</tr>";s++}return k},footer:function(o){var k="";if(o.use_paging&&o.num_pages>1){var m=o.num_page_links;var a=o.cur_page_num;var n=o.num_pages;var h=m/2;var g=a-h;var e=0;if(g==0){g=1;e=h-(a-g)}var d=h+e;var c=a+d;if(c<=n){max_offset=0}else{c=n;max_offset=d-(c+1-a)}if(max_offset!=0){g-=max_offset;if(g<1){g=1}}k+='<tr id="page-links-row">';if(o.show_item_checkboxes){k+="<td></td>"}k+='<td colspan="100"><span id="page-link-container">Page:';if(g>1){k+='<span class="page-link" id="page-link-1"><a href="javascript:void(0);" page_num="1" onclick="return false;">1</a></span> ...'}for(var l=g;l<c+1;l++){if(l==o.cur_page_num){k+='<span class="page-link inactive-link" id="page-link-'+l+'">'+l+"</span>"}else{k+='<span class="page-link" id="page-link-'+l+'"><a href="javascript:void(0);" onclick="return false;" page_num="'+l+'">'+l+"</a></span>"}}if(c<n){k+='...<span class="page-link" id="page-link-'+n+'"><a href="javascript:void(0);" onclick="return false;" page_num="'+n+'">'+n+"</a></span>"}k+="</span>";k+='<span class="page-link" id="show-all-link-span"> | <a href="javascript:void(0);" onclick="return false;" page_num="all">Show All</a></span></td></tr>'}if(o.show_item_checkboxes){k+='<tr><input type="hidden" id="operation" name="operation" value=""><td></td><td colspan="100">For <span class="grid-selected-count"></span> selected '+o.get_class_plural+": ";for(i in o.operations){var b=o.operations[i];if(b.allow_multiple){k+='<input type="button" value="'+b.label+'" class="operation-button action-button"> '}}k+="</td></tr>"}var f=false;for(i in o.operations){if(o.operations[i].global_operation){f=true;break}}if(f){k+='<tr><td colspan="100">';for(i in o.operations){var b=o.operations[i];if(b.global_operation){k+='<a class="action-button" href="'+b.global_operation+'">'+b.label+"</a>"}}k+="</td></tr>"}if(o.legend){k+='<tr><td colspan="100">'+o.legend+"</td></tr>"}return k},message:function(a){return'<p><div class="'+a.status+'message transient-message">'+a.message+'</div><div style="clear: both"></div></p>'},grid_filters:function(n){var a=n.default_filter_dict;var b=n.filters;var e="none";if(n.advanced_search){e="block"}var m=false;for(var g in n.columns){var d=n.columns[g];if(d.filterable=="advanced"){var l=d.key;var c=b[l];var f=a[l];if(c&&f&&c!=f){e="block"}m=true}}var k="block";if(e=="block"){k="none"}var h='<div id="standard-search" style="display: '+k+';"><table><tr><td style="padding: 0;"><table>';for(var g in n.columns){var d=n.columns[g];if(d.filterable=="standard"){h+=this.grid_column_filter(n,d)}}h+="</table></td></tr><tr><td>";if(m){h+='<a href="" class="advanced-search-toggle">Advanced Search</a>'}h+="</td></tr></table></div>";h+='<div id="advanced-search" style="display: '+e+'; margin-top: 5px; border: 1px solid #ccc;"><table><tr><td style="text-align: left" colspan="100"><a href="" class="advanced-search-toggle">Close Advanced Search</a></td></tr>';for(var g in n.columns){var d=n.columns[g];if(d.filterable=="advanced"){h+=this.grid_column_filter(n,d)}}h+="</table></div>";return h},grid_column_filter:function(e,c){var t=e.default_filter_dict;var l=e.filters;var a=c.label;var b=c.key;if(c.filterable=="advanced"){a=a.toLowerCase()}var k="<tr>";if(c.filterable=="advanced"){k+='<td align="left" style="padding-left: 10px">'+a+":</td>"}k+='<td style="padding-bottom: 1px;">';if(c.is_text){k+='<form class="text-filter-form" column_key="'+b+'" action="'+e.url+'" method="get" >';for(u in e.columns){var g=e.columns[u];var p=l[g.key];if(p){if(p!="All"){if(g.is_text){p=JSON.stringify(p)}k+='<input type="hidden" id="'+g.key+'" name="f-'+g.key+'" value="'+p+'"/>'}}}k+='<span id="'+b+'-filtering-criteria">';var h=l[b];if(h){var f=jQuery.type(h);if(f=="string"){if(h!="All"){k+=this.filter_element(b,h)}}if(f=="array"){for(var u in h){var n=h[u];var v=h;v=v.slice(u);k+=this.filter_element(b,n)}}}k+="</span>";var r="";if(c.filterable=="standard"){r=c.label.toLowerCase();var q=r.length;if(q<20){q=20}q=q+4}k+='<span class="search-box"><input class="search-box-input" id="input-'+b+'-filter" name="f-'+b+'" type="text" placeholder="'+r+'" size="'+q+'"/><button type="submit" style="background: transparent; border: none; padding: 4px; margin: 0px;"><i class="fa fa-search"></i></button></span></form>'}else{k+='<span id="'+b+'-filtering-criteria">';var s=false;for(cf_label in e.categorical_filters[b]){var o=e.categorical_filters[b][cf_label];var d="";var m="";for(key in o){d=key;m=o[key]}if(s){k+=" | "}s=true;var n=l[b];if(n&&o[b]&&n==m){k+='<span class="categorical-filter '+b+'-filter current-filter">'+cf_label+"</span>"}else{k+='<span class="categorical-filter '+b+'-filter"><a href="javascript:void(0);" filter_key="'+d+'" filter_val="'+m+'">'+cf_label+"</a></span>"}}k+="</span>"}k+="</td></tr>";return k},filter_element:function(b,a){return'<span class="text-filter-val">'+a+'<a href="javascript:void(0);" filter_key="'+b+'" filter_val="'+a+'"><i class="fa fa-times" style="padding-left: 5px; padding-bottom: 6px;"/></a></span>'}}});
\ No newline at end of file
+define([],function(){return{grid:function(b){var a="";if(b.embedded){a=this.grid_header(b)+this.grid_table(b)}else{a='<div class="loading-elt-overlay"></div><table><tr><td width="75%">'+this.grid_header(b)+'</td><td></td><td></td></tr><tr><td width="100%" id="grid-message" valign="top"></td><td></td><td></td></tr></table>'+this.grid_table(b)}if(b.info_text){a+='<br><div class="toolParamHelp" style="clear: both;">'+b.info_text+"</div>"}return a},grid_table:function(a){return'<form method="post" onsubmit="return false;"><table id="grid-table" class="grid"><thead id="grid-table-header"></thead><tbody id="grid-table-body"></tbody><tfoot id="grid-table-footer"></tfoot></table></form>'},grid_header:function(c){var b='<div class="grid-header">';if(!c.embedded){b+="<h2>"+c.title+"</h2>"}if(c.global_actions){b+='<ul class="manage-table-actions">';var d=(c.global_actions.length>=3);if(d){b+='<li><a class="action-button" id="popup-global-actions" class="menubutton">Actions</a></li><div popupmenu="popup-global-actions">'}for(i in c.global_actions){var e=c.global_actions[i];var a="";if(e.inbound){a="use-inbound"}else{a="use-outbound"}b+='<li><a class="action-button '+a+'" href="'+e.url_args+'" onclick="return false;">'+e.label+"</a></li>"}if(d){b+="</div>"}b+="</ul>"}if(c.insert){b+=c.insert}b+=this.grid_filters(c);b+="</div>";return b},header:function(b){var a="<tr>";if(b.show_item_checkboxes){a+="<th>";if(b.items.length>0){a+='<input type="checkbox" id="check_all" name=select_all_checkbox value="true"><input type="hidden" name=select_all_checkbox value="true">'}a+="</th>"}for(var c in b.columns){var d=b.columns[c];if(d.visible){a+='<th id="'+d.key+'-header">';if(d.href){a+='<a href="'+d.href+'" class="sort-link" sort_key="'+d.key+'">'+d.label+"</a>"}else{a+=d.label}a+='<span class="sort-arrow">'+d.extra+"</span></th>"}}a+="</tr>";return a},body:function(r){var k="";var s=0;var e=r.items.length;if(e==0){k+='<tr><td colspan="100"><em>No Items</em></td></tr>';s=1}for(var f in r.items){var p=r.items[f];var a=p.encode_id;var g="grid-"+f+"-popup";k+="<tr ";if(r.current_item_id==p.id){k+='class="current"'}k+=">";if(r.show_item_checkboxes){k+='<td style="width: 1.5em;"><input type="checkbox" name="id" value="'+a+'" id="'+a+'" class="grid-row-select-checkbox" /></td>'}for(j in r.columns){var d=r.columns[j];if(d.visible){var c="";if(d.nowrap){c='style="white-space:nowrap;"'}var q=p.column_config[d.label];var h=q.link;var l=q.value;var o=q.inbound;if(jQuery.type(l)==="string"){l=l.replace(/\/\//g,"/")}var b="";var n="";if(d.attach_popup){b="grid-"+f+"-popup";n="menubutton";if(h!=""){n+=" split"}n+=" popup"}k+="<td "+c+">";if(h){if(r.operations.length!=0){k+='<div id="'+b+'" class="'+n+'" style="float: left;">'}var m="";if(o){m="use-inbound"}else{m="use-outbound"}k+='<a class="label '+m+'" href="'+h+'" onclick="return false;">'+l+"</a>";if(r.operations.length!=0){k+="</div>"}}else{k+='<div id="'+b+'" class="'+n+'"><label id="'+d.label_id_prefix+a+'" for="'+a+'">'+l+"</label></div>"}k+="</td>"}}k+="</tr>";s++}return k},footer:function(o){var k="";if(o.use_paging&&o.num_pages>1){var m=o.num_page_links;var a=o.cur_page_num;var n=o.num_pages;var h=m/2;var g=a-h;var e=0;if(g<=0){g=1;e=h-(a-g)}var d=h+e;var c=a+d;if(c<=n){max_offset=0}else{c=n;max_offset=d-(c+1-a)}if(max_offset!=0){g-=max_offset;if(g<1){g=1}}k+='<tr id="page-links-row">';if(o.show_item_checkboxes){k+="<td></td>"}k+='<td colspan="100"><span id="page-link-container">Page:';if(g>1){k+='<span class="page-link" id="page-link-1"><a href="javascript:void(0);" page_num="1" onclick="return false;">1</a></span> ...'}for(var l=g;l<c+1;l++){if(l==o.cur_page_num){k+='<span class="page-link inactive-link" id="page-link-'+l+'">'+l+"</span>"}else{k+='<span class="page-link" id="page-link-'+l+'"><a href="javascript:void(0);" onclick="return false;" page_num="'+l+'">'+l+"</a></span>"}}if(c<n){k+='...<span class="page-link" id="page-link-'+n+'"><a href="javascript:void(0);" onclick="return false;" page_num="'+n+'">'+n+"</a></span>"}k+="</span>";k+='<span class="page-link" id="show-all-link-span"> | <a href="javascript:void(0);" onclick="return false;" page_num="all">Show All</a></span></td></tr>'}if(o.show_item_checkboxes){k+='<tr><input type="hidden" id="operation" name="operation" value=""><td></td><td colspan="100">For <span class="grid-selected-count"></span> selected '+o.get_class_plural+": ";for(i in o.operations){var b=o.operations[i];if(b.allow_multiple){k+='<input type="button" value="'+b.label+'" class="operation-button action-button"> '}}k+="</td></tr>"}var f=false;for(i in o.operations){if(o.operations[i].global_operation){f=true;break}}if(f){k+='<tr><td colspan="100">';for(i in o.operations){var b=o.operations[i];if(b.global_operation){k+='<a class="action-button" href="'+b.global_operation+'">'+b.label+"</a>"}}k+="</td></tr>"}if(o.legend){k+='<tr><td colspan="100">'+o.legend+"</td></tr>"}return k},message:function(a){return'<p><div class="'+a.status+'message transient-message">'+a.message+'</div><div style="clear: both"></div></p>'},grid_filters:function(n){var a=n.default_filter_dict;var b=n.filters;var e="none";if(n.advanced_search){e="block"}var m=false;for(var g in n.columns){var d=n.columns[g];if(d.filterable=="advanced"){var l=d.key;var c=b[l];var f=a[l];if(c&&f&&c!=f){e="block"}m=true}}var k="block";if(e=="block"){k="none"}var h='<div id="standard-search" style="display: '+k+';"><table><tr><td style="padding: 0;"><table>';for(var g in n.columns){var d=n.columns[g];if(d.filterable=="standard"){h+=this.grid_column_filter(n,d)}}h+="</table></td></tr><tr><td>";if(m){h+='<a href="" class="advanced-search-toggle">Advanced Search</a>'}h+="</td></tr></table></div>";h+='<div id="advanced-search" style="display: '+e+'; margin-top: 5px; border: 1px solid #ccc;"><table><tr><td style="text-align: left" colspan="100"><a href="" class="advanced-search-toggle">Close Advanced Search</a></td></tr>';for(var g in n.columns){var d=n.columns[g];if(d.filterable=="advanced"){h+=this.grid_column_filter(n,d)}}h+="</table></div>";return h},grid_column_filter:function(e,c){var t=e.default_filter_dict;var l=e.filters;var a=c.label;var b=c.key;if(c.filterable=="advanced"){a=a.toLowerCase()}var k="<tr>";if(c.filterable=="advanced"){k+='<td align="left" style="padding-left: 10px">'+a+":</td>"}k+='<td style="padding-bottom: 1px;">';if(c.is_text){k+='<form class="text-filter-form" column_key="'+b+'" action="'+e.url+'" method="get" >';for(u in e.columns){var g=e.columns[u];var p=l[g.key];if(p){if(p!="All"){if(g.is_text){p=JSON.stringify(p)}k+='<input type="hidden" id="'+g.key+'" name="f-'+g.key+'" value="'+p+'"/>'}}}k+='<span id="'+b+'-filtering-criteria">';var h=l[b];if(h){var f=jQuery.type(h);if(f=="string"){if(h!="All"){k+=this.filter_element(b,h)}}if(f=="array"){for(var u in h){var n=h[u];var v=h;v=v.slice(u);k+=this.filter_element(b,n)}}}k+="</span>";var r="";if(c.filterable=="standard"){r=c.label.toLowerCase();var q=r.length;if(q<20){q=20}q=q+4}k+='<span class="search-box"><input class="search-box-input" id="input-'+b+'-filter" name="f-'+b+'" type="text" placeholder="'+r+'" size="'+q+'"/><button type="submit" style="background: transparent; border: none; padding: 4px; margin: 0px;"><i class="fa fa-search"></i></button></span></form>'}else{k+='<span id="'+b+'-filtering-criteria">';var s=false;for(cf_label in e.categorical_filters[b]){var o=e.categorical_filters[b][cf_label];var d="";var m="";for(key in o){d=key;m=o[key]}if(s){k+=" | "}s=true;var n=l[b];if(n&&o[b]&&n==m){k+='<span class="categorical-filter '+b+'-filter current-filter">'+cf_label+"</span>"}else{k+='<span class="categorical-filter '+b+'-filter"><a href="javascript:void(0);" filter_key="'+d+'" filter_val="'+m+'">'+cf_label+"</a></span>"}}k+="</span>"}k+="</td></tr>";return k},filter_element:function(b,a){return'<span class="text-filter-val">'+a+'<a href="javascript:void(0);" filter_key="'+b+'" filter_val="'+a+'"><i class="fa fa-times" style="padding-left: 5px; padding-bottom: 6px;"/></a></span>'}}});
\ No newline at end of file
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.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/057069969de0/
Changeset: 057069969de0
User: guerler
Date: 2014-02-19 19:18:37
Summary: Merge
Affected #: 0 files
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.
1
0
commit/galaxy-central: guerler: Grids: Fix negative page numbers
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0770af01a257/
Changeset: 0770af01a257
Branch: stable
User: guerler
Date: 2014-02-19 19:16:36
Summary: Grids: Fix negative page numbers
Affected #: 2 files
diff -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc -r 0770af01a257818ee82f11a191d4305880ea0b91 static/scripts/galaxy.grids.js
--- a/static/scripts/galaxy.grids.js
+++ b/static/scripts/galaxy.grids.js
@@ -847,7 +847,7 @@
var page_link_range = num_page_links / 2;
var min_page = cur_page_num - page_link_range
var min_offset = 0;
- if (min_page == 0) {
+ if (min_page <= 0) {
// Min page is too low.
min_page = 1;
min_offset = page_link_range - ( cur_page_num - min_page );
diff -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc -r 0770af01a257818ee82f11a191d4305880ea0b91 static/scripts/packed/galaxy.grids.js
--- a/static/scripts/packed/galaxy.grids.js
+++ b/static/scripts/packed/galaxy.grids.js
@@ -1,1 +1,1 @@
-jQuery.ajaxSettings.traditional=true;define(["mvc/ui"],function(){var a=Backbone.Model.extend({defaults:{url_base:"",async:false,async_ops:[],categorical_filters:[],filters:{},sort_key:null,show_item_checkboxes:false,advanced_search:false,cur_page:1,num_pages:1,operation:undefined,item_ids:undefined},can_async_op:function(c){return _.indexOf(this.attributes.async_ops,c)!==-1},add_filter:function(g,h,d){if(d){var e=this.attributes.filters[g],c;if(e===null||e===undefined){c=h}else{if(typeof(e)=="string"){if(e=="All"){c=h}else{var f=[];f[0]=e;f[1]=h;c=f}}else{c=e;c.push(h)}}this.attributes.filters[g]=c}else{this.attributes.filters[g]=h}},remove_filter:function(d,g){var c=this.attributes.filters[d];if(c===null||c===undefined){return false}var f=true;if(typeof(c)==="string"){if(c=="All"){f=false}else{delete this.attributes.filters[d]}}else{var e=_.indexOf(c,g);if(e!==-1){c.splice(e,1)}else{f=false}}return f},get_url_data:function(){var c={async:this.attributes.async,sort:this.attributes.sort_key,page:this.attributes.cur_page,show_item_checkboxes:this.attributes.show_item_checkboxes,advanced_search:this.attributes.advanced_search};if(this.attributes.operation){c.operation=this.attributes.operation}if(this.attributes.item_ids){c.id=this.attributes.item_ids}var d=this;_.each(_.pairs(d.attributes.filters),function(e){c["f-"+e[0]]=e[1]});return c},get_url:function(c){return this.get("url_base")+"?"+$.param(this.get_url_data())+"&"+$.param(c)}});var b=Backbone.View.extend({grid:null,initialize:function(c){this.init_grid(c);this.init_grid_controls();$("input[type=text]").each(function(){$(this).click(function(){$(this).select()}).keyup(function(){$(this).css("font-style","normal")})})},handle_refresh:function(c){if(c){if($.inArray("history",c)>-1){if(top.Galaxy&&top.Galaxy.currHistoryPanel){top.Galaxy.currHistoryPanel.loadCurrentHistory()}}}},init_grid:function(e){this.grid=new a(e);var d=this.grid.attributes;this.handle_refresh(d.refresh_frames);var c=this.grid.get("url_base");c=c.replace(/^.*\/\/[^\/]+/,"");this.grid.set("url_base",c);$("#grid-table-body").html(this.template_body(d));$("#grid-table-footer").html(this.template_footer(d));if(d.message){$("#grid-message").html(this.template_message(d));if(d.use_hide_message){setTimeout(function(){$("#grid-message").html("")},5000)}}this.init_grid_elements();init_refresh_on_change()},init_grid_controls:function(){$(".submit-image").each(function(){$(this).mousedown(function(){$(this).addClass("gray-background")});$(this).mouseup(function(){$(this).removeClass("gray-background")})});var c=this;$(".sort-link").each(function(){$(this).click(function(){c.set_sort_condition($(this).attr("sort_key"));return false})});$(".categorical-filter > a").each(function(){$(this).click(function(){c.set_categorical_filter($(this).attr("filter_key"),$(this).attr("filter_val"));return false})});$(".text-filter-form").each(function(){$(this).submit(function(){var g=$(this).attr("column_key");var f=$("#input-"+g+"-filter");var h=f.val();f.val("");c.add_filter_condition(g,h);return false})});var d=$("#input-tags-filter");if(d.length){d.autocomplete(this.grid.history_tag_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}var e=$("#input-name-filter");if(e.length){e.autocomplete(this.grid.history_name_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}$(".advanced-search-toggle").each(function(){$(this).click(function(){$("#standard-search").slideToggle("fast");$("#advanced-search").slideToggle("fast");return false})})},init_grid_elements:function(){$(".grid").each(function(){var s=$(this).find("input.grid-row-select-checkbox");var r=$(this).find("span.grid-selected-count");var t=function(){r.text($(s).filter(":checked").length)};$(s).each(function(){$(this).change(t)});t()});if($(".community_rating_star").length!==0){$(".community_rating_star").rating({})}var q=this.grid.attributes;var p=this;$(".page-link > a").each(function(){$(this).click(function(){p.set_page($(this).attr("page_num"));return false})});$(".use-inbound").each(function(){$(this).click(function(r){p.execute({href:$(this).attr("href"),inbound:true});return false})});$(".use-outbound").each(function(){$(this).click(function(r){p.execute({href:$(this).attr("href")});return false})});var f=q.items.length;if(f==0){return}for(var k in q.items){var o=q.items[k];var l=$("#grid-"+k+"-popup");l.off();var d=new PopupMenu(l);for(var h in q.operations){var e=q.operations[h];var m=e.label;var c=o.operation_config[m];var g=o.encode_id;if(c.allowed&&e.allow_popup){var n={html:e.label,href:c.url_args,target:c.target,confirmation_text:e.confirm,inbound:e.inbound};n.func=function(t){t.preventDefault();var s=$(t.target).html();var r=this.findItemByHtml(s);p.execute(r)};d.addItem(n)}}}},add_filter_condition:function(e,g){if(g===""){return false}this.grid.add_filter(e,g,true);var f=$("<span>"+g+"<a href='javascript:void(0);'><span class='delete-search-icon' /></span></a>");f.addClass("text-filter-val");var d=this;f.click(function(){d.grid.remove_filter(e,g);$(this).remove();d.go_page_one();d.execute()});var c=$("#"+e+"-filtering-criteria");c.append(f);this.go_page_one();this.execute()},set_sort_condition:function(h){var g=this.grid.get("sort_key");var f=h;if(g.indexOf(h)!==-1){if(g.substring(0,1)!=="-"){f="-"+h}else{}}$(".sort-arrow").remove();var e=(f.substring(0,1)=="-")?"↑":"↓";var c=$("<span>"+e+"</span>").addClass("sort-arrow");var d=$("#"+h+"-header");d.append(c);this.grid.set("sort_key",f);this.go_page_one();this.execute()},set_categorical_filter:function(e,g){var d=this.grid.get("categorical_filters")[e],f=this.grid.get("filters")[e];var c=this;$("."+e+"-filter").each(function(){var m=$.trim($(this).text());var k=d[m];var l=k[e];if(l==g){$(this).empty();$(this).addClass("current-filter");$(this).append(m)}else{if(l==f){$(this).empty();var h=$("<a href='#'>"+m+"</a>");h.click(function(){c.set_categorical_filter(e,l)});$(this).removeClass("current-filter");$(this).append(h)}}});this.grid.add_filter(e,g);this.go_page_one();this.execute()},set_page:function(c){var d=this;$(".page-link").each(function(){var k=$(this).attr("id"),g=parseInt(k.split("-")[2],10),e=d.grid.get("cur_page"),h;if(g===c){h=$(this).children().text();$(this).empty();$(this).addClass("inactive-link");$(this).text(h)}else{if(g===e){h=$(this).text();$(this).empty();$(this).removeClass("inactive-link");var f=$("<a href='#'>"+h+"</a>");f.click(function(){d.set_page(g)});$(this).append(f)}}});if(c==="all"){this.grid.set("cur_page",c)}else{this.grid.set("cur_page",parseInt(c,10))}this.execute()},submit_operation:function(f,g){var e=$('input[name="id"]:checked').length;if(!e>0){return false}var d=$(f).val();var c=[];$("input[name=id]:checked").each(function(){c.push($(this).val())});this.execute({operation:d,id:c,confirmation_text:g});return true},execute:function(n){var f=null;var e=null;var g=null;var c=null;var m=null;if(n){e=n.href;g=n.operation;f=n.id;c=n.confirmation_text;m=n.inbound;if(e!==undefined&&e.indexOf("operation=")!=-1){var l=e.split("?");if(l.length>1){var k=l[1];var d=k.split("&");for(var h=0;h<d.length;h++){if(d[h].indexOf("operation")!=-1){g=d[h].split("=")[1];g=g.replace(/\+/g," ")}else{if(d[h].indexOf("id")!=-1){f=d[h].split("=")[1]}}}}}}if(g&&f){if(c&&c!=""&&c!="None"&&c!="null"){if(!confirm(c)){return false}}g=g.toLowerCase();this.grid.set({operation:g,item_ids:f});if(this.grid.can_async_op(g)){this.update_grid()}else{this.go_to(m,"")}return false}if(e){this.go_to(m,e);return false}if(this.grid.get("async")){this.update_grid()}else{this.go_to(m,"")}return false},go_to:function(f,d){var e=this.grid.get("async");this.grid.set("async",false);advanced_search=$("#advanced-search").is(":visible");this.grid.set("advanced_search",advanced_search);if(!d){d=this.grid.get("url_base")+"?"+$.param(this.grid.get_url_data())}this.grid.set({operation:undefined,item_ids:undefined,async:e});if(f){var c=$(".grid-header").closest(".inbound");if(c.length!==0){c.load(d);return}}window.location=d},update_grid:function(){var d=(this.grid.get("operation")?"POST":"GET");$(".loading-elt-overlay").show();var c=this;$.ajax({type:d,url:c.grid.get("url_base"),data:c.grid.get_url_data(),error:function(e){alert("Grid refresh failed")},success:function(e){c.init_grid($.parseJSON(e));$(".loading-elt-overlay").hide()},complete:function(){c.grid.set({operation:undefined,item_ids:undefined})}})},check_all_items:function(){var c=document.getElementById("check_all"),d=document.getElementsByTagName("input"),f=0,e;if(c.checked===true){for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=true;f++}}}else{for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=false}}}this.init_grid_elements()},go_page_one:function(){var c=this.grid.get("cur_page");if(c!==null&&c!==undefined&&c!=="all"){this.grid.set("cur_page",1)}},template_body:function(t){var m="";var u=0;var g=t.items.length;if(g==0){m+='<tr><td colspan="100"><em>No Items</em></td></tr>';u=1}for(var h in t.items){var r=t.items[h];var c=r.encode_id;var k="grid-"+h+"-popup";m+="<tr ";if(t.current_item_id==r.id){m+='class="current"'}m+=">";if(t.show_item_checkboxes){m+='<td style="width: 1.5em;"><input type="checkbox" name="id" value="'+c+'" id="'+c+'" class="grid-row-select-checkbox" /></td>'}for(j in t.columns){var f=t.columns[j];if(f.visible){var e="";if(f.nowrap){e='style="white-space:nowrap;"'}var s=r.column_config[f.label];var l=s.link;var n=s.value;var q=s.inbound;if(jQuery.type(n)==="string"){n=n.replace(/\/\//g,"/")}var d="";var p="";if(f.attach_popup){d="grid-"+h+"-popup";p="menubutton";if(l!=""){p+=" split"}p+=" popup"}m+="<td "+e+">";if(l){if(t.operations.length!=0){m+='<div id="'+d+'" class="'+p+'" style="float: left;">'}var o="";if(q){o="use-inbound"}else{o="use-outbound"}m+='<a class="label '+o+'" href="'+l+'" onclick="return false;">'+n+"</a>";if(t.operations.length!=0){m+="</div>"}}else{m+='<div id="'+d+'" class="'+p+'"><label id="'+f.label_id_prefix+c+'" for="'+c+'">'+n+"</label></div>"}m+="</td>"}}m+="</tr>";u++}return m},template_footer:function(q){var m="";if(q.use_paging&&q.num_pages>1){var o=q.num_page_links;var c=q.cur_page_num;var p=q.num_pages;var l=o/2;var k=c-l;var g=0;if(k==0){k=1;g=l-(c-k)}var f=l+g;var e=c+f;if(e<=p){max_offset=0}else{e=p;max_offset=f-(e+1-c)}if(max_offset!=0){k-=max_offset;if(k<1){k=1}}m+='<tr id="page-links-row">';if(q.show_item_checkboxes){m+="<td></td>"}m+='<td colspan="100"><span id="page-link-container">Page:';if(k>1){m+='<span class="page-link" id="page-link-1"><a href="'+this.grid.get_url({page:n})+'" page_num="1" onclick="return false;">1</a></span> ...'}for(var n=k;n<e+1;n++){if(n==q.cur_page_num){m+='<span class="page-link inactive-link" id="page-link-'+n+'">'+n+"</span>"}else{m+='<span class="page-link" id="page-link-'+n+'"><a href="'+this.grid.get_url({page:n})+'" onclick="return false;" page_num="'+n+'">'+n+"</a></span>"}}if(e<p){m+='...<span class="page-link" id="page-link-'+p+'"><a href="'+this.grid.get_url({page:p})+'" onclick="return false;" page_num="'+p+'">'+p+"</a></span>"}m+="</span>";m+='<span class="page-link" id="show-all-link-span"> | <a href="'+this.grid.get_url({page:"all"})+'" onclick="return false;" page_num="all">Show All</a></span></td></tr>'}if(q.show_item_checkboxes){m+='<tr><input type="hidden" id="operation" name="operation" value=""><td></td><td colspan="100">For <span class="grid-selected-count"></span> selected '+q.get_class_plural+": ";for(i in q.operations){var d=q.operations[i];if(d.allow_multiple){m+='<input type="button" value="'+d.label+'" class="action-button" onclick="gridView.submit_operation(this, \''+d.confirm+"')\"> "}}m+="</td></tr>"}var h=false;for(i in q.operations){if(q.operations[i].global_operation){h=true;break}}if(h){m+='<tr><td colspan="100">';for(i in q.operations){var d=q.operations[i];if(d.global_operation){m+='<a class="action-button" href="'+d.global_operation+'">'+d.label+"</a>"}}m+="</td></tr>"}if(q.legend){m+='<tr><td colspan="100">'+q.legend+"</td></tr>"}return m},template_message:function(c){return'<p><div class="'+c.status+'message transient-message">'+c.message+'</div><div style="clear: both"></div></p>'}});return{Grid:a,GridView:b}});
\ No newline at end of file
+jQuery.ajaxSettings.traditional=true;define(["mvc/ui"],function(){var a=Backbone.Model.extend({defaults:{url_base:"",async:false,async_ops:[],categorical_filters:[],filters:{},sort_key:null,show_item_checkboxes:false,advanced_search:false,cur_page:1,num_pages:1,operation:undefined,item_ids:undefined},can_async_op:function(c){return _.indexOf(this.attributes.async_ops,c)!==-1},add_filter:function(g,h,d){if(d){var e=this.attributes.filters[g],c;if(e===null||e===undefined){c=h}else{if(typeof(e)=="string"){if(e=="All"){c=h}else{var f=[];f[0]=e;f[1]=h;c=f}}else{c=e;c.push(h)}}this.attributes.filters[g]=c}else{this.attributes.filters[g]=h}},remove_filter:function(d,g){var c=this.attributes.filters[d];if(c===null||c===undefined){return false}var f=true;if(typeof(c)==="string"){if(c=="All"){f=false}else{delete this.attributes.filters[d]}}else{var e=_.indexOf(c,g);if(e!==-1){c.splice(e,1)}else{f=false}}return f},get_url_data:function(){var c={async:this.attributes.async,sort:this.attributes.sort_key,page:this.attributes.cur_page,show_item_checkboxes:this.attributes.show_item_checkboxes,advanced_search:this.attributes.advanced_search};if(this.attributes.operation){c.operation=this.attributes.operation}if(this.attributes.item_ids){c.id=this.attributes.item_ids}var d=this;_.each(_.pairs(d.attributes.filters),function(e){c["f-"+e[0]]=e[1]});return c},get_url:function(c){return this.get("url_base")+"?"+$.param(this.get_url_data())+"&"+$.param(c)}});var b=Backbone.View.extend({grid:null,initialize:function(c){this.init_grid(c);this.init_grid_controls();$("input[type=text]").each(function(){$(this).click(function(){$(this).select()}).keyup(function(){$(this).css("font-style","normal")})})},handle_refresh:function(c){if(c){if($.inArray("history",c)>-1){if(top.Galaxy&&top.Galaxy.currHistoryPanel){top.Galaxy.currHistoryPanel.loadCurrentHistory()}}}},init_grid:function(e){this.grid=new a(e);var d=this.grid.attributes;this.handle_refresh(d.refresh_frames);var c=this.grid.get("url_base");c=c.replace(/^.*\/\/[^\/]+/,"");this.grid.set("url_base",c);$("#grid-table-body").html(this.template_body(d));$("#grid-table-footer").html(this.template_footer(d));if(d.message){$("#grid-message").html(this.template_message(d));if(d.use_hide_message){setTimeout(function(){$("#grid-message").html("")},5000)}}this.init_grid_elements();init_refresh_on_change()},init_grid_controls:function(){$(".submit-image").each(function(){$(this).mousedown(function(){$(this).addClass("gray-background")});$(this).mouseup(function(){$(this).removeClass("gray-background")})});var c=this;$(".sort-link").each(function(){$(this).click(function(){c.set_sort_condition($(this).attr("sort_key"));return false})});$(".categorical-filter > a").each(function(){$(this).click(function(){c.set_categorical_filter($(this).attr("filter_key"),$(this).attr("filter_val"));return false})});$(".text-filter-form").each(function(){$(this).submit(function(){var g=$(this).attr("column_key");var f=$("#input-"+g+"-filter");var h=f.val();f.val("");c.add_filter_condition(g,h);return false})});var d=$("#input-tags-filter");if(d.length){d.autocomplete(this.grid.history_tag_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}var e=$("#input-name-filter");if(e.length){e.autocomplete(this.grid.history_name_autocomplete_url,{selectFirst:false,autoFill:false,highlight:false,mustMatch:false})}$(".advanced-search-toggle").each(function(){$(this).click(function(){$("#standard-search").slideToggle("fast");$("#advanced-search").slideToggle("fast");return false})})},init_grid_elements:function(){$(".grid").each(function(){var s=$(this).find("input.grid-row-select-checkbox");var r=$(this).find("span.grid-selected-count");var t=function(){r.text($(s).filter(":checked").length)};$(s).each(function(){$(this).change(t)});t()});if($(".community_rating_star").length!==0){$(".community_rating_star").rating({})}var q=this.grid.attributes;var p=this;$(".page-link > a").each(function(){$(this).click(function(){p.set_page($(this).attr("page_num"));return false})});$(".use-inbound").each(function(){$(this).click(function(r){p.execute({href:$(this).attr("href"),inbound:true});return false})});$(".use-outbound").each(function(){$(this).click(function(r){p.execute({href:$(this).attr("href")});return false})});var f=q.items.length;if(f==0){return}for(var k in q.items){var o=q.items[k];var l=$("#grid-"+k+"-popup");l.off();var d=new PopupMenu(l);for(var h in q.operations){var e=q.operations[h];var m=e.label;var c=o.operation_config[m];var g=o.encode_id;if(c.allowed&&e.allow_popup){var n={html:e.label,href:c.url_args,target:c.target,confirmation_text:e.confirm,inbound:e.inbound};n.func=function(t){t.preventDefault();var s=$(t.target).html();var r=this.findItemByHtml(s);p.execute(r)};d.addItem(n)}}}},add_filter_condition:function(e,g){if(g===""){return false}this.grid.add_filter(e,g,true);var f=$("<span>"+g+"<a href='javascript:void(0);'><span class='delete-search-icon' /></span></a>");f.addClass("text-filter-val");var d=this;f.click(function(){d.grid.remove_filter(e,g);$(this).remove();d.go_page_one();d.execute()});var c=$("#"+e+"-filtering-criteria");c.append(f);this.go_page_one();this.execute()},set_sort_condition:function(h){var g=this.grid.get("sort_key");var f=h;if(g.indexOf(h)!==-1){if(g.substring(0,1)!=="-"){f="-"+h}else{}}$(".sort-arrow").remove();var e=(f.substring(0,1)=="-")?"↑":"↓";var c=$("<span>"+e+"</span>").addClass("sort-arrow");var d=$("#"+h+"-header");d.append(c);this.grid.set("sort_key",f);this.go_page_one();this.execute()},set_categorical_filter:function(e,g){var d=this.grid.get("categorical_filters")[e],f=this.grid.get("filters")[e];var c=this;$("."+e+"-filter").each(function(){var m=$.trim($(this).text());var k=d[m];var l=k[e];if(l==g){$(this).empty();$(this).addClass("current-filter");$(this).append(m)}else{if(l==f){$(this).empty();var h=$("<a href='#'>"+m+"</a>");h.click(function(){c.set_categorical_filter(e,l)});$(this).removeClass("current-filter");$(this).append(h)}}});this.grid.add_filter(e,g);this.go_page_one();this.execute()},set_page:function(c){var d=this;$(".page-link").each(function(){var k=$(this).attr("id"),g=parseInt(k.split("-")[2],10),e=d.grid.get("cur_page"),h;if(g===c){h=$(this).children().text();$(this).empty();$(this).addClass("inactive-link");$(this).text(h)}else{if(g===e){h=$(this).text();$(this).empty();$(this).removeClass("inactive-link");var f=$("<a href='#'>"+h+"</a>");f.click(function(){d.set_page(g)});$(this).append(f)}}});if(c==="all"){this.grid.set("cur_page",c)}else{this.grid.set("cur_page",parseInt(c,10))}this.execute()},submit_operation:function(f,g){var e=$('input[name="id"]:checked').length;if(!e>0){return false}var d=$(f).val();var c=[];$("input[name=id]:checked").each(function(){c.push($(this).val())});this.execute({operation:d,id:c,confirmation_text:g});return true},execute:function(n){var f=null;var e=null;var g=null;var c=null;var m=null;if(n){e=n.href;g=n.operation;f=n.id;c=n.confirmation_text;m=n.inbound;if(e!==undefined&&e.indexOf("operation=")!=-1){var l=e.split("?");if(l.length>1){var k=l[1];var d=k.split("&");for(var h=0;h<d.length;h++){if(d[h].indexOf("operation")!=-1){g=d[h].split("=")[1];g=g.replace(/\+/g," ")}else{if(d[h].indexOf("id")!=-1){f=d[h].split("=")[1]}}}}}}if(g&&f){if(c&&c!=""&&c!="None"&&c!="null"){if(!confirm(c)){return false}}g=g.toLowerCase();this.grid.set({operation:g,item_ids:f});if(this.grid.can_async_op(g)){this.update_grid()}else{this.go_to(m,"")}return false}if(e){this.go_to(m,e);return false}if(this.grid.get("async")){this.update_grid()}else{this.go_to(m,"")}return false},go_to:function(f,d){var e=this.grid.get("async");this.grid.set("async",false);advanced_search=$("#advanced-search").is(":visible");this.grid.set("advanced_search",advanced_search);if(!d){d=this.grid.get("url_base")+"?"+$.param(this.grid.get_url_data())}this.grid.set({operation:undefined,item_ids:undefined,async:e});if(f){var c=$(".grid-header").closest(".inbound");if(c.length!==0){c.load(d);return}}window.location=d},update_grid:function(){var d=(this.grid.get("operation")?"POST":"GET");$(".loading-elt-overlay").show();var c=this;$.ajax({type:d,url:c.grid.get("url_base"),data:c.grid.get_url_data(),error:function(e){alert("Grid refresh failed")},success:function(e){c.init_grid($.parseJSON(e));$(".loading-elt-overlay").hide()},complete:function(){c.grid.set({operation:undefined,item_ids:undefined})}})},check_all_items:function(){var c=document.getElementById("check_all"),d=document.getElementsByTagName("input"),f=0,e;if(c.checked===true){for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=true;f++}}}else{for(e=0;e<d.length;e++){if(d[e].name.indexOf("id")!==-1){d[e].checked=false}}}this.init_grid_elements()},go_page_one:function(){var c=this.grid.get("cur_page");if(c!==null&&c!==undefined&&c!=="all"){this.grid.set("cur_page",1)}},template_body:function(t){var m="";var u=0;var g=t.items.length;if(g==0){m+='<tr><td colspan="100"><em>No Items</em></td></tr>';u=1}for(var h in t.items){var r=t.items[h];var c=r.encode_id;var k="grid-"+h+"-popup";m+="<tr ";if(t.current_item_id==r.id){m+='class="current"'}m+=">";if(t.show_item_checkboxes){m+='<td style="width: 1.5em;"><input type="checkbox" name="id" value="'+c+'" id="'+c+'" class="grid-row-select-checkbox" /></td>'}for(j in t.columns){var f=t.columns[j];if(f.visible){var e="";if(f.nowrap){e='style="white-space:nowrap;"'}var s=r.column_config[f.label];var l=s.link;var n=s.value;var q=s.inbound;if(jQuery.type(n)==="string"){n=n.replace(/\/\//g,"/")}var d="";var p="";if(f.attach_popup){d="grid-"+h+"-popup";p="menubutton";if(l!=""){p+=" split"}p+=" popup"}m+="<td "+e+">";if(l){if(t.operations.length!=0){m+='<div id="'+d+'" class="'+p+'" style="float: left;">'}var o="";if(q){o="use-inbound"}else{o="use-outbound"}m+='<a class="label '+o+'" href="'+l+'" onclick="return false;">'+n+"</a>";if(t.operations.length!=0){m+="</div>"}}else{m+='<div id="'+d+'" class="'+p+'"><label id="'+f.label_id_prefix+c+'" for="'+c+'">'+n+"</label></div>"}m+="</td>"}}m+="</tr>";u++}return m},template_footer:function(q){var m="";if(q.use_paging&&q.num_pages>1){var o=q.num_page_links;var c=q.cur_page_num;var p=q.num_pages;var l=o/2;var k=c-l;var g=0;if(k<=0){k=1;g=l-(c-k)}var f=l+g;var e=c+f;if(e<=p){max_offset=0}else{e=p;max_offset=f-(e+1-c)}if(max_offset!=0){k-=max_offset;if(k<1){k=1}}m+='<tr id="page-links-row">';if(q.show_item_checkboxes){m+="<td></td>"}m+='<td colspan="100"><span id="page-link-container">Page:';if(k>1){m+='<span class="page-link" id="page-link-1"><a href="'+this.grid.get_url({page:n})+'" page_num="1" onclick="return false;">1</a></span> ...'}for(var n=k;n<e+1;n++){if(n==q.cur_page_num){m+='<span class="page-link inactive-link" id="page-link-'+n+'">'+n+"</span>"}else{m+='<span class="page-link" id="page-link-'+n+'"><a href="'+this.grid.get_url({page:n})+'" onclick="return false;" page_num="'+n+'">'+n+"</a></span>"}}if(e<p){m+='...<span class="page-link" id="page-link-'+p+'"><a href="'+this.grid.get_url({page:p})+'" onclick="return false;" page_num="'+p+'">'+p+"</a></span>"}m+="</span>";m+='<span class="page-link" id="show-all-link-span"> | <a href="'+this.grid.get_url({page:"all"})+'" onclick="return false;" page_num="all">Show All</a></span></td></tr>'}if(q.show_item_checkboxes){m+='<tr><input type="hidden" id="operation" name="operation" value=""><td></td><td colspan="100">For <span class="grid-selected-count"></span> selected '+q.get_class_plural+": ";for(i in q.operations){var d=q.operations[i];if(d.allow_multiple){m+='<input type="button" value="'+d.label+'" class="action-button" onclick="gridView.submit_operation(this, \''+d.confirm+"')\"> "}}m+="</td></tr>"}var h=false;for(i in q.operations){if(q.operations[i].global_operation){h=true;break}}if(h){m+='<tr><td colspan="100">';for(i in q.operations){var d=q.operations[i];if(d.global_operation){m+='<a class="action-button" href="'+d.global_operation+'">'+d.label+"</a>"}}m+="</td></tr>"}if(q.legend){m+='<tr><td colspan="100">'+q.legend+"</td></tr>"}return m},template_message:function(c){return'<p><div class="'+c.status+'message transient-message">'+c.message+'</div><div style="clear: both"></div></p>'}});return{Grid:a,GridView:b}});
\ No newline at end of file
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d270d3cf7627/
Changeset: d270d3cf7627
Branch: stable
User: greg
Date: 2014-02-19 19:05:25
Summary: Make managing an in-memory registry of bi-directional installed repository dependency relationships a configurable option for Galaxy instances.
Affected #: 6 files
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -95,6 +95,7 @@
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) )
+ self.manage_dependency_relationships = string_as_bool( kwargs.get( 'manage_dependency_relationships', True ) )
self.running_functional_tests = string_as_bool( kwargs.get( 'running_functional_tests', False ) )
self.hours_between_check = kwargs.get( 'hours_between_check', 12 )
try:
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -271,9 +271,10 @@
if remove_from_disk_checked:
tool_shed_repository.status = trans.install_model.ToolShedRepository.installation_status.UNINSTALLED
tool_shed_repository.error_message = None
- # Remove the uninstalled repository and any tool dependencies from the in-memory dictionaries in the
- # installed_repository_manager.
- trans.app.installed_repository_manager.handle_repository_uninstall( tool_shed_repository )
+ if trans.app.config.manage_dependency_relationships:
+ # Remove the uninstalled repository and any tool dependencies from the in-memory dictionaries in the
+ # installed_repository_manager.
+ trans.app.installed_repository_manager.handle_repository_uninstall( tool_shed_repository )
else:
tool_shed_repository.status = trans.install_model.ToolShedRepository.installation_status.DEACTIVATED
trans.install_model.context.add( tool_shed_repository )
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc lib/tool_shed/galaxy_install/installed_repository_manager.py
--- a/lib/tool_shed/galaxy_install/installed_repository_manager.py
+++ b/lib/tool_shed/galaxy_install/installed_repository_manager.py
@@ -62,8 +62,9 @@
# whose values are a list of tuples defining tool_dependency objects (whose status is 'Installed') that require the key
# at runtime. The value defines the entire tool dependency tree.
self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies = {}
- # Load defined dependency relationships for installed tool shed repositories and their contents.
- self.load_dependency_relationships()
+ if app.config.manage_dependency_relationships:
+ # Load defined dependency relationships for installed tool shed repositories and their contents.
+ self.load_dependency_relationships()
def add_entry_to_installed_repository_dependencies_of_installed_repositories( self, repository ):
"""
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc lib/tool_shed/galaxy_install/repository_util.py
--- a/lib/tool_shed/galaxy_install/repository_util.py
+++ b/lib/tool_shed/galaxy_install/repository_util.py
@@ -602,8 +602,9 @@
suc.update_tool_shed_repository_status( trans.app,
tool_shed_repository,
trans.install_model.ToolShedRepository.installation_status.INSTALLED )
- # Add the installed repository and any tool dependencies to the in-memory dictionaries in the installed_repository_manager.
- trans.app.installed_repository_manager.handle_repository_install( tool_shed_repository )
+ if trans.app.config.manage_dependency_relationships:
+ # Add the installed repository and any tool dependencies to the in-memory dictionaries in the installed_repository_manager.
+ trans.app.installed_repository_manager.handle_repository_install( tool_shed_repository )
else:
# An error occurred while cloning the repository, so reset everything necessary to enable another attempt.
set_repository_attributes( trans,
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc lib/tool_shed/util/common_install_util.py
--- a/lib/tool_shed/util/common_install_util.py
+++ b/lib/tool_shed/util/common_install_util.py
@@ -507,8 +507,9 @@
if tool_dependency and tool_dependency.status in [ app.install_model.ToolDependency.installation_status.INSTALLED,
app.install_model.ToolDependency.installation_status.ERROR ]:
installed_tool_dependencies.append( tool_dependency )
- # Add the tool_dependency to the in-memory dictionaries in the installed_repository_manager.
- app.installed_repository_manager.handle_tool_dependency_install( tool_shed_repository, tool_dependency )
+ if app.config.manage_dependency_relationships:
+ # Add the tool_dependency to the in-memory dictionaries in the installed_repository_manager.
+ app.installed_repository_manager.handle_tool_dependency_install( tool_shed_repository, tool_dependency )
elif elem.tag == 'set_environment':
# <set_environment version="1.0">
# <environment_variable name="R_SCRIPT_PATH"action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
diff -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 -r d270d3cf7627a42b6fac2aa69701deadb89c8ffc universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -152,6 +152,11 @@
#enable_tool_shed_check = False
#hours_between_check = 12
+# Enable use of an in-memory registry with bi-directional relationships
+# between repositories (i.e., in addition to lists of dependencies for a
+# repository, keep an in-memory registry of dependent items for each repository.
+#manage_dependency_relationships = True
+
# XML config file that contains data table entries for the ToolDataTableManager. This file is manually
# maintained by the Galaxy administrator.
#tool_data_table_config_path = tool_data_table_conf.xml
https://bitbucket.org/galaxy/galaxy-central/commits/ef0654f99261/
Changeset: ef0654f99261
User: inithello
Date: 2014-02-19 19:09:03
Summary: Merge bugfix from stable.
Affected #: 1 file
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.
1
0
commit/galaxy-central: greg: Make managing an in-memory registry of bi-directional installed repository dependency relationships a configurable option for Galaxy instances.
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/4df1be355e4f/
Changeset: 4df1be355e4f
User: greg
Date: 2014-02-19 19:05:25
Summary: Make managing an in-memory registry of bi-directional installed repository dependency relationships a configurable option for Galaxy instances.
Affected #: 6 files
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -95,6 +95,7 @@
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root )
self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) )
+ self.manage_dependency_relationships = string_as_bool( kwargs.get( 'manage_dependency_relationships', True ) )
self.running_functional_tests = string_as_bool( kwargs.get( 'running_functional_tests', False ) )
self.hours_between_check = kwargs.get( 'hours_between_check', 12 )
try:
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -271,9 +271,10 @@
if remove_from_disk_checked:
tool_shed_repository.status = trans.install_model.ToolShedRepository.installation_status.UNINSTALLED
tool_shed_repository.error_message = None
- # Remove the uninstalled repository and any tool dependencies from the in-memory dictionaries in the
- # installed_repository_manager.
- trans.app.installed_repository_manager.handle_repository_uninstall( tool_shed_repository )
+ if trans.app.config.manage_dependency_relationships:
+ # Remove the uninstalled repository and any tool dependencies from the in-memory dictionaries in the
+ # installed_repository_manager.
+ trans.app.installed_repository_manager.handle_repository_uninstall( tool_shed_repository )
else:
tool_shed_repository.status = trans.install_model.ToolShedRepository.installation_status.DEACTIVATED
trans.install_model.context.add( tool_shed_repository )
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f lib/tool_shed/galaxy_install/installed_repository_manager.py
--- a/lib/tool_shed/galaxy_install/installed_repository_manager.py
+++ b/lib/tool_shed/galaxy_install/installed_repository_manager.py
@@ -62,8 +62,9 @@
# whose values are a list of tuples defining tool_dependency objects (whose status is 'Installed') that require the key
# at runtime. The value defines the entire tool dependency tree.
self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies = {}
- # Load defined dependency relationships for installed tool shed repositories and their contents.
- self.load_dependency_relationships()
+ if app.config.manage_dependency_relationships:
+ # Load defined dependency relationships for installed tool shed repositories and their contents.
+ self.load_dependency_relationships()
def add_entry_to_installed_repository_dependencies_of_installed_repositories( self, repository ):
"""
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f lib/tool_shed/galaxy_install/repository_util.py
--- a/lib/tool_shed/galaxy_install/repository_util.py
+++ b/lib/tool_shed/galaxy_install/repository_util.py
@@ -602,8 +602,9 @@
suc.update_tool_shed_repository_status( trans.app,
tool_shed_repository,
trans.install_model.ToolShedRepository.installation_status.INSTALLED )
- # Add the installed repository and any tool dependencies to the in-memory dictionaries in the installed_repository_manager.
- trans.app.installed_repository_manager.handle_repository_install( tool_shed_repository )
+ if trans.app.config.manage_dependency_relationships:
+ # Add the installed repository and any tool dependencies to the in-memory dictionaries in the installed_repository_manager.
+ trans.app.installed_repository_manager.handle_repository_install( tool_shed_repository )
else:
# An error occurred while cloning the repository, so reset everything necessary to enable another attempt.
set_repository_attributes( trans,
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f lib/tool_shed/util/common_install_util.py
--- a/lib/tool_shed/util/common_install_util.py
+++ b/lib/tool_shed/util/common_install_util.py
@@ -507,8 +507,9 @@
if tool_dependency and tool_dependency.status in [ app.install_model.ToolDependency.installation_status.INSTALLED,
app.install_model.ToolDependency.installation_status.ERROR ]:
installed_tool_dependencies.append( tool_dependency )
- # Add the tool_dependency to the in-memory dictionaries in the installed_repository_manager.
- app.installed_repository_manager.handle_tool_dependency_install( tool_shed_repository, tool_dependency )
+ if app.config.manage_dependency_relationships:
+ # Add the tool_dependency to the in-memory dictionaries in the installed_repository_manager.
+ app.installed_repository_manager.handle_tool_dependency_install( tool_shed_repository, tool_dependency )
elif elem.tag == 'set_environment':
# <set_environment version="1.0">
# <environment_variable name="R_SCRIPT_PATH"action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
diff -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 -r 4df1be355e4f7cdbbc927027ce60b81cf222956f universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -152,6 +152,11 @@
#enable_tool_shed_check = False
#hours_between_check = 12
+# Enable use of an in-memory registry with bi-directional relationships
+# between repositories (i.e., in addition to lists of dependencies for a
+# repository, keep an in-memory registry of dependent items for each repository.
+#manage_dependency_relationships = True
+
# XML config file that contains data table entries for the ToolDataTableManager. This file is manually
# maintained by the Galaxy administrator.
#tool_data_table_config_path = tool_data_table_conf.xml
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.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1298d3f6aca5/
Changeset: 1298d3f6aca5
Branch: stable
User: natefoo
Date: 2014-02-19 19:00:33
Summary: Stop jobs when all output datasets are deleted via the API.
Affected #: 3 files
diff -r 44968207ddd283d0023c72e3d25fd39b1c71eb99 -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -849,6 +849,18 @@
break
return job
+ def stop_hda_creating_job( self, hda ):
+ """
+ Stops an HDA's creating job if all the job's other outputs are deleted.
+ """
+ if hda.parent_id is None and len( hda.creating_job_associations ) > 0:
+ # Mark associated job for deletion
+ job = hda.creating_job_associations[0].job
+ if job.state in [ self.app.model.Job.states.QUEUED, self.app.model.Job.states.RUNNING, self.app.model.Job.states.NEW ]:
+ # Are *all* of the job's other output datasets deleted?
+ if job.check_if_output_datasets_deleted():
+ job.mark_deleted( self.app.config.track_jobs_in_database )
+ self.app.job_manager.job_stop_queue.put( job.id )
class UsesLibraryMixin:
diff -r 44968207ddd283d0023c72e3d25fd39b1c71eb99 -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -278,6 +278,8 @@
# get_dataset can return a string during an error
if hda and isinstance( hda, trans.model.HistoryDatasetAssociation ):
changed = self.set_hda_from_dict( trans, hda, payload )
+ if payload.get( 'deleted', False ):
+ self.stop_hda_creating_job( hda )
except Exception, exception:
log.error( 'Update of history (%s), HDA (%s) failed: %s',
history_id, id, str( exception ), exc_info=True )
@@ -347,6 +349,8 @@
trans.sa_session.flush()
rval[ 'purged' ] = True
+ self.stop_hda_creating_job( hda )
+
trans.sa_session.flush()
rval[ 'deleted' ] = True
diff -r 44968207ddd283d0023c72e3d25fd39b1c71eb99 -r 1298d3f6aca59825d0eb3d32afd5686c4b1b9294 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -839,14 +839,7 @@
hda.mark_deleted()
hda.clear_associated_files()
trans.log_event( "Dataset id %s marked as deleted" % str(id) )
- if hda.parent_id is None and len( hda.creating_job_associations ) > 0:
- # Mark associated job for deletion
- job = hda.creating_job_associations[0].job
- if job.state in [ self.app.model.Job.states.QUEUED, self.app.model.Job.states.RUNNING, self.app.model.Job.states.NEW ]:
- # Are *all* of the job's other output datasets deleted?
- if job.check_if_output_datasets_deleted():
- job.mark_deleted( self.app.config.track_jobs_in_database )
- self.app.job_manager.job_stop_queue.put( job.id )
+ self.stop_hda_creating_job( hda )
trans.sa_session.flush()
except Exception, e:
msg = 'HDA deletion failed (encoded: %s, decoded: %s)' % ( dataset_id, id )
https://bitbucket.org/galaxy/galaxy-central/commits/0db8172d6d36/
Changeset: 0db8172d6d36
User: natefoo
Date: 2014-02-19 19:01:03
Summary: merge.
Affected #: 3 files
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -892,6 +892,18 @@
break
return job
+ def stop_hda_creating_job( self, hda ):
+ """
+ Stops an HDA's creating job if all the job's other outputs are deleted.
+ """
+ if hda.parent_id is None and len( hda.creating_job_associations ) > 0:
+ # Mark associated job for deletion
+ job = hda.creating_job_associations[0].job
+ if job.state in [ self.app.model.Job.states.QUEUED, self.app.model.Job.states.RUNNING, self.app.model.Job.states.NEW ]:
+ # Are *all* of the job's other output datasets deleted?
+ if job.check_if_output_datasets_deleted():
+ job.mark_deleted( self.app.config.track_jobs_in_database )
+ self.app.job_manager.job_stop_queue.put( job.id )
class UsesLibraryMixin:
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -280,6 +280,8 @@
# get_dataset can return a string during an error
if hda and isinstance( hda, trans.model.HistoryDatasetAssociation ):
changed = self.set_hda_from_dict( trans, hda, payload )
+ if payload.get( 'deleted', False ):
+ self.stop_hda_creating_job( hda )
except Exception, exception:
log.error( 'Update of history (%s), HDA (%s) failed: %s',
history_id, id, str( exception ), exc_info=True )
@@ -349,6 +351,8 @@
trans.sa_session.flush()
rval[ 'purged' ] = True
+ self.stop_hda_creating_job( hda )
+
trans.sa_session.flush()
rval[ 'deleted' ] = True
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -839,14 +839,7 @@
hda.mark_deleted()
hda.clear_associated_files()
trans.log_event( "Dataset id %s marked as deleted" % str(id) )
- if hda.parent_id is None and len( hda.creating_job_associations ) > 0:
- # Mark associated job for deletion
- job = hda.creating_job_associations[0].job
- if job.state in [ self.app.model.Job.states.QUEUED, self.app.model.Job.states.RUNNING, self.app.model.Job.states.NEW ]:
- # Are *all* of the job's other output datasets deleted?
- if job.check_if_output_datasets_deleted():
- job.mark_deleted( self.app.config.track_jobs_in_database )
- self.app.job_manager.job_stop_queue.put( job.id )
+ self.stop_hda_creating_job( hda )
trans.sa_session.flush()
except Exception, e:
msg = 'HDA deletion failed (encoded: %s, decoded: %s)' % ( dataset_id, id )
https://bitbucket.org/galaxy/galaxy-central/commits/e51429649b44/
Changeset: e51429649b44
User: natefoo
Date: 2014-02-19 19:02:12
Summary: merge.
Affected #: 6 files
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -843,35 +843,6 @@
history. <br>You can <a href="%s">continue and import this history</a> or %s.
""" % ( web.url_for(controller='history', action='imp', id=id, confirm=True, referer=trans.request.referer ), referer_message ), use_panels=True )
- # Replaced with view (below) but kept (available via manual URL editing) for now
- @web.expose
- def original_view( self, trans, id=None, show_deleted=False, use_panels=True ):
- """View a history. If a history is importable, then it is viewable by any user."""
- # Get history to view.
- if not id:
- return trans.show_error_message( "You must specify a history you want to view." )
- history_to_view = self.get_history( trans, id, False)
- # Integrity checks.
- if not history_to_view:
- return trans.show_error_message( "The specified history does not exist." )
- # Admin users can view any history
- if( ( history_to_view.user != trans.user )
- and ( not trans.user_is_admin() )
- and ( not history_to_view.importable ) ):
- error( "Either you are not allowed to view this history or the owner of this history has not made it accessible." )
- # View history.
- show_deleted = galaxy.util.string_as_bool( show_deleted )
- datasets = self.get_history_datasets( trans, history_to_view, show_deleted=show_deleted )
- try:
- use_panels = galaxy.util.string_as_bool( use_panels )
- except:
- pass # already a bool
- return trans.stream_template_mako( "history/original_view.mako",
- history = history_to_view,
- datasets = datasets,
- show_deleted = show_deleted,
- use_panels = use_panels )
-
@web.expose
def view( self, trans, id=None, show_deleted=False, show_hidden=False, use_panels=True ):
"""
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 static/scripts/mvc/ui.js
--- a/static/scripts/mvc/ui.js
+++ b/static/scripts/mvc/ui.js
@@ -783,77 +783,110 @@
* });
* $( '.myElement' ).modeButton( 'callModeFn', 'bler' );
*/
+ /** constructor */
function ModeButton( element, options ){
this.currModeIndex = 0;
- return this.init( element, options );
+ return this._init( element, options );
}
+ /** html5 data key to store this object inside an element */
ModeButton.prototype.DATA_KEY = 'mode-button';
+ /** default options */
ModeButton.prototype.defaults = {
- modes : [
- { mode: 'default' }
- ]
+ switchModesOnClick : true
};
- ModeButton.prototype.init = function _init( element, options ){
+ // ---- private interface
+ /** set up options, intial mode, and the click handler */
+ ModeButton.prototype._init = function _init( element, options ){
+ //console.debug( 'ModeButton._init:', element, options );
options = options || {};
this.$element = $( element );
this.options = jQuery.extend( true, {}, this.defaults, options );
+ if( !options.modes ){
+ throw new Error( 'ModeButton requires a "modes" array' );
+ }
var modeButton = this;
this.$element.click( function _ModeButtonClick( event ){
-
// call the curr mode fn
modeButton.callModeFn();
// inc the curr mode index
- modeButton._incModeIndex();
+ if( modeButton.options.switchModesOnClick ){ modeButton._incModeIndex(); }
// set the element html
$( this ).html( modeButton.options.modes[ modeButton.currModeIndex ].html );
});
-
- this.currModeIndex = 0;
- if( this.options.initialMode ){
- this.currModeIndex = this._getModeIndex( this.options.initialMode );
- }
- return this;
+ return this.reset();
};
-
-
- ModeButton.prototype._getModeIndex = function __getModeIndex( modeKey ){
- for( var i=0; i<this.options.modes.length; i+=1 ){
- if( this.options.modes[ i ].mode === modeKey ){ return i; }
- }
- throw new Error( 'mode not found: ' + modeKey );
- };
- ModeButton.prototype.getCurrMode = function _getCurrMode(){
- return this.options.modes[ this.currModeIndex ];
- };
- ModeButton.prototype.getMode = function _getMode( modeKey ){
- if( !modeKey ){ return this.getCurrMode(); }
- return this.options.modes[( this._getModeIndex( modeKey ) )];
- };
- ModeButton.prototype.hasMode = function _hasMode( modeKey ){
- return !!this.getMode( modeKey );
- };
- ModeButton.prototype.currentMode = function _currentMode(){
- return this.options.modes[ this.currModeIndex ];
- };
- ModeButton.prototype.setMode = function _setMode( newModeKey ){
- var newMode = this.getMode( newModeKey );
- this.$element.html( newMode.html || null );
- return this;
- };
- ModeButton.prototype._incModeIndex = function __incModeIndex(){
+ /** increment the mode index to the next in the array, looping back to zero if at the last */
+ ModeButton.prototype._incModeIndex = function _incModeIndex(){
this.currModeIndex += 1;
if( this.currModeIndex >= this.options.modes.length ){
this.currModeIndex = 0;
}
return this;
};
- ModeButton.prototype.callModeFn = function _callModeFn( modeKey ){
+ /** get the mode index in the modes array for the given key (mode name) */
+ ModeButton.prototype._getModeIndex = function _getModeIndex( modeKey ){
+ for( var i=0; i<this.options.modes.length; i+=1 ){
+ if( this.options.modes[ i ].mode === modeKey ){ return i; }
+ }
+ throw new Error( 'mode not found: ' + modeKey );
+ };
+ /** set the current mode to the one with the given index and set button html */
+ ModeButton.prototype._setModeByIndex = function _setModeByIndex( index ){
+ var newMode = this.options.modes[ index ];
+ if( !newMode ){
+ throw new Error( 'mode index not found: ' + index );
+ }
+ this.currModeIndex = index;
+ if( newMode.html ){
+ this.$element.html( newMode.html );
+ }
+ return this;
+ };
+
+ // ---- public interface
+ /** get the current mode object (not just the mode name) */
+ ModeButton.prototype.currentMode = function currentMode(){
+ return this.options.modes[ this.currModeIndex ];
+ };
+ /** return the mode key of the current mode */
+ ModeButton.prototype.current = function current(){
+ // sugar for returning mode name
+ return this.currentMode().mode;
+ };
+ /** get the mode with the given modeKey or the current mode if modeKey is undefined */
+ ModeButton.prototype.getMode = function getMode( modeKey ){
+ if( !modeKey ){ return this.currentMode(); }
+ return this.options.modes[( this._getModeIndex( modeKey ) )];
+ };
+ /** T/F if the button has the given mode */
+ ModeButton.prototype.hasMode = function hasMode( modeKey ){
+ try {
+ return !!this.getMode( modeKey );
+ } catch( err ){}
+ return false;
+ };
+ /** set the current mode to the mode with the given name */
+ ModeButton.prototype.setMode = function setMode( modeKey ){
+ return this._setModeByIndex( this._getModeIndex( modeKey ) );
+ };
+ /** reset to the initial mode */
+ ModeButton.prototype.reset = function reset(){
+ this.currModeIndex = 0;
+ if( this.options.initialMode ){
+ this.currModeIndex = this._getModeIndex( this.options.initialMode );
+ }
+ return this._setModeByIndex( this.currModeIndex );
+ };
+ /** manually call the click handler of the given mode */
+ ModeButton.prototype.callModeFn = function callModeFn( modeKey ){
var modeFn = this.getMode( modeKey ).onclick;
if( modeFn && jQuery.type( modeFn === 'function' ) ){
- return modeFn.call( this );
+ // call with the element as context (std jquery pattern)
+ modeFn.call( this.$element.get(0) );
+ return this;
}
return undefined;
};
@@ -861,26 +894,32 @@
// as jq plugin
jQuery.fn.extend({
modeButton : function $modeButton( options ){
- var nonOptionsArgs = jQuery.makeArray( arguments ).slice( 1 );
+ if( !this.size() ){ return this; }
+
//TODO: does map still work with jq multi selection (i.e. $( '.class-for-many-btns' ).modeButton)?
- return this.map( function(){
- var $this = $( this ),
- data = $this.data( 'mode-button' );
+ if( jQuery.type( options ) === 'object' ){
+ return this.map( function(){
+ var $this = $( this );
+ $this.data( 'mode-button', new ModeButton( $this, options ) );
+ return this;
+ });
+ }
- if( jQuery.type( options ) === 'object' ){
- data = new ModeButton( $this, options );
- $this.data( 'mode-button', data );
+ var $first = $( this[0] ),
+ button = $first.data( 'mode-button' );
+ console.debug( 'first, button', $first, button );
- } else if( data && jQuery.type( options ) === 'string' ){
- var fn = data[ options ];
- if( jQuery.type( fn ) === 'function' ){
- return fn.apply( data, nonOptionsArgs );
- }
- } else if ( data ){
- return data;
+ if( !button ){
+ throw new Error( 'modeButton needs an options object or string name of a function' );
+ }
+
+ if( button && jQuery.type( options ) === 'string' ){
+ var fnName = options;
+ if( button && jQuery.type( button[ fnName ] ) === 'function' ){
+ return button[ fnName ].apply( button, jQuery.makeArray( arguments ).slice( 1 ) );
}
- return this;
- });
+ }
+ return button;
}
});
}());
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 static/scripts/packed/mvc/ui.js
--- a/static/scripts/packed/mvc/ui.js
+++ b/static/scripts/packed/mvc/ui.js
@@ -1,1 +1,1 @@
-var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b;if(!this.$button.size()){this.$button=$("<div/>")}this.options=a||[];var c=this;this.$button.click(function(d){$(".popmenu-wrapper").remove();c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body").css(this._getShownPosition(a)).show();this._setUpCloseBehavior()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var c=this;function a(e){$(document).off("click.close_popup");if(window.parent!==window){try{$(window.parent.document).off("click.close_popup")}catch(d){}}else{try{$("iframe#galaxy_main").contents().off("click.close_popup")}catch(d){}}c.remove()}$("html").one("click.close_popup",a);if(window.parent!==window){try{$(window.parent.document).find("html").one("click.close_popup",a)}catch(b){}}else{try{$("iframe#galaxy_main").contents().one("click.close_popup",a)}catch(b){}}},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.create=function _create(b,a){return new PopupMenu(b,a)};PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((!a.disabled&&a.target)?(' target="'+a.target+'"'):("")),' href="',((!a.disabled&&a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b}(function(){function a(j,p){var d=27,m=13,c=$(j),e=true,g={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(q){},minSearchLen:0,escWillClear:true,oninit:function(){}};function i(q){var r=$(this).parent().children("input");r.val("");r.trigger("clear:searchInput");p.onclear()}function o(r,q){$(this).trigger("search:searchInput",q);if(typeof p.onfirstsearch==="function"&&e){e=false;p.onfirstsearch(q)}else{p.onsearch(q)}}function f(){return['<input type="text" name="',p.name,'" placeholder="',p.placeholder,'" ','class="search-query ',p.classes,'" ',"/>"].join("")}function l(){return $(f()).focus(function(q){$(this).select()}).keyup(function(r){if(r.which===d&&p.escWillClear){i.call(this,r)}else{var q=$(this).val();if((r.which===m)||(p.minSearchLen&&q.length>=p.minSearchLen)){o.call(this,r,q)}else{if(!q.length){i.call(this,r)}}}}).val(p.initialVal)}function k(){return $(['<span class="search-clear fa fa-times-circle" ','title="',_l("clear search (esc)"),'"></span>'].join("")).tooltip({placement:"bottom"}).click(function(q){i.call(this,q)})}function n(){return $(['<span class="search-loading fa fa-spinner fa-spin" ','title="',_l("loading..."),'"></span>'].join("")).hide().tooltip({placement:"bottom"})}function h(){c.find(".search-loading").toggle();c.find(".search-clear").toggle()}if(jQuery.type(p)==="string"){if(p==="toggle-loading"){h()}return c}if(jQuery.type(p)==="object"){p=jQuery.extend(true,{},g,p)}return c.addClass("search-input").prepend([l(),k(),n()])}jQuery.fn.extend({searchInput:function b(c){return this.each(function(){return a(this,c)})}})}());(function(){function b(m,l){this.currModeIndex=0;return this.init(m,l)}b.prototype.DATA_KEY="mode-button";b.prototype.defaults={modes:[{mode:"default"}]};b.prototype.init=function f(m,l){l=l||{};this.$element=$(m);this.options=jQuery.extend(true,{},this.defaults,l);var o=this;this.$element.click(function n(p){o.callModeFn();o._incModeIndex();$(this).html(o.options.modes[o.currModeIndex].html)});this.currModeIndex=0;if(this.options.initialMode){this.currModeIndex=this._getModeIndex(this.options.initialMode)}return this};b.prototype._getModeIndex=function j(l){for(var m=0;m<this.options.modes.length;m+=1){if(this.options.modes[m].mode===l){return m}}throw new Error("mode not found: "+l)};b.prototype.getCurrMode=function a(){return this.options.modes[this.currModeIndex]};b.prototype.getMode=function g(l){if(!l){return this.getCurrMode()}return this.options.modes[(this._getModeIndex(l))]};b.prototype.hasMode=function k(l){return !!this.getMode(l)};b.prototype.currentMode=function e(){return this.options.modes[this.currModeIndex]};b.prototype.setMode=function c(m){var l=this.getMode(m);this.$element.html(l.html||null);return this};b.prototype._incModeIndex=function d(){this.currModeIndex+=1;if(this.currModeIndex>=this.options.modes.length){this.currModeIndex=0}return this};b.prototype.callModeFn=function h(l){var m=this.getMode(l).onclick;if(m&&jQuery.type(m==="function")){return m.call(this)}return undefined};jQuery.fn.extend({modeButton:function i(m){var l=jQuery.makeArray(arguments).slice(1);return this.map(function(){var p=$(this),o=p.data("mode-button");if(jQuery.type(m)==="object"){o=new b(p,m);p.data("mode-button",o)}else{if(o&&jQuery.type(m)==="string"){var n=o[m];if(jQuery.type(n)==="function"){return n.apply(o,l)}}else{if(o){return o}}}return this})}})}());function dropDownSelect(b,c){c=c||((!_.isEmpty(b))?(b[0]):(""));var a=$(['<div class="dropdown-select btn-group">','<button type="button" class="btn btn-default">','<span class="dropdown-select-selected">'+c+"</span>","</button>","</div>"].join("\n"));if(b&&b.length>1){a.find("button").addClass("dropdown-toggle").attr("data-toggle","dropdown").append(' <span class="caret"></span>');a.append(['<ul class="dropdown-menu" role="menu">',_.map(b,function(e){return['<li><a href="javascript:void(0)">',e,"</a></li>"].join("")}).join("\n"),"</ul>"].join("\n"))}function d(g){var h=$(this),f=h.parents(".dropdown-select"),e=h.text();f.find(".dropdown-select-selected").text(e);f.trigger("change.dropdown-select",e)}a.find("a").click(d);return a}(function(){function e(k,j){return this.init(k,j)}e.prototype.DATA_KEY="filter-control";e.prototype.init=function g(k,j){j=j||{filters:[]};this.$element=$(k).addClass("filter-control btn-group");this.options=jQuery.extend(true,{},this.defaults,j);this.currFilter=this.options.filters[0];return this.render()};e.prototype.render=function d(){this.$element.empty().append([this._renderKeySelect(),this._renderOpSelect(),this._renderValueInput()]);return this};e.prototype._renderKeySelect=function a(){var j=this;var k=this.options.filters.map(function(l){return l.key});this.$keySelect=dropDownSelect(k,this.currFilter.key).addClass("filter-control-key").on("change.dropdown-select",function(m,l){j.currFilter=_.findWhere(j.options.filters,{key:l});j.render()._triggerChange()});return this.$keySelect};e.prototype._renderOpSelect=function i(){var j=this,k=this.currFilter.ops;this.$opSelect=dropDownSelect(k,k[0]).addClass("filter-control-op").on("change.dropdown-select",function(m,l){j._triggerChange()});return this.$opSelect};e.prototype._renderValueInput=function c(){var j=this;if(this.currFilter.values){this.$valueSelect=dropDownSelect(this.currFilter.values,this.currFilter.values[0]).on("change.dropdown-select",function(l,k){j._triggerChange()})}else{this.$valueSelect=$("<input/>").addClass("form-control").on("change",function(k,l){j._triggerChange()})}this.$valueSelect.addClass("filter-control-value");return this.$valueSelect};e.prototype.val=function b(){var k=this.$element.find(".filter-control-key .dropdown-select-selected").text(),m=this.$element.find(".filter-control-op .dropdown-select-selected").text(),j=this.$element.find(".filter-control-value"),l=(j.hasClass("dropdown-select"))?(j.find(".dropdown-select-selected").text()):(j.val());return{key:k,op:m,value:l}};e.prototype._triggerChange=function h(){this.$element.trigger("change.filter-control",this.val())};jQuery.fn.extend({filterControl:function f(k){var j=jQuery.makeArray(arguments).slice(1);return this.map(function(){var n=$(this),m=n.data(e.prototype.DATA_KEY);if(jQuery.type(k)==="object"){m=new e(n,k);n.data(e.prototype.DATA_KEY,m)}if(m&&jQuery.type(k)==="string"){var l=m[k];if(jQuery.type(l)==="function"){return l.apply(m,j)}}return this})}})}());(function(){function i(o,n){this.numPages=null;this.currPage=0;return this.init(o,n)}i.prototype.DATA_KEY="pagination";i.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null};i.prototype.init=function g(n,o){o=o||{};this.$element=n;this.options=jQuery.extend(true,{},this.defaults,o);this.currPage=this.options.startingPage;if(this.options.totalDataSize!==null){this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage);if(this.currPage>=this.numPages){this.currPage=this.numPages-1}}this.$element.data(i.prototype.DATA_KEY,this);this._render();return this};function m(n){return $(['<li><a href="javascript:void(0);">',n,"</a></li>"].join(""))}i.prototype._render=function e(){if(this.options.totalDataSize===0){return this}if(this.numPages===1){return this}if(this.numPages>0){this._renderPages();this._scrollToActivePage()}else{this._renderPrevNext()}return this};i.prototype._renderPrevNext=function b(){var o=this,p=m("Prev"),n=m("Next"),q=$("<ul/>").addClass("pagination pagination-prev-next");if(this.currPage===0){p.addClass("disabled")}else{p.click(function(){o.prevPage()})}if((this.numPages&&this.currPage===(this.numPages-1))||(this.options.currDataSize&&this.options.currDataSize<this.options.perPage)){n.addClass("disabled")}else{n.click(function(){o.nextPage()})}this.$element.html(q.append([p,n]));return this.$element};i.prototype._renderPages=function a(){var n=this,q=$("<div>").addClass("pagination-scroll-container"),s=$("<ul/>").addClass("pagination pagination-page-list"),r=function(t){n.goToPage($(this).data("page"))};for(var o=0;o<this.numPages;o+=1){var p=m(o+1).attr("data-page",o).click(r);if(o===this.currPage){p.addClass("active")}s.append(p)}return this.$element.html(q.html(s))};i.prototype._scrollToActivePage=function l(){var p=this.$element.find(".pagination-scroll-container");if(!p.size()){return this}var o=this.$element.find("li.active"),n=p.width()/2;p.scrollLeft(p.scrollLeft()+o.position().left-n);return this};i.prototype.goToPage=function j(n){if(n<=0){n=0}if(this.numPages&&n>=this.numPages){n=this.numPages-1}if(n===this.currPage){return this}this.currPage=n;this.$element.trigger("pagination.page-change",this.currPage);this._render();return this};i.prototype.prevPage=function c(){return this.goToPage(this.currPage-1)};i.prototype.nextPage=function h(){return this.goToPage(this.currPage+1)};i.prototype.page=function f(){return this.currPage};i.create=function k(n,o){return new i(n,o)};jQuery.fn.extend({pagination:function d(o){var n=jQuery.makeArray(arguments).slice(1);if(jQuery.type(o)==="object"){return this.map(function(){i.create($(this),o);return this})}var q=$(this[0]),r=q.data(i.prototype.DATA_KEY);if(r){if(jQuery.type(o)==="string"){var p=r[o];if(jQuery.type(p)==="function"){return p.apply(r,n)}}else{return r}}return undefined}})}());(function(){var g={renameColumns:false,columnNames:[],commentChar:"#",hideCommentRows:false,includePrompts:true,topLeftContent:"Columns:"},s="peek-control.change",t="peek-control.rename",l="peek-control",v="control",f="control-prompt",c="selected",n="disabled",u="button",q="renamable-header",p="column-index",a="column-name";function i(w){if(w.disabled&&jQuery.type(w.disabled)!=="array"){throw new Error('"disabled" must be defined as an array of indeces: '+JSON.stringify(w))}if(w.multiselect&&w.selected&&jQuery.type(w.selected)!=="array"){throw new Error('Mulitselect rows need an array for "selected": '+JSON.stringify(w))}if(!w.label||!w.id){throw new Error("Peek controls need a label and id for each control row: "+JSON.stringify(w))}if(w.disabled&&w.disabled.indexOf(w.selected)!==-1){throw new Error("Selected column is in the list of disabled columns: "+JSON.stringify(w))}return w}function o(x,w){return $("<div/>").addClass(u).text(x.label)}function k(x,w){var y=$("<td/>").html(o(x,w)).attr("data-"+p,w);if(x.disabled&&x.disabled.indexOf(w)!==-1){y.addClass(n)}return y}function e(y,z,w){var x=y.children("."+u);if(y.hasClass(c)){x.html((z.selectedText!==undefined)?(z.selectedText):(z.label))}else{x.html((z.unselectedText!==undefined)?(z.unselectedText):(z.label))}}function h(z,x){var y=k(z,x);if(z.selected===x){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);if(!E.hasClass(c)){var A=E.parent().children("."+c).removeClass(c);A.each(function(){e($(this),z,x)});E.addClass(c);e(E,z,x);var C={},B=E.parent().attr("id"),F=E.data(p);C[B]=F;E.parents(".peek").trigger(s,C)}})}return y}function m(z,x){var y=k(z,x);if(z.selected&&z.selected.indexOf(x)!==-1){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);E.toggleClass(c);e(E,z,x);var C=E.parent().find("."+c).map(function(G,H){return $(H).data(p)});var B={},A=E.parent().attr("id"),F=jQuery.makeArray(C);B[A]=F;E.parents(".peek").trigger(s,B)})}return y}function j(y,z){var w=[];for(var x=0;x<y;x+=1){w.push(z.multiselect?m(z,x):h(z,x))}return w}function r(y,z,x){var A=$("<tr/>").attr("id",z.id).addClass(v);if(x){var w=$("<td/>").addClass(f).text(z.label+":");A.append(w)}A.append(j(y,z));return A}function b(E){E=jQuery.extend(true,{},g,E);var D=$(this).addClass(l),A=D.find("table"),z=A.find("th").size(),C=A.find("tr").size(),w=A.find("td[colspan]").map(function(H,F){var G=$(this);if(G.text()&&G.text().match(new RegExp("^"+E.commentChar))){return $(this).css("color","grey").parent().get(0)}return null});if(E.hideCommentRows){w.hide();C-=w.size()}if(E.includePrompts){var y=$("<th/>").addClass("top-left").text(E.topLeftContent).attr("rowspan",C);A.find("tr").first().prepend(y)}var B=A.find("th:not(.top-left)").each(function(G,I){var H=$(this),J=H.text().replace(/^\d+\.*/,""),F=E.columnNames[G]||J;H.attr("data-"+a,F).text((G+1)+((F)?("."+F):("")))});if(E.renameColumns){B.addClass(q).click(function x(){var G=$(this),F=G.index()+(E.includePrompts?0:1),I=G.data(a),H=prompt("New column name:",I);if(H!==null&&H!==I){G.text(F+(H?("."+H):"")).data(a,H).attr("data-",a,H);var J=jQuery.makeArray(G.parent().children("th:not(.top-left)").map(function(){return $(this).data(a)}));G.parents(".peek").trigger(t,J)}})}E.controls.forEach(function(G,F){i(G);var H=r(z,G,E.includePrompts);A.find("tbody").append(H)});return this}jQuery.fn.extend({peekControl:function d(w){return this.map(function(){return b.call(this,w)})}})}());
\ No newline at end of file
+var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b;if(!this.$button.size()){this.$button=$("<div/>")}this.options=a||[];var c=this;this.$button.click(function(d){$(".popmenu-wrapper").remove();c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body").css(this._getShownPosition(a)).show();this._setUpCloseBehavior()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var c=this;function a(e){$(document).off("click.close_popup");if(window.parent!==window){try{$(window.parent.document).off("click.close_popup")}catch(d){}}else{try{$("iframe#galaxy_main").contents().off("click.close_popup")}catch(d){}}c.remove()}$("html").one("click.close_popup",a);if(window.parent!==window){try{$(window.parent.document).find("html").one("click.close_popup",a)}catch(b){}}else{try{$("iframe#galaxy_main").contents().one("click.close_popup",a)}catch(b){}}},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.create=function _create(b,a){return new PopupMenu(b,a)};PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((!a.disabled&&a.target)?(' target="'+a.target+'"'):("")),' href="',((!a.disabled&&a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b}(function(){function a(j,p){var d=27,m=13,c=$(j),e=true,g={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(q){},minSearchLen:0,escWillClear:true,oninit:function(){}};function i(q){var r=$(this).parent().children("input");r.val("");r.trigger("clear:searchInput");p.onclear()}function o(r,q){$(this).trigger("search:searchInput",q);if(typeof p.onfirstsearch==="function"&&e){e=false;p.onfirstsearch(q)}else{p.onsearch(q)}}function f(){return['<input type="text" name="',p.name,'" placeholder="',p.placeholder,'" ','class="search-query ',p.classes,'" ',"/>"].join("")}function l(){return $(f()).focus(function(q){$(this).select()}).keyup(function(r){if(r.which===d&&p.escWillClear){i.call(this,r)}else{var q=$(this).val();if((r.which===m)||(p.minSearchLen&&q.length>=p.minSearchLen)){o.call(this,r,q)}else{if(!q.length){i.call(this,r)}}}}).val(p.initialVal)}function k(){return $(['<span class="search-clear fa fa-times-circle" ','title="',_l("clear search (esc)"),'"></span>'].join("")).tooltip({placement:"bottom"}).click(function(q){i.call(this,q)})}function n(){return $(['<span class="search-loading fa fa-spinner fa-spin" ','title="',_l("loading..."),'"></span>'].join("")).hide().tooltip({placement:"bottom"})}function h(){c.find(".search-loading").toggle();c.find(".search-clear").toggle()}if(jQuery.type(p)==="string"){if(p==="toggle-loading"){h()}return c}if(jQuery.type(p)==="object"){p=jQuery.extend(true,{},g,p)}return c.addClass("search-input").prepend([l(),k(),n()])}jQuery.fn.extend({searchInput:function b(c){return this.each(function(){return a(this,c)})}})}());(function(){function c(o,n){this.currModeIndex=0;return this._init(o,n)}c.prototype.DATA_KEY="mode-button";c.prototype.defaults={switchModesOnClick:true};c.prototype._init=function j(o,n){n=n||{};this.$element=$(o);this.options=jQuery.extend(true,{},this.defaults,n);if(!n.modes){throw new Error('ModeButton requires a "modes" array')}var q=this;this.$element.click(function p(r){q.callModeFn();if(q.options.switchModesOnClick){q._incModeIndex()}$(this).html(q.options.modes[q.currModeIndex].html)});return this.reset()};c.prototype._incModeIndex=function l(){this.currModeIndex+=1;if(this.currModeIndex>=this.options.modes.length){this.currModeIndex=0}return this};c.prototype._getModeIndex=function f(n){for(var o=0;o<this.options.modes.length;o+=1){if(this.options.modes[o].mode===n){return o}}throw new Error("mode not found: "+n)};c.prototype._setModeByIndex=function m(n){var o=this.options.modes[n];if(!o){throw new Error("mode index not found: "+n)}this.currModeIndex=n;if(o.html){this.$element.html(o.html)}return this};c.prototype.currentMode=function d(){return this.options.modes[this.currModeIndex]};c.prototype.current=function i(){return this.currentMode().mode};c.prototype.getMode=function g(n){if(!n){return this.currentMode()}return this.options.modes[(this._getModeIndex(n))]};c.prototype.hasMode=function b(n){try{return !!this.getMode(n)}catch(o){}return false};c.prototype.setMode=function a(n){return this._setModeByIndex(this._getModeIndex(n))};c.prototype.reset=function h(){this.currModeIndex=0;if(this.options.initialMode){this.currModeIndex=this._getModeIndex(this.options.initialMode)}return this._setModeByIndex(this.currModeIndex)};c.prototype.callModeFn=function e(n){var o=this.getMode(n).onclick;if(o&&jQuery.type(o==="function")){o.call(this.$element.get(0));return this}return undefined};jQuery.fn.extend({modeButton:function k(n){if(!this.size()){return this}if(jQuery.type(n)==="object"){return this.map(function(){var r=$(this);r.data("mode-button",new c(r,n));return this})}var p=$(this[0]),o=p.data("mode-button");console.debug("first, button",p,o);if(!o){throw new Error("modeButton needs an options object or string name of a function")}if(o&&jQuery.type(n)==="string"){var q=n;if(o&&jQuery.type(o[q])==="function"){return o[q].apply(o,jQuery.makeArray(arguments).slice(1))}}return o}})}());function dropDownSelect(b,c){c=c||((!_.isEmpty(b))?(b[0]):(""));var a=$(['<div class="dropdown-select btn-group">','<button type="button" class="btn btn-default">','<span class="dropdown-select-selected">'+c+"</span>","</button>","</div>"].join("\n"));if(b&&b.length>1){a.find("button").addClass("dropdown-toggle").attr("data-toggle","dropdown").append(' <span class="caret"></span>');a.append(['<ul class="dropdown-menu" role="menu">',_.map(b,function(e){return['<li><a href="javascript:void(0)">',e,"</a></li>"].join("")}).join("\n"),"</ul>"].join("\n"))}function d(g){var h=$(this),f=h.parents(".dropdown-select"),e=h.text();f.find(".dropdown-select-selected").text(e);f.trigger("change.dropdown-select",e)}a.find("a").click(d);return a}(function(){function e(k,j){return this.init(k,j)}e.prototype.DATA_KEY="filter-control";e.prototype.init=function g(k,j){j=j||{filters:[]};this.$element=$(k).addClass("filter-control btn-group");this.options=jQuery.extend(true,{},this.defaults,j);this.currFilter=this.options.filters[0];return this.render()};e.prototype.render=function d(){this.$element.empty().append([this._renderKeySelect(),this._renderOpSelect(),this._renderValueInput()]);return this};e.prototype._renderKeySelect=function a(){var j=this;var k=this.options.filters.map(function(l){return l.key});this.$keySelect=dropDownSelect(k,this.currFilter.key).addClass("filter-control-key").on("change.dropdown-select",function(m,l){j.currFilter=_.findWhere(j.options.filters,{key:l});j.render()._triggerChange()});return this.$keySelect};e.prototype._renderOpSelect=function i(){var j=this,k=this.currFilter.ops;this.$opSelect=dropDownSelect(k,k[0]).addClass("filter-control-op").on("change.dropdown-select",function(m,l){j._triggerChange()});return this.$opSelect};e.prototype._renderValueInput=function c(){var j=this;if(this.currFilter.values){this.$valueSelect=dropDownSelect(this.currFilter.values,this.currFilter.values[0]).on("change.dropdown-select",function(l,k){j._triggerChange()})}else{this.$valueSelect=$("<input/>").addClass("form-control").on("change",function(k,l){j._triggerChange()})}this.$valueSelect.addClass("filter-control-value");return this.$valueSelect};e.prototype.val=function b(){var k=this.$element.find(".filter-control-key .dropdown-select-selected").text(),m=this.$element.find(".filter-control-op .dropdown-select-selected").text(),j=this.$element.find(".filter-control-value"),l=(j.hasClass("dropdown-select"))?(j.find(".dropdown-select-selected").text()):(j.val());return{key:k,op:m,value:l}};e.prototype._triggerChange=function h(){this.$element.trigger("change.filter-control",this.val())};jQuery.fn.extend({filterControl:function f(k){var j=jQuery.makeArray(arguments).slice(1);return this.map(function(){var n=$(this),m=n.data(e.prototype.DATA_KEY);if(jQuery.type(k)==="object"){m=new e(n,k);n.data(e.prototype.DATA_KEY,m)}if(m&&jQuery.type(k)==="string"){var l=m[k];if(jQuery.type(l)==="function"){return l.apply(m,j)}}return this})}})}());(function(){function i(o,n){this.numPages=null;this.currPage=0;return this.init(o,n)}i.prototype.DATA_KEY="pagination";i.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null};i.prototype.init=function g(n,o){o=o||{};this.$element=n;this.options=jQuery.extend(true,{},this.defaults,o);this.currPage=this.options.startingPage;if(this.options.totalDataSize!==null){this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage);if(this.currPage>=this.numPages){this.currPage=this.numPages-1}}this.$element.data(i.prototype.DATA_KEY,this);this._render();return this};function m(n){return $(['<li><a href="javascript:void(0);">',n,"</a></li>"].join(""))}i.prototype._render=function e(){if(this.options.totalDataSize===0){return this}if(this.numPages===1){return this}if(this.numPages>0){this._renderPages();this._scrollToActivePage()}else{this._renderPrevNext()}return this};i.prototype._renderPrevNext=function b(){var o=this,p=m("Prev"),n=m("Next"),q=$("<ul/>").addClass("pagination pagination-prev-next");if(this.currPage===0){p.addClass("disabled")}else{p.click(function(){o.prevPage()})}if((this.numPages&&this.currPage===(this.numPages-1))||(this.options.currDataSize&&this.options.currDataSize<this.options.perPage)){n.addClass("disabled")}else{n.click(function(){o.nextPage()})}this.$element.html(q.append([p,n]));return this.$element};i.prototype._renderPages=function a(){var n=this,q=$("<div>").addClass("pagination-scroll-container"),s=$("<ul/>").addClass("pagination pagination-page-list"),r=function(t){n.goToPage($(this).data("page"))};for(var o=0;o<this.numPages;o+=1){var p=m(o+1).attr("data-page",o).click(r);if(o===this.currPage){p.addClass("active")}s.append(p)}return this.$element.html(q.html(s))};i.prototype._scrollToActivePage=function l(){var p=this.$element.find(".pagination-scroll-container");if(!p.size()){return this}var o=this.$element.find("li.active"),n=p.width()/2;p.scrollLeft(p.scrollLeft()+o.position().left-n);return this};i.prototype.goToPage=function j(n){if(n<=0){n=0}if(this.numPages&&n>=this.numPages){n=this.numPages-1}if(n===this.currPage){return this}this.currPage=n;this.$element.trigger("pagination.page-change",this.currPage);this._render();return this};i.prototype.prevPage=function c(){return this.goToPage(this.currPage-1)};i.prototype.nextPage=function h(){return this.goToPage(this.currPage+1)};i.prototype.page=function f(){return this.currPage};i.create=function k(n,o){return new i(n,o)};jQuery.fn.extend({pagination:function d(o){var n=jQuery.makeArray(arguments).slice(1);if(jQuery.type(o)==="object"){return this.map(function(){i.create($(this),o);return this})}var q=$(this[0]),r=q.data(i.prototype.DATA_KEY);if(r){if(jQuery.type(o)==="string"){var p=r[o];if(jQuery.type(p)==="function"){return p.apply(r,n)}}else{return r}}return undefined}})}());(function(){var g={renameColumns:false,columnNames:[],commentChar:"#",hideCommentRows:false,includePrompts:true,topLeftContent:"Columns:"},s="peek-control.change",t="peek-control.rename",l="peek-control",v="control",f="control-prompt",c="selected",n="disabled",u="button",q="renamable-header",p="column-index",a="column-name";function i(w){if(w.disabled&&jQuery.type(w.disabled)!=="array"){throw new Error('"disabled" must be defined as an array of indeces: '+JSON.stringify(w))}if(w.multiselect&&w.selected&&jQuery.type(w.selected)!=="array"){throw new Error('Mulitselect rows need an array for "selected": '+JSON.stringify(w))}if(!w.label||!w.id){throw new Error("Peek controls need a label and id for each control row: "+JSON.stringify(w))}if(w.disabled&&w.disabled.indexOf(w.selected)!==-1){throw new Error("Selected column is in the list of disabled columns: "+JSON.stringify(w))}return w}function o(x,w){return $("<div/>").addClass(u).text(x.label)}function k(x,w){var y=$("<td/>").html(o(x,w)).attr("data-"+p,w);if(x.disabled&&x.disabled.indexOf(w)!==-1){y.addClass(n)}return y}function e(y,z,w){var x=y.children("."+u);if(y.hasClass(c)){x.html((z.selectedText!==undefined)?(z.selectedText):(z.label))}else{x.html((z.unselectedText!==undefined)?(z.unselectedText):(z.label))}}function h(z,x){var y=k(z,x);if(z.selected===x){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);if(!E.hasClass(c)){var A=E.parent().children("."+c).removeClass(c);A.each(function(){e($(this),z,x)});E.addClass(c);e(E,z,x);var C={},B=E.parent().attr("id"),F=E.data(p);C[B]=F;E.parents(".peek").trigger(s,C)}})}return y}function m(z,x){var y=k(z,x);if(z.selected&&z.selected.indexOf(x)!==-1){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);E.toggleClass(c);e(E,z,x);var C=E.parent().find("."+c).map(function(G,H){return $(H).data(p)});var B={},A=E.parent().attr("id"),F=jQuery.makeArray(C);B[A]=F;E.parents(".peek").trigger(s,B)})}return y}function j(y,z){var w=[];for(var x=0;x<y;x+=1){w.push(z.multiselect?m(z,x):h(z,x))}return w}function r(y,z,x){var A=$("<tr/>").attr("id",z.id).addClass(v);if(x){var w=$("<td/>").addClass(f).text(z.label+":");A.append(w)}A.append(j(y,z));return A}function b(E){E=jQuery.extend(true,{},g,E);var D=$(this).addClass(l),A=D.find("table"),z=A.find("th").size(),C=A.find("tr").size(),w=A.find("td[colspan]").map(function(H,F){var G=$(this);if(G.text()&&G.text().match(new RegExp("^"+E.commentChar))){return $(this).css("color","grey").parent().get(0)}return null});if(E.hideCommentRows){w.hide();C-=w.size()}if(E.includePrompts){var y=$("<th/>").addClass("top-left").text(E.topLeftContent).attr("rowspan",C);A.find("tr").first().prepend(y)}var B=A.find("th:not(.top-left)").each(function(G,I){var H=$(this),J=H.text().replace(/^\d+\.*/,""),F=E.columnNames[G]||J;H.attr("data-"+a,F).text((G+1)+((F)?("."+F):("")))});if(E.renameColumns){B.addClass(q).click(function x(){var G=$(this),F=G.index()+(E.includePrompts?0:1),I=G.data(a),H=prompt("New column name:",I);if(H!==null&&H!==I){G.text(F+(H?("."+H):"")).data(a,H).attr("data-",a,H);var J=jQuery.makeArray(G.parent().children("th:not(.top-left)").map(function(){return $(this).data(a)}));G.parents(".peek").trigger(t,J)}})}E.controls.forEach(function(G,F){i(G);var H=r(z,G,E.includePrompts);A.find("tbody").append(H)});return this}jQuery.fn.extend({peekControl:function d(w){return this.map(function(){return b.call(this,w)})}})}());
\ No newline at end of file
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 templates/webapps/galaxy/history/original_view.mako
--- a/templates/webapps/galaxy/history/original_view.mako
+++ /dev/null
@@ -1,173 +0,0 @@
-<%namespace file="/display_common.mako" import="get_history_link, get_controller_name" />
-<%namespace file="/root/history_common.mako" import="render_dataset" />
-<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" />
-
-<%!
- def inherit(context):
- if context.get('use_panels'):
- return '/webapps/galaxy/base_panels.mako'
- else:
- return '/base.mako'
-%>
-<%inherit file="${inherit(context)}"/>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "libs/jquery/jstorage" )}
- <script type="text/javascript">
- $(function() {
- init_history_items( $("div.historyItemWrapper"), false, "nochanges" );
- $( '#switch-to-link' ).click( function( event ){
- var galaxy = window.Galaxy || window.parent.Galaxy;
- if( galaxy ){
- galaxy.currHistoryPanel.switchToHistory( '${ trans.security.encode_id( history.id ) }' );
- }
- });
- $( '#refresh' ).click( function( event ){ window.location.reload( true ); })
- });
- </script>
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "history", "autocomplete_tagging" )}
-
- <style type="text/css">
-
- /* these don't appear to be used? */
- .page-body
- {
- padding: 10px;
- float: left;
- width: 65%;
- }
- .page-meta
- {
- float: right;
- width: 27%;
- padding: 0.5em;
- margin: 0.25em;
- vertical-align: text-top;
- border: 2px solid #DDDDDD;
- border-top: 4px solid #DDDDDD;
- }
-
-
- body {
- padding: 0px;
- margin: 0px;
- }
-
- div.unified-panel-body {
- position: absolute;
- top: 0px;
- width: 100%;
- }
-
- #history-name-area {
- margin: 12px 0px 0px 16px;
- font-size: 120%;
- }
- #top-links {
- margin: 4px 0px 8px 16px;
- }
-
- .historyItemContainer {
- /*padding-right: 3px;*/
- }
- .historyItemBody {
- display: none;
- }
- div.historyItemWrapper {
- margin: 0px 4px 0px 4px ;
- border-left: 1px solid #999999;
- border-right: 1px solid #999999;
- }
- /* TODO: unify with other history css and into .less */
- </style>
-
- <noscript>
- <style>
- .historyItemBody {
- display: block;
- }
- </style>
- </noscript>
-</%def>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.message_box_visible=False
-%>
-</%def>
-
-<%def name="body()">
- ${center_panel()}
-</%def>
-
-<%def name="center_panel()">
- ## Get URL to other histories owned by user that owns this history.
- <%
- ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier.
- href_to_published_histories = h.url_for( controller='/history', action='list_published')
- if history.user is not None:
- href_to_user_histories = h.url_for( controller='/history', action='list_published', xxx=history.user.username).replace( 'xxx', 'f-username')
- else:
- href_to_user_histories = h.url_for( controller='/history', action='list_published' )##should this instead be be None or empty string?
- %>
-
- <div class="unified-panel-body">
- <div style="overflow: auto; height: 100%;">
- ## Render view of history.
- <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold; padding: 0px 0px 5px 0px">
- <div id="history-name">${history.get_display_name()}</div>
- </div>
-
- <div id="top-links" class="historyLinks" style="padding: 0px 0px 5px 0px">
- %if not history.purged and history.user != trans.user:
- ##TODO: need to remove _top
- <a href="${h.url_for(controller='history', action='imp', id=trans.security.encode_id(history.id) )}"
- >import and start using history</a> |
- <a id="refresh" href="javascript:void(0)" >${_('refresh')}</a> |
- %endif
- %if not history.purged and history.user == trans.user:
- <a id="switch-to-link" href="javascript:void(0)">${_('switch to this history')}</a> |
- <a id="refresh" href="javascript:void(0)" >${_('refresh')}</a> |
- %endif
- %if show_deleted:
- <a href="${h.url_for(controller='history', action='view', id=trans.security.encode_id(history.id), show_deleted=False, use_panels=use_panels )}">${_('hide deleted')}</a> |
- %else:
- <a href="${h.url_for(controller='history', action='view', id=trans.security.encode_id(history.id), show_deleted=True, use_panels=use_panels )}">${_('show deleted')}</a> |
- %endif
- <a href="#" class="toggle">collapse all</a>
- </div>
-
- %if history.deleted:
- <div class="warningmessagesmall">
- ${_('You are currently viewing a deleted history!')}
- </div>
- <p></p>
- %endif
-
- %if not datasets:
- <div class="infomessagesmall" id="emptyHistoryMessage">
-
- %else:
- ## Render requested datasets, ordered from newest to oldest
- %for data in datasets:
- %if data.visible:
- <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}">
- ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )}
- </div>
- %endif
- %endfor
-
- <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">
- %endif
- ${_("Your history is empty. Click 'Get Data' on the left pane to start")}
- </div>
- </div>
- </div>
-</%def>
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 templates/webapps/galaxy/history/view.mako
--- a/templates/webapps/galaxy/history/view.mako
+++ b/templates/webapps/galaxy/history/view.mako
@@ -77,6 +77,7 @@
%endif
<script type="text/javascript">
+ ##TODO: remove when Galaxy is either ensured or removed from the history panel
var using_panels = ${ 'false' if not use_panels else 'true' };
%if not use_panels:
window.Galaxy = {};
@@ -87,113 +88,107 @@
## ----------------------------------------------------------------------------
<%def name="center_panel()">
+<%
+ show_deleted = context.get( 'show_deleted', None )
+ show_hidden = context.get( 'show_hidden', None )
+
+ user_is_owner_json = 'true' if user_is_owner else 'false'
+ show_deleted_json = h.to_json_string( show_deleted )
+ show_hidden_json = h.to_json_string( show_hidden )
+
+ imp_with_deleted_url = h.url_for( controller='history', action='imp', id=history['id'], all_datasets=True )
+ imp_without_deleted_url = h.url_for( controller='history', action='imp', id=history['id'] )
+%>
+
<div id="header" class="clear"><div id="history-view-controls" class="pull-right">
- <%
- show_deleted = context.get( 'show_deleted', None )
- show_hidden = context.get( 'show_hidden', None )
-
- show_deleted_js = 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' )
- show_hidden_js = 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' )
- print 'user_is_owner:', user_is_owner
- %>
%if not user_is_owner and not history[ 'purged' ]:
- <a id="import" class="btn btn-default" style="display: none;"
- href="${h.url_for( controller='history', action='imp', id=history['id'], all_datasets=show_deleted )}">
- ${_('Import and start using history')}
- </a>
+ <button id="import" class="btn btn-default"></button>
%endif
- <button id="toggle-deleted" class="btn btn-default">
- ${_('Exclude deleted') if show_deleted else _('Include deleted')}
- </button>
- <button id="toggle-hidden" class="btn btn-default">
- ${_('Exclude hidden') if show_hidden else _('Include hidden')}
- </button>
+ <button id="toggle-deleted" class="btn btn-default"></button>
+ <button id="toggle-hidden" class="btn btn-default"></button></div></div><div id="history-${ history[ 'id' ] }" class="history-panel unified-panel-body" style="overflow: auto;"></div><script type="text/javascript">
+ $(function(){
+ $( '#toggle-deleted' ).modeButton({
+ initialMode : "${ 'showing_deleted' if show_deleted else 'not_showing_deleted' }",
+ modes: [
+ { mode: 'showing_deleted', html: _l( 'Exclude deleted' ) },
+ { mode: 'not_showing_deleted', html: _l( 'Include deleted' ) }
+ ]
+ }).click( function(){
+ // allow the 'include/exclude deleted' button to control whether the 'import' button includes deleted
+ // datasets when importing or not; when deleted datasets are shown, they'll be imported
+ $( '#import' ).modeButton( 'setMode',
+ $( this ).modeButton( 'current' ) === 'showing_deleted'? 'with_deleted': 'without_deleted' )
+ });
+
+ $( '#toggle-hidden' ).modeButton({
+ initialMode : "${ 'showing_hidden' if show_hidden else 'not_showing_hidden' }",
+ modes: [
+ { mode: 'showing_hidden', html: _l( 'Exclude hidden' ) },
+ { mode: 'not_showing_hidden', html: _l( 'Include hidden' ) }
+ ]
+ });
+
+ $( '#import' ).modeButton({
+ switchModesOnClick : false,
+ initialMode : "${ 'with_deleted' if show_deleted else 'without_deleted' }",
+ modes: [
+ { mode: 'with_deleted', html: _l( 'Import with deleted datasets and start using history' ),
+ onclick: function importWithDeleted(){
+ window.location = '${imp_with_deleted_url}';
+ }
+ },
+ { mode: 'without_deleted', html: _l( 'Import and start using history' ),
+ onclick: function importWithoutDeleted(){
+ window.location = '${imp_without_deleted_url}';
+ }
+ },
+ ]
+ });
+ });
+
var debugging = JSON.parse( sessionStorage.getItem( 'debugging' ) ) || false,
userIsOwner = ${'true' if user_is_owner else 'false'},
historyJSON = ${h.to_json_string( history )},
hdaJSON = ${h.to_json_string( hdas )};
- window.hdaJSON = hdaJSON;
-
- $( '#toggle-deleted' ).modeButton({
- initialMode : (${ show_deleted_js })?( 'exclude' ):( 'include' ),
- modes: [
- { mode: 'exclude', html: _l( 'Exclude deleted' ) },
- { mode: 'include', html: _l( 'Include deleted' ) }
- ]
- }).click( function(){
- // allow the 'include/exclude deleted' button to control whether the 'import' button includes deleted datasets
- // when importing or not; when deleted datasets are shown, they'll be imported
- var $importBtn = $( '#import' );
- if( $importBtn.size() ){
- // a bit hacky
- var href = $importBtn.attr( 'href' ),
- includeDeleted = $( this ).modeButton()[0].getMode().mode === 'exclude';
- href = href.replace( /all_datasets=True|False/, ( includeDeleted )?( 'True' ):( 'False' ) );
- $importBtn.attr( 'href', href );
- $importBtn.text( includeDeleted ? _l( 'Import with deleted datasets and start using history' )
- : _l( 'Import and start using history' ) );
- }
- });
-
- $( '#toggle-hidden' ).modeButton({
- initialMode : (${ show_hidden_js })?( 'exclude' ):( 'include' ),
- modes: [
- { mode: 'exclude', html: _l( 'Exclude hidden' ) },
- { mode: 'include', html: _l( 'Include hidden' ) }
- ]
- });
-
- ##TODO: move to mako
- if( Galaxy.currUser.id !== historyJSON.user_id ){
- $( '#import' ).show();
- }
+ panelToUse = ( userIsOwner )?
+ ({ location: 'mvc/history/history-panel', className: 'HistoryPanel' }):
+ ({ location: 'mvc/history/readonly-history-panel', className: 'ReadOnlyHistoryPanel' });
require.config({
baseUrl : "${h.url_for( '/static/scripts' )}"
- })([
- %if user_is_owner:
- 'mvc/history/history-panel'
- %else:
- 'mvc/history/readonly-history-panel'
- %endif
- ${ }
- ], function( panelMod ){
- //require([ "mvc/history/history-panel" ], function( historyPanel ){
- // history module is already in the dpn chain from the panel. We can re-scope it here.
- var historyModel = require( 'mvc/history/history-model' ),
- hdaBaseView = require( 'mvc/dataset/hda-base' ),
- history = new historyModel.History( historyJSON, hdaJSON, {
- logger: ( debugging )?( console ):( null )
+ })([ panelToUse.location ], function( panelMod ){
+ $(function(){
+ var panelClass = panelMod[ panelToUse.className ],
+ // history module is already in the dpn chain from the panel. We can re-scope it here.
+ historyModel = require( 'mvc/history/history-model' ),
+ hdaBaseView = require( 'mvc/dataset/hda-base' ),
+ history = new historyModel.History( historyJSON, hdaJSON, {
+ logger: ( debugging )?( console ):( null )
+ });
+
+ window.historyPanel = new panelClass({
+ show_deleted : ${show_deleted_json},
+ show_hidden : ${show_hidden_json},
+ el : $( "#history-" + historyJSON.id ),
+ model : history,
+ onready : function(){
+ var panel = this;
+ $( '#toggle-deleted' ).on( 'click', function(){
+ panel.toggleShowDeleted();
+ });
+ $( '#toggle-hidden' ).on( 'click', function(){
+ panel.toggleShowHidden();
+ });
+ this.render();
+ }
});
-
- window.panelMod = panelMod;
- %if user_is_owner:
- window.panelClass = panelMod.HistoryPanel;
- %else:
- window.panelClass = panelMod.ReadOnlyHistoryPanel;
- %endif
- window.historyPanel = new panelClass({
- show_deleted : ${show_deleted_js},
- show_hidden : ${show_hidden_js},
- el : $( "#history-" + historyJSON.id ),
- model : history,
- onready : function(){
- var panel = this;
- $( '#toggle-deleted' ).on( 'click', function(){
- panel.toggleShowDeleted();
- });
- $( '#toggle-hidden' ).on( 'click', function(){
- panel.toggleShowHidden();
- });
- this.render();
- }
});
});
</script>
diff -r 0db8172d6d363ba1010df08a79f6db435f4f0ee7 -r e51429649b44d5b434a6b6f4e10daa1dbf390c20 tools/data_source/upload.xml
--- a/tools/data_source/upload.xml
+++ b/tools/data_source/upload.xml
@@ -1,7 +1,6 @@
<?xml version="1.0"?><tool name="Upload File" id="upload1" version="1.1.4" workflow_compatible="false">
- <hidden>True</hidden><description>
from your computer
</description>
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.
1
0
commit/galaxy-central: guerler: Add get data back to to tool panel (will be replaced by a placeholder soon)
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/742b4ffd3b99/
Changeset: 742b4ffd3b99
User: guerler
Date: 2014-02-19 18:51:52
Summary: Add get data back to to tool panel (will be replaced by a placeholder soon)
Affected #: 1 file
diff -r 7ebec9da47844efbf37942faab3809cb0169e5c2 -r 742b4ffd3b99160cae864049f09defe710dd7ee4 tools/data_source/upload.xml
--- a/tools/data_source/upload.xml
+++ b/tools/data_source/upload.xml
@@ -1,7 +1,6 @@
<?xml version="1.0"?><tool name="Upload File" id="upload1" version="1.1.4" workflow_compatible="false">
- <hidden>True</hidden><description>
from your computer
</description>
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.
1
0
commit/galaxy-central: carlfeberhard: history/view: clean up, replace import link with window.location; UI mode button: several fixes, clean up, docs; Remove original_view from controllers/history (and templates)
by commits-noreply@bitbucket.org 19 Feb '14
by commits-noreply@bitbucket.org 19 Feb '14
19 Feb '14
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7ebec9da4784/
Changeset: 7ebec9da4784
User: carlfeberhard
Date: 2014-02-19 18:32:06
Summary: history/view: clean up, replace import link with window.location; UI mode button: several fixes, clean up, docs; Remove original_view from controllers/history (and templates)
Affected #: 5 files
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 7ebec9da47844efbf37942faab3809cb0169e5c2 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -843,35 +843,6 @@
history. <br>You can <a href="%s">continue and import this history</a> or %s.
""" % ( web.url_for(controller='history', action='imp', id=id, confirm=True, referer=trans.request.referer ), referer_message ), use_panels=True )
- # Replaced with view (below) but kept (available via manual URL editing) for now
- @web.expose
- def original_view( self, trans, id=None, show_deleted=False, use_panels=True ):
- """View a history. If a history is importable, then it is viewable by any user."""
- # Get history to view.
- if not id:
- return trans.show_error_message( "You must specify a history you want to view." )
- history_to_view = self.get_history( trans, id, False)
- # Integrity checks.
- if not history_to_view:
- return trans.show_error_message( "The specified history does not exist." )
- # Admin users can view any history
- if( ( history_to_view.user != trans.user )
- and ( not trans.user_is_admin() )
- and ( not history_to_view.importable ) ):
- error( "Either you are not allowed to view this history or the owner of this history has not made it accessible." )
- # View history.
- show_deleted = galaxy.util.string_as_bool( show_deleted )
- datasets = self.get_history_datasets( trans, history_to_view, show_deleted=show_deleted )
- try:
- use_panels = galaxy.util.string_as_bool( use_panels )
- except:
- pass # already a bool
- return trans.stream_template_mako( "history/original_view.mako",
- history = history_to_view,
- datasets = datasets,
- show_deleted = show_deleted,
- use_panels = use_panels )
-
@web.expose
def view( self, trans, id=None, show_deleted=False, show_hidden=False, use_panels=True ):
"""
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 7ebec9da47844efbf37942faab3809cb0169e5c2 static/scripts/mvc/ui.js
--- a/static/scripts/mvc/ui.js
+++ b/static/scripts/mvc/ui.js
@@ -783,77 +783,110 @@
* });
* $( '.myElement' ).modeButton( 'callModeFn', 'bler' );
*/
+ /** constructor */
function ModeButton( element, options ){
this.currModeIndex = 0;
- return this.init( element, options );
+ return this._init( element, options );
}
+ /** html5 data key to store this object inside an element */
ModeButton.prototype.DATA_KEY = 'mode-button';
+ /** default options */
ModeButton.prototype.defaults = {
- modes : [
- { mode: 'default' }
- ]
+ switchModesOnClick : true
};
- ModeButton.prototype.init = function _init( element, options ){
+ // ---- private interface
+ /** set up options, intial mode, and the click handler */
+ ModeButton.prototype._init = function _init( element, options ){
+ //console.debug( 'ModeButton._init:', element, options );
options = options || {};
this.$element = $( element );
this.options = jQuery.extend( true, {}, this.defaults, options );
+ if( !options.modes ){
+ throw new Error( 'ModeButton requires a "modes" array' );
+ }
var modeButton = this;
this.$element.click( function _ModeButtonClick( event ){
-
// call the curr mode fn
modeButton.callModeFn();
// inc the curr mode index
- modeButton._incModeIndex();
+ if( modeButton.options.switchModesOnClick ){ modeButton._incModeIndex(); }
// set the element html
$( this ).html( modeButton.options.modes[ modeButton.currModeIndex ].html );
});
-
- this.currModeIndex = 0;
- if( this.options.initialMode ){
- this.currModeIndex = this._getModeIndex( this.options.initialMode );
- }
- return this;
+ return this.reset();
};
-
-
- ModeButton.prototype._getModeIndex = function __getModeIndex( modeKey ){
- for( var i=0; i<this.options.modes.length; i+=1 ){
- if( this.options.modes[ i ].mode === modeKey ){ return i; }
- }
- throw new Error( 'mode not found: ' + modeKey );
- };
- ModeButton.prototype.getCurrMode = function _getCurrMode(){
- return this.options.modes[ this.currModeIndex ];
- };
- ModeButton.prototype.getMode = function _getMode( modeKey ){
- if( !modeKey ){ return this.getCurrMode(); }
- return this.options.modes[( this._getModeIndex( modeKey ) )];
- };
- ModeButton.prototype.hasMode = function _hasMode( modeKey ){
- return !!this.getMode( modeKey );
- };
- ModeButton.prototype.currentMode = function _currentMode(){
- return this.options.modes[ this.currModeIndex ];
- };
- ModeButton.prototype.setMode = function _setMode( newModeKey ){
- var newMode = this.getMode( newModeKey );
- this.$element.html( newMode.html || null );
- return this;
- };
- ModeButton.prototype._incModeIndex = function __incModeIndex(){
+ /** increment the mode index to the next in the array, looping back to zero if at the last */
+ ModeButton.prototype._incModeIndex = function _incModeIndex(){
this.currModeIndex += 1;
if( this.currModeIndex >= this.options.modes.length ){
this.currModeIndex = 0;
}
return this;
};
- ModeButton.prototype.callModeFn = function _callModeFn( modeKey ){
+ /** get the mode index in the modes array for the given key (mode name) */
+ ModeButton.prototype._getModeIndex = function _getModeIndex( modeKey ){
+ for( var i=0; i<this.options.modes.length; i+=1 ){
+ if( this.options.modes[ i ].mode === modeKey ){ return i; }
+ }
+ throw new Error( 'mode not found: ' + modeKey );
+ };
+ /** set the current mode to the one with the given index and set button html */
+ ModeButton.prototype._setModeByIndex = function _setModeByIndex( index ){
+ var newMode = this.options.modes[ index ];
+ if( !newMode ){
+ throw new Error( 'mode index not found: ' + index );
+ }
+ this.currModeIndex = index;
+ if( newMode.html ){
+ this.$element.html( newMode.html );
+ }
+ return this;
+ };
+
+ // ---- public interface
+ /** get the current mode object (not just the mode name) */
+ ModeButton.prototype.currentMode = function currentMode(){
+ return this.options.modes[ this.currModeIndex ];
+ };
+ /** return the mode key of the current mode */
+ ModeButton.prototype.current = function current(){
+ // sugar for returning mode name
+ return this.currentMode().mode;
+ };
+ /** get the mode with the given modeKey or the current mode if modeKey is undefined */
+ ModeButton.prototype.getMode = function getMode( modeKey ){
+ if( !modeKey ){ return this.currentMode(); }
+ return this.options.modes[( this._getModeIndex( modeKey ) )];
+ };
+ /** T/F if the button has the given mode */
+ ModeButton.prototype.hasMode = function hasMode( modeKey ){
+ try {
+ return !!this.getMode( modeKey );
+ } catch( err ){}
+ return false;
+ };
+ /** set the current mode to the mode with the given name */
+ ModeButton.prototype.setMode = function setMode( modeKey ){
+ return this._setModeByIndex( this._getModeIndex( modeKey ) );
+ };
+ /** reset to the initial mode */
+ ModeButton.prototype.reset = function reset(){
+ this.currModeIndex = 0;
+ if( this.options.initialMode ){
+ this.currModeIndex = this._getModeIndex( this.options.initialMode );
+ }
+ return this._setModeByIndex( this.currModeIndex );
+ };
+ /** manually call the click handler of the given mode */
+ ModeButton.prototype.callModeFn = function callModeFn( modeKey ){
var modeFn = this.getMode( modeKey ).onclick;
if( modeFn && jQuery.type( modeFn === 'function' ) ){
- return modeFn.call( this );
+ // call with the element as context (std jquery pattern)
+ modeFn.call( this.$element.get(0) );
+ return this;
}
return undefined;
};
@@ -861,26 +894,32 @@
// as jq plugin
jQuery.fn.extend({
modeButton : function $modeButton( options ){
- var nonOptionsArgs = jQuery.makeArray( arguments ).slice( 1 );
+ if( !this.size() ){ return this; }
+
//TODO: does map still work with jq multi selection (i.e. $( '.class-for-many-btns' ).modeButton)?
- return this.map( function(){
- var $this = $( this ),
- data = $this.data( 'mode-button' );
+ if( jQuery.type( options ) === 'object' ){
+ return this.map( function(){
+ var $this = $( this );
+ $this.data( 'mode-button', new ModeButton( $this, options ) );
+ return this;
+ });
+ }
- if( jQuery.type( options ) === 'object' ){
- data = new ModeButton( $this, options );
- $this.data( 'mode-button', data );
+ var $first = $( this[0] ),
+ button = $first.data( 'mode-button' );
+ console.debug( 'first, button', $first, button );
- } else if( data && jQuery.type( options ) === 'string' ){
- var fn = data[ options ];
- if( jQuery.type( fn ) === 'function' ){
- return fn.apply( data, nonOptionsArgs );
- }
- } else if ( data ){
- return data;
+ if( !button ){
+ throw new Error( 'modeButton needs an options object or string name of a function' );
+ }
+
+ if( button && jQuery.type( options ) === 'string' ){
+ var fnName = options;
+ if( button && jQuery.type( button[ fnName ] ) === 'function' ){
+ return button[ fnName ].apply( button, jQuery.makeArray( arguments ).slice( 1 ) );
}
- return this;
- });
+ }
+ return button;
}
});
}());
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 7ebec9da47844efbf37942faab3809cb0169e5c2 static/scripts/packed/mvc/ui.js
--- a/static/scripts/packed/mvc/ui.js
+++ b/static/scripts/packed/mvc/ui.js
@@ -1,1 +1,1 @@
-var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b;if(!this.$button.size()){this.$button=$("<div/>")}this.options=a||[];var c=this;this.$button.click(function(d){$(".popmenu-wrapper").remove();c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body").css(this._getShownPosition(a)).show();this._setUpCloseBehavior()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var c=this;function a(e){$(document).off("click.close_popup");if(window.parent!==window){try{$(window.parent.document).off("click.close_popup")}catch(d){}}else{try{$("iframe#galaxy_main").contents().off("click.close_popup")}catch(d){}}c.remove()}$("html").one("click.close_popup",a);if(window.parent!==window){try{$(window.parent.document).find("html").one("click.close_popup",a)}catch(b){}}else{try{$("iframe#galaxy_main").contents().one("click.close_popup",a)}catch(b){}}},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.create=function _create(b,a){return new PopupMenu(b,a)};PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((!a.disabled&&a.target)?(' target="'+a.target+'"'):("")),' href="',((!a.disabled&&a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b}(function(){function a(j,p){var d=27,m=13,c=$(j),e=true,g={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(q){},minSearchLen:0,escWillClear:true,oninit:function(){}};function i(q){var r=$(this).parent().children("input");r.val("");r.trigger("clear:searchInput");p.onclear()}function o(r,q){$(this).trigger("search:searchInput",q);if(typeof p.onfirstsearch==="function"&&e){e=false;p.onfirstsearch(q)}else{p.onsearch(q)}}function f(){return['<input type="text" name="',p.name,'" placeholder="',p.placeholder,'" ','class="search-query ',p.classes,'" ',"/>"].join("")}function l(){return $(f()).focus(function(q){$(this).select()}).keyup(function(r){if(r.which===d&&p.escWillClear){i.call(this,r)}else{var q=$(this).val();if((r.which===m)||(p.minSearchLen&&q.length>=p.minSearchLen)){o.call(this,r,q)}else{if(!q.length){i.call(this,r)}}}}).val(p.initialVal)}function k(){return $(['<span class="search-clear fa fa-times-circle" ','title="',_l("clear search (esc)"),'"></span>'].join("")).tooltip({placement:"bottom"}).click(function(q){i.call(this,q)})}function n(){return $(['<span class="search-loading fa fa-spinner fa-spin" ','title="',_l("loading..."),'"></span>'].join("")).hide().tooltip({placement:"bottom"})}function h(){c.find(".search-loading").toggle();c.find(".search-clear").toggle()}if(jQuery.type(p)==="string"){if(p==="toggle-loading"){h()}return c}if(jQuery.type(p)==="object"){p=jQuery.extend(true,{},g,p)}return c.addClass("search-input").prepend([l(),k(),n()])}jQuery.fn.extend({searchInput:function b(c){return this.each(function(){return a(this,c)})}})}());(function(){function b(m,l){this.currModeIndex=0;return this.init(m,l)}b.prototype.DATA_KEY="mode-button";b.prototype.defaults={modes:[{mode:"default"}]};b.prototype.init=function f(m,l){l=l||{};this.$element=$(m);this.options=jQuery.extend(true,{},this.defaults,l);var o=this;this.$element.click(function n(p){o.callModeFn();o._incModeIndex();$(this).html(o.options.modes[o.currModeIndex].html)});this.currModeIndex=0;if(this.options.initialMode){this.currModeIndex=this._getModeIndex(this.options.initialMode)}return this};b.prototype._getModeIndex=function j(l){for(var m=0;m<this.options.modes.length;m+=1){if(this.options.modes[m].mode===l){return m}}throw new Error("mode not found: "+l)};b.prototype.getCurrMode=function a(){return this.options.modes[this.currModeIndex]};b.prototype.getMode=function g(l){if(!l){return this.getCurrMode()}return this.options.modes[(this._getModeIndex(l))]};b.prototype.hasMode=function k(l){return !!this.getMode(l)};b.prototype.currentMode=function e(){return this.options.modes[this.currModeIndex]};b.prototype.setMode=function c(m){var l=this.getMode(m);this.$element.html(l.html||null);return this};b.prototype._incModeIndex=function d(){this.currModeIndex+=1;if(this.currModeIndex>=this.options.modes.length){this.currModeIndex=0}return this};b.prototype.callModeFn=function h(l){var m=this.getMode(l).onclick;if(m&&jQuery.type(m==="function")){return m.call(this)}return undefined};jQuery.fn.extend({modeButton:function i(m){var l=jQuery.makeArray(arguments).slice(1);return this.map(function(){var p=$(this),o=p.data("mode-button");if(jQuery.type(m)==="object"){o=new b(p,m);p.data("mode-button",o)}else{if(o&&jQuery.type(m)==="string"){var n=o[m];if(jQuery.type(n)==="function"){return n.apply(o,l)}}else{if(o){return o}}}return this})}})}());function dropDownSelect(b,c){c=c||((!_.isEmpty(b))?(b[0]):(""));var a=$(['<div class="dropdown-select btn-group">','<button type="button" class="btn btn-default">','<span class="dropdown-select-selected">'+c+"</span>","</button>","</div>"].join("\n"));if(b&&b.length>1){a.find("button").addClass("dropdown-toggle").attr("data-toggle","dropdown").append(' <span class="caret"></span>');a.append(['<ul class="dropdown-menu" role="menu">',_.map(b,function(e){return['<li><a href="javascript:void(0)">',e,"</a></li>"].join("")}).join("\n"),"</ul>"].join("\n"))}function d(g){var h=$(this),f=h.parents(".dropdown-select"),e=h.text();f.find(".dropdown-select-selected").text(e);f.trigger("change.dropdown-select",e)}a.find("a").click(d);return a}(function(){function e(k,j){return this.init(k,j)}e.prototype.DATA_KEY="filter-control";e.prototype.init=function g(k,j){j=j||{filters:[]};this.$element=$(k).addClass("filter-control btn-group");this.options=jQuery.extend(true,{},this.defaults,j);this.currFilter=this.options.filters[0];return this.render()};e.prototype.render=function d(){this.$element.empty().append([this._renderKeySelect(),this._renderOpSelect(),this._renderValueInput()]);return this};e.prototype._renderKeySelect=function a(){var j=this;var k=this.options.filters.map(function(l){return l.key});this.$keySelect=dropDownSelect(k,this.currFilter.key).addClass("filter-control-key").on("change.dropdown-select",function(m,l){j.currFilter=_.findWhere(j.options.filters,{key:l});j.render()._triggerChange()});return this.$keySelect};e.prototype._renderOpSelect=function i(){var j=this,k=this.currFilter.ops;this.$opSelect=dropDownSelect(k,k[0]).addClass("filter-control-op").on("change.dropdown-select",function(m,l){j._triggerChange()});return this.$opSelect};e.prototype._renderValueInput=function c(){var j=this;if(this.currFilter.values){this.$valueSelect=dropDownSelect(this.currFilter.values,this.currFilter.values[0]).on("change.dropdown-select",function(l,k){j._triggerChange()})}else{this.$valueSelect=$("<input/>").addClass("form-control").on("change",function(k,l){j._triggerChange()})}this.$valueSelect.addClass("filter-control-value");return this.$valueSelect};e.prototype.val=function b(){var k=this.$element.find(".filter-control-key .dropdown-select-selected").text(),m=this.$element.find(".filter-control-op .dropdown-select-selected").text(),j=this.$element.find(".filter-control-value"),l=(j.hasClass("dropdown-select"))?(j.find(".dropdown-select-selected").text()):(j.val());return{key:k,op:m,value:l}};e.prototype._triggerChange=function h(){this.$element.trigger("change.filter-control",this.val())};jQuery.fn.extend({filterControl:function f(k){var j=jQuery.makeArray(arguments).slice(1);return this.map(function(){var n=$(this),m=n.data(e.prototype.DATA_KEY);if(jQuery.type(k)==="object"){m=new e(n,k);n.data(e.prototype.DATA_KEY,m)}if(m&&jQuery.type(k)==="string"){var l=m[k];if(jQuery.type(l)==="function"){return l.apply(m,j)}}return this})}})}());(function(){function i(o,n){this.numPages=null;this.currPage=0;return this.init(o,n)}i.prototype.DATA_KEY="pagination";i.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null};i.prototype.init=function g(n,o){o=o||{};this.$element=n;this.options=jQuery.extend(true,{},this.defaults,o);this.currPage=this.options.startingPage;if(this.options.totalDataSize!==null){this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage);if(this.currPage>=this.numPages){this.currPage=this.numPages-1}}this.$element.data(i.prototype.DATA_KEY,this);this._render();return this};function m(n){return $(['<li><a href="javascript:void(0);">',n,"</a></li>"].join(""))}i.prototype._render=function e(){if(this.options.totalDataSize===0){return this}if(this.numPages===1){return this}if(this.numPages>0){this._renderPages();this._scrollToActivePage()}else{this._renderPrevNext()}return this};i.prototype._renderPrevNext=function b(){var o=this,p=m("Prev"),n=m("Next"),q=$("<ul/>").addClass("pagination pagination-prev-next");if(this.currPage===0){p.addClass("disabled")}else{p.click(function(){o.prevPage()})}if((this.numPages&&this.currPage===(this.numPages-1))||(this.options.currDataSize&&this.options.currDataSize<this.options.perPage)){n.addClass("disabled")}else{n.click(function(){o.nextPage()})}this.$element.html(q.append([p,n]));return this.$element};i.prototype._renderPages=function a(){var n=this,q=$("<div>").addClass("pagination-scroll-container"),s=$("<ul/>").addClass("pagination pagination-page-list"),r=function(t){n.goToPage($(this).data("page"))};for(var o=0;o<this.numPages;o+=1){var p=m(o+1).attr("data-page",o).click(r);if(o===this.currPage){p.addClass("active")}s.append(p)}return this.$element.html(q.html(s))};i.prototype._scrollToActivePage=function l(){var p=this.$element.find(".pagination-scroll-container");if(!p.size()){return this}var o=this.$element.find("li.active"),n=p.width()/2;p.scrollLeft(p.scrollLeft()+o.position().left-n);return this};i.prototype.goToPage=function j(n){if(n<=0){n=0}if(this.numPages&&n>=this.numPages){n=this.numPages-1}if(n===this.currPage){return this}this.currPage=n;this.$element.trigger("pagination.page-change",this.currPage);this._render();return this};i.prototype.prevPage=function c(){return this.goToPage(this.currPage-1)};i.prototype.nextPage=function h(){return this.goToPage(this.currPage+1)};i.prototype.page=function f(){return this.currPage};i.create=function k(n,o){return new i(n,o)};jQuery.fn.extend({pagination:function d(o){var n=jQuery.makeArray(arguments).slice(1);if(jQuery.type(o)==="object"){return this.map(function(){i.create($(this),o);return this})}var q=$(this[0]),r=q.data(i.prototype.DATA_KEY);if(r){if(jQuery.type(o)==="string"){var p=r[o];if(jQuery.type(p)==="function"){return p.apply(r,n)}}else{return r}}return undefined}})}());(function(){var g={renameColumns:false,columnNames:[],commentChar:"#",hideCommentRows:false,includePrompts:true,topLeftContent:"Columns:"},s="peek-control.change",t="peek-control.rename",l="peek-control",v="control",f="control-prompt",c="selected",n="disabled",u="button",q="renamable-header",p="column-index",a="column-name";function i(w){if(w.disabled&&jQuery.type(w.disabled)!=="array"){throw new Error('"disabled" must be defined as an array of indeces: '+JSON.stringify(w))}if(w.multiselect&&w.selected&&jQuery.type(w.selected)!=="array"){throw new Error('Mulitselect rows need an array for "selected": '+JSON.stringify(w))}if(!w.label||!w.id){throw new Error("Peek controls need a label and id for each control row: "+JSON.stringify(w))}if(w.disabled&&w.disabled.indexOf(w.selected)!==-1){throw new Error("Selected column is in the list of disabled columns: "+JSON.stringify(w))}return w}function o(x,w){return $("<div/>").addClass(u).text(x.label)}function k(x,w){var y=$("<td/>").html(o(x,w)).attr("data-"+p,w);if(x.disabled&&x.disabled.indexOf(w)!==-1){y.addClass(n)}return y}function e(y,z,w){var x=y.children("."+u);if(y.hasClass(c)){x.html((z.selectedText!==undefined)?(z.selectedText):(z.label))}else{x.html((z.unselectedText!==undefined)?(z.unselectedText):(z.label))}}function h(z,x){var y=k(z,x);if(z.selected===x){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);if(!E.hasClass(c)){var A=E.parent().children("."+c).removeClass(c);A.each(function(){e($(this),z,x)});E.addClass(c);e(E,z,x);var C={},B=E.parent().attr("id"),F=E.data(p);C[B]=F;E.parents(".peek").trigger(s,C)}})}return y}function m(z,x){var y=k(z,x);if(z.selected&&z.selected.indexOf(x)!==-1){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);E.toggleClass(c);e(E,z,x);var C=E.parent().find("."+c).map(function(G,H){return $(H).data(p)});var B={},A=E.parent().attr("id"),F=jQuery.makeArray(C);B[A]=F;E.parents(".peek").trigger(s,B)})}return y}function j(y,z){var w=[];for(var x=0;x<y;x+=1){w.push(z.multiselect?m(z,x):h(z,x))}return w}function r(y,z,x){var A=$("<tr/>").attr("id",z.id).addClass(v);if(x){var w=$("<td/>").addClass(f).text(z.label+":");A.append(w)}A.append(j(y,z));return A}function b(E){E=jQuery.extend(true,{},g,E);var D=$(this).addClass(l),A=D.find("table"),z=A.find("th").size(),C=A.find("tr").size(),w=A.find("td[colspan]").map(function(H,F){var G=$(this);if(G.text()&&G.text().match(new RegExp("^"+E.commentChar))){return $(this).css("color","grey").parent().get(0)}return null});if(E.hideCommentRows){w.hide();C-=w.size()}if(E.includePrompts){var y=$("<th/>").addClass("top-left").text(E.topLeftContent).attr("rowspan",C);A.find("tr").first().prepend(y)}var B=A.find("th:not(.top-left)").each(function(G,I){var H=$(this),J=H.text().replace(/^\d+\.*/,""),F=E.columnNames[G]||J;H.attr("data-"+a,F).text((G+1)+((F)?("."+F):("")))});if(E.renameColumns){B.addClass(q).click(function x(){var G=$(this),F=G.index()+(E.includePrompts?0:1),I=G.data(a),H=prompt("New column name:",I);if(H!==null&&H!==I){G.text(F+(H?("."+H):"")).data(a,H).attr("data-",a,H);var J=jQuery.makeArray(G.parent().children("th:not(.top-left)").map(function(){return $(this).data(a)}));G.parents(".peek").trigger(t,J)}})}E.controls.forEach(function(G,F){i(G);var H=r(z,G,E.includePrompts);A.find("tbody").append(H)});return this}jQuery.fn.extend({peekControl:function d(w){return this.map(function(){return b.call(this,w)})}})}());
\ No newline at end of file
+var IconButton=Backbone.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:true,id:null,href:null,target:null,enabled:true,visible:true,tooltip_config:{}}});var IconButtonView=Backbone.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"};this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var a=this.template(this.model.toJSON());a.tooltip(this.model.get("tooltip_config"));this.$el.replaceWith(a);this.setElement(a);return this},events:{click:"click"},click:function(a){if(_.isFunction(this.model.get("on_click"))){this.model.get("on_click")(a);return false}return true},template:function(b){var a='title="'+b.title+'" class="icon-button';if(b.is_menu_button){a+=" menu-button"}a+=" "+b.icon_class;if(!b.enabled){a+="_disabled"}a+='"';if(b.id){a+=' id="'+b.id+'"'}a+=' href="'+b.href+'"';if(b.target){a+=' target="'+b.target+'"'}if(!b.visible){a+=' style="display: none;"'}if(b.enabled){a="<a "+a+"/>"}else{a="<span "+a+"/>"}return $(a)}});var IconButtonCollection=Backbone.Collection.extend({model:IconButton});var IconButtonMenuView=Backbone.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var a=this;this.collection.each(function(d){var b=$("<a/>").attr("href","javascript:void(0)").attr("title",d.attributes.title).addClass("icon-button menu-button").addClass(d.attributes.icon_class).appendTo(a.$el).click(d.attributes.on_click);if(d.attributes.tooltip_config){b.tooltip(d.attributes.tooltip_config)}var c=d.get("options");if(c){make_popupmenu(b,c)}});return this}});var create_icon_buttons_menu=function(b,a){if(!a){a={}}var c=new IconButtonCollection(_.map(b,function(d){return new IconButton(_.extend(d,a))}));return new IconButtonMenuView({collection:c})};var Grid=Backbone.Collection.extend({});var GridView=Backbone.View.extend({});var PopupMenu=Backbone.View.extend({initialize:function(b,a){this.$button=b;if(!this.$button.size()){this.$button=$("<div/>")}this.options=a||[];var c=this;this.$button.click(function(d){$(".popmenu-wrapper").remove();c._renderAndShow(d);return false})},_renderAndShow:function(a){this.render();this.$el.appendTo("body").css(this._getShownPosition(a)).show();this._setUpCloseBehavior()},render:function(){this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options));if(this.options.length){var a=this;this.$el.find("li").each(function(c,b){var d=a.options[c];if(d.func){$(this).children("a.popupmenu-option").click(function(e){d.func.call(a,e,d)})}})}return this},template:function(b,a){return['<ul id="',b,'-menu" class="dropdown-menu">',this._templateOptions(a),"</ul>"].join("")},_templateOptions:function(a){if(!a.length){return"<li>(no options)</li>"}return _.map(a,function(d){if(d.divider){return'<li class="divider"></li>'}else{if(d.header){return['<li class="head"><a href="javascript:void(0);">',d.html,"</a></li>"].join("")}}var c=d.href||"javascript:void(0);",e=(d.target)?(' target="'+d.target+'"'):(""),b=(d.checked)?('<span class="fa fa-check"></span>'):("");return['<li><a class="popupmenu-option" href="',c,'"',e,">",b,d.html,"</a></li>"].join("")}).join("")},_getShownPosition:function(b){var c=this.$el.width();var a=b.pageX-c/2;a=Math.min(a,$(document).scrollLeft()+$(window).width()-c-5);a=Math.max(a,$(document).scrollLeft()+5);return{top:b.pageY,left:a}},_setUpCloseBehavior:function(){var c=this;function a(e){$(document).off("click.close_popup");if(window.parent!==window){try{$(window.parent.document).off("click.close_popup")}catch(d){}}else{try{$("iframe#galaxy_main").contents().off("click.close_popup")}catch(d){}}c.remove()}$("html").one("click.close_popup",a);if(window.parent!==window){try{$(window.parent.document).find("html").one("click.close_popup",a)}catch(b){}}else{try{$("iframe#galaxy_main").contents().one("click.close_popup",a)}catch(b){}}},addItem:function(b,a){a=(a>=0)?a:this.options.length;this.options.splice(a,0,b);return this},removeItem:function(a){if(a>=0){this.options.splice(a,1)}return this},findIndexByHtml:function(b){for(var a=0;a<this.options.length;a++){if(_.has(this.options[a],"html")&&(this.options[a].html===b)){return a}}return null},findItemByHtml:function(a){return this.options[(this.findIndexByHtml(a))]},toString:function(){return"PopupMenu"}});PopupMenu.create=function _create(b,a){return new PopupMenu(b,a)};PopupMenu.make_popupmenu=function(b,c){var a=[];_.each(c,function(f,d){var e={html:d};if(f===null){e.header=true}else{if(jQuery.type(f)==="function"){e.func=f}}a.push(e)});return new PopupMenu($(b),a)};PopupMenu.convertLinksToOptions=function(c,a){c=$(c);a=a||"a";var b=[];c.find(a).each(function(g,e){var f={},d=$(g);f.html=d.text();if(d.attr("href")){var j=d.attr("href"),k=d.attr("target"),h=d.attr("confirm");f.func=function(){if((h)&&(!confirm(h))){return}switch(k){case"_parent":window.parent.location=j;break;case"_top":window.top.location=j;break;default:window.location=j}}}b.push(f)});return b};PopupMenu.fromExistingDom=function(d,c,a){d=$(d);c=$(c);var b=PopupMenu.convertLinksToOptions(c,a);c.remove();return new PopupMenu(d,b)};PopupMenu.make_popup_menus=function(c,b,d){c=c||document;b=b||"div[popupmenu]";d=d||function(e,f){return"#"+e.attr("popupmenu")};var a=[];$(c).find(b).each(function(){var e=$(this),f=$(c).find(d(e,c));a.push(PopupMenu.fromDom(f,e));f.addClass("popup")});return a};var faIconButton=function(a){a=a||{};a.tooltipConfig=a.tooltipConfig||{placement:"bottom"};a.classes=["icon-btn"].concat(a.classes||[]);if(a.disabled){a.classes.push("disabled")}var b=['<a class="',a.classes.join(" "),'"',((a.title)?(' title="'+a.title+'"'):("")),((!a.disabled&&a.target)?(' target="'+a.target+'"'):("")),' href="',((!a.disabled&&a.href)?(a.href):("javascript:void(0);")),'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join("");var c=$(b).tooltip(a.tooltipConfig);if(_.isFunction(a.onclick)){c.click(a.onclick)}return c};function LoadingIndicator(a,c){var b=this;c=jQuery.extend({cover:false},c||{});function d(){var e=['<div class="loading-indicator">','<div class="loading-indicator-text">','<span class="fa fa-spinner fa-spin fa-lg"></span>','<span class="loading-indicator-message">loading...</span>',"</div>","</div>"].join("\n");var g=$(e).hide().css(c.css||{position:"fixed"}),f=g.children(".loading-indicator-text");if(c.cover){g.css({"z-index":2,top:a.css("top"),bottom:a.css("bottom"),left:a.css("left"),right:a.css("right"),opacity:0.5,"background-color":"white","text-align":"center"});f=g.children(".loading-indicator-text").css({"margin-top":"20px"})}else{f=g.children(".loading-indicator-text").css({margin:"12px 0px 0px 10px",opacity:"0.85",color:"grey"});f.children(".loading-indicator-message").css({margin:"0px 8px 0px 0px","font-style":"italic"})}return g}b.show=function(f,e,g){f=f||"loading...";e=e||"fast";b.$indicator=d().insertBefore(a);b.message(f);b.$indicator.fadeIn(e,g);return b};b.message=function(e){b.$indicator.find("i").text(e)};b.hide=function(e,f){e=e||"fast";if(b.$indicator&&b.$indicator.size()){b.$indicator.fadeOut(e,function(){b.$indicator.remove();if(f){f()}})}else{if(f){f()}}return b};return b}(function(){function a(j,p){var d=27,m=13,c=$(j),e=true,g={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(q){},minSearchLen:0,escWillClear:true,oninit:function(){}};function i(q){var r=$(this).parent().children("input");r.val("");r.trigger("clear:searchInput");p.onclear()}function o(r,q){$(this).trigger("search:searchInput",q);if(typeof p.onfirstsearch==="function"&&e){e=false;p.onfirstsearch(q)}else{p.onsearch(q)}}function f(){return['<input type="text" name="',p.name,'" placeholder="',p.placeholder,'" ','class="search-query ',p.classes,'" ',"/>"].join("")}function l(){return $(f()).focus(function(q){$(this).select()}).keyup(function(r){if(r.which===d&&p.escWillClear){i.call(this,r)}else{var q=$(this).val();if((r.which===m)||(p.minSearchLen&&q.length>=p.minSearchLen)){o.call(this,r,q)}else{if(!q.length){i.call(this,r)}}}}).val(p.initialVal)}function k(){return $(['<span class="search-clear fa fa-times-circle" ','title="',_l("clear search (esc)"),'"></span>'].join("")).tooltip({placement:"bottom"}).click(function(q){i.call(this,q)})}function n(){return $(['<span class="search-loading fa fa-spinner fa-spin" ','title="',_l("loading..."),'"></span>'].join("")).hide().tooltip({placement:"bottom"})}function h(){c.find(".search-loading").toggle();c.find(".search-clear").toggle()}if(jQuery.type(p)==="string"){if(p==="toggle-loading"){h()}return c}if(jQuery.type(p)==="object"){p=jQuery.extend(true,{},g,p)}return c.addClass("search-input").prepend([l(),k(),n()])}jQuery.fn.extend({searchInput:function b(c){return this.each(function(){return a(this,c)})}})}());(function(){function c(o,n){this.currModeIndex=0;return this._init(o,n)}c.prototype.DATA_KEY="mode-button";c.prototype.defaults={switchModesOnClick:true};c.prototype._init=function j(o,n){n=n||{};this.$element=$(o);this.options=jQuery.extend(true,{},this.defaults,n);if(!n.modes){throw new Error('ModeButton requires a "modes" array')}var q=this;this.$element.click(function p(r){q.callModeFn();if(q.options.switchModesOnClick){q._incModeIndex()}$(this).html(q.options.modes[q.currModeIndex].html)});return this.reset()};c.prototype._incModeIndex=function l(){this.currModeIndex+=1;if(this.currModeIndex>=this.options.modes.length){this.currModeIndex=0}return this};c.prototype._getModeIndex=function f(n){for(var o=0;o<this.options.modes.length;o+=1){if(this.options.modes[o].mode===n){return o}}throw new Error("mode not found: "+n)};c.prototype._setModeByIndex=function m(n){var o=this.options.modes[n];if(!o){throw new Error("mode index not found: "+n)}this.currModeIndex=n;if(o.html){this.$element.html(o.html)}return this};c.prototype.currentMode=function d(){return this.options.modes[this.currModeIndex]};c.prototype.current=function i(){return this.currentMode().mode};c.prototype.getMode=function g(n){if(!n){return this.currentMode()}return this.options.modes[(this._getModeIndex(n))]};c.prototype.hasMode=function b(n){try{return !!this.getMode(n)}catch(o){}return false};c.prototype.setMode=function a(n){return this._setModeByIndex(this._getModeIndex(n))};c.prototype.reset=function h(){this.currModeIndex=0;if(this.options.initialMode){this.currModeIndex=this._getModeIndex(this.options.initialMode)}return this._setModeByIndex(this.currModeIndex)};c.prototype.callModeFn=function e(n){var o=this.getMode(n).onclick;if(o&&jQuery.type(o==="function")){o.call(this.$element.get(0));return this}return undefined};jQuery.fn.extend({modeButton:function k(n){if(!this.size()){return this}if(jQuery.type(n)==="object"){return this.map(function(){var r=$(this);r.data("mode-button",new c(r,n));return this})}var p=$(this[0]),o=p.data("mode-button");console.debug("first, button",p,o);if(!o){throw new Error("modeButton needs an options object or string name of a function")}if(o&&jQuery.type(n)==="string"){var q=n;if(o&&jQuery.type(o[q])==="function"){return o[q].apply(o,jQuery.makeArray(arguments).slice(1))}}return o}})}());function dropDownSelect(b,c){c=c||((!_.isEmpty(b))?(b[0]):(""));var a=$(['<div class="dropdown-select btn-group">','<button type="button" class="btn btn-default">','<span class="dropdown-select-selected">'+c+"</span>","</button>","</div>"].join("\n"));if(b&&b.length>1){a.find("button").addClass("dropdown-toggle").attr("data-toggle","dropdown").append(' <span class="caret"></span>');a.append(['<ul class="dropdown-menu" role="menu">',_.map(b,function(e){return['<li><a href="javascript:void(0)">',e,"</a></li>"].join("")}).join("\n"),"</ul>"].join("\n"))}function d(g){var h=$(this),f=h.parents(".dropdown-select"),e=h.text();f.find(".dropdown-select-selected").text(e);f.trigger("change.dropdown-select",e)}a.find("a").click(d);return a}(function(){function e(k,j){return this.init(k,j)}e.prototype.DATA_KEY="filter-control";e.prototype.init=function g(k,j){j=j||{filters:[]};this.$element=$(k).addClass("filter-control btn-group");this.options=jQuery.extend(true,{},this.defaults,j);this.currFilter=this.options.filters[0];return this.render()};e.prototype.render=function d(){this.$element.empty().append([this._renderKeySelect(),this._renderOpSelect(),this._renderValueInput()]);return this};e.prototype._renderKeySelect=function a(){var j=this;var k=this.options.filters.map(function(l){return l.key});this.$keySelect=dropDownSelect(k,this.currFilter.key).addClass("filter-control-key").on("change.dropdown-select",function(m,l){j.currFilter=_.findWhere(j.options.filters,{key:l});j.render()._triggerChange()});return this.$keySelect};e.prototype._renderOpSelect=function i(){var j=this,k=this.currFilter.ops;this.$opSelect=dropDownSelect(k,k[0]).addClass("filter-control-op").on("change.dropdown-select",function(m,l){j._triggerChange()});return this.$opSelect};e.prototype._renderValueInput=function c(){var j=this;if(this.currFilter.values){this.$valueSelect=dropDownSelect(this.currFilter.values,this.currFilter.values[0]).on("change.dropdown-select",function(l,k){j._triggerChange()})}else{this.$valueSelect=$("<input/>").addClass("form-control").on("change",function(k,l){j._triggerChange()})}this.$valueSelect.addClass("filter-control-value");return this.$valueSelect};e.prototype.val=function b(){var k=this.$element.find(".filter-control-key .dropdown-select-selected").text(),m=this.$element.find(".filter-control-op .dropdown-select-selected").text(),j=this.$element.find(".filter-control-value"),l=(j.hasClass("dropdown-select"))?(j.find(".dropdown-select-selected").text()):(j.val());return{key:k,op:m,value:l}};e.prototype._triggerChange=function h(){this.$element.trigger("change.filter-control",this.val())};jQuery.fn.extend({filterControl:function f(k){var j=jQuery.makeArray(arguments).slice(1);return this.map(function(){var n=$(this),m=n.data(e.prototype.DATA_KEY);if(jQuery.type(k)==="object"){m=new e(n,k);n.data(e.prototype.DATA_KEY,m)}if(m&&jQuery.type(k)==="string"){var l=m[k];if(jQuery.type(l)==="function"){return l.apply(m,j)}}return this})}})}());(function(){function i(o,n){this.numPages=null;this.currPage=0;return this.init(o,n)}i.prototype.DATA_KEY="pagination";i.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null};i.prototype.init=function g(n,o){o=o||{};this.$element=n;this.options=jQuery.extend(true,{},this.defaults,o);this.currPage=this.options.startingPage;if(this.options.totalDataSize!==null){this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage);if(this.currPage>=this.numPages){this.currPage=this.numPages-1}}this.$element.data(i.prototype.DATA_KEY,this);this._render();return this};function m(n){return $(['<li><a href="javascript:void(0);">',n,"</a></li>"].join(""))}i.prototype._render=function e(){if(this.options.totalDataSize===0){return this}if(this.numPages===1){return this}if(this.numPages>0){this._renderPages();this._scrollToActivePage()}else{this._renderPrevNext()}return this};i.prototype._renderPrevNext=function b(){var o=this,p=m("Prev"),n=m("Next"),q=$("<ul/>").addClass("pagination pagination-prev-next");if(this.currPage===0){p.addClass("disabled")}else{p.click(function(){o.prevPage()})}if((this.numPages&&this.currPage===(this.numPages-1))||(this.options.currDataSize&&this.options.currDataSize<this.options.perPage)){n.addClass("disabled")}else{n.click(function(){o.nextPage()})}this.$element.html(q.append([p,n]));return this.$element};i.prototype._renderPages=function a(){var n=this,q=$("<div>").addClass("pagination-scroll-container"),s=$("<ul/>").addClass("pagination pagination-page-list"),r=function(t){n.goToPage($(this).data("page"))};for(var o=0;o<this.numPages;o+=1){var p=m(o+1).attr("data-page",o).click(r);if(o===this.currPage){p.addClass("active")}s.append(p)}return this.$element.html(q.html(s))};i.prototype._scrollToActivePage=function l(){var p=this.$element.find(".pagination-scroll-container");if(!p.size()){return this}var o=this.$element.find("li.active"),n=p.width()/2;p.scrollLeft(p.scrollLeft()+o.position().left-n);return this};i.prototype.goToPage=function j(n){if(n<=0){n=0}if(this.numPages&&n>=this.numPages){n=this.numPages-1}if(n===this.currPage){return this}this.currPage=n;this.$element.trigger("pagination.page-change",this.currPage);this._render();return this};i.prototype.prevPage=function c(){return this.goToPage(this.currPage-1)};i.prototype.nextPage=function h(){return this.goToPage(this.currPage+1)};i.prototype.page=function f(){return this.currPage};i.create=function k(n,o){return new i(n,o)};jQuery.fn.extend({pagination:function d(o){var n=jQuery.makeArray(arguments).slice(1);if(jQuery.type(o)==="object"){return this.map(function(){i.create($(this),o);return this})}var q=$(this[0]),r=q.data(i.prototype.DATA_KEY);if(r){if(jQuery.type(o)==="string"){var p=r[o];if(jQuery.type(p)==="function"){return p.apply(r,n)}}else{return r}}return undefined}})}());(function(){var g={renameColumns:false,columnNames:[],commentChar:"#",hideCommentRows:false,includePrompts:true,topLeftContent:"Columns:"},s="peek-control.change",t="peek-control.rename",l="peek-control",v="control",f="control-prompt",c="selected",n="disabled",u="button",q="renamable-header",p="column-index",a="column-name";function i(w){if(w.disabled&&jQuery.type(w.disabled)!=="array"){throw new Error('"disabled" must be defined as an array of indeces: '+JSON.stringify(w))}if(w.multiselect&&w.selected&&jQuery.type(w.selected)!=="array"){throw new Error('Mulitselect rows need an array for "selected": '+JSON.stringify(w))}if(!w.label||!w.id){throw new Error("Peek controls need a label and id for each control row: "+JSON.stringify(w))}if(w.disabled&&w.disabled.indexOf(w.selected)!==-1){throw new Error("Selected column is in the list of disabled columns: "+JSON.stringify(w))}return w}function o(x,w){return $("<div/>").addClass(u).text(x.label)}function k(x,w){var y=$("<td/>").html(o(x,w)).attr("data-"+p,w);if(x.disabled&&x.disabled.indexOf(w)!==-1){y.addClass(n)}return y}function e(y,z,w){var x=y.children("."+u);if(y.hasClass(c)){x.html((z.selectedText!==undefined)?(z.selectedText):(z.label))}else{x.html((z.unselectedText!==undefined)?(z.unselectedText):(z.label))}}function h(z,x){var y=k(z,x);if(z.selected===x){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);if(!E.hasClass(c)){var A=E.parent().children("."+c).removeClass(c);A.each(function(){e($(this),z,x)});E.addClass(c);e(E,z,x);var C={},B=E.parent().attr("id"),F=E.data(p);C[B]=F;E.parents(".peek").trigger(s,C)}})}return y}function m(z,x){var y=k(z,x);if(z.selected&&z.selected.indexOf(x)!==-1){y.addClass(c)}e(y,z,x);if(!y.hasClass(n)){y.click(function w(D){var E=$(this);E.toggleClass(c);e(E,z,x);var C=E.parent().find("."+c).map(function(G,H){return $(H).data(p)});var B={},A=E.parent().attr("id"),F=jQuery.makeArray(C);B[A]=F;E.parents(".peek").trigger(s,B)})}return y}function j(y,z){var w=[];for(var x=0;x<y;x+=1){w.push(z.multiselect?m(z,x):h(z,x))}return w}function r(y,z,x){var A=$("<tr/>").attr("id",z.id).addClass(v);if(x){var w=$("<td/>").addClass(f).text(z.label+":");A.append(w)}A.append(j(y,z));return A}function b(E){E=jQuery.extend(true,{},g,E);var D=$(this).addClass(l),A=D.find("table"),z=A.find("th").size(),C=A.find("tr").size(),w=A.find("td[colspan]").map(function(H,F){var G=$(this);if(G.text()&&G.text().match(new RegExp("^"+E.commentChar))){return $(this).css("color","grey").parent().get(0)}return null});if(E.hideCommentRows){w.hide();C-=w.size()}if(E.includePrompts){var y=$("<th/>").addClass("top-left").text(E.topLeftContent).attr("rowspan",C);A.find("tr").first().prepend(y)}var B=A.find("th:not(.top-left)").each(function(G,I){var H=$(this),J=H.text().replace(/^\d+\.*/,""),F=E.columnNames[G]||J;H.attr("data-"+a,F).text((G+1)+((F)?("."+F):("")))});if(E.renameColumns){B.addClass(q).click(function x(){var G=$(this),F=G.index()+(E.includePrompts?0:1),I=G.data(a),H=prompt("New column name:",I);if(H!==null&&H!==I){G.text(F+(H?("."+H):"")).data(a,H).attr("data-",a,H);var J=jQuery.makeArray(G.parent().children("th:not(.top-left)").map(function(){return $(this).data(a)}));G.parents(".peek").trigger(t,J)}})}E.controls.forEach(function(G,F){i(G);var H=r(z,G,E.includePrompts);A.find("tbody").append(H)});return this}jQuery.fn.extend({peekControl:function d(w){return this.map(function(){return b.call(this,w)})}})}());
\ No newline at end of file
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 7ebec9da47844efbf37942faab3809cb0169e5c2 templates/webapps/galaxy/history/original_view.mako
--- a/templates/webapps/galaxy/history/original_view.mako
+++ /dev/null
@@ -1,173 +0,0 @@
-<%namespace file="/display_common.mako" import="get_history_link, get_controller_name" />
-<%namespace file="/root/history_common.mako" import="render_dataset" />
-<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" />
-
-<%!
- def inherit(context):
- if context.get('use_panels'):
- return '/webapps/galaxy/base_panels.mako'
- else:
- return '/base.mako'
-%>
-<%inherit file="${inherit(context)}"/>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "libs/jquery/jstorage" )}
- <script type="text/javascript">
- $(function() {
- init_history_items( $("div.historyItemWrapper"), false, "nochanges" );
- $( '#switch-to-link' ).click( function( event ){
- var galaxy = window.Galaxy || window.parent.Galaxy;
- if( galaxy ){
- galaxy.currHistoryPanel.switchToHistory( '${ trans.security.encode_id( history.id ) }' );
- }
- });
- $( '#refresh' ).click( function( event ){ window.location.reload( true ); })
- });
- </script>
-</%def>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "history", "autocomplete_tagging" )}
-
- <style type="text/css">
-
- /* these don't appear to be used? */
- .page-body
- {
- padding: 10px;
- float: left;
- width: 65%;
- }
- .page-meta
- {
- float: right;
- width: 27%;
- padding: 0.5em;
- margin: 0.25em;
- vertical-align: text-top;
- border: 2px solid #DDDDDD;
- border-top: 4px solid #DDDDDD;
- }
-
-
- body {
- padding: 0px;
- margin: 0px;
- }
-
- div.unified-panel-body {
- position: absolute;
- top: 0px;
- width: 100%;
- }
-
- #history-name-area {
- margin: 12px 0px 0px 16px;
- font-size: 120%;
- }
- #top-links {
- margin: 4px 0px 8px 16px;
- }
-
- .historyItemContainer {
- /*padding-right: 3px;*/
- }
- .historyItemBody {
- display: none;
- }
- div.historyItemWrapper {
- margin: 0px 4px 0px 4px ;
- border-left: 1px solid #999999;
- border-right: 1px solid #999999;
- }
- /* TODO: unify with other history css and into .less */
- </style>
-
- <noscript>
- <style>
- .historyItemBody {
- display: block;
- }
- </style>
- </noscript>
-</%def>
-
-<%def name="init()">
-<%
- self.has_left_panel=False
- self.has_right_panel=False
- self.message_box_visible=False
-%>
-</%def>
-
-<%def name="body()">
- ${center_panel()}
-</%def>
-
-<%def name="center_panel()">
- ## Get URL to other histories owned by user that owns this history.
- <%
- ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier.
- href_to_published_histories = h.url_for( controller='/history', action='list_published')
- if history.user is not None:
- href_to_user_histories = h.url_for( controller='/history', action='list_published', xxx=history.user.username).replace( 'xxx', 'f-username')
- else:
- href_to_user_histories = h.url_for( controller='/history', action='list_published' )##should this instead be be None or empty string?
- %>
-
- <div class="unified-panel-body">
- <div style="overflow: auto; height: 100%;">
- ## Render view of history.
- <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold; padding: 0px 0px 5px 0px">
- <div id="history-name">${history.get_display_name()}</div>
- </div>
-
- <div id="top-links" class="historyLinks" style="padding: 0px 0px 5px 0px">
- %if not history.purged and history.user != trans.user:
- ##TODO: need to remove _top
- <a href="${h.url_for(controller='history', action='imp', id=trans.security.encode_id(history.id) )}"
- >import and start using history</a> |
- <a id="refresh" href="javascript:void(0)" >${_('refresh')}</a> |
- %endif
- %if not history.purged and history.user == trans.user:
- <a id="switch-to-link" href="javascript:void(0)">${_('switch to this history')}</a> |
- <a id="refresh" href="javascript:void(0)" >${_('refresh')}</a> |
- %endif
- %if show_deleted:
- <a href="${h.url_for(controller='history', action='view', id=trans.security.encode_id(history.id), show_deleted=False, use_panels=use_panels )}">${_('hide deleted')}</a> |
- %else:
- <a href="${h.url_for(controller='history', action='view', id=trans.security.encode_id(history.id), show_deleted=True, use_panels=use_panels )}">${_('show deleted')}</a> |
- %endif
- <a href="#" class="toggle">collapse all</a>
- </div>
-
- %if history.deleted:
- <div class="warningmessagesmall">
- ${_('You are currently viewing a deleted history!')}
- </div>
- <p></p>
- %endif
-
- %if not datasets:
- <div class="infomessagesmall" id="emptyHistoryMessage">
-
- %else:
- ## Render requested datasets, ordered from newest to oldest
- %for data in datasets:
- %if data.visible:
- <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}">
- ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )}
- </div>
- %endif
- %endfor
-
- <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;">
- %endif
- ${_("Your history is empty. Click 'Get Data' on the left pane to start")}
- </div>
- </div>
- </div>
-</%def>
diff -r c85f8fb5d63e667b63e10cdce518254f56002f55 -r 7ebec9da47844efbf37942faab3809cb0169e5c2 templates/webapps/galaxy/history/view.mako
--- a/templates/webapps/galaxy/history/view.mako
+++ b/templates/webapps/galaxy/history/view.mako
@@ -77,6 +77,7 @@
%endif
<script type="text/javascript">
+ ##TODO: remove when Galaxy is either ensured or removed from the history panel
var using_panels = ${ 'false' if not use_panels else 'true' };
%if not use_panels:
window.Galaxy = {};
@@ -87,113 +88,107 @@
## ----------------------------------------------------------------------------
<%def name="center_panel()">
+<%
+ show_deleted = context.get( 'show_deleted', None )
+ show_hidden = context.get( 'show_hidden', None )
+
+ user_is_owner_json = 'true' if user_is_owner else 'false'
+ show_deleted_json = h.to_json_string( show_deleted )
+ show_hidden_json = h.to_json_string( show_hidden )
+
+ imp_with_deleted_url = h.url_for( controller='history', action='imp', id=history['id'], all_datasets=True )
+ imp_without_deleted_url = h.url_for( controller='history', action='imp', id=history['id'] )
+%>
+
<div id="header" class="clear"><div id="history-view-controls" class="pull-right">
- <%
- show_deleted = context.get( 'show_deleted', None )
- show_hidden = context.get( 'show_hidden', None )
-
- show_deleted_js = 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' )
- show_hidden_js = 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' )
- print 'user_is_owner:', user_is_owner
- %>
%if not user_is_owner and not history[ 'purged' ]:
- <a id="import" class="btn btn-default" style="display: none;"
- href="${h.url_for( controller='history', action='imp', id=history['id'], all_datasets=show_deleted )}">
- ${_('Import and start using history')}
- </a>
+ <button id="import" class="btn btn-default"></button>
%endif
- <button id="toggle-deleted" class="btn btn-default">
- ${_('Exclude deleted') if show_deleted else _('Include deleted')}
- </button>
- <button id="toggle-hidden" class="btn btn-default">
- ${_('Exclude hidden') if show_hidden else _('Include hidden')}
- </button>
+ <button id="toggle-deleted" class="btn btn-default"></button>
+ <button id="toggle-hidden" class="btn btn-default"></button></div></div><div id="history-${ history[ 'id' ] }" class="history-panel unified-panel-body" style="overflow: auto;"></div><script type="text/javascript">
+ $(function(){
+ $( '#toggle-deleted' ).modeButton({
+ initialMode : "${ 'showing_deleted' if show_deleted else 'not_showing_deleted' }",
+ modes: [
+ { mode: 'showing_deleted', html: _l( 'Exclude deleted' ) },
+ { mode: 'not_showing_deleted', html: _l( 'Include deleted' ) }
+ ]
+ }).click( function(){
+ // allow the 'include/exclude deleted' button to control whether the 'import' button includes deleted
+ // datasets when importing or not; when deleted datasets are shown, they'll be imported
+ $( '#import' ).modeButton( 'setMode',
+ $( this ).modeButton( 'current' ) === 'showing_deleted'? 'with_deleted': 'without_deleted' )
+ });
+
+ $( '#toggle-hidden' ).modeButton({
+ initialMode : "${ 'showing_hidden' if show_hidden else 'not_showing_hidden' }",
+ modes: [
+ { mode: 'showing_hidden', html: _l( 'Exclude hidden' ) },
+ { mode: 'not_showing_hidden', html: _l( 'Include hidden' ) }
+ ]
+ });
+
+ $( '#import' ).modeButton({
+ switchModesOnClick : false,
+ initialMode : "${ 'with_deleted' if show_deleted else 'without_deleted' }",
+ modes: [
+ { mode: 'with_deleted', html: _l( 'Import with deleted datasets and start using history' ),
+ onclick: function importWithDeleted(){
+ window.location = '${imp_with_deleted_url}';
+ }
+ },
+ { mode: 'without_deleted', html: _l( 'Import and start using history' ),
+ onclick: function importWithoutDeleted(){
+ window.location = '${imp_without_deleted_url}';
+ }
+ },
+ ]
+ });
+ });
+
var debugging = JSON.parse( sessionStorage.getItem( 'debugging' ) ) || false,
userIsOwner = ${'true' if user_is_owner else 'false'},
historyJSON = ${h.to_json_string( history )},
hdaJSON = ${h.to_json_string( hdas )};
- window.hdaJSON = hdaJSON;
-
- $( '#toggle-deleted' ).modeButton({
- initialMode : (${ show_deleted_js })?( 'exclude' ):( 'include' ),
- modes: [
- { mode: 'exclude', html: _l( 'Exclude deleted' ) },
- { mode: 'include', html: _l( 'Include deleted' ) }
- ]
- }).click( function(){
- // allow the 'include/exclude deleted' button to control whether the 'import' button includes deleted datasets
- // when importing or not; when deleted datasets are shown, they'll be imported
- var $importBtn = $( '#import' );
- if( $importBtn.size() ){
- // a bit hacky
- var href = $importBtn.attr( 'href' ),
- includeDeleted = $( this ).modeButton()[0].getMode().mode === 'exclude';
- href = href.replace( /all_datasets=True|False/, ( includeDeleted )?( 'True' ):( 'False' ) );
- $importBtn.attr( 'href', href );
- $importBtn.text( includeDeleted ? _l( 'Import with deleted datasets and start using history' )
- : _l( 'Import and start using history' ) );
- }
- });
-
- $( '#toggle-hidden' ).modeButton({
- initialMode : (${ show_hidden_js })?( 'exclude' ):( 'include' ),
- modes: [
- { mode: 'exclude', html: _l( 'Exclude hidden' ) },
- { mode: 'include', html: _l( 'Include hidden' ) }
- ]
- });
-
- ##TODO: move to mako
- if( Galaxy.currUser.id !== historyJSON.user_id ){
- $( '#import' ).show();
- }
+ panelToUse = ( userIsOwner )?
+ ({ location: 'mvc/history/history-panel', className: 'HistoryPanel' }):
+ ({ location: 'mvc/history/readonly-history-panel', className: 'ReadOnlyHistoryPanel' });
require.config({
baseUrl : "${h.url_for( '/static/scripts' )}"
- })([
- %if user_is_owner:
- 'mvc/history/history-panel'
- %else:
- 'mvc/history/readonly-history-panel'
- %endif
- ${ }
- ], function( panelMod ){
- //require([ "mvc/history/history-panel" ], function( historyPanel ){
- // history module is already in the dpn chain from the panel. We can re-scope it here.
- var historyModel = require( 'mvc/history/history-model' ),
- hdaBaseView = require( 'mvc/dataset/hda-base' ),
- history = new historyModel.History( historyJSON, hdaJSON, {
- logger: ( debugging )?( console ):( null )
+ })([ panelToUse.location ], function( panelMod ){
+ $(function(){
+ var panelClass = panelMod[ panelToUse.className ],
+ // history module is already in the dpn chain from the panel. We can re-scope it here.
+ historyModel = require( 'mvc/history/history-model' ),
+ hdaBaseView = require( 'mvc/dataset/hda-base' ),
+ history = new historyModel.History( historyJSON, hdaJSON, {
+ logger: ( debugging )?( console ):( null )
+ });
+
+ window.historyPanel = new panelClass({
+ show_deleted : ${show_deleted_json},
+ show_hidden : ${show_hidden_json},
+ el : $( "#history-" + historyJSON.id ),
+ model : history,
+ onready : function(){
+ var panel = this;
+ $( '#toggle-deleted' ).on( 'click', function(){
+ panel.toggleShowDeleted();
+ });
+ $( '#toggle-hidden' ).on( 'click', function(){
+ panel.toggleShowHidden();
+ });
+ this.render();
+ }
});
-
- window.panelMod = panelMod;
- %if user_is_owner:
- window.panelClass = panelMod.HistoryPanel;
- %else:
- window.panelClass = panelMod.ReadOnlyHistoryPanel;
- %endif
- window.historyPanel = new panelClass({
- show_deleted : ${show_deleted_js},
- show_hidden : ${show_hidden_js},
- el : $( "#history-" + historyJSON.id ),
- model : history,
- onready : function(){
- var panel = this;
- $( '#toggle-deleted' ).on( 'click', function(){
- panel.toggleShowDeleted();
- });
- $( '#toggle-hidden' ).on( 'click', function(){
- panel.toggleShowHidden();
- });
- this.render();
- }
});
});
</script>
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.
1
0