/** * Notifications for ProcessWire * * By Avoine and Ryan Cramer * */ var Notifications = { options: { // options that may be passed to init(), these are the defaults: ajaxURL: './', // URL to poll for ajax updates version: 1, // notifications version reverse: 0, updateLast: 0, updateDelay: 5000, updateDelayFast: 1550, iconMessage: 'smile-o', iconWarning: 'meh-o', iconError: 'frown-o', iconRemove: 'times-circle', classCommon: 'NoticeItem', classMessage: 'NoticeMessage', classWarning: 'NoticeWarning', classError: 'NoticeError', classDebug: 'NoticeDebug', classContainer: 'container', ghostDelay: 2000, ghostDelayError: 4000, ghostFadeSpeed: 'fast', ghostOpacity: 0.9, ghostLimit: 20, // max ghosts that that may be shown together processKey: '', // key for session processes (NPK.ClassName.pageID.userID.windowName) i18n: { sec: 'sec', secs: 'secs', min: 'min', mins: 'mins', hour: 'hour', hours: 'hours', day: 'day', days: 'days', expires: 'expires', now: 'now', fromNow: 'from now', ago: 'ago' } }, updateTimeout: null, // setTimeout timer for update method renderTimeout: null, // setTimeout timer for render method timerTimeout: null, // setTimeout timer for updateTime() updating: false, // are we currently updating right now? runtime: [], // notifications added by manual API add calls numRender: 0, // number of times render() has been called numEmptyRequests: 0, // number of empty ajax requests in a row, that had no new data ghostsActive: 0, // number of ghosts currently visible currentDelay: 0, // current updateDelay value turbo: false, // whether there is a lot of activity (like with progress bars) timeNow: 0, // current unix timestamp useSession: false, // supports use of sessionStorage? $menu: null, //