mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #14535 from dannon/panel-cleanup
Panel init template cleanup
This commit is contained in:
@@ -77,11 +77,6 @@ export default {
|
||||
windowToggle: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.updateTab();
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
brandTitle() {
|
||||
let brandTitle = this.displayGalaxyBrand ? "Galaxy " : "";
|
||||
@@ -94,6 +89,11 @@ export default {
|
||||
return [].concat(this.tabs, this.extensionTabs);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.updateTab();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
loadWebhookMenuItems(this.extensionTabs);
|
||||
this.updateTab();
|
||||
|
||||
@@ -90,9 +90,6 @@ export default {
|
||||
return Boolean(this.formData[this.deleteActionKey]);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.setFormData();
|
||||
},
|
||||
watch: {
|
||||
formData() {
|
||||
// The formData shape is kind of unfortunate, but it is what we have now.
|
||||
@@ -121,6 +118,9 @@ export default {
|
||||
this.$emit("onChange", postJobActions);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.setFormData();
|
||||
},
|
||||
methods: {
|
||||
setFormData() {
|
||||
const pjas = {};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{ section.title }}
|
||||
<div class="toolSectionBody">
|
||||
<div v-for="(item, itemIndex) in section.items" :key="itemIndex" class="toolTitle">
|
||||
<router-link v-if="!item.disabled" class="title-link" :id="item.id" :to="item.route">
|
||||
<router-link v-if="!item.disabled" :id="item.id" class="title-link" :to="item.route">
|
||||
<small class="name">{{ item.title }}</small>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="columns">
|
||||
<SidePanel side="left" :currentPanel="getAdminPanel()" :current-panel-properties="panelProperties" />
|
||||
<SidePanel side="left" :current-panel="getAdminPanel()" :current-panel-properties="panelProperties" />
|
||||
<div id="center">
|
||||
<div class="center-container">
|
||||
<div class="center-panel" style="display: block">
|
||||
|
||||
@@ -51,23 +51,6 @@
|
||||
<%def name="late_javascripts()">
|
||||
<!--- base/base_panels.mako late_javascripts() -->
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var panelConfig = {
|
||||
left_panel: ${h.to_js_bool(self.has_left_panel)},
|
||||
right_panel: ${h.to_js_bool(self.has_right_panel)},
|
||||
rightPanelSelector: '#right',
|
||||
leftPanelSelector: '#left'
|
||||
};
|
||||
|
||||
// "late javascripts"
|
||||
config.addInitialization(function() {
|
||||
console.log("base/base_panels.mako, panel init");
|
||||
window.bundleEntries.panelManagement(panelConfig);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
%if t.webapp.name == 'galaxy' and app.config.ga_code:
|
||||
${galaxy_client.config_google_analytics(app.config.ga_code)}
|
||||
%endif
|
||||
|
||||
@@ -48,22 +48,6 @@
|
||||
<%def name="late_javascripts()">
|
||||
<!--- base/base_panels.mako late_javascripts() -->
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var panelConfig = {
|
||||
left_panel: ${h.to_js_bool(self.has_left_panel)},
|
||||
right_panel: ${h.to_js_bool(self.has_right_panel)},
|
||||
rightPanelSelector: '#right',
|
||||
leftPanelSelector: '#left'
|
||||
};
|
||||
|
||||
// "late javascripts"
|
||||
config.addInitialization(function() {
|
||||
console.log("base/base_panels.mako, panel init");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
%if t.webapp.name == 'galaxy' and app.config.ga_code:
|
||||
${galaxy_client.config_google_analytics(app.config.ga_code)}
|
||||
%endif
|
||||
|
||||
@@ -186,20 +186,10 @@
|
||||
## TODO: Some visualizations (and more?) currently use this config, should be refactored.
|
||||
window.galaxy_config = galaxyConfig;
|
||||
|
||||
var panelConfig = Object.assign(galaxyConfig, {
|
||||
rightPanelSelector: '#right',
|
||||
leftPanelSelector: '#left'
|
||||
});
|
||||
|
||||
config.addInitialization(function() {
|
||||
console.log("base/base_panels.mako, panel init");
|
||||
});
|
||||
|
||||
config.addInitialization(function() {
|
||||
console.log("base/base_panels.mako, panelConfig init");
|
||||
console.log("runs an init function named in python config", panelConfig);
|
||||
console.log("runs an init function named in python config", galaxyConfig);
|
||||
try {
|
||||
var initFn = panelConfig.app.jscript;
|
||||
var initFn = galaxyConfig.app.jscript;
|
||||
if (initFn in window.bundleEntries) {
|
||||
window.bundleEntries[initFn]();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user