#21005 closed defect (bug) (fixed)
Mobile postboxes don't respect global or user preferences
Reported by: | tbuteler | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
I noticed there's a function in postbox.dev.js, on line 159, called _pb_change. It adjusts the number of columns on a page with metaboxes according to a mobile device's orientation. But since everything is hardcoded for 1 or 2 columns, all the work that went into allowing different number of columns for the user to choose, or even filtering those options via PHP and limiting their choice (I'm forcing 1 columns for all users, for instance), seems lost.
Maybe I'm missing something, but it seems pretty straightforward, even for my limited JS knowledge.
Attachments (1)
Change History (10)
#4
@
12 years ago
- Keywords reporter-feedback removed
The patch fixes the bug, yes. Looking up the selected checkbox is a very clever solution...
#5
@
12 years ago
- Milestone changed from Awaiting Review to 3.5
- Version changed from 3.4 to 3.3
This code was in 3.3 ([18926]) so setting version, and assigning to 3.5. Good to go, azaozz.
#6
@
12 years ago
Clever, but not clever enough :) It needs to check the first radio button, not the second. If the user has selected 3 or 4 columns, it should switch to two when going to landscape.
#8
follow-up:
↓ 9
@
12 years ago
If the user has selected 3 or 4 columns, it should switch to two when going to landscape.
Do you mean it should *not* switch to two when going to landscape?
#9
in reply to:
↑ 8
@
12 years ago
Replying to nacin:
Do you mean it should *not* switch to two when going to landscape?
Ugh, sry for not being clear. It wasn't switching to two with the above patch, fixed in the committed one.
The problem was that the JS used to switch one to two columns when rotating a mobile device wasn't looking at the user setting, i.e. was switching to two columns even when only one column was selected. The first patch was testing the wrong radio button, resulting in not switching when 3 or 4 columns were selected too.
If I understand correctly the bug is that _pb_change() overrides your forcing of only one column of postboxes? Not sure what that has to do with reducing the number of available columns on narrower screens, the postboxes overlap and make the screen look pretty bad.