changes for navigation buttons
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if nextPreviousButtonsEnabled}}
|
||||
{{#if navigateButtonsEnabled}}
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default action {{#unless previousButtonEnabled}} disabled{{/unless}}" data-action="previous">
|
||||
|
||||
@@ -90,6 +90,8 @@ Espo.define('views/record/detail', 'views/record/base', function (Dep) {
|
||||
|
||||
editModeDisabled: false,
|
||||
|
||||
navigateButtonsDisabled: false,
|
||||
|
||||
readOnly: false,
|
||||
|
||||
isWide: false,
|
||||
@@ -316,12 +318,11 @@ Espo.define('views/record/detail', 'views/record/base', function (Dep) {
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
||||
var nextPreviousButtonsEnabled = !!this.model.collection;
|
||||
var navigateButtonsEnabled = !this.navigateButtonsDisabled && !!this.model.collection;
|
||||
|
||||
var previousButtonEnabled = false;
|
||||
var nextButtonEnabled = false;
|
||||
if (nextPreviousButtonsEnabled) {
|
||||
if (navigateButtonsEnabled) {
|
||||
if (this.indexOfRecord > 0) {
|
||||
previousButtonEnabled = true;
|
||||
}
|
||||
@@ -351,7 +352,7 @@ Espo.define('views/record/detail', 'views/record/base', function (Dep) {
|
||||
id: this.id,
|
||||
isWide: this.isWide,
|
||||
isSmall: this.type == 'editSmall' || this.type == 'detailSmall',
|
||||
nextPreviousButtonsEnabled: nextPreviousButtonsEnabled,
|
||||
navigateButtonsEnabled: navigateButtonsEnabled,
|
||||
previousButtonEnabled: previousButtonEnabled,
|
||||
nextButtonEnabled: nextButtonEnabled
|
||||
}
|
||||
@@ -447,6 +448,12 @@ Espo.define('views/record/detail', 'views/record/base', function (Dep) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.navigateButtonsDisabled) {
|
||||
if ('navigateButtonsDisabled' in this.options) {
|
||||
this.navigateButtonsDisabled = this.options.navigateButtonsDisabled;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.isNew()) {
|
||||
this.isNew = true;
|
||||
this.removeButton('delete');
|
||||
|
||||
@@ -601,7 +601,7 @@ td.cell-buttons > .btn-group {
|
||||
|
||||
.stick-sub.button-container {
|
||||
background-color: @body-bg;
|
||||
padding: 3px 3px 3px 0;
|
||||
padding: 3px @container-padding*2 3px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,13 @@
|
||||
@grid-gutter-width: 16px;
|
||||
@container-lg: @container-large-desktop;
|
||||
|
||||
@container-padding: 15px;
|
||||
|
||||
.container-fixed() {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
padding-left: @container-padding;
|
||||
padding-right: @container-padding;
|
||||
.clearfix();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user