Skip to content

Commit

Permalink
Merge branch 'dev' into admin_grid_formbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Sep 13, 2017
2 parents 87f2ad1 + 11d4380 commit 809cabd
Show file tree
Hide file tree
Showing 205 changed files with 4,365 additions and 2,918 deletions.
2 changes: 1 addition & 1 deletion .ci/flake8_lint_include_list.txt
Expand Up @@ -101,7 +101,7 @@ lib/galaxy/webapps/galaxy/api/genomes.py
lib/galaxy/webapps/galaxy/api/histories.py
lib/galaxy/webapps/galaxy/api/__init__.py
lib/galaxy/webapps/galaxy/api/jobs.py
lib/galaxy/webapps/galaxy/api/lda_datasets.py
lib/galaxy/webapps/galaxy/api/library_datasets.py
lib/galaxy/webapps/galaxy/api/requests.py
lib/galaxy/webapps/galaxy/api/roles.py
lib/galaxy/webapps/galaxy/api/samples.py
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/selenium/docker-compose.yml
Expand Up @@ -12,7 +12,7 @@ services:
ports:
- "${GALAXY_PORT}:8080"
selenium:
image: selenium/standalone-chrome:3.0.1-aluminum
image: selenium/standalone-chrome:3.5.2
ports:
- "${SELENIUM_PORT}:4444"
links:
Expand Down
4 changes: 3 additions & 1 deletion client/galaxy/scripts/apps/admin.js
Expand Up @@ -7,6 +7,7 @@ var jQuery = require( 'jquery' ),
Ui = require( 'mvc/ui/ui-misc' ),
QueryStringParsing = require( 'utils/query-string-parsing' ),
Router = require( 'layout/router' ),
Utils = require( 'utils/utils' ),
Page = require( 'layout/page' );

window.app = function app( options, bootstrapped ){
Expand Down Expand Up @@ -127,9 +128,10 @@ window.app = function app( options, bootstrapped ){

$(function() {
_.extend( options.config, { active_view : 'admin' } );
Utils.setWindowTitle("Administration");
Galaxy.page = new Page.View( _.extend( options, {
Left : AdminPanel,
Router : AdminRouter
} ) );
});
};
};
17 changes: 13 additions & 4 deletions client/galaxy/scripts/layout/page.js
@@ -1,4 +1,4 @@
define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Masthead, Panel, Modal ) {
define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal', 'utils/utils' ], function( Masthead, Panel, Modal, Utils) {
var View = Backbone.View.extend({
el : 'body',
className : 'full-content',
Expand All @@ -16,7 +16,16 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast

// attach global objects, build mastheads
Galaxy.modal = this.modal = new Modal.View();
Galaxy.display = this.display = function( view ) { self.center.display( view ) };
Galaxy.display = this.display = function( view ) {
if ( view.title ){
Utils.setWindowTitle( view.title );
view.allow_title_display = false;
} else {
Utils.setWindowTitle();
view.allow_title_display = true;
}
self.center.display( view );
};
Galaxy.router = this.router = options.Router && new options.Router( self, options );
this.masthead = new Masthead.View( this.config );
this.center = new Panel.CenterPanel();
Expand Down Expand Up @@ -155,7 +164,7 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
}
}
})
.error( function( data ) {
.error( function( data ) {
// hide the communication icon if the communication server is not available
$chat_icon_element.css( "visibility", "hidden" );
});
Expand All @@ -166,4 +175,4 @@ define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Mast
});

return { View: View }
});
});
Expand Up @@ -405,7 +405,7 @@ var PairedCollectionCreator = Backbone.View.extend( baseMVC.LoggableMixin ).exte

/** autopair by exact match */
autopairSimple : autoPairFnBuilder({
scoreThreshold: function(){ return 1.0; },
scoreThreshold: function(){ return 0.6; },
match : function _match( params ){
params = params || {};
if( params.matchTo === params.possible ){
Expand Down
3 changes: 2 additions & 1 deletion client/galaxy/scripts/mvc/grid/grid-shared.js
Expand Up @@ -6,6 +6,7 @@ define( [ 'mvc/grid/grid-view' ], function( GridView ) {
this.setElement( $( '<div/>' ) );
this.model = new Backbone.Model( options );
this.item = this.model.get( 'item' );
this.title = this.model.get('plural');
$.ajax({
url : Galaxy.root + this.item + '/' + this.model.get( 'action_id' ),
success : function( response ) {
Expand Down Expand Up @@ -55,4 +56,4 @@ define( [ 'mvc/grid/grid-view' ], function( GridView ) {
return {
View: View
}
});
});
4 changes: 4 additions & 0 deletions client/galaxy/scripts/mvc/grid/grid-view.js
Expand Up @@ -20,6 +20,7 @@ return Backbone.View.extend({
initialize: function(grid_config) {
this.grid = new GridModel();
this.dict_format = grid_config.dict_format;
this.title = grid_config.title;
var self = this;
window.add_tag_to_grid_filter = function( tag_name, tag_value ){
// Put tag name and value together.
Expand Down Expand Up @@ -83,6 +84,9 @@ return Backbone.View.extend({
// get options
var options = this.grid.attributes;

if (this.allow_title_display && options.title){
Utils.setWindowTitle(options.title);
}
// handle refresh requests
this.handle_refresh(options.refresh_frames);

Expand Down
3 changes: 2 additions & 1 deletion client/galaxy/scripts/mvc/history/history-list.js
Expand Up @@ -2,6 +2,7 @@
define( [ 'utils/utils', 'mvc/grid/grid-view', 'mvc/history/history-model', 'mvc/history/copy-dialog' ], function( Utils, GridView, HistoryModel, historyCopyDialog ) {

var View = Backbone.View.extend({
title: "Histories",
initialize: function( options ) {
var self = this;
this.setElement( $( '<div/>' ) );
Expand Down Expand Up @@ -46,4 +47,4 @@ define( [ 'utils/utils', 'mvc/grid/grid-view', 'mvc/history/history-model', 'mvc
return {
View: View
}
});
});
40 changes: 35 additions & 5 deletions client/galaxy/scripts/mvc/history/history-view-edit.js
Expand Up @@ -156,6 +156,7 @@ var HistoryViewEdit = _super.extend(
renderItems : function( $whereTo ){
var views = _super.prototype.renderItems.call( this, $whereTo );
if( !this.searchFor ){ this._renderCounts( $whereTo ); }
else{ this._renderSearchFindings( $whereTo ); }
return views;
},

Expand Down Expand Up @@ -427,10 +428,10 @@ var HistoryViewEdit = _super.extend(
},

/** override to display number found in subtitle */
_renderSearchFindings : function(){
this.$( '> .controls .subtitle' ).html([
_l( 'Found' ), this.views.length
].join(' '));
_renderSearchFindings : function( $whereTo ){
$whereTo = $whereTo instanceof jQuery? $whereTo : this.$el;
var html = this.templates.found( this.model.toJSON(), this );
$whereTo.find( '> .controls .subtitle' ).html( html );
return this;
},

Expand Down Expand Up @@ -598,8 +599,37 @@ HistoryViewEdit.prototype.templates = (function(){
'<% } %>',
], 'history' );

var foundTemplate = BASE_MVC.wrapTemplate([
_l( 'Found' ), ' <%- view.views.length %>, ',

'<% if( history.contents_active.deleted ){ %>',
'<% if( view.model.contents.includeDeleted ){ %>',
'<a class="toggle-deleted-link" href="javascript:void(0);">',
_l( 'hide deleted' ),
'</a>, ',
'<% } else { %>',
'<a class="toggle-deleted-link" href="javascript:void(0);">',
_l( 'show deleted' ),
'</a>, ',
'<% } %>',
'<% } %>',

'<% if( history.contents_active.hidden ){ %>',
'<% if( view.model.contents.includeHidden ){ %>',
'<a class="toggle-hidden-link" href="javascript:void(0);">',
_l( 'hide hidden' ),
'</a>',
'<% } else { %>',
'<a class="toggle-hidden-link" href="javascript:void(0);">',
_l( 'show hidden' ),
'</a>',
'<% } %>',
'<% } %>',
], 'history' );

return _.extend( _.clone( _super.prototype.templates ), {
counts : countsTemplate
counts : countsTemplate,
found : foundTemplate
});
}());

Expand Down
4 changes: 2 additions & 2 deletions client/galaxy/scripts/mvc/history/options-menu.js
Expand Up @@ -65,7 +65,7 @@ var menu = [
anon : true,
func : function() {
if( Galaxy && Galaxy.currHistoryPanel && confirm( _l( 'Really delete the current history?' ) ) ){
galaxy_main.window.location.href = 'history/delete?id=' + Galaxy.currHistoryPanel.model.id;
Galaxy.currHistoryPanel.model._delete().done(function(){Galaxy.currHistoryPanel.loadCurrentHistory();});
}
},
},
Expand All @@ -76,7 +76,7 @@ var menu = [
func : function() {
if( Galaxy && Galaxy.currHistoryPanel
&& confirm( _l( 'Really delete the current history permanently? This cannot be undone.' ) ) ){
galaxy_main.window.location.href = 'history/delete?purge=True&id=' + Galaxy.currHistoryPanel.model.id;
Galaxy.currHistoryPanel.model.purge().done(function(){Galaxy.currHistoryPanel.loadCurrentHistory();});
}
},
},
Expand Down

0 comments on commit 809cabd

Please sign in to comment.