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

Fixed JavaScript "strict" violations.

parent 3c0770f2
Loading
Loading
Loading
Loading
+108 −104
Original line number Diff line number Diff line
/*eslint no-cond-assign:1*/
(function() {
    'use strict';
    var SelectBox = {
        cache: {},
        init: function(id) {
@@ -115,3 +117,5 @@ var SelectBox = {
            }
        }
    };
    window.SelectBox = SelectBox;
})();
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ SelectFilter2 - Turns a multiple-select box into a filter interface.
Requires core.js, SelectBox.js and addevent.js.
*/
(function($) {
    'use strict';
    function findForm(node) {
        // returns the node of the form containing the given node
        if (node.tagName.toLowerCase() !== 'form') {
+1 −0
Original line number Diff line number Diff line
/*global _actions_icnt, gettext, interpolate, ngettext*/
(function($) {
    'use strict';
    var lastChecked;

    $.fn.actions = function(opts) {
+331 −328
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
// Inserts shortcut buttons after all of the following:
//     <input type="text" class="vDateField">
//     <input type="text" class="vTimeField">

(function() {
    'use strict';
    var DateTimeShortcuts = {
        calendars: [],
        calendarInputs: [],
@@ -359,3 +360,5 @@ var DateTimeShortcuts = {
    };

    addEvent(window, 'load', DateTimeShortcuts.init);
    window.DateTimeShortcuts = DateTimeShortcuts;
})();
+146 −128
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
// Handles related-objects functionality: lookup link for raw_id_fields
// and Add Another links.

(function() {
    'use strict';

    function html_unescape(text) {
        // Unescape a string that was escaped using django.utils.html.escape.
        text = text.replace(/&lt;/g, '<');
@@ -137,6 +140,21 @@ function dismissDeleteRelatedObjectPopup(win, objId) {
        win.close();
    }

    // Global for testing purposes
    window.html_unescape = html_unescape;
    window.id_to_windowname = id_to_windowname;
    window.windowname_to_id = windowname_to_id;

    window.showRelatedObjectLookupPopup = showRelatedObjectLookupPopup;
    window.dismissRelatedLookupPopup = dismissRelatedLookupPopup;
    window.showRelatedObjectPopup = showRelatedObjectPopup;
    window.updateRelatedObjectLinks = updateRelatedObjectLinks;
    window.dismissAddRelatedObjectPopup = dismissAddRelatedObjectPopup;
    window.dismissChangeRelatedObjectPopup = dismissChangeRelatedObjectPopup;
    window.dismissDeleteRelatedObjectPopup = dismissDeleteRelatedObjectPopup;

    // Kept for backward compatibility
var showAddAnotherPopup = showRelatedObjectPopup;
var dismissAddAnotherPopup = dismissAddRelatedObjectPopup;
    window.showAddAnotherPopup = showRelatedObjectPopup;
    window.dismissAddAnotherPopup = dismissAddRelatedObjectPopup;

})();
Loading