DEV: Replace bootbox alert dialogs (#190)
This commit is contained in:
parent
4236689d27
commit
0deecbe2ae
|
@ -1,3 +1,4 @@
|
|||
2.9.0.beta8: 729e5a2add46fb4e2d8ed092da05a87ebbfcf05b
|
||||
2.9.0.beta6: 272e9dd760f82e33f9756866434ddcbe470cdb8e
|
||||
2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db
|
||||
2.8.0.beta3: 23287ece952cb45203819e7b470ebc194c58cb13
|
||||
|
|
|
@ -6,13 +6,14 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { Promise } from "rsvp";
|
||||
import bootbox from "bootbox";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { get } from "@ember/object";
|
||||
import { not, reads, sort } from "@ember/object/computed";
|
||||
|
||||
const NoQuery = Query.create({ name: "No queries", fake: true, group_ids: [] });
|
||||
|
||||
export default Controller.extend({
|
||||
dialog: service(),
|
||||
queryParams: { selectedQueryId: "id", params: "params" },
|
||||
selectedQueryId: null,
|
||||
editDisabled: false,
|
||||
|
@ -180,11 +181,11 @@ export default Controller.extend({
|
|||
if (e.jqXHR) {
|
||||
popupAjaxError(e);
|
||||
} else if (e instanceof SyntaxError) {
|
||||
bootbox.alert(I18n.t("explorer.import.unparseable_json"));
|
||||
this.dialog.alert(I18n.t("explorer.import.unparseable_json"));
|
||||
} else if (e instanceof TypeError) {
|
||||
bootbox.alert(I18n.t("explorer.import.wrong_json"));
|
||||
this.dialog.alert(I18n.t("explorer.import.wrong_json"));
|
||||
} else {
|
||||
bootbox.alert(I18n.t("errors.desc.unknown"));
|
||||
this.dialog.alert(I18n.t("errors.desc.unknown"));
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue