%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/wp-content/plugins/addthis/frontend/src/directives/customIcon/
Upload File :
Create Path :
Current File : //var/www/cwg/wp-content/plugins/addthis/frontend/src/directives/customIcon/customIconDrct.js

appAddThisWordPress.directive('customIcon', function() {
  return {
    scope: {
      level: '@level',
      icon: '@icon'
    },
    transclude: true,
    controller: function($scope) {
      var icons = {
        // level to icon
        info: 'info',
        success: 'checkmark',
        warning: 'exclamation',
        danger: 'exclamation'
      };

      $scope.getIconUrl = function() {
        var image = 'info.svg';

        if ($scope.icon) {
          image = $scope.icon + '.svg';
        } else if ($scope.level && angular.isDefined(icons[$scope.level])) {
          image = icons[$scope.level] + '.svg';
        }
        return  '/images/' + image;
      };

    },
    templateUrl: '/directives/customIcon/customIcon.html'
  };
});

Zerion Mini Shell 1.0