destroy lightbox scope on close
parent
7829958548
commit
4ea48add11
|
@ -68,6 +68,8 @@ class LightboxService extends taiga.Service
|
|||
$el.addClass('close')
|
||||
|
||||
if $el.hasClass("remove-on-close")
|
||||
scope = $el.data("scope")
|
||||
scope.$destroy()
|
||||
$el.remove()
|
||||
|
||||
closeAll: ->
|
||||
|
|
|
@ -3,12 +3,14 @@ class LightboxFactory
|
|||
constructor: (@rootScope, @compile) ->
|
||||
|
||||
create: (name) ->
|
||||
scope = @rootScope.$new()
|
||||
|
||||
elm = $("<div>")
|
||||
.attr(name, true)
|
||||
.attr("tg-bind-scope", true)
|
||||
.addClass("wizard-create-project")
|
||||
.addClass("remove-on-close")
|
||||
|
||||
scope = @rootScope.$new()
|
||||
html = @compile(elm)(scope)
|
||||
|
||||
$(document.body).append(html)
|
||||
|
|
Loading…
Reference in New Issue