Getting Angular UI Calendar for UI-Bootstrap Tooltips

I am trying to display a tooltip in an angular user interface calendar. I managed to do this, as explained in the next thread, Tooltip for full-screen viewing in year format

    $scope.eventMouseover = function (calEvent, jsEvent) {
        var tooltip = '<div class="tooltipevent">' + calEvent.description + '</div>';
        $("body").append(tooltip);
        $(this).mouseover(function (e) {
            $(this).css('z-index', 10000);
            $('.tooltipevent').fadeIn('500');
            $('.tooltipevent').fadeTo('10', 1.9);
        }).mousemove(function (e) {
            $('.tooltipevent').css('top', e.pageY + 10);
            $('.tooltipevent').css('left', e.pageX + 20);
        });
    }

    $scope.eventMouseout = function (calEvent, jsEvent) {
        $(this).css('z-index', 8);
        $('.tooltipevent').remove();
    },

Obviously, this is not the best way to do this. With the latest UI-Bootstrap, we have much more attractive hints. Has anyone successfully integrated these tooltips with Angular-UI Calendar?

1: http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/, eventRender tip divs calendarEvent. . , mouseover mouseout divs calendarEvent, tooltip.

+3
1

, .

$scope.eventRender = function( event, element, view ) { 
  $timeout(function(){
    $(element).attr('tooltip', event.title);
    $compile(element)($scope);
  });
};

, tooltip. {{bindings}}

- $, $scope. $apply. $timeout - , , , " ".

+6

All Articles