mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Remove legacy iframe add helper
This commit is contained in:
@@ -96,7 +96,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { iframeAdd } from "components/plugins/legacyNavigation";
|
||||
import { StatelessTags } from "components/Tags";
|
||||
import { STATES, HIERARCHICAL_COLLECTION_JOB_STATES } from "./model/states";
|
||||
import CollectionDescription from "./Collection/CollectionDescription";
|
||||
@@ -204,7 +203,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onDisplay() {
|
||||
iframeAdd({ path: this.itemUrls.display, title: this.name, $router: this.$router });
|
||||
this.$router.push(this.itemUrls.display, this.name);
|
||||
},
|
||||
onDragStart(evt) {
|
||||
evt.dataTransfer.dropEffect = "move";
|
||||
|
||||
@@ -74,7 +74,6 @@ import { copy as sendToClipboard } from "utils/clipboard";
|
||||
import { absPath, prependPath } from "utils/redirect.js";
|
||||
import { downloadUrlMixin } from "./mixins.js";
|
||||
import DatasetDownload from "./DatasetDownload";
|
||||
import { iframeAdd } from "components/plugins/legacyNavigation";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -140,11 +139,8 @@ export default {
|
||||
this.$router.push(`/root?job_id=${this.item.creating_job}`);
|
||||
},
|
||||
onVisualize() {
|
||||
iframeAdd({
|
||||
path: this.itemUrls.visualize,
|
||||
title: `Visualization of ${this.item.name || ""}`,
|
||||
$router: this.$router,
|
||||
});
|
||||
const title = `Visualization of ${this.item.name || ""}`;
|
||||
this.$router.push(this.itemUrls.visualize, title);
|
||||
},
|
||||
onHighlight() {
|
||||
this.$emit("toggleHighlights");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
* Navigation mixin for legacy code. Supplies functions to components
|
||||
* to navigation to locations not controlled by Vue.
|
||||
*/
|
||||
|
||||
import { getGalaxyInstance } from "app";
|
||||
import { redirectToUrl, prependPath } from "utils/redirect";
|
||||
import _l from "utils/localization";
|
||||
|
||||
// wrapper for window manager
|
||||
export function iframeAdd({ path, title = "Galaxy", $router = null }) {
|
||||
$router.push(path);
|
||||
}
|
||||
|
||||
// straight ifrme redirect
|
||||
export function iframeRedirect(path, target = "galaxy_main") {
|
||||
@@ -37,7 +29,6 @@ export function redirect(path) {
|
||||
export const legacyNavigationMixin = {
|
||||
methods: {
|
||||
redirect,
|
||||
iframeAdd,
|
||||
iframeRedirect,
|
||||
prependPath,
|
||||
},
|
||||
|
||||
@@ -60,7 +60,7 @@ Vue.use(VueRouter);
|
||||
|
||||
// patches $router.push() to trigger an event and hide duplication warnings
|
||||
const originalPush = VueRouter.prototype.push;
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
VueRouter.prototype.push = function push(location, windowManagerTitle = null) {
|
||||
// verify if confirmation is required
|
||||
console.debug("VueRouter - push: ", location);
|
||||
if (this.confirmation) {
|
||||
@@ -70,17 +70,15 @@ VueRouter.prototype.push = function push(location) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// show location in window manager
|
||||
const Galaxy = getGalaxyInstance();
|
||||
if (Galaxy.frame && Galaxy.frame.active) {
|
||||
if (windowManagerTitle && Galaxy.frame && Galaxy.frame.active) {
|
||||
Galaxy.frame.add({
|
||||
title: "Data",
|
||||
url: location,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
// always emit event when a route is pushed
|
||||
this.app.$emit("router-push");
|
||||
// avoid console warning when user clicks to revisit same route
|
||||
|
||||
Reference in New Issue
Block a user