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

git-svn-id: https://develop.svn.wordpress.org/trunk@21091 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2012-06-20 05:03:08 +00:00
parent ed33e36b0c
commit 033c65820a
1 changed files with 9 additions and 4 deletions

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;
}
},