From f09a4f10644740b0a2fd676799fadb4837505419 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 28 Jan 2016 11:20:36 +0100 Subject: [PATCH] Small cleanup. --- .../app/controllers/ticket_zoom/article_actions.coffee | 1 - app/assets/javascripts/app/controllers/widget/tag.coffee | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_actions.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_actions.coffee index f80f79d3d..d42e19c84 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_actions.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_actions.coffee @@ -131,7 +131,6 @@ class App.TicketZoomArticleActions extends App.Controller e.preventDefault() type = App.TicketArticleType.findByAttribute('name', 'facebook feed comment') - console.log('tt', type) @scrollToCompose() # empty form diff --git a/app/assets/javascripts/app/controllers/widget/tag.coffee b/app/assets/javascripts/app/controllers/widget/tag.coffee index d524ef4f2..c10a79db7 100644 --- a/app/assets/javascripts/app/controllers/widget/tag.coffee +++ b/app/assets/javascripts/app/controllers/widget/tag.coffee @@ -52,7 +52,7 @@ class App.WidgetTag extends App.Controller onAddTag: (e) => e.preventDefault() - item = @$('[name="new_tag"]').val() + item = @$('[name="new_tag"]').val().trim() return if !item @add(item) @@ -85,12 +85,11 @@ class App.WidgetTag extends App.Controller e.preventDefault() item = $(e.target).parents('li').find('.js-tag').text() return if !item - @remove(item) remove: (item) => - @tags = _.filter(@tags, (tagItem) -> return tagItem if tagItem isnt item ) + @tags = _.filter(@tags, (tagItem) -> return tagItem if tagItem isnt item) @render() @ajax(