mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +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() {
|
_pb_change : function() {
|
||||||
|
var check = $( 'label.columns-prefs-1 input[type="radio"]' );
|
||||||
|
|
||||||
switch ( window.orientation ) {
|
switch ( window.orientation ) {
|
||||||
case 90:
|
case 90:
|
||||||
case -90:
|
case -90:
|
||||||
|
if ( !check.length || !check.is(':checked') )
|
||||||
this._pb_edit(2);
|
this._pb_edit(2);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
case 180:
|
case 180:
|
||||||
if ( $('#poststuff').length )
|
if ( $('#poststuff').length ) {
|
||||||
this._pb_edit(1);
|
this._pb_edit(1);
|
||||||
else
|
} else {
|
||||||
|
if ( !check.length || !check.is(':checked') )
|
||||||
this._pb_edit(2);
|
this._pb_edit(2);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user