mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Add build task in Grunt script.
Minor fixes
This commit is contained in:
parent
ea4262e954
commit
67e6084276
18 changed files with 321 additions and 129 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -4,6 +4,6 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
/build/dist
|
/build/dist
|
||||||
/build/tmp
|
/build/tmp
|
||||||
/data/*.*
|
/releases
|
||||||
/data/**
|
/data
|
||||||
!/data/VERSION
|
!/data/VERSION
|
||||||
61
.jshintrc
Normal file
61
.jshintrc
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"curly" : true,
|
||||||
|
"eqeqeq" : true,
|
||||||
|
"forin" : true,
|
||||||
|
"immed" : true,
|
||||||
|
"latedef" : true,
|
||||||
|
"newcap" : true,
|
||||||
|
"noarg" : true,
|
||||||
|
"noempty" : true,
|
||||||
|
"nonew" : true,
|
||||||
|
"regexp" : true,
|
||||||
|
"undef" : true,
|
||||||
|
"strict" : true,
|
||||||
|
|
||||||
|
"asi" : false,
|
||||||
|
"boss" : false,
|
||||||
|
"debug" : false,
|
||||||
|
"eqnull" : false,
|
||||||
|
"es5" : false,
|
||||||
|
"esnext" : false,
|
||||||
|
"evil" : false,
|
||||||
|
"expr" : false,
|
||||||
|
"funcscope" : false,
|
||||||
|
"globalstrict" : false,
|
||||||
|
"iterator" : false,
|
||||||
|
"lastsemic" : false,
|
||||||
|
"laxbreak" : false,
|
||||||
|
"laxcomma" : false,
|
||||||
|
"loopfunc" : false,
|
||||||
|
"multistr" : false,
|
||||||
|
"onecase" : false,
|
||||||
|
"proto" : false,
|
||||||
|
"regexdash" : false,
|
||||||
|
"scripturl" : false,
|
||||||
|
"smarttabs" : false,
|
||||||
|
"shadow" : false,
|
||||||
|
"supernew" : false,
|
||||||
|
"validthis" : false,
|
||||||
|
"passfail" : false,
|
||||||
|
"nomen" : false,
|
||||||
|
"white" : false,
|
||||||
|
|
||||||
|
"sub" : true,
|
||||||
|
"onevar" : true,
|
||||||
|
"bitwise" : false,
|
||||||
|
"plusplus" : false,
|
||||||
|
"trailing" : false,
|
||||||
|
"devel" : false,
|
||||||
|
"browser" : true,
|
||||||
|
"jquery" : true,
|
||||||
|
|
||||||
|
"globals": {
|
||||||
|
"ko" : true,
|
||||||
|
"moment" : true,
|
||||||
|
"crossroads" : true,
|
||||||
|
"hasher" : true,
|
||||||
|
"Jua" : true,
|
||||||
|
"_" : true,
|
||||||
|
"Dropbox" : true
|
||||||
|
}
|
||||||
|
}
|
||||||
215
Gruntfile.js
215
Gruntfile.js
|
|
@ -3,120 +3,103 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
module.exports = function (grunt) {
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON("package.json"),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
|
cfg: {
|
||||||
|
devVersion: "0.0.0",
|
||||||
|
releasesPath: 'releases',
|
||||||
|
releaseFolder: 'rainloop',
|
||||||
|
releaseZipFile: 'rainloop.zip'
|
||||||
|
},
|
||||||
less: {
|
less: {
|
||||||
development: {
|
development: {
|
||||||
files: {
|
files: {
|
||||||
"rainloop/v/<%= pkg.version %>/static/css/less.css": "dev/Styles/@Main.less"
|
'rainloop/v/<%= cfg.devVersion %>/static/css/less.css': 'dev/Styles/@Main.less'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
|
options: {
|
||||||
|
reporter: require('jshint-stylish'),
|
||||||
|
jshintrc: '.jshintrc'
|
||||||
|
},
|
||||||
files: [
|
files: [
|
||||||
'Gruntfile.js',
|
'Gruntfile.js',
|
||||||
'rainloop/v/<%= pkg.version %>/static/js/app.js',
|
'rainloop/v/<%= cfg.devVersion %>/static/js/app.js',
|
||||||
'rainloop/v/<%= pkg.version %>/static/js/admin.js'
|
'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js'
|
||||||
],
|
]
|
||||||
options: {
|
|
||||||
boss: true,
|
|
||||||
browser: true,
|
|
||||||
curly: true,
|
|
||||||
eqeqeq: true,
|
|
||||||
eqnull: true,
|
|
||||||
expr: true,
|
|
||||||
evil: true,
|
|
||||||
newcap: true,
|
|
||||||
noarg: true,
|
|
||||||
undef: true,
|
|
||||||
smarttabs: true,
|
|
||||||
sub: true,
|
|
||||||
globals: {
|
|
||||||
define: true,
|
|
||||||
window: true,
|
|
||||||
jQuery: true,
|
|
||||||
ko: true,
|
|
||||||
console: true,
|
|
||||||
moment: true,
|
|
||||||
crossroads: true,
|
|
||||||
hasher: true,
|
|
||||||
Jua: true,
|
|
||||||
_: true,
|
|
||||||
Dropbox: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
options: {
|
options: {
|
||||||
compress: true,
|
|
||||||
mangle: true,
|
mangle: true,
|
||||||
preserveComments: "some"
|
compress: true,
|
||||||
|
preserveComments: 'some'
|
||||||
},
|
},
|
||||||
cookie: {
|
cookie: {
|
||||||
options: {
|
options: {
|
||||||
banner: "/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n",
|
banner: '/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n',
|
||||||
preserveComments: "false"
|
preserveComments: 'false'
|
||||||
},
|
},
|
||||||
src: "vendors/jquery-cookie/jquery.cookie.js",
|
src: 'vendors/jquery-cookie/jquery.cookie.js',
|
||||||
dest: "vendors/jquery-cookie/jquery.cookie-1.4.0.min.js"
|
dest: 'vendors/jquery-cookie/jquery.cookie-1.4.0.min.js'
|
||||||
},
|
},
|
||||||
wakeup: {
|
wakeup: {
|
||||||
options: {
|
options: {
|
||||||
banner: "/*! jQuery WakeUp plugin (c) 2013 Paul Okopny <paul.okopny@gmail.com> | MIT */\n",
|
banner: '/*! jQuery WakeUp plugin (c) 2013 Paul Okopny <paul.okopny@gmail.com> | MIT */\n',
|
||||||
preserveComments: "false"
|
preserveComments: 'false'
|
||||||
},
|
},
|
||||||
src: "vendors/jquery-wakeup/jquery.wakeup.js",
|
src: 'vendors/jquery-wakeup/jquery.wakeup.js',
|
||||||
dest: "vendors/jquery-wakeup/jquery.wakeup.min.js"
|
dest: 'vendors/jquery-wakeup/jquery.wakeup.min.js'
|
||||||
},
|
},
|
||||||
mousewheel: {
|
mousewheel: {
|
||||||
options: {
|
options: {
|
||||||
banner: "/*! jquery.mousewheel v3.1.4 (c) 2013 Brandon Aaron (http://brandon.aaron.sh) | MIT */\n",
|
banner: '/*! jquery.mousewheel v3.1.4 (c) 2013 Brandon Aaron (http://brandon.aaron.sh) | MIT */\n',
|
||||||
preserveComments: "false"
|
preserveComments: 'false'
|
||||||
},
|
},
|
||||||
src: "vendors/jquery-mousewheel/jquery.mousewheel.js",
|
src: 'vendors/jquery-mousewheel/jquery.mousewheel.js',
|
||||||
dest: "vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js"
|
dest: 'vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js'
|
||||||
},
|
},
|
||||||
nano: {
|
nano: {
|
||||||
options: {
|
options: {
|
||||||
banner: "/*! nanoScrollerJS v0.7 (c) 2013 James Florentino; modified by RainLoop Team | MIT */\n",
|
banner: "/*! nanoScrollerJS v0.7 (c) 2013 James Florentino; modified by RainLoop Team | MIT */\n",
|
||||||
preserveComments: "false"
|
preserveComments: "false"
|
||||||
},
|
},
|
||||||
src: "vendors/jquery-nanoscroller/jquery.nanoscroller.js",
|
src: 'vendors/jquery-nanoscroller/jquery.nanoscroller.js',
|
||||||
dest: "vendors/jquery-nanoscroller/jquery.nanoscroller-0.7.min.js"
|
dest: 'vendors/jquery-nanoscroller/jquery.nanoscroller-0.7.min.js'
|
||||||
},
|
},
|
||||||
pace: {
|
pace: {
|
||||||
src: "vendors/simple-pace/simple-pace.js",
|
src: 'vendors/simple-pace/simple-pace.js',
|
||||||
dest: "vendors/simple-pace/simple-pace-1.0.min.js"
|
dest: 'vendors/simple-pace/simple-pace-1.0.min.js'
|
||||||
},
|
},
|
||||||
rl: {
|
rl: {
|
||||||
src: "vendors/rl/rl.js",
|
src: 'vendors/rl/rl.js',
|
||||||
dest: "vendors/rl/rl-1.0.min.js"
|
dest: 'vendors/rl/rl-1.0.min.js'
|
||||||
},
|
},
|
||||||
min_app: {
|
min_app: {
|
||||||
src: "rainloop/v/<%= pkg.version %>/static/js/app.js",
|
src: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.js',
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/app.min.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.min.js'
|
||||||
},
|
},
|
||||||
min_admin: {
|
min_admin: {
|
||||||
src: "rainloop/v/<%= pkg.version %>/static/js/admin.js",
|
src: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js',
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/admin.min.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.min.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
concat: {
|
concat: {
|
||||||
js_index: {
|
js_index: {
|
||||||
nonull: true,
|
nonull: true,
|
||||||
src: [
|
src: [
|
||||||
"vendors/json2.min.js",
|
'vendors/json2.min.js',
|
||||||
"vendors/simple-pace/simple-pace-1.0.min.js",
|
'vendors/simple-pace/simple-pace-1.0.min.js',
|
||||||
"vendors/rl/rl-1.0.min.js"
|
'vendors/rl/rl-1.0.min.js'
|
||||||
],
|
],
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/boot.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/boot.js'
|
||||||
},
|
},
|
||||||
js_libs: {
|
js_libs: {
|
||||||
nonull: true,
|
nonull: true,
|
||||||
options: {
|
options: {
|
||||||
separator: "\n\n"
|
separator: '\n\n'
|
||||||
},
|
},
|
||||||
src: [
|
src: [
|
||||||
"vendors/modernizr.js",
|
"vendors/modernizr.js",
|
||||||
|
|
@ -140,15 +123,15 @@ module.exports = function(grunt) {
|
||||||
"vendors/bootstrap/js/bootstrap.min.js",
|
"vendors/bootstrap/js/bootstrap.min.js",
|
||||||
"dev/Common/_LibsEnd.js"
|
"dev/Common/_LibsEnd.js"
|
||||||
],
|
],
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/libs.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/libs.js'
|
||||||
},
|
},
|
||||||
js_admin: {
|
js_admin: {
|
||||||
nonull: true,
|
nonull: true,
|
||||||
options: {
|
options: {
|
||||||
stripBanners: true,
|
stripBanners: true,
|
||||||
banner: "/*! RainLoop Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n" +
|
banner: '/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n' +
|
||||||
"(function (window, $, ko, crossroads, hasher, _) {\n",
|
'(function (window, $, ko, crossroads, hasher, _) {\n',
|
||||||
footer: "\n\n}(window, jQuery, ko, crossroads, hasher, _));"
|
footer: '\n\n}(window, jQuery, ko, crossroads, hasher, _));'
|
||||||
},
|
},
|
||||||
src: [
|
src: [
|
||||||
"dev/Common/_Begin.js",
|
"dev/Common/_Begin.js",
|
||||||
|
|
@ -213,15 +196,15 @@ module.exports = function(grunt) {
|
||||||
"dev/Common/_End.js",
|
"dev/Common/_End.js",
|
||||||
"dev/Common/_CoreEnd.js"
|
"dev/Common/_CoreEnd.js"
|
||||||
],
|
],
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/admin.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js'
|
||||||
},
|
},
|
||||||
js_app: {
|
js_app: {
|
||||||
nonull: true,
|
nonull: true,
|
||||||
options: {
|
options: {
|
||||||
stripBanners: true,
|
stripBanners: true,
|
||||||
banner: "/*! RainLoop Webmail Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n" +
|
banner: '/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n' +
|
||||||
"(function (window, $, ko, crossroads, hasher, moment, Jua, _) {\n",
|
'(function (window, $, ko, crossroads, hasher, moment, Jua, _) {\n',
|
||||||
footer: "\n\n}(window, jQuery, ko, crossroads, hasher, moment, Jua, _));"
|
footer: '\n\n}(window, jQuery, ko, crossroads, hasher, moment, Jua, _));'
|
||||||
},
|
},
|
||||||
src: [
|
src: [
|
||||||
"dev/Common/_Begin.js",
|
"dev/Common/_Begin.js",
|
||||||
|
|
@ -309,7 +292,7 @@ module.exports = function(grunt) {
|
||||||
"dev/Common/_End.js",
|
"dev/Common/_End.js",
|
||||||
"dev/Common/_CoreEnd.js"
|
"dev/Common/_CoreEnd.js"
|
||||||
],
|
],
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/js/app.js"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.js'
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
nonull: true,
|
nonull: true,
|
||||||
|
|
@ -324,16 +307,48 @@ module.exports = function(grunt) {
|
||||||
"vendors/jquery-magnific-popup/magnific-popup-animations.css",
|
"vendors/jquery-magnific-popup/magnific-popup-animations.css",
|
||||||
"vendors/simple-pace/styles.css",
|
"vendors/simple-pace/styles.css",
|
||||||
"vendors/flags/flags-fixed.css",
|
"vendors/flags/flags-fixed.css",
|
||||||
"rainloop/v/<%= pkg.version %>/static/css/less.css"
|
"rainloop/v/<%= cfg.devVersion %>/static/css/less.css"
|
||||||
],
|
],
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/css/app.css"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/css/app.css'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cssmin: {
|
cssmin: {
|
||||||
css: {
|
css: {
|
||||||
src: "rainloop/v/<%= pkg.version %>/static/css/app.css",
|
src: 'rainloop/v/<%= cfg.devVersion %>/static/css/app.css',
|
||||||
dest: "rainloop/v/<%= pkg.version %>/static/css/app.min.css"
|
dest: 'rainloop/v/<%= cfg.devVersion %>/static/css/app.min.css'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
compress: {
|
||||||
|
build: {
|
||||||
|
options: {
|
||||||
|
archive: '<%= cfg.releasesPath %>/<%= cfg.releaseFolder %>/<%= cfg.releaseZipFile %>',
|
||||||
|
mode: 'zip'
|
||||||
|
},
|
||||||
|
files: [{
|
||||||
|
expand: true,
|
||||||
|
cwd: '<%= cfg.releasesPath %>/<%= cfg.releaseFolder %>/src/',
|
||||||
|
src: ['**/*']
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
md5: {
|
||||||
|
build: {
|
||||||
|
files: {
|
||||||
|
'<%= cfg.releasesPath %>/<%= cfg.releaseFolder %>/':
|
||||||
|
'<%= cfg.releasesPath %>/<%= cfg.releaseFolder %>/<%= cfg.releaseZipFile %>'
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
keepExtension: true,
|
||||||
|
keepBasename: true,
|
||||||
|
after: function () {
|
||||||
|
grunt.file['delete']([
|
||||||
|
grunt.config('cfg.releasesPath'), grunt.config('cfg.releaseFolder'), grunt.config('cfg.releaseZipFile')
|
||||||
|
].join("/"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -342,41 +357,75 @@ module.exports = function(grunt) {
|
||||||
options: {
|
options: {
|
||||||
nospawn: true
|
nospawn: true
|
||||||
},
|
},
|
||||||
files: ["dev/**/*.js"],
|
files: ['dev/**/*.js'],
|
||||||
tasks: ["concat:js_libs", "concat:js_admin", "concat:js_app"]
|
tasks: ['concat:js_libs', 'concat:js_admin', 'concat:js_app']
|
||||||
},
|
},
|
||||||
styles: {
|
styles: {
|
||||||
options: {
|
options: {
|
||||||
nospawn: true
|
nospawn: true
|
||||||
},
|
},
|
||||||
files: ["dev/Styles/*.less"],
|
files: ['dev/Styles/*.less'],
|
||||||
tasks: ["less", "concat:css"]
|
tasks: ['less', 'concat:css']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// dependencies
|
// dependencies
|
||||||
for (var key in grunt.file.readJSON('package.json').devDependencies) {
|
for (var key in grunt.file.readJSON('package.json').devDependencies) {
|
||||||
if (key !== 'grunt' && key.indexOf('grunt') === 0) {
|
if (key.indexOf('grunt-') === 0) {
|
||||||
grunt.loadNpmTasks(key);
|
grunt.loadNpmTasks(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grunt.registerTask('rainloop', 'RainLoop Webmail build task', function () {
|
||||||
|
|
||||||
|
var
|
||||||
|
version = grunt.config('pkg.version'),
|
||||||
|
release = grunt.config('pkg.release'),
|
||||||
|
releasesPath = grunt.config('cfg.releasesPath'),
|
||||||
|
devVersion = grunt.config('cfg.devVersion'),
|
||||||
|
versionFull = version + '.' + release,
|
||||||
|
dist = releasesPath + '/' + versionFull + '/src/',
|
||||||
|
packageJsonContent = grunt.file.read('package.json')
|
||||||
|
;
|
||||||
|
|
||||||
|
grunt.file.mkdir(dist);
|
||||||
|
grunt.file.mkdir(dist + 'data');
|
||||||
|
grunt.file.mkdir(dist + 'rainloop/v/' + versionFull);
|
||||||
|
|
||||||
|
require('wrench').copyDirSyncRecursive('rainloop/v/' + devVersion,
|
||||||
|
dist + 'rainloop/v/' + versionFull, {'forceDelete': true});
|
||||||
|
|
||||||
|
grunt.file.copy('index.php', dist + 'index.php');
|
||||||
|
|
||||||
|
grunt.file.write(dist + 'data/VERSION', versionFull);
|
||||||
|
grunt.file.write(dist + 'rainloop/v/' + versionFull + '/VERSION', versionFull);
|
||||||
|
|
||||||
|
grunt.file.write('package.json',
|
||||||
|
packageJsonContent.replace(/"release":\s?"[\d]+",/, '"release": "' + (1 + parseInt(release, 10)) + '",'));
|
||||||
|
|
||||||
|
grunt.config.set('cfg.releaseFolder', versionFull);
|
||||||
|
grunt.config.set('cfg.releaseZipFile', 'rainloop-' + versionFull + '.zip');
|
||||||
|
});
|
||||||
|
|
||||||
// uglify
|
// uglify
|
||||||
|
grunt.registerTask('rlmin', ['uglify:min_app', 'uglify:min_admin']);
|
||||||
|
|
||||||
|
// uglify (optional)
|
||||||
grunt.registerTask('mousewheel', ['uglify:mousewheel']);
|
grunt.registerTask('mousewheel', ['uglify:mousewheel']);
|
||||||
grunt.registerTask('wakeup', ['uglify:wakeup']);
|
grunt.registerTask('wakeup', ['uglify:wakeup']);
|
||||||
grunt.registerTask('nano', ['uglify:nano']);
|
grunt.registerTask('nano', ['uglify:nano']);
|
||||||
grunt.registerTask('pace', ['uglify:pace']);
|
grunt.registerTask('pace', ['uglify:pace']);
|
||||||
grunt.registerTask('rl', ['uglify:rl']);
|
grunt.registerTask('rl', ['uglify:rl']);
|
||||||
grunt.registerTask('cookie', ['uglify:cookie']);
|
grunt.registerTask('cookie', ['uglify:cookie']);
|
||||||
grunt.registerTask('rainloop', ['uglify:min_app', 'uglify:min_admin']);
|
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
grunt.registerTask('default', ['less', 'concat', 'jshint', 'cssmin', 'rainloop']);
|
grunt.registerTask('default', ['less', 'concat', 'cssmin', 'jshint', 'rlmin']);
|
||||||
|
grunt.registerTask('build', ['default', 'rlmin', 'rainloop', 'compress:build', 'md5:build']);
|
||||||
|
|
||||||
// aliases
|
// aliases
|
||||||
grunt.registerTask('ant', ['default']); // special for ant task
|
|
||||||
grunt.registerTask('u', ['uglify']);
|
grunt.registerTask('u', ['uglify']);
|
||||||
grunt.registerTask('h', ['jshint']);
|
grunt.registerTask('h', ['jshint']);
|
||||||
|
grunt.registerTask('b', ['build']);
|
||||||
grunt.registerTask('w', ['watch']);
|
grunt.registerTask('w', ['watch']);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ function RainLoopApp()
|
||||||
this.iSuggestionsLimit = 0 === this.iSuggestionsLimit ? 20 : this.iSuggestionsLimit;
|
this.iSuggestionsLimit = 0 === this.iSuggestionsLimit ? 20 : this.iSuggestionsLimit;
|
||||||
|
|
||||||
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
|
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
|
||||||
|
|
||||||
|
$.wakeUp(function (iSleepTime) {
|
||||||
|
RL.remote().jsInfo(Utils.emptyFunction, {'WakeUpTime': Math.round(iSleepTime / 1000)}, true);
|
||||||
|
}, {}, 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(RainLoopApp.prototype, AbstractApp.prototype);
|
_.extend(RainLoopApp.prototype, AbstractApp.prototype);
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ ko.bindingHandlers.draggable = {
|
||||||
moveUp();
|
moveUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
if (oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
||||||
{
|
{
|
||||||
moveDown = function() {
|
moveDown = function() {
|
||||||
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
||||||
|
|
|
||||||
|
|
@ -1209,7 +1209,7 @@ Utils.fakeMd5 = function(iLen)
|
||||||
|
|
||||||
while (sResult.length < iLen)
|
while (sResult.length < iLen)
|
||||||
{
|
{
|
||||||
sResult += sLine.substr(window.Math.round(window.Math.random() * sLine.length), 1);
|
sResult += sLine.substr(Math.round(Math.random() * sLine.length), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sResult;
|
return sResult;
|
||||||
|
|
@ -1311,7 +1311,7 @@ Utils.settingsSaveHelperSimpleFunction = function (koTrigger, oContext)
|
||||||
|
|
||||||
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
{
|
{
|
||||||
var oTempImg = new Image();
|
var oTempImg = new window.Image();
|
||||||
oTempImg.onload = function() {
|
oTempImg.onload = function() {
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?AdminApp}
|
* @type {?AdminApp}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?RainLoopApp}
|
* @type {?RainLoopApp}
|
||||||
|
|
|
||||||
|
|
@ -247,3 +247,18 @@ AbstractAjaxRemoteStorage.prototype.jsError = function (fCallback, sMessage, sFi
|
||||||
'TimeOnPage': iTime
|
'TimeOnPage': iTime
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {string} sType
|
||||||
|
* @param {Array=} mData = null
|
||||||
|
* @param {boolean=} bIsError = false
|
||||||
|
*/
|
||||||
|
AbstractAjaxRemoteStorage.prototype.jsInfo = function (fCallback, sType, mData, bIsError)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'JsInfo', {
|
||||||
|
'Type': sType,
|
||||||
|
'Data': mData,
|
||||||
|
'IsError': (Utils.isUnd(bIsError) ? false : !!bIsError) ? '1' : '0'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ html.rl-no-preview-pane {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.html {
|
&.html {
|
||||||
.mailso-body {
|
div[data-x-div-type=body] {
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -536,7 +536,7 @@ PopupsComposeViewModel.prototype.saveMessageResponse = function (sResult, oData)
|
||||||
|
|
||||||
if (this.modalVisibility())
|
if (this.modalVisibility())
|
||||||
{
|
{
|
||||||
this.savedTime(window.Math.round((new window.Date()).getTime() / 1000));
|
this.savedTime(Math.round((new window.Date()).getTime() / 1000));
|
||||||
|
|
||||||
this.savedOrSendingText(
|
this.savedOrSendingText(
|
||||||
0 < this.savedTime() ? Utils.i18n('COMPOSE/SAVED_TIME', {
|
0 < this.savedTime() ? Utils.i18n('COMPOSE/SAVED_TIME', {
|
||||||
|
|
|
||||||
22
package.json
22
package.json
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "0.0.0",
|
"version": "1.4.0",
|
||||||
|
"release": "506",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
|
|
@ -35,13 +36,20 @@
|
||||||
"plugins"
|
"plugins"
|
||||||
],
|
],
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"wrench": "*",
|
||||||
|
"jshint-stylish": "*",
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-css": ">0.0.0",
|
"grunt-css": "*",
|
||||||
"grunt-contrib-jshint": "~0.4.0",
|
"grunt-md5": "*",
|
||||||
"grunt-contrib-concat": ">0.0.0",
|
"grunt-contrib-jshint": "*",
|
||||||
"grunt-contrib-less": "~0.5.0",
|
"grunt-contrib-compress": "*",
|
||||||
"grunt-contrib-uglify": "~0.2.4",
|
"grunt-contrib-concat": "*",
|
||||||
"grunt-contrib-watch": "~0.5.3"
|
"grunt-contrib-uglify": "*",
|
||||||
|
"grunt-contrib-watch": "*",
|
||||||
|
"grunt-contrib-less": "~0.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2991,6 +2991,20 @@ class Actions
|
||||||
return $this->DefaultResponse(__FUNCTION__, $bResult);
|
return $this->DefaultResponse(__FUNCTION__, $bResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function DoJsInfo()
|
||||||
|
{
|
||||||
|
$bIsError = '1' === (string) $this->GetActionParam('IsError', '0');
|
||||||
|
$mData = $this->GetActionParam('Data', null);
|
||||||
|
|
||||||
|
$this->Logger()->WriteDump(is_array($mData) ? $mData : array(),
|
||||||
|
$bIsError ? \MailSo\Log\Enumerations\Type::ERROR : \MailSo\Log\Enumerations\Type::INFO, 'JS-INFO');
|
||||||
|
|
||||||
|
return $this->DefaultResponse(__FUNCTION__, true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*! RainLoop Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
(function (window, $, ko, crossroads, hasher, _) {
|
(function (window, $, ko, crossroads, hasher, _) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
@ -71,6 +71,7 @@ var
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?AdminApp}
|
* @type {?AdminApp}
|
||||||
*/
|
*/
|
||||||
|
|
@ -1737,7 +1738,7 @@ Utils.fakeMd5 = function(iLen)
|
||||||
|
|
||||||
while (sResult.length < iLen)
|
while (sResult.length < iLen)
|
||||||
{
|
{
|
||||||
sResult += sLine.substr(window.Math.round(window.Math.random() * sLine.length), 1);
|
sResult += sLine.substr(Math.round(Math.random() * sLine.length), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sResult;
|
return sResult;
|
||||||
|
|
@ -1839,7 +1840,7 @@ Utils.settingsSaveHelperSimpleFunction = function (koTrigger, oContext)
|
||||||
|
|
||||||
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
{
|
{
|
||||||
var oTempImg = new Image();
|
var oTempImg = new window.Image();
|
||||||
oTempImg.onload = function() {
|
oTempImg.onload = function() {
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
@ -2280,7 +2281,7 @@ ko.bindingHandlers.draggable = {
|
||||||
moveUp();
|
moveUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
if (oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
||||||
{
|
{
|
||||||
moveDown = function() {
|
moveDown = function() {
|
||||||
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
||||||
|
|
@ -5785,6 +5786,21 @@ AbstractAjaxRemoteStorage.prototype.jsError = function (fCallback, sMessage, sFi
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {string} sType
|
||||||
|
* @param {Array=} mData = null
|
||||||
|
* @param {boolean=} bIsError = false
|
||||||
|
*/
|
||||||
|
AbstractAjaxRemoteStorage.prototype.jsInfo = function (fCallback, sType, mData, bIsError)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'JsInfo', {
|
||||||
|
'Type': sType,
|
||||||
|
'Data': mData,
|
||||||
|
'IsError': (Utils.isUnd(bIsError) ? false : !!bIsError) ? '1' : '0'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractAjaxRemoteStorage
|
* @extends AbstractAjaxRemoteStorage
|
||||||
|
|
|
||||||
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
||||||
/*! RainLoop Webmail Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
(function (window, $, ko, crossroads, hasher, moment, Jua, _) {
|
(function (window, $, ko, crossroads, hasher, moment, Jua, _) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
@ -71,6 +71,7 @@ var
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?RainLoopApp}
|
* @type {?RainLoopApp}
|
||||||
*/
|
*/
|
||||||
|
|
@ -1737,7 +1738,7 @@ Utils.fakeMd5 = function(iLen)
|
||||||
|
|
||||||
while (sResult.length < iLen)
|
while (sResult.length < iLen)
|
||||||
{
|
{
|
||||||
sResult += sLine.substr(window.Math.round(window.Math.random() * sLine.length), 1);
|
sResult += sLine.substr(Math.round(Math.random() * sLine.length), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sResult;
|
return sResult;
|
||||||
|
|
@ -1839,7 +1840,7 @@ Utils.settingsSaveHelperSimpleFunction = function (koTrigger, oContext)
|
||||||
|
|
||||||
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||||
{
|
{
|
||||||
var oTempImg = new Image();
|
var oTempImg = new window.Image();
|
||||||
oTempImg.onload = function() {
|
oTempImg.onload = function() {
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
@ -2280,7 +2281,7 @@ ko.bindingHandlers.draggable = {
|
||||||
moveUp();
|
moveUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
if (oEvent.pageY >= oOffset.top && oEvent.pageY <= oOffset.top + iTriggerZone)
|
||||||
{
|
{
|
||||||
moveDown = function() {
|
moveDown = function() {
|
||||||
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
$this.scrollTop($this.scrollTop() - iScrollSpeed);
|
||||||
|
|
@ -8017,7 +8018,7 @@ PopupsComposeViewModel.prototype.saveMessageResponse = function (sResult, oData)
|
||||||
|
|
||||||
if (this.modalVisibility())
|
if (this.modalVisibility())
|
||||||
{
|
{
|
||||||
this.savedTime(window.Math.round((new window.Date()).getTime() / 1000));
|
this.savedTime(Math.round((new window.Date()).getTime() / 1000));
|
||||||
|
|
||||||
this.savedOrSendingText(
|
this.savedOrSendingText(
|
||||||
0 < this.savedTime() ? Utils.i18n('COMPOSE/SAVED_TIME', {
|
0 < this.savedTime() ? Utils.i18n('COMPOSE/SAVED_TIME', {
|
||||||
|
|
@ -13533,6 +13534,21 @@ AbstractAjaxRemoteStorage.prototype.jsError = function (fCallback, sMessage, sFi
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {string} sType
|
||||||
|
* @param {Array=} mData = null
|
||||||
|
* @param {boolean=} bIsError = false
|
||||||
|
*/
|
||||||
|
AbstractAjaxRemoteStorage.prototype.jsInfo = function (fCallback, sType, mData, bIsError)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'JsInfo', {
|
||||||
|
'Type': sType,
|
||||||
|
'Data': mData,
|
||||||
|
'IsError': (Utils.isUnd(bIsError) ? false : !!bIsError) ? '1' : '0'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractAjaxRemoteStorage
|
* @extends AbstractAjaxRemoteStorage
|
||||||
|
|
@ -15201,6 +15217,10 @@ function RainLoopApp()
|
||||||
this.iSuggestionsLimit = 0 === this.iSuggestionsLimit ? 20 : this.iSuggestionsLimit;
|
this.iSuggestionsLimit = 0 === this.iSuggestionsLimit ? 20 : this.iSuggestionsLimit;
|
||||||
|
|
||||||
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
|
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
|
||||||
|
|
||||||
|
$.wakeUp(function (iSleepTime) {
|
||||||
|
RL.remote().jsInfo(Utils.emptyFunction, {'WakeUpTime': Math.round(iSleepTime / 1000)}, true);
|
||||||
|
}, {}, 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(RainLoopApp.prototype, AbstractApp.prototype);
|
_.extend(RainLoopApp.prototype, AbstractApp.prototype);
|
||||||
|
|
|
||||||
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
1
vendors/jquery-wakeup/jquery.wakeup.js
vendored
1
vendors/jquery-wakeup/jquery.wakeup.js
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
* http://stackoverflow.com/questions/4079115
|
* http://stackoverflow.com/questions/4079115
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013, Paul Okopny <paul.okopny@gmail.com>
|
* Copyright (c) 2013, Paul Okopny <paul.okopny@gmail.com>
|
||||||
|
* https://bitbucket.org/paul.okopny/jquery.wakeup-plugin
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue