Changeset 27494
- Timestamp:
- 03/11/2014 12:03:54 AM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-editor.php
r27447 r27494 493 493 if ( in_array('wplink', self::$plugins, true) || in_array('link', self::$qt_buttons, true) ) { 494 494 wp_enqueue_script('wplink'); 495 wp_enqueue_script('wpdialogs');496 wp_enqueue_style('wp-jquery-ui-dialog');497 495 } 498 496 … … 1042 1040 */ 1043 1041 public static function wp_link_dialog() { 1044 ?> 1045 <div style="display:none;"> 1046 <form id="wp-link" tabindex="-1"> 1047 <?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?> 1048 <div id="link-selector"> 1049 <div id="link-options"> 1050 <p class="howto"><?php _e( 'Enter the destination URL' ); ?></p> 1051 <div> 1052 <label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" name="href" /></label> 1053 </div> 1054 <div> 1055 <label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" name="linktitle" /></label> 1056 </div> 1057 <div class="link-target"> 1058 <label><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label> 1059 </div> 1060 </div> 1061 <?php $show_internal = '1' == get_user_setting( 'wplink', '0' ); ?> 1062 <p class="howto toggle-arrow <?php if ( $show_internal ) echo 'toggle-arrow-active'; ?>" id="internal-toggle"><?php _e( 'Or link to existing content' ); ?></p> 1063 <div id="search-panel"<?php if ( ! $show_internal ) echo ' style="display:none"'; ?>> 1064 <div class="link-search-wrapper"> 1065 <label> 1066 <span class="search-label"><?php _e( 'Search' ); ?></span> 1067 <input type="search" id="search-field" class="link-search-field" autocomplete="off" /> 1068 <span class="spinner"></span> 1069 </label> 1070 </div> 1071 <div id="search-results" class="query-results"> 1072 <ul></ul> 1073 <div class="river-waiting"> 1074 <span class="spinner"></span> 1042 $search_panel_visible = '1' == get_user_setting( 'wplink', '0' ) ? ' class="search-panel-visible"' : ''; 1043 1044 ?> 1045 <div id="wp-link-backdrop"></div> 1046 <div id="wp-link-wrap"<?php echo $search_panel_visible; ?>> 1047 <form id="wp-link" tabindex="-1"> 1048 <?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?> 1049 <div id="link-modal-title"> 1050 <?php _e( 'Insert/edit link' ) ?> 1051 <div id="wp-link-close" tabindex="0"></div> 1052 </div> 1053 <div id="link-selector"> 1054 <div id="link-options"> 1055 <p class="howto"><?php _e( 'Enter the destination URL' ); ?></p> 1056 <div> 1057 <label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" name="href" /></label> 1058 </div> 1059 <div> 1060 <label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" name="linktitle" /></label> 1061 </div> 1062 <div class="link-target"> 1063 <label><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label> 1075 1064 </div> 1076 1065 </div> 1077 <div id="most-recent-results" class="query-results"> 1078 <div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.' ); ?></em></div> 1079 <ul></ul> 1080 <div class="river-waiting"> 1081 <span class="spinner"></span> 1066 <p class="howto" id="wp-link-search-toggle"><?php _e( 'Or link to existing content' ); ?></p> 1067 <div id="search-panel"> 1068 <div class="link-search-wrapper"> 1069 <label> 1070 <span class="search-label"><?php _e( 'Search' ); ?></span> 1071 <input type="search" id="search-field" class="link-search-field" autocomplete="off" /> 1072 <span class="spinner"></span> 1073 </label> 1074 </div> 1075 <div id="search-results" class="query-results"> 1076 <ul></ul> 1077 <div class="river-waiting"> 1078 <span class="spinner"></span> 1079 </div> 1080 </div> 1081 <div id="most-recent-results" class="query-results"> 1082 <div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.' ); ?></em></div> 1083 <ul></ul> 1084 <div class="river-waiting"> 1085 <span class="spinner"></span> 1086 </div> 1082 1087 </div> 1083 1088 </div> 1084 1089 </div> 1085 </div>1086 <div class="submitbox">1087 <div id="wp-link-update">1088 < input type="submit" value="<?php esc_attr_e( 'Add Link' ); ?>" class="button-primary" id="wp-link-submit" name="wp-link-submit">1090 <div class="submitbox"> 1091 <div id="wp-link-update"> 1092 <input type="submit" value="<?php esc_attr_e( 'Add Link' ); ?>" class="button-primary" id="wp-link-submit" name="wp-link-submit"> 1093 </div> 1089 1094 </div> 1090 <div id="wp-link-cancel"> 1091 <a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a> 1095 </form> 1092 1096 </div> 1093 </div> 1094 </form> 1095 </div> 1096 <?php 1097 <?php 1097 1098 } 1098 1099 } -
trunk/src/wp-includes/css/buttons.css
r27282 r27494 1 1 /* ---------------------------------------------------------------------------- 2 2 3 NOTE: If you edit this file, you should make sure that the CSS rules for 4 buttons in the following files are updated. 5 6 * jquery-ui-dialog.css 7 * editor.css 3 8 4 9 WordPress-style Buttons -
trunk/src/wp-includes/css/editor.css
r27460 r27494 314 314 color: #fff; 315 315 text-shadow: none; 316 padding: 0; 317 line-height: 26px; 316 318 } 317 319 … … 336 338 } 337 339 340 /* Remove the dotted border on :focus and the extra padding in Firefox */ 341 .mce-window .mce-btn::-moz-focus-inner { 342 border-width: 1px 0; 343 border-style: solid none; 344 border-color: transparent; 345 padding: 0; 346 } 347 338 348 .mce-window .mce-btn:hover { 339 349 background: #fafafa; … … 367 377 background: #2ea2cc; 368 378 border-color: #0074a2; 369 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); 370 box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); 371 color: #fff; 379 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); 380 box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15); 381 color: #fff; 382 text-decoration: none; 372 383 } 373 384 … … 375 386 background: #1e8cbe; 376 387 border-color: #0074a2; 377 378 388 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); 389 box-shadow: inset 0 1px 0 rgba(120,200,230,0.6); 379 390 color: #fff; 380 391 } … … 390 401 border-color: #005684; 391 402 color: rgba(255,255,255,0.95); 392 393 403 -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); 404 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); 394 405 } 395 406 … … 399 410 border-color: #1b607f; 400 411 text-shadow: 0 -1px 0 rgba(0,0,0,0.1); 412 } 413 414 @media screen and ( max-width: 782px ) { 415 .mce-window .mce-btn { 416 padding: 10px 14px; 417 line-height: 1; 418 font-size: 14px; 419 vertical-align: middle; 420 height: auto; 421 margin-bottom: 4px; 422 } 401 423 } 402 424 … … 865 887 ------------------------------------------------------------------------------*/ 866 888 889 #wp-link-wrap { 890 display: none; 891 background-color: #fff; 892 width: 600px; 893 overflow: hidden; 894 margin-left: -300px; 895 position: fixed; 896 top: 30px; 897 left: 50%; 898 z-index: 100105; 899 } 900 901 #wp-link-backdrop { 902 display: none; 903 position: fixed; 904 top: 0; 905 left: 0; 906 right: 0; 907 bottom: 0; 908 min-height: 360px; 909 background: #000; 910 opacity: 0.7; 911 z-index: 100100; 912 } 913 867 914 #wp-link { 868 background-color: #F5F5F5; 869 line-height: 1.4em; 870 font-size: 12px; 915 position: relative; 916 height: 100%; 917 } 918 919 #wp-link-wrap.search-panel-visible { 920 bottom: 30px; 921 } 922 923 #link-modal-title { 924 background: #fcfcfc; 925 border-bottom: 1px solid #dfdfdf; 926 height: 42px; 927 font-size: 22px; 928 font-weight: 600; 929 line-height: 41px; 930 padding: 0 42px 0 16px; 931 top: 0; 932 right: 0; 933 left: 0; 934 } 935 936 #wp-link-close { 937 color: #666; 938 cursor: pointer; 939 padding: 0; 940 position: absolute; 941 top: 0; 942 right: 0; 943 width: 42px; 944 height: 42px; 945 text-align: center; 946 } 947 948 #wp-link-close:before { 949 font: normal 20px/42px 'dashicons'; 950 vertical-align: top; 951 speak: none; 952 -webkit-font-smoothing: antialiased; 953 -moz-osx-font-smoothing: grayscale; 954 width: 42px; 955 height: 42px; 956 content: '\f158'; 957 } 958 959 #wp-link-close:hover, 960 #wp-link-close:focus { 961 color: #2ea2cc; 962 } 963 964 #link-selector { 965 padding: 0 16px 52px; 966 } 967 968 #wp-link-wrap.search-panel-visible #link-selector { 969 padding: 0 16px; 970 position: absolute; 971 top: 42px; 972 left: 0; 973 right: 0; 974 bottom: 44px; 871 975 } 872 976 … … 878 982 } 879 983 984 #wp-link-search-toggle::after { 985 font: normal 20px/1 'dashicons'; 986 vertical-align: top; 987 speak: none; 988 -webkit-font-smoothing: antialiased; 989 -moz-osx-font-smoothing: grayscale; 990 content: '\f140'; 991 } 992 993 .search-panel-visible #wp-link-search-toggle::after { 994 content: '\f142'; 995 } 996 880 997 #wp-link input[type="text"] { 881 998 -webkit-box-sizing: border-box; … … 884 1001 } 885 1002 886 #wp-link input[type="text"],887 #wp-link textarea {888 border-width: 1px;889 border-style: solid;890 -webkit-border-radius: 4px;891 border-radius: 4px;892 font-size: 12px;893 margin: 1px;894 padding: 3px;895 }896 897 1003 #wp-link #link-options { 898 1004 padding: 10px 0 14px; 899 border-bottom: 1px solid #dfdfdf;900 margin: 0 6px 14px;901 1005 } 902 1006 903 1007 #wp-link p.howto { 904 margin: 3px; 905 } 906 907 #wp-link #internal-toggle { 908 display: inline-block; 1008 margin: 3px 0; 1009 } 1010 1011 #wp-link-search-toggle { 909 1012 cursor: pointer; 910 padding-left: 18px;911 }912 913 #wp-link .toggle-arrow {914 background: transparent url(../images/toggle-arrow.png) top left no-repeat;915 height: 23px;916 line-height: 23px;917 }918 919 #wp-link .toggle-arrow-active {920 background-position: center left;921 1013 } 922 1014 923 1015 #wp-link label input[type="text"] { 924 width: 360px;1016 width: 400px; 925 1017 margin-top: 5px; 1018 max-width: 70%; 926 1019 } 927 1020 … … 932 1025 text-align: right; 933 1026 padding-right: 5px; 1027 max-width: 24%; 934 1028 } 935 1029 936 1030 #wp-link .link-search-field { 937 1031 float: left; 938 width: 220px; 1032 width: 250px; 1033 max-width: 70%; 939 1034 } 940 1035 941 1036 #wp-link .link-search-wrapper { 942 margin: 5px 6px9px;1037 margin: 5px 0 9px; 943 1038 display: block; 944 1039 overflow: hidden; … … 959 1054 padding: 3px 0 0; 960 1055 margin: 0 0 0 87px; 961 font-size: 11px;962 1056 } 963 1057 964 1058 #wp-link .query-results { 965 1059 border: 1px #dfdfdf solid; 966 margin: 0 5px 5px;1060 margin: 0; 967 1061 background: #fff; 968 height: 185px;969 1062 overflow: auto; 970 position: relative; 1063 position: absolute; 1064 left: 16px; 1065 right: 16px; 1066 bottom: 16px; 1067 top: 205px; 971 1068 } 972 1069 … … 1006 1103 } 1007 1104 1105 #wp-link li:last-child { 1106 border: none; 1107 } 1108 1008 1109 #wp-link .item-title { 1009 1110 display: inline-block; … … 1021 1122 } 1022 1123 1023 #wp-link #search-results { 1124 #wp-link #search-results, 1125 #wp-link #search-panel { 1024 1126 display: none; 1025 1127 } 1026 1128 1027 #wp-link #search-panel { 1028 float: left; 1029 width: 100%; 1129 #wp-link-wrap.search-panel-visible #search-panel { 1130 display: block; 1030 1131 } 1031 1132 … … 1041 1142 1042 1143 #wp-link .submitbox { 1043 padding: 5px 10px; 1044 font-size: 11px; 1045 overflow: auto; 1046 height: 29px; 1047 } 1048 1049 #wp-link-cancel { 1050 line-height: 25px; 1051 float: left; 1144 padding: 8px 16px; 1145 background: #fcfcfc; 1146 border-top: 1px solid #dfdfdf; 1147 position: absolute; 1148 bottom: 0; 1149 left: 0; 1150 right: 0; 1052 1151 } 1053 1152 … … 1057 1156 } 1058 1157 1059 /*! 1060 * jQuery UI CSS Framework 1.10.1 1061 * http://jqueryui.com 1062 * 1063 * Copyright 2013 jQuery Foundation and other contributors 1064 * Released under the MIT license. 1065 * http://jquery.org/license 1066 * 1067 * http://docs.jquery.com/UI/Theming/API 1068 */ 1069 1070 /* Layout helpers 1071 ----------------------------------*/ 1072 .ui-helper-hidden { 1073 display: none; 1074 } 1075 .ui-helper-hidden-accessible { 1076 border: 0; 1077 clip: rect(0 0 0 0); 1078 height: 1px; 1079 margin: -1px; 1080 overflow: hidden; 1081 padding: 0; 1082 position: absolute; 1083 width: 1px; 1084 } 1085 .ui-helper-reset { 1086 margin: 0; 1087 padding: 0; 1088 border: 0; 1089 outline: 0; 1090 line-height: 1.3; 1091 text-decoration: none; 1092 font-size: 100%; 1093 list-style: none; 1094 } 1095 .ui-helper-clearfix:before, 1096 .ui-helper-clearfix:after { 1097 content: ""; 1098 display: table; 1099 border-collapse: collapse; 1100 } 1101 .ui-helper-clearfix:after { 1102 clear: both; 1103 } 1104 .ui-helper-clearfix { 1105 min-height: 0; /* support: IE7 */ 1106 } 1107 .ui-helper-zfix { 1108 width: 100%; 1109 height: 100%; 1110 top: 0; 1111 left: 0; 1112 position: absolute; 1113 opacity: 0; 1114 filter:Alpha(Opacity=0); 1115 } 1116 1117 .ui-front { 1118 z-index: 100; 1119 } 1120 1121 1122 /* Interaction Cues 1123 ----------------------------------*/ 1124 .ui-state-disabled { 1125 cursor: default !important; 1126 } 1127 1128 1129 /* Icons 1130 ----------------------------------*/ 1131 1132 /* states and images */ 1133 .ui-icon { 1134 display: block; 1135 text-indent: -99999px; 1136 overflow: hidden; 1137 background-repeat: no-repeat; 1138 } 1139 1140 1141 /* Misc visuals 1142 ----------------------------------*/ 1143 1144 /* Overlays */ 1145 .ui-widget-overlay { 1146 position: fixed; 1147 top: 0; 1148 left: 0; 1149 width: 100%; 1150 height: 100%; 1151 } 1152 1153 1154 /*! 1155 * jQuery UI Resizable 1.10.1 1156 * http://jqueryui.com 1157 * 1158 * Copyright 2013 jQuery Foundation and other contributors 1159 * Released under the MIT license. 1160 * http://jquery.org/license 1161 * 1162 * http://docs.jquery.com/UI/Resizable#theming 1163 */ 1164 .ui-resizable { 1165 position: relative; 1166 } 1167 .ui-resizable-handle { 1168 position: absolute; 1169 font-size: 0.1px; 1170 display: block; 1171 } 1172 .ui-resizable-disabled .ui-resizable-handle, 1173 .ui-resizable-autohide .ui-resizable-handle { 1174 display: none; 1175 } 1176 .ui-resizable-n { 1177 cursor: n-resize; 1178 height: 7px; 1179 width: 100%; 1180 top: -5px; 1181 left: 0; 1182 } 1183 .ui-resizable-s { 1184 cursor: s-resize; 1185 height: 7px; 1186 width: 100%; 1187 bottom: -5px; 1188 left: 0; 1189 } 1190 .ui-resizable-e { 1191 cursor: e-resize; 1192 width: 7px; 1193 right: -5px; 1194 top: 0; 1195 height: 100%; 1196 } 1197 .ui-resizable-w { 1198 cursor: w-resize; 1199 width: 7px; 1200 left: -5px; 1201 top: 0; 1202 height: 100%; 1203 } 1204 .ui-resizable-se { 1205 cursor: se-resize; 1206 width: 12px; 1207 height: 12px; 1208 right: 1px; 1209 bottom: 1px; 1210 } 1211 .ui-resizable-sw { 1212 cursor: sw-resize; 1213 width: 9px; 1214 height: 9px; 1215 left: -5px; 1216 bottom: -5px; 1217 } 1218 .ui-resizable-nw { 1219 cursor: nw-resize; 1220 width: 9px; 1221 height: 9px; 1222 left: -5px; 1223 top: -5px; 1224 } 1225 .ui-resizable-ne { 1226 cursor: ne-resize; 1227 width: 9px; 1228 height: 9px; 1229 right: -5px; 1230 top: -5px; 1231 } 1232 1233 /*! 1234 * jQuery UI Dialog 1.10.1 1235 * http://jqueryui.com 1236 * 1237 * Copyright 2013 jQuery Foundation and other contributors 1238 * Released under the MIT license. 1239 * http://jquery.org/license 1240 * 1241 * http://docs.jquery.com/UI/Dialog#theming 1242 */ 1243 .ui-dialog { 1244 position: absolute; 1245 top: 0; 1246 /* @noflip */ 1247 left: 0; 1248 padding: .2em; 1249 outline: 0; 1250 } 1251 .ui-dialog .ui-dialog-titlebar { 1252 padding: .4em 1em; 1253 position: relative; 1254 } 1255 .ui-dialog .ui-dialog-title { 1256 float: left; 1257 margin: .1em 0; 1258 white-space: nowrap; 1259 width: 90%; 1260 overflow: hidden; 1261 text-overflow: ellipsis; 1262 } 1263 .ui-dialog .ui-dialog-titlebar-close { 1264 position: absolute; 1265 right: .3em; 1266 top: 50%; 1267 width: 21px; 1268 margin: -10px 0 0 0; 1269 padding: 1px; 1270 height: 20px; 1271 } 1272 .ui-dialog .ui-dialog-content { 1273 position: relative; 1274 border: 0; 1275 padding: .5em 1em; 1276 background: none; 1277 overflow: auto; 1278 } 1279 .ui-dialog .ui-dialog-buttonpane { 1280 text-align: left; 1281 border-width: 1px 0 0 0; 1282 background-image: none; 1283 margin-top: .5em; 1284 padding: .3em 1em .5em .4em; 1285 } 1286 .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 1158 #wp-link-submit { 1287 1159 float: right; 1288 } 1289 .ui-dialog .ui-dialog-buttonpane button { 1290 margin: .5em .4em .5em 0; 1291 cursor: pointer; 1292 } 1293 .ui-dialog .ui-resizable-se { 1294 width: 12px; 1295 height: 12px; 1296 right: -5px; 1297 bottom: -5px; 1298 background-position: 16px 16px; 1299 } 1300 .ui-draggable .ui-dialog-titlebar { 1301 cursor: move; 1302 } 1303 1304 /* WP jQuery Dialog Theme */ 1305 .wp-dialog { 1306 padding: 0; 1307 z-index: 300002; 1308 border: 0; 1309 -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7); 1310 box-shadow: 0 5px 15px rgba(0,0,0,0.7); 1311 background-color: #f5f5f5; 1312 } 1313 1314 .wp-dialog .ui-dialog-title { 1315 display: block; 1316 text-align: center; 1317 padding: 0; 1318 } 1319 1320 .wp-dialog .ui-dialog-titlebar { 1321 padding: 0 1em; 1322 background-color: #444; 1323 font-size: 13px; 1324 line-height: 24px; 1325 color: #fff; 1326 } 1327 1328 .wp-dialog .ui-dialog-content { 1329 padding: 0; 1330 } 1331 1332 .wp-dialog .ui-dialog-titlebar-close { 1333 cursor: pointer; 1334 -webkit-appearance: none; 1335 border: 0; 1336 width: 30px; 1337 height: 20px; 1338 top: 13px; 1339 right: 6px; 1340 background: none; 1341 } 1342 1343 .wp-dialog .ui-dialog-titlebar-close:before { 1344 content: '\f158'; 1345 font: normal 20px/1 'dashicons'; 1346 speak: none; 1347 -webkit-font-smoothing: antialiased; 1348 -moz-osx-font-smoothing: grayscale; 1349 color: #999; 1350 padding-left: 12px; 1351 } 1352 1353 .wp-dialog .ui-dialog-titlebar-close:hover:before { 1354 color: #2ea2cc; 1355 } 1356 1357 .wp-dialog .ui-dialog-titlebar-close .ui-button-text { 1358 display: none; 1359 } 1360 1361 .wp-dialog .ui-dialog-titlebar-close:hover, 1362 .wp-dialog .ui-dialog-titlebar-close:focus { 1363 background-position: -87px -32px; 1364 } 1365 1366 .ui-widget-overlay { 1367 z-index: 300001; 1368 background-color: #000; 1369 opacity: 0.6; 1370 filter: alpha(opacity=60); 1371 } 1372 1373 /* TinyMCE modal */ 1374 /* TODO: restyle the TinyMCE 4.0 modals 1160 margin-bottom: 0; 1161 } 1162 1163 @media screen and ( max-width: 782px ), ( max-height: 440px ) { 1164 1165 #wp-link-wrap, 1166 #wp-link-wrap.search-panel-visible { 1167 width: auto; 1168 margin: 0; 1169 top: 10px; 1170 left: 10px; 1171 right: 10px; 1172 bottom: 10px; 1173 max-width: 600px; 1174 margin: auto; 1175 } 1176 1177 #link-selector { 1178 overflow: auto; 1179 height: calc(100% - 88px); 1180 padding-bottom: 0; 1181 } 1182 1183 #wp-link #search-panel { 1184 display: block; 1185 } 1186 1187 #wp-link-search-toggle { 1188 display: none; 1189 } 1190 1191 #search-panel .query-results { 1192 position: static; 1193 } 1194 1195 } 1196 1197 /* Old TinyMCE 3.x modal */ 1198 /* 1375 1199 .clearlooks2 .mceTop { 1376 1200 border-bottom: 1px solid #ccc; … … 1808 1632 } 1809 1633 1810 1811 1634 /* HiDPI */ 1812 1635 @media print, … … 1818 1641 background: none; 1819 1642 } 1820 1821 #wp-link .toggle-arrow {1822 background: transparent url(../images/toggle-arrow-2x.png) top left no-repeat;1823 -webkit-background-size: 19px 69px;1824 background-size: 19px 69px;1825 }1826 1643 } 1827 1644 1828 1645 /* TODO: DFW responsive */ 1829 1830 -
trunk/src/wp-includes/css/jquery-ui-dialog.css
r27460 r27494 57 57 } 58 58 59 .ui-front {60 z-index: 100;61 }62 63 64 59 /* Interaction Cues 65 60 ----------------------------------*/ … … 67 62 cursor: default !important; 68 63 } 69 70 64 71 65 /* Icons … … 79 73 background-repeat: no-repeat; 80 74 } 81 82 83 /* Misc visuals84 ----------------------------------*/85 86 /* Overlays */87 .ui-widget-overlay {88 position: fixed;89 top: 0;90 left: 0;91 width: 100%;92 height: 100%;93 }94 95 75 96 76 /*! … … 149 129 .ui-resizable-se { 150 130 cursor: se-resize; 151 width: 12px;152 height: 12px;153 right: 1px;154 bottom: 1px;131 width: 9px; 132 height: 9px; 133 right: -5px; 134 bottom: -5px; 155 135 } 156 136 /* @noflip */ … … 179 159 } 180 160 181 /*! 182 * jQuery UI Dialog 1.10.1 183 * http://jqueryui.com 184 * 185 * Copyright 2013 jQuery Foundation and other contributors 186 * Released under the MIT license. 187 * http://jquery.org/license 188 * 189 * http://docs.jquery.com/UI/Dialog#theming 190 */ 161 /* WP buttons: see buttons.css. */ 162 163 .ui-button { 164 display: inline-block; 165 text-decoration: none; 166 font-size: 13px; 167 line-height: 26px; 168 height: 28px; 169 margin: 0; 170 padding: 0 10px 1px; 171 cursor: pointer; 172 border-width: 1px; 173 border-style: solid; 174 -webkit-appearance: none; 175 -webkit-border-radius: 3px; 176 border-radius: 3px; 177 white-space: nowrap; 178 -webkit-box-sizing: border-box; 179 -moz-box-sizing: border-box; 180 box-sizing: border-box; 181 color: #555; 182 border-color: #cccccc; 183 background: #f7f7f7; 184 -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); 185 box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); 186 vertical-align: top; 187 } 188 189 /* Remove the dotted border on :focus and the extra padding in Firefox */ 190 .ui-button::-moz-focus-inner { 191 border-width: 1px 0; 192 border-style: solid none; 193 border-color: transparent; 194 padding: 0; 195 } 196 197 .ui-button:hover { 198 background: #fafafa; 199 border-color: #999; 200 color: #222; 201 } 202 203 .ui-button:focus { 204 -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); 205 box-shadow: 1px 1px 1px rgba(0,0,0,.2); 206 } 207 208 .ui-button:active { 209 background: #eee; 210 border-color: #999; 211 color: #333; 212 -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); 213 box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); 214 outline: none; 215 } 216 217 .ui-button[disabled], 218 .ui-button:disabled { 219 color: #aaa !important; 220 border-color: #ddd !important; 221 background: #f7f7f7 !important; 222 -webkit-box-shadow: none !important; 223 box-shadow: none !important; 224 text-shadow: 0 1px 0 #fff !important; 225 cursor: default; 226 } 227 228 @media screen and ( max-width: 782px ) { 229 230 .ui-button { 231 padding: 10px 14px; 232 line-height: 1; 233 font-size: 14px; 234 vertical-align: middle; 235 height: auto; 236 margin-bottom: 4px; 237 } 238 239 } 240 241 /* WP Theme */ 242 191 243 .ui-dialog { 192 244 position: absolute; 193 245 top: 0; 194 /* @noflip */ 195 left: 0; 196 padding: .2em; 197 outline: 0; 198 } 199 .ui-dialog .ui-dialog-titlebar { 200 padding: .4em 1em; 201 position: relative; 202 } 203 .ui-dialog .ui-dialog-title { 204 float: left; 205 margin: .1em 0; 206 white-space: nowrap; 207 width: 90%; 208 overflow: hidden; 209 text-overflow: ellipsis; 210 } 211 .ui-dialog .ui-dialog-titlebar-close { 212 position: absolute; 213 right: .3em; 214 top: 50%; 215 width: 21px; 216 margin: -10px 0 0 0; 217 padding: 1px; 218 height: 20px; 219 } 220 .ui-dialog .ui-dialog-content { 221 position: relative; 222 border: 0; 223 padding: .5em 1em; 246 left: 0; 247 z-index: 100102; 248 background-color: #fff; 249 } 250 251 .ui-dialog-titlebar { 252 background: #fcfcfc; 253 border-bottom: 1px solid #dfdfdf; 254 height: 56px; 255 font-size: 22px; 256 font-weight: 600; 257 line-height: 56px; 258 padding: 0 40px 0 16px; 259 } 260 261 .ui-button.ui-dialog-titlebar-close { 224 262 background: none; 225 overflow: auto; 226 } 227 .ui-dialog .ui-dialog-buttonpane { 228 text-align: left; 229 border-width: 1px 0 0 0; 230 background-image: none; 231 margin-top: .5em; 232 padding: .3em 1em .5em .4em; 233 } 234 .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 235 float: right; 236 } 237 .ui-dialog .ui-dialog-buttonpane button { 238 margin: .5em .4em .5em 0; 263 border: none; 264 -webkit-box-shadow: none; 265 box-shadow: none; 266 color: #666; 239 267 cursor: pointer; 240 } 241 .ui-dialog .ui-resizable-se { 242 width: 12px; 243 height: 12px; 244 right: -5px; 245 bottom: -5px; 246 background-position: 16px 16px; 247 } 248 .ui-draggable .ui-dialog-titlebar { 249 cursor: move; 250 } 251 252 /* WP jQuery Dialog Theme */ 253 .wp-dialog { 268 display: block; 254 269 padding: 0; 255 z-index: 100102; 256 border: 0; 257 -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7); 258 box-shadow: 0 5px 15px rgba(0,0,0,0.7); 259 background-color: #f5f5f5; 260 } 261 262 .wp-dialog .ui-dialog-title { 263 display: block; 270 position: absolute; 271 top: 0; 272 right: 0; 273 width: 40px; 274 height: 40px; 264 275 text-align: center; 265 padding: 0; 266 } 267 268 .wp-dialog .ui-dialog-titlebar { 269 padding: 0 1em; 270 background-color: #444; 271 font-size: 13px; 272 line-height: 24px; 273 color: #fff; 274 } 275 276 .wp-dialog .ui-dialog-content { 277 padding: 0; 278 } 279 280 .wp-dialog .ui-dialog-titlebar-close { 281 cursor: pointer; 282 -webkit-appearance: none; 283 border: 0; 284 width: 30px; 285 height: 20px; 286 top: 13px; 287 right: 6px; 288 background: none; 289 } 290 291 .wp-dialog .ui-dialog-titlebar-close:before { 292 content: '\f158'; 276 } 277 278 .ui-dialog-titlebar-close:before { 293 279 font: normal 20px/1 'dashicons'; 280 vertical-align: top; 294 281 speak: none; 295 282 -webkit-font-smoothing: antialiased; 296 283 -moz-osx-font-smoothing: grayscale; 297 color: #999; 298 padding-left: 12px; 299 } 300 301 .wp-dialog .ui-dialog-titlebar-close:hover:before { 284 line-height: 40px; 285 width: 40px; 286 height: 40px; 287 content: '\f158'; 288 } 289 290 .ui-button.ui-dialog-titlebar-close:hover { 302 291 color: #2ea2cc; 303 292 } 304 293 305 . wp-dialog .ui-dialog-titlebar-close .ui-button-text {294 .ui-dialog-titlebar-close .ui-button-text { 306 295 display: none; 307 296 } 308 297 309 .wp-dialog .ui-dialog-titlebar-close:hover, 310 .wp-dialog .ui-dialog-titlebar-close:focus { 311 background-position: -87px -32px; 298 .ui-dialog-content { 299 padding: 16px; 300 overflow: auto; 301 } 302 303 .ui-dialog-buttonpane { 304 background: #fcfcfc; 305 border-top: 1px solid #dfdfdf; 306 padding: 16px; 307 } 308 309 .ui-dialog-buttonpane .ui-button { 310 margin-left: 16px; 311 } 312 313 .ui-dialog-buttonpane .ui-dialog-buttonset { 314 float: right; 315 } 316 317 .ui-draggable .ui-dialog-titlebar { 318 cursor: move; 312 319 } 313 320 314 321 .ui-widget-overlay { 322 position: fixed; 323 top: 0; 324 left: 0; 325 right: 0; 326 bottom: 0; 327 min-height: 360px; 328 background: #000; 329 opacity: 0.7; 315 330 z-index: 100101; 316 background-color: #000; 317 opacity: 0.6; 318 filter: alpha(opacity=60); 319 } 331 } -
trunk/src/wp-includes/js/wplink.js
r27084 r27494 2 2 var wpLink; 3 3 4 ( function($){5 var inputs = {}, rivers = {}, ed , River, Query;4 ( function( $ ) { 5 var inputs = {}, rivers = {}, editor, River, Query; 6 6 7 7 wpLink = { … … 13 13 textarea: '', 14 14 15 init : function() { 16 inputs.dialog = $('#wp-link'); 17 inputs.submit = $('#wp-link-submit'); 15 init: function() { 16 inputs.wrap = $('#wp-link-wrap'); 17 inputs.dialog = $( '#wp-link' ); 18 inputs.backdrop = $( '#wp-link-backdrop' ); 19 inputs.submit = $( '#wp-link-submit' ); 20 inputs.close = $( '#wp-link-close' ); 18 21 // URL 19 inputs.url = $( '#url-field');20 inputs.nonce = $( '#_ajax_linking_nonce');22 inputs.url = $( '#url-field' ); 23 inputs.nonce = $( '#_ajax_linking_nonce' ); 21 24 // Secondary options 22 inputs.title = $( '#link-title-field');25 inputs.title = $( '#link-title-field' ); 23 26 // Advanced Options 24 inputs.openInNewTab = $( '#link-target-checkbox');25 inputs.search = $( '#search-field');27 inputs.openInNewTab = $( '#link-target-checkbox' ); 28 inputs.search = $( '#search-field' ); 26 29 // Build Rivers 27 rivers.search = new River( $( '#search-results') );28 rivers.recent = new River( $( '#most-recent-results') );29 rivers.elements = $('.query-results', inputs.dialog);30 rivers.search = new River( $( '#search-results' ) ); 31 rivers.recent = new River( $( '#most-recent-results' ) ); 32 rivers.elements = inputs.dialog.find( '.query-results' ); 30 33 31 34 // Bind event handlers 32 35 inputs.dialog.keydown( wpLink.keydown ); 33 36 inputs.dialog.keyup( wpLink.keyup ); 34 inputs.submit.click( function( e){35 e .preventDefault();37 inputs.submit.click( function( event ) { 38 event.preventDefault(); 36 39 wpLink.update(); 37 40 }); 38 $('#wp-link-cancel').click( function(e){39 e .preventDefault();41 inputs.close.add( inputs.backdrop ).click( function( event ) { 42 event.preventDefault(); 40 43 wpLink.close(); 41 44 }); 42 $('#internal-toggle').click( wpLink.toggleInternalLinking ); 43 44 rivers.elements.bind('river-select', wpLink.updateFields ); 45 46 $( '#wp-link-search-toggle' ).click( wpLink.toggleInternalLinking ); 47 48 rivers.elements.on( 'river-select', wpLink.updateFields ); 45 49 46 50 inputs.search.keyup( wpLink.searchInternalLinks ); 47 48 inputs.dialog.bind('wpdialogrefresh', wpLink.refresh); 49 inputs.dialog.bind('wpdialogbeforeopen', wpLink.beforeOpen); 50 inputs.dialog.bind('wpdialogclose', wpLink.onClose); 51 }, 52 53 beforeOpen : function() { 51 }, 52 53 open: function( editorId ) { 54 var ed; 55 54 56 wpLink.range = null; 55 57 56 if ( ! wpLink.isMCE() && document.selection ) {57 wpLink.textarea.focus();58 wpLink.range = document.selection.createRange();59 }60 },61 62 open : function( editorId ) {63 58 if ( editorId ) { 64 59 window.wpActiveEditor = editorId; … … 69 64 } 70 65 71 this.textarea = $( '#' + w pActiveEditor ).get(0);66 this.textarea = $( '#' + window.wpActiveEditor ).get( 0 ); 72 67 73 68 if ( typeof tinymce !== 'undefined' ) { 74 69 ed = tinymce.get( wpActiveEditor ); 75 70 76 if ( ed && tinymce.isIE ) { 77 ed.windowManager.bookmark = ed.selection.getBookmark(); 71 if ( ed && ! ed.isHidden() ) { 72 editor = ed; 73 } else { 74 editor = null; 78 75 } 79 } 80 81 // Initialize the dialog 82 if ( ! inputs.dialog.data('wpdialog') ) { 83 inputs.dialog.wpdialog({ 84 title: wpLinkL10n.title, 85 width: 480, 86 height: 'auto', 87 modal: true, 88 dialogClass: 'wp-dialog' 89 }); 90 } 91 92 inputs.dialog.wpdialog('open'); 93 }, 94 95 isMCE : function() { 96 return ed && ! ed.isHidden(); 97 }, 98 99 refresh : function() { 76 77 if ( editor && tinymce.isIE ) { 78 editor.windowManager.bookmark = editor.selection.getBookmark(); 79 } 80 } 81 82 if ( ! wpLink.isMCE() && document.selection ) { 83 this.textarea.focus(); 84 this.range = document.selection.createRange(); 85 } 86 87 inputs.wrap.show(); 88 inputs.backdrop.show(); 89 90 wpLink.refresh(); 91 }, 92 93 isMCE: function() { 94 return editor && ! editor.isHidden(); 95 }, 96 97 refresh: function() { 100 98 // Refresh rivers (clear links, check visibility) 101 99 rivers.search.refresh(); … … 120 118 121 119 // If link exists, select proper values. 122 if ( e = ed .dom.getParent( ed.selection.getNode(), 'A' ) ) {120 if ( e = editor.dom.getParent( editor.selection.getNode(), 'A' ) ) { 123 121 // Set URL and description. 124 inputs.url.val( ed .dom.getAttrib( e, 'href' ) );125 inputs.title.val( ed .dom.getAttrib( e, 'title' ) );122 inputs.url.val( editor.dom.getAttrib( e, 'href' ) ); 123 inputs.title.val( editor.dom.getAttrib( e, 'title' ) ); 126 124 // Set open in new tab. 127 inputs.openInNewTab.prop( 'checked', ( '_blank' === ed .dom.getAttrib( e, 'target' ) ) );125 inputs.openInNewTab.prop( 'checked', ( '_blank' === editor.dom.getAttrib( e, 'target' ) ) ); 128 126 // Update save prompt. 129 127 inputs.submit.val( wpLinkL10n.update ); … … 136 134 137 135 close: function() { 138 inputs.dialog.wpdialog('close');139 },140 141 onClose: function() {142 136 if ( ! wpLink.isMCE() ) { 143 137 wpLink.textarea.focus(); … … 147 141 wpLink.range.select(); 148 142 } 149 } 143 } else { 144 editor.focus(); 145 } 146 147 inputs.backdrop.hide(); 148 inputs.wrap.hide(); 150 149 }, 151 150 152 151 getAttrs: function() { 153 152 return { 154 href 155 title 156 target : inputs.openInNewTab.prop('checked') ? '_blank' : ''153 href: inputs.url.val(), 154 title: inputs.title.val(), 155 target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : '' 157 156 }; 158 157 }, … … 231 230 232 231 wpLink.close(); 233 ed .focus();232 editor.focus(); 234 233 235 234 if ( tinymce.isIE ) { 236 ed .selection.moveToBookmark( ed.windowManager.bookmark );237 } 238 239 link = ed .dom.getParent( ed.selection.getNode(), 'a[href]' );235 editor.selection.moveToBookmark( editor.windowManager.bookmark ); 236 } 237 238 link = editor.dom.getParent( editor.selection.getNode(), 'a[href]' ); 240 239 241 240 // If the values are empty, unlink and return 242 241 if ( ! attrs.href || attrs.href == 'http://' ) { 243 ed .execCommand('unlink');242 editor.execCommand( 'unlink' ); 244 243 return; 245 244 } 246 245 247 246 if ( link ) { 248 ed .dom.setAttribs( link, attrs );247 editor.dom.setAttribs( link, attrs ); 249 248 } else { 250 ed .execCommand( 'mceInsertLink', false, attrs );249 editor.execCommand( 'mceInsertLink', false, attrs ); 251 250 } 252 251 253 252 // Move the cursor to the end of the selection 254 ed .selection.collapse();253 editor.selection.collapse(); 255 254 }, 256 255 257 256 updateFields: function( e, li, originalEvent ) { 258 inputs.url.val( li.children( '.item-permalink').val() );259 inputs.title.val( li.hasClass( 'no-title') ? '' : li.children('.item-title').text() );257 inputs.url.val( li.children( '.item-permalink' ).val() ); 258 inputs.title.val( li.hasClass( 'no-title' ) ? '' : li.children( '.item-title' ).text() ); 260 259 if ( originalEvent && originalEvent.type == 'click' ) 261 260 inputs.url.focus(); … … 265 264 // Set URL and description to defaults. 266 265 // Leave the new tab setting as-is. 267 inputs.url.val( 'http://');268 inputs.title.val( '');266 inputs.url.val( 'http://' ); 267 inputs.title.val( '' ); 269 268 270 269 // Update save prompt. … … 273 272 274 273 searchInternalLinks: function() { 275 var t = $( this), waiting,274 var t = $( this ), waiting, 276 275 search = t.val(); 277 276 … … 285 284 286 285 wpLink.lastSearch = search; 287 waiting = t.parent().find('.spinner').show();286 waiting = $( '#river-waiting' ).show(); 288 287 289 288 rivers.search.change( search ); 290 rivers.search.ajax( function(){ waiting.hide(); }); 289 rivers.search.ajax( function() { 290 waiting.hide(); 291 }); 291 292 } else { 292 293 rivers.search.hide(); … … 306 307 307 308 keydown: function( event ) { 308 var fn, key = $.ui.keyCode; 309 310 if ( key.ESCAPE === event.which ) { 309 var fn, id, 310 key = $.ui.keyCode; 311 312 if ( key.ESCAPE === event.keyCode ) { 311 313 wpLink.close(); 312 314 event.stopImmediatePropagation(); 313 } 314 315 if ( event.which !== key.UP && event.which !== key.DOWN ) { 316 return; 317 } 318 319 fn = event.which === key.UP ? 'prev' : 'next'; 315 } else if ( key.TAB === event.keyCode ) { 316 id = event.target.id; 317 318 if ( id === 'wp-link-submit' && ! event.shiftKey ) { 319 inputs.close.focus(); 320 event.preventDefault(); 321 } else if ( id === 'wp-link-close' && event.shiftKey ) { 322 inputs.submit.focus(); 323 event.preventDefault(); 324 } 325 } 326 327 if ( event.keyCode !== key.UP && event.keyCode !== key.DOWN ) { 328 return; 329 } 330 331 fn = event.keyCode === key.UP ? 'prev' : 'next'; 320 332 clearInterval( wpLink.keyInterval ); 321 333 wpLink[ fn ](); … … 344 356 // Otherwise, wait. 345 357 timeoutTriggered = true; 346 }, delay );358 }, delay ); 347 359 348 360 return function() { … … 356 368 }, 357 369 358 toggleInternalLinking: function( event ) { 359 var panel = $('#search-panel'), 360 widget = inputs.dialog.wpdialog('widget'), 361 // We're about to toggle visibility; it's currently the opposite 362 visible = !panel.is(':visible'), 363 win = $(window); 364 365 $(this).toggleClass('toggle-arrow-active', visible); 366 367 inputs.dialog.height('auto'); 368 panel.slideToggle( 300, function() { 369 setUserSetting('wplink', visible ? '1' : '0'); 370 inputs[ visible ? 'search' : 'url' ].focus(); 371 372 // Move the box if the box is now expanded, was opened in a collapsed state, 373 // and if it needs to be moved. (Judged by bottom not being positive or 374 // bottom being smaller than top.) 375 var scroll = win.scrollTop(), 376 top = widget.offset().top, 377 bottom = top + widget.outerHeight(), 378 diff = bottom - win.height(); 379 380 if ( diff > scroll ) { 381 widget.animate({'top': diff < top ? top - diff : scroll }, 200); 382 } 383 }); 384 event.preventDefault(); 370 toggleInternalLinking: function() { 371 var visible = inputs.wrap.hasClass( 'search-panel-visible' ); 372 373 inputs.wrap.toggleClass( 'search-panel-visible', ! visible ); 374 setUserSetting( 'wplink', visible ? '0' : '1' ); 375 inputs[ ! visible ? 'search' : 'url' ].focus(); 385 376 } 386 377 }; … … 389 380 var self = this; 390 381 this.element = element; 391 this.ul = element.children('ul'); 392 this.waiting = element.find('.river-waiting'); 382 this.ul = element.children( 'ul' ); 383 this.contentHeight = element.children( '#link-selector-height' ); 384 this.waiting = $( '#river-waiting' ); 393 385 394 386 this.change( search ); 395 387 this.refresh(); 396 388 397 element.scroll( function(){ self.maybeLoad(); }); 398 element.delegate('li', 'click', function(e){ self.select( $(this), e ); }); 389 $( '#wp-link .query-results, #wp-link #link-selector' ).scroll( function() { 390 self.maybeLoad(); 391 }); 392 element.on( 'click', 'li', function( event ) { 393 self.select( $( this ), event ); 394 }); 399 395 }; 400 396 … … 402 398 refresh: function() { 403 399 this.deselect(); 404 this.visible = this.element.is( ':visible');400 this.visible = this.element.is( ':visible' ); 405 401 }, 406 402 show: function() { … … 419 415 var liHeight, elHeight, liTop, elTop; 420 416 421 if ( li.hasClass( 'unselectable') || li == this.selected )417 if ( li.hasClass( 'unselectable' ) || li == this.selected ) 422 418 return; 423 419 424 420 this.deselect(); 425 this.selected = li.addClass( 'selected');421 this.selected = li.addClass( 'selected' ); 426 422 // Make sure the element is visible 427 423 liHeight = li.outerHeight(); … … 436 432 437 433 // Trigger the river-select event 438 this.element.trigger( 'river-select', [ li, event, this ]);434 this.element.trigger( 'river-select', [ li, event, this ] ); 439 435 }, 440 436 deselect: function() { 441 437 if ( this.selected ) 442 this.selected.removeClass( 'selected');438 this.selected.removeClass( 'selected' ); 443 439 this.selected = false; 444 440 }, … … 449 445 var to; 450 446 if ( this.selected ) { 451 to = this.selected.prev( 'li');447 to = this.selected.prev( 'li' ); 452 448 if ( to.length ) 453 449 this.select( to ); … … 458 454 return; 459 455 460 var to = this.selected ? this.selected.next( 'li') : $('li:not(.unselectable):first', this.element);456 var to = this.selected ? this.selected.next( 'li' ) : $( 'li:not(.unselectable):first', this.element ); 461 457 if ( to.length ) 462 458 this.select( to ); … … 479 475 this._search = search; 480 476 this.query = new Query( search ); 481 this.element.scrollTop( 0);477 this.element.scrollTop( 0 ); 482 478 }, 483 479 process: function( results, params ) { … … 485 481 firstPage = params.page == 1; 486 482 487 if ( ! results ) {483 if ( ! results ) { 488 484 if ( firstPage ) { 489 485 list += '<li class="unselectable"><span class="item-title"><em>' + … … 510 506 bottom = el.scrollTop() + el.height(); 511 507 512 if ( ! this.query.ready() || bottom < this. ul.height() - wpLink.riverBottomThreshold )508 if ( ! this.query.ready() || bottom < this.contentHeight.height() - wpLink.riverBottomThreshold ) 513 509 return; 514 510 … … 517 513 newBottom = newTop + el.height(); 518 514 519 if ( ! self.query.ready() || newBottom < self. ul.height() - wpLink.riverBottomThreshold )515 if ( ! self.query.ready() || newBottom < self.contentHeight.height() - wpLink.riverBottomThreshold ) 520 516 return; 521 517 … … 523 519 el.scrollTop( newTop + self.waiting.outerHeight() ); 524 520 525 self.ajax( function() { self.waiting.hide(); }); 521 self.ajax( function() { 522 self.waiting.hide(); 523 }); 526 524 }, wpLink.timeToTriggerRiver ); 527 525 } … … 537 535 $.extend( Query.prototype, { 538 536 ready: function() { 539 return ! ( this.querying || this.allLoaded );537 return ! ( this.querying || this.allLoaded ); 540 538 }, 541 539 ajax: function( callback ) { … … 552 550 this.querying = true; 553 551 554 $.post( ajaxurl, query, function( r) {552 $.post( ajaxurl, query, function( r ) { 555 553 self.page++; 556 554 self.querying = false; 557 self.allLoaded = ! r;555 self.allLoaded = ! r; 558 556 callback( r, query ); 559 557 }, 'json' ); … … 561 559 }); 562 560 563 $( document).ready( wpLink.init );564 })( jQuery);561 $( document ).ready( wpLink.init ); 562 })( jQuery ); -
trunk/src/wp-includes/script-loader.php
r27445 r27494 339 339 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); 340 340 341 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery' , 'wpdialogs'), false, 1 );341 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery' ), false, 1 ); 342 342 did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array( 343 343 'title' => __('Insert/edit link'),
Note: See TracChangeset
for help on using the changeset viewer.