271 | function bindToKNgDisabled(widget, scope, element, kNgDisabled) { |
272 | if ((kendo.ui.PanelBar && widget instanceof kendo.ui.PanelBar) || (kendo.ui.Menu && widget instanceof kendo.ui.Menu)) { |
273 | $log.warn("k-ng-disabled specified on a widget that does not have the enable() method: " + (widget.options.name)); |
274 | return; |
275 | } |
276 | scope.$apply(function() { |
277 | scope.$watch(kNgDisabled, function(newValue, oldValue) { |
278 | if (newValue != oldValue) { |
279 | widget.enable(!newValue); |
280 | } |
281 | }); |
282 | }); |
283 | } |