remove @canvas/query dependency from @canvas/util
This is part of a larger effort to remove cyclical dependencies. Refs CFA-27 flag=none Change-Id: I6e35fb1486a4a60275c0e5da819943d01d38d6e5 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335861 Reviewed-by: Cameron Ray <cameron.ray@instructure.com> QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
9d19624a80
commit
61c19265c3
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
import '@canvas/jquery/jquery.ajaxJSON'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import axios from '@canvas/axios'
|
import axios from '@canvas/axios'
|
||||||
|
|
|
@ -16,4 +16,41 @@
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import '@canvas/util/jquery/confirmEmail'
|
import $ from 'jquery'
|
||||||
|
import '@canvas/jquery/jquery.ajaxJSON'
|
||||||
|
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||||
|
import preventDefault from '@canvas/util/preventDefault'
|
||||||
|
import '@canvas/rails-flash-notifications'
|
||||||
|
|
||||||
|
const I18n = useI18nScope('profile')
|
||||||
|
|
||||||
|
$(() => {
|
||||||
|
let resending = false
|
||||||
|
|
||||||
|
$('.re_send_confirmation_link').click(
|
||||||
|
preventDefault(function () {
|
||||||
|
const $this = $(this)
|
||||||
|
const text = $this.text()
|
||||||
|
|
||||||
|
if (resending) return
|
||||||
|
resending = true
|
||||||
|
$this.text(I18n.t('resending', 'resending...'))
|
||||||
|
|
||||||
|
$.ajaxJSON(
|
||||||
|
$this.attr('href'),
|
||||||
|
'POST',
|
||||||
|
{},
|
||||||
|
_data => {
|
||||||
|
resending = false
|
||||||
|
$this.text(text)
|
||||||
|
$.flashMessage(I18n.t('done_resending', 'Done! Message delivery may take a few minutes.'))
|
||||||
|
},
|
||||||
|
_data => {
|
||||||
|
resending = false
|
||||||
|
$this.text(text)
|
||||||
|
$.flashError(I18n.t('failed_resending', 'Request failed. Try again.'))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {IconDownloadSolid} from '@instructure/ui-icons'
|
||||||
import {Text} from '@instructure/ui-text'
|
import {Text} from '@instructure/ui-text'
|
||||||
import {View} from '@instructure/ui-view'
|
import {View} from '@instructure/ui-view'
|
||||||
import {Button} from '@instructure/ui-buttons'
|
import {Button} from '@instructure/ui-buttons'
|
||||||
import DownloadSubmissionsDialog from '@canvas/util/downloadSubmissionsDialog'
|
import DownloadSubmissionsDialog from './downloadSubmissionsDialog'
|
||||||
|
|
||||||
const I18n = useI18nScope('enhanced_individual_gradebook')
|
const I18n = useI18nScope('enhanced_individual_gradebook')
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import htmlEscape from 'html-escape'
|
|
||||||
import '@canvas/jquery/jquery.ajaxJSON'
|
import '@canvas/jquery/jquery.ajaxJSON'
|
||||||
|
import htmlEscape from 'html-escape'
|
||||||
import 'jqueryui/dialog'
|
import 'jqueryui/dialog'
|
||||||
import 'jqueryui/progressbar'
|
import 'jqueryui/progressbar'
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
import '@canvas/jquery/jquery.ajaxJSON'
|
||||||
import '@canvas/module-sequence-footer'
|
import '@canvas/module-sequence-footer'
|
||||||
import MarkAsDone from '@canvas/util/jquery/markAsDone'
|
import MarkAsDone from '@canvas/util/jquery/markAsDone'
|
||||||
import ToolLaunchResizer from '@canvas/lti/jquery/tool_launch_resizer'
|
import ToolLaunchResizer from '@canvas/lti/jquery/tool_launch_resizer'
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
import '@canvas/jquery/jquery.ajaxJSON'
|
||||||
import ready from '@instructure/ready'
|
import ready from '@instructure/ready'
|
||||||
import '@canvas/context-modules'
|
import '@canvas/context-modules'
|
||||||
import WikiPage from '@canvas/wiki/backbone/models/WikiPage'
|
import WikiPage from '@canvas/wiki/backbone/models/WikiPage'
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
//
|
|
||||||
// Copyright (C) 2012 - present Instructure, Inc.
|
|
||||||
//
|
|
||||||
// This file is part of Canvas.
|
|
||||||
//
|
|
||||||
// Canvas is free software: you can redistribute it and/or modify it under
|
|
||||||
// the terms of the GNU Affero General Public License as published by the Free
|
|
||||||
// Software Foundation, version 3 of the License.
|
|
||||||
//
|
|
||||||
// Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
// A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
||||||
// details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License along
|
|
||||||
// with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import $ from 'jquery'
|
|
||||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
|
||||||
import preventDefault from '../preventDefault'
|
|
||||||
import '@canvas/jquery/jquery.ajaxJSON'
|
|
||||||
import '@canvas/rails-flash-notifications'
|
|
||||||
|
|
||||||
const I18n = useI18nScope('profile')
|
|
||||||
|
|
||||||
$(() => {
|
|
||||||
let resending = false
|
|
||||||
|
|
||||||
$('.re_send_confirmation_link').click(
|
|
||||||
preventDefault(function () {
|
|
||||||
const $this = $(this)
|
|
||||||
const text = $this.text()
|
|
||||||
|
|
||||||
if (resending) return
|
|
||||||
resending = true
|
|
||||||
$this.text(I18n.t('resending', 'resending...'))
|
|
||||||
|
|
||||||
$.ajaxJSON(
|
|
||||||
$this.attr('href'),
|
|
||||||
'POST',
|
|
||||||
{},
|
|
||||||
_data => {
|
|
||||||
resending = false
|
|
||||||
$this.text(text)
|
|
||||||
$.flashMessage(I18n.t('done_resending', 'Done! Message delivery may take a few minutes.'))
|
|
||||||
},
|
|
||||||
_data => {
|
|
||||||
resending = false
|
|
||||||
$this.text(text)
|
|
||||||
$.flashError(I18n.t('failed_resending', 'Request failed. Try again.'))
|
|
||||||
}
|
|
||||||
)
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
|
@ -16,7 +16,6 @@
|
||||||
// with this program. If not, see <http://www.gnu.org/licenses/>.
|
// with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import '@canvas/jquery/jquery.ajaxJSON'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
toggle(button) {
|
toggle(button) {
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import htmlEscape from 'html-escape'
|
import htmlEscape from 'html-escape'
|
||||||
import '@canvas/jquery/jquery.instructure_misc_helpers' /* replaceTags */
|
|
||||||
import replaceTags from './replaceTags'
|
import replaceTags from './replaceTags'
|
||||||
|
|
||||||
// Fills the selected object(s) with data values as specified. Plaintext values should be specified in the
|
// Fills the selected object(s) with data values as specified. Plaintext values should be specified in the
|
||||||
|
|
Loading…
Reference in New Issue