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

Changeset 2157

Show
Ignore:
Timestamp:
09/08/10 16:30:57 (17 months ago)
Author:
johnnyoffline
Message:

Fixed a scoping issue with the move arrows and their parent containers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/web/js/a.js

    r2152 r2157  
    495495                        // TODO: with a little more finesse we could support saving it with 
    496496                        // a rank, but think about how messy that might get 
    497                   slots.find('.a-arrow-up,.a-arrow-down').hide(); 
     497                  slots.find('.a-slot-controls .a-move').hide(); 
    498498                        return; 
    499499                } 
     
    529529        function slotUpdateMoveButtons(id, name, slot, n, slots, updateAction) 
    530530        { 
     531                var up = $(slot).find('.a-arrow-up'); 
     532                var down = $(slot).find('.a-arrow-down'); 
     533                                         
    531534                if (n > 0) 
    532535                { 
    533536                        // TODO: this is not sensitive enough to nested areas 
    534                         $(slot).find('.a-arrow-up').show().unbind('click').click(function() { 
     537                        up.parent().show(); 
     538                        up.unbind('click').click(function() { 
    535539                                // It would be nice to confirm success here in some way 
    536540                                $.get(updateAction, { id: id, name: name, permid: $(slot).data('a-permid'), up: 1 }); 
     
    542546                else 
    543547                { 
    544                   $(slot).find('.a-arrow-up').hide(); 
     548                  up.parent().hide(); 
    545549                } 
    546550                if (n < (slots.length - 1)) 
    547551                { 
    548                         $(slot).find('.a-arrow-down').show().unbind('click').click(function() { 
     552 
     553                        down.parent().show(); 
     554                        down.unbind('click').click(function() { 
    549555                                // It would be nice to confirm success here in some way 
    550556                                $.get(updateAction, { id: id, name: name, permid: $(slot).data('a-permid'), up: 0 }); 
     
    556562                else 
    557563                { 
    558                         $(slot).find('.a-arrow-down').hide(); 
    559                 } 
    560         } 
     564                        down.parent().hide(); 
     565                } 
     566        }sv 
    561567         
    562568        function slotShowEditViewPreloaded(pageid, name, permid)