Skip to content

Commit

Permalink
Merge remote-tracking branch 'jmchilton/dev' into download_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jun 5, 2017
2 parents 7527609 + c269041 commit 00de5b9
Show file tree
Hide file tree
Showing 271 changed files with 4,086 additions and 3,183 deletions.
1 change: 0 additions & 1 deletion .ci/flake8_lint_include_list.txt
Expand Up @@ -5,7 +5,6 @@ cron/cleanup_datasets.py
cron/parse_builds_3_sites.py
cron/parse_builds.py
doc/parse_gx_xsd.py
doc/patch.py
lib/galaxy/actions/
lib/galaxy/auth/
lib/galaxy/config.py
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Expand Up @@ -104,7 +104,7 @@ The following individuals have contributed code to Galaxy:
* Michael Li <michael.li@uwaterloo.ca>
* Pierre Lindenbaum <plindenbaum@yahoo.fr>
* Mikael Loaec <mikael.loaec@versailles.inra.fr>
* Thoba Lose @thobalose
* Thoba Lose <lose.thoba@gmail.com>
* Philip Mabon <philipmabon@gmail.com>
* Remi Marenco <remi.marenco@gmail.com> <remimarenco@gmail.com>
* Zipho Mashologu <zipho@trustpay.biz>
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -49,7 +49,7 @@ done in the ``config/galaxy.ini`` file. Tools can be either installed
from the Tool Shed or added manually. For details please see the Galaxy
wiki:

https://wiki.galaxyproject.org/Admin/Tools/AddToolFromToolShedTutorial
https://galaxyproject.org/admin/tools/add-tool-from-toolshed-tutorial/

Not all dependencies are included for the tools provided in the sample
``tool_conf.xml``. A full list of external dependencies is available at:
Expand Down
18 changes: 16 additions & 2 deletions client/galaxy/scripts/apps/analysis.js
Expand Up @@ -9,7 +9,9 @@ var jQuery = require( 'jquery' ),
UserPreferences = require( 'mvc/user/user-preferences' ),
CustomBuilds = require( 'mvc/user/user-custom-builds' ),
Tours = require( 'mvc/tours' ),
Workflows = require( 'mvc/workflow/workflow' );
GridView = require( 'mvc/grid/grid-view' )
Workflows = require( 'mvc/workflow/workflow' ),
WorkflowsConfigureMenu = require( 'mvc/workflow/workflow-configure-menu' );

/** define the 'Analyze Data'/analysis/main/home page for Galaxy
* * has a masthead
Expand Down Expand Up @@ -79,12 +81,16 @@ window.app = function app( options, bootstrapped ){
'(/)user(/)' : 'show_user',
'(/)user(/)(:form_id)' : 'show_user_form',
'(/)workflow(/)' : 'show_workflows',
'(/)pages(/)(:action_id)' : 'show_pages',
'(/)workflow/configure_menu(/)' : 'show_configure_menu',
'(/)custom_builds' : 'show_custom_builds'
},

require_login: [
'show_user',
'show_user_form'
'show_user_form',
'show_workflows',
'show_configure_menu'
],

loginRequired: function() {
Expand All @@ -111,10 +117,18 @@ window.app = function app( options, bootstrapped ){
this.page.display( new UserPreferences.Forms( { form_id: form_id, user_id: Galaxy.params.id } ) );
},

show_pages : function( action_id ) {
this.page.display( new GridView( { url_base: Galaxy.root + 'page/list_published', dict_format: true } ) );
},

show_workflows : function(){
this.page.display( new Workflows.View() );
},

show_configure_menu : function(){
this.page.display( new WorkflowsConfigureMenu.View() );
},

show_custom_builds : function() {
var self = this;
var historyPanel = this.page.historyPanel.historyView;
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/layout/menu.js
Expand Up @@ -65,7 +65,7 @@ var Collection = Backbone.Collection.extend({
url : 'visualization/list_published'
},{
title : _l('Pages'),
url : 'page/list_published'
url : 'pages/list_published'
}]
});

Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/dataset/dataset-li.js
Expand Up @@ -307,7 +307,7 @@ var DatasetListItemView = _super.extend(

_renderNametags : function(){
var tpl = _.template([
'<% _.each(tags, function(tag){ %>',
'<% _.each(_.sortBy(_.uniq(tags), function(x) { return x }), function(tag){ %>',
'<% if (tag.indexOf("name:") == 0){ %>',
'<span class="label label-info"><%- tag.slice(5) %></span>',
'<% } %>',
Expand Down
8 changes: 7 additions & 1 deletion client/galaxy/scripts/mvc/form/form-input.js
Expand Up @@ -11,7 +11,8 @@ define([], function() {
text_enable : this.app_options.text_enable || 'Enable',
text_disable : this.app_options.text_disable || 'Disable',
cls_enable : this.app_options.cls_enable || 'fa fa-caret-square-o-down',
cls_disable : this.app_options.cls_disable || 'fa fa-caret-square-o-up'
cls_disable : this.app_options.cls_disable || 'fa fa-caret-square-o-up',
always_refresh : this.app_options.always_refresh
}).set( options );

// set element and link components
Expand Down Expand Up @@ -44,6 +45,11 @@ define([], function() {
app.trigger && app.trigger( 'change' );
self.render();
});

// hide error on value change
if ( this.field.model && !this.model.get( 'always_refresh' ) ) {
this.listenTo( this.field.model, 'change:value', function() { self.reset() } );
}
},

/** Set backdrop for input element */
Expand Down
4 changes: 2 additions & 2 deletions client/galaxy/scripts/mvc/grid/grid-template.js
Expand Up @@ -215,7 +215,7 @@ return {
}
return tmpl;
},

// template
footer: function(options) {

Expand Down Expand Up @@ -304,7 +304,7 @@ return {
'<input type="hidden" id="operation" name="operation" value="">' +
'<td></td>' +
'<td colspan="100">' +
'For <span class="grid-selected-count"></span> selected ' + options.get_class_plural + ': ';
'For <span class="grid-selected-count"></span> selected items: ';

// configure buttons for operations
for (i in options.operations) {
Expand Down
42 changes: 34 additions & 8 deletions client/galaxy/scripts/mvc/grid/grid-view.js
Expand Up @@ -4,10 +4,11 @@ jQuery.ajaxSettings.traditional = true;

// dependencies
define([
'utils/utils',
'mvc/grid/grid-model',
'mvc/grid/grid-template',
"mvc/ui/popup-menu"
], function(GridModel, Templates, PopupMenu) {
], function(Utils, GridModel, Templates, PopupMenu) {

// grid view
return Backbone.View.extend({
Expand All @@ -18,8 +19,36 @@ return Backbone.View.extend({
// Initialize
initialize: function(grid_config)
{
this.dict_format = grid_config.dict_format;
var self = this;
window.add_tag_to_grid_filter = function( tag_name, tag_value ){
// Put tag name and value together.
var tag = tag_name + ( tag_value !== undefined && tag_value !== "" ? ":" + tag_value : "" );
var advanced_search = $( '#advanced-search').is(":visible" );
if( !advanced_search ){
$('#standard-search').slideToggle('fast');
$('#advanced-search').slideToggle('fast');
}
self.add_filter_condition( "tags", tag );
};

// set element
this.setElement('#grid-container');
if ( this.dict_format ) {
this.setElement('<div/>');
if ( grid_config.url_base && !grid_config.items ) {
Utils.get({
url: grid_config.url_base,
success: function( response ) {
self.init_grid( response );
}
});
} else {
this.init_grid(grid_config);
}
} else {
this.setElement('#grid-container');
this.init_grid(grid_config);
}

// fix padding
if (grid_config.use_panels) {
Expand All @@ -28,9 +57,6 @@ return Backbone.View.extend({
overflow : 'auto'
});
}

// initialize controls
this.init_grid(grid_config);
},

// refresh frames
Expand Down Expand Up @@ -545,7 +571,7 @@ return Backbone.View.extend({
});

// Do operation. If operation cannot be performed asynchronously, redirect to location.
if (this.grid.can_async_op(operation)) {
if (this.grid.can_async_op(operation) || this.dict_format) {
this.update_grid();
} else {
this.go_to(target, href);
Expand All @@ -562,7 +588,7 @@ return Backbone.View.extend({
}

// refresh grid
if (this.grid.get('async')) {
if (this.grid.get('async') || this.dict_format) {
this.update_grid();
} else {
this.go_to(target, href);
Expand Down Expand Up @@ -630,7 +656,7 @@ return Backbone.View.extend({
var insert = self.grid.get('insert');

// request new configuration
var json = $.parseJSON(response_text);
var json = self.dict_format ? response_text.embedded_grid || response_text : $.parseJSON(response_text);

// update
json.embedded = embedded;
Expand Down
4 changes: 2 additions & 2 deletions client/galaxy/scripts/mvc/history/hda-li.js
Expand Up @@ -16,7 +16,7 @@ var _super = DATASET_LI.DatasetListItemView;
var HDAListItemView = _super.extend(
/** @lends HDAListItemView.prototype */{

className : _super.prototype.className + " history-content",
className : _super.prototype.className + " history-content",

initialize : function( attributes, options ){
_super.prototype.initialize.call( this, attributes, options );
Expand Down Expand Up @@ -45,7 +45,7 @@ HDAListItemView.prototype.templates = (function(){
'</div>',
'</br>',
'<span class="nametags">',
'<% _.each(dataset.tags, function(tag){ %>',
'<% _.each(_.sortBy(_.uniq(dataset.tags), function(x) { return x }), function(tag){ %>',
'<% if (tag.indexOf("name:") == 0){ %>',
'<span class="label label-info"><%- tag.slice(5) %></span>',
'<% } %>',
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/history/hdca-li.js
Expand Up @@ -85,7 +85,7 @@ HDCAListItemView.prototype.templates = (function(){
'</div>',
'<div class="subtitle"></div>',
'<span class="nametags">',
'<% _.each(collection.tags, function(tag){ %>',
'<% _.each(_.sortBy(_.uniq(collection.tags), function(x) { return x }), function(tag){ %>',
'<% if (tag.indexOf("name:") == 0){ %>',
'<span class="label label-info"><%- tag.slice(5) %></span>',
'<% } %>',
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/tool/tool-form-composite.js
Expand Up @@ -352,7 +352,7 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
var wp_field = self.wp_form.field_list[ self.wp_form.data.match( match[ 1 ] ) ];
var wp_value = wp_field && wp_field.value();
if ( wp_value ) {
new_value = new_value.replace( new RegExp( '\\' + match[ 0 ], 'g' ), wp_value );
new_value = new_value.split( match[ 0 ] ).join( wp_value );
}
}
}
Expand Down

0 comments on commit 00de5b9

Please sign in to comment.