Make WordPress Core

Changeset 24646


Ignore:
Timestamp:
07/10/2013 07:17:01 PM (9 years ago)
Author:
markjaquith
Message:

Revisions: fixes for routing and initial setting of compareTwoMode

  • Fix routing handler logic (compareTwoMode was reversed).
  • Fix routing handler typo (both should use the same handler).
  • Set compareTwoMode to false, to start. props duck_.

See #24425.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/revisions.js

    r24638 r24646  
    249249            properties.to = this.revisions.get( revisions.settings.selectedRevision );
    250250            properties.from = this.revisions.prev( properties.to );
     251            properties.compareTwoMode = false;
    251252            this.set( properties );
    252253
     
    895896        routes: {
    896897            'from/:from/to/:to': 'handleRoute',
    897             'at/:to': 'routeSingle'
     898            'at/:to': 'handleRoute'
    898899        },
    899900
     
    910911            var from, to, compareTwo;
    911912
    912             // If `b` is undefined, this was a 'revision/:to' route
     913            // If `b` is undefined, this is an 'at/:to' route, for a single revision
    913914            if ( _.isUndefined( b ) ) {
    914915                b = a;
    915916                a = 0;
     917                compareTwo = false;
     918            } else {
    916919                compareTwo = true;
    917             } else {
    918                 compareTwo = false;
    919920            }
    920921
Note: See TracChangeset for help on using the changeset viewer.