Enhancements in the backend.js comments.

This commit is contained in:
Alex Tselegidis 2016-05-14 12:38:25 +02:00
parent 482a863a98
commit 8dedc3368a
1 changed files with 16 additions and 19 deletions

View File

@ -12,8 +12,9 @@
window.Backend = window.Backend || {}; window.Backend = window.Backend || {};
/** /**
* This module contains functions that are used in the backend section of * Backend
* the application. *
* This module contains functions that are used in the backend section of the application.
* *
* @module Backend * @module Backend
*/ */
@ -25,13 +26,13 @@ window.Backend = window.Backend || {};
* Main javascript code for the backend of Easy!Appointments. * Main javascript code for the backend of Easy!Appointments.
*/ */
$(document).ready(function() { $(document).ready(function() {
if (window.console === undefined) { window.console = window.console || function() {}; // IE compatibility
window.console = function() {} // IE compatibility
}
$(window).resize(function() { $(window)
Backend.placeFooterToBottom(); .resize(function() {
}).trigger('resize'); Backend.placeFooterToBottom();
})
.trigger('resize');
$(document).ajaxStart(function() { $(document).ajaxStart(function() {
$('#loading').show(); $('#loading').show();
@ -96,21 +97,17 @@ window.Backend = window.Backend || {};
/** /**
* Display backend notifications to user. * Display backend notifications to user.
* *
* Using this method you can display notifications to the use with custom * Using this method you can display notifications to the use with custom messages. If the
* messages. If the 'actions' array is provided then an action link will * 'actions' array is provided then an action link will be displayed too.
* be displayed too.
* *
* @param {string} message Notification message * @param {String} message Notification message
* @param {array} actions An array with custom actions that will be available * @param {Array} actions An array with custom actions that will be available to the user. Every
* to the user. Every array item is an object that contains the 'label' and * array item is an object that contains the 'label' and 'function' key values.
* 'function' key values.
*/ */
exports.displayNotification = function(message, actions) { exports.displayNotification = function(message, actions) {
if (message == undefined) { message = message || 'NO MESSAGE PROVIDED FOR THIS NOTIFICATION';
message = 'NO MESSAGE PROVIDED FOR THIS NOTIFICATION';
}
if (actions == undefined) { if (actions === undefined) {
actions = []; actions = [];
setTimeout(function() { setTimeout(function() {
$('#notification').slideUp('slow'); $('#notification').slideUp('slow');