Fix jshint errors
This commit is contained in:
Родитель
b7dc36ae81
Коммит
737c56ed29
|
@ -1,4 +1,5 @@
|
|||
node_modules
|
||||
js/node_modules
|
||||
l10n
|
||||
vendor
|
||||
/* Static 3rd party */
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"expect": true,
|
||||
"describe": true,
|
||||
"define": true,
|
||||
"require": true,
|
||||
"beforeEach": true,
|
||||
"afterEach": true,
|
||||
"fakeServer": true,
|
||||
|
|
|
@ -32,6 +32,8 @@ before_install:
|
|||
before_script:
|
||||
- cd apps/mail
|
||||
- npm install --deps
|
||||
- cd js
|
||||
- npm install --deps
|
||||
|
||||
script:
|
||||
# Test lint
|
||||
|
|
|
@ -15,6 +15,7 @@ define(function(require) {
|
|||
|
||||
var OC = require('OC');
|
||||
|
||||
/*jshint maxparams: 6 */
|
||||
return {
|
||||
showNotification: function(title, body, tag, icon, accountId, folderId) {
|
||||
// notifications not supported -> go away
|
||||
|
|
|
@ -148,5 +148,5 @@ define(function(require) {
|
|||
// End unified inbox hack
|
||||
}
|
||||
};
|
||||
})()
|
||||
})();
|
||||
});
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
* @copyright Christoph Wurst 2015
|
||||
*/
|
||||
|
||||
require(['domReady', 'app'], function(document, Mail) {
|
||||
console.log('init');
|
||||
define(function(require) {
|
||||
'use strict';
|
||||
|
||||
var document = require('domready'),
|
||||
Mail = require('app');
|
||||
|
||||
Mail.UI.initializeInterface();
|
||||
console.log('init finished');
|
||||
|
||||
// auto detect button handling
|
||||
$('#auto_detect_account').click(function(event) {
|
||||
|
|
|
@ -10,38 +10,40 @@
|
|||
* @copyright Christoph Wurst 2015
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
requirejs.config({
|
||||
baseUrl: './../../../apps/mail/js',
|
||||
paths: {
|
||||
/**
|
||||
* Application
|
||||
*/
|
||||
app: 'mail',
|
||||
marionette: 'backbone.marionette',
|
||||
handlebars: 'handlebars-v1.3.0',
|
||||
/**
|
||||
* Libraries
|
||||
*/
|
||||
domReady: 'node_modules/domready/ready.min',
|
||||
//jquery: '../../../core/vendor/jquery/jquery.min',
|
||||
storage: 'jquery.storageapi',
|
||||
underscore: '../../../core/vendor/underscore/underscore'
|
||||
},
|
||||
shim: {
|
||||
// TODO: remove once min-oc-version is 8.0
|
||||
handlebars: {
|
||||
exports: 'Handlebars'
|
||||
requirejs.config({
|
||||
baseUrl: './../../../apps/mail/js',
|
||||
paths: {
|
||||
/**
|
||||
* Application
|
||||
*/
|
||||
app: 'mail',
|
||||
marionette: 'backbone.marionette',
|
||||
handlebars: 'handlebars-v1.3.0',
|
||||
/**
|
||||
* Libraries
|
||||
*/
|
||||
domReady: 'node_modules/domready/ready.min',
|
||||
//jquery: '../../../core/vendor/jquery/jquery.min',
|
||||
storage: 'jquery.storageapi',
|
||||
underscore: '../../../core/vendor/underscore/underscore'
|
||||
},
|
||||
// END TODO
|
||||
jquery: {
|
||||
exports: '$'
|
||||
shim: {
|
||||
// TODO: remove once min-oc-version is 8.0
|
||||
handlebars: {
|
||||
exports: 'Handlebars'
|
||||
},
|
||||
// END TODO
|
||||
jquery: {
|
||||
exports: '$'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
require([
|
||||
'init',
|
||||
'notification'
|
||||
]);
|
||||
require([
|
||||
'init',
|
||||
'notification'
|
||||
]);
|
||||
})();
|
12
js/ui.js
12
js/ui.js
|
@ -1,4 +1,4 @@
|
|||
/* global Notification */
|
||||
/* global Notification, adjustControlsWidth */
|
||||
|
||||
/**
|
||||
* ownCloud - Mail
|
||||
|
@ -123,10 +123,11 @@ define(function(require) {
|
|||
$('#folders').removeClass('hidden');
|
||||
$('#mail-setup').addClass('hidden');
|
||||
|
||||
require('app').UI.clearMessages();
|
||||
var app = require('app');
|
||||
app.UI.clearMessages();
|
||||
$('#app-navigation').addClass('icon-loading');
|
||||
|
||||
require('app').Communication.get(OC.generateUrl('apps/mail/accounts/{accountId}/folders', {accountId: accountId}), {
|
||||
app.Communication.get(OC.generateUrl('apps/mail/accounts/{accountId}/folders', {accountId: accountId}), {
|
||||
success: function(jsondata) {
|
||||
$('#app-navigation').removeClass('icon-loading');
|
||||
require('app').State.folderView.collection.add(jsondata);
|
||||
|
@ -273,9 +274,10 @@ define(function(require) {
|
|||
},
|
||||
onError: function(error, textStatus) {
|
||||
if (textStatus !== 'abort') {
|
||||
var app = require('app');
|
||||
// Set the old folder as being active
|
||||
require('app').UI.setFolderActive(require('app').State.currentAccountId, require('app').State.currentFolderId);
|
||||
require('app').UI.showError(t('mail', 'Error while loading messages.'));
|
||||
app.UI.setFolderActive(app.State.currentAccountId, app.State.currentFolderId);
|
||||
app.UI.showError(t('mail', 'Error while loading messages.'));
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
|
|
|
@ -89,7 +89,7 @@ define(function(require) {
|
|||
/**
|
||||
* Attachments sub-view
|
||||
*/
|
||||
this.attachments = new Attachments;
|
||||
this.attachments = new Attachments();
|
||||
|
||||
if (!this.isReply()) {
|
||||
this.aliases = _.filter(options.aliases, function(item) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* global relative_modified_date, formatDate, md5, humanFileSize, getScrollBarWidth */
|
||||
|
||||
/**
|
||||
* ownCloud - Mail
|
||||
*
|
||||
|
|
|
@ -112,7 +112,8 @@ define(function(require) {
|
|||
data: {},
|
||||
type: 'DELETE',
|
||||
success: function() {
|
||||
require('app').Cache.removeMessage(require('app').State.currentAccountId, require('app').State.currentFolderId, thisModel.id);
|
||||
var app = require('app');
|
||||
app.Cache.removeMessage(app.State.currentAccountId, app.State.currentFolderId, thisModel.id);
|
||||
},
|
||||
error: function() {
|
||||
require('app').UI.showError(t('mail', 'Error while deleting message.'));
|
||||
|
|
Загрузка…
Ссылка в новой задаче