mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Adding config for enabling the new user preferences UI
This commit is contained in:
@@ -236,23 +236,10 @@ var Collection = Backbone.Collection.extend({
|
||||
title : 'Logged in as ' + Galaxy.user.get( 'email' )
|
||||
},
|
||||
{
|
||||
title : 'Preferences Mako',
|
||||
title : 'User Preferences',
|
||||
url : 'user?cntrller=user',
|
||||
target : 'galaxy_main'
|
||||
},
|
||||
{
|
||||
title : 'New Preferences',
|
||||
url : 'user',
|
||||
onclick : function() {
|
||||
if (Galaxy.app) {
|
||||
Galaxy.app.display(new Preferences.UserPreferences());
|
||||
}
|
||||
else {
|
||||
window.location = Galaxy.root + "user";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title : 'Custom Builds',
|
||||
url : 'user/dbkeys',
|
||||
@@ -280,6 +267,22 @@ var Collection = Backbone.Collection.extend({
|
||||
target : 'galaxy_main'
|
||||
}]
|
||||
};
|
||||
|
||||
if( window.Galaxy.config.enable_new_preferences ) {
|
||||
userTab.menu.push({
|
||||
title : 'New User Preferences UI',
|
||||
url : 'user',
|
||||
onclick : function() {
|
||||
if (Galaxy.app) {
|
||||
Galaxy.app.display(new Preferences.UserPreferences());
|
||||
}
|
||||
else {
|
||||
window.location = Galaxy.root + "user";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
options.use_remote_user && userTab.menu.push({
|
||||
title : 'Public Name',
|
||||
url : 'user/edit_username?cntrller=user',
|
||||
|
||||
@@ -138,10 +138,9 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
|
||||
_checkCommunicationServerOnline: function(){
|
||||
var host = window.Galaxy.config.communication_server_host,
|
||||
port = window.Galaxy.config.communication_server_port,
|
||||
$chat_icon_element = $( "#show-chat-online" ),
|
||||
communication_server = window.Galaxy.user.attributes.preferences.communication_server;
|
||||
$chat_icon_element = $( "#show-chat-online" );
|
||||
/** Check if the user has deactivated the communication in it's personal settings */
|
||||
if ( window.Galaxy.user.attributes.preferences !== undefined && ( communication_server === '1' || communication_server === 'true' ) ) {
|
||||
if ( window.Galaxy.user.attributes.preferences !== undefined && ( window.Galaxy.user.attributes.preferences.communication_server === '1' || window.Galaxy.user.attributes.preferences.communication_server === 'true' ) ) {
|
||||
// See if the configured communication server is available
|
||||
$.ajax({
|
||||
url: host + ":" + port,
|
||||
|
||||
@@ -188,4 +188,4 @@ define( [ 'mvc/form/form-view', 'mvc/ui/ui-misc' ], function( Form, Ui ) {
|
||||
return {
|
||||
UserPreferences: UserPreferences
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
+45
-80
@@ -125,11 +125,6 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# but prefixed with install_ are also available).
|
||||
#install_database_connection = sqlite:///./database/universe.sqlite?isolation_level=IMMEDIATE
|
||||
|
||||
# Setting the following option to true will cause Galaxy to automatically
|
||||
# migrate the database forward after updates. This is not recommended for production
|
||||
# use.
|
||||
#database_auto_migrate = False
|
||||
|
||||
# -- Files and directories
|
||||
|
||||
# Dataset files are stored in this directory.
|
||||
@@ -169,47 +164,39 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# <toolbox> tag.
|
||||
#tool_path = tools
|
||||
|
||||
# -- Tool dependencies
|
||||
|
||||
# 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
|
||||
# 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
|
||||
# Set the string to None to explicitly disable tool dependency handling.
|
||||
# Set to the string none to explicitly disable tool dependency handling.
|
||||
# If this option is set to none or an invalid path, installing tools with dependencies
|
||||
# from the Tool Shed will fail.
|
||||
# from the Tool Shed will fail.
|
||||
#tool_dependency_dir = database/dependencies
|
||||
|
||||
# The dependency resolvers config file specifies an ordering and options for how
|
||||
# The dependency resolves config file specifies an ordering and options for how
|
||||
# Galaxy resolves tool dependencies (requirement tags in Tool XML). The default
|
||||
# ordering is to the use the Tool Shed for tools installed that way, use local
|
||||
# Galaxy packages, and then use Conda if available.
|
||||
# ordering is to the use the tool shed for tools installed that way, use local
|
||||
# Galaxy packages, and then use conda if available.
|
||||
# See https://github.com/galaxyproject/galaxy/blob/dev/doc/source/admin/dependency_resolvers.rst
|
||||
# for more information on these options.
|
||||
#dependency_resolvers_config_file = config/dependency_resolvers_conf.xml
|
||||
|
||||
# The following Conda dependency resolution options will change the defaults for
|
||||
# all Conda resolvers, but multiple resolvers can be configured independently
|
||||
# in dependency_resolvers_config_file and these options overridden.
|
||||
# Location on the filesystem where Conda packages are installed
|
||||
|
||||
# conda_prefix is the location on the filesystem where Conda packages and environments are installed
|
||||
# IMPORTANT: Due to a current limitation in conda, the total length of the
|
||||
# conda_prefix and the job_working_directory path should be less than 50 characters!
|
||||
# Following conda dependeny resolution options are experimental as of early
|
||||
# 2016. These will change the defaults for each conda resolver, but multiple
|
||||
# resolvers can be configured independently and these options overridden in
|
||||
# dependency_resolvers_config_file.
|
||||
#conda_prefix = <tool_dependency_dir>/_conda
|
||||
# Override the Conda executable to use, it will default to the one on the
|
||||
# Override the conda executable to use, it will default to the one on the
|
||||
# PATH (if available) and then to <conda_prefix>/bin/conda
|
||||
#conda_exec =
|
||||
# Pass debug flag to conda commands.
|
||||
#conda_debug = False
|
||||
# conda channels to enable by default (http://conda.pydata.org/docs/custom-channels.html)
|
||||
#conda_ensure_channels = conda-forge,r,bioconda,iuc
|
||||
#conda_ensure_channels = r,bioconda,iuc
|
||||
# Set to True to instruct Galaxy to look for and install missing tool
|
||||
# dependencies before each job runs.
|
||||
#conda_auto_install = False
|
||||
# Set to True to perform additional checking of installed Conda environment
|
||||
#conda_verbose_install_check=False
|
||||
# Set to True to instruct Galaxy to install Conda from the web automatically
|
||||
# Set to True to instruct Galaxy to install conda from the web automatically
|
||||
# if it cannot find a local copy and conda_exec is not configured.
|
||||
#conda_auto_init = False
|
||||
|
||||
@@ -228,31 +215,6 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# than the watchdog default.
|
||||
#watch_tools = False
|
||||
|
||||
# Enable Galaxy to fetch Docker containers registered with quay.io generated
|
||||
# from tool requirements resolved through conda. These containers (when
|
||||
# available) have been generated using mulled - https://github.com/mulled.
|
||||
# These containers are highly beta and availablity will vary by tool.
|
||||
# This option will additionally only be used for job destinations with
|
||||
# Docker enabled.
|
||||
#enable_beta_mulled_containers = False
|
||||
|
||||
# Container resolvers configuration (beta). Setup a file describing container
|
||||
# resolvers to use when discovering containers for Galaxy. If this is set to
|
||||
# None, the default containers loaded is determined by
|
||||
# enable_beta_mulled_containers.
|
||||
#containers_resolvers_config_file = None
|
||||
|
||||
# involucro is a tool used to build Docker containers for tools from Conda
|
||||
# dependencies referenced in tools as `requirement`s. The following path is
|
||||
# the location of involucro on the Galaxy host. This is ignored if the relevant
|
||||
# container resolver isn't enabled, and will install on demand unless
|
||||
# involucro_auto_init is set to False.
|
||||
#involucro_path = database/dependencies/involucro
|
||||
|
||||
# Install involucro as needed to build Docker containers for tools. Ignored if
|
||||
# relevant container resolver is not used.
|
||||
#involucro_auto_init = True
|
||||
|
||||
# Enable automatic polling of relative tool sheds to see if any updates
|
||||
# are available for installed repositories. Ideally only one Galaxy
|
||||
# server process should be able to check for repository updates. The
|
||||
@@ -324,12 +286,6 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# separated list.
|
||||
#tour_config_dir = config/plugins/tours
|
||||
|
||||
# Webhooks directory: where to store webhooks - plugins to extend the Galaxy UI.
|
||||
# By default none will be loaded. Set to config/plugins/webhooks/demo to load Galaxy's
|
||||
# demo webhooks. To use an absolute path begin the path with '/'. This is a comma
|
||||
# separated list.
|
||||
# webhooks_dir = config/plugins/webhooks
|
||||
|
||||
# Each job is given a unique empty directory as its current working directory.
|
||||
# This option defines in what parent directory those directories will be
|
||||
# created.
|
||||
@@ -351,6 +307,7 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# Time to sleep between checks if check_job_script_integrity is enabled (in seconds).
|
||||
#check_job_script_integrity_sleep = .25
|
||||
|
||||
|
||||
# Set the default shell used by non-containerized jobs Galaxy-wide. This
|
||||
# defaults to bash for all jobs and can be overidden at the destination
|
||||
# level for heterogenous clusters. conda job resolution requires bash or zsh
|
||||
@@ -452,19 +409,16 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
|
||||
# Activation grace period (in hours). Activation is not forced (login is not
|
||||
# disabled) until grace period has passed. Users under grace period can't run
|
||||
# jobs. Enter 0 to disable grace period.
|
||||
# jobs (see inactivity_box_content). Default is 3. Enter 0 to disable grace
|
||||
# period.
|
||||
# Users with OpenID logins have grace period forever.
|
||||
#activation_grace_period = 3
|
||||
#activation_grace_period = 0
|
||||
|
||||
# Shown in warning box to users that were not activated yet.
|
||||
# Used for warning box for inactive accounts (unable to run jobs).
|
||||
# In use only if activation_grace_period is set.
|
||||
#inactivity_box_content = Your account has not been activated yet. Feel free to browse around and see what's available, but you won't be able to upload data or run jobs until you have verified your email address.
|
||||
|
||||
# Password expiration period (in days). Users are required to change their
|
||||
# password every x days. Users will be redirected to the change password
|
||||
# screen when they log in after their password expires. Enter 0 to disable
|
||||
# password expiration.
|
||||
#password_expiration_period = 0
|
||||
|
||||
|
||||
# Galaxy Session Timeout
|
||||
# This provides a timeout (in minutes) after which a user will have to log back in.
|
||||
@@ -564,13 +518,13 @@ nglims_config_file = tool-data/nglims.yaml
|
||||
# The URL linked by the "How to Cite Galaxy" link in the "Help" menu.
|
||||
#citation_url = https://wiki.galaxyproject.org/CitingGalaxy
|
||||
|
||||
# The URL linked by the "Search" link in the "Help" menu.
|
||||
#The URL linked by the "Search" link in the "Help" menu.
|
||||
#search_url = http://galaxyproject.org/search/usegalaxy/
|
||||
|
||||
# The URL linked by the "Mailing Lists" link in the "Help" menu.
|
||||
#The URL linked by the "Mailing Lists" link in the "Help" menu.
|
||||
#mailing_lists_url = https://wiki.galaxyproject.org/MailingLists
|
||||
|
||||
# The URL linked by the "Videos" link in the "Help" menu.
|
||||
#The URL linked by the "Videos" link in the "Help" menu.
|
||||
#screencasts_url = https://vimeo.com/galaxyproject
|
||||
|
||||
# The URL linked by the "Terms and Conditions" link in the "Help" menu, as well
|
||||
@@ -662,7 +616,7 @@ nglims_config_file = tool-data/nglims.yaml
|
||||
# implementation, alongside a new Golang single-binary-no-dependencies
|
||||
# version. Valid values are (node, golang)
|
||||
#dynamic_proxy=node
|
||||
|
||||
#
|
||||
# The NodeJS dynamic proxy can use an SQLite database or a JSON file for IPC,
|
||||
# set that here.
|
||||
#dynamic_proxy_session_map=database/session_map.sqlite
|
||||
@@ -732,6 +686,7 @@ nglims_config_file = tool-data/nglims.yaml
|
||||
# log_events and log_actions functionality will eventually be merged.
|
||||
#log_actions = True
|
||||
|
||||
|
||||
# Fluentd configuration. Various events can be logged to the fluentd instance
|
||||
# configured below by enabling fluent_log.
|
||||
#fluent_log = False
|
||||
@@ -892,10 +847,11 @@ use_interactive = True
|
||||
# Galaxy encodes various internal values when these values will be output in
|
||||
# some format (for example, in a URL or cookie). You should set a key to be
|
||||
# used by the algorithm that encodes and decodes these values. It can be any
|
||||
# string.
|
||||
# string. If left unchanged, anyone could construct a cookie that would grant
|
||||
# them access to others' sessions.
|
||||
# One simple way to generate a value for this is with the shell command:
|
||||
# python -c 'import time; print time.time()' | md5sum | cut -f 1 -d ' '
|
||||
#id_secret = USING THE DEFAULT IS NOT SECURE!
|
||||
id_secret = passwordabc
|
||||
|
||||
# User authentication can be delegated to an upstream proxy server (usually
|
||||
# Apache). The upstream proxy should set a REMOTE_USER header in the request.
|
||||
@@ -966,7 +922,7 @@ use_interactive = True
|
||||
# Allow users to remove their datasets from disk immediately (otherwise,
|
||||
# datasets will be removed after a time period specified by an administrator in
|
||||
# the cleanup scripts run via cron)
|
||||
#allow_user_dataset_purge = True
|
||||
#allow_user_dataset_purge = False
|
||||
|
||||
# By default, users' data will be public, but setting this to True will cause
|
||||
# it to be private. Does not affect existing users and data, only ones created
|
||||
@@ -984,17 +940,23 @@ use_interactive = True
|
||||
#expose_user_email = False
|
||||
|
||||
# -- Beta features
|
||||
|
||||
# Enable new run workflow form
|
||||
#run_workflow_toolform_upgrade = True
|
||||
#run_workflow_toolform_upgrade = False
|
||||
|
||||
# Enable Galaxy to communicate directly with a sequencer
|
||||
#enable_sequencer_communication = False
|
||||
|
||||
# Separate tool command from rest of job script so tool dependencies
|
||||
# don't interfer with metadata generation.
|
||||
# Despite the name, this feature is enabled by default
|
||||
# in 16.01 and the option will go away in the future.
|
||||
#enable_beta_tool_command_isolation = True
|
||||
|
||||
# Enable the new interface for installing tools from Tool Shed
|
||||
# via the API. Admin menu will list both if enabled.
|
||||
#enable_beta_ts_api_install = False
|
||||
|
||||
|
||||
# Set the following to a number of threads greater than 1 to spawn
|
||||
# a Python task queue for dealing with large tool submissions (either
|
||||
# through the tool form or as part of an individual workflow step across
|
||||
@@ -1206,14 +1168,14 @@ use_interactive = True
|
||||
# if running many handlers.
|
||||
#cache_user_job_count = False
|
||||
|
||||
# -- ToolBox filtering
|
||||
# ToolBox filtering
|
||||
|
||||
# Modules from lib/galaxy/tools/toolbox/filters/ can be specified in
|
||||
# the following lines. tool_* filters will be applied for all users
|
||||
# and can not be changed by them. user_tool_* filters will be shown
|
||||
# under user preferences and can be toggled on and off at
|
||||
# under user preferences and can be toogled on and off by
|
||||
# runtime. Example shown below are not real defaults (no custom
|
||||
# filters are applied by default), but can be enabled by renaming the
|
||||
# filters applied by defualt) but can be enabled with by renaming the
|
||||
# example.py.sample in the filters directory to example.py.
|
||||
|
||||
#tool_filters =
|
||||
@@ -1228,7 +1190,7 @@ use_interactive = True
|
||||
# modifying the following option.
|
||||
#toolbox_filter_base_modules = galaxy.tools.toolbox.filters,galaxy.tools.filters
|
||||
|
||||
# -- Galaxy Application Internal Message Queue
|
||||
# Galaxy Application Internal Message Queue
|
||||
|
||||
# Galaxy uses AMQP internally TODO more documentation on what for.
|
||||
# For examples, see http://ask.github.io/kombu/userguide/connections.html
|
||||
@@ -1244,9 +1206,11 @@ use_interactive = True
|
||||
#enable_communication_server = False
|
||||
#communication_server_host = http://localhost
|
||||
#communication_server_port = 7070
|
||||
# persistent_communication_rooms is a comma-separated list of rooms that should be always available.
|
||||
#persistent_communication_rooms =
|
||||
#persistent_communication_rooms is a comma-separated list of rooms that should be always be available.
|
||||
#persistent_communication_rooms = RNA-seq, Room 1, Room ABC
|
||||
|
||||
# Enable new preferences which showcases new UI for the user preferences
|
||||
enable_new_preferences = False
|
||||
|
||||
# ---- Galaxy External Message Queue -------------------------------------------------
|
||||
|
||||
@@ -1268,3 +1232,4 @@ use_interactive = True
|
||||
#exchange = galaxy_exchange
|
||||
#routing_key = bar_code_scanner
|
||||
#rabbitmqctl_path = /path/to/rabbitmqctl
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ class Configuration( object ):
|
||||
self.communication_server_host = kwargs.get( 'communication_server_host', 'http://localhost' )
|
||||
self.communication_server_port = int( kwargs.get( 'communication_server_port', '7070' ) )
|
||||
self.persistent_communication_rooms = listify( kwargs.get( "persistent_communication_rooms", [] ), do_strip=True )
|
||||
self.enable_new_preferences = string_as_bool( kwargs.get( 'enable_new_preferences', 'False' ) )
|
||||
# External Service types used in sample tracking
|
||||
self.external_service_type_path = resolve_path( kwargs.get( 'external_service_type_path', 'external_service_types' ), self.root )
|
||||
# Tasked job runner.
|
||||
|
||||
@@ -56,6 +56,7 @@ class ConfigSerializer( base.ModelSerializer ):
|
||||
'communication_server_host' : _defaults_to( None ),
|
||||
'communication_server_port' : _defaults_to( None ),
|
||||
'persistent_communication_rooms' : _defaults_to( None ),
|
||||
'enable_new_preferences' : _defaults_to( False ),
|
||||
'allow_user_creation' : _defaults_to( False ),
|
||||
'use_remote_user' : _defaults_to( None ),
|
||||
'remote_user_logout_href' : _defaults_to( '' ),
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","Masthead","Panel","Modal","BaseMVC","PageLayoutView","Backbone","View","extend","LoggableMixin","_logNamespace","el","className","_panelIds","defaultOptions","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","initialize","options","this","log","_","pick","defaults","omit","config","Galaxy","modal","masthead","$el","attr","html","_template","append","frame","$","replaceWith","$messagebox","$inactivebox","render","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","root","text","page","forEach","panelId","has","setElement","left","center","css","right","join","hideSidePanels","toString","host","window","communication_server_host","port","communication_server_port","$chat_icon_element","communication_server","user","attributes","preferences","undefined","ajax","url","success","id","error"],"mappings":"AAAAA,QACI,kBACA,eACA,kBACA,gBACD,SAAUC,EAAUC,EAAOC,EAAOC,GAGrC,GAAIC,GAAiBC,SAASC,KAAKC,OAAQJ,EAAQK,eAAgBD,QAC/DE,cAAgB,SAEhBC,GAAK,OACLC,UAAY,eAEZC,WACI,OAAQ,SAAU,SAGtBC,gBACIC,qBAA0B,EAC1BC,oBAA0B,GAC1BC,kBAA0B,OAC1BC,yBAA0B,EAC1BC,uBAA0B,IAG9BC,WAAa,SAAUC,GAEnBC,KAAKC,IAAKD,KAAO,eAAgBD,GACjCG,EAAEhB,OAAQc,KAAME,EAAEC,KAAMJ,EAASC,KAAKT,YACtCS,KAAKD,QAAUG,EAAEE,SAAUF,EAAEG,KAAMN,EAAQO,OAAQN,KAAKT,WAAaS,KAAKR,gBAC1Ee,OAAOC,MAAQR,KAAKQ,MAAQ,GAAI3B,GAAMI,KACtCe,KAAKS,SAAW,GAAI9B,GAASM,KAAMe,KAAKD,SACxCC,KAAKU,IAAIC,KAAM,SAAU,MACzBX,KAAKU,IAAIE,KAAMZ,KAAKa,aACpBb,KAAKU,IAAII,OAAQd,KAAKS,SAASM,MAAML,KACrCV,KAAKgB,EAAG,aAAcC,YAAajB,KAAKS,SAASC,KACjD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AIiC,IAAK,QAAS,GAE3B3C,MAIXa,UAAW,WACP,OACI,wBACI,yBACA,uBACA,yBACA,yDACAb,KAAKyC,KAAQ,oBAAsB,GACnCzC,KAAK0C,OAAQ,sCAAwC,GACrD1C,KAAK4C,MAAQ,qBAAuB,GACxC,SACA,0BACFC,KAAK,KAIXC,eAAiB,WACT9C,KAAKyC,MACLzC,KAAKyC,KAAKT,OAEVhC,KAAK4C,OACL5C,KAAK4C,MAAMZ,QAInBe,SAAW,WAAa,MAAO,kBAG/BtB,gCAAiC,WAC7B,GAAIuB,GAAOC,OAAO1C,OAAOD,OAAO4C,0BAC5BC,EAAOF,OAAO1C,OAAOD,OAAO8C,0BAC5BC,EAAqBrC,EAAG,qBACxBsC,EAAuBL,OAAO1C,OAAOgD,KAAKC,WAAWC,YAAYH,oBAElBI,UAA9CT,OAAO1C,OAAOgD,KAAKC,WAAWC,aAAwD,MAAzBH,GAAyD,SAAzBA,EAkB9FD,EAAmBV,IAAK,aAAc,UAhBtC3B,EAAE2C,MACEC,IAAKZ,EAAO,IAAMG,IAErBU,QAAS,WAE4B,OAA1BZ,OAAO1C,OAAOgD,KAAKO,IAC4B,WAA3CT,EAAmBV,IAAK,eACxBU,EAAmBV,IAAK,aAAc,aAIrDoB,MAAO,WAEJV,EAAmBV,IAAK,aAAc,cASlD,QACI5D,eAAgBA"}
|
||||
{"version":3,"file":"page.js","sources":["../../src/layout/page.js"],"names":["define","Masthead","Panel","Modal","BaseMVC","PageLayoutView","Backbone","View","extend","LoggableMixin","_logNamespace","el","className","_panelIds","defaultOptions","message_box_visible","message_box_content","message_box_class","show_inactivity_warning","inactivity_box_content","initialize","options","this","log","_","pick","defaults","omit","config","Galaxy","modal","masthead","$el","attr","html","_template","append","frame","$","replaceWith","$messagebox","$inactivebox","render","remove","renderMessageBox","renderInactivityBox","renderPanels","_checkCommunicationServerOnline","content","level","addClass","toggle","show","removeClass","hide","verificationLink","root","text","page","forEach","panelId","has","setElement","left","center","css","right","join","hideSidePanels","toString","host","window","communication_server_host","port","communication_server_port","$chat_icon_element","undefined","user","attributes","preferences","communication_server","ajax","url","success","id","error"],"mappings":"AAAAA,QACI,kBACA,eACA,kBACA,gBACD,SAAUC,EAAUC,EAAOC,EAAOC,GAGrC,GAAIC,GAAiBC,SAASC,KAAKC,OAAQJ,EAAQK,eAAgBD,QAC/DE,cAAgB,SAEhBC,GAAK,OACLC,UAAY,eAEZC,WACI,OAAQ,SAAU,SAGtBC,gBACIC,qBAA0B,EAC1BC,oBAA0B,GAC1BC,kBAA0B,OAC1BC,yBAA0B,EAC1BC,uBAA0B,IAG9BC,WAAa,SAAUC,GAEnBC,KAAKC,IAAKD,KAAO,eAAgBD,GACjCG,EAAEhB,OAAQc,KAAME,EAAEC,KAAMJ,EAASC,KAAKT,YACtCS,KAAKD,QAAUG,EAAEE,SAAUF,EAAEG,KAAMN,EAAQO,OAAQN,KAAKT,WAAaS,KAAKR,gBAC1Ee,OAAOC,MAAQR,KAAKQ,MAAQ,GAAI3B,GAAMI,KACtCe,KAAKS,SAAW,GAAI9B,GAASM,KAAMe,KAAKD,SACxCC,KAAKU,IAAIC,KAAM,SAAU,MACzBX,KAAKU,IAAIE,KAAMZ,KAAKa,aACpBb,KAAKU,IAAII,OAAQd,KAAKS,SAASM,MAAML,KACrCV,KAAKgB,EAAG,aAAcC,YAAajB,KAAKS,SAASC,KACjDV,KAAKU,IAAII,OAAQd,KAAKQ,MAAME,KAC5BV,KAAKkB,YAAclB,KAAKgB,EAAG,eAC3BhB,KAAKmB,aAAenB,KAAKgB,EAAG,iBAGhCI,OAAS,WASL,MAPAJ,GAAG,8BAA+BK,SAClCrB,KAAKC,IAAKD,KAAO,YACjBA,KAAKS,SAASW,SACdpB,KAAKsB,mBACLtB,KAAKuB,sBACLvB,KAAKwB,eACLxB,KAAKyB,kCACEzB,MAIXsB,iBAAmB,WACf,GAAKtB,KAAKD,QAAQN,oBAAqB,CACnC,GAAIiC,GAAU1B,KAAKD,QAAQL,qBAAu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,0BAC5BC,EAAOF,OAAO1C,OAAOD,OAAO8C,0BAC5BC,EAAqBrC,EAAG,oBAEuBsC,UAA9CL,OAAO1C,OAAOgD,KAAKC,WAAWC,aAAkG,MAAnER,OAAO1C,OAAOgD,KAAKC,WAAWC,YAAYC,sBAAmG,SAAnET,OAAO1C,OAAOgD,KAAKC,WAAWC,YAAYC,qBAkBlLL,EAAmBV,IAAK,aAAc,UAhBtC3B,EAAE2C,MACEC,IAAKZ,EAAO,IAAMG,IAErBU,QAAS,WAE4B,OAA1BZ,OAAO1C,OAAOgD,KAAKO,IAC4B,WAA3CT,EAAmBV,IAAK,eACxBU,EAAmBV,IAAK,aAAc,aAIrDoB,MAAO,WAEJV,EAAmBV,IAAK,aAAc,cASlD,QACI5D,eAAgBA"}
|
||||
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
@@ -1,2 +1,2 @@
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal","mvc/base-mvc"],function(a,b,c,d){var e=Backbone.View.extend(d.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(b){this.log(this+".initialize:",b),_.extend(this,_.pick(b,this._panelIds)),this.options=_.defaults(_.omit(b.config,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new c.View,this.masthead=new a.View(this.options),this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$el.append(this.masthead.frame.$el),this.$("#masthead").replaceWith(this.masthead.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox")},render:function(){return $(".select2-hidden-accessible").remove(),this.log(this+".render:"),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this._checkCommunicationServerOnline(),this},renderMessageBox:function(){if(this.options.message_box_visible){var a=this.options.message_box_content||"",b=this.options.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+b+"-message").html(a).toggle(!!a).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.options.show_inactivity_warning){var a=this.options.inactivity_box_content||"",b=$("<a/>").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(a+" ").append(b).toggle(!!a).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var a=this;return this._panelIds.forEach(function(b){_.has(a,b)&&(a[b].setElement("#"+b),a[b].render())}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},_template:function(){return['<div id="everything">','<div id="background"/>','<div id="masthead"/>','<div id="messagebox"/>','<div id="inactivebox" class="panel-warning-message" />',this.left?'<div id="left" />':"",this.center?'<div id="center" class="inbound" />':"",this.right?'<div id="right" />':"","</div>",'<div id="dd-helper" />'].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"},_checkCommunicationServerOnline:function(){var a=window.Galaxy.config.communication_server_host,b=window.Galaxy.config.communication_server_port,c=$("#show-chat-online"),d=window.Galaxy.user.attributes.preferences.communication_server;void 0===window.Galaxy.user.attributes.preferences||"1"!==d&&"true"!==d?c.css("visibility","hidden"):$.ajax({url:a+":"+b}).success(function(){null!==window.Galaxy.user.id&&"hidden"===c.css("visibility")&&c.css("visibility","visible")}).error(function(){c.css("visibility","hidden")})}});return{PageLayoutView:e}});
|
||||
define(["layout/masthead","layout/panel","mvc/ui/ui-modal","mvc/base-mvc"],function(a,b,c,d){var e=Backbone.View.extend(d.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(b){this.log(this+".initialize:",b),_.extend(this,_.pick(b,this._panelIds)),this.options=_.defaults(_.omit(b.config,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new c.View,this.masthead=new a.View(this.options),this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$el.append(this.masthead.frame.$el),this.$("#masthead").replaceWith(this.masthead.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox")},render:function(){return $(".select2-hidden-accessible").remove(),this.log(this+".render:"),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this._checkCommunicationServerOnline(),this},renderMessageBox:function(){if(this.options.message_box_visible){var a=this.options.message_box_content||"",b=this.options.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+b+"-message").html(a).toggle(!!a).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.options.show_inactivity_warning){var a=this.options.inactivity_box_content||"",b=$("<a/>").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(a+" ").append(b).toggle(!!a).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var a=this;return this._panelIds.forEach(function(b){_.has(a,b)&&(a[b].setElement("#"+b),a[b].render())}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},_template:function(){return['<div id="everything">','<div id="background"/>','<div id="masthead"/>','<div id="messagebox"/>','<div id="inactivebox" class="panel-warning-message" />',this.left?'<div id="left" />':"",this.center?'<div id="center" class="inbound" />':"",this.right?'<div id="right" />':"","</div>",'<div id="dd-helper" />'].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"},_checkCommunicationServerOnline:function(){var a=window.Galaxy.config.communication_server_host,b=window.Galaxy.config.communication_server_port,c=$("#show-chat-online");void 0===window.Galaxy.user.attributes.preferences||"1"!==window.Galaxy.user.attributes.preferences.communication_server&&"true"!==window.Galaxy.user.attributes.preferences.communication_server?c.css("visibility","hidden"):$.ajax({url:a+":"+b}).success(function(){null!==window.Galaxy.user.id&&"hidden"===c.css("visibility")&&c.css("visibility","visible")}).error(function(){c.css("visibility","hidden")})}});return{PageLayoutView:e}});
|
||||
//# sourceMappingURL=../../maps/layout/page.js.map
|
||||
Reference in New Issue
Block a user