Fixes #2784 - new Knowledge Base modal in settings is removed properly when moving to another setting tab
This commit is contained in:
parent
5ca41c8389
commit
6d684c74cf
2 changed files with 6 additions and 1 deletions
|
@ -49,6 +49,10 @@ class App.ManageKnowledgeBase extends App.ControllerTabs
|
|||
App.KnowledgeBase.find(@knowledge_base_id).remove(clear: true)
|
||||
@fetchAndRender()
|
||||
|
||||
release: ->
|
||||
super
|
||||
@modal.el.remove()
|
||||
|
||||
processLoaded: ->
|
||||
if @knowledge_base_id
|
||||
@renderLoaded()
|
||||
|
@ -59,7 +63,7 @@ class App.ManageKnowledgeBase extends App.ControllerTabs
|
|||
@renderScreenError(detail: 'No Knowledge Base. Please create first Knowledge Base', el: @$('.page-content'))
|
||||
@headerSwitchInput.prop('checked', false)
|
||||
|
||||
new App.KnowledgeBaseNewModal(
|
||||
@modal = new App.KnowledgeBaseNewModal(
|
||||
parentVC: @
|
||||
container: @el.closest('.main')
|
||||
)
|
||||
|
|
|
@ -46,6 +46,7 @@ class App.KnowledgeBaseNewModal extends App.ControllerModal
|
|||
|
||||
success: (data) =>
|
||||
@parentVC.fetchAndRender()
|
||||
@parentVC.modal = undefined
|
||||
@close()
|
||||
|
||||
error: (xhr) =>
|
||||
|
|
Loading…
Reference in a new issue