lint compliance

pull/1/head
yflory 7 years ago
parent cf5ccf04f2
commit f931574dac

@ -67,7 +67,7 @@ define([], function () {
// Migration 4: allowUserFeedback to settings
var migrateLanguage = function () {
var migrateFeedback = function () {
var settings = userObject.settings = userObject.settings || {};
if (typeof(userObject['allowUserFeedback']) !== "undefined") {
settings.general = settings.general || {};
@ -76,7 +76,7 @@ define([], function () {
}
};
if (version < 4) {
migrateLanguage();
migrateFeedback();
Cryptpad.feedback('Migrate-4', true);
userObject.version = version = 4;
}

@ -4,8 +4,8 @@ define([
'/common/cryptpad-common.js',
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/customize/pages.js',
'/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'less!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/customize/src/less2/main.less',
@ -14,10 +14,10 @@ define([
Toolbar,
Cryptpad,
nThen,
SFCommon,
Pages
SFCommon
)
{
var saveAs = window.saveAs;
var Messages = Cryptpad.Messages;
var APP = window.APP = {
Cryptpad: Cryptpad,
@ -151,7 +151,7 @@ define([
return $div;
};
var createIndentTypeSelector = function (obj) {
var createIndentTypeSelector = function () {
var key = 'indentWithTabs';
var $div = $('<div>', {
@ -305,7 +305,7 @@ define([
return $div;
};
var createResetDrive = function (obj) {
var createResetDrive = function () {
var $div = $('<div>', {'class': 'cp-settings-reset-drive cp-sidebarlayout-element'});
$('<label>').text(Messages.settings_resetNewTitle).appendTo($div);
$('<span>', {'class': 'cp-sidebarlayout-description'})
@ -397,7 +397,7 @@ define([
$spinner.show();
$ok.hide();
sframeChan.query('Q_SETTINGS_LOGOUT', null, function (err) {
sframeChan.query('Q_SETTINGS_LOGOUT', null, function () {
$spinner.hide();
$ok.show();
window.setTimeout(function () {
@ -428,7 +428,7 @@ define([
if (!yes) { return; }
$spinner.show();
$ok.hide();
sframeChan.query('Q_SETTINGS_IMPORT_LOCAL', null, function (err) {
sframeChan.query('Q_SETTINGS_IMPORT_LOCAL', null, function () {
$spinner.hide();
$ok.show();
Cryptpad.alert(Messages.settings_importDone);

@ -60,7 +60,7 @@ define([
var sjson = JSON.stringify(data);
var k = Cryptpad.getUserHash() || localStorage[Cryptpad.fileHashKey];
require(['/common/cryptget.js'], function (Crypt) {
Crypt.put(k, sjson, function (err, data) {
Crypt.put(k, sjson, function (err) {
cb(err);
});
});
@ -80,7 +80,10 @@ define([
Cryptpad.whenRealtimeSyncs(realtime, cb);
});
sframeChan.on('Q_SETTINGS_IMPORT_LOCAL', function (data, cb) {
Merge.anonDriveIntoUser(Cryptpad.getStore().getProxy(), localStorage.FS_hash, cb);
var proxyData = Cryptpad.getStore().getProxy();
require(['/common/mergeDrive.js'], function (Merge) {
Merge.anonDriveIntoUser(proxyData, localStorage.FS_hash, cb);
});
});
};
SFCommonO.start({

Loading…
Cancel
Save