mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Remove unused variables
This commit is contained in:
parent
834a721bbe
commit
2ade638d79
@ -271,7 +271,7 @@ $.fn.autocomplete = function(options) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return $(this).keydown(function(e) {
|
return $(this).keydown(function(e) {
|
||||||
var c, caretPosition, i, initial, next, nextIsGood, prev, prevIsGood, stopFound, term, total, userToComplete;
|
var c, caretPosition, i, initial, next, prev, prevIsGood, stopFound, term, total, userToComplete;
|
||||||
|
|
||||||
if(options.allowAny){
|
if(options.allowAny){
|
||||||
// saves us wiring up a change event as well, keypress is while its pressed
|
// saves us wiring up a change event as well, keypress is while its pressed
|
||||||
@ -298,7 +298,6 @@ $.fn.autocomplete = function(options) {
|
|||||||
if ((completeStart === null) && e.which === 8 && options.key) {
|
if ((completeStart === null) && e.which === 8 && options.key) {
|
||||||
c = Discourse.Utilities.caretPosition(me[0]);
|
c = Discourse.Utilities.caretPosition(me[0]);
|
||||||
next = me[0].value[c];
|
next = me[0].value[c];
|
||||||
nextIsGood = next === void 0 || /\s/.test(next);
|
|
||||||
c -= 1;
|
c -= 1;
|
||||||
initial = c;
|
initial = c;
|
||||||
prevIsGood = true;
|
prevIsGood = true;
|
||||||
|
@ -71,8 +71,6 @@ $.fn.caretPosition = function(options) {
|
|||||||
"line-height": important("line-height")
|
"line-height": important("line-height")
|
||||||
});
|
});
|
||||||
|
|
||||||
before = void 0;
|
|
||||||
after = void 0;
|
|
||||||
pos = options && (options.pos || options.pos === 0) ? options.pos : getCaret(textarea[0]);
|
pos = options && (options.pos || options.pos === 0) ? options.pos : getCaret(textarea[0]);
|
||||||
val = textarea.val().replace("\r", "");
|
val = textarea.val().replace("\r", "");
|
||||||
if (options && options.key) {
|
if (options && options.key) {
|
||||||
|
@ -21,7 +21,6 @@ Discourse.Eyeline.prototype.update = function() {
|
|||||||
docViewBottom = docViewTop + windowHeight,
|
docViewBottom = docViewTop + windowHeight,
|
||||||
$elements = $(this.selector),
|
$elements = $(this.selector),
|
||||||
atBottom = false,
|
atBottom = false,
|
||||||
foundElement = false,
|
|
||||||
bottomOffset = $elements.last().offset(),
|
bottomOffset = $elements.last().offset(),
|
||||||
self = this;
|
self = this;
|
||||||
|
|
||||||
@ -29,9 +28,6 @@ Discourse.Eyeline.prototype.update = function() {
|
|||||||
atBottom = (bottomOffset.top <= docViewBottom) && (bottomOffset.top >= docViewTop);
|
atBottom = (bottomOffset.top <= docViewBottom) && (bottomOffset.top >= docViewTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether we've seen any elements in this search
|
|
||||||
foundElement = false;
|
|
||||||
|
|
||||||
return $elements.each(function(i, elem) {
|
return $elements.each(function(i, elem) {
|
||||||
var $elem = $(elem),
|
var $elem = $(elem),
|
||||||
elemTop = $elem.offset().top,
|
elemTop = $elem.offset().top,
|
||||||
|
@ -47,6 +47,7 @@ Discourse.ActionsHistoryComponent = Em.Component.extend({
|
|||||||
var key = 'post.actions.people.' + c.get('actionType.name_key');
|
var key = 'post.actions.people.' + c.get('actionType.name_key');
|
||||||
if (postUrl) { key = key + "_with_url"; }
|
if (postUrl) { key = key + "_with_url"; }
|
||||||
|
|
||||||
|
// TODO postUrl might be uninitialized? pick a good default
|
||||||
buffer.push(" " + I18n.t(key, { icons: iconsHtml, postUrl: postUrl}) + ".");
|
buffer.push(" " + I18n.t(key, { icons: iconsHtml, postUrl: postUrl}) + ".");
|
||||||
}
|
}
|
||||||
renderActionIf('usersCollapsed', 'who-acted', c.get('description'));
|
renderActionIf('usersCollapsed', 'who-acted', c.get('description'));
|
||||||
|
@ -22,7 +22,7 @@ module Jobs
|
|||||||
begin
|
begin
|
||||||
mail_string = mail.pop
|
mail_string = mail.pop
|
||||||
Email::Receiver.new(mail_string).process
|
Email::Receiver.new(mail_string).process
|
||||||
rescue Email::Receiver::UserNotSufficientTrustLevelError => e
|
rescue Email::Receiver::UserNotSufficientTrustLevelError
|
||||||
# inform the user about the rejection
|
# inform the user about the rejection
|
||||||
@message = Mail::Message.new(mail_string)
|
@message = Mail::Message.new(mail_string)
|
||||||
clientMessage = RejectionMailer.send_trust_level(@message.from, @message.body)
|
clientMessage = RejectionMailer.send_trust_level(@message.from, @message.body)
|
||||||
|
Loading…
Reference in New Issue
Block a user