stefangabos/Zebra_Dialog

View on GitHub

Showing 30 of 35 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if (tmp) {

                    // if "max_height" was specified as a percentage
                    if (undefined !== tmp[2])

Severity: Major
Found in src/zebra_dialog.src.js and 1 other location - About 5 hrs to fix
src/zebra_dialog.src.js on lines 983..1005

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 149.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if (tmp) {

                // if "height" was specified as a percentage
                if (undefined !== tmp[2])

Severity: Major
Found in src/zebra_dialog.src.js and 1 other location - About 5 hrs to fix
src/zebra_dialog.src.js on lines 1014..1036

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 149.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if (tmp) {

                // if "width" was specified as a percentage
                if (undefined !== tmp[2])

Severity: Major
Found in src/zebra_dialog.src.js and 1 other location - About 5 hrs to fix
src/zebra_dialog.src.js on lines 960..975

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 135.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if (tmp) {

                    // if "max_width" was specified as a percentage
                    if (undefined !== tmp[2])

Severity: Major
Found in src/zebra_dialog.src.js and 1 other location - About 5 hrs to fix
src/zebra_dialog.src.js on lines 936..951

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 135.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File examples.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
Open

$(document).ready(function() {

    var notification_options = {
        auto_close: 2000,
        modal: false,
Severity: Minor
Found in examples/examples.js - About 2 hrs to fix

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        $('#example5_2').on('click', function() {
            new $.Zebra_Dialog('I am positioned in the <strong>top-right</strong> corner, 20&nbsp;pixels from the edges. Here\'s how it\'s done:<br><code>position: [\'right - 20\', \'top + 20\']</code><br><br><em><span class="label label-info">Tip:</span> You can click anywhere on the backdrop to quickly dismiss me</em>', {
                auto_focus_button: $('body.materialize').length ? false : true,
                position: ['right - 20', 'top + 20'],
                title: 'Custom positioning',
    Severity: Major
    Found in examples/examples.js and 4 other locations - About 1 hr to fix
    examples/examples.js on lines 178..185
    examples/examples.js on lines 196..203
    examples/examples.js on lines 205..212
    examples/examples.js on lines 222..229

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 71.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        $('#example5_4').on('click', function() {
            new $.Zebra_Dialog('I am positioned in the <strong>bottom-left</strong> corner, 20&nbsp;pixels from the edges. Here\'s how it\'s done:<br><code>position: [\'left + 20\', \'bottom - 20\']</code><br><br><em><span class="label label-info">Tip:</span> You can click anywhere on the backdrop to quickly dismiss me</em>', {
                auto_focus_button: $('body.materialize').length ? false : true,
                position: ['left + 20', 'bottom - 20'],
                title: 'Custom positioning',
    Severity: Major
    Found in examples/examples.js and 4 other locations - About 1 hr to fix
    examples/examples.js on lines 178..185
    examples/examples.js on lines 187..194
    examples/examples.js on lines 196..203
    examples/examples.js on lines 222..229

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 71.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        $('#example5_3').on('click', function() {
            new $.Zebra_Dialog('I am positioned in the <strong>bottom-right</strong> corner, 20&nbsp;pixels from the edges. Here\'s how it\'s done:<br><code>position: [\'right - 20\', \'bottom - 20\']</code><br><br><em><span class="label label-info">Tip:</span> You can click anywhere on the backdrop to quickly dismiss me</em>', {
                auto_focus_button: $('body.materialize').length ? false : true,
                position: ['right - 20', 'bottom - 20'],
                title: 'Custom positioning',
    Severity: Major
    Found in examples/examples.js and 4 other locations - About 1 hr to fix
    examples/examples.js on lines 178..185
    examples/examples.js on lines 187..194
    examples/examples.js on lines 205..212
    examples/examples.js on lines 222..229

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 71.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        $('#example5_6').on('click', function() {
            new $.Zebra_Dialog('I am centered horizontally and 50&nbsp;pixels from the top edge. Here\'s how it\'s done:<br><code>position: [\'center\', \'top + 50\']</code><br><br><em><span class="label label-info">Tip:</span> You can click anywhere on the backdrop to quickly dismiss me</em>', {
                auto_focus_button: $('body.materialize').length ? false : true,
                position: ['center', 'top + 50'],
                title: 'Custom positioning',
    Severity: Major
    Found in examples/examples.js and 4 other locations - About 1 hr to fix
    examples/examples.js on lines 178..185
    examples/examples.js on lines 187..194
    examples/examples.js on lines 196..203
    examples/examples.js on lines 205..212

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 71.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        $('#example5_1').on('click', function() {
            new $.Zebra_Dialog('I am positioned in the <strong>top-left</strong> corner, 20&nbsp;pixels from the edges. Here\'s how it\'s done:<br><code>position: [\'left + 20\', \'top + 20\']</code><br><br><em><span class="label label-info">Tip:</span> You can click anywhere on the backdrop to quickly dismiss me</em>', {
                auto_focus_button: $('body.materialize').length ? false : true,
                position: ['left + 20', 'top + 20'],
                title: 'Custom positioning',
    Severity: Major
    Found in examples/examples.js and 4 other locations - About 1 hr to fix
    examples/examples.js on lines 187..194
    examples/examples.js on lines 196..203
    examples/examples.js on lines 205..212
    examples/examples.js on lines 222..229

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 71.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function close has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            plugin.close = function(caption, input) {
    
                var animation_speed = plugin.settings.animation_speed_hide,
                    backdrops = $('.ZebraDialogBackdrop'),
                    dialogs = $('.ZebraDialog'),
    Severity: Minor
    Found in src/zebra_dialog.src.js - About 1 hr to fix

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example1_2').on('click', function() {
              new $.Zebra_Dialog('Use error messages to let the user know that an action has not completed successfully and show the reason why that happened.', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  title: 'Error',
                  type: 'error'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 9..15
      examples/examples.js on lines 25..31
      examples/examples.js on lines 56..62
      examples/examples.js on lines 64..70
      examples/examples.js on lines 335..341

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example1_1').on('click', function() {
              new $.Zebra_Dialog('Use confirmation messages to let the user know that an action has completed successfully.', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  title: 'Confirmation',
                  type: 'confirmation'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 17..23
      examples/examples.js on lines 25..31
      examples/examples.js on lines 56..62
      examples/examples.js on lines 64..70
      examples/examples.js on lines 335..341

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example1_3').on('click', function() {
              new $.Zebra_Dialog('Use these types of dialog boxes to convey information to the user.', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  title: 'Information',
                  type: 'information'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 9..15
      examples/examples.js on lines 17..23
      examples/examples.js on lines 56..62
      examples/examples.js on lines 64..70
      examples/examples.js on lines 335..341

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example1_6').on('click', function() {
              new $.Zebra_Dialog('Show warning messages like this when you are about to perform a sensitive operation and you want to make sure that the user understands the implications.', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  title: 'Warning',
                  type: 'warning'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 9..15
      examples/examples.js on lines 17..23
      examples/examples.js on lines 25..31
      examples/examples.js on lines 56..62
      examples/examples.js on lines 335..341

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example1_5').on('click', function() {
              new $.Zebra_Dialog('Show confirmation dialogs like this when you want the user\'s accept for non-critical actions.', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  title: 'Question',
                  type: 'question'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 9..15
      examples/examples.js on lines 17..23
      examples/examples.js on lines 25..31
      examples/examples.js on lines 64..70
      examples/examples.js on lines 335..341

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          $('#example12').on('click', function() {
              new $.Zebra_Dialog('I love coffee!', {
                  auto_focus_button: $('body.materialize').length ? false : true,
                  custom_class: 'myclass',
                  title: 'Customizing the appearance'
      Severity: Major
      Found in examples/examples.js and 5 other locations - About 1 hr to fix
      examples/examples.js on lines 9..15
      examples/examples.js on lines 17..23
      examples/examples.js on lines 25..31
      examples/examples.js on lines 56..62
      examples/examples.js on lines 64..70

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 63.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function callback has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          callback: function() {
                              new $.Zebra_Dialog('This is the second dialog box. Notice that the backdrops are not overlapping. Pressing ESC or clicking on the backdrop will close this dialog box but not the first one.', {
                                  auto_focus_button: $('body.materialize').length ? false : true,
                                  buttons: [
                                      'Close',
      Severity: Minor
      Found in examples/examples.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                        else if (compute_body_height)
        
                            plugin.body.css('height', plugin.dialog.height() -
                                ($('.ZebraDialog_Title', plugin.dialog).length ? $('.ZebraDialog_Title', plugin.dialog).outerHeight() : 0) -
                                ($('.ZebraDialog_Buttons', plugin.dialog).length ? $('.ZebraDialog_Buttons', plugin.dialog).outerHeight() : 0) -
        Severity: Major
        Found in src/zebra_dialog.src.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                          if (dialog_height + vertical_margin > viewport_height - (vertical_margin * 2))
          
                              // adjust the dialog box's body height so that it fits
                              plugin.body.css('height', viewport_height - (vertical_margin * 2) -
                                  ($('.ZebraDialog_Title', plugin.dialog).length ? $('.ZebraDialog_Title', plugin.dialog).outerHeight() : 0) -
          Severity: Major
          Found in src/zebra_dialog.src.js - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language