mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Code refactoring
Fixed languages popup Release commit
This commit is contained in:
parent
fa795947cf
commit
ccbf04cb67
123 changed files with 1375 additions and 5128 deletions
|
|
@ -1,534 +0,0 @@
|
|||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
/*jshint node: true */
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
cfg: {
|
||||
devVersion: "0.0.0",
|
||||
releasesPath: 'build/dist/releases',
|
||||
releaseSrcPath: '',
|
||||
releaseFolder: 'rainloop',
|
||||
releaseZipFile: 'rainloop.zip'
|
||||
},
|
||||
less: {
|
||||
development: {
|
||||
files: {
|
||||
'rainloop/v/<%= cfg.devVersion %>/static/css/less.css': 'dev/Styles/@Main.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
'rainloop/v/<%= cfg.devVersion %>/static/js/app.js',
|
||||
'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js'
|
||||
]
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: true,
|
||||
compress: true,
|
||||
preserveComments: 'some'
|
||||
},
|
||||
cookie: {
|
||||
options: {
|
||||
banner: '/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n',
|
||||
preserveComments: 'false'
|
||||
},
|
||||
src: 'vendors/jquery-cookie/jquery.cookie.js',
|
||||
dest: 'vendors/jquery-cookie/jquery.cookie-1.4.0.min.js'
|
||||
},
|
||||
ifvisible: {
|
||||
options: {
|
||||
banner: '/*!ifvisible.js v1.0.0 (c) 2013 Serkan Yersen | MIT */\n',
|
||||
preserveComments: 'false'
|
||||
},
|
||||
src: 'vendors/ifvisible/src/ifvisible.js',
|
||||
dest: 'vendors/ifvisible/ifvisible.min.js'
|
||||
},
|
||||
wakeup: {
|
||||
options: {
|
||||
banner: '/*! jQuery WakeUp plugin (c) 2013 Paul Okopny <paul.okopny@gmail.com> | MIT */\n',
|
||||
preserveComments: 'false'
|
||||
},
|
||||
src: 'vendors/jquery-wakeup/jquery.wakeup.js',
|
||||
dest: 'vendors/jquery-wakeup/jquery.wakeup.min.js'
|
||||
},
|
||||
mousewheel: {
|
||||
options: {
|
||||
banner: '/*! jquery.mousewheel v3.1.4 (c) 2013 Brandon Aaron (http://brandon.aaron.sh) | MIT */\n',
|
||||
preserveComments: 'false'
|
||||
},
|
||||
src: 'vendors/jquery-mousewheel/jquery.mousewheel.js',
|
||||
dest: 'vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js'
|
||||
},
|
||||
nano: {
|
||||
options: {
|
||||
banner: "/*! nanoScrollerJS v0.7 (c) 2013 James Florentino; modified by RainLoop Team | MIT */\n",
|
||||
preserveComments: "false"
|
||||
},
|
||||
src: 'vendors/jquery-nanoscroller/jquery.nanoscroller.js',
|
||||
dest: 'vendors/jquery-nanoscroller/jquery.nanoscroller-0.7.min.js'
|
||||
},
|
||||
inputosaurus: {
|
||||
options: {
|
||||
banner: "/*! Inputosaurus Text v0.1.6 (c) 2013 Dan Kielp <dan@sproutsocial.com>; modified by RainLoop Team | MIT */\n",
|
||||
preserveComments: "false"
|
||||
},
|
||||
src: 'vendors/inputosaurus/inputosaurus.js',
|
||||
dest: 'vendors/inputosaurus/inputosaurus.min.js'
|
||||
},
|
||||
pace: {
|
||||
src: 'vendors/simple-pace/simple-pace.js',
|
||||
dest: 'vendors/simple-pace/simple-pace-1.0.min.js'
|
||||
},
|
||||
rl: {
|
||||
src: 'vendors/rl/rl.js',
|
||||
dest: 'vendors/rl/rl-1.0.min.js'
|
||||
},
|
||||
min_app: {
|
||||
src: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.js',
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.min.js'
|
||||
},
|
||||
min_admin: {
|
||||
src: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js',
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.min.js'
|
||||
}
|
||||
},
|
||||
concat: {
|
||||
js_index: {
|
||||
nonull: true,
|
||||
src: [
|
||||
"vendors/json2.min.js",
|
||||
"vendors/simple-pace/simple-pace-1.0.min.js",
|
||||
"vendors/rl/rl-1.0.min.js"
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/boot.js'
|
||||
},
|
||||
js_openpgp: {
|
||||
nonull: true,
|
||||
src: [
|
||||
"vendors/openpgp/openpgp-0.5.1.min.js",
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/openpgp.min.js'
|
||||
},
|
||||
js_libs: {
|
||||
nonull: true,
|
||||
options: {
|
||||
separator: '\n\n'
|
||||
},
|
||||
src: [
|
||||
"vendors/modernizr.js",
|
||||
"vendors/underscore/underscore-1.5.2.min.js",
|
||||
"vendors/jquery/jquery-1.11.1.min.js",
|
||||
"vendors/jquery-ui/js/jquery-ui-1.10.3.custom.min.js",
|
||||
"vendors/jquery-cookie/jquery.cookie-1.4.0.min.js",
|
||||
"vendors/jquery-finger/jquery.finger.min.js",
|
||||
"vendors/jquery-mousewheel/jquery.mousewheel-3.1.4.min.js",
|
||||
"vendors/jquery-scrollstop/jquery.scrollstop.min.js",
|
||||
"vendors/jquery-lazyload/jquery.lazyload.min.js",
|
||||
"vendors/jquery-nanoscroller/jquery.nanoscroller-0.7.min.js",
|
||||
"vendors/jquery-wakeup/jquery.wakeup.min.js",
|
||||
"vendors/inputosaurus/inputosaurus.min.js",
|
||||
"vendors/moment/min/moment.min.js ",
|
||||
"vendors/routes/signals.min.js",
|
||||
"vendors/routes/hasher.min.js",
|
||||
"vendors/routes/crossroads.min.js",
|
||||
"vendors/knockout/knockout-3.1.0.js",
|
||||
"vendors/knockout-projections/knockout-projections-1.0.0.min.js",
|
||||
"vendors/ssm/ssm.min.js",
|
||||
"vendors/jua/jua.min.js",
|
||||
"vendors/keymaster/keymaster.js",
|
||||
"vendors/ifvisible/ifvisible.min.js",
|
||||
"vendors/jquery-magnific-popup/jquery.magnific-popup.min.js",
|
||||
"vendors/bootstrap/js/bootstrap.min.js",
|
||||
"dev/Common/_LibsEnd.js"
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/libs.js'
|
||||
},
|
||||
js_admin: {
|
||||
nonull: true,
|
||||
options: {
|
||||
stripBanners: true,
|
||||
banner: '/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n' +
|
||||
'(function (window, $, ko, crossroads, hasher, _) {\n',
|
||||
footer: '\n\n}(window, jQuery, ko, crossroads, hasher, _));'
|
||||
},
|
||||
src: [
|
||||
"dev/Common/_Begin.js",
|
||||
"dev/Common/_BeginA.js",
|
||||
|
||||
"dev/Common/Globals.js",
|
||||
"dev/Common/Constants.js",
|
||||
"dev/Common/Enums.js",
|
||||
"dev/Common/Utils.js",
|
||||
"dev/Common/Base64.js",
|
||||
"dev/Common/Knockout.js",
|
||||
"dev/Common/LinkBuilder.js",
|
||||
"dev/Common/Plugins.js",
|
||||
|
||||
"dev/Storages/LocalStorages/CookieDriver.js",
|
||||
"dev/Storages/LocalStorages/LocalStorageDriver.js",
|
||||
"dev/Storages/LocalStorage.js",
|
||||
|
||||
"dev/Knoin/AbstractBoot.js",
|
||||
"dev/Knoin/AbstractViewModel.js",
|
||||
"dev/Knoin/AbstractScreen.js",
|
||||
"dev/Knoin/Knoin.js",
|
||||
|
||||
"dev/Models/EmailModel.js",
|
||||
"dev/Models/ContactTagModel.js",
|
||||
|
||||
"dev/ViewModels/PopupsDomainViewModel.js",
|
||||
"dev/ViewModels/PopupsPluginViewModel.js",
|
||||
"dev/ViewModels/PopupsActivateViewModel.js",
|
||||
"dev/ViewModels/PopupsLanguagesViewModel.js",
|
||||
"dev/ViewModels/PopupsAskViewModel.js",
|
||||
|
||||
"dev/ViewModels/AdminLoginViewModel.js",
|
||||
|
||||
"dev/ViewModels/AdminMenuViewModel.js",
|
||||
"dev/ViewModels/AdminPaneViewModel.js",
|
||||
|
||||
"dev/Admin/General.js",
|
||||
"dev/Admin/Login.js",
|
||||
"dev/Admin/Branding.js",
|
||||
"dev/Admin/Contacts.js",
|
||||
"dev/Admin/Domains.js",
|
||||
"dev/Admin/Security.js",
|
||||
"dev/Admin/Social.js",
|
||||
"dev/Admin/Plugins.js",
|
||||
"dev/Admin/Packages.js",
|
||||
"dev/Admin/Licensing.js",
|
||||
"dev/Admin/About.js",
|
||||
|
||||
"dev/Storages/AbstractData.js",
|
||||
"dev/Storages/AdminData.js",
|
||||
|
||||
"dev/Storages/AbstractAjaxRemote.js",
|
||||
"dev/Storages/AdminAjaxRemote.js",
|
||||
|
||||
"dev/Storages/AbstractCache.js",
|
||||
"dev/Storages/AdminCache.js",
|
||||
|
||||
"dev/Screens/AbstractSettings.js",
|
||||
|
||||
"dev/Screens/AdminLogin.js",
|
||||
"dev/Screens/AdminSettings.js",
|
||||
|
||||
"dev/Boots/AbstractApp.js",
|
||||
"dev/Boots/AdminApp.js",
|
||||
|
||||
"dev/Common/_End.js",
|
||||
"dev/Common/_CoreEnd.js"
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/admin.js'
|
||||
},
|
||||
js_app: {
|
||||
nonull: true,
|
||||
options: {
|
||||
stripBanners: true,
|
||||
banner: '/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */\n' +
|
||||
'(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {\n',
|
||||
footer: '\n\n}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key));'
|
||||
},
|
||||
src: [
|
||||
"dev/Common/_Begin.js",
|
||||
"dev/Common/_BeginW.js",
|
||||
|
||||
"dev/Common/Globals.js",
|
||||
"dev/Common/Constants.js",
|
||||
"dev/Common/Enums.js",
|
||||
"dev/Common/Utils.js",
|
||||
"dev/Common/Base64.js",
|
||||
"dev/Common/Knockout.js",
|
||||
"dev/Common/LinkBuilder.js",
|
||||
"dev/Common/Plugins.js",
|
||||
"dev/Common/NewHtmlEditorWrapper.js",
|
||||
"dev/Common/Selector.js",
|
||||
|
||||
"dev/Storages/LocalStorages/CookieDriver.js",
|
||||
"dev/Storages/LocalStorages/LocalStorageDriver.js",
|
||||
"dev/Storages/LocalStorage.js",
|
||||
|
||||
"dev/Knoin/AbstractBoot.js",
|
||||
"dev/Knoin/AbstractViewModel.js",
|
||||
"dev/Knoin/AbstractScreen.js",
|
||||
"dev/Knoin/Knoin.js",
|
||||
|
||||
"dev/Models/EmailModel.js",
|
||||
"dev/Models/ContactModel.js",
|
||||
"dev/Models/ContactPropertyModel.js",
|
||||
"dev/Models/ContactTagModel.js",
|
||||
"dev/Models/AttachmentModel.js",
|
||||
"dev/Models/ComposeAttachmentModel.js",
|
||||
"dev/Models/MessageModel.js",
|
||||
"dev/Models/FolderModel.js",
|
||||
"dev/Models/AccountModel.js",
|
||||
"dev/Models/IdentityModel.js",
|
||||
"dev/Models/FilterConditionModel.js",
|
||||
"dev/Models/FilterModel.js",
|
||||
"dev/Models/OpenPgpKeyModel.js",
|
||||
|
||||
"dev/ViewModels/PopupsFolderClearViewModel.js",
|
||||
"dev/ViewModels/PopupsFolderCreateViewModel.js",
|
||||
"dev/ViewModels/PopupsFolderSystemViewModel.js",
|
||||
"dev/ViewModels/PopupsComposeViewModel.js",
|
||||
"dev/ViewModels/PopupsContactsViewModel.js",
|
||||
"dev/ViewModels/PopupsAdvancedSearchViewModel.js",
|
||||
"dev/ViewModels/PopupsAddAccountViewModel.js",
|
||||
"dev/ViewModels/PopupsAddOpenPgpKeyViewModel.js",
|
||||
"dev/ViewModels/PopupsViewOpenPgpKeyViewModel.js",
|
||||
"dev/ViewModels/PopupsGenerateNewOpenPgpKeyViewModel.js",
|
||||
"dev/ViewModels/PopupsComposeOpenPgpViewModel.js",
|
||||
"dev/ViewModels/PopupsIdentityViewModel.js",
|
||||
"dev/ViewModels/PopupsLanguagesViewModel.js",
|
||||
"dev/ViewModels/PopupsTwoFactorTestViewModel.js",
|
||||
"dev/ViewModels/PopupsAskViewModel.js",
|
||||
"dev/ViewModels/PopupsKeyboardShortcutsHelpViewModel.js",
|
||||
|
||||
"dev/ViewModels/LoginViewModel.js",
|
||||
|
||||
"dev/ViewModels/AbstractSystemDropDownViewModel.js",
|
||||
"dev/ViewModels/MailBoxSystemDropDownViewModel.js",
|
||||
"dev/ViewModels/SettingsSystemDropDownViewModel.js",
|
||||
|
||||
"dev/ViewModels/MailBoxFolderListViewModel.js",
|
||||
"dev/ViewModels/MailBoxMessageListViewModel.js",
|
||||
"dev/ViewModels/MailBoxMessageViewViewModel.js",
|
||||
|
||||
"dev/ViewModels/SettingsMenuViewModel.js",
|
||||
"dev/ViewModels/SettingsPaneViewModel.js",
|
||||
|
||||
"dev/Settings/General.js",
|
||||
"dev/Settings/Contacts.js",
|
||||
"dev/Settings/Accounts.js",
|
||||
"dev/Settings/Identity.js",
|
||||
"dev/Settings/Identities.js",
|
||||
"dev/Settings/Filters.js",
|
||||
"dev/Settings/Security.js",
|
||||
"dev/Settings/Social.js",
|
||||
"dev/Settings/ChangePassword.js",
|
||||
"dev/Settings/Folders.js",
|
||||
"dev/Settings/Themes.js",
|
||||
"dev/Settings/OpenPGP.js",
|
||||
|
||||
"dev/Storages/AbstractData.js",
|
||||
"dev/Storages/WebMailData.js",
|
||||
|
||||
"dev/Storages/AbstractAjaxRemote.js",
|
||||
"dev/Storages/WebMailAjaxRemote.js",
|
||||
|
||||
"dev/Storages/AbstractCache.js",
|
||||
"dev/Storages/WebMailCache.js",
|
||||
|
||||
"dev/Screens/AbstractSettings.js",
|
||||
|
||||
"dev/Screens/Login.js",
|
||||
"dev/Screens/MailBox.js",
|
||||
"dev/Screens/Settings.js",
|
||||
|
||||
"dev/Boots/AbstractApp.js",
|
||||
"dev/Boots/RainLoopApp.js",
|
||||
|
||||
"dev/Common/_End.js",
|
||||
"dev/Common/_CoreEnd.js"
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/js/app.js'
|
||||
},
|
||||
css: {
|
||||
nonull: true,
|
||||
src: [
|
||||
"vendors/jquery-ui/css/smoothness/jquery-ui-1.10.3.custom.css",
|
||||
"vendors/normalize/normalize.css",
|
||||
"vendors/fontastic/styles.css",
|
||||
"vendors/jquery-nanoscroller/nanoscroller.css",
|
||||
"vendors/jquery-magnific-popup/magnific-popup.css",
|
||||
"vendors/jquery-magnific-popup/magnific-popup-animations.css",
|
||||
"vendors/simple-pace/styles.css",
|
||||
"vendors/inputosaurus/inputosaurus.css",
|
||||
"vendors/flags/flags-fixed.css",
|
||||
"rainloop/v/<%= cfg.devVersion %>/static/css/less.css"
|
||||
],
|
||||
dest: 'rainloop/v/<%= cfg.devVersion %>/static/css/app.css'
|
||||
}
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
css: {
|
||||
src: 'rainloop/v/<%= cfg.devVersion %>/static/css/app.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("/"));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
js: {
|
||||
options: {
|
||||
nospawn: true
|
||||
},
|
||||
files: ['dev/**/*.js', 'vendors/**/*.js'],
|
||||
tasks: ['concat:js_libs', 'concat:js_openpgp', 'concat:js_admin', 'concat:js_app']
|
||||
},
|
||||
styles: {
|
||||
options: {
|
||||
nospawn: true
|
||||
},
|
||||
files: ['dev/Styles/*.less'],
|
||||
tasks: ['less', 'concat:css']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// dependencies
|
||||
for (var key in grunt.file.readJSON('package.json').devDependencies) {
|
||||
if (key.indexOf('grunt-') === 0) {
|
||||
grunt.loadNpmTasks(key);
|
||||
}
|
||||
}
|
||||
|
||||
grunt.registerTask('rainloop', 'RainLoop Webmail build task', function () {
|
||||
|
||||
var
|
||||
version = grunt.config('pkg.version'),
|
||||
release = parseInt(grunt.config('pkg.release'), 10),
|
||||
releasesPath = grunt.config('cfg.releasesPath'),
|
||||
devVersion = grunt.config('cfg.devVersion'),
|
||||
versionFull = version + '.' + release,
|
||||
dist = releasesPath + '/webmail/' + versionFull + '/src/'
|
||||
;
|
||||
|
||||
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.write(dist + 'data/EMPTY', versionFull);
|
||||
|
||||
grunt.file.write(dist + 'index.php',
|
||||
grunt.file.read('index.php').replace('\'APP_VERSION\', \'0.0.0\'', '\'APP_VERSION\', \'' + versionFull + '\''));
|
||||
|
||||
grunt.file.copy(dist + 'index.php', dist + 'rainloop/v/' + versionFull + '/index.php.root');
|
||||
|
||||
grunt.file.delete(dist + 'rainloop/v/' + versionFull + '/static/css/less.css');
|
||||
|
||||
grunt.config.set('cfg.releaseFolder', 'webmail/' + versionFull);
|
||||
grunt.config.set('cfg.releaseSrcPath', dist);
|
||||
grunt.config.set('cfg.releaseZipFile', 'rainloop-' + versionFull + '.zip');
|
||||
});
|
||||
|
||||
grunt.registerTask('rainloop-owncloud', 'RainLoop ownCloud App build task', function () {
|
||||
|
||||
var
|
||||
content = '',
|
||||
version = grunt.config('pkg.ownCloudPackageVersion'),
|
||||
releasesPath = grunt.config('cfg.releasesPath'),
|
||||
versionFull = version,
|
||||
dist = releasesPath + '/owncloud/' + versionFull + '/src/'
|
||||
;
|
||||
|
||||
grunt.file.mkdir(dist);
|
||||
grunt.file.mkdir(dist + 'rainloop');
|
||||
|
||||
require('wrench').copyDirSyncRecursive('build/owncloud/rainloop-app',
|
||||
dist + 'rainloop', {'forceDelete': true});
|
||||
|
||||
content = grunt.file.read(dist + 'rainloop/appinfo/info.xml');
|
||||
|
||||
grunt.file.write(dist + 'rainloop/appinfo/info.xml',
|
||||
content.replace('<version>0.0.0</version>', '<version>' + versionFull + '</version>'));
|
||||
|
||||
grunt.file.write(dist + 'rainloop/appinfo/version', versionFull);
|
||||
|
||||
grunt.config.set('cfg.releaseFolder', 'owncloud/' + versionFull);
|
||||
grunt.config.set('cfg.releaseSrcPath', dist);
|
||||
grunt.config.set('cfg.releaseZipFile', 'rainloop-owncloud-app-' + versionFull + '.zip');
|
||||
});
|
||||
|
||||
grunt.registerTask('release-inc', 'release inc', function () {
|
||||
|
||||
grunt.file.write('package.json',
|
||||
grunt.file.read('package.json').replace(/"release":\s?"[\d]+",/, '"release": "' +
|
||||
(1 + parseInt(grunt.config('pkg.release'), 10)) + '",'));
|
||||
});
|
||||
|
||||
grunt.registerTask('rainloop-clean', 'RainLoop Webmail clean task', function () {
|
||||
var releaseSrcPath = grunt.config('cfg.releaseSrcPath');
|
||||
if ('' !== releaseSrcPath)
|
||||
{
|
||||
require('wrench').rmdirSyncRecursive(releaseSrcPath);
|
||||
}
|
||||
});
|
||||
|
||||
// uglify
|
||||
grunt.registerTask('rlmin', ['uglify:min_app', 'uglify:min_admin']);
|
||||
|
||||
// uglify (optional)
|
||||
grunt.registerTask('rl', ['uglify:rl']);
|
||||
grunt.registerTask('nano', ['uglify:nano']);
|
||||
grunt.registerTask('pace', ['uglify:pace']);
|
||||
grunt.registerTask('wakeup', ['uglify:wakeup']);
|
||||
grunt.registerTask('cookie', ['uglify:cookie']);
|
||||
grunt.registerTask('mousewheel', ['uglify:mousewheel']);
|
||||
grunt.registerTask('inputosaurus', ['uglify:inputosaurus']);
|
||||
grunt.registerTask('ifvisible', ['uglify:ifvisible']);
|
||||
// ---
|
||||
|
||||
grunt.registerTask('fast', ['less', 'concat']);
|
||||
grunt.registerTask('default', ['less', 'concat', 'cssmin', 'jshint', 'rlmin']);
|
||||
grunt.registerTask('build', ['default', 'rainloop', 'compress:build', 'md5:build', 'release-inc', 'rainloop-clean']);
|
||||
grunt.registerTask('owncloud', ['rainloop-owncloud', 'compress:build', 'md5:build', 'rainloop-clean']);
|
||||
|
||||
// aliases
|
||||
grunt.registerTask('u', ['uglify']);
|
||||
grunt.registerTask('h', ['jshint']);
|
||||
grunt.registerTask('b', ['build']);
|
||||
grunt.registerTask('f', ['fast']);
|
||||
grunt.registerTask('w', ['default', 'watch']);
|
||||
grunt.registerTask('o', ['owncloud']);
|
||||
grunt.registerTask('own', ['owncloud']);
|
||||
};
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (require) {
|
||||
'use strict';
|
||||
require('App:Boot')(require('App:Admin'));
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
Utils = require('Utils'),
|
||||
|
|
@ -20,8 +19,8 @@
|
|||
;
|
||||
|
||||
/**
|
||||
* @param {*} Remote
|
||||
* @constructor
|
||||
* @param {RemoteStorage|AdminRemoteStorage} Remote
|
||||
* @extends KnoinAbstractBoot
|
||||
*/
|
||||
function AbstractApp(Remote)
|
||||
|
|
@ -123,6 +122,9 @@
|
|||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sTitle
|
||||
*/
|
||||
AbstractApp.prototype.setTitle = function (sTitle)
|
||||
{
|
||||
sTitle = ((Utils.isNormal(sTitle) && 0 < sTitle.length) ? sTitle + ' - ' : '') +
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
_ = require('_'),
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data'),
|
||||
Remote = require('Storage:Admin:Remote'),
|
||||
|
|
@ -22,6 +19,7 @@
|
|||
AdminSettingsScreen = require('Screen:Admin:Settings'),
|
||||
AdminLoginScreen = require('Screen:Admin:Login'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
AbstractApp = require('App:Abstract')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,8 +5,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
moment = require('moment'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
|
|
@ -1296,41 +1295,6 @@
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sMailToUrl
|
||||
* @returns {boolean}
|
||||
*/
|
||||
RainLoopApp.prototype.mailToHelper = function (sMailToUrl)
|
||||
{
|
||||
if (sMailToUrl && 'mailto:' === sMailToUrl.toString().substr(0, 7).toLowerCase())
|
||||
{
|
||||
sMailToUrl = sMailToUrl.toString().substr(7);
|
||||
|
||||
var
|
||||
oParams = {},
|
||||
oEmailModel = null,
|
||||
sEmail = sMailToUrl.replace(/\?.+$/, ''),
|
||||
sQueryString = sMailToUrl.replace(/^[^\?]*\?/, '')
|
||||
;
|
||||
|
||||
oEmailModel = new EmailModel();
|
||||
oEmailModel.parse(window.decodeURIComponent(sEmail));
|
||||
|
||||
if (oEmailModel && oEmailModel.email)
|
||||
{
|
||||
oParams = Utils.simpleQueryParser(sQueryString);
|
||||
kn.showScreenPopup(require('View:Popup:Compose'), [Enums.ComposeType.Empty, null, [oEmailModel],
|
||||
Utils.isUnd(oParams.subject) ? null : Utils.pString(oParams.subject),
|
||||
Utils.isUnd(oParams.body) ? null : Utils.plainToHtml(Utils.pString(oParams.body))
|
||||
]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
RainLoopApp.prototype.bootstartLoginScreen = function ()
|
||||
{
|
||||
var sCustomLoginLink = Utils.pString(Settings.settingsGet('CustomLoginLink'));
|
||||
|
|
@ -1495,7 +1459,7 @@
|
|||
|
||||
if (Settings.settingsGet('MailToEmail'))
|
||||
{
|
||||
self.mailToHelper(Settings.settingsGet('MailToEmail'));
|
||||
Utils.mailToHelper(Settings.settingsGet('MailToEmail'), require('View:Popup:Compose'));
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
|
|
|||
11
dev/Boot.js
11
dev/Boot.js
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
Globals.$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
||||
Globals.$win.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||
|
||||
|
||||
Globals.$win.unload(function () {
|
||||
Globals.bUnload = true;
|
||||
});
|
||||
|
|
@ -41,10 +40,10 @@
|
|||
|
||||
// export
|
||||
window['rl'] = window['rl'] || {};
|
||||
window['rl']['addHook'] = Plugins.addHook;
|
||||
window['rl']['settingsGet'] = Plugins.mainSettingsGet;
|
||||
window['rl']['remoteRequest'] = Plugins.remoteRequest;
|
||||
window['rl']['pluginSettingsGet'] = Plugins.settingsGet;
|
||||
window['rl']['addHook'] = _.bind(Plugins.addHook, Plugins);
|
||||
window['rl']['settingsGet'] = _.bind(Plugins.mainSettingsGet, Plugins);
|
||||
window['rl']['remoteRequest'] = _.bind(Plugins.remoteRequest, Plugins);
|
||||
window['rl']['pluginSettingsGet'] = _.bind(Plugins.settingsGet, Plugins);
|
||||
window['rl']['createCommand'] = Utils.createCommand;
|
||||
|
||||
window['rl']['EmailModel'] = EmailModel;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// http://www.webtoolkit.info/
|
||||
|
||||
(function (module) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
/*jslint bitwise: true*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module) {
|
||||
|
||||
|
|
@ -126,4 +125,4 @@
|
|||
|
||||
module.exports = Consts;
|
||||
|
||||
}(module, require));
|
||||
}(module));
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module) {
|
||||
|
||||
|
|
@ -248,15 +247,6 @@
|
|||
'Month': 30
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
Enums.EmailType = {
|
||||
'Defailt': 0,
|
||||
'Facebook': 1,
|
||||
'Google': 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,7 +5,9 @@
|
|||
|
||||
var
|
||||
Globals = {},
|
||||
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -7,6 +6,7 @@
|
|||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
Settings = require('Storage:Settings')
|
||||
;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
@ -133,7 +132,6 @@
|
|||
LinkBuilder.prototype.avatarLink = function (sEmail)
|
||||
{
|
||||
return this.sServer + '/Raw/0/Avatar/' + window.encodeURIComponent(sEmail) + '/';
|
||||
// return '//secure.gravatar.com/avatar/' + Utils.md5(sEmail.toLowerCase()) + '.jpg?s=80&d=mm';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,56 +1,57 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
Plugins = {
|
||||
__boot: null,
|
||||
__remote: null,
|
||||
__data: null
|
||||
},
|
||||
_ = require('_'),
|
||||
Utils = require('Utils'),
|
||||
Settings = require('Storage:Settings')
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
* @constructor
|
||||
*/
|
||||
Plugins.oViewModelsHooks = {};
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
Plugins.oSimpleHooks = {};
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @param {Function} ViewModel
|
||||
*/
|
||||
Plugins.regViewModelHook = function (sName, ViewModel)
|
||||
function Plugins()
|
||||
{
|
||||
if (ViewModel)
|
||||
{
|
||||
ViewModel.__hookName = sName;
|
||||
}
|
||||
};
|
||||
this.__boot = null;
|
||||
this.__data = null;
|
||||
this.__remote = null;
|
||||
|
||||
this.oSettings = require('Storage:Settings');
|
||||
|
||||
this.oViewModelsHooks = {};
|
||||
this.oSimpleHooks = {};
|
||||
}
|
||||
|
||||
Plugins.prototype.__boot = null;
|
||||
Plugins.prototype.__data = null;
|
||||
Plugins.prototype.__remote = null;
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
Plugins.prototype.oViewModelsHooks = {};
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
Plugins.prototype.oSimpleHooks = {};
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @param {Function} fCallback
|
||||
*/
|
||||
Plugins.addHook = function (sName, fCallback)
|
||||
Plugins.prototype.addHook = function (sName, fCallback)
|
||||
{
|
||||
if (Utils.isFunc(fCallback))
|
||||
{
|
||||
if (!Utils.isArray(Plugins.oSimpleHooks[sName]))
|
||||
if (!Utils.isArray(this.oSimpleHooks[sName]))
|
||||
{
|
||||
Plugins.oSimpleHooks[sName] = [];
|
||||
this.oSimpleHooks[sName] = [];
|
||||
}
|
||||
|
||||
Plugins.oSimpleHooks[sName].push(fCallback);
|
||||
this.oSimpleHooks[sName].push(fCallback);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -58,13 +59,13 @@
|
|||
* @param {string} sName
|
||||
* @param {Array=} aArguments
|
||||
*/
|
||||
Plugins.runHook = function (sName, aArguments)
|
||||
Plugins.prototype.runHook = function (sName, aArguments)
|
||||
{
|
||||
if (Utils.isArray(Plugins.oSimpleHooks[sName]))
|
||||
if (Utils.isArray(this.oSimpleHooks[sName]))
|
||||
{
|
||||
aArguments = aArguments || [];
|
||||
|
||||
_.each(Plugins.oSimpleHooks[sName], function (fCallback) {
|
||||
_.each(this.oSimpleHooks[sName], function (fCallback) {
|
||||
fCallback.apply(null, aArguments);
|
||||
});
|
||||
}
|
||||
|
|
@ -74,9 +75,9 @@
|
|||
* @param {string} sName
|
||||
* @return {?}
|
||||
*/
|
||||
Plugins.mainSettingsGet = function (sName)
|
||||
Plugins.prototype.mainSettingsGet = function (sName)
|
||||
{
|
||||
return Settings.settingsGet(sName);
|
||||
return this.oSettings.settingsGet(sName);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -87,11 +88,11 @@
|
|||
* @param {string=} sGetAdd = ''
|
||||
* @param {Array=} aAbortActions = []
|
||||
*/
|
||||
Plugins.remoteRequest = function (fCallback, sAction, oParameters, iTimeout, sGetAdd, aAbortActions)
|
||||
Plugins.prototype.remoteRequest = function (fCallback, sAction, oParameters, iTimeout, sGetAdd, aAbortActions)
|
||||
{
|
||||
if (Plugins.__remote)
|
||||
if (this.__remote)
|
||||
{
|
||||
Plugins.__remote.defaultRequest(fCallback, sAction, oParameters, iTimeout, sGetAdd, aAbortActions);
|
||||
this.__remote.defaultRequest(fCallback, sAction, oParameters, iTimeout, sGetAdd, aAbortActions);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -100,13 +101,13 @@
|
|||
* @param {string} sName
|
||||
* @return {?}
|
||||
*/
|
||||
Plugins.settingsGet = function (sPluginSection, sName)
|
||||
Plugins.prototype.settingsGet = function (sPluginSection, sName)
|
||||
{
|
||||
var oPlugin = Settings.settingsGet('Plugins');
|
||||
var oPlugin = this.oSettings.settingsGet('Plugins');
|
||||
oPlugin = oPlugin && !Utils.isUnd(oPlugin[sPluginSection]) ? oPlugin[sPluginSection] : null;
|
||||
return oPlugin ? (Utils.isUnd(oPlugin[sName]) ? null : oPlugin[sName]) : null;
|
||||
};
|
||||
|
||||
module.exports = Plugins;
|
||||
module.exports = new Plugins();
|
||||
|
||||
}(module, require));
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
Utils = {},
|
||||
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Consts = require('Consts'),
|
||||
|
|
@ -123,7 +122,46 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* @param {string} aValue
|
||||
* @param {string} sMailToUrl
|
||||
* @param {Function} PopupComposeVoreModel
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Utils.mailToHelper = function (sMailToUrl, PopupComposeVoreModel)
|
||||
{
|
||||
if (sMailToUrl && 'mailto:' === sMailToUrl.toString().substr(0, 7).toLowerCase())
|
||||
{
|
||||
sMailToUrl = sMailToUrl.toString().substr(7);
|
||||
|
||||
var
|
||||
oParams = {},
|
||||
oEmailModel = null,
|
||||
sEmail = sMailToUrl.replace(/\?.+$/, ''),
|
||||
sQueryString = sMailToUrl.replace(/^[^\?]*\?/, ''),
|
||||
EmailModel = require('Model:Email')
|
||||
;
|
||||
|
||||
oEmailModel = new EmailModel();
|
||||
oEmailModel.parse(window.decodeURIComponent(sEmail));
|
||||
|
||||
if (oEmailModel && oEmailModel.email)
|
||||
{
|
||||
oParams = Utils.simpleQueryParser(sQueryString);
|
||||
|
||||
require('App:Knoin').showScreenPopup(PopupComposeVoreModel, [Enums.ComposeType.Empty, null, [oEmailModel],
|
||||
Utils.isUnd(oParams.subject) ? null : Utils.pString(oParams.subject),
|
||||
Utils.isUnd(oParams.body) ? null : Utils.plainToHtml(Utils.pString(oParams.body))
|
||||
]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sValue
|
||||
* @param {string} sHash
|
||||
* @param {string} sKey
|
||||
* @param {string} sLongKey
|
||||
* @return {string|boolean}
|
||||
|
|
@ -892,7 +930,7 @@
|
|||
NotificationClass = Utils.notificationClass(),
|
||||
iResult = Enums.DesktopNotifications.NotSupported
|
||||
;
|
||||
|
||||
|
||||
if (NotificationClass && NotificationClass.permission)
|
||||
{
|
||||
switch (NotificationClass.permission.toLowerCase())
|
||||
|
|
@ -928,7 +966,7 @@
|
|||
NotificationClass = Utils.notificationClass(),
|
||||
iPermission = oData.desktopNotificationsPermisions()
|
||||
;
|
||||
|
||||
|
||||
if (NotificationClass && Enums.DesktopNotifications.Allowed === iPermission)
|
||||
{
|
||||
oData.desktopNotifications(true);
|
||||
|
|
@ -1134,66 +1172,9 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oMessageTextBody
|
||||
* @param {string} sTheme
|
||||
* @return {string}
|
||||
*/
|
||||
Utils.initBlockquoteSwitcher = function (oMessageTextBody)
|
||||
{
|
||||
if (oMessageTextBody)
|
||||
{
|
||||
var $oList = $('blockquote:not(.rl-bq-switcher)', oMessageTextBody).filter(function () {
|
||||
return 0 === $(this).parent().closest('blockquote', oMessageTextBody).length;
|
||||
});
|
||||
|
||||
if ($oList && 0 < $oList.length)
|
||||
{
|
||||
$oList.each(function () {
|
||||
var $self = $(this), iH = $self.height();
|
||||
if (0 === iH || 100 < iH)
|
||||
{
|
||||
$self.addClass('rl-bq-switcher hidden-bq');
|
||||
$('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>')
|
||||
.insertBefore($self)
|
||||
.click(function () {
|
||||
$self.toggleClass('hidden-bq');
|
||||
Utils.windowResize();
|
||||
})
|
||||
.after('<br />')
|
||||
.before('<br />')
|
||||
;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oMessageTextBody
|
||||
*/
|
||||
Utils.removeBlockquoteSwitcher = function (oMessageTextBody)
|
||||
{
|
||||
if (oMessageTextBody)
|
||||
{
|
||||
$(oMessageTextBody).find('blockquote.rl-bq-switcher').each(function () {
|
||||
$(this).removeClass('rl-bq-switcher hidden-bq');
|
||||
});
|
||||
|
||||
$(oMessageTextBody).find('.rlBlockquoteSwitcher').each(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oMessageTextBody
|
||||
*/
|
||||
Utils.toggleMessageBlockquote = function (oMessageTextBody)
|
||||
{
|
||||
if (oMessageTextBody)
|
||||
{
|
||||
oMessageTextBody.find('.rlBlockquoteSwitcher').click();
|
||||
}
|
||||
};
|
||||
|
||||
Utils.convertThemeName = function (sTheme)
|
||||
{
|
||||
if ('@custom' === sTheme.substr(-7))
|
||||
|
|
@ -1201,7 +1182,7 @@
|
|||
sTheme = Utils.trim(sTheme.substring(0, sTheme.length - 7));
|
||||
}
|
||||
|
||||
return Utils.trim(sTheme.replace(/[^a-zA-Z]+/g, ' ').replace(/([A-Z])/g, ' $1').replace(/[\s]+/g, ' '));
|
||||
return Utils.trim(sTheme.replace(/[^a-zA-Z0-9]+/g, ' ').replace(/([A-Z])/g, ' $1').replace(/[\s]+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1254,14 +1235,10 @@
|
|||
return sResult;
|
||||
};
|
||||
|
||||
/* jshint ignore:start */
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {string} sPlain
|
||||
* @return {string}
|
||||
*/
|
||||
Utils.md5 = function(s){function L(k,d){return(k<<d)|(k>>>(32-d))}function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}}function r(d,F,k){return(d&F)|((~d)&k)}function q(d,F,k){return(d&k)|(F&(~k))}function p(d,F,k){return(d^F^k)}function n(d,F,k){return(F^(d|(~k)))}function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){G=K(G,K(K(p(F,aa,Z),k),I));return K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){G=K(G,K(K(n(F,aa,Z),k),I));return K(L(G,H),F)}function e(G){var Z;var F=G.length;var x=F+8;var k=(x-(x%64))/64;var I=(k+1)*16;var aa=Array(I-1);var d=0;var H=0;while(H<F){Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=(aa[Z]|(G.charCodeAt(H)<<d));H++}Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=aa[Z]|(128<<d);aa[I-2]=F<<3;aa[I-1]=F>>>29;return aa}function B(x){var k="",F="",G,d;for(d=0;d<=3;d++){G=(x>>>(d*8))&255;F="0"+G.toString(16);k=k+F.substr(F.length-2,2)}return k}function J(k){k=k.replace(/rn/g,"n");var d="";for(var F=0;F<k.length;F++){var x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x)}else{if((x>127)&&(x<2048)){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128)}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128)}}}return d}var C=Array();var P,h,E,v,g,Y,X,W,V;var S=7,Q=12,N=17,M=22;var A=5,z=9,y=14,w=20;var o=4,m=11,l=16,j=23;var U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g)}var i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase()};
|
||||
/* jshint ignore:end */
|
||||
|
||||
Utils.convertPlainTextToHtml = function (sPlain)
|
||||
{
|
||||
return sPlain.toString()
|
||||
|
|
@ -1274,11 +1251,11 @@
|
|||
return $('<div class="draggablePlace"><span class="text"></span> <i class="icon-copy icon-white visible-on-ctrl"></i><i class="icon-mail icon-white hidden-on-ctrl"></i></div>').appendTo('#rl-hidden');
|
||||
};
|
||||
|
||||
Utils.defautOptionsAfterRender = function (oOption, oItem)
|
||||
Utils.defautOptionsAfterRender = function (oDomOption, oItem)
|
||||
{
|
||||
if (oItem && !Utils.isUnd(oItem.disabled) && oOption)
|
||||
if (oItem && !Utils.isUnd(oItem.disabled) && oDomOption)
|
||||
{
|
||||
$(oOption)
|
||||
$(oDomOption)
|
||||
.toggleClass('disabled', oItem.disabled)
|
||||
.prop('disabled', oItem.disabled)
|
||||
;
|
||||
|
|
@ -1339,10 +1316,18 @@
|
|||
oWin.document.getElementsByTagName('head')[0].appendChild(oScript);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Function} fCallback
|
||||
* @param {?} koTrigger
|
||||
* @param {?} oContext = null
|
||||
* @param {number=} iTimer = 1000
|
||||
* @return {Function}
|
||||
*/
|
||||
Utils.settingsSaveHelperFunction = function (fCallback, koTrigger, oContext, iTimer)
|
||||
{
|
||||
oContext = oContext || null;
|
||||
iTimer = Utils.isUnd(iTimer) ? 1000 : Utils.pInt(iTimer);
|
||||
|
||||
return function (sType, mData, bCached, sRequestAction, oRequestParameters) {
|
||||
koTrigger.call(oContext, mData && mData['Result'] ? Enums.SaveSettingsStep.TrueResult : Enums.SaveSettingsStep.FalseResult);
|
||||
if (fCallback)
|
||||
|
|
@ -1616,6 +1601,11 @@
|
|||
return sHtml;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sUrl
|
||||
* @param {number} iValue
|
||||
* @param {Function} fCallback
|
||||
*/
|
||||
Utils.resizeAndCrop = function (sUrl, iValue, fCallback)
|
||||
{
|
||||
var oTempImg = new window.Image();
|
||||
|
|
@ -1781,6 +1771,7 @@
|
|||
Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||
{
|
||||
return function() {
|
||||
|
||||
var
|
||||
iPrev = 0,
|
||||
iNext = 0,
|
||||
|
|
@ -1791,8 +1782,8 @@
|
|||
|
||||
/**
|
||||
* @param {number} iIndex
|
||||
* @param {boolean=} bPush
|
||||
* @param {string=} sCustomName
|
||||
* @param {boolean=} bPush = true
|
||||
* @param {string=} sCustomName = ''
|
||||
*/
|
||||
fAdd = function (iIndex, bPush, sCustomName) {
|
||||
|
||||
|
|
@ -1894,22 +1885,21 @@
|
|||
|
||||
Utils.selectElement = function (element)
|
||||
{
|
||||
/* jshint onevar: false */
|
||||
var sel, range;
|
||||
if (window.getSelection)
|
||||
{
|
||||
var sel = window.getSelection();
|
||||
sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
var range = window.document.createRange();
|
||||
range = window.document.createRange();
|
||||
range.selectNodeContents(element);
|
||||
sel.addRange(range);
|
||||
}
|
||||
else if (window.document.selection)
|
||||
{
|
||||
var textRange = window.document.body.createTextRange();
|
||||
textRange.moveToElementText(element);
|
||||
textRange.select();
|
||||
range = window.document.body.createTextRange();
|
||||
range.moveToElementText(element);
|
||||
range.select();
|
||||
}
|
||||
/* jshint onevar: true */
|
||||
};
|
||||
|
||||
Utils.detectDropdownVisibility = _.debounce(function () {
|
||||
|
|
@ -1918,13 +1908,16 @@
|
|||
}));
|
||||
}, 50);
|
||||
|
||||
/**
|
||||
* @param {boolean=} bDelay = false
|
||||
*/
|
||||
Utils.triggerAutocompleteInputChange = function (bDelay) {
|
||||
|
||||
var fFunc = function () {
|
||||
$('.checkAutocomplete').trigger('change');
|
||||
};
|
||||
|
||||
if (bDelay)
|
||||
if (Utils.isUnd(bDelay) ? false : !!bDelay)
|
||||
{
|
||||
_.delay(fFunc, 100);
|
||||
}
|
||||
|
|
|
|||
2
dev/External/JSON.js
vendored
2
dev/External/JSON.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = JSON;
|
||||
2
dev/External/Jua.js
vendored
2
dev/External/Jua.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = Jua;
|
||||
2
dev/External/crossroads.js
vendored
2
dev/External/crossroads.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = crossroads;
|
||||
2
dev/External/hasher.js
vendored
2
dev/External/hasher.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = hasher;
|
||||
2
dev/External/ifvisible.js
vendored
2
dev/External/ifvisible.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = ifvisible;
|
||||
2
dev/External/jquery.js
vendored
2
dev/External/jquery.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = $;
|
||||
2
dev/External/key.js
vendored
2
dev/External/key.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = key;
|
||||
3
dev/External/ko.js
vendored
3
dev/External/ko.js
vendored
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, ko) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
|
|
|
|||
2
dev/External/moment.js
vendored
2
dev/External/moment.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = moment;
|
||||
2
dev/External/ssm.js
vendored
2
dev/External/ssm.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = ssm;
|
||||
2
dev/External/underscore.js
vendored
2
dev/External/underscore.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = _;
|
||||
2
dev/External/window.js
vendored
2
dev/External/window.js
vendored
|
|
@ -1,3 +1 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
module.exports = window;
|
||||
|
|
@ -1,21 +1,18 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
hasher = require('hasher'),
|
||||
crossroads = require('crossroads'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
Plugins = require('Plugins'),
|
||||
Utils = require('Utils'),
|
||||
|
||||
KnoinAbstractViewModel = require('Knoin:AbstractViewModel')
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
@ -49,22 +46,23 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @param {string|Array} mName
|
||||
* @param {Function} ViewModelClass
|
||||
* @param {Function=} AbstractViewModel = KnoinAbstractViewModel
|
||||
*/
|
||||
Knoin.prototype.extendAsViewModel = function (sName, ViewModelClass, AbstractViewModel)
|
||||
Knoin.prototype.extendAsViewModel = function (mName, ViewModelClass)
|
||||
{
|
||||
if (ViewModelClass)
|
||||
{
|
||||
if (!AbstractViewModel)
|
||||
if (Utils.isArray(mName))
|
||||
{
|
||||
AbstractViewModel = KnoinAbstractViewModel;
|
||||
ViewModelClass.__names = mName;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModelClass.__names = [mName];
|
||||
}
|
||||
|
||||
ViewModelClass.__name = sName;
|
||||
Plugins.regViewModelHook(sName, ViewModelClass);
|
||||
_.extend(ViewModelClass.prototype, AbstractViewModel.prototype);
|
||||
ViewModelClass.__name = ViewModelClass.__names[0];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -142,6 +140,7 @@
|
|||
ViewModelClass.__vm = oViewModel;
|
||||
|
||||
oViewModel.viewModelName = ViewModelClass.__name;
|
||||
oViewModel.viewModelNames = ViewModelClass.__names;
|
||||
|
||||
if (oViewModelPlace && 1 === oViewModelPlace.length)
|
||||
{
|
||||
|
|
@ -175,6 +174,10 @@
|
|||
Utils.delegateRun(this, 'onHide');
|
||||
this.restoreKeyScope();
|
||||
|
||||
_.each(this.viewModelNames, function (sName) {
|
||||
Plugins.runHook('view-model-on-hide', [sName, self]);
|
||||
});
|
||||
|
||||
Globals.popupVisibilityNames.remove(this.viewModelName);
|
||||
oViewModel.viewModelDom.css('z-index', 2000);
|
||||
|
||||
|
|
@ -188,7 +191,9 @@
|
|||
}, oViewModel);
|
||||
}
|
||||
|
||||
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
||||
_.each(ViewModelClass.__names, function (sName) {
|
||||
Plugins.runHook('view-model-pre-build', [sName, oViewModel, oViewModelDom]);
|
||||
});
|
||||
|
||||
ko.applyBindingAccessorsToNode(oViewModelDom[0], {
|
||||
'i18nInit': true,
|
||||
|
|
@ -201,14 +206,16 @@
|
|||
oViewModel.registerPopupKeyDown();
|
||||
}
|
||||
|
||||
Plugins.runHook('view-model-post-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
||||
_.each(ViewModelClass.__names, function (sName) {
|
||||
Plugins.runHook('view-model-post-build', [sName, oViewModel, oViewModelDom]);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.log('Cannot find view model position: ' + sPosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ViewModelClass ? ViewModelClass.__vm : null;
|
||||
};
|
||||
|
||||
|
|
@ -220,7 +227,6 @@
|
|||
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
|
||||
{
|
||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -238,7 +244,10 @@
|
|||
{
|
||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
|
||||
|
||||
_.each(ViewModelClassToShow.__names, function (sName) {
|
||||
Plugins.runHook('view-model-on-show', [sName, ViewModelClassToShow.__vm, aParameters || []]);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -340,10 +349,13 @@
|
|||
{
|
||||
ViewModelClass.__dom.show();
|
||||
ViewModelClass.__vm.viewModelVisibility(true);
|
||||
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onFocus', [], 200);
|
||||
|
||||
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
||||
_.each(ViewModelClass.__names, function (sName) {
|
||||
Plugins.runHook('view-model-on-show', [sName, ViewModelClass.__vm]);
|
||||
});
|
||||
}
|
||||
|
||||
}, self);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
crossroads = require('crossroads'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -8,14 +7,14 @@
|
|||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Globals = require('Globals'),
|
||||
Utils = require('Utils')
|
||||
Utils = require('Utils'),
|
||||
Globals = require('Globals')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string=} sPosition = ''
|
||||
* @param {string=} sTemplate = ''
|
||||
* @constructor
|
||||
*/
|
||||
function KnoinAbstractViewModel(sPosition, sTemplate)
|
||||
{
|
||||
|
|
@ -26,13 +25,19 @@
|
|||
this.sDefaultKeyScope = Enums.KeyState.None;
|
||||
this.sCurrentKeyScope = this.sDefaultKeyScope;
|
||||
|
||||
this.viewModelName = '';
|
||||
this.viewModelVisibility = ko.observable(false);
|
||||
this.modalVisibility = ko.observable(false).extend({'rateLimit': 0});
|
||||
|
||||
this.viewModelName = '';
|
||||
this.viewModelNames = [];
|
||||
this.viewModelDom = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
KnoinAbstractViewModel.prototype.bDisabeCloseOnEsc = false;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
|
|
@ -43,11 +48,26 @@
|
|||
*/
|
||||
KnoinAbstractViewModel.prototype.sTemplate = '';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
KnoinAbstractViewModel.prototype.sDefaultKeyScope = Enums.KeyState.None;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
KnoinAbstractViewModel.prototype.sCurrentKeyScope = Enums.KeyState.None;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
KnoinAbstractViewModel.prototype.viewModelName = '';
|
||||
|
||||
/**
|
||||
* @type {Array}
|
||||
*/
|
||||
KnoinAbstractViewModel.prototype.viewModelNames = [];
|
||||
|
||||
/**
|
||||
* @type {?}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,6 +5,7 @@
|
|||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
function AccountModel(sEmail, bCanBeDelete)
|
||||
{
|
||||
this.email = sEmail;
|
||||
|
||||
|
||||
this.deleteAccess = ko.observable(false);
|
||||
this.canBeDalete = ko.observable(Utils.isUnd(bCanBeDelete) ? true : !!bCanBeDelete);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
Utils = require('Utils'),
|
||||
LinkBuilder = require('LinkBuilder')
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -7,6 +6,7 @@
|
|||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
LinkBuilder = require('LinkBuilder')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,18 +5,18 @@
|
|||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number=} iType = Enums.ContactPropertyType.Unknown
|
||||
* @param {string=} sTypeStr = ''
|
||||
* @param {string=} sValue = ''
|
||||
* @param {boolean=} bFocused = false
|
||||
* @param {string=} sPlaceholder = ''
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
@ -19,7 +17,6 @@
|
|||
{
|
||||
this.email = sEmail || '';
|
||||
this.name = sName || '';
|
||||
this.privateType = null;
|
||||
|
||||
this.clearDuplicateName();
|
||||
}
|
||||
|
|
@ -45,16 +42,10 @@
|
|||
*/
|
||||
EmailModel.prototype.email = '';
|
||||
|
||||
/**
|
||||
* @type {(number|null)}
|
||||
*/
|
||||
EmailModel.prototype.privateType = null;
|
||||
|
||||
EmailModel.prototype.clear = function ()
|
||||
{
|
||||
this.email = '';
|
||||
this.name = '';
|
||||
this.privateType = null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -82,27 +73,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {number}
|
||||
*/
|
||||
EmailModel.prototype.type = function ()
|
||||
{
|
||||
if (null === this.privateType)
|
||||
{
|
||||
if (this.email && '@facebook.com' === this.email.substr(-13))
|
||||
{
|
||||
this.privateType = Enums.EmailType.Facebook;
|
||||
}
|
||||
|
||||
if (null === this.privateType)
|
||||
{
|
||||
this.privateType = Enums.EmailType.Default;
|
||||
}
|
||||
}
|
||||
|
||||
return this.privateType;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sQuery
|
||||
* @return {boolean}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,6 +5,7 @@
|
|||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
FilterConditionModel = require('Model:FilterCondition')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,6 +5,7 @@
|
|||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,8 +5,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
moment = require('moment'),
|
||||
|
||||
|
|
@ -343,6 +342,14 @@
|
|||
this.lastInCollapsedThreadLoading(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
MessageModel.prototype.friendlySize = function ()
|
||||
{
|
||||
return Utils.friendlySize(this.size());
|
||||
};
|
||||
|
||||
MessageModel.prototype.computeSenderEmail = function ()
|
||||
{
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko')
|
||||
;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (require) {
|
||||
'use strict';
|
||||
require('App:Boot')(require('App:RainLoop'));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
KnoinAbstractScreen = require('Knoin:AbstractScreen')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
|
|
@ -18,11 +17,11 @@
|
|||
;
|
||||
|
||||
/**
|
||||
* @param {Array} aViewModels
|
||||
* @constructor
|
||||
* @param {Array} aViewModels
|
||||
* @extends KnoinAbstractScreen
|
||||
*/
|
||||
function AbstractSettings(aViewModels)
|
||||
function AbstractSettingsScreen(aViewModels)
|
||||
{
|
||||
KnoinAbstractScreen.call(this, 'settings', aViewModels);
|
||||
|
||||
|
|
@ -32,9 +31,9 @@
|
|||
this.oViewModelPlace = null;
|
||||
}
|
||||
|
||||
_.extend(AbstractSettings.prototype, KnoinAbstractScreen.prototype);
|
||||
_.extend(AbstractSettingsScreen.prototype, KnoinAbstractScreen.prototype);
|
||||
|
||||
AbstractSettings.prototype.onRoute = function (sSubName)
|
||||
AbstractSettingsScreen.prototype.onRoute = function (sSubName)
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
|
|
@ -141,7 +140,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
AbstractSettings.prototype.onHide = function ()
|
||||
AbstractSettingsScreen.prototype.onHide = function ()
|
||||
{
|
||||
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
||||
{
|
||||
|
|
@ -150,7 +149,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
AbstractSettings.prototype.onBuild = function ()
|
||||
AbstractSettingsScreen.prototype.onBuild = function ()
|
||||
{
|
||||
_.each(Globals.aViewModels['settings'], function (SettingsViewModel) {
|
||||
if (SettingsViewModel && SettingsViewModel.__rlSettingsData &&
|
||||
|
|
@ -172,7 +171,7 @@
|
|||
this.oViewModelPlace = $('#rl-content #rl-settings-subscreen');
|
||||
};
|
||||
|
||||
AbstractSettings.prototype.routes = function ()
|
||||
AbstractSettingsScreen.prototype.routes = function ()
|
||||
{
|
||||
var
|
||||
DefaultViewModel = _.find(Globals.aViewModels['settings'], function (SettingsViewModel) {
|
||||
|
|
@ -195,6 +194,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
module.exports = AbstractSettings;
|
||||
module.exports = AbstractSettingsScreen;
|
||||
|
||||
}(module, require));
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
KnoinAbstractScreen = require('Knoin:AbstractScreen')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,6 +5,7 @@
|
|||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
AbstractSettings = require('Screen:AbstractSettings')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
KnoinAbstractScreen = require('Knoin:AbstractScreen')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -11,16 +10,16 @@
|
|||
Utils = require('Utils'),
|
||||
Globals = require('Globals'),
|
||||
|
||||
AbstractSettings = require('Screen:AbstractSettings')
|
||||
AbstractSettingsScreen = require('Screen:AbstractSettings')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractSettings
|
||||
* @extends AbstractSettingsScreen
|
||||
*/
|
||||
function SettingsScreen()
|
||||
{
|
||||
AbstractSettings.call(this, [
|
||||
AbstractSettingsScreen.call(this, [
|
||||
require('View:RainLoop:SettingsSystemDropDown'),
|
||||
require('View:RainLoop:SettingsMenu'),
|
||||
require('View:RainLoop:SettingsPane')
|
||||
|
|
@ -33,14 +32,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
_.extend(SettingsScreen.prototype, AbstractSettings.prototype);
|
||||
_.extend(SettingsScreen.prototype, AbstractSettingsScreen.prototype);
|
||||
|
||||
SettingsScreen.prototype.onShow = function ()
|
||||
{
|
||||
this.setSettingsTitle();
|
||||
Globals.keyScope(Enums.KeyState.Settings);
|
||||
};
|
||||
|
||||
|
||||
SettingsScreen.prototype.setSettingsTitle = function ()
|
||||
{
|
||||
require('App:RainLoop').setTitle(this.sSettingsTitle);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko')
|
||||
;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
_ = require('_'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Consts = require('Consts'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('ko'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,9 +5,9 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
_ = require('_'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
|
||||
Consts = require('Consts'),
|
||||
Enums = require('Enums'),
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
moment = require('moment'),
|
||||
|
||||
|
|
@ -548,7 +548,7 @@
|
|||
NotificationClass = Utils.notificationClass(),
|
||||
oNotification = null
|
||||
;
|
||||
|
||||
|
||||
if (NotificationClass && self.useDesktopNotifications())
|
||||
{
|
||||
oNotification = new NotificationClass(sTitle, {
|
||||
|
|
@ -781,6 +781,40 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {Object} oMessageTextBody
|
||||
*/
|
||||
DataStorage.prototype.initBlockquoteSwitcher = function (oMessageTextBody)
|
||||
{
|
||||
if (oMessageTextBody)
|
||||
{
|
||||
var $oList = $('blockquote:not(.rl-bq-switcher)', oMessageTextBody).filter(function () {
|
||||
return 0 === $(this).parent().closest('blockquote', oMessageTextBody).length;
|
||||
});
|
||||
|
||||
if ($oList && 0 < $oList.length)
|
||||
{
|
||||
$oList.each(function () {
|
||||
var $self = $(this), iH = $self.height();
|
||||
if (0 === iH || 100 < iH)
|
||||
{
|
||||
$self.addClass('rl-bq-switcher hidden-bq');
|
||||
$('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>')
|
||||
.insertBefore($self)
|
||||
.click(function () {
|
||||
$self.toggleClass('hidden-bq');
|
||||
Utils.windowResize();
|
||||
})
|
||||
.after('<br />')
|
||||
.before('<br />')
|
||||
;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DataStorage.prototype.setMessage = function (oData, bCached)
|
||||
{
|
||||
var
|
||||
|
|
@ -920,7 +954,7 @@
|
|||
|
||||
if (oBody)
|
||||
{
|
||||
Utils.initBlockquoteSwitcher(oBody);
|
||||
this.initBlockquoteSwitcher(oBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,11 @@
|
|||
function LocalStorage()
|
||||
{
|
||||
var
|
||||
_ = require('_'),
|
||||
NextStorageDriver = _.find([
|
||||
NextStorageDriver = require('_').find([
|
||||
require('Storage:LocalStorage:Cookie'),
|
||||
require('Storage:LocalStorage:LocalStorage')
|
||||
], function (NextStorageDriver) {
|
||||
return NextStorageDriver.supported();
|
||||
return NextStorageDriver && NextStorageDriver.supported();
|
||||
})
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
|
||||
Utils = require('Utils')
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
Settings = require('Storage:Settings'),
|
||||
|
||||
|
|
@ -26,7 +26,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('AboutViewModel', AboutViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:About', 'AboutViewModel'], AboutViewModel);
|
||||
_.extend(AboutViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
module.exports = AboutViewModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
window = require('window'),
|
||||
key = require('key'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -89,7 +88,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
||||
kn.extendAsViewModel(['View:Admin:Login', 'AdminLoginViewModel'], AdminLoginViewModel);
|
||||
_.extend(AdminLoginViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
AdminLoginViewModel.prototype.onShow = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
kn = require('App:Knoin'),
|
||||
_ = require('_'),
|
||||
|
||||
Globals = require('Globals'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
KnoinAbstractViewModel = require('Knoin:AbstractViewModel')
|
||||
;
|
||||
|
||||
|
|
@ -16,7 +18,7 @@
|
|||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
*/
|
||||
function AdminMenuViewModel(oScreen)
|
||||
function AdminSettingsMenuViewModel(oScreen)
|
||||
{
|
||||
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
||||
|
||||
|
|
@ -27,13 +29,14 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
||||
kn.extendAsViewModel(['View:Admin:SettingsMenu', 'AdminSettingsMenuViewModel'], AdminSettingsMenuViewModel);
|
||||
_.extend(AdminSettingsMenuViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
AdminMenuViewModel.prototype.link = function (sRoute)
|
||||
AdminSettingsMenuViewModel.prototype.link = function (sRoute)
|
||||
{
|
||||
return '#/' + sRoute;
|
||||
};
|
||||
|
||||
module.exports = AdminMenuViewModel;
|
||||
module.exports = AdminSettingsMenuViewModel;
|
||||
|
||||
}(module, require));
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
*/
|
||||
function AdminPaneViewModel()
|
||||
function AdminSettingsPaneViewModel()
|
||||
{
|
||||
KnoinAbstractViewModel.call(this, 'Right', 'AdminPane');
|
||||
|
||||
|
|
@ -31,15 +31,16 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
||||
kn.extendAsViewModel(['View:Admin:SettingsPane', 'AdminSettingsPaneViewModel'], AdminSettingsPaneViewModel);
|
||||
_.extend(AdminSettingsPaneViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
AdminPaneViewModel.prototype.logoutClick = function ()
|
||||
AdminSettingsPaneViewModel.prototype.logoutClick = function ()
|
||||
{
|
||||
Remote.adminLogout(function () {
|
||||
require('App:Admin').loginAndLogoutReload();
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AdminPaneViewModel;
|
||||
module.exports = AdminSettingsPaneViewModel;
|
||||
|
||||
}(module, require));
|
||||
|
|
@ -1,17 +1,16 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils'),
|
||||
Enums = require('Enums'),
|
||||
Utils = require('Utils'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
|
|
@ -250,7 +249,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('LoginViewModel', LoginViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:Login', 'LoginViewModel'], LoginViewModel);
|
||||
_.extend(LoginViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
LoginViewModel.prototype.onShow = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,6 +5,7 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:MailBoxFolderList', 'MailBoxFolderListViewModel'], MailBoxFolderListViewModel);
|
||||
_.extend(MailBoxFolderListViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
MailBoxFolderListViewModel.prototype.onBuild = function (oDom)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
ifvisible = require('ifvisible'),
|
||||
Jua = require('Jua'),
|
||||
ifvisible = require('ifvisible'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
Consts = require('Consts'),
|
||||
|
|
@ -266,7 +265,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:MailBoxMessageList', 'MailBoxMessageListViewModel'], MailBoxMessageListViewModel);
|
||||
_.extend(MailBoxMessageListViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
|
|
@ -799,7 +799,7 @@
|
|||
|
||||
// change focused state
|
||||
key('tab, shift+tab, left, right', Enums.KeyState.MessageList, function (event, handler) {
|
||||
if (event && handler && 'shift+tab' === handler.shortcut || 'left' === handler.shortcut)
|
||||
if (event && handler && ('shift+tab' === handler.shortcut || 'left' === handler.shortcut))
|
||||
{
|
||||
self.folderList.focused(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
|
@ -150,6 +150,7 @@
|
|||
this.viewCc = ko.observable('');
|
||||
this.viewBcc = ko.observable('');
|
||||
this.viewDate = ko.observable('');
|
||||
this.viewSize = ko.observable('');
|
||||
this.viewMoment = ko.observable('');
|
||||
this.viewLineAsCcc = ko.observable('');
|
||||
this.viewViewLink = ko.observable('');
|
||||
|
|
@ -188,6 +189,7 @@
|
|||
this.viewCc(oMessage.ccToLine(false));
|
||||
this.viewBcc(oMessage.bccToLine(false));
|
||||
this.viewDate(oMessage.fullFormatDateValue());
|
||||
this.viewSize(oMessage.friendlySize());
|
||||
this.viewMoment(oMessage.momentDate());
|
||||
this.viewLineAsCcc(oMessage.lineAsCcc());
|
||||
this.viewViewLink(oMessage.viewLink());
|
||||
|
|
@ -246,7 +248,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:MailBoxMessageView', 'MailBoxMessageViewViewModel'], MailBoxMessageViewViewModel);
|
||||
_.extend(MailBoxMessageViewViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
MailBoxMessageViewViewModel.prototype.isPgpActionVisible = function ()
|
||||
{
|
||||
|
|
@ -290,23 +293,6 @@
|
|||
return sResult;
|
||||
};
|
||||
|
||||
MailBoxMessageViewViewModel.prototype.scrollToTop = function ()
|
||||
{
|
||||
var oCont = $('.messageItem.nano .content', this.viewModelDom);
|
||||
if (oCont && oCont[0])
|
||||
{
|
||||
// oCont.animate({'scrollTop': 0}, 300);
|
||||
oCont.scrollTop(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// $('.messageItem', this.viewModelDom).animate({'scrollTop': 0}, 300);
|
||||
$('.messageItem', this.viewModelDom).scrollTop(0);
|
||||
}
|
||||
|
||||
Utils.windowResize();
|
||||
};
|
||||
|
||||
MailBoxMessageViewViewModel.prototype.fullScreen = function ()
|
||||
{
|
||||
this.fullScreenMode(true);
|
||||
|
|
@ -366,15 +352,9 @@
|
|||
});
|
||||
|
||||
oDom
|
||||
.on('click', '.messageView .messageItem .messageItemHeader', function () {
|
||||
if (Globals.useKeyboardShortcuts() && self.message())
|
||||
{
|
||||
self.message.focused(true);
|
||||
}
|
||||
})
|
||||
.on('click', 'a', function (oEvent) {
|
||||
// setup maito protocol
|
||||
return !(!!oEvent && 3 !== oEvent['which'] && require('App:RainLoop').mailToHelper($(this).attr('href')));
|
||||
return !(!!oEvent && 3 !== oEvent['which'] && Utils.mailToHelper($(this).attr('href'), require('View:Popup:Compose')));
|
||||
})
|
||||
.on('click', '.attachmentsPlace .attachmentPreview', function (oEvent) {
|
||||
if (oEvent && oEvent.stopPropagation)
|
||||
|
|
@ -400,6 +380,8 @@
|
|||
this.messageDomFocused(true);
|
||||
} else {
|
||||
this.messageDomFocused(false);
|
||||
this.scrollMessageToTop();
|
||||
this.scrollMessageToLeft();
|
||||
}
|
||||
}, this);
|
||||
|
||||
|
|
@ -516,7 +498,7 @@
|
|||
key('b', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (Data.message() && Data.message().body)
|
||||
{
|
||||
Utils.toggleMessageBlockquote(Data.message().body);
|
||||
Data.message().body.find('.rlBlockquoteSwitcher').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
@ -559,10 +541,26 @@
|
|||
});
|
||||
|
||||
// change focused state
|
||||
key('tab, shift+tab, left', Enums.KeyState.MessageView, function () {
|
||||
key('tab, shift+tab, left', Enums.KeyState.MessageView, function (event, handler) {
|
||||
if (!self.fullScreenMode() && self.message() && Enums.Layout.NoPreview !== Data.layout())
|
||||
{
|
||||
self.message.focused(false);
|
||||
if (event && handler && 'left' === handler.shortcut)
|
||||
{
|
||||
if (self.oMessageScrollerDom && 0 < self.oMessageScrollerDom.scrollLeft())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
self.message.focused(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.message.focused(false);
|
||||
}
|
||||
}
|
||||
else if (self.message() && Enums.Layout.NoPreview === Data.layout() && event && handler && 'left' === handler.shortcut)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -643,6 +641,16 @@
|
|||
if (this.oMessageScrollerDom)
|
||||
{
|
||||
this.oMessageScrollerDom.scrollTop(0);
|
||||
Utils.windowResize();
|
||||
}
|
||||
};
|
||||
|
||||
MailBoxMessageViewViewModel.prototype.scrollMessageToLeft = function ()
|
||||
{
|
||||
if (this.oMessageScrollerDom)
|
||||
{
|
||||
this.oMessageScrollerDom.scrollLeft(0);
|
||||
Utils.windowResize();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
AbstractSystemDropDownViewModel = require('View:RainLoop:AbstractSystemDropDown')
|
||||
;
|
||||
|
|
@ -19,7 +20,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
kn.extendAsViewModel(['View:RainLoop:MailBoxSystemDropDown', 'MailBoxSystemDropDownViewModel'], MailBoxSystemDropDownViewModel);
|
||||
_.extend(MailBoxSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
||||
|
||||
module.exports = MailBoxSystemDropDownViewModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Enums'),
|
||||
|
|
@ -104,7 +104,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Activate', 'PopupsActivateViewModel'], PopupsActivateViewModel);
|
||||
_.extend(PopupsActivateViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsActivateViewModel.prototype.onShow = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
|
@ -87,7 +86,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:AddAccount', 'PopupsAddAccountViewModel'], PopupsAddAccountViewModel);
|
||||
_.extend(PopupsAddAccountViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsAddAccountViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Utils'),
|
||||
|
|
@ -86,7 +86,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsAddOpenPgpKeyViewModel', PopupsAddOpenPgpKeyViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:AddOpenPgpKey', 'PopupsAddOpenPgpKeyViewModel'], PopupsAddOpenPgpKeyViewModel);
|
||||
_.extend(PopupsAddOpenPgpKeyViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsAddOpenPgpKeyViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
moment = require('moment'),
|
||||
|
||||
|
|
@ -50,7 +50,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:AdvancedSearch', 'PopupsAdvancedSearchViewModel'], PopupsAdvancedSearchViewModel);
|
||||
_.extend(PopupsAdvancedSearchViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsAdvancedSearchViewModel.prototype.buildSearchStringValue = function (sValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
||||
|
|
@ -39,7 +39,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsAskViewModel', PopupsAskViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Ask', 'PopupsAskViewModel'], PopupsAskViewModel);
|
||||
_.extend(PopupsAskViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsAskViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
|
|
@ -159,7 +158,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsComposeOpenPgpViewModel', PopupsComposeOpenPgpViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:ComposeOpenPgp', 'PopupsComposeOpenPgpViewModel'], PopupsComposeOpenPgpViewModel);
|
||||
_.extend(PopupsComposeOpenPgpViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsComposeOpenPgpViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,8 +5,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
moment = require('moment'),
|
||||
JSON = require('JSON'),
|
||||
|
|
@ -17,8 +16,8 @@
|
|||
Consts = require('Consts'),
|
||||
Utils = require('Utils'),
|
||||
Globals = require('Globals'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
Events = require('Events'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
HtmlEditor = require('HtmlEditor'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
|
|
@ -404,7 +403,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Compose', 'PopupsComposeViewModel'], PopupsComposeViewModel);
|
||||
_.extend(PopupsComposeViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsComposeViewModel.prototype.emailsSource = function (oData, fResponse)
|
||||
{
|
||||
|
|
@ -794,7 +794,15 @@
|
|||
aDraftInfo = oMessage.aDraftInfo;
|
||||
|
||||
oText = $(oMessage.body).clone();
|
||||
Utils.removeBlockquoteSwitcher(oText);
|
||||
if (oText)
|
||||
{
|
||||
oText.find('blockquote.rl-bq-switcher').each(function () {
|
||||
$(this).removeClass('rl-bq-switcher hidden-bq');
|
||||
});
|
||||
oText.find('.rlBlockquoteSwitcher').each(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
|
||||
oText.find('[data-html-editor-font-wrapper]').removeAttr('data-html-editor-font-wrapper');
|
||||
sText = oText.html();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
|
@ -6,8 +5,8 @@
|
|||
|
||||
var
|
||||
window = require('window'),
|
||||
$ = require('$'),
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
key = require('key'),
|
||||
|
||||
|
|
@ -15,8 +14,8 @@
|
|||
Consts = require('Consts'),
|
||||
Globals = require('Globals'),
|
||||
Utils = require('Utils'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
Selector = require('Selector'),
|
||||
LinkBuilder = require('LinkBuilder'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote'),
|
||||
|
|
@ -391,7 +390,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Contacts', 'PopupsContactsViewModel'], PopupsContactsViewModel);
|
||||
_.extend(PopupsContactsViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsContactsViewModel.prototype.contactTagsSource = function (oData, fResponse)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
|
|
@ -200,7 +199,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Domain', 'PopupsDomainViewModel'], PopupsDomainViewModel);
|
||||
_.extend(PopupsDomainViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsDomainViewModel.prototype.onTestConnectionResponse = function (sResult, oData)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
(function (module, require) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Consts = require('Consts'),
|
||||
|
|
@ -33,7 +33,8 @@
|
|||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel('PopupsFilterViewModel', PopupsFilterViewModel);
|
||||
kn.extendAsViewModel(['View:Popup:Filter', 'PopupsFilterViewModel'], PopupsFilterViewModel);
|
||||
_.extend(PopupsFilterViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
||||
PopupsFilterViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue