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,11 +309,13 @@ ListFacet.prototype._editChoice = function(choice, choiceDiv) {
elmts.textarea elmts.textarea
.text(originalContent) .text(originalContent)
.keydown(function(evt) { .keydown(function(evt) {
if (!evt.shiftKey) {
if (evt.keyCode == 13) { if (evt.keyCode == 13) {
commit(); commit();
} else if (evt.keyCode == 27) { } else if (evt.keyCode == 27) {
MenuSystem.dismissAll(); MenuSystem.dismissAll();
} }
}
}) })
.select() .select()
.focus(); .focus();

View File

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