mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 01:09:22 +02:00
@@ -1,6 +1,6 @@
|
||||
import { t } from '../util/locale';
|
||||
import _ from 'lodash';
|
||||
import { Commit, Conflicts, Loading, Success } from '../ui/index';
|
||||
import { Conflicts, uiconfirm, Commit, Loading, Success } from '../ui/index';
|
||||
import { DiscardTags, MergeRemoteChanges, Noop, Revert } from '../actions/index';
|
||||
import { displayName, displayType } from '../util/index';
|
||||
import { Browse } from './index';
|
||||
@@ -240,7 +240,7 @@ export function Save(context) {
|
||||
|
||||
|
||||
function showErrors() {
|
||||
var selection = confirm(context.container());
|
||||
var selection = uiconfirm(context.container());
|
||||
|
||||
history.pop();
|
||||
loading.close();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { t } from '../util/locale';
|
||||
import { modal } from './modal';
|
||||
|
||||
export function confirm(selection) {
|
||||
export function uiconfirm(selection) {
|
||||
var modalSelection = modal(selection);
|
||||
|
||||
modalSelection.select('.modal')
|
||||
|
||||
@@ -5,7 +5,7 @@ export { Attribution } from './attribution';
|
||||
export { Background } from './background';
|
||||
export { cmd } from './cmd';
|
||||
export { Commit } from './commit';
|
||||
export { confirm } from './confirm';
|
||||
export { uiconfirm } from './confirm';
|
||||
export { Conflicts } from './conflicts';
|
||||
export { Contributors } from './contributors';
|
||||
export { Disclosure } from './disclosure';
|
||||
|
||||
@@ -5,13 +5,13 @@ describe('iD.ui.confirm', function () {
|
||||
afterEach(function() { elem.remove(); });
|
||||
|
||||
it('can be instantiated', function () {
|
||||
var confirm = iD.ui.confirm(elem);
|
||||
var confirm = iD.ui.uiconfirm(elem);
|
||||
expect(confirm).to.be.ok;
|
||||
happen.keydown(document, {keyCode: 27}); // dismiss
|
||||
});
|
||||
|
||||
it('can be dismissed', function (done) {
|
||||
var confirm = iD.ui.confirm(elem);
|
||||
var confirm = iD.ui.uiconfirm(elem);
|
||||
happen.click(confirm.select('button').node());
|
||||
window.setTimeout(function() {
|
||||
expect(confirm.node().parentNode).to.be.null;
|
||||
|
||||
Reference in New Issue
Block a user