58 lines
1.1 KiB
JavaScript
Raw Normal View History

"use strict";
jQuery( document ).ready(function( $ ) {
2016-08-28 11:27:05 -04:00
// ====================================
2016-08-27 21:46:10 -04:00
// Scroll
2016-08-28 11:27:05 -04:00
// ====================================
2016-08-27 21:46:10 -04:00
$('a').smoothScroll({
speed: 400,
2016-09-10 22:53:21 -04:00
offset: -70
});
var sticky = new Sticky('.stickyscroll');
2016-08-28 11:27:05 -04:00
// ====================================
// Notifications
// ====================================
$(window).bind('beforeunload', () => {
$('#notifload').addClass('active');
});
$(document).ajaxSend(() => {
$('#notifload').addClass('active');
}).ajaxComplete(() => {
$('#notifload').removeClass('active');
});
2016-08-27 21:46:10 -04:00
2016-08-23 21:09:09 -04:00
var alerts = new Alerts();
if(alertsData) {
_.forEach(alertsData, (alertRow) => {
alerts.push(alertRow);
});
}
// ====================================
// Establish WebSocket connection
// ====================================
var socket = io(ioHost);
2016-09-05 14:11:51 -04:00
//=include components/search.js
2016-08-28 11:27:05 -04:00
// ====================================
// Pages logic
// ====================================
//=include pages/view.js
//=include pages/create.js
2016-08-28 11:27:05 -04:00
//=include pages/edit.js
//=include pages/source.js
2016-08-28 11:27:05 -04:00
});
//=include helpers/form.js
2016-09-05 14:11:51 -04:00
//=include helpers/pages.js
//=include components/alerts.js