Ticket #2857: ui.dialog.js.patch
| File ui.dialog.js.patch, 2.2 kB (added by tyler, 5 months ago) |
|---|
-
ui.dialog.js
177 177 }, 178 178 179 179 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; 181 181 if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) { 182 182 pos = [pos == 'right' || pos == 'left' ? pos : 'center', pos == 'top' || pos == 'bottom' ? pos : 'middle']; 183 183 } … … 200 200 } 201 201 } 202 202 if (pos[1].constructor == Number) { 203 top += pos[1];203 wtop += pos[1]; 204 204 } else { 205 205 switch (pos[1]) { 206 206 case 'top': 207 top += 0;207 wtop += 0; 208 208 break; 209 209 case 'bottom': 210 top += (wnd.height()) - (this.uiDialog.height());210 wtop += (wnd.height()) - (this.uiDialog.height()); 211 211 break; 212 212 case 'middle': 213 213 default: 214 top += (wnd.height() / 2) - (this.uiDialog.height() / 2);214 wtop += (wnd.height() / 2) - (this.uiDialog.height() / 2); 215 215 } 216 216 } 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}); 219 219 }, 220 220 221 221 open: function() {
