Make WordPress Core

Changeset 27510


Ignore:
Timestamp:
03/12/2014 03:06:11 AM (13 years ago)
Author:
azaozz
Message:

wpLink: bring back the Cancel link, improve responsive styles, see #26952

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r27494 r27510  
    10921092                                <input type="submit" value="<?php esc_attr_e( 'Add Link' ); ?>" class="button-primary" id="wp-link-submit" name="wp-link-submit">
    10931093                        </div>
     1094                        <div id="wp-link-cancel">
     1095                                <a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
     1096                        </div>
    10941097                </div>
    10951098                </form>
  • trunk/src/wp-includes/css/editor.css

    r27496 r27510  
    11541154}
    11551155
    1156 #wp-link-cancel { 
    1157         line-height: 25px; 
     1156#wp-link-cancel {
     1157        line-height: 25px;
    11581158}
    11591159
     
    11681168}
    11691169
    1170 @media screen and ( max-width: 782px ), ( max-height: 520px ) {
    1171 
    1172         #wp-link-wrap,
    1173         #wp-link-wrap.search-panel-visible {
     1170@media screen and ( max-width: 782px ) {
     1171        #wp-link-wrap {
     1172                height: 270px;
     1173                margin-top: -135px;
     1174        }
     1175
     1176        #wp-link-wrap.search-panel-visible .query-results {
     1177                top: 235px;
     1178        }
     1179}
     1180
     1181@media screen and ( max-width: 620px ) {
     1182        #wp-link-wrap {
    11741183                width: auto;
    1175                 height: auto;
    1176                 margin: 0;
    1177                 top: 10px;
     1184                margin-left: 0;
    11781185                left: 10px;
    11791186                right: 10px;
     1187                max-width: 600px;
     1188        }
     1189}
     1190
     1191@media screen and ( max-height: 520px ) {
     1192        #wp-link-wrap.search-panel-visible {
     1193                height: auto;
     1194                margin-top: 0;
     1195                top: 10px;
    11801196                bottom: 10px;
    1181                 max-width: 600px;
    1182                 margin: auto;
     1197        }
     1198
     1199        .search-panel-visible #link-selector {
     1200                overflow: auto;
     1201        }
     1202
     1203        .search-panel-visible #search-panel .query-results {
     1204                position: static;
     1205        }
     1206}
     1207
     1208@media screen and ( max-height: 290px ) {
     1209        #wp-link-wrap {
     1210                height: auto;
     1211                margin-top: 0;
     1212                top: 10px;
     1213                bottom: 10px;
    11831214        }
    11841215
    11851216        #link-selector {
    11861217                overflow: auto;
    1187                 height: calc(100% - 88px);
    1188                 padding-bottom: 0;
    1189         }
    1190 
    1191         #wp-link #search-panel {
    1192                 display: block;
    1193         }
    1194 
    1195         #wp-link-search-toggle {
    1196                 display: none;
     1218                height: calc(100% - 92px);
     1219                padding-bottom: 10px;
    11971220        }
    11981221
     
    12001223                position: static;
    12011224        }
    1202 
    12031225}
    12041226
  • trunk/src/wp-includes/js/wplink.js

    r27494 r27510  
    3939                                wpLink.update();
    4040                        });
    41                         inputs.close.add( inputs.backdrop ).click( function( event ) {
     41                        inputs.close.add( inputs.backdrop ).add( '#wp-link-cancel a' ).click( function( event ) {
    4242                                event.preventDefault();
    4343                                wpLink.close();
Note: See TracChangeset for help on using the changeset viewer.