fix lighboxFactory close
parent
7f34f6e0bf
commit
7c41b02faf
|
@ -131,6 +131,8 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
|
|
||||||
openLightbox()
|
openLightbox()
|
||||||
|
|
||||||
|
console.log "link"
|
||||||
|
|
||||||
directive = {
|
directive = {
|
||||||
link: link,
|
link: link,
|
||||||
templateUrl: "project/wizard-create-project.html"
|
templateUrl: "project/wizard-create-project.html"
|
||||||
|
|
|
@ -8,11 +8,12 @@ class LightboxFactory
|
||||||
elm = $("<div>")
|
elm = $("<div>")
|
||||||
.attr(name, true)
|
.attr(name, true)
|
||||||
.attr("tg-bind-scope", true)
|
.attr("tg-bind-scope", true)
|
||||||
.addClass("remove-on-close")
|
|
||||||
|
|
||||||
if attrs
|
if attrs
|
||||||
elm.attr(attrs)
|
elm.attr(attrs)
|
||||||
|
|
||||||
|
elm.addClass("remove-on-close")
|
||||||
|
|
||||||
html = @compile(elm)(scope)
|
html = @compile(elm)(scope)
|
||||||
|
|
||||||
$(document.body).append(html)
|
$(document.body).append(html)
|
||||||
|
|
|
@ -56,7 +56,7 @@ describe "tgLightboxFactory", ->
|
||||||
lightboxFactoryService.create("fake-directive", attrs)
|
lightboxFactoryService.create("fake-directive", attrs)
|
||||||
|
|
||||||
checkAttributes = sinon.match ( (value) ->
|
checkAttributes = sinon.match ( (value) ->
|
||||||
return value.attr("class") == "x1" && value.attr("id") == "x2"
|
return value.hasClass("x1") && value.attr("id") == "x2" && value.hasClass("remove-on-close")
|
||||||
), "checkAttributes"
|
), "checkAttributes"
|
||||||
|
|
||||||
expect(mocks.compile.withArgs(checkAttributes)).to.have.been.calledOnce
|
expect(mocks.compile.withArgs(checkAttributes)).to.have.been.calledOnce
|
||||||
|
|
Loading…
Reference in New Issue