Make WordPress Core

Changeset 26838


Ignore:
Timestamp:
12/09/2013 07:37:36 PM (13 years ago)
Author:
azaozz
Message:

Themes: fix overlays and buttons in responsive mode, props matveb, fixes #26481.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/wp-admin.css

    r26836 r26838  
    71957195                padding: 5px 10px 4px 10px;
    71967196        }
     7197
    71977198        .theme-overlay.small-screenshot .theme-screenshots {
    71987199                position: static;
    … …  
    72007201                max-width: 302px;
    72017202        }
     7203
    72027204        .theme-overlay.small-screenshot .theme-info {
    72037205                margin-left: 0;
    72047206                width: auto;
     7207        }
     7208
     7209        .theme:not(.active):hover .theme-actions,
     7210        .theme:hover .more-details {
     7211                display: none;
     7212        }
     7213
     7214        .theme-browser.rendered .theme:hover .theme-screenshot img {
     7215                opacity: 1.0;
    72057216        }
    72067217}
  • trunk/src/wp-admin/js/theme.js

    r26827 r26838  
    188188
    189189        events: {
    190                 'click': 'expand'
    191         },
     190                'click': 'expand',
     191                'touchend': 'expand',
     192                'touchmove': 'preventExpand'
     193        },
     194
     195        touchDrag: false,
    192196
    193197        render: function() {
    … …  
    216220                var self = this;
    217221
     222                // Bail if the user scrolled on a touch device
     223                if ( this.touchDrag === true ) {
     224                        return this.touchDrag = false;
     225                }
     226
    218227                event = event || window.event;
    219228
    … …  
    225234
    226235                this.trigger( 'theme:expand', self.model.cid );
     236        },
     237
     238        preventExpand: function() {
     239                this.touchDrag = true;
    227240        }
    228241});
Note: See TracChangeset for help on using the changeset viewer.