twers/re-education

View on GitHub
app/assets/javascripts/directives/openclass.gallery.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function factory has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

.directive('gallery', function factory(fancybox) {
  var directive = {
    restrict: 'C',
    link: function (scope, element, attrs) {
      scope.$watch('attachments', function (attachments) {
Severity: Minor
Found in app/assets/javascripts/directives/openclass.gallery.js - About 1 hr to fix

    Function link has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        link: function (scope, element, attrs) {
          scope.$watch('attachments', function (attachments) {
            if (attachments) {
              fancybox(element.find('a'), {
                afterShow: function() {
    Severity: Minor
    Found in app/assets/javascripts/directives/openclass.gallery.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status