IE8 support, general cleanups, from native to $ objects ...

This commit is contained in:
akhoury
2014-02-26 21:55:29 -05:00
parent b59c10a1e9
commit 1b207d8276
32 changed files with 714 additions and 812 deletions

View File

@@ -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));
}());