Fixed issue #777 - Wrong behaviour in tagging functionality.
This commit is contained in:
parent
e7eab89bce
commit
4fab8007e4
3 changed files with 6 additions and 6 deletions
|
@ -693,7 +693,7 @@ class App.TicketZoom extends App.Controller
|
|||
tagAdd: (tag) =>
|
||||
return if !@sidebar
|
||||
return if !@sidebar.reload
|
||||
@sidebar.reload(tagAdd: tag)
|
||||
@sidebar.reload(tagAdd: tag, source: 'macro')
|
||||
tagRemove: (tag) =>
|
||||
return if !@sidebar
|
||||
return if !@sidebar.reload
|
||||
|
|
|
@ -69,7 +69,7 @@ class SidebarTicket extends App.Controller
|
|||
if args.tags
|
||||
@tagWidget.reload(args.tags)
|
||||
if args.tagAdd
|
||||
@tagWidget.add(args.tagAdd)
|
||||
@tagWidget.add(args.tagAdd, args.source)
|
||||
if args.tagRemove
|
||||
@tagWidget.remove(args.tagRemove)
|
||||
|
||||
|
|
|
@ -86,16 +86,16 @@ class App.WidgetTag extends App.Controller
|
|||
return
|
||||
@add(item)
|
||||
|
||||
add: (items) =>
|
||||
add: (items, source = '') =>
|
||||
for item in items.split(',')
|
||||
item = item.trim()
|
||||
@addItem(item)
|
||||
@addItem(item, source)
|
||||
|
||||
addItem: (item) =>
|
||||
addItem: (item, source = '') =>
|
||||
if _.contains(@localTags, item)
|
||||
@render()
|
||||
return
|
||||
return if App.Config.get('tag_new') is false && !@possibleTags[item]
|
||||
return if source != 'macro' && App.Config.get('tag_new') is false && !@possibleTags[item]
|
||||
@localTags.push item
|
||||
@render()
|
||||
App[@object_type].tagAdd(@object.id, item)
|
||||
|
|
Loading…
Reference in a new issue