Bug Tracker

Ticket #2857: ui.dialog.js.patch

File ui.dialog.js.patch, 2.2 kB (added by tyler, 5 months ago)

this one's for real

  • ui.dialog.js

     
    177177               }, 
    178178 
    179179               position: function(pos) { 
    180                        var wnd = $(window), doc = $(document), top = doc.scrollTop(), left = doc.scrollLeft(), minTop = top; 
     180                       var wnd = $(window), doc = $(document), wtop = doc.scrollTop(), left = doc.scrollLeft(), minTop = top; 
    181181                       if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) { 
    182182                               pos = [pos == 'right' || pos == 'left' ? pos : 'center', pos == 'top' || pos == 'bottom' ? pos : 'middle']; 
    183183                       } 
     
    200200                               } 
    201201                       } 
    202202                       if (pos[1].constructor == Number) { 
    203                                top += pos[1]; 
     203                               wtop += pos[1]; 
    204204                       } else { 
    205205                               switch (pos[1]) { 
    206206                                       case 'top': 
    207                                                top += 0; 
     207                                               wtop += 0; 
    208208                                               break; 
    209209                                       case 'bottom': 
    210                                                top += (wnd.height()) - (this.uiDialog.height()); 
     210                                               wtop += (wnd.height()) - (this.uiDialog.height()); 
    211211                                               break; 
    212212                                       case 'middle': 
    213213                                       default: 
    214                                                top += (wnd.height() / 2) - (this.uiDialog.height() / 2); 
     214                                               wtop += (wnd.height() / 2) - (this.uiDialog.height() / 2); 
    215215                               } 
    216216                       } 
    217                        top = top < minTop ? minTop : top; 
    218                        this.uiDialog.css({top: top, left: left}); 
     217                       wtop = wtop < minTop ? minTop : wtop; 
     218                       this.uiDialog.css({top: wtop, left: left}); 
    219219               }, 
    220220 
    221221               open: function() {