Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26088 closed defect (bug) (fixed)

Fix the JS structure of sticky menu

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 3.8 Priority: low
Severity: trivial Version: 3.8
Component: Administration Keywords: has-patch
Focuses: ui Cc:

Description

stickyMenu (in common.js) seems to be suffering from scope problems, nearly all lines start with this. There are better JS structures that can be used for it, for example a simple revealing pattern would work nicely.

Attachments (1)

26088.diff (3.1 KB) - added by sanchothefat 11 years ago.
Updated script using module revealing pattern

Download all attachments as: .zip

Change History (5)

@sanchothefat
11 years ago

Updated script using module revealing pattern

#1 @sanchothefat
11 years ago

Should this ticket be extended to include moby6 which is written in the same way in common.js?

#2 @sanchothefat
11 years ago

  • Keywords has-patch added

#3 @matt
11 years ago

  • Priority changed from normal to low
  • Severity changed from normal to trivial

#4 @azaozz
11 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 26402:

Clean up the sticky menu and responsive tweaks JS:

  • More descriptive names.
  • Share cached jQuery elements.
  • Fix re-enabling of touch events on the admin menu.
  • Fix disabling/enabling of UI Sortable.

Props tollmanz, props sanchothefat, see #26086, fixes #26088.

Note: See TracTickets for help on using tickets.