CRM-19432: Added class passtrhough for crmUiWizard nav items
authorTobias Lounsbury <tobiaslounsbury@gmail.com>
Thu, 29 Sep 2016 19:24:46 +0000 (12:24 -0700)
committerTobias Lounsbury <tobiaslounsbury@gmail.com>
Thu, 29 Sep 2016 19:24:46 +0000 (12:24 -0700)
ang/crmUi.js
ang/crmUi/wizard.html

index a900f45a3ae71661dfea7498c0be4dcb0dd46781..3368745478995ea082524e3039ee6e35b8f904da 100644 (file)
     })
 
     // example: <div crm-ui-wizard="myWizardCtrl"><div crm-ui-wizard-step crm-title="ts('Step 1')">...</div><div crm-ui-wizard-step crm-title="ts('Step 2')">...</div></div>
+    // example with custom nav classes: <div crm-ui-wizard crm-ui-wizard-nav-class="ng-animate-out ...">...</div>
     // Note: "myWizardCtrl" has various actions/properties like next() and $first().
     // WISHLIST: Allow each step to determine if it is "complete" / "valid" / "selectable"
     // WISHLIST: Allow each step to enable/disable (show/hide) itself
       return {
         restrict: 'EA',
         scope: {
-          crmUiWizard: '@'
+          crmUiWizard: '@',
+          crmUiWizardNavClass: '@'
         },
         templateUrl: '~/crmUi/wizard.html',
         transclude: true,
index 44b09743f237e5a65cb6f290d5d4dfd988d37ae9..9c4c471801cec79a5f181de22bd7090c0f614c4a 100644 (file)
@@ -1,6 +1,6 @@
 <div class="crm-wizard">
   <ul class="crm-wizard-nav wizard-bar">
-    <li ng-repeat="step in steps" ng-class="{'current-step':step.selected}">
+    <li ng-repeat="step in steps" ng-class="{'current-step':step.selected}" class="{{crmUiWizardNavClass}}">
       <span>{{crmUiWizardCtrl.iconFor($index)}}</span>
       <a href="" ng-click="crmUiWizardCtrl.select(step)" ng-show="crmUiWizardCtrl.isSelectable(step)">{{1 + $index}}. {{step.$parent.$eval(step.crmTitle)}}</a>
       <span ng-show="!crmUiWizardCtrl.isSelectable(step)">{{1 + $index}}. {{step.$parent.$eval(step.crmTitle)}}</span>