mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
This reverts commit 1d666bf7f0.
This commit is contained in:
@@ -34,12 +34,6 @@ var ajaxify = {};
|
|||||||
ajaxify.currentPage = null;
|
ajaxify.currentPage = null;
|
||||||
|
|
||||||
ajaxify.go = function (url, callback, quiet) {
|
ajaxify.go = function (url, callback, quiet) {
|
||||||
if ($('#content').hasClass('ajaxifying')) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery('#footer, #content').addClass('ajaxifying');
|
|
||||||
|
|
||||||
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
||||||
$(window).off('scroll');
|
$(window).off('scroll');
|
||||||
app.enterRoom('global');
|
app.enterRoom('global');
|
||||||
@@ -54,6 +48,9 @@ var ajaxify = {};
|
|||||||
window.onscroll = null;
|
window.onscroll = null;
|
||||||
// end
|
// end
|
||||||
|
|
||||||
|
if ($('#content').hasClass('ajaxifying')) {
|
||||||
|
templates.cancelRequest();
|
||||||
|
}
|
||||||
|
|
||||||
// Remove trailing slash
|
// Remove trailing slash
|
||||||
url = url.replace(/\/$/, "");
|
url = url.replace(/\/$/, "");
|
||||||
@@ -101,12 +98,11 @@ var ajaxify = {};
|
|||||||
|
|
||||||
translator.load(tpl_url);
|
translator.load(tpl_url);
|
||||||
|
|
||||||
jQuery('#footer, #content').removeClass('hide');
|
jQuery('#footer, #content').removeClass('hide').addClass('ajaxifying');
|
||||||
|
|
||||||
templates.flush();
|
templates.flush();
|
||||||
templates.load_template(function () {
|
templates.load_template(function () {
|
||||||
exec_body_scripts(content);
|
exec_body_scripts(content);
|
||||||
|
|
||||||
require(['forum/' + tpl_url], function(script) {
|
require(['forum/' + tpl_url], function(script) {
|
||||||
if (script && script.init) {
|
if (script && script.init) {
|
||||||
script.init();
|
script.init();
|
||||||
@@ -176,6 +172,7 @@ var ajaxify = {};
|
|||||||
var url = this.href.replace(rootUrl + '/', '');
|
var url = this.href.replace(rootUrl + '/', '');
|
||||||
|
|
||||||
if (ajaxify.go(url)) {
|
if (ajaxify.go(url)) {
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
} else if (window.location.pathname !== '/outgoing') {
|
} else if (window.location.pathname !== '/outgoing') {
|
||||||
|
|||||||
@@ -366,7 +366,6 @@ define(['composer'], function(composer) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('.topic').on('click', '.post_reply', function() {
|
$('.topic').on('click', '.post_reply', function() {
|
||||||
var selectionText = '',
|
var selectionText = '',
|
||||||
selection = window.getSelection() || document.getSelection();
|
selection = window.getSelection() || document.getSelection();
|
||||||
|
|||||||
Reference in New Issue
Block a user