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