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)
|
App.KnowledgeBase.find(@knowledge_base_id).remove(clear: true)
|
||||||
@fetchAndRender()
|
@fetchAndRender()
|
||||||
|
|
||||||
|
release: ->
|
||||||
|
super
|
||||||
|
@modal.el.remove()
|
||||||
|
|
||||||
processLoaded: ->
|
processLoaded: ->
|
||||||
if @knowledge_base_id
|
if @knowledge_base_id
|
||||||
@renderLoaded()
|
@renderLoaded()
|
||||||
|
@ -59,7 +63,7 @@ class App.ManageKnowledgeBase extends App.ControllerTabs
|
||||||
@renderScreenError(detail: 'No Knowledge Base. Please create first Knowledge Base', el: @$('.page-content'))
|
@renderScreenError(detail: 'No Knowledge Base. Please create first Knowledge Base', el: @$('.page-content'))
|
||||||
@headerSwitchInput.prop('checked', false)
|
@headerSwitchInput.prop('checked', false)
|
||||||
|
|
||||||
new App.KnowledgeBaseNewModal(
|
@modal = new App.KnowledgeBaseNewModal(
|
||||||
parentVC: @
|
parentVC: @
|
||||||
container: @el.closest('.main')
|
container: @el.closest('.main')
|
||||||
)
|
)
|
||||||
|
|
|
@ -46,6 +46,7 @@ class App.KnowledgeBaseNewModal extends App.ControllerModal
|
||||||
|
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@parentVC.fetchAndRender()
|
@parentVC.fetchAndRender()
|
||||||
|
@parentVC.modal = undefined
|
||||||
@close()
|
@close()
|
||||||
|
|
||||||
error: (xhr) =>
|
error: (xhr) =>
|
||||||
|
|
Loading…
Reference in a new issue