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