Fixed a few issues
authorAlexander Ebert <ebert@woltlab.com>
Tue, 7 Oct 2014 13:30:08 +0000 (15:30 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 7 Oct 2014 13:30:08 +0000 (15:30 +0200)
com.woltlab.wcf/templates/dashboardBoxRecentActivity.tpl
wcfsetup/install/files/js/WCF.js

index 80f22b1ceedabfd3fb5aa9d979e2b44fd93b4f04..0cd5b3ffdc471eec3bb93187b9fc6048cdd866f2 100644 (file)
@@ -14,7 +14,7 @@
 <div class="container marginTop">
        {assign var='__events' value=$eventList->getObjects()}
        {assign var='__lastEvent' value=$__events|end}
-       <ul id="recentActivities" class="containerList recentActivityList" data-last-event-time="{@$lastEventTime}" data-last-event-id="{@$__lastEvent->eventID}">
+       <ul id="recentActivities" class="containerList recentActivityList" data-last-event-time="{@$lastEventTime}" data-last-event-id="{if $__lastEvent}{@$__lastEvent->eventID}{else}0{/if}">
                {include file='recentActivityListItem'}
        </ul>
 </div>
index 29222c493305d7a67a194da867a47af805183b1b..101bfbc0849fa41a09d683701c50cb581467a49f 100755 (executable)
@@ -5200,6 +5200,7 @@ WCF.Effect.BalloonTooltip = Class.extend({
         * @param       object          event
         */
        _mouseEnterHandler: function(event) {
+               var $top, $left;
                var $element = $(event.currentTarget);
                
                var $title = $element.attr('title');
@@ -5251,28 +5252,28 @@ WCF.Effect.BalloonTooltip = Class.extend({
                
                // calculate top offset
                if ($elementOffsets.top + $elementDimensions.height + $tooltipDimensions.height - $(document).scrollTop() < $(window).height()) {
-                       var $top = $elementOffsets.top + $elementDimensions.height + 7;
+                       $top = $elementOffsets.top + $elementDimensions.height + 7;
                        this._tooltip.removeClass('inverse');
                        $arrow.css('top', -5);
                }
                else {
-                       var $top = $elementOffsets.top - $tooltipDimensions.height - 7;
+                       $top = $elementOffsets.top - $tooltipDimensions.height - 7;
                        this._tooltip.addClass('inverse');
                        $arrow.css('top', $tooltipDimensions.height);
                }
                
-               $property = (WCF.Language.get('wcf.global.pageDirection') == 'rtl' ? 'right' : 'left');
+               var $property = (WCF.Language.get('wcf.global.pageDirection') == 'rtl' ? 'right' : 'left');
                
                // calculate left offset
                switch ($alignment) {
                        case 'center':
-                               var $left = Math.round($elementOffsets.left - $tooltipHalfWidth + ($elementDimensions.width / 2));
+                               $left = Math.round($elementOffsets.left - $tooltipHalfWidth + ($elementDimensions.width / 2));
                                
                                $arrow.css($property, ($tooltipDimensionsInner.width / 2 - $arrowWidth / 2) + 'px');
                        break;
                        
                        case 'left':
-                               var $left = $elementOffsets.left;
+                               $left = $elementOffsets.left;
                                
                                if ($property === 'right') {
                                        $arrow.css($property, ($tooltipDimensionsInner.width - $arrowWidth - 5) + 'px');
@@ -5283,7 +5284,7 @@ WCF.Effect.BalloonTooltip = Class.extend({
                        break;
                        
                        case 'right':
-                               var $left = $elementOffsets.left + $elementDimensions.width - $tooltipDimensions.width;
+                               $left = $elementOffsets.left + $elementDimensions.width - $tooltipDimensions.width;
                                
                                if ($property === 'right') {
                                        $arrow.css($property, '5px');