Respect user settings when auto-switching postbox columns on mobile devices, fixes #21005

git-svn-id: http://core.svn.wordpress.org/trunk@21091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2012-06-20 05:03:08 +00:00
parent 5f973a17e2
commit 77cb52144e

View File

@ -157,17 +157,22 @@ var postboxes;
},
_pb_change : function() {
var check = $( 'label.columns-prefs-1 input[type="radio"]' );
switch ( window.orientation ) {
case 90:
case -90:
this._pb_edit(2);
if ( !check.length || !check.is(':checked') )
this._pb_edit(2);
break;
case 0:
case 180:
if ( $('#poststuff').length )
if ( $('#poststuff').length ) {
this._pb_edit(1);
else
this._pb_edit(2);
} else {
if ( !check.length || !check.is(':checked') )
this._pb_edit(2);
}
break;
}
},