mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
REFACTOR: Move bootbox
to an import instead of global variable (#10533)
This commit is contained in:
parent
354014099d
commit
ff4de97dfd
|
@ -3,5 +3,8 @@
|
|||
"plugins": ["discourse-ember"],
|
||||
"rules": {
|
||||
"discourse-ember/global-ember": 2
|
||||
},
|
||||
"globals": {
|
||||
"bootbox": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["watched-word"],
|
||||
|
|
|
@ -4,6 +4,7 @@ import Component from "@ember/component";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { ensureJSON, plainJSON, prettyJSON } from "discourse/lib/formatter";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "li",
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
editorId: reads("fieldName"),
|
||||
|
|
|
@ -8,6 +8,7 @@ import { bufferedProperty } from "discourse/mixins/buffered-content";
|
|||
import { on, observes } from "discourse-common/utils/decorators";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import Category from "discourse/models/category";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(bufferedProperty("host"), {
|
||||
editToggled: false,
|
||||
|
|
|
@ -6,6 +6,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import copyText from "discourse/lib/copy-text";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["ip-lookup"],
|
||||
|
|
|
@ -4,6 +4,7 @@ import Component from "@ember/component";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import Permalink from "admin/models/permalink";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["permalink-form"],
|
||||
|
|
|
@ -2,6 +2,8 @@ import I18n from "I18n";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
/**
|
||||
A form to create an IP address that will be blocked or allowed.
|
||||
Example usage:
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(UploadMixin, {
|
||||
type: "csv",
|
||||
|
|
|
@ -3,6 +3,7 @@ import { isEmpty } from "@ember/utils";
|
|||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import WatchedWord from "admin/models/watched-word";
|
||||
import bootbox from "bootbox";
|
||||
import discourseComputed, {
|
||||
on,
|
||||
observes
|
||||
|
|
|
@ -3,6 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(UploadMixin, {
|
||||
type: "txt",
|
||||
|
|
|
@ -4,6 +4,7 @@ import Controller, { inject as controller } from "@ember/controller";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { setting, i18n } from "discourse/lib/computed";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
adminBackups: controller(),
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
saving: false,
|
||||
|
|
|
@ -6,6 +6,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import { propertyNotEqual } from "discourse/lib/computed";
|
||||
import { run } from "@ember/runloop";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(bufferedProperty("model"), {
|
||||
adminBadges: controller(),
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { later } from "@ember/runloop";
|
||||
import Controller from "@ember/controller";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
@discourseComputed("model.colors", "onlyOverridden")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
@discourseComputed("model.isSaving")
|
||||
|
|
|
@ -5,6 +5,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as controller } from "@ember/controller";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(bufferedProperty("emailTemplate"), {
|
||||
adminCustomizeEmailTemplates: controller(),
|
||||
|
|
|
@ -15,6 +15,7 @@ import showModal from "discourse/lib/show-modal";
|
|||
import ThemeSettings from "admin/models/theme-settings";
|
||||
import { THEMES, COMPONENTS } from "admin/models/theme";
|
||||
import EmberObject from "@ember/object";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const THEME_UPLOAD_VAR = 2;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { empty } from "@ember/object/computed";
|
|||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@ import { empty, or, notEmpty } from "@ember/object/computed";
|
|||
import Controller from "@ember/controller";
|
||||
import EmailPreview from "admin/models/email-preview";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
username: null,
|
||||
|
|
|
@ -3,6 +3,7 @@ import { sort } from "@ember/object/computed";
|
|||
import EmberObject, { action, computed } from "@ember/object";
|
||||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const ALL_FILTER = "all";
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import { exportEntity } from "discourse/lib/export-csv";
|
|||
import ScreenedIpAddress from "admin/models/screened-ip-address";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
loading: false,
|
||||
|
|
|
@ -4,6 +4,7 @@ import discourseDebounce from "discourse/lib/debounce";
|
|||
import Permalink from "admin/models/permalink";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
loading: false,
|
||||
|
|
|
@ -3,6 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(bufferedProperty("siteText"), {
|
||||
saved: false,
|
||||
|
|
|
@ -5,6 +5,7 @@ import { next } from "@ember/runloop";
|
|||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import GrantBadgeController from "discourse/mixins/grant-badge-controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(GrantBadgeController, {
|
||||
adminUser: controller(),
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import { gte, sort } from "@ember/object/computed";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const MAX_FIELDS = 20;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import { fmt } from "discourse/lib/computed";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(CanCheckEmails, {
|
||||
adminTools: service(),
|
||||
|
|
|
@ -7,6 +7,7 @@ import WatchedWord from "admin/models/watched-word";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
adminWatchedWords: controller(),
|
||||
|
|
|
@ -7,6 +7,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { extractDomainFromUrl } from "discourse/lib/utilities";
|
||||
import EmberObject from "@ember/object";
|
||||
import { isAbsoluteURL } from "discourse-common/lib/get-url";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
adminWebHooks: controller(),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
actions: {
|
||||
|
|
|
@ -4,6 +4,7 @@ import { A } from "@ember/array";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
@observes("model")
|
||||
|
|
|
@ -2,6 +2,7 @@ import I18n from "I18n";
|
|||
import Controller from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
loading: true,
|
||||
|
|
|
@ -4,6 +4,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import Mixin from "@ember/object/mixin";
|
||||
import { next } from "@ember/runloop";
|
||||
import { Promise } from "rsvp";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Mixin.create(ModalFunctionality, {
|
||||
reason: null,
|
||||
|
|
|
@ -10,6 +10,7 @@ import Group from "discourse/models/group";
|
|||
import DiscourseURL, { userPath } from "discourse/lib/url";
|
||||
import { Promise } from "rsvp";
|
||||
import User from "discourse/models/user";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const wrapAdmin = user => (user ? AdminUser.create(user) : null);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
import MessageBus from "message-bus-client";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const Backup = EmberObject.extend({
|
||||
destroy() {
|
||||
|
|
|
@ -9,6 +9,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import highlightSyntax from "discourse/lib/highlight-syntax";
|
||||
import { url } from "discourse/lib/computed";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const THEME_UPLOAD_VAR = 2;
|
||||
const FIELDS_IDS = [0, 1, 5];
|
||||
|
|
|
@ -8,6 +8,7 @@ import BackupStatus from "admin/models/backup-status";
|
|||
import Backup from "admin/models/backup";
|
||||
import PreloadStore from "discourse/lib/preload-store";
|
||||
import User from "discourse/models/user";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const LOG_CHANNEL = "/admin/backups/logs";
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import Route from "@ember/routing/route";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import Badge from "discourse/models/badge";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Route.extend({
|
||||
serialize(m) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import Route from "@ember/routing/route";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Route.extend({
|
||||
model(params) {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import Route from "@ember/routing/route";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Route.extend({
|
||||
model(params) {
|
||||
const all = this.modelFor("adminCustomizeThemes");
|
||||
|
|
|
@ -10,6 +10,7 @@ import showModal from "discourse/lib/show-modal";
|
|||
import { getOwner } from "discourse-common/lib/get-owner";
|
||||
import Service from "@ember/service";
|
||||
import { Promise } from "rsvp";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Service.extend({
|
||||
init() {
|
||||
|
|
|
@ -21,6 +21,10 @@ define("ember-buffered-proxy/proxy", ["exports"], function(__exports__) {
|
|||
__exports__.default = window.BufferedProxy;
|
||||
});
|
||||
|
||||
define("bootbox", ["exports"], function(__exports__) {
|
||||
__exports__.default = window.bootbox;
|
||||
});
|
||||
|
||||
define("@popperjs/core", ["exports"], function(__exports__) {
|
||||
__exports__.default = window.Popper;
|
||||
__exports__.createPopper = window.Popper.createPopper;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["badge-title"],
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
shouldOpenInNewTab,
|
||||
openLinkInNewTab
|
||||
} from "discourse/lib/click-track";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["bookmark-list-wrapper"],
|
||||
|
|
|
@ -36,6 +36,7 @@ import {
|
|||
getUploadMarkdown,
|
||||
displayErrorForUpload
|
||||
} from "discourse/lib/uploads";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
import {
|
||||
cacheShortUploadUrl,
|
||||
|
|
|
@ -3,6 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import Component from "@ember/component";
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
import { on } from "@ember/object/evented";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(UploadMixin, {
|
||||
type: "csv",
|
||||
|
|
|
@ -4,6 +4,7 @@ import { bind } from "discourse-common/utils/decorators";
|
|||
import logout from "discourse/lib/logout";
|
||||
import I18n from "I18n";
|
||||
import { setLogoffCallback } from "discourse/lib/ajax";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
|
|
@ -3,6 +3,7 @@ import NavItem from "discourse/models/nav-item";
|
|||
import { inject as service } from "@ember/service";
|
||||
import Component from "@ember/component";
|
||||
import FilterModeMixin from "discourse/mixins/filter-mode";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(FilterModeMixin, {
|
||||
router: service(),
|
||||
|
|
|
@ -3,6 +3,7 @@ import Component from "@ember/component";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["group-membership-button"],
|
||||
|
|
|
@ -8,6 +8,7 @@ import optionalService from "discourse/lib/optional-service";
|
|||
import showModal from "discourse/lib/show-modal";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { set } from "@ember/object";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
let _components = {};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
|
|
@ -4,6 +4,7 @@ import { isEmpty } from "@ember/utils";
|
|||
import Component from "@ember/component";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import PermissionType from "discourse/models/permission-type";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend(bufferedProperty("model"), {
|
||||
tagName: "",
|
||||
|
|
|
@ -6,6 +6,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import Component from "@ember/component";
|
||||
import { reads, and } from "@ember/object/computed";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
|
|
@ -13,6 +13,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts";
|
||||
import { formattedReminderTime, REMINDER_TYPES } from "discourse/lib/bookmark";
|
||||
import { AUTO_DELETE_PREFERENCES } from "discourse/models/bookmark";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// global shortcuts that interfere with these modal shortcuts, they are rebound when the
|
||||
// modal is closed
|
||||
|
|
|
@ -27,6 +27,7 @@ import { Promise } from "rsvp";
|
|||
import { isTesting } from "discourse-common/config/environment";
|
||||
import EmberObject, { computed, action } from "@ember/object";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function loadDraft(store, opts) {
|
||||
let promise = Promise.resolve();
|
||||
|
|
|
@ -9,6 +9,7 @@ import discourseComputed, {
|
|||
observes
|
||||
} from "discourse-common/utils/decorators";
|
||||
import Category from "discourse/models/category";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
selectedTab: null,
|
||||
|
|
|
@ -6,6 +6,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { categoryLinkHTML } from "discourse/helpers/category-link";
|
||||
import EmberObject from "@ember/object";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
topicController: inject("topic"),
|
||||
|
|
|
@ -5,6 +5,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const Tab = EmberObject.extend({
|
||||
init() {
|
||||
|
|
|
@ -3,6 +3,7 @@ import { action } from "@ember/object";
|
|||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function popupAutomaticMembershipAlert(group_id, email_domains) {
|
||||
if (!email_domains) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import { iconHTML } from "discourse-common/lib/icon-library";
|
|||
import Post from "discourse/models/post";
|
||||
import Category from "discourse/models/category";
|
||||
import { computed } from "@ember/object";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function customTagArray(fieldName) {
|
||||
return computed(fieldName, function() {
|
||||
|
|
|
@ -16,6 +16,7 @@ import { escapeExpression, areCookiesEnabled } from "discourse/lib/utilities";
|
|||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import { SECOND_FACTOR_METHODS } from "discourse/models/user";
|
||||
import { getWebauthnCredential } from "discourse/lib/webauthn";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// This is happening outside of the app via popup
|
||||
const AuthErrors = [
|
||||
|
|
|
@ -13,6 +13,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import { userPath } from "discourse/lib/url";
|
||||
import logout from "discourse/lib/logout";
|
||||
import EmberObject from "@ember/object";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// Number of tokens shown by default.
|
||||
const DEFAULT_AUTH_TOKENS_COUNT = 2;
|
||||
|
|
|
@ -8,6 +8,7 @@ import { cookAsync } from "discourse/lib/text";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
init() {
|
||||
|
|
|
@ -8,6 +8,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { findAll } from "discourse/models/login-method";
|
||||
import { SECOND_FACTOR_METHODS } from "discourse/models/user";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(CanCheckEmails, {
|
||||
loading: false,
|
||||
|
|
|
@ -8,6 +8,7 @@ import DiscourseURL from "discourse/lib/url";
|
|||
import { userPath } from "discourse/lib/url";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import User from "discourse/models/user";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
taken: false,
|
||||
|
|
|
@ -5,6 +5,7 @@ import Controller from "@ember/controller";
|
|||
import showModal from "discourse/lib/show-modal";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
sortedByCount: true,
|
||||
|
|
|
@ -6,6 +6,7 @@ import BulkTopicSelection from "discourse/mixins/bulk-topic-selection";
|
|||
import NavItem from "discourse/models/nav-item";
|
||||
import FilterModeMixin from "discourse/mixins/filter-mode";
|
||||
import { queryParams } from "discourse/controllers/discovery-sortable";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend(BulkTopicSelection, FilterModeMixin, {
|
||||
application: controller(),
|
||||
|
|
|
@ -4,6 +4,7 @@ import Controller from "@ember/controller";
|
|||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Topic from "discourse/models/topic";
|
||||
import Category from "discourse/models/category";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
const _buttons = [];
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import { Promise } from "rsvp";
|
|||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import { AUTO_DELETE_PREFERENCES } from "discourse/models/bookmark";
|
||||
import { inject as service } from "@ember/service";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
let customPostMessageCallbacks = {};
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import { inject as service } from "@ember/service";
|
|||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import { exportUserArchive } from "discourse/lib/export-csv";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
application: controller(),
|
||||
|
|
|
@ -6,6 +6,7 @@ import discourseDebounce from "discourse/lib/debounce";
|
|||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
user: null,
|
||||
|
|
|
@ -4,6 +4,7 @@ import { alias, equal, and } from "@ember/object/computed";
|
|||
import { inject as service } from "@ember/service";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import Topic from "discourse/models/topic";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Controller.extend({
|
||||
userTopicsList: controller("user-topics-list"),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import { later } from "@ember/runloop";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// Subscribe to "asset-version" change events via the Message Bus
|
||||
export default {
|
||||
name: "asset-version",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import autocomplete from "discourse/lib/autocomplete";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default {
|
||||
name: "jquery-plugins",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default {
|
||||
name: "localization",
|
||||
after: "inject-objects",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import logout from "discourse/lib/logout";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
let _showingLogout = false;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function extractError(error, defaultMessage) {
|
||||
if (error instanceof Error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -8,6 +8,7 @@ import { selectedText } from "discourse/lib/utilities";
|
|||
import { Promise } from "rsvp";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import User from "discourse/models/user";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function isValidLink($link) {
|
||||
// .hashtag == category/tag link
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import I18n from "I18n";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function exportEntityByType(type, entity, args) {
|
||||
return ajax("/export_csv/export_entity.json", {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function outputExportResult(result) {
|
||||
if (result.success) {
|
||||
bootbox.alert(I18n.t("admin.export_csv.success"));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import { isAppleDevice } from "discourse/lib/utilities";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function isGUID(value) {
|
||||
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
import getUrl from "discourse-common/lib/get-url";
|
||||
import { on } from "@ember/object/evented";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default Mixin.create({
|
||||
uploading: false,
|
||||
|
|
|
@ -22,6 +22,7 @@ import { Promise } from "rsvp";
|
|||
import Site from "discourse/models/site";
|
||||
import User from "discourse/models/user";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// The actions the composer can take
|
||||
export const CREATE_TOPIC = "createTopic",
|
||||
|
|
|
@ -22,6 +22,7 @@ import Session from "discourse/models/session";
|
|||
import { Promise } from "rsvp";
|
||||
import Site from "discourse/models/site";
|
||||
import User from "discourse/models/user";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function loadTopicView(topic, args) {
|
||||
const data = _.merge({}, args);
|
||||
|
|
|
@ -13,6 +13,7 @@ import { getOwner } from "discourse-common/lib/get-owner";
|
|||
import { userPath } from "discourse/lib/url";
|
||||
import Composer from "discourse/models/composer";
|
||||
import { inject as service } from "@ember/service";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function unlessReadOnly(method, message) {
|
||||
return function() {
|
||||
|
|
|
@ -3,6 +3,7 @@ import { next } from "@ember/runloop";
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import User from "discourse/models/user";
|
||||
import Group from "discourse/models/group";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
beforeModel(transition) {
|
||||
|
|
|
@ -19,6 +19,7 @@ import hbs from "discourse/widgets/hbs-compiler";
|
|||
import { relativeAgeMediumSpan } from "discourse/lib/formatter";
|
||||
import { prioritizeNameInUx } from "discourse/lib/settings";
|
||||
import { Promise } from "rsvp";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
function transformWithCallbacks(post) {
|
||||
let transformed = transformBasicPost(post);
|
||||
|
|
|
@ -5,6 +5,7 @@ import { createWidget } from "discourse/widgets/widget";
|
|||
import { h } from "virtual-dom";
|
||||
import { avatarFor, avatarImg } from "discourse/widgets/post";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
createWidget("pm-remove-group-link", {
|
||||
tagName: "a.remove-invited.no-text.btn-icon.btn",
|
||||
|
|
|
@ -12,6 +12,7 @@ import { computed } from "@ember/object";
|
|||
import { equal } from "@ember/object/computed";
|
||||
import { camelize } from "@ember/string";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
// Component can get destroyed and lose state
|
||||
let _topicSnapshot = null;
|
||||
|
|
|
@ -30,6 +30,7 @@ import { getOwner } from "discourse-common/lib/get-owner";
|
|||
import { setTopicList } from "discourse/lib/topic-list-tracker";
|
||||
import { setURLContainer } from "discourse/lib/url";
|
||||
import { setDefaultOwner } from "discourse-common/lib/get-owner";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export function currentUser() {
|
||||
return User.create(sessionFixtures["/session/current.json"].current_user);
|
||||
|
@ -97,7 +98,7 @@ function AcceptanceModal(option, _relatedTarget) {
|
|||
});
|
||||
}
|
||||
|
||||
window.bootbox.$body = $("#ember-testing");
|
||||
bootbox.$body = $("#ember-testing");
|
||||
$.fn.modal = AcceptanceModal;
|
||||
|
||||
let _pretenderCallbacks = {};
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
import * as Utilities from "discourse/lib/utilities";
|
||||
import User from "discourse/models/user";
|
||||
import { discourseModule } from "helpers/qunit-helpers";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
discourseModule("lib:uploads");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user