Ignore:
Timestamp:
2012-10-04T15:19:19+13:00 (12 years ago)
Author:
sjm84
Message:

Arrows will not be shown in the slideshow view if there is no image to go to

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r26226 r26282  
    13711371    var _navDiv = $("<div>", {style:"height:2em;"});
    13721372    var _nextButton = $("<img>", {src:gs.imageURLs.next, style:"float:right; cursor:pointer;"});
    1373     var _prevButton = $("<img>", {src:gs.imageURLs.prev, style:"float:left; cursor:pointer;"});
     1373    var _prevButton = $("<img>", {src:gs.imageURLs.prev, style:"float:left; cursor:pointer; display:none;"});
    13741374    var _clearDiv = $("<div>", {style:"clear:both;"});
    13751375    var _currentIndex = 0;
     
    13861386    }
    13871387   
     1388    if(_images.length < 2)
     1389    {
     1390        _nextButton.css("display", "none");
     1391    }
     1392   
    13881393    _imageDiv.append(_images[0]);
    13891394   
     
    13951400            if((_currentIndex + 1) < _images.length)
    13961401            {
     1402                _prevButton.css("display", "");
     1403                if(_currentIndex + 1 == _images.length - 1)
     1404                {
     1405                    _nextButton.css("display", "none");
     1406                }
     1407           
    13971408                _imageDiv.fadeOut(1000, function()
    13981409                {
     
    14201431            if((_currentIndex - 1) >= 0)
    14211432            {
     1433                _nextButton.css("display", "");
     1434                if(_currentIndex - 1 == 0)
     1435                {
     1436                    _prevButton.css("display", "none");
     1437                }
     1438           
    14221439                _imageDiv.fadeOut(1000, function()
    14231440                {
Note: See TracChangeset for help on using the changeset viewer.