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