Skip to content

Commit 0cc40d7

Browse files
committed
Dialog: Removed deprecated position handling. Fixes #8825 - Dialog: Remove array and string notations for position option.
1 parent 4484c52 commit 0cc40d7

File tree

6 files changed

+1
-183
lines changed

6 files changed

+1
-183
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ grunt.initConfig({
318318
files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
319319
// disabling everything that doesn't (quite) work with PhantomJS for now
320320
// TODO except for all|index|test, try to include more as we go
321-
return !( /(all|index|test|dialog|dialog_deprecated|tabs|tooltip)\.html$/ ).test( file );
321+
return !( /(all|index|test|dialog|tabs|tooltip)\.html$/ ).test( file );
322322
})
323323
},
324324
jshint: {

build/tasks/testswarm.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var versions = {
1616
"Core": "core/core.html",
1717
"Datepicker": "datepicker/datepicker.html",
1818
"Dialog": "dialog/dialog.html",
19-
"Dialog_deprecated": "dialog/dialog_deprecated.html",
2019
"Draggable": "draggable/draggable.html",
2120
"Droppable": "droppable/droppable.html",
2221
"Effects": "effects/effects.html",

tests/unit/all.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"core/core.html",
2323
"datepicker/datepicker.html",
2424
"dialog/dialog.html",
25-
"dialog/dialog_deprecated.html",
2625
"draggable/draggable.html",
2726
"droppable/droppable.html",
2827
"effects/effects.html",

tests/unit/dialog/dialog_deprecated.html

Lines changed: 0 additions & 67 deletions
This file was deleted.

tests/unit/dialog/dialog_deprecated.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

ui/jquery.ui.dialog.js

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -755,54 +755,4 @@ $.widget( "ui.dialog", {
755755

756756
$.ui.dialog.overlayInstances = 0;
757757

758-
// DEPRECATED
759-
if ( $.uiBackCompat !== false ) {
760-
// position option with array notation
761-
// just override with old implementation
762-
$.widget( "ui.dialog", $.ui.dialog, {
763-
_position: function() {
764-
var position = this.options.position,
765-
myAt = [],
766-
offset = [ 0, 0 ],
767-
isVisible;
768-
769-
if ( position ) {
770-
if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
771-
myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
772-
if ( myAt.length === 1 ) {
773-
myAt[1] = myAt[0];
774-
}
775-
776-
$.each( [ "left", "top" ], function( i, offsetPosition ) {
777-
if ( +myAt[ i ] === myAt[ i ] ) {
778-
offset[ i ] = myAt[ i ];
779-
myAt[ i ] = offsetPosition;
780-
}
781-
});
782-
783-
position = {
784-
my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
785-
myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
786-
at: myAt.join(" ")
787-
};
788-
}
789-
790-
position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
791-
} else {
792-
position = $.ui.dialog.prototype.options.position;
793-
}
794-
795-
// need to show the dialog to get the actual offset in the position plugin
796-
isVisible = this.uiDialog.is(":visible");
797-
if ( !isVisible ) {
798-
this.uiDialog.show();
799-
}
800-
this.uiDialog.position( position );
801-
if ( !isVisible ) {
802-
this.uiDialog.hide();
803-
}
804-
}
805-
});
806-
}
807-
808758
}( jQuery ) );

0 commit comments

Comments
 (0)