ListView refactoring

This commit is contained in:
Julia Radzhabova 2020-04-09 16:29:04 +03:00
parent e0dd81e13f
commit 3e352d5c80
16 changed files with 22 additions and 22 deletions

View file

@ -575,8 +575,8 @@ define([
var div_top = div.offset().top, var div_top = div.offset().top,
div_first = $(this.dataViewItems[0].el), div_first = $(this.dataViewItems[0].el),
div_first_top = (div_first.length>0) ? div_first[0].offsetTop : 0; div_first_top = (div_first.length>0) ? div_first[0].clientTop : 0;
if (div_top < inner_top + div_first_top || div_top+div.outerHeight() > inner_top + innerEl.height()) { if (div_top < inner_top + div_first_top || div_top+div.outerHeight()*0.9 > inner_top + div_first_top + innerEl.height()) {
if (this.scroller && this.allowScrollbar) { if (this.scroller && this.allowScrollbar) {
this.scroller.scrollTop(innerEl.scrollTop() + div_top - inner_top - div_first_top, 0); this.scroller.scrollTop(innerEl.scrollTop() + div_top - inner_top - div_first_top, 0);
} else { } else {

View file

@ -1,5 +1,6 @@
.listview { .listview {
border: 1px solid @input-border; border: 1px solid @input-border;
line-height: 15px;
&.inner { &.inner {
width: 100%; width: 100%;

View file

@ -83,7 +83,7 @@
</tr> </tr>
<tr style="vertical-align: top;"> <tr style="vertical-align: top;">
<td class="padding-small"> <td class="padding-small">
<div id="control-settings-list" style="width:200px; height: 192px;margin-right: 10px;"></div> <div id="control-settings-list" style="width:200px; height: 214px;margin-right: 10px;"></div>
</td> </td>
<td class="padding-small"> <td class="padding-small">
<button type="button" class="btn btn-text-default" id="control-settings-btn-add" style="min-width: 86px;margin-bottom: 5px;"><%= scope.textAdd %></button> <button type="button" class="btn btn-text-default" id="control-settings-btn-add" style="min-width: 86px;margin-bottom: 5px;"><%= scope.textAdd %></button>
@ -111,7 +111,7 @@
</tr> </tr>
<tr> <tr>
<td class="padding-small"> <td class="padding-small">
<div id="control-settings-format" style="width: 100%; height: 165px;"></div> <div id="control-settings-format" style="width: 100%; height: 162px;"></div>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -170,7 +170,7 @@
</div> </div>
<div> <div>
<div colspan=3 class="padding-large"> <div colspan=3 class="padding-large">
<div id="paraadv-list-tabs" style="width:348px; height: 110px;"></div> <div id="paraadv-list-tabs" style="width:348px; height: 116px;"></div>
</div> </div>
</div> </div>
<div> <div>

View file

@ -51,7 +51,7 @@ define([
DE.Views.BookmarksDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({ DE.Views.BookmarksDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
options: { options: {
contentWidth: 310, contentWidth: 310,
height: 360, height: 366,
buttons: null buttons: null
}, },
@ -85,7 +85,7 @@ define([
'</tr>', '</tr>',
'<tr>', '<tr>',
'<td class="padding-small">', '<td class="padding-small">',
'<div id="bookmarks-list" style="width:290px; height: 130px;"></div>', '<div id="bookmarks-list" style="width:290px; height: 139px;"></div>',
'</td>', '</td>',
'</tr>', '</tr>',
'<tr>', '<tr>',

View file

@ -62,7 +62,7 @@ define([
}, options || {}); }, options || {});
this.template = [ this.template = [
'<div class="box" style="height: 275px;">', '<div class="box" style="height: 272px;">',
'<div class="input-row">', '<div class="input-row">',
'<label style="font-weight: bold;">' + this.textLang + '</label>', '<label style="font-weight: bold;">' + this.textLang + '</label>',
'</div>', '</div>',
@ -70,7 +70,7 @@ define([
'<div class="input-row">', '<div class="input-row">',
'<label style="font-weight: bold;">' + this.textFormat + '</label>', '<label style="font-weight: bold;">' + this.textFormat + '</label>',
'</div>', '</div>',
'<div id="datetime-dlg-format" class="" style="margin-bottom: 10px;width: 100%; height: 165px; overflow: hidden;"></div>', '<div id="datetime-dlg-format" class="" style="margin-bottom: 10px;width: 100%; height: 162px; overflow: hidden;"></div>',
'<div class="input-row">', '<div class="input-row">',
'<div id="datetime-dlg-update" style="margin-top: 3px;"></div>', '<div id="datetime-dlg-update" style="margin-top: 3px;"></div>',
'<button type="button" class="btn btn-text-default auto" id="datetime-dlg-default" style="float: right;">' + this.textDefault + '</button>', '<button type="button" class="btn btn-text-default auto" id="datetime-dlg-default" style="float: right;">' + this.textDefault + '</button>',

View file

@ -107,7 +107,7 @@ define([
'<label class="input-label" style="">' + me.textLevel + '</label>', '<label class="input-label" style="">' + me.textLevel + '</label>',
'</td></tr>', '</td></tr>',
'<tr><td>', '<tr><td>',
'<div id="tableofcontents-styles-list" class="header-styles-tableview" style="width:100%; height: 122px;"></div>', '<div id="tableofcontents-styles-list" class="header-styles-tableview" style="width:100%; height: 121px;"></div>',
'</td></tr></table>', '</td></tr></table>',
'</div>', '</div>',
'</td>', '</td>',

View file

@ -102,7 +102,7 @@
</div> </div>
<div> <div>
<div colspan=3 class="padding-large"> <div colspan=3 class="padding-large">
<div id="paraadv-list-tabs" style="width:348px; height: 110px;"></div> <div id="paraadv-list-tabs" style="width:348px; height: 116px;"></div>
</div> </div>
</div> </div>
<div> <div>

View file

@ -70,7 +70,7 @@ define([
'<div class="input-row">', '<div class="input-row">',
'<label style="font-weight: bold;">' + this.textFormat + '</label>', '<label style="font-weight: bold;">' + this.textFormat + '</label>',
'</div>', '</div>',
'<div id="datetime-dlg-format" class="" style="margin-bottom: 10px;width: 100%; height: 165px; overflow: hidden;"></div>', '<div id="datetime-dlg-format" class="" style="margin-bottom: 10px;width: 100%; height: 162px; overflow: hidden;"></div>',
'<div class="input-row">', '<div class="input-row">',
'<div id="datetime-dlg-update" style="margin-top: 3px;"></div>', '<div id="datetime-dlg-update" style="margin-top: 3px;"></div>',
'<button type="button" class="btn btn-text-default auto" id="datetime-dlg-default" style="float: right;">' + this.textDefault + '</button>', '<button type="button" class="btn btn-text-default auto" id="datetime-dlg-default" style="float: right;">' + this.textDefault + '</button>',

View file

@ -20,7 +20,7 @@
</tr> </tr>
<tr> <tr>
<td colspan=2 class="padding-small"> <td colspan=2 class="padding-small">
<div id="name-manager-range-list" class="range-tableview" style="width:100%; height: 143px;"></div> <div id="name-manager-range-list" class="range-tableview" style="width:100%; height: 141px;"></div>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -102,7 +102,7 @@
</div> </div>
<div> <div>
<div colspan=3 class="padding-large"> <div colspan=3 class="padding-large">
<div id="paraadv-list-tabs" style="width:348px; height: 110px;"></div> <div id="paraadv-list-tabs" style="width:348px; height: 116px;"></div>
</div> </div>
</div> </div>
<div> <div>

View file

@ -20,7 +20,7 @@
</tr> </tr>
<tr> <tr>
<td class="padding-small"> <td class="padding-small">
<div id="sort-dialog-list" class="" style="width:100%; height: 152px;"></div> <div id="sort-dialog-list" class="" style="width:100%; height: 151px;"></div>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -53,7 +53,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
options: { options: {
alias: 'NameManagerDlg', alias: 'NameManagerDlg',
contentWidth: 510, contentWidth: 510,
height: 353, height: 351,
buttons: null buttons: null
}, },

View file

@ -67,14 +67,13 @@ define([
'<tr>', '<tr>',
'<td class="padding-small">', '<td class="padding-small">',
'<label class="input-label">', me.textNames,'</label>', '<label class="input-label">', me.textNames,'</label>',
'<div id="named-range-paste-list" class="range-tableview" style="width:100%; height: 150px;"></div>', '<div id="named-range-paste-list" class="range-tableview" style="width:100%; height: 169px;"></div>',
'</td>', '</td>',
'</tr>', '</tr>',
'</table>', '</table>',
'</div></div>', '</div></div>',
'</div>', '</div>',
'</div>', '</div>'
'<div class="separator horizontal"></div>'
].join('') ].join('')
}, options); }, options);

View file

@ -62,7 +62,7 @@ define([
}, options || {}); }, options || {});
this.template = [ this.template = [
'<div class="box" style="height: 270px;">', '<div class="box" style="height: 260px;">',
'<div style="margin-bottom: 16px;">', '<div style="margin-bottom: 16px;">',
'<label>' + this.textDescription + '</label>', '<label>' + this.textDescription + '</label>',
'</div>', '</div>',
@ -72,7 +72,7 @@ define([
'<div class="input-row">', '<div class="input-row">',
'<label style="font-weight: bold;">' + this.textColumns + '</label>', '<label style="font-weight: bold;">' + this.textColumns + '</label>',
'</div>', '</div>',
'<div id="rem-duplicates-dlg-columns" class="" style="width: 100%; height: 165px; overflow: hidden;"></div>', '<div id="rem-duplicates-dlg-columns" class="" style="width: 100%; height: 162px; overflow: hidden;"></div>',
'</div>' '</div>'
].join(''); ].join('');

View file

@ -791,7 +791,7 @@ define([
'<div class="input-row">' + '<div class="input-row">' +
'<label><%= label %></label>' + '<label><%= label %></label>' +
'</div>' + '</div>' +
'<div id="status-list-names" style="height: 170px;"/>' + '<div id="status-list-names" style="height: 162px;"/>' +
'</div>', '</div>',
initialize : function(options) { initialize : function(options) {