mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add modified index handling
This commit is contained in:
@@ -10,7 +10,6 @@ var ensure_dd_helper = function () {
|
||||
}
|
||||
|
||||
// Panels
|
||||
|
||||
var MIN_PANEL_WIDTH = 160,
|
||||
MAX_PANEL_WIDTH = 800;
|
||||
|
||||
@@ -120,7 +119,7 @@ $.extend( Panel.prototype, {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Modal dialog boxes
|
||||
var Modal = function( options ) {
|
||||
this.$overlay = options.overlay;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+5
-1
@@ -48,13 +48,17 @@
|
||||
"libs/jquery/jquery",
|
||||
"libs/jquery/jquery.migrate",
|
||||
"libs/jquery/select2",
|
||||
"libs/jquery/jquery.event.hover",
|
||||
"libs/jquery/jquery.form",
|
||||
"libs/jquery/jquery.rating",
|
||||
"libs/jquery.sparklines",
|
||||
"libs/bootstrap",
|
||||
"libs/underscore",
|
||||
"libs/backbone/backbone",
|
||||
"libs/handlebars.runtime",
|
||||
"galaxy.base",
|
||||
'libs/require'
|
||||
"galaxy.panels",
|
||||
"libs/require"
|
||||
)}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<%inherit file="/webapps/galaxy/base_panels.mako"/>
|
||||
|
||||
<%namespace file="/root/tool_menu.mako" import="*" />
|
||||
|
||||
<%inherit file="/base.mako"/>
|
||||
<%namespace file="/galaxy_client_app.mako" import="get_user_dict" />
|
||||
<%def name="stylesheets()">
|
||||
${parent.stylesheets()}
|
||||
${h.css("tool_menu")}
|
||||
@@ -13,148 +11,46 @@
|
||||
}
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<%def name="javascripts()">
|
||||
${parent.javascripts()}
|
||||
${tool_menu_javascripts()}
|
||||
</%def>
|
||||
|
||||
<%def name="late_javascripts()">
|
||||
${parent.late_javascripts()}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Set up GalaxyAsync object.
|
||||
var galaxy_async = new GalaxyAsync();
|
||||
galaxy_async.set_func_url( galaxy_async.set_user_pref,
|
||||
"${h.url_for( controller='user', action='set_user_pref_async' )}");
|
||||
|
||||
$(function(){
|
||||
// Fix iFrame scrolling on iOS
|
||||
if( navigator.userAgent.match( /(iPhone|iPod|iPad)/i ) ) {
|
||||
$("iframe").parent().css( {
|
||||
"overflow": "scroll",
|
||||
"-webkit-overflow-scrolling": "touch"
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="init()">
|
||||
<%
|
||||
self.has_left_panel = True
|
||||
self.has_right_panel = True
|
||||
self.active_view = "analysis"
|
||||
self.require_javascript = True
|
||||
%>
|
||||
%if trans.app.config.require_login and not trans.user:
|
||||
<script type="text/javascript">
|
||||
if ( window != top ) {
|
||||
top.location.href = location.href;
|
||||
from markupsafe import escape
|
||||
|
||||
## get configuration
|
||||
app = trans.app
|
||||
app_config = {
|
||||
'brand' : app.config.get("brand", ""),
|
||||
'nginx_upload_path' : app.config.get("nginx_upload_path", h.url_for(controller='api', action='tools')),
|
||||
'use_remote_user' : app.config.use_remote_user,
|
||||
'remote_user_logout_href' : app.config.remote_user_logout_href,
|
||||
'enable_cloud_launch' : app.config.get_bool('enable_cloud_launch', False),
|
||||
'lims_doc_url' : app.config.get("lims_doc_url", "https://usegalaxy.org/u/rkchak/p/sts"),
|
||||
'biostar_url' : app.config.biostar_url,
|
||||
'biostar_url_redirect' : h.url_for( controller='biostar', action='biostar_redirect', qualified=True ),
|
||||
'support_url' : app.config.get("support_url", "https://wiki.galaxyproject.org/Support"),
|
||||
'search_url' : app.config.get("search_url", "http://galaxyproject.org/search/usegalaxy/"),
|
||||
'mailing_lists' : app.config.get("mailing_lists", "https://wiki.galaxyproject.org/MailingLists"),
|
||||
'screencasts_url' : app.config.get("screencasts_url", "https://vimeo.com/galaxyproject"),
|
||||
'wiki_url' : app.config.get("wiki_url", "https://wiki.galaxyproject.org/"),
|
||||
'citation_url' : app.config.get("citation_url", "https://wiki.galaxyproject.org/CitingGalaxy"),
|
||||
'terms_url' : app.config.get("terms_url", ""),
|
||||
'allow_user_creation' : app.config.allow_user_creation,
|
||||
'logo_url' : h.url_for(app.config.get( 'logo_url', '/')),
|
||||
'is_admin_user' : trans.user_is_admin(),
|
||||
'ftp_upload_dir' : app.config.get("ftp_upload_dir", None),
|
||||
'ftp_upload_site' : app.config.get("ftp_upload_site", None),
|
||||
'datatypes_disable_auto' : app.config.get_bool("datatypes_disable_auto", False),
|
||||
'user' : {
|
||||
'requests' : bool(trans.user and (trans.user.requests or trans.app.security_agent.get_accessible_request_types(trans, trans.user))),
|
||||
'email' : escape( trans.user.email ) if (trans.user) else "",
|
||||
'valid' : bool(trans.user != None),
|
||||
'json' : get_user_dict()
|
||||
}
|
||||
</script>
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
<%def name="left_panel()">
|
||||
<div class="unified-panel-header" unselectable="on">
|
||||
<div class='unified-panel-header-inner with-upload-button'>
|
||||
${n_('Tools')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="unified-panel-body" style="overflow: auto">
|
||||
${render_tool_menu()}
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="center_panel()">
|
||||
|
||||
## If a specific tool id was specified, load it in the middle frame
|
||||
<%
|
||||
if trans.app.config.require_login and not trans.user:
|
||||
center_url = h.url_for( controller='user', action='login' )
|
||||
elif tool_id is not None:
|
||||
center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True, **params )
|
||||
elif workflow_id is not None:
|
||||
center_url = h.url_for( controller='workflow', action='run', id=workflow_id )
|
||||
elif m_c is not None:
|
||||
center_url = h.url_for( controller=m_c, action=m_a )
|
||||
else:
|
||||
center_url = h.url_for( controller="root", action="welcome" )
|
||||
%>
|
||||
|
||||
<div style="position: absolute; width: 100%; height: 100%">
|
||||
<iframe name="galaxy_main" id="galaxy_main" frameborder="0"
|
||||
style="position: absolute; width: 100%; height: 100%;" src="${center_url}"></iframe>
|
||||
</div>
|
||||
|
||||
</%def>
|
||||
|
||||
<%def name="right_panel()">
|
||||
<!-- current history panel -->
|
||||
<div class="unified-panel-header" unselectable="on">
|
||||
<div class="unified-panel-header-inner history-panel-header">
|
||||
<div style="float: right">
|
||||
<a id="history-refresh-button" class='panel-header-button' href="javascript:void(0)"
|
||||
title="${ _( 'Refresh history' ) }">
|
||||
<span class="fa fa-refresh"></span>
|
||||
</a>
|
||||
<a id="history-options-button" class='panel-header-button'
|
||||
href="${h.url_for( controller='root', action='history_options' )}" target="galaxy_main"
|
||||
title="${ _( 'History options' ) }">
|
||||
<span class="fa fa-cog"></span>
|
||||
</a>
|
||||
%if trans.user:
|
||||
<a id="history-view-multi-button" class='panel-header-button'
|
||||
href="${h.url_for( controller='history', action='view_multiple' )}"
|
||||
title="${ _( 'View all histories' ) }">
|
||||
<span class="fa fa-columns"></span>
|
||||
</a>
|
||||
%endif
|
||||
</div>
|
||||
<div class="panel-header-text">${_('History')}</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$( '#history-refresh-button' )
|
||||
.on( 'click', function(){
|
||||
if( top.Galaxy && top.Galaxy.currHistoryPanel ){
|
||||
top.Galaxy.currHistoryPanel.loadCurrentHistory();
|
||||
inside_galaxy_frameset = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
require([ 'mvc/history/options-menu' ], function( optionsMenu ){
|
||||
$(function(){
|
||||
//##TODO: Galaxy is not reliably available here since index doesn't use app
|
||||
var popupmenu = optionsMenu( $( "#history-options-button" ), {
|
||||
anonymous : ${ 'true' if not trans.user else 'false' },
|
||||
purgeAllowed : ${ 'true' if trans.app.config.allow_user_dataset_purge else 'false' },
|
||||
root : '${ h.url_for( "/" ) }'
|
||||
});
|
||||
Galaxy.historyOptionsMenu = popupmenu;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="unified-panel-body">
|
||||
<div id="current-history-panel" class="history-panel"></div>
|
||||
## Don't bootstrap data here - confuses the browser history: load via API
|
||||
<script type="text/javascript">
|
||||
require([ "mvc/history/history-panel-edit-current" ], function( historyPanel ){
|
||||
$(function(){
|
||||
var currPanel = new historyPanel.CurrentHistoryPanel({
|
||||
el : $( "#current-history-panel" ),
|
||||
purgeAllowed : Galaxy.config.allow_user_dataset_purge,
|
||||
linkTarget : 'galaxy_main',
|
||||
$scrollContainer: function(){ return this.$el.parent(); }
|
||||
});
|
||||
currPanel.connectToQuotaMeter( Galaxy.quotaMeter );
|
||||
currPanel.listenToGalaxy( Galaxy );
|
||||
currPanel.loadCurrentHistory();
|
||||
Galaxy.currHistoryPanel = currPanel;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</%def>
|
||||
}
|
||||
%>
|
||||
<script>
|
||||
require(['mvc/app/app-view'], function(App){
|
||||
$(function(){
|
||||
var app = new App(${ h.dumps(app_config) });
|
||||
$('body').append(app.$el);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user