mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
5f973a17e2
commit
77cb52144e
@ -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;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user