To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Show
Ignore:
Timestamp:
09/09/10 12:11:21 (21 months ago)
Author:
tboutell
Message:

John and I found and fixed the following bug:

* If you save a singleton slot that has never been saved before, and variants exist, the Options menu does not appear until you refresh the page

There is special-case code to update the Options menu when a slot gets saved, however that code did not account for the fact that singleton slot controls are hauled up one level to their area wrapper.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/modules/a/templates/_slot.php

    r2152 r2164  
    134134          <?php // It's OK to show the variants menu once we've saved something ?> 
    135135          <?php if (!$slot->isNew()): ?> 
    136             outerWrapper.find('.a-controls li.variant').show(); 
     136            var singletonArea = outerWrapper.closest('.singleton'); 
     137            if (singletonArea.length) 
     138            { 
     139              singletonArea.find('.a-controls li.variant').show(); 
     140            } 
     141            else 
     142            { 
     143              outerWrapper.find('.a-controls li.variant').show(); 
     144            } 
    137145          <?php endif ?> 
    138146        <?php endforeach ?>