mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-54687 core_message: fixed lint errors
This commit is contained in:
parent
d9fad93dc5
commit
2be15a66c4
@ -92,10 +92,14 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/cust
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.VIEWPROFILE,
|
||||
this._viewContact.bind(this));
|
||||
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.CONTACT, this._selectPreviousContact.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.CONTACT, this._selectNextContact.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.VIEWCONVERSATION, this._selectPreviousConversation.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.VIEWCONVERSATION, this._selectNextConversation.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.CONTACT,
|
||||
this._selectPreviousContact.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.CONTACT,
|
||||
this._selectNextContact.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.VIEWCONVERSATION,
|
||||
this._selectPreviousConversation.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.VIEWCONVERSATION,
|
||||
this._selectNextConversation.bind(this));
|
||||
|
||||
this.messageArea.onDelegateEvent('focus', this.messageArea.SELECTORS.SEARCHBOX, this._setSearching.bind(this));
|
||||
this.messageArea.onDelegateEvent('blur', this.messageArea.SELECTORS.SEARCHBOX, this._clearSearching.bind(this));
|
||||
|
@ -65,15 +65,21 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/cust
|
||||
this.messageArea.onCustomEvent(this.messageArea.EVENTS.CONVERSATIONSELECTED, this._viewMessages.bind(this));
|
||||
this.messageArea.onCustomEvent(this.messageArea.EVENTS.SENDMESSAGE, this._viewMessages.bind(this));
|
||||
this.messageArea.onCustomEvent(this.messageArea.EVENTS.CHOOSEMESSAGESTODELETE, this._chooseMessagesToDelete.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.SENDMESSAGE, this._sendMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.STARTDELETEMESSAGES, this._startDeleting.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.DELETEMESSAGES, this._deleteMessages.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.SENDMESSAGE,
|
||||
this._sendMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.STARTDELETEMESSAGES,
|
||||
this._startDeleting.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.DELETEMESSAGES,
|
||||
this._deleteMessages.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.CANCELDELETEMESSAGES,
|
||||
this._cancelMessagesToDelete.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.MESSAGE, this._toggleMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.activate, this.messageArea.SELECTORS.MESSAGE,
|
||||
this._toggleMessage.bind(this));
|
||||
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.MESSAGE, this._selectPreviousMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.MESSAGE, this._selectNextMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.up, this.messageArea.SELECTORS.MESSAGE,
|
||||
this._selectPreviousMessage.bind(this));
|
||||
this.messageArea.onDelegateEvent(customEvents.events.down, this.messageArea.SELECTORS.MESSAGE,
|
||||
this._selectNextMessage.bind(this));
|
||||
|
||||
this.messageArea.onDelegateEvent('focus', this.messageArea.SELECTORS.SENDMESSAGETEXT, this._setMessaging.bind(this));
|
||||
this.messageArea.onDelegateEvent('blur', this.messageArea.SELECTORS.SENDMESSAGETEXT, this._clearMessaging.bind(this));
|
||||
@ -474,10 +480,9 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/cust
|
||||
* Check or uncheck the message if the message area is in editing mode.
|
||||
*
|
||||
* @params {event} e The jquery event
|
||||
* @params {object} data Additional event data
|
||||
* @private
|
||||
*/
|
||||
Messages.prototype._toggleMessage = function(e, data) {
|
||||
Messages.prototype._toggleMessage = function(e) {
|
||||
if (!this._isEditing()) {
|
||||
return;
|
||||
}
|
||||
|
@ -327,15 +327,17 @@ define(['jquery', 'theme_bootstrapbase/bootstrap', 'core/ajax', 'core/templates'
|
||||
.done(function() {
|
||||
// If everything executed correctly then update the DOM.
|
||||
if (ischecked) {
|
||||
button.attr('aria-checked', false)
|
||||
button.attr('aria-checked', false);
|
||||
button.attr('data-original-title', blockstring);
|
||||
} else {
|
||||
button.attr('aria-checked', true)
|
||||
button.attr('aria-checked', true);
|
||||
button.attr('data-original-title', unblockstring);
|
||||
}
|
||||
})
|
||||
.fail(Notification.exception)
|
||||
.always(function() { button.removeClass('loading') });
|
||||
.always(function() {
|
||||
button.removeClass('loading');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -431,17 +431,19 @@ define(['jquery', 'theme_bootstrapbase/bootstrap', 'core/ajax', 'core/templates'
|
||||
.done(function() {
|
||||
// If everything executed correctly then update the DOM.
|
||||
if (ischecked) {
|
||||
button.attr('aria-checked', false)
|
||||
button.attr('aria-checked', false);
|
||||
button.attr('data-original-title', disablestring);
|
||||
$(document).trigger('messageprefs:enableall');
|
||||
} else {
|
||||
button.attr('aria-checked', true)
|
||||
button.attr('aria-checked', true);
|
||||
button.attr('data-original-title', enablestring);
|
||||
$(document).trigger('messageprefs:disableall');
|
||||
}
|
||||
})
|
||||
.fail(DebugNotification.exception)
|
||||
.always(function() { button.removeClass('loading') });
|
||||
.always(function() {
|
||||
button.removeClass('loading');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -109,7 +109,7 @@ define(['jquery', 'core/custom_interaction_events', 'core_message/notification_p
|
||||
$(document).on('messageprefs:enableall', function() {
|
||||
this.setEnabled();
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
return PreferencesController;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user