Merge pull request #9586 from alifrumin/caselinks
[civicrm-core.git] / ang / crmUi.js
index 20bcdbc823b6812cf217102bb03925f7e72ea3bd..879b2a8c43f690622a069671d8743afc0adb6646 100644 (file)
         restrict: 'EA',
         scope: {
           crmUiWizard: '@',
-          crmUiWizardNavClass: '@'
+          crmUiWizardNavClass: '@' // string, A list of classes that will be added to the nav items
         },
         templateUrl: '~/crmUi/wizard.html',
         transclude: true,
         restrict: 'EA',
         scope: {
           crmTitle: '@', // expression, evaluates to a printable string
-          crmUiWizardStep: '@' // int, a weight which determines the ordering of the steps
-          crmUiWizardStepClass: '@' // int, a weight which determines the ordering of the steps
+          crmUiWizardStep: '@', // int, a weight which determines the ordering of the steps
+          crmUiWizardStepClass: '@' // string, A list of classes that will be added to the template
         },
         template: '<div class="crm-wizard-step {{crmUiWizardStepClass}}" ng-show="selected" ng-transclude/></div>',
         transclude: true,
             return form.$valid;
           };
           crmUiWizardCtrl.add(scope);
-          element.on('$destroy', function(){
+          scope.$on('$destroy', function(){
             crmUiWizardCtrl.remove(scope);
           });
         }