| @@ 5639-5672 (lines=34) @@ | ||
| 5636 | }; |
|
| 5637 | }) |
|
| 5638 | ||
| 5639 | .directive('uibTabContentTransclude', function() { |
|
| 5640 | return { |
|
| 5641 | restrict: 'A', |
|
| 5642 | require: '^uibTabset', |
|
| 5643 | link: function(scope, elm, attrs) { |
|
| 5644 | var tab = scope.$eval(attrs.uibTabContentTransclude).tab; |
|
| 5645 | ||
| 5646 | //Now our tab is ready to be transcluded: both the tab heading area |
|
| 5647 | //and the tab content area are loaded. Transclude 'em both. |
|
| 5648 | tab.$transcludeFn(tab.$parent, function(contents) { |
|
| 5649 | angular.forEach(contents, function(node) { |
|
| 5650 | if (isTabHeading(node)) { |
|
| 5651 | //Let tabHeadingTransclude know. |
|
| 5652 | tab.headingElement = node; |
|
| 5653 | } else { |
|
| 5654 | elm.append(node); |
|
| 5655 | } |
|
| 5656 | }); |
|
| 5657 | }); |
|
| 5658 | } |
|
| 5659 | }; |
|
| 5660 | ||
| 5661 | function isTabHeading(node) { |
|
| 5662 | return node.tagName && ( |
|
| 5663 | node.hasAttribute('uib-tab-heading') || |
|
| 5664 | node.hasAttribute('data-uib-tab-heading') || |
|
| 5665 | node.hasAttribute('x-uib-tab-heading') || |
|
| 5666 | node.tagName.toLowerCase() === 'uib-tab-heading' || |
|
| 5667 | node.tagName.toLowerCase() === 'data-uib-tab-heading' || |
|
| 5668 | node.tagName.toLowerCase() === 'x-uib-tab-heading' || |
|
| 5669 | node.tagName.toLowerCase() === 'uib:tab-heading' |
|
| 5670 | ); |
|
| 5671 | } |
|
| 5672 | }); |
|
| 5673 | ||
| 5674 | angular.module('ui.bootstrap.timepicker', []) |
|
| 5675 | ||
| @@ 5638-5671 (lines=34) @@ | ||
| 5635 | }; |
|
| 5636 | }) |
|
| 5637 | ||
| 5638 | .directive('uibTabContentTransclude', function() { |
|
| 5639 | return { |
|
| 5640 | restrict: 'A', |
|
| 5641 | require: '^uibTabset', |
|
| 5642 | link: function(scope, elm, attrs) { |
|
| 5643 | var tab = scope.$eval(attrs.uibTabContentTransclude).tab; |
|
| 5644 | ||
| 5645 | //Now our tab is ready to be transcluded: both the tab heading area |
|
| 5646 | //and the tab content area are loaded. Transclude 'em both. |
|
| 5647 | tab.$transcludeFn(tab.$parent, function(contents) { |
|
| 5648 | angular.forEach(contents, function(node) { |
|
| 5649 | if (isTabHeading(node)) { |
|
| 5650 | //Let tabHeadingTransclude know. |
|
| 5651 | tab.headingElement = node; |
|
| 5652 | } else { |
|
| 5653 | elm.append(node); |
|
| 5654 | } |
|
| 5655 | }); |
|
| 5656 | }); |
|
| 5657 | } |
|
| 5658 | }; |
|
| 5659 | ||
| 5660 | function isTabHeading(node) { |
|
| 5661 | return node.tagName && ( |
|
| 5662 | node.hasAttribute('uib-tab-heading') || |
|
| 5663 | node.hasAttribute('data-uib-tab-heading') || |
|
| 5664 | node.hasAttribute('x-uib-tab-heading') || |
|
| 5665 | node.tagName.toLowerCase() === 'uib-tab-heading' || |
|
| 5666 | node.tagName.toLowerCase() === 'data-uib-tab-heading' || |
|
| 5667 | node.tagName.toLowerCase() === 'x-uib-tab-heading' || |
|
| 5668 | node.tagName.toLowerCase() === 'uib:tab-heading' |
|
| 5669 | ); |
|
| 5670 | } |
|
| 5671 | }); |
|
| 5672 | ||
| 5673 | angular.module('ui.bootstrap.timepicker', []) |
|
| 5674 | ||