Skip to content

Commit

Permalink
Merge pull request #78 from rsbondi/master
Browse files Browse the repository at this point in the history
Ability to optionally not control descendant bindings on popover
  • Loading branch information
billpull committed Aug 19, 2015
2 parents a448fbc + 9233a97 commit 85f16c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/knockout-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function setupKoBootstrap(koObject, $) {
var template = popoverBindingValues.template || false;
var options = popoverBindingValues.options || {title: 'popover'};
var data = popoverBindingValues.data || false;
var controlDescendants = popoverBindingValues.controlDescendants;
if (template !== false) {
if (data) {
options.content = "<!-- ko template: { name: template, if: data, data: data } --><!-- /ko -->";
Expand Down Expand Up @@ -235,7 +236,7 @@ function setupKoBootstrap(koObject, $) {
$element.popover('destroy');
});

return { controlsDescendantBindings: true };
return { controlsDescendantBindings: typeof controlDescendants == 'undefined' ? true : controlDescendants };

}
};
Expand Down Expand Up @@ -298,7 +299,7 @@ function setupKoBootstrap(koObject, $) {
koObject.utils.domNodeDisposal.addDisposeCallback(element, function () {
$element.modal('destroy');
});

return { controlsDescendantBindings: true };

}
Expand Down

0 comments on commit 85f16c8

Please sign in to comment.