2013-06-22 06:24:24 +00:00
|
|
|
'use strict';
|
2013-06-21 06:01:00 +00:00
|
|
|
define(
|
|
|
|
[
|
|
|
|
'bootstrap'
|
|
|
|
], function () {
|
|
|
|
$(document).on('mouseenter', '[title]', function () {
|
2013-07-14 06:06:18 +00:00
|
|
|
|
|
|
|
var element = $(this);
|
|
|
|
|
|
|
|
if (!element.attr('data-placement') && element.parents('.control-group').length > 0) {
|
|
|
|
element.attr('data-placement', 'right');
|
|
|
|
}
|
|
|
|
|
2013-07-25 01:11:48 +00:00
|
|
|
var container = element.parents('.modal-body');
|
|
|
|
if (container.length === 0) {
|
|
|
|
container = 'body';
|
|
|
|
}
|
|
|
|
|
|
|
|
element.tooltip({
|
|
|
|
container: container
|
|
|
|
});
|
|
|
|
|
2013-07-14 06:06:18 +00:00
|
|
|
element.tooltip('show');
|
2013-06-21 06:01:00 +00:00
|
|
|
});
|
|
|
|
});
|