编辑表格功能:保存按钮改为由JS实现,CSS无法保证在按钮字面变化时仍能居中

This commit is contained in:
datagear 2018-12-17 20:27:39 +08:00
parent 892fa62834
commit 6e7891a7ed
2 changed files with 8 additions and 4 deletions

View File

@ -142,7 +142,11 @@ WebUtils.setPageId(request, gridPageId);
po.element(".head .search").addClass("ui-state-disabled");
po.element(".foot .pagination").addClass("ui-state-disabled");
var $editGridOperation = po.editGridOperation();
//保存按钮居中
$editGridOperation.css("right", (0 - po.element(".button-save", $editGridOperation).outerWidth(true)/2));
po.editGridOperationButtons().show("fade");
po.element(".ui-button.not-edit-grid-button", $headOperation).hide();
po.element(".edit-grid-button-wrapper", $headOperation).show("fade", function()
{

View File

@ -1049,7 +1049,7 @@ table.dataTable tbody tr td.cell-modified .cell-midified-tip.ui-state-error{
.page-grid .foot.foot-edit-grid .edit-grid .edit-grid-operation{
display: inline-block;
position: absolute;
right: -3.5em;
right: 0;
bottom: 0;
z-index: 1;
}
@ -1058,9 +1058,9 @@ table.dataTable tbody tr td.cell-modified .cell-midified-tip.ui-state-error{
margin-right: 0.2em;
}
.page-grid .foot.foot-edit-grid .edit-grid .edit-grid-operation .ui-button.button-save{
padding-left: 2.5em;
padding-right: 2.5em;
margin-left: 1em;
padding-left: 3em;
padding-right: 3em;
margin-left: 2em;
}
.page-grid .foot.foot-edit-grid .pagination-wrapper{
width: 49%;