From: Tim Otten Date: Thu, 30 Oct 2014 03:51:14 +0000 (-0700) Subject: CRM-15578 - crmUiAccordion - Basic implementation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0cbed02cfec479827b2f3dd18fc229c4d4c42dff;p=civicrm-core.git CRM-15578 - crmUiAccordion - Basic implementation --- diff --git a/js/angular-crm-ui.js b/js/angular-crm-ui.js index 502db37919..571f56a699 100644 --- a/js/angular-crm-ui.js +++ b/js/angular-crm-ui.js @@ -4,15 +4,21 @@ angular.module('crmUi', []) - // example
...content...
+ // example
...content...
+ // WISHLIST: crmCollapsed should support two-way/continous binding .directive('crmUiAccordion', function() { return { scope: { - crmTitle: '@' + crmTitle: '@', + crmCollapsed: '@' }, - template: '
(Accordion: {{$parent.$eval(crmTitle)}})
', + template: '
{{$parent.$eval(crmTitle)}}
', transclude: true, - link: function (scope, element, attrs) {} + link: function (scope, element, attrs) { + scope.cssClasses = { + collapsed: scope.$parent.$eval(attrs.crmCollapsed) + }; + } }; })