mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47: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
65
vendors/jquery-cookie/CHANGELOG.md
vendored
Normal file
65
vendors/jquery-cookie/CHANGELOG.md
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
HEAD
|
||||
-----
|
||||
|
||||
1.4.0
|
||||
-----
|
||||
- Support for AMD.
|
||||
|
||||
- Removed deprecated method `$.cookie('name', null)` for deleting a cookie,
|
||||
use `$.removeCookie('name')`.
|
||||
|
||||
- `$.cookie('name')` now returns `undefined` in case such cookie does not exist
|
||||
(was `null`). Because the return value is still falsy, testing for existence
|
||||
of a cookie like `if ( $.cookie('foo') )` keeps working without change.
|
||||
|
||||
- Renamed bower package definition (component.json -> bower.json) for usage
|
||||
with up-to-date bower.
|
||||
|
||||
- Badly encoded cookies no longer throw exception upon reading but do return
|
||||
undefined (similar to how we handle JSON parse errors with json = true).
|
||||
|
||||
- Added conversion function as optional last argument for reading,
|
||||
so that values can be changed to a different representation easily on the fly.
|
||||
Useful for parsing numbers for instance:
|
||||
|
||||
```javascript
|
||||
$.cookie('foo', '42');
|
||||
$.cookie('foo', Number); // => 42
|
||||
```
|
||||
|
||||
1.3.1
|
||||
-----
|
||||
- Fixed issue where it was no longer possible to check for an arbitrary cookie,
|
||||
while json is set to true, there was a SyntaxError thrown from JSON.parse.
|
||||
|
||||
- Fixed issue where RFC 2068 decoded cookies were not properly read.
|
||||
|
||||
1.3.0
|
||||
-----
|
||||
- Configuration options: `raw`, `json`. Replaces raw option, becomes config:
|
||||
|
||||
```javascript
|
||||
$.cookie.raw = true; // bypass encoding/decoding the cookie value
|
||||
$.cookie.json = true; // automatically JSON stringify/parse value
|
||||
```
|
||||
|
||||
Thus the default options now cleanly contain cookie attributes only.
|
||||
|
||||
- Removing licensing under GPL Version 2, the plugin is now released under MIT License only
|
||||
(keeping it simple and following the jQuery library itself here).
|
||||
|
||||
- Bugfix: Properly handle RFC 2068 quoted cookie values.
|
||||
|
||||
- Added component.json for bower.
|
||||
|
||||
- Added jQuery plugin package manifest.
|
||||
|
||||
- `$.cookie()` returns all available cookies.
|
||||
|
||||
1.2.0
|
||||
-----
|
||||
- Adding `$.removeCookie('foo')` for deleting a cookie, using `$.cookie('foo', null)` is now deprecated.
|
||||
|
||||
1.1
|
||||
---
|
||||
- Adding default options.
|
||||
53
vendors/jquery-cookie/CONTRIBUTING.md
vendored
Normal file
53
vendors/jquery-cookie/CONTRIBUTING.md
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
##Issues
|
||||
|
||||
- Report issues or feature requests on [GitHub Issues](https://github.com/carhartl/jquery-cookie/issues).
|
||||
- If reporting a bug, please add a [simplified example](http://sscce.org/).
|
||||
|
||||
##Pull requests
|
||||
- Create a new topic branch for every separate change you make.
|
||||
- Create a test case if you are fixing a bug or implementing an important feature.
|
||||
- Make sure the build runs successfully.
|
||||
|
||||
## Development
|
||||
|
||||
###Tools
|
||||
We use the following tools for development:
|
||||
|
||||
- [Qunit](http://qunitjs.com/) for tests.
|
||||
- [NodeJS](http://nodejs.org/download/) required to run grunt and the test server only.
|
||||
- [Grunt](http://gruntjs.com/getting-started) for task management.
|
||||
|
||||
###Getting started
|
||||
Install [NodeJS](http://nodejs.org/).
|
||||
Install globally grunt-cli using the following command:
|
||||
|
||||
$ npm install -g grunt-cli
|
||||
|
||||
Browse to the project root directory and install the dev dependencies:
|
||||
|
||||
$ npm install -d
|
||||
|
||||
To execute the build and tests run the following command in the root of the project:
|
||||
|
||||
$ grunt
|
||||
|
||||
You should see a green message in the console:
|
||||
|
||||
Done, without errors.
|
||||
|
||||
###Tests
|
||||
You can also run the tests in the browser.
|
||||
Start a test server from the project root:
|
||||
|
||||
$ node test/server.js
|
||||
|
||||
Open the following URL in a browser:
|
||||
|
||||
$ open http://0.0.0.0:8124/test/index.html
|
||||
|
||||
_Note: we recommend cleaning all the browser cookies before running the tests, that can avoid false positive failures._
|
||||
|
||||
###Automatic build
|
||||
You can build automatically after a file change using the following command:
|
||||
|
||||
$ grunt watch
|
||||
20
vendors/jquery-cookie/MIT-LICENSE.txt
vendored
Normal file
20
vendors/jquery-cookie/MIT-LICENSE.txt
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Copyright 2013 Klaus Hartl
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
148
vendors/jquery-cookie/README.md
vendored
Normal file
148
vendors/jquery-cookie/README.md
vendored
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
# jquery.cookie [](https://travis-ci.org/carhartl/jquery-cookie) [](https://codeclimate.com/github/carhartl/jquery-cookie)
|
||||
|
||||
A simple, lightweight jQuery plugin for reading, writing and deleting cookies.
|
||||
|
||||
## Build Status Matrix
|
||||
|
||||
[](https://saucelabs.com/u/jquery-cookie)
|
||||
|
||||
## Installation
|
||||
|
||||
Include script *after* the jQuery library (unless you are packaging scripts somehow else):
|
||||
|
||||
```html
|
||||
<script src="/path/to/jquery.cookie.js"></script>
|
||||
```
|
||||
|
||||
**Do not include the script directly from GitHub (http://raw.github.com/...).** The file is being served as text/plain and as such being blocked
|
||||
in Internet Explorer on Windows 7 for instance (because of the wrong MIME type). Bottom line: GitHub is not a CDN.
|
||||
|
||||
The plugin can also be loaded as AMD module.
|
||||
|
||||
## Usage
|
||||
|
||||
Create session cookie:
|
||||
|
||||
```javascript
|
||||
$.cookie('the_cookie', 'the_value');
|
||||
```
|
||||
|
||||
Create expiring cookie, 7 days from then:
|
||||
|
||||
```javascript
|
||||
$.cookie('the_cookie', 'the_value', { expires: 7 });
|
||||
```
|
||||
|
||||
Create expiring cookie, valid across entire site:
|
||||
|
||||
```javascript
|
||||
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });
|
||||
```
|
||||
|
||||
Read cookie:
|
||||
|
||||
```javascript
|
||||
$.cookie('the_cookie'); // => "the_value"
|
||||
$.cookie('not_existing'); // => undefined
|
||||
```
|
||||
|
||||
Read all available cookies:
|
||||
|
||||
```javascript
|
||||
$.cookie(); // => { "the_cookie": "the_value", "...remaining": "cookies" }
|
||||
```
|
||||
|
||||
Delete cookie:
|
||||
|
||||
```javascript
|
||||
// Returns true when cookie was found, false when no cookie was found...
|
||||
$.removeCookie('the_cookie');
|
||||
|
||||
// Same path as when the cookie was written...
|
||||
$.removeCookie('the_cookie', { path: '/' });
|
||||
```
|
||||
|
||||
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie, unless you're relying on the default options that is.*
|
||||
|
||||
## Configuration
|
||||
|
||||
### raw
|
||||
|
||||
By default the cookie value is encoded/decoded when writing/reading, using `encodeURIComponent`/`decodeURIComponent`. Bypass this by setting raw to true:
|
||||
|
||||
```javascript
|
||||
$.cookie.raw = true;
|
||||
```
|
||||
|
||||
### json
|
||||
|
||||
Turn on automatic storage of JSON objects passed as the cookie value. Assumes `JSON.stringify` and `JSON.parse`:
|
||||
|
||||
```javascript
|
||||
$.cookie.json = true;
|
||||
```
|
||||
|
||||
## Cookie Options
|
||||
|
||||
Cookie attributes can be set globally by setting properties of the `$.cookie.defaults` object or individually for each call to `$.cookie()` by passing a plain object to the options argument. Per-call options override the default options.
|
||||
|
||||
### expires
|
||||
|
||||
expires: 365
|
||||
|
||||
Define lifetime of the cookie. Value can be a `Number` which will be interpreted as days from time of creation or a `Date` object. If omitted, the cookie becomes a session cookie.
|
||||
|
||||
### path
|
||||
|
||||
path: '/'
|
||||
|
||||
Define the path where the cookie is valid. *By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).* If you want to make it available for instance across the entire domain use `path: '/'`. Default: path of page where the cookie was created.
|
||||
|
||||
**Note regarding Internet Explorer:**
|
||||
|
||||
> Due to an obscure bug in the underlying WinINET InternetGetCookie implementation, IE’s document.cookie will not return a cookie if it was set with a path attribute containing a filename.
|
||||
|
||||
(From [Internet Explorer Cookie Internals (FAQ)](http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx))
|
||||
|
||||
This means one cannot set a path using `path: window.location.pathname` in case such pathname contains a filename like so: `/check.html` (or at least, such cookie cannot be read correctly).
|
||||
|
||||
### domain
|
||||
|
||||
domain: 'example.com'
|
||||
|
||||
Define the domain where the cookie is valid. Default: domain of page where the cookie was created.
|
||||
|
||||
### secure
|
||||
|
||||
secure: true
|
||||
|
||||
If true, the cookie transmission requires a secure protocol (https). Default: `false`.
|
||||
|
||||
## Converters
|
||||
|
||||
Provide a conversion function as optional last argument for reading, in order to change the cookie's value
|
||||
to a different representation on the fly.
|
||||
|
||||
Example for parsing a value into a number:
|
||||
|
||||
```javascript
|
||||
$.cookie('foo', '42');
|
||||
$.cookie('foo', Number); // => 42
|
||||
```
|
||||
|
||||
Dealing with cookies that have been encoded using `escape` (3rd party cookies):
|
||||
|
||||
```javascript
|
||||
$.cookie.raw = true;
|
||||
$.cookie('foo', unescape);
|
||||
```
|
||||
|
||||
You can pass an arbitrary conversion function.
|
||||
|
||||
## Contributing
|
||||
|
||||
Check out the [Contributing Guidelines](CONTRIBUTING.md)
|
||||
|
||||
## Authors
|
||||
|
||||
[Klaus Hartl](https://github.com/carhartl)
|
||||
18
vendors/jquery-cookie/bower.json
vendored
Normal file
18
vendors/jquery-cookie/bower.json
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "jquery.cookie",
|
||||
"version": "1.4.0",
|
||||
"main": [
|
||||
"./jquery.cookie.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.2"
|
||||
},
|
||||
"ignore": [
|
||||
"test",
|
||||
".*",
|
||||
"*.json",
|
||||
"*.md",
|
||||
"*.txt",
|
||||
"Gruntfile.js"
|
||||
]
|
||||
}
|
||||
32
vendors/jquery-cookie/cookie.jquery.json
vendored
Normal file
32
vendors/jquery-cookie/cookie.jquery.json
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "cookie",
|
||||
"version": "1.4.0",
|
||||
"title": "jQuery Cookie",
|
||||
"description": "A simple, lightweight jQuery plugin for reading, writing and deleting cookies.",
|
||||
"author": {
|
||||
"name": "Klaus Hartl",
|
||||
"url": "https://github.com/carhartl"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Klaus Hartl",
|
||||
"url": "https://github.com/carhartl"
|
||||
},
|
||||
{
|
||||
"name": "Fagner Martins",
|
||||
"url": "https://github.com/FagnerMartinsBrack"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://raw.github.com/carhartl/jquery-cookie/master/MIT-LICENSE.txt"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.2"
|
||||
},
|
||||
"bugs": "https://github.com/carhartl/jquery-cookie/issues",
|
||||
"homepage": "https://github.com/carhartl/jquery-cookie",
|
||||
"docs": "https://github.com/carhartl/jquery-cookie#readme"
|
||||
}
|
||||
2
vendors/jquery-cookie/jquery.cookie-1.4.0.min.js
vendored
Normal file
2
vendors/jquery-cookie/jquery.cookie-1.4.0.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setDate(k.getDate()+j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
|
||||
113
vendors/jquery-cookie/jquery.cookie.js
vendored
Normal file
113
vendors/jquery-cookie/jquery.cookie.js
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/*!
|
||||
* jQuery Cookie Plugin v1.4.0
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2013 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
// Browser globals.
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluses = /\+/g;
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s);
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s);
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
// This is a quoted cookie as according to RFC2068, unescape...
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||
}
|
||||
|
||||
try {
|
||||
// Replace server-side written pluses with spaces.
|
||||
// If we can't decode the cookie, ignore it, it's unusable.
|
||||
// If we can't parse the cookie, ignore it, it's unusable.
|
||||
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||
return config.json ? JSON.parse(s) : s;
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s);
|
||||
return $.isFunction(converter) ? converter(value) : value;
|
||||
}
|
||||
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
|
||||
// Write
|
||||
if (value !== undefined && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setDate(t.getDate() + days);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encode(key), '=', stringifyCookieValue(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// Read
|
||||
|
||||
var result = key ? undefined : {};
|
||||
|
||||
// To prevent the for loop in the first place assign an empty array
|
||||
// in case there are no cookies at all. Also prevents odd result when
|
||||
// calling $.cookie().
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||
|
||||
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
var name = decode(parts.shift());
|
||||
var cookie = parts.join('=');
|
||||
|
||||
if (key && key === name) {
|
||||
// If second argument (value) is a function it's a converter...
|
||||
result = read(cookie, value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent storing a cookie that we couldn't decode.
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
config.defaults = {};
|
||||
|
||||
$.removeCookie = function (key, options) {
|
||||
if ($.cookie(key) === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Must not alter options, thus extending a fresh object...
|
||||
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||
return !$.cookie(key);
|
||||
};
|
||||
|
||||
}));
|
||||
31
vendors/jquery-cookie/package.json
vendored
Normal file
31
vendors/jquery-cookie/package.json
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "jquery.cookie",
|
||||
"version": "1.4.0",
|
||||
"description": "A simple, lightweight jQuery plugin for reading, writing and deleting cookies.",
|
||||
"main": "Gruntfile.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/carhartl/jquery-cookie.git"
|
||||
},
|
||||
"author": "Klaus Hartl",
|
||||
"license": "MIT",
|
||||
"gitHead": "bd3c9713222bace68d25fe2128c0f8633cad1269",
|
||||
"readmeFilename": "README.md",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-jshint": "~0.4.0",
|
||||
"grunt-contrib-uglify": "~0.2.0",
|
||||
"grunt-contrib-qunit": "~0.2.0",
|
||||
"grunt-contrib-watch": "~0.3.0",
|
||||
"grunt-compare-size": "~0.4.0",
|
||||
"grunt-saucelabs": "~4.1.1",
|
||||
"grunt-contrib-connect": "~0.5.0",
|
||||
"gzip-js": "~0.3.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue