mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +08:00
Merge pull request #356 from ZmagoD/zd_SCI_803
fixes bug with long column names in edit mode [fixes SCI-803]
This commit is contained in:
commit
ad9b25ba44
1 changed files with 12 additions and 1 deletions
|
@ -936,6 +936,14 @@ function changeToEditMode() {
|
|||
var visLi = (visible) ? '' : 'col-invisible';
|
||||
var editClass = (editable) ? '' : 'disabled';
|
||||
var delClass = (deletable) ? '' : 'disabled';
|
||||
|
||||
var thederName;
|
||||
if ($(el).find('.modal-tooltiptext').length > 0) {
|
||||
thederName = $(el).find('.modal-tooltiptext').text();
|
||||
} else {
|
||||
thederName = el.innerText;
|
||||
}
|
||||
|
||||
var html =
|
||||
'<li ' +
|
||||
'data-position="' + colIndex + '" ' +
|
||||
|
@ -945,7 +953,7 @@ function changeToEditMode() {
|
|||
'class="' + visLi + '"' +
|
||||
'>' +
|
||||
'<i class="grippy"></i> ' +
|
||||
'<span class="text">' + generateColumnNameTooltip(el.innerText) + '</span> ' +
|
||||
'<span class="text">' + generateColumnNameTooltip(thederName) + '</span> ' +
|
||||
'<span class="form-group"><input type="text" class="text-edit form-control" style="display: none;" />' +
|
||||
'<span class="pull-right controls">' +
|
||||
'<span class="ok glyphicon glyphicon-ok" style="display: none;"></span>' +
|
||||
|
@ -1075,6 +1083,9 @@ function changeToEditMode() {
|
|||
var self = $(this);
|
||||
var li = self.closest('li');
|
||||
var text = li.find('.text');
|
||||
if ($(text).find('.modal-tooltiptext').length > 0) {
|
||||
text = $(text).find('.modal-tooltiptext');
|
||||
}
|
||||
var textEdit = li.find('.text-edit');
|
||||
var controls = li.find('.controls .vis,.edit,.del');
|
||||
var controlsEdit = li.find('.controls .ok,.cancel');
|
||||
|
|
Loading…
Reference in a new issue