v1.18.x
psychobunny 10 years ago
parent 4360069859
commit e47c375e69

@ -10,13 +10,15 @@ $(document).ready(function() {
rootUrl = location.protocol + '//' + (location.hostname || location.host) + (location.port ? ':' + location.port : ''),
apiXHR = null;
window.onpopstate = function (event) {
if (event !== null && event.state && event.state.url !== undefined) {
ajaxify.go(event.state.url, function() {
$(window).trigger('action:popstate', {url: event.state.url});
$(window).on('popstate', function (ev) {
ev = ev.originalEvent;
if (ev !== null && ev.state && ev.state.url !== undefined) {
ajaxify.go(ev.state.url, function() {
$(window).trigger('action:popstate', {url: ev.state.url});
}, true);
}
};
});
ajaxify.currentPage = null;

@ -22,7 +22,7 @@ define('composer', [
$(window).off('resize', onWindowResize).on('resize', onWindowResize);
$(window).on('action:popstate', function(ev, data) {
$(window).on('popstate', function(ev, data) {
var env = utils.findBootstrapEnvironment();
if (composer.active && (env === 'xs' || env ==='sm')) {
@ -95,6 +95,11 @@ define('composer', [
composer.posts[uuid] = post;
composer.load(uuid);
var env = utils.findBootstrapEnvironment();
if (env === 'xs' || env ==='sm') {
history.pushState({}, '', '#compose');
}
}
function composerAlert(message) {

Loading…
Cancel
Save