ng-repeat="tab in [{is_visible: 1, name: 'visible'}, {is_visible: 0, name: 'hidden'}]"
crm-ui-tab
id="tab-{{tab.name}}"
+ count="{{_.where(statuses, {is_visible: tab.is_visible}).length}}"
crm-title="tab.is_visible ? ts('Active') : ts('Hushed/Snoozed')"
>
<div id="crm-status-list" ng-repeat="status in statuses | filter:{is_visible: tab.is_visible}" >
var ts = $scope.ts = CRM.ts();
$scope.alert = CRM.alert;
$scope.statuses = statusData.values;
+ $scope._ = _;
_.each($scope.statuses, function(status) {
status.severity_id = status.severity;
};
})
- // example <div crm-ui-tab crm-title="ts('My Title')">...content...</div>
+ // example <div crm-ui-tab id="tab-1" crm-title="ts('My Title')" count="3">...content...</div>
// WISHLIST: use a full Angular component instead of an incomplete jQuery wrapper
.directive('crmUiTab', function($parse) {
return {
restrict: 'EA',
scope: {
crmTitle: '@',
+ count: '@',
id: '@'
},
template: '<div ng-transclude></div>',
<div ui-jq="tabs" class="crm-tabset">
<ul>
- <li ng-repeat="tab in tabs" class="ui-corner-all">
- <a href="#{{tab.id}}">{{tab.$parent.$eval(tab.crmTitle)}}</a>
+ <li ng-repeat="tab in tabs" class="ui-corner-all crm-tab-button crm-count-{{tab.count}}">
+ <a href="#{{tab.id}}">
+ {{tab.$parent.$eval(tab.crmTitle)}}
+ <em ng-if="tab.count">{{tab.count}}</em>
+ </a>
</li>
</ul>
<div ng-transclude/>
font-size: 0.9em;
}
-#mainTabContainer li.crm-tab-button {
+.crm-container li.crm-tab-button {
margin: 0 2px 2px 0;
}
.crm-container .disabled,
.crm-container .cancelled,
-#mainTabContainer li.disabled a.ui-tabs-anchor,
-#mainTabContainer li.crm-count-0 a.ui-tabs-anchor,
-#mainTabContainer li.crm-count-0 a.ui-tabs-anchor em {
+.crm-container li.disabled a.ui-tabs-anchor,
+.crm-container li.crm-count-0 a.ui-tabs-anchor,
+.crm-container li.crm-count-0 a.ui-tabs-anchor em {
color: #999999 !important;
}
-#mainTabContainer li.disabled {
- text-decoration: none;
-}
+
#crm-container tr.crm-job {
text-decoration: none !important;
}