修改BUG:longbow.common组件lgbInfo方法获取container属性错误,增加placement配置

This commit is contained in:
Argo-MacBookPro 2018-10-17 18:12:13 +08:00
parent 915d78ccb9
commit b5b4fc5fd3
2 changed files with 8 additions and 4 deletions

View File

@ -309,13 +309,15 @@
var $element = $(this);
$element.append($.format('<a href="#" tabindex="-1" role="button" data-toggle="popover"><i class="fa fa-question-circle"></i></a>'));
});
var container = $(this).parent().attr('data-container') || '#dialogNew';
var container = this.attr('data-container') || '#dialogNew';
this.find('[data-toggle="popover"]').popover($.extend({
title: function () {
return $(this).parent().text();
}, content: function () {
return $(this).parent().attr('data-content');
}, trigger: 'focus', html: true, container: container
}, trigger: 'focus', html: true, container: container, placement: function () {
return $(this.element).parent().attr('data-placement') || 'auto';
}
}, option));
return this;
},

View File

@ -370,13 +370,15 @@
var $element = $(this);
$element.append($.format('<a href="#" tabindex="-1" role="button" data-toggle="popover"><i class="fa fa-question-circle"></i></a>'));
});
var container = $(this).parent().attr('data-container') || '#dialogNew';
var container = this.attr('data-container') || '#dialogNew';
this.find('[data-toggle="popover"]').popover($.extend({
title: function () {
return $(this).parent().text();
}, content: function () {
return $(this).parent().attr('data-content');
}, trigger: 'focus', html: true, container: container
}, trigger: 'focus', html: true, container: container, placement: function () {
return $(this.element).parent().attr('data-placement') || 'auto';
}
}, option));
return this;
},