mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
UI, Histories: use links for file inputs shown in show_params (the 'i' button in the datasets of histories) that, when clicked, 1) scroll the history to the dataset shown and 2) open *that* datasets info/show_params in the center panel
This commit is contained in:
@@ -573,7 +573,7 @@ var ListPanel = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend(/** @lends
|
||||
var json = view.model.toJSON();
|
||||
for( var key in properties ){
|
||||
if( properties.hasOwnProperty( key ) ){
|
||||
if( json[ key ] !== view.model.get( key ) ){
|
||||
if( json[ key ] !== properties[ key ] ){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -772,7 +772,7 @@ var ListPanel = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend(/** @lends
|
||||
scrollToItem : function( view, speed ){
|
||||
if( !view ){ return this; }
|
||||
//var itemTop = view.$el.offset().top;
|
||||
var itemTop = view.$el.position().top;
|
||||
var itemTop = view.el.offsetTop;
|
||||
return this.scrollTo( itemTop, speed );
|
||||
},
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+29307
-16
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,57 @@
|
||||
webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(59).GalaxyApp,o=n(10),t=n(5),l=n(61);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>')})}}).call(r,n(3))}]);
|
||||
webpackJsonp([5],[
|
||||
/* 0 */
|
||||
/*!**************************************!*\
|
||||
!*** ./galaxy/scripts/apps/login.js ***!
|
||||
\**************************************/
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(_) {
|
||||
var jQuery = __webpack_require__( /*! jquery */ 3 ),
|
||||
$ = jQuery,
|
||||
GalaxyApp = __webpack_require__( /*! galaxy */ 4 ).GalaxyApp,
|
||||
PANEL = __webpack_require__( /*! layout/panel */ 12 ),
|
||||
_l = __webpack_require__( /*! utils/localization */ 7 ),
|
||||
PAGE = __webpack_require__( /*! layout/page */ 99 );
|
||||
|
||||
window.app = function app( options, bootstrapped ){
|
||||
window.Galaxy = new GalaxyApp( options, bootstrapped );
|
||||
Galaxy.debug( 'login app' );
|
||||
var redirect = encodeURI( options.redirect );
|
||||
|
||||
// TODO: remove iframe for user login (at least) and render login page from here
|
||||
// then remove this redirect
|
||||
if( !options.show_welcome_with_login ){
|
||||
var params = jQuery.param({ use_panels : 'True', redirect : redirect });
|
||||
window.location.href = Galaxy.root + 'user/login?' + params;
|
||||
return;
|
||||
}
|
||||
|
||||
var loginPage = new PAGE.PageLayoutView( _.extend( options, {
|
||||
el : 'body',
|
||||
center : new PANEL.CenterPanel({ el : '#center' }),
|
||||
right : new PANEL.RightPanel({
|
||||
title : _l( 'Login required' ),
|
||||
el : '#right'
|
||||
}),
|
||||
}));
|
||||
|
||||
$(function(){
|
||||
// TODO: incorporate *actual* referrer/redirect info as the original page does
|
||||
var params = jQuery.param({ redirect : redirect }),
|
||||
loginUrl = Galaxy.root + 'user/login?' + params;
|
||||
loginPage.render();
|
||||
|
||||
// welcome page (probably) needs to remain sandboxed
|
||||
loginPage.center.$( '#galaxy_main' ).prop( 'src', options.welcome_url );
|
||||
|
||||
loginPage.right.$( '.unified-panel-body' )
|
||||
.css( 'overflow', 'hidden' )
|
||||
.html( '<iframe src="' + loginUrl + '" frameborder="0" style="width: 100%; height: 100%;"/>' );
|
||||
});
|
||||
};
|
||||
|
||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! underscore */ 1)))
|
||||
|
||||
/***/ }
|
||||
]);
|
||||
//# sourceMappingURL=login.bundled.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -59,7 +59,20 @@
|
||||
<td>${ len( param_values[input.name] ) } uploaded datasets</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
%elif input.visible:
|
||||
## files used for inputs
|
||||
%elif input.type == "data":
|
||||
<tr>
|
||||
${inputs_recursive_indent( text=input.label, depth=depth )}
|
||||
<%
|
||||
hda = param_values[input.name]
|
||||
encoded_id = trans.security.encode_id( hda.id )
|
||||
show_params_url = h.url_for( controller='dataset', action='show_params', dataset_id=encoded_id )
|
||||
%>
|
||||
<td><a class="input-dataset-show-params" data-hda-id="${encoded_id}"
|
||||
href="${show_params_url}">${hda.name | h}</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
%elif input.visible:
|
||||
<%
|
||||
if hasattr( input, "label" ) and input.label:
|
||||
label = input.label
|
||||
@@ -179,6 +192,17 @@
|
||||
${ render_msg( 'One or more of your original parameters may no longer be valid or displayed properly.', status='warning' ) }
|
||||
%endif
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$( '.input-dataset-show-params' ).on( 'click', function( ev ){
|
||||
## some acrobatics to get the Galaxy object that has a history from the contained frame
|
||||
if( window.parent.Galaxy && window.parent.Galaxy.currHistoryPanel ){
|
||||
window.parent.Galaxy.currHistoryPanel.scrollToId( 'dataset-' + $( this ).data( 'hda-id' ) );
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<h3>Inheritance Chain</h3>
|
||||
<div class="inherit" style="background-color: #fff; font-weight:bold;">${hda.name | h}</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user