修改BUG:移动端页面点击工具栏按钮后导致页面自动回滚到页面顶端
This commit is contained in:
parent
0ace1c64a3
commit
54f5145b37
|
@ -312,7 +312,8 @@
|
|||
}, options);
|
||||
$(this).bootstrapTable(settings);
|
||||
var $toolbar = $('div.toolbar');
|
||||
$toolbar.on('click', 'a', function () {
|
||||
$toolbar.on('click', 'a', function (e) {
|
||||
e.preventDefault();
|
||||
var ctl = $('#' + $(this).attr('id').replace('tb_', 'btn_'));
|
||||
ctl.trigger("click");
|
||||
}).insertBefore($('div.bootstrap-table > div.fixed-table-toolbar > div.bs-bars'));
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
var source = $("#" + cId);
|
||||
source.data('click', name);
|
||||
if (event !== null) source.data('event', event);
|
||||
source.click(function () {
|
||||
source.click(function (e) {
|
||||
e.preventDefault();
|
||||
var method = source.data('click');
|
||||
BootstrapAdmin.prototype[method].call(that, this, source.data('event'));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue