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