mirror of https://gitee.com/karson/fastadmin.git
优化表格拖拽移动时tooltip定位
parent
9d9c8dcf52
commit
c170985264
|
|
@ -970,6 +970,9 @@ form.form-horizontal .control-label {
|
||||||
.fixed-table-container .bs-checkbox {
|
.fixed-table-container .bs-checkbox {
|
||||||
min-width: 36px;
|
min-width: 36px;
|
||||||
}
|
}
|
||||||
|
.fixed-table-container tr[data-origpos] > td > .tooltip.in {
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
/*修复nice-validator新版下的一处BUG*/
|
/*修复nice-validator新版下的一处BUG*/
|
||||||
.nice-validator input,
|
.nice-validator input,
|
||||||
.nice-validator select,
|
.nice-validator select,
|
||||||
|
|
|
||||||
|
|
@ -652,6 +652,20 @@ form.form-horizontal .control-label {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
}
|
}
|
||||||
|
.n-bootstrap .n-right {
|
||||||
|
margin-top: 0;
|
||||||
|
top: -20px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.n-bootstrap .n-right .msg-wrap {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.n-bootstrap .col-xs-12 > .n-right .msg-wrap {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.nav-pills > li {
|
.nav-pills > li {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
}
|
}
|
||||||
//tooltip和popover
|
//tooltip和popover
|
||||||
if (!('ontouchstart' in document.documentElement)) {
|
if (!('ontouchstart' in document.documentElement)) {
|
||||||
$('body').tooltip({selector: '[data-toggle="tooltip"]'});
|
$('body').tooltip({selector: '[data-toggle="tooltip"]', trigger: 'hover'});
|
||||||
}
|
}
|
||||||
$('body').popover({selector: '[data-toggle="popover"]'});
|
$('body').popover({selector: '[data-toggle="popover"]'});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -89,14 +89,14 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
icon: 'fa fa-pencil',
|
icon: 'fa fa-pencil',
|
||||||
title: __('Edit'),
|
title: __('Edit'),
|
||||||
extend: 'data-toggle="tooltip"',
|
extend: 'data-toggle="tooltip" data-container="body"',
|
||||||
classname: 'btn btn-xs btn-success btn-editone'
|
classname: 'btn btn-xs btn-success btn-editone'
|
||||||
},
|
},
|
||||||
del: {
|
del: {
|
||||||
name: 'del',
|
name: 'del',
|
||||||
icon: 'fa fa-trash',
|
icon: 'fa fa-trash',
|
||||||
title: __('Del'),
|
title: __('Del'),
|
||||||
extend: 'data-toggle="tooltip"',
|
extend: 'data-toggle="tooltip" data-container="body"',
|
||||||
classname: 'btn btn-xs btn-danger btn-delone'
|
classname: 'btn btn-xs btn-danger btn-delone'
|
||||||
},
|
},
|
||||||
dragsort: {
|
dragsort: {
|
||||||
|
|
@ -248,12 +248,12 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
if (overlapped) {
|
if (overlapped) {
|
||||||
if (!$(this).hasClass("overlaped")) {
|
if (!$(this).hasClass("overlaped")) {
|
||||||
$(this).addClass("overlaped");
|
$(this).addClass("overlaped");
|
||||||
checkbox.prop("checked", !checkbox.prop("checked"));
|
checkbox.trigger("click");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($(this).hasClass("overlaped")) {
|
if ($(this).hasClass("overlaped")) {
|
||||||
$(this).removeClass("overlaped");
|
$(this).removeClass("overlaped");
|
||||||
checkbox.prop("checked", !checkbox.prop("checked"));
|
checkbox.trigger("click");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -463,6 +463,9 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
$("tbody", table).dragsort({
|
$("tbody", table).dragsort({
|
||||||
itemSelector: 'tr:visible',
|
itemSelector: 'tr:visible',
|
||||||
dragSelector: "a.btn-dragsort",
|
dragSelector: "a.btn-dragsort",
|
||||||
|
dragBegin: function (a, b) {
|
||||||
|
$("[data-toggle='tooltip']", this).tooltip("destroy");
|
||||||
|
},
|
||||||
dragEnd: function (a, b) {
|
dragEnd: function (a, b) {
|
||||||
var element = $("a.btn-dragsort", this);
|
var element = $("a.btn-dragsort", this);
|
||||||
var data = table.bootstrapTable('getData');
|
var data = table.bootstrapTable('getData');
|
||||||
|
|
|
||||||
|
|
@ -888,6 +888,11 @@ form.form-horizontal .control-label {
|
||||||
.bs-checkbox {
|
.bs-checkbox {
|
||||||
min-width: 36px;
|
min-width: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//拖拽时隐藏tooltip,避免出现错位
|
||||||
|
tr[data-origpos] > td > .tooltip.in {
|
||||||
|
display:none!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*修复nice-validator新版下的一处BUG*/
|
/*修复nice-validator新版下的一处BUG*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue