Cell and facet choice edit popups now allow Shift-Enter as a means to insert new lines. Plain Enter still applies the edit immediately.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@239 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-03-08 19:27:37 +00:00
parent 0ef0aec0c5
commit c147837a3e
2 changed files with 14 additions and 10 deletions

View File

@ -309,10 +309,12 @@ ListFacet.prototype._editChoice = function(choice, choiceDiv) {
elmts.textarea
.text(originalContent)
.keydown(function(evt) {
if (evt.keyCode == 13) {
commit();
} else if (evt.keyCode == 27) {
MenuSystem.dismissAll();
if (!evt.shiftKey) {
if (evt.keyCode == 13) {
commit();
} else if (evt.keyCode == 27) {
MenuSystem.dismissAll();
}
}
})
.select()

View File

@ -396,13 +396,15 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
elmts.textarea
.text(originalContent)
.keydown(function(evt) {
if (evt.keyCode == 13) {
if (evt.ctrlKey) {
elmts.applyOthersCheckbox[0].checked = true;
if (!evt.shiftKey) {
if (evt.keyCode == 13) {
if (evt.ctrlKey) {
elmts.applyOthersCheckbox[0].checked = true;
}
commit();
} else if (evt.keyCode == 27) {
MenuSystem.dismissAll();
}
commit();
} else if (evt.keyCode == 27) {
MenuSystem.dismissAll();
}
})
.select()