Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import jquery everywhere #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ietf/secr/static/js/session_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
}

window.addEventListener('load', initialize);
})();
})();
3 changes: 2 additions & 1 deletion ietf/secr/static/js/sessions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright The IETF Trust 2015-2021, All Rights Reserved
import $ from 'jquery';
/* global alert */
var ietf_sessions; // public interface

Expand Down Expand Up @@ -156,4 +157,4 @@ var ietf_sessions; // public interface
delete_last_joint_with_groups: delete_last_joint_with_groups,
delete_wg_constraint_clicked: delete_wg_constraint_clicked
}
})();
})();
4 changes: 3 additions & 1 deletion ietf/secr/static/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// set X-CSRFToken AJAX request header
// from https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

import $ from 'jquery';

function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
Expand Down Expand Up @@ -250,4 +252,4 @@ $(document).ready(function() {
init_proceedings_upload();
}

});
});
1 change: 1 addition & 0 deletions ietf/static/js/agenda_filter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
window.agenda_filter; // public interface
window.agenda_filter_for_testing; // methods to be accessed for automated testing

Expand Down
3 changes: 2 additions & 1 deletion ietf/static/js/agenda_materials.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright The IETF Trust 2021, All Rights Reserved

import $ from 'jquery';
/*
Javascript support for the materials modal rendered by session_agenda_include.html

Expand Down Expand Up @@ -81,4 +82,4 @@ var agenda_materials; // public interface
retrieve_session_modal($(this).find(".session-materials"));
});
})
})();
})();
1 change: 1 addition & 0 deletions ietf/static/js/complete-review.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var form = $("form.complete-review");
Expand Down
3 changes: 2 additions & 1 deletion ietf/static/js/create_timeslot.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright The IETF Trust 2021, All Rights Reserved
import $ from 'jquery';
/* global URLSearchParams */
(function() {
'use strict';
Expand Down Expand Up @@ -40,4 +41,4 @@
}

window.addEventListener('load', initialize);
})();
})();
1 change: 1 addition & 0 deletions ietf/static/js/d3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import * as d3 from "d3";

global.d3 = d3;
1 change: 1 addition & 0 deletions ietf/static/js/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {
Datepicker
} from 'vanillajs-datepicker';
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/doc-search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
// search form
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/document_html.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {
Tooltip as Tooltip,
// Button as Button,
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/document_relations.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
const style = getComputedStyle(document.body);
const font_size = parseFloat(style.fontSize);
const line_height = font_size + 2;
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/document_timeline.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
"use strict";

var data;
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/draft-submit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(function () {
// fill in submitter info when an author button is clicked
$("form.idsubmit button.author")
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/edit-meeting-schedule.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(function () {
'use strict';

Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/edit-meeting-timeslots-and-misc-sessions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
jQuery(document)
.ready(function () {
function reportServerError(xhr, textStatus, error) {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/edit-milestones.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var idCounter = -1;
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/edit_action_holders.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
local_js = function () {
let select2_elem = $('#id_action_holders');
let role_ids = select2_elem.data('role-ids');
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/edit_authors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
local_js = function () {
const sortable_list_id = 'authors-list'; // id of the container element for Sortable
const prefix = 'author'; // formset prefix - must match the prefix in the edit_authors() view
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/fullcalendar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';
import iCalendarPlugin from '@fullcalendar/icalendar';
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/highcharts.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import Highcharts from "highcharts";

import Highcharts_Exporting from "highcharts/modules/exporting";
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/highstock.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import Highcharts from "highcharts/highstock";

import Highcharts_Exporting from "highcharts/modules/exporting";
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/ietf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "bootstrap/js/dist/tab";
import "bootstrap/js/dist/tooltip";

import jquery from "jquery";
import $ from 'jquery';

window.$ = window.jQuery = jquery;
if (!process.env.BUILD_DEPLOY) {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/ipr-edit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var form = $(".ipr-form");
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/ipr-search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
// hack the "All States" check box
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/js-cookie.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import $ from 'jquery';
import "js-cookie";
1 change: 1 addition & 0 deletions ietf/static/js/liaisons.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
var attachmentWidget = {
button: null,
config: {},
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/list.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {
default as List
} from "list.js";
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/listjs-search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
module.exports = function (list) {
var item, text, columns, searchString, customSearch

Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/login.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Disable Submit Button on Form Submit
*/
import $ from 'jquery';
function onLoginSubmit (ev) {
const submitBtn = document.querySelector('#dt-login-form button[type=submit]')
if (submitBtn) {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/manage-community-list.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
$("[name=rule_type]")
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/manage-review-requests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
/* global $ */
$(function () {
'use strict'
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/meeting-interim-request.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
const interimRequest = (function() {
'use strict';
return {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/moment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Add the moment object to the global scope - needed until inline scripts using
* Moment.js are eliminated. When that happens, can import moment in the js files
* that need it. */
import $ from 'jquery';
import moment from "moment-timezone/builds/moment-timezone-with-data-10-year-range";
window.moment = moment;
1 change: 1 addition & 0 deletions ietf/static/js/nav.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import debounce from "lodash/debounce";

function make_nav() {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/password_strength.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Taken from django-password-strength, with changes to use the bower-managed zxcvbn.js The
// bower-managed zxcvbn.js is kept up-to-date to a larger extent than the copy packaged with
// the django-password-strength component.
import $ from 'jquery';
(function ($, window, document, undefined) {
window.djangoPasswordStrength = {
config: {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/session_details_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*
* JS support for the SessionDetailsForm
* */
import $ from 'jquery';
(function () {
'use strict';

Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/sortable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import { Sortable } from "sortablejs";

window.Sortable = Sortable;
1 change: 1 addition & 0 deletions ietf/static/js/stats.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document).ready(function () {
if (window.chartConf) {
window.chartConf.credits = {
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/status-change-edit-relations.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var form = $(".new-relation-row")
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* https://github.com/twbs/bootstrap/blob/main/site/static/docs/5.3/assets/js/color-modes.js
*/

import $ from 'jquery';
(() => {
'use strict'

Expand Down
3 changes: 2 additions & 1 deletion ietf/static/js/timeslot_edit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// create a namespace for local JS
import $ from 'jquery';
timeslotEdit = (function () {
let deleteModal;
let timeslotTableBody = document.querySelector('#timeslot-table tbody');
Expand Down Expand Up @@ -254,4 +255,4 @@ timeslotEdit = (function () {
return {
handleDeleteButtonClick: handleDeleteButtonClick,
};
})();
})();
3 changes: 2 additions & 1 deletion ietf/static/js/timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
names. Time zone can be changed via the select input or by calling the use() method with
the name of a time zone (or 'local' to guess the user's local timezone).
*/
import $ from 'jquery';
(function () {
'use strict';

Expand Down Expand Up @@ -78,4 +79,4 @@
set_tz_change_callback: function (cb) { timezone_change_callback = cb; },
use: use_timezone
};
})();
})();
1 change: 1 addition & 0 deletions ietf/static/js/upcoming.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
var filtered_event_list = []; // currently visible list
var display_events = []; // filtered events, processed for calendar display
var event_calendar; // handle on the calendar object
Expand Down
3 changes: 2 additions & 1 deletion ietf/static/js/upload-material.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright The IETF Trust 2021, All Rights Reserved
import $ from 'jquery';
(
function () {
'use strict';
Expand Down Expand Up @@ -59,4 +60,4 @@

initialize();
}
)();
)();
1 change: 1 addition & 0 deletions ietf/static/js/upload_bofreq.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var form = $("form.upload-content");
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/upload_statement.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
$(document)
.ready(function () {
var form = $("form.upload-content");
Expand Down
1 change: 1 addition & 0 deletions ietf/static/js/zxcvbn.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import $ from 'jquery';
window.zxcvbn = require('zxcvbn');