mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Uploading and preparing the repository to the dev version.
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
This commit is contained in:
parent
afad45137e
commit
4cc2207513
846 changed files with 99453 additions and 2123 deletions
69
vendors/jquery-wakeup/jquery.wakeup.js
vendored
Normal file
69
vendors/jquery-wakeup/jquery.wakeup.js
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*!
|
||||
* jQuery WakeUp plugin
|
||||
*
|
||||
* A JQuery plugin that will help detecting waking up from sleep and/or
|
||||
* hibernation and executing assigned functions.
|
||||
*
|
||||
* Based on code provided by Andrew Mu:
|
||||
* http://stackoverflow.com/questions/4079115
|
||||
*
|
||||
* Copyright (c) 2013, Paul Okopny <paul.okopny@gmail.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
(function ($, document, undefined) {
|
||||
var default_wakeup_interval = 1000;
|
||||
var wake_up_ids = new Array();
|
||||
// returns intervalId, which can be used to cancel future waking
|
||||
$.wakeUp = function (on_wakeup, params, interval) {
|
||||
|
||||
if ((!interval) || typeof(interval) !== 'number' ){
|
||||
interval = default_wakeup_interval;
|
||||
};
|
||||
// on_wakeup should be a function
|
||||
if (typeof(on_wakeup) !== "function") {
|
||||
return null;
|
||||
}
|
||||
var lastTime = (new Date()).getTime();
|
||||
var intervalId = setInterval(function() {
|
||||
var currentTime = (new Date()).getTime();
|
||||
if (currentTime > (lastTime + interval + 1000)) { //
|
||||
var sleepTime = currentTime - lastTime;
|
||||
lastTime = currentTime;
|
||||
if (params) {
|
||||
on_wakeup(sleepTime, params);} else {on_wakeup(sleepTime); }
|
||||
} else {lastTime = currentTime;}
|
||||
}, interval);
|
||||
//add interval id to wake_up_ids array
|
||||
wake_up_ids.push(intervalId);
|
||||
return intervalId;
|
||||
};
|
||||
|
||||
$.ignoreBell = function(interval_id) {
|
||||
if (interval_id) {
|
||||
// delete only one wakeUp call
|
||||
wake_up_ids.splice($.inArray(interval_id, wake_up_ids),1);
|
||||
clearInterval(interval_id);
|
||||
};
|
||||
};
|
||||
|
||||
$.dreamOn = function() {
|
||||
// delete all current wake Up calls
|
||||
$.each(wake_up_ids, function(index_of, interval_id) {
|
||||
clearInterval(interval_id)
|
||||
});
|
||||
wake_up_ids = new Array();
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
||||
2
vendors/jquery-wakeup/jquery.wakeup.min.js
vendored
Normal file
2
vendors/jquery-wakeup/jquery.wakeup.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*! jQuery WakeUp plugin (c) 2013 Paul Okopny <paul.okopny@gmail.com> | MIT */
|
||||
!function(a){var b=1e3,c=new Array;a.wakeUp=function(a,d,e){if(e&&"number"==typeof e||(e=b),"function"!=typeof a)return null;var f=(new Date).getTime(),g=setInterval(function(){var b=(new Date).getTime();if(b>f+e+1e3){var c=b-f;f=b,d?a(c,d):a(c)}else f=b},e);return c.push(g),g},a.ignoreBell=function(b){b&&(c.splice(a.inArray(b,c),1),clearInterval(b))},a.dreamOn=function(){a.each(c,function(a,b){clearInterval(b)}),c=new Array}}(jQuery,document);
|
||||
Loading…
Add table
Add a link
Reference in a new issue