Commit ac616494 authored by Tim Graham's avatar Tim Graham
Browse files

Fixed JavaScript "curly" violations.

parent e25ba6e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
        "camelcase": [1, {"properties": "always"}],
        "comma-spacing": [1, {"before": false, "after": true}],
        "dot-notation": [1, {"allowKeywords": true}],
        "curly": [1, "all"],
        "curly": [2, "all"],
        "indent": [
            2,
            4
+6 −2
Original line number Diff line number Diff line
@@ -95,8 +95,12 @@ var SelectBox = {
            a = a.text.toLowerCase();
            b = b.text.toLowerCase();
            try {
                if (a > b) return 1;
                if (a < b) return -1;
                if (a > b) {
                    return 1;
                }
                if (a < b) {
                    return -1;
                }
            }
            catch (e) {
                // silently fail on IE 'unknown' exception
+4 −2
Original line number Diff line number Diff line
@@ -56,12 +56,14 @@ var DateTimeShortcuts = {
        var timezoneOffset = DateTimeShortcuts.timezoneOffset / 3600;

        // Only warn if there is a time zone mismatch.
        if (!timezoneOffset)
        if (!timezoneOffset) {
            return;
        }

        // Check if warning is already there.
        if ($(inp).siblings('.' + warningClass).length)
        if ($(inp).siblings('.' + warningClass).length) {
            return;
        }

        var message;
        if (timezoneOffset > 0) {
+3 −1
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ function showRelatedObjectPopup(triggeringLink) {
function updateRelatedObjectLinks(triggeringLink) {
    var $this = django.jQuery(triggeringLink);
    var siblings = $this.nextAll('.change-related, .delete-related');
    if (!siblings.length) return;
    if (!siblings.length) {
        return;
    }
    var value = $this.val();
    if (value) {
        siblings.each(function() {
+3 −1
Original line number Diff line number Diff line
@@ -91,7 +91,9 @@ var CalendarNamespace = {

            // use UTC function; see above for explanation.
            if (isSelectedMonth && currentDay === selected.getUTCDate()) {
                if (todayClass !== '') todayClass += " ";
                if (todayClass !== '') {
                    todayClass += " ";
                }
                todayClass += "selected";
            }

Loading