mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
IE8 support, general cleanups, from native to $ objects ...
This commit is contained in:
@@ -2,16 +2,13 @@
|
||||
|
||||
var ajaxify = {};
|
||||
|
||||
(function ($) {
|
||||
(function () {
|
||||
/*global app, templates, utils*/
|
||||
|
||||
var location = document.location || window.location,
|
||||
rootUrl = location.protocol + '//' + (location.hostname || location.host) + (location.port ? ':' + location.port : ''),
|
||||
content = null;
|
||||
|
||||
var current_state = null;
|
||||
var executed = {};
|
||||
|
||||
var events = [];
|
||||
ajaxify.register_events = function (new_page_events) {
|
||||
for (var i = 0, ii = events.length; i < ii; i++) {
|
||||
@@ -114,7 +111,7 @@ var ajaxify = {};
|
||||
|
||||
require(['vendor/async'], function(async) {
|
||||
$('#content [widget-area]').each(function() {
|
||||
widgetLocations.push(this.getAttribute('widget-area'));
|
||||
widgetLocations.push($(this).attr('widget-area'));
|
||||
});
|
||||
|
||||
async.each(widgetLocations, function(location, next) {
|
||||
@@ -127,7 +124,8 @@ var ajaxify = {};
|
||||
|
||||
if (!renderedWidgets.length) {
|
||||
$('body [no-widget-class]').each(function() {
|
||||
this.className = this.getAttribute('no-widget-class');
|
||||
var $this = $(this);
|
||||
$this.addClass($this.attr('no-widget-class'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -174,7 +172,7 @@ var ajaxify = {};
|
||||
app.previousUrl = window.location.href;
|
||||
}
|
||||
|
||||
if (this.getAttribute('data-ajaxify') === 'false') {
|
||||
if ($(this).attr('data-ajaxify') === 'false') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,4 +196,4 @@ var ajaxify = {};
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user