Fix lint errors

This commit is contained in:
yflory
2017-01-25 10:21:31 +01:00
parent 097f78d777
commit 373b07ed28
5 changed files with 34 additions and 33 deletions

View File

@@ -374,7 +374,7 @@ define([
if (config.displayed.indexOf('useradmin') !== -1) {
if (!config.userName || !config.userName.setName || !config.userName.lastName) {
throw new Error("You must provide a `userName` object containing `setName` (function) " +
"and `lastName` (object) if you want to display the user admin menu.")
"and `lastName` (object) if you want to display the user admin menu.");
}
var $displayedName = $('<span>', {'class': USERNAME_CLS});
var accountName = Cryptpad.getStore().getLoginName ? Cryptpad.getStore().getLoginName() : null;
@@ -388,7 +388,7 @@ define([
var $userName = $('<span>', {'class': 'userDisplayName'});
if (readOnly !== 1) {
// Hide "Display name:" in read only mode
$userName.append(Messages.user_displayName + ': ')
$userName.append(Messages.user_displayName + ': ');
}
$userName.append($displayedName.clone());
$userAdminContent.append($userName);
@@ -429,12 +429,12 @@ define([
if (account) {
$button.append($('<span>', {'class': 'account-name'}).text('(' + accountName + ')'));
}
var dropdownConfig = {
var dropdownConfigUser = {
text: $button.html(), // Button initial text
options: options, // Entries displayed in the menu
left: true, // Open to the left of the button
};
var $userAdmin = Cryptpad.createDropdown(dropdownConfig);
var $userAdmin = Cryptpad.createDropdown(dropdownConfigUser);
$userContainer.append($userAdmin);
$userAdmin.find('a.logout').click(function (e) {
@@ -569,9 +569,9 @@ define([
return;
}
var e = jQuery.Event("keyup");
e.which = 13;
$titleElement.find('input').trigger(e);
var ev = $.Event("keyup");
ev.which = 13;
$titleElement.find('input').trigger(ev);
/*
$titleElement.find('input').hide();