1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 16:36:47 +02:00

Retain global page components between routes

This commit is contained in:
Toby Zerner
2016-04-08 13:38:16 +09:30
parent 01c0cf443b
commit 6dd190114d
8 changed files with 94 additions and 8 deletions

27
js/admin/dist/app.js vendored
View File

@@ -17419,6 +17419,14 @@ System.register('flarum/components/AlertManager', ['flarum/Component', 'flarum/c
})
);
}
}, {
key: 'config',
value: function config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
}, {
key: 'show',
value: function show(component) {
@@ -18703,6 +18711,14 @@ System.register('flarum/components/HeaderPrimary', ['flarum/Component', 'flarum/
listItems(this.items().toArray())
);
}
}, {
key: 'config',
value: function config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
}, {
key: 'items',
value: function items() {
@@ -18748,6 +18764,14 @@ System.register('flarum/components/HeaderSecondary', ['flarum/Component', 'flaru
listItems(this.items().toArray())
);
}
}, {
key: 'config',
value: function config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
}, {
key: 'items',
value: function items() {
@@ -19073,6 +19097,9 @@ System.register('flarum/components/ModalManager', ['flarum/Component', 'flarum/c
value: function config(isInitialized, context) {
if (isInitialized) return;
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
this.$().on('hidden.bs.modal', this.clear.bind(this)).on('shown.bs.modal', this.onready.bind(this));

View File

@@ -15,6 +15,13 @@ export default class HeaderPrimary extends Component {
);
}
config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
/**
* Build an item list for the controls.
*

View File

@@ -15,6 +15,13 @@ export default class HeaderSecondary extends Component {
);
}
config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
/**
* Build an item list for the controls.
*