Re-worked the cell editor popup.
Don't keep logging "Saved workspace." git-svn-id: http://google-refine.googlecode.com/svn/trunk@235 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
5d3a57eeeb
commit
ac50b3c48b
@ -210,7 +210,7 @@ public class ProjectManager {
|
|||||||
oldFile.delete();
|
oldFile.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
Gridworks.log("Saved workspace.");
|
//Gridworks.log("Saved workspace.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,15 +290,23 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
|
|||||||
|
|
||||||
var originalContent = this._cell == null || ("v" in this._cell && this._cell.v == null) ? "" : this._cell.v;
|
var originalContent = this._cell == null || ("v" in this._cell && this._cell.v == null) ? "" : this._cell.v;
|
||||||
|
|
||||||
var menu = MenuSystem.createMenu().width("350px");
|
var menu = MenuSystem.createMenu().addClass("data-table-cell-editor").width("400px");
|
||||||
menu.html(
|
menu.html(
|
||||||
'<table class="data-table-cell-edit-layout">' +
|
'<table class="data-table-cell-editor-layout">' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
'<td colspan="4">' +
|
'<td colspan="5">' +
|
||||||
'<textarea class="data-table-cell-edit-editor" bind="textarea" />' +
|
'<textarea class="data-table-cell-editor-editor" bind="textarea" />' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
|
'<td width="1%" align="center">' +
|
||||||
|
'<button bind="okButton">Apply</button><br/>' +
|
||||||
|
'<span class="data-table-cell-editor-key">Enter</span>' +
|
||||||
|
'</td>' +
|
||||||
|
'<td width="1%" align="center">' +
|
||||||
|
'<button bind="cancelButton">Cancel</button><br/>' +
|
||||||
|
'<span class="data-table-cell-editor-key">Esc</span>' +
|
||||||
|
'</td>' +
|
||||||
'<td>' +
|
'<td>' +
|
||||||
'<select bind="typeSelect">' +
|
'<select bind="typeSelect">' +
|
||||||
'<option value="text">text</option>' +
|
'<option value="text">text</option>' +
|
||||||
@ -312,10 +320,7 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
|
|||||||
'</td>' +
|
'</td>' +
|
||||||
'<td>' +
|
'<td>' +
|
||||||
'apply to other cells with<br/>' +
|
'apply to other cells with<br/>' +
|
||||||
'same original content' +
|
'same content <span class="data-table-cell-editor-key">(Ctrl-Enter)</span>' +
|
||||||
'</td>' +
|
|
||||||
'<td width="1%">' +
|
|
||||||
'<button bind="okButton"> OK </button>' +
|
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</table>'
|
'</table>'
|
||||||
@ -392,6 +397,9 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
|
|||||||
.text(originalContent)
|
.text(originalContent)
|
||||||
.keydown(function(evt) {
|
.keydown(function(evt) {
|
||||||
if (evt.keyCode == 13) {
|
if (evt.keyCode == 13) {
|
||||||
|
if (evt.ctrlKey) {
|
||||||
|
elmts.applyOthersCheckbox[0].checked = true;
|
||||||
|
}
|
||||||
commit();
|
commit();
|
||||||
} else if (evt.keyCode == 27) {
|
} else if (evt.keyCode == 27) {
|
||||||
MenuSystem.dismissAll();
|
MenuSystem.dismissAll();
|
||||||
@ -399,4 +407,8 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
|
|||||||
})
|
})
|
||||||
.select()
|
.select()
|
||||||
.focus();
|
.focus();
|
||||||
|
|
||||||
|
elmts.cancelButton.click(function() {
|
||||||
|
MenuSystem.dismissAll();
|
||||||
|
});
|
||||||
};
|
};
|
@ -163,24 +163,33 @@ a.data-table-star-off {
|
|||||||
background-position: -17px 0px;
|
background-position: -17px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.data-table-cell-edit-layout {
|
.data-table-cell-editor {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 5px;
|
||||||
|
background: #fffee0;
|
||||||
|
}
|
||||||
|
table.data-table-cell-editor-layout {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
table.data-table-cell-edit-layout > tbody > tr > td {
|
table.data-table-cell-editor-layout > tbody > tr > td {
|
||||||
padding-right: 5px;
|
padding-right: 3px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
table.data-table-cell-edit-layout > tbody > tr > td:last-child {
|
table.data-table-cell-editor-layout > tbody > tr > td:last-child {
|
||||||
padding-right: 0px;
|
padding-right: 0px;
|
||||||
}
|
}
|
||||||
table.data-table-cell-edit-layout > tbody > tr:last-child > td {
|
table.data-table-cell-editor-layout > tbody > tr:last-child > td {
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea.data-table-cell-edit-editor {
|
textarea.data-table-cell-editor-editor {
|
||||||
display: block;
|
display: block;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
padding: 2%;
|
padding: 2%;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.data-table-cell-editor-key {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user