wpLink: stop using UI dialog, restyle the modal, add better responsive behaviour.

Fix UI dialog styling to match the rest of the admin styling.
Props avryl, see #26952
Built from https://develop.svn.wordpress.org/trunk@27494


git-svn-id: http://core.svn.wordpress.org/trunk@27336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-03-11 00:04:14 +00:00
parent a271ca696b
commit 05e23f7506
14 changed files with 886 additions and 1295 deletions

View File

@ -492,8 +492,6 @@ final class _WP_Editors {
if ( in_array('wplink', self::$plugins, true) || in_array('link', self::$qt_buttons, true) ) {
wp_enqueue_script('wplink');
wp_enqueue_script('wpdialogs');
wp_enqueue_style('wp-jquery-ui-dialog');
}
if ( in_array('wpfullscreen', self::$plugins, true) || in_array('fullscreen', self::$qt_buttons, true) )
@ -1041,10 +1039,17 @@ final class _WP_Editors {
* @since 3.1.0
*/
public static function wp_link_dialog() {
$search_panel_visible = '1' == get_user_setting( 'wplink', '0' ) ? ' class="search-panel-visible"' : '';
?>
<div style="display:none;">
<div id="wp-link-backdrop"></div>
<div id="wp-link-wrap"<?php echo $search_panel_visible; ?>>
<form id="wp-link" tabindex="-1">
<?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?>
<div id="link-modal-title">
<?php _e( 'Insert/edit link' ) ?>
<div id="wp-link-close" tabindex="0"></div>
</div>
<div id="link-selector">
<div id="link-options">
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
@ -1058,9 +1063,8 @@ final class _WP_Editors {
<label><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
</div>
</div>
<?php $show_internal = '1' == get_user_setting( 'wplink', '0' ); ?>
<p class="howto toggle-arrow <?php if ( $show_internal ) echo 'toggle-arrow-active'; ?>" id="internal-toggle"><?php _e( 'Or link to existing content' ); ?></p>
<div id="search-panel"<?php if ( ! $show_internal ) echo ' style="display:none"'; ?>>
<p class="howto" id="wp-link-search-toggle"><?php _e( 'Or link to existing content' ); ?></p>
<div id="search-panel">
<div class="link-search-wrapper">
<label>
<span class="search-label"><?php _e( 'Search' ); ?></span>
@ -1087,9 +1091,6 @@ final class _WP_Editors {
<div id="wp-link-update">
<input type="submit" value="<?php esc_attr_e( 'Add Link' ); ?>" class="button-primary" id="wp-link-submit" name="wp-link-submit">
</div>
<div id="wp-link-cancel">
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
</div>
</div>
</form>
</div>

View File

@ -1,5 +1,10 @@
/* ----------------------------------------------------------------------------
NOTE: If you edit this file, you should make sure that the CSS rules for
buttons in the following files are updated.
* jquery-ui-dialog.css
* editor.css
WordPress-style Buttons
=======================

View File

@ -1,5 +1,10 @@
/* ----------------------------------------------------------------------------
NOTE: If you edit this file, you should make sure that the CSS rules for
buttons in the following files are updated.
* jquery-ui-dialog.css
* editor.css
WordPress-style Buttons
=======================

View File

@ -313,6 +313,8 @@ div.mce-menu .mce-menu-item-sep,
text-align: center;
color: #fff;
text-shadow: none;
padding: 0;
line-height: 26px;
}
.mce-window .mce-btn {
@ -335,6 +337,14 @@ div.mce-menu .mce-menu-item-sep,
background-image: none;
}
/* Remove the dotted border on :focus and the extra padding in Firefox */
.mce-window .mce-btn::-moz-focus-inner {
border-width: 1px 0;
border-style: solid none;
border-color: transparent;
padding: 0;
}
.mce-window .mce-btn:hover {
background: #fafafa;
border-color: #999;
@ -369,6 +379,7 @@ div.mce-menu .mce-menu-item-sep,
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
color: #fff;
text-decoration: none;
}
.mce-window .mce-btn.mce-primary:hover {
@ -400,6 +411,17 @@ div.mce-menu .mce-menu-item-sep,
text-shadow: 0 -1px 0 rgba(0,0,0,0.1);
}
@media screen and ( max-width: 782px ) {
.mce-window .mce-btn {
padding: 10px 14px;
line-height: 1;
font-size: 14px;
vertical-align: middle;
height: auto;
margin-bottom: 4px;
}
}
/* Charmap modal */
.mce-charmap {
margin: 3px;
@ -864,10 +886,92 @@ i.mce-caret:before {
wp-link
------------------------------------------------------------------------------*/
#wp-link-wrap {
display: none;
background-color: #fff;
width: 600px;
overflow: hidden;
margin-right: -300px;
position: fixed;
top: 30px;
right: 50%;
z-index: 100105;
}
#wp-link-backdrop {
display: none;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
min-height: 360px;
background: #000;
opacity: 0.7;
z-index: 100100;
}
#wp-link {
background-color: #F5F5F5;
line-height: 1.4em;
font-size: 12px;
position: relative;
height: 100%;
}
#wp-link-wrap.search-panel-visible {
bottom: 30px;
}
#link-modal-title {
background: #fcfcfc;
border-bottom: 1px solid #dfdfdf;
height: 42px;
font-size: 22px;
font-weight: 600;
line-height: 41px;
padding: 0 16px 0 42px;
top: 0;
left: 0;
right: 0;
}
#wp-link-close {
color: #666;
cursor: pointer;
padding: 0;
position: absolute;
top: 0;
left: 0;
width: 42px;
height: 42px;
text-align: center;
}
#wp-link-close:before {
font: normal 20px/42px 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 42px;
height: 42px;
content: '\f158';
}
#wp-link-close:hover,
#wp-link-close:focus {
color: #2ea2cc;
}
#link-selector {
padding: 0 16px 52px;
}
#wp-link-wrap.search-panel-visible #link-selector {
padding: 0 16px;
position: absolute;
top: 42px;
right: 0;
left: 0;
bottom: 44px;
}
#wp-link ol,
@ -877,52 +981,41 @@ i.mce-caret:before {
padding: 0;
}
#wp-link-search-toggle::after {
font: normal 20px/1 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: '\f140';
}
.search-panel-visible #wp-link-search-toggle::after {
content: '\f142';
}
#wp-link input[type="text"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wp-link input[type="text"],
#wp-link textarea {
border-width: 1px;
border-style: solid;
-webkit-border-radius: 4px;
border-radius: 4px;
font-size: 12px;
margin: 1px;
padding: 3px;
}
#wp-link #link-options {
padding: 10px 0 14px;
border-bottom: 1px solid #dfdfdf;
margin: 0 6px 14px;
}
#wp-link p.howto {
margin: 3px;
margin: 3px 0;
}
#wp-link #internal-toggle {
display: inline-block;
#wp-link-search-toggle {
cursor: pointer;
padding-right: 18px;
}
#wp-link .toggle-arrow {
background: transparent url(../images/toggle-arrow.png) top right no-repeat;
height: 23px;
line-height: 23px;
}
#wp-link .toggle-arrow-active {
background-position: center right;
}
#wp-link label input[type="text"] {
width: 360px;
width: 400px;
margin-top: 5px;
max-width: 70%;
}
#wp-link #link-options label span,
@ -931,15 +1024,17 @@ i.mce-caret:before {
width: 80px;
text-align: left;
padding-left: 5px;
max-width: 24%;
}
#wp-link .link-search-field {
float: right;
width: 220px;
width: 250px;
max-width: 70%;
}
#wp-link .link-search-wrapper {
margin: 5px 6px 9px;
margin: 5px 0 9px;
display: block;
overflow: hidden;
}
@ -958,16 +1053,18 @@ i.mce-caret:before {
width: auto;
padding: 3px 0 0;
margin: 0 87px 0 0;
font-size: 11px;
}
#wp-link .query-results {
border: 1px #dfdfdf solid;
margin: 0 5px 5px;
margin: 0;
background: #fff;
height: 185px;
overflow: auto;
position: relative;
position: absolute;
right: 16px;
left: 16px;
bottom: 16px;
top: 205px;
}
#wp-link li,
@ -1005,6 +1102,10 @@ i.mce-caret:before {
font-weight: bold;
}
#wp-link li:last-child {
border: none;
}
#wp-link .item-title {
display: inline-block;
width: 80%;
@ -1020,13 +1121,13 @@ i.mce-caret:before {
bottom: 0;
}
#wp-link #search-results {
#wp-link #search-results,
#wp-link #search-panel {
display: none;
}
#wp-link #search-panel {
float: right;
width: 100%;
#wp-link-wrap.search-panel-visible #search-panel {
display: block;
}
#wp-link .river-waiting {
@ -1040,15 +1141,13 @@ i.mce-caret:before {
}
#wp-link .submitbox {
padding: 5px 10px;
font-size: 11px;
overflow: auto;
height: 29px;
}
#wp-link-cancel {
line-height: 25px;
float: right;
padding: 8px 16px;
background: #fcfcfc;
border-top: 1px solid #dfdfdf;
position: absolute;
bottom: 0;
right: 0;
left: 0;
}
#wp-link-update {
@ -1056,322 +1155,47 @@ i.mce-caret:before {
float: left;
}
/*!
* jQuery UI CSS Framework 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
right: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
right: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
right: 0;
}
.ui-resizable-e {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: sw-resize;
width: 12px;
height: 12px;
left: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: se-resize;
width: 9px;
height: 9px;
right: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog {
position: absolute;
top: 0;
/* @noflip */
left: 0;
padding: .2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: right;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
left: .3em;
top: 50%;
width: 21px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: right;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em .4em .5em 1em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
#wp-link-submit {
float: left;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em 0 .5em .4em;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
left: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
margin-bottom: 0;
}
/* WP jQuery Dialog Theme */
.wp-dialog {
padding: 0;
z-index: 300002;
border: 0;
-webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7);
box-shadow: 0 5px 15px rgba(0,0,0,0.7);
background-color: #f5f5f5;
}
@media screen and ( max-width: 782px ), ( max-height: 440px ) {
.wp-dialog .ui-dialog-title {
#wp-link-wrap,
#wp-link-wrap.search-panel-visible {
width: auto;
margin: 0;
top: 10px;
right: 10px;
left: 10px;
bottom: 10px;
max-width: 600px;
margin: auto;
}
#link-selector {
overflow: auto;
height: calc(100% - 88px);
padding-bottom: 0;
}
#wp-link #search-panel {
display: block;
text-align: center;
padding: 0;
}
}
.wp-dialog .ui-dialog-titlebar {
padding: 0 1em;
background-color: #444;
font-size: 13px;
line-height: 24px;
color: #fff;
}
.wp-dialog .ui-dialog-content {
padding: 0;
}
.wp-dialog .ui-dialog-titlebar-close {
cursor: pointer;
-webkit-appearance: none;
border: 0;
width: 30px;
height: 20px;
top: 13px;
left: 6px;
background: none;
}
.wp-dialog .ui-dialog-titlebar-close:before {
content: '\f158';
font: normal 20px/1 'dashicons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #999;
padding-right: 12px;
}
.wp-dialog .ui-dialog-titlebar-close:hover:before {
color: #2ea2cc;
}
.wp-dialog .ui-dialog-titlebar-close .ui-button-text {
#wp-link-search-toggle {
display: none;
}
#search-panel .query-results {
position: static;
}
}
.wp-dialog .ui-dialog-titlebar-close:hover,
.wp-dialog .ui-dialog-titlebar-close:focus {
background-position: -87px -32px;
}
.ui-widget-overlay {
z-index: 300001;
background-color: #000;
opacity: 0.6;
filter: alpha(opacity=60);
}
/* TinyMCE modal */
/* TODO: restyle the TinyMCE 4.0 modals
/* Old TinyMCE 3.x modal */
/*
.clearlooks2 .mceTop {
border-bottom: 1px solid #ccc;
}
@ -1807,7 +1631,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
font-family: Arial, sans-serif;
}
/* HiDPI */
@media print,
(-o-min-device-pixel-ratio: 5/4),
@ -1817,14 +1640,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
#wp-fullscreen-buttons #wp_fs_image span.mce_image {
background: none;
}
#wp-link .toggle-arrow {
background: transparent url(../images/toggle-arrow-2x.png) top right no-repeat;
-webkit-background-size: 19px 69px;
background-size: 19px 69px;
}
}
/* TODO: DFW responsive */

File diff suppressed because one or more lines are too long

View File

@ -313,6 +313,8 @@ div.mce-menu .mce-menu-item-sep,
text-align: center;
color: #fff;
text-shadow: none;
padding: 0;
line-height: 26px;
}
.mce-window .mce-btn {
@ -335,6 +337,14 @@ div.mce-menu .mce-menu-item-sep,
background-image: none;
}
/* Remove the dotted border on :focus and the extra padding in Firefox */
.mce-window .mce-btn::-moz-focus-inner {
border-width: 1px 0;
border-style: solid none;
border-color: transparent;
padding: 0;
}
.mce-window .mce-btn:hover {
background: #fafafa;
border-color: #999;
@ -369,6 +379,7 @@ div.mce-menu .mce-menu-item-sep,
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
color: #fff;
text-decoration: none;
}
.mce-window .mce-btn.mce-primary:hover {
@ -400,6 +411,17 @@ div.mce-menu .mce-menu-item-sep,
text-shadow: 0 -1px 0 rgba(0,0,0,0.1);
}
@media screen and ( max-width: 782px ) {
.mce-window .mce-btn {
padding: 10px 14px;
line-height: 1;
font-size: 14px;
vertical-align: middle;
height: auto;
margin-bottom: 4px;
}
}
/* Charmap modal */
.mce-charmap {
margin: 3px;
@ -864,10 +886,92 @@ i.mce-caret:before {
wp-link
------------------------------------------------------------------------------*/
#wp-link-wrap {
display: none;
background-color: #fff;
width: 600px;
overflow: hidden;
margin-left: -300px;
position: fixed;
top: 30px;
left: 50%;
z-index: 100105;
}
#wp-link-backdrop {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
min-height: 360px;
background: #000;
opacity: 0.7;
z-index: 100100;
}
#wp-link {
background-color: #F5F5F5;
line-height: 1.4em;
font-size: 12px;
position: relative;
height: 100%;
}
#wp-link-wrap.search-panel-visible {
bottom: 30px;
}
#link-modal-title {
background: #fcfcfc;
border-bottom: 1px solid #dfdfdf;
height: 42px;
font-size: 22px;
font-weight: 600;
line-height: 41px;
padding: 0 42px 0 16px;
top: 0;
right: 0;
left: 0;
}
#wp-link-close {
color: #666;
cursor: pointer;
padding: 0;
position: absolute;
top: 0;
right: 0;
width: 42px;
height: 42px;
text-align: center;
}
#wp-link-close:before {
font: normal 20px/42px 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 42px;
height: 42px;
content: '\f158';
}
#wp-link-close:hover,
#wp-link-close:focus {
color: #2ea2cc;
}
#link-selector {
padding: 0 16px 52px;
}
#wp-link-wrap.search-panel-visible #link-selector {
padding: 0 16px;
position: absolute;
top: 42px;
left: 0;
right: 0;
bottom: 44px;
}
#wp-link ol,
@ -877,52 +981,41 @@ i.mce-caret:before {
padding: 0;
}
#wp-link-search-toggle::after {
font: normal 20px/1 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: '\f140';
}
.search-panel-visible #wp-link-search-toggle::after {
content: '\f142';
}
#wp-link input[type="text"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wp-link input[type="text"],
#wp-link textarea {
border-width: 1px;
border-style: solid;
-webkit-border-radius: 4px;
border-radius: 4px;
font-size: 12px;
margin: 1px;
padding: 3px;
}
#wp-link #link-options {
padding: 10px 0 14px;
border-bottom: 1px solid #dfdfdf;
margin: 0 6px 14px;
}
#wp-link p.howto {
margin: 3px;
margin: 3px 0;
}
#wp-link #internal-toggle {
display: inline-block;
#wp-link-search-toggle {
cursor: pointer;
padding-left: 18px;
}
#wp-link .toggle-arrow {
background: transparent url(../images/toggle-arrow.png) top left no-repeat;
height: 23px;
line-height: 23px;
}
#wp-link .toggle-arrow-active {
background-position: center left;
}
#wp-link label input[type="text"] {
width: 360px;
width: 400px;
margin-top: 5px;
max-width: 70%;
}
#wp-link #link-options label span,
@ -931,15 +1024,17 @@ i.mce-caret:before {
width: 80px;
text-align: right;
padding-right: 5px;
max-width: 24%;
}
#wp-link .link-search-field {
float: left;
width: 220px;
width: 250px;
max-width: 70%;
}
#wp-link .link-search-wrapper {
margin: 5px 6px 9px;
margin: 5px 0 9px;
display: block;
overflow: hidden;
}
@ -958,16 +1053,18 @@ i.mce-caret:before {
width: auto;
padding: 3px 0 0;
margin: 0 0 0 87px;
font-size: 11px;
}
#wp-link .query-results {
border: 1px #dfdfdf solid;
margin: 0 5px 5px;
margin: 0;
background: #fff;
height: 185px;
overflow: auto;
position: relative;
position: absolute;
left: 16px;
right: 16px;
bottom: 16px;
top: 205px;
}
#wp-link li,
@ -1005,6 +1102,10 @@ i.mce-caret:before {
font-weight: bold;
}
#wp-link li:last-child {
border: none;
}
#wp-link .item-title {
display: inline-block;
width: 80%;
@ -1020,13 +1121,13 @@ i.mce-caret:before {
bottom: 0;
}
#wp-link #search-results {
#wp-link #search-results,
#wp-link #search-panel {
display: none;
}
#wp-link #search-panel {
float: left;
width: 100%;
#wp-link-wrap.search-panel-visible #search-panel {
display: block;
}
#wp-link .river-waiting {
@ -1040,15 +1141,13 @@ i.mce-caret:before {
}
#wp-link .submitbox {
padding: 5px 10px;
font-size: 11px;
overflow: auto;
height: 29px;
}
#wp-link-cancel {
line-height: 25px;
float: left;
padding: 8px 16px;
background: #fcfcfc;
border-top: 1px solid #dfdfdf;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
#wp-link-update {
@ -1056,322 +1155,47 @@ i.mce-caret:before {
float: right;
}
/*!
* jQuery UI CSS Framework 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0;
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: sw-resize;
width: 9px;
height: 9px;
left: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog {
position: absolute;
top: 0;
/* @noflip */
left: 0;
padding: .2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
top: 50%;
width: 21px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
#wp-link-submit {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
right: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
margin-bottom: 0;
}
/* WP jQuery Dialog Theme */
.wp-dialog {
padding: 0;
z-index: 300002;
border: 0;
-webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7);
box-shadow: 0 5px 15px rgba(0,0,0,0.7);
background-color: #f5f5f5;
}
@media screen and ( max-width: 782px ), ( max-height: 440px ) {
.wp-dialog .ui-dialog-title {
#wp-link-wrap,
#wp-link-wrap.search-panel-visible {
width: auto;
margin: 0;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
max-width: 600px;
margin: auto;
}
#link-selector {
overflow: auto;
height: calc(100% - 88px);
padding-bottom: 0;
}
#wp-link #search-panel {
display: block;
text-align: center;
padding: 0;
}
}
.wp-dialog .ui-dialog-titlebar {
padding: 0 1em;
background-color: #444;
font-size: 13px;
line-height: 24px;
color: #fff;
}
.wp-dialog .ui-dialog-content {
padding: 0;
}
.wp-dialog .ui-dialog-titlebar-close {
cursor: pointer;
-webkit-appearance: none;
border: 0;
width: 30px;
height: 20px;
top: 13px;
right: 6px;
background: none;
}
.wp-dialog .ui-dialog-titlebar-close:before {
content: '\f158';
font: normal 20px/1 'dashicons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #999;
padding-left: 12px;
}
.wp-dialog .ui-dialog-titlebar-close:hover:before {
color: #2ea2cc;
}
.wp-dialog .ui-dialog-titlebar-close .ui-button-text {
#wp-link-search-toggle {
display: none;
}
#search-panel .query-results {
position: static;
}
}
.wp-dialog .ui-dialog-titlebar-close:hover,
.wp-dialog .ui-dialog-titlebar-close:focus {
background-position: -87px -32px;
}
.ui-widget-overlay {
z-index: 300001;
background-color: #000;
opacity: 0.6;
filter: alpha(opacity=60);
}
/* TinyMCE modal */
/* TODO: restyle the TinyMCE 4.0 modals
/* Old TinyMCE 3.x modal */
/*
.clearlooks2 .mceTop {
border-bottom: 1px solid #ccc;
}
@ -1807,7 +1631,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
font-family: Arial, sans-serif;
}
/* HiDPI */
@media print,
(-o-min-device-pixel-ratio: 5/4),
@ -1817,14 +1640,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
#wp-fullscreen-buttons #wp_fs_image span.mce_image {
background: none;
}
#wp-link .toggle-arrow {
background: transparent url(../images/toggle-arrow-2x.png) top left no-repeat;
-webkit-background-size: 19px 69px;
background-size: 19px 69px;
}
}
/* TODO: DFW responsive */

File diff suppressed because one or more lines are too long

View File

@ -56,18 +56,12 @@
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
@ -79,20 +73,6 @@
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
@ -148,10 +128,10 @@
/* @noflip */
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
width: 9px;
height: 9px;
right: -5px;
bottom: -5px;
}
/* @noflip */
.ui-resizable-sw {
@ -178,142 +158,174 @@
top: -5px;
}
/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
/* WP buttons: see buttons.css. */
.ui-button {
display: inline-block;
text-decoration: none;
font-size: 13px;
line-height: 26px;
height: 28px;
margin: 0;
padding: 0 10px 1px;
cursor: pointer;
border-width: 1px;
border-style: solid;
-webkit-appearance: none;
-webkit-border-radius: 3px;
border-radius: 3px;
white-space: nowrap;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #555;
border-color: #cccccc;
background: #f7f7f7;
-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
vertical-align: top;
}
/* Remove the dotted border on :focus and the extra padding in Firefox */
.ui-button::-moz-focus-inner {
border-width: 1px 0;
border-style: solid none;
border-color: transparent;
padding: 0;
}
.ui-button:hover {
background: #fafafa;
border-color: #999;
color: #222;
}
.ui-button:focus {
-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
box-shadow: 1px 1px 1px rgba(0,0,0,.2);
}
.ui-button:active {
background: #eee;
border-color: #999;
color: #333;
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
outline: none;
}
.ui-button[disabled],
.ui-button:disabled {
color: #aaa !important;
border-color: #ddd !important;
background: #f7f7f7 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: 0 1px 0 #fff !important;
cursor: default;
}
@media screen and ( max-width: 782px ) {
.ui-button {
padding: 10px 14px;
line-height: 1;
font-size: 14px;
vertical-align: middle;
height: auto;
margin-bottom: 4px;
}
}
/* WP Theme */
.ui-dialog {
position: absolute;
top: 0;
/* @noflip */
left: 0;
padding: .2em;
outline: 0;
right: 0;
z-index: 100102;
background-color: #fff;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
.ui-dialog-titlebar {
background: #fcfcfc;
border-bottom: 1px solid #dfdfdf;
height: 56px;
font-size: 22px;
font-weight: 600;
line-height: 56px;
padding: 0 16px 0 40px;
}
.ui-dialog .ui-dialog-title {
float: right;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
left: .3em;
top: 50%;
width: 21px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
.ui-button.ui-dialog-titlebar-close {
background: none;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
color: #666;
cursor: pointer;
display: block;
padding: 0;
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 40px;
text-align: center;
}
.ui-dialog-titlebar-close:before {
font: normal 20px/1 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 40px;
width: 40px;
height: 40px;
content: '\f158';
}
.ui-button.ui-dialog-titlebar-close:hover {
color: #2ea2cc;
}
.ui-dialog-titlebar-close .ui-button-text {
display: none;
}
.ui-dialog-content {
padding: 16px;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: right;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em .4em .5em 1em;
.ui-dialog-buttonpane {
background: #fcfcfc;
border-top: 1px solid #dfdfdf;
padding: 16px;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
.ui-dialog-buttonpane .ui-button {
margin-right: 16px;
}
.ui-dialog-buttonpane .ui-dialog-buttonset {
float: left;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em 0 .5em .4em;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
left: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
/* WP jQuery Dialog Theme */
.wp-dialog {
padding: 0;
z-index: 100102;
border: 0;
-webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7);
box-shadow: 0 5px 15px rgba(0,0,0,0.7);
background-color: #f5f5f5;
}
.wp-dialog .ui-dialog-title {
display: block;
text-align: center;
padding: 0;
}
.wp-dialog .ui-dialog-titlebar {
padding: 0 1em;
background-color: #444;
font-size: 13px;
line-height: 24px;
color: #fff;
}
.wp-dialog .ui-dialog-content {
padding: 0;
}
.wp-dialog .ui-dialog-titlebar-close {
cursor: pointer;
-webkit-appearance: none;
border: 0;
width: 30px;
height: 20px;
top: 13px;
left: 6px;
background: none;
}
.wp-dialog .ui-dialog-titlebar-close:before {
content: '\f158';
font: normal 20px/1 'dashicons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #999;
padding-right: 12px;
}
.wp-dialog .ui-dialog-titlebar-close:hover:before {
color: #2ea2cc;
}
.wp-dialog .ui-dialog-titlebar-close .ui-button-text {
display: none;
}
.wp-dialog .ui-dialog-titlebar-close:hover,
.wp-dialog .ui-dialog-titlebar-close:focus {
background-position: -87px -32px;
}
.ui-widget-overlay {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
min-height: 360px;
background: #000;
opacity: 0.7;
z-index: 100101;
background-color: #000;
opacity: 0.6;
filter: alpha(opacity=60);
}

View File

@ -7,7 +7,7 @@
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;right:0;width:100%;height:100%}/*!
*/.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
*
@ -16,13 +16,4 @@
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:right;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;left:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:right;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em .4em .5em 1em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-dialog .ui-dialog-buttonpane button{margin:.5em 0 .5em .4em;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;left:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.wp-dialog{padding:0;z-index:100102;border:0;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background-color:#f5f5f5}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:0}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-size:13px;line-height:24px;color:#fff}.wp-dialog .ui-dialog-content{padding:0}.wp-dialog .ui-dialog-titlebar-close{cursor:pointer;-webkit-appearance:none;border:0;width:30px;height:20px;top:13px;left:6px;background:0 0}.wp-dialog .ui-dialog-titlebar-close:before{content:'\f158';font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#999;padding-right:12px}.wp-dialog .ui-dialog-titlebar-close:hover:before{color:#2ea2cc}.wp-dialog .ui-dialog-titlebar-close .ui-button-text{display:none}.wp-dialog .ui-dialog-titlebar-close:focus,.wp-dialog .ui-dialog-titlebar-close:hover{background-position:-87px -32px}.ui-widget-overlay{z-index:100101;background-color:#000;opacity:.6;filter:alpha(opacity=60)}
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);outline:0}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;right:0;z-index:100102;background-color:#fff}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:56px;font-size:22px;font-weight:600;line-height:56px;padding:0 16px 0 40px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;left:0;width:40px;height:40px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:40px;width:40px;height:40px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;padding:16px}.ui-dialog-buttonpane .ui-button{margin-right:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100101}

View File

@ -56,18 +56,12 @@
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
@ -79,20 +73,6 @@
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
@ -148,10 +128,10 @@
/* @noflip */
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
width: 9px;
height: 9px;
right: -5px;
bottom: -5px;
}
/* @noflip */
.ui-resizable-sw {
@ -178,142 +158,174 @@
top: -5px;
}
/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
/* WP buttons: see buttons.css. */
.ui-button {
display: inline-block;
text-decoration: none;
font-size: 13px;
line-height: 26px;
height: 28px;
margin: 0;
padding: 0 10px 1px;
cursor: pointer;
border-width: 1px;
border-style: solid;
-webkit-appearance: none;
-webkit-border-radius: 3px;
border-radius: 3px;
white-space: nowrap;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #555;
border-color: #cccccc;
background: #f7f7f7;
-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
vertical-align: top;
}
/* Remove the dotted border on :focus and the extra padding in Firefox */
.ui-button::-moz-focus-inner {
border-width: 1px 0;
border-style: solid none;
border-color: transparent;
padding: 0;
}
.ui-button:hover {
background: #fafafa;
border-color: #999;
color: #222;
}
.ui-button:focus {
-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
box-shadow: 1px 1px 1px rgba(0,0,0,.2);
}
.ui-button:active {
background: #eee;
border-color: #999;
color: #333;
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
outline: none;
}
.ui-button[disabled],
.ui-button:disabled {
color: #aaa !important;
border-color: #ddd !important;
background: #f7f7f7 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: 0 1px 0 #fff !important;
cursor: default;
}
@media screen and ( max-width: 782px ) {
.ui-button {
padding: 10px 14px;
line-height: 1;
font-size: 14px;
vertical-align: middle;
height: auto;
margin-bottom: 4px;
}
}
/* WP Theme */
.ui-dialog {
position: absolute;
top: 0;
/* @noflip */
left: 0;
padding: .2em;
outline: 0;
z-index: 100102;
background-color: #fff;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
.ui-dialog-titlebar {
background: #fcfcfc;
border-bottom: 1px solid #dfdfdf;
height: 56px;
font-size: 22px;
font-weight: 600;
line-height: 56px;
padding: 0 40px 0 16px;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
top: 50%;
width: 21px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
.ui-button.ui-dialog-titlebar-close {
background: none;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
color: #666;
cursor: pointer;
display: block;
padding: 0;
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
text-align: center;
}
.ui-dialog-titlebar-close:before {
font: normal 20px/1 'dashicons';
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 40px;
width: 40px;
height: 40px;
content: '\f158';
}
.ui-button.ui-dialog-titlebar-close:hover {
color: #2ea2cc;
}
.ui-dialog-titlebar-close .ui-button-text {
display: none;
}
.ui-dialog-content {
padding: 16px;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
.ui-dialog-buttonpane {
background: #fcfcfc;
border-top: 1px solid #dfdfdf;
padding: 16px;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
.ui-dialog-buttonpane .ui-button {
margin-left: 16px;
}
.ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
right: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
/* WP jQuery Dialog Theme */
.wp-dialog {
padding: 0;
z-index: 100102;
border: 0;
-webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7);
box-shadow: 0 5px 15px rgba(0,0,0,0.7);
background-color: #f5f5f5;
}
.wp-dialog .ui-dialog-title {
display: block;
text-align: center;
padding: 0;
}
.wp-dialog .ui-dialog-titlebar {
padding: 0 1em;
background-color: #444;
font-size: 13px;
line-height: 24px;
color: #fff;
}
.wp-dialog .ui-dialog-content {
padding: 0;
}
.wp-dialog .ui-dialog-titlebar-close {
cursor: pointer;
-webkit-appearance: none;
border: 0;
width: 30px;
height: 20px;
top: 13px;
right: 6px;
background: none;
}
.wp-dialog .ui-dialog-titlebar-close:before {
content: '\f158';
font: normal 20px/1 'dashicons';
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #999;
padding-left: 12px;
}
.wp-dialog .ui-dialog-titlebar-close:hover:before {
color: #2ea2cc;
}
.wp-dialog .ui-dialog-titlebar-close .ui-button-text {
display: none;
}
.wp-dialog .ui-dialog-titlebar-close:hover,
.wp-dialog .ui-dialog-titlebar-close:focus {
background-position: -87px -32px;
}
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
min-height: 360px;
background: #000;
opacity: 0.7;
z-index: 100101;
background-color: #000;
opacity: 0.6;
filter: alpha(opacity=60);
}

View File

@ -7,7 +7,7 @@
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}/*!
*/.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*!
* jQuery UI Resizable 1.10.1
* http://jqueryui.com
*
@ -16,13 +16,4 @@
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}/*!
* jQuery UI Dialog 1.10.1
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.wp-dialog{padding:0;z-index:100102;border:0;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background-color:#f5f5f5}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:0}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-size:13px;line-height:24px;color:#fff}.wp-dialog .ui-dialog-content{padding:0}.wp-dialog .ui-dialog-titlebar-close{cursor:pointer;-webkit-appearance:none;border:0;width:30px;height:20px;top:13px;right:6px;background:0 0}.wp-dialog .ui-dialog-titlebar-close:before{content:'\f158';font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#999;padding-left:12px}.wp-dialog .ui-dialog-titlebar-close:hover:before{color:#2ea2cc}.wp-dialog .ui-dialog-titlebar-close .ui-button-text{display:none}.wp-dialog .ui-dialog-titlebar-close:focus,.wp-dialog .ui-dialog-titlebar-close:hover{background-position:-87px -32px}.ui-widget-overlay{z-index:100101;background-color:#000;opacity:.6;filter:alpha(opacity=60)}
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);outline:0}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;left:0;z-index:100102;background-color:#fff}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:56px;font-size:22px;font-weight:600;line-height:56px;padding:0 40px 0 16px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;right:0;width:40px;height:40px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:40px;width:40px;height:40px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;padding:16px}.ui-dialog-buttonpane .ui-button{margin-left:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100101}

View File

@ -1,8 +1,8 @@
/* global ajaxurl, tinymce, wpLinkL10n, setUserSetting, wpActiveEditor */
var wpLink;
(function($){
var inputs = {}, rivers = {}, ed, River, Query;
( function( $ ) {
var inputs = {}, rivers = {}, editor, River, Query;
wpLink = {
timeToTriggerRiver: 150,
@ -12,54 +12,49 @@ var wpLink;
lastSearch: '',
textarea: '',
init : function() {
inputs.dialog = $('#wp-link');
inputs.submit = $('#wp-link-submit');
init: function() {
inputs.wrap = $('#wp-link-wrap');
inputs.dialog = $( '#wp-link' );
inputs.backdrop = $( '#wp-link-backdrop' );
inputs.submit = $( '#wp-link-submit' );
inputs.close = $( '#wp-link-close' );
// URL
inputs.url = $('#url-field');
inputs.nonce = $('#_ajax_linking_nonce');
inputs.url = $( '#url-field' );
inputs.nonce = $( '#_ajax_linking_nonce' );
// Secondary options
inputs.title = $('#link-title-field');
inputs.title = $( '#link-title-field' );
// Advanced Options
inputs.openInNewTab = $('#link-target-checkbox');
inputs.search = $('#search-field');
inputs.openInNewTab = $( '#link-target-checkbox' );
inputs.search = $( '#search-field' );
// Build Rivers
rivers.search = new River( $('#search-results') );
rivers.recent = new River( $('#most-recent-results') );
rivers.elements = $('.query-results', inputs.dialog);
rivers.search = new River( $( '#search-results' ) );
rivers.recent = new River( $( '#most-recent-results' ) );
rivers.elements = inputs.dialog.find( '.query-results' );
// Bind event handlers
inputs.dialog.keydown( wpLink.keydown );
inputs.dialog.keyup( wpLink.keyup );
inputs.submit.click( function(e){
e.preventDefault();
inputs.submit.click( function( event ) {
event.preventDefault();
wpLink.update();
});
$('#wp-link-cancel').click( function(e){
e.preventDefault();
inputs.close.add( inputs.backdrop ).click( function( event ) {
event.preventDefault();
wpLink.close();
});
$('#internal-toggle').click( wpLink.toggleInternalLinking );
rivers.elements.bind('river-select', wpLink.updateFields );
$( '#wp-link-search-toggle' ).click( wpLink.toggleInternalLinking );
rivers.elements.on( 'river-select', wpLink.updateFields );
inputs.search.keyup( wpLink.searchInternalLinks );
inputs.dialog.bind('wpdialogrefresh', wpLink.refresh);
inputs.dialog.bind('wpdialogbeforeopen', wpLink.beforeOpen);
inputs.dialog.bind('wpdialogclose', wpLink.onClose);
},
beforeOpen : function() {
open: function( editorId ) {
var ed;
wpLink.range = null;
if ( ! wpLink.isMCE() && document.selection ) {
wpLink.textarea.focus();
wpLink.range = document.selection.createRange();
}
},
open : function( editorId ) {
if ( editorId ) {
window.wpActiveEditor = editorId;
}
@ -68,35 +63,38 @@ var wpLink;
return;
}
this.textarea = $( '#' + wpActiveEditor ).get(0);
this.textarea = $( '#' + window.wpActiveEditor ).get( 0 );
if ( typeof tinymce !== 'undefined' ) {
ed = tinymce.get( wpActiveEditor );
if ( ed && tinymce.isIE ) {
ed.windowManager.bookmark = ed.selection.getBookmark();
if ( ed && ! ed.isHidden() ) {
editor = ed;
} else {
editor = null;
}
if ( editor && tinymce.isIE ) {
editor.windowManager.bookmark = editor.selection.getBookmark();
}
}
// Initialize the dialog
if ( ! inputs.dialog.data('wpdialog') ) {
inputs.dialog.wpdialog({
title: wpLinkL10n.title,
width: 480,
height: 'auto',
modal: true,
dialogClass: 'wp-dialog'
});
if ( ! wpLink.isMCE() && document.selection ) {
this.textarea.focus();
this.range = document.selection.createRange();
}
inputs.dialog.wpdialog('open');
inputs.wrap.show();
inputs.backdrop.show();
wpLink.refresh();
},
isMCE : function() {
return ed && ! ed.isHidden();
isMCE: function() {
return editor && ! editor.isHidden();
},
refresh : function() {
refresh: function() {
// Refresh rivers (clear links, check visibility)
rivers.search.refresh();
rivers.recent.refresh();
@ -119,12 +117,12 @@ var wpLink;
var e;
// If link exists, select proper values.
if ( e = ed.dom.getParent( ed.selection.getNode(), 'A' ) ) {
if ( e = editor.dom.getParent( editor.selection.getNode(), 'A' ) ) {
// Set URL and description.
inputs.url.val( ed.dom.getAttrib( e, 'href' ) );
inputs.title.val( ed.dom.getAttrib( e, 'title' ) );
inputs.url.val( editor.dom.getAttrib( e, 'href' ) );
inputs.title.val( editor.dom.getAttrib( e, 'title' ) );
// Set open in new tab.
inputs.openInNewTab.prop( 'checked', ( '_blank' === ed.dom.getAttrib( e, 'target' ) ) );
inputs.openInNewTab.prop( 'checked', ( '_blank' === editor.dom.getAttrib( e, 'target' ) ) );
// Update save prompt.
inputs.submit.val( wpLinkL10n.update );
@ -135,10 +133,6 @@ var wpLink;
},
close: function() {
inputs.dialog.wpdialog('close');
},
onClose: function() {
if ( ! wpLink.isMCE() ) {
wpLink.textarea.focus();
@ -146,14 +140,19 @@ var wpLink;
wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
wpLink.range.select();
}
} else {
editor.focus();
}
inputs.backdrop.hide();
inputs.wrap.hide();
},
getAttrs: function() {
return {
href : inputs.url.val(),
title : inputs.title.val(),
target : inputs.openInNewTab.prop('checked') ? '_blank' : ''
href: inputs.url.val(),
title: inputs.title.val(),
target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : ''
};
},
@ -230,33 +229,33 @@ var wpLink;
attrs = wpLink.getAttrs();
wpLink.close();
ed.focus();
editor.focus();
if ( tinymce.isIE ) {
ed.selection.moveToBookmark( ed.windowManager.bookmark );
editor.selection.moveToBookmark( editor.windowManager.bookmark );
}
link = ed.dom.getParent( ed.selection.getNode(), 'a[href]' );
link = editor.dom.getParent( editor.selection.getNode(), 'a[href]' );
// If the values are empty, unlink and return
if ( ! attrs.href || attrs.href == 'http://' ) {
ed.execCommand('unlink');
editor.execCommand( 'unlink' );
return;
}
if ( link ) {
ed.dom.setAttribs( link, attrs );
editor.dom.setAttribs( link, attrs );
} else {
ed.execCommand( 'mceInsertLink', false, attrs );
editor.execCommand( 'mceInsertLink', false, attrs );
}
// Move the cursor to the end of the selection
ed.selection.collapse();
editor.selection.collapse();
},
updateFields: function( e, li, originalEvent ) {
inputs.url.val( li.children('.item-permalink').val() );
inputs.title.val( li.hasClass('no-title') ? '' : li.children('.item-title').text() );
inputs.url.val( li.children( '.item-permalink' ).val() );
inputs.title.val( li.hasClass( 'no-title' ) ? '' : li.children( '.item-title' ).text() );
if ( originalEvent && originalEvent.type == 'click' )
inputs.url.focus();
},
@ -264,15 +263,15 @@ var wpLink;
setDefaultValues: function() {
// Set URL and description to defaults.
// Leave the new tab setting as-is.
inputs.url.val('http://');
inputs.title.val('');
inputs.url.val( 'http://' );
inputs.title.val( '' );
// Update save prompt.
inputs.submit.val( wpLinkL10n.save );
},
searchInternalLinks: function() {
var t = $(this), waiting,
var t = $( this ), waiting,
search = t.val();
if ( search.length > 2 ) {
@ -284,10 +283,12 @@ var wpLink;
return;
wpLink.lastSearch = search;
waiting = t.parent().find('.spinner').show();
waiting = $( '#river-waiting' ).show();
rivers.search.change( search );
rivers.search.ajax( function(){ waiting.hide(); });
rivers.search.ajax( function() {
waiting.hide();
});
} else {
rivers.search.hide();
rivers.recent.show();
@ -305,18 +306,29 @@ var wpLink;
},
keydown: function( event ) {
var fn, key = $.ui.keyCode;
var fn, id,
key = $.ui.keyCode;
if ( key.ESCAPE === event.which ) {
if ( key.ESCAPE === event.keyCode ) {
wpLink.close();
event.stopImmediatePropagation();
} else if ( key.TAB === event.keyCode ) {
id = event.target.id;
if ( id === 'wp-link-submit' && ! event.shiftKey ) {
inputs.close.focus();
event.preventDefault();
} else if ( id === 'wp-link-close' && event.shiftKey ) {
inputs.submit.focus();
event.preventDefault();
}
}
if ( event.which !== key.UP && event.which !== key.DOWN ) {
if ( event.keyCode !== key.UP && event.keyCode !== key.DOWN ) {
return;
}
fn = event.which === key.UP ? 'prev' : 'next';
fn = event.keyCode === key.UP ? 'prev' : 'next';
clearInterval( wpLink.keyInterval );
wpLink[ fn ]();
wpLink.keyInterval = setInterval( wpLink[ fn ], wpLink.keySensitivity );
@ -343,7 +355,7 @@ var wpLink;
return func.apply( funcContext, funcArgs );
// Otherwise, wait.
timeoutTriggered = true;
}, delay);
}, delay );
return function() {
if ( timeoutTriggered )
@ -355,53 +367,37 @@ var wpLink;
};
},
toggleInternalLinking: function( event ) {
var panel = $('#search-panel'),
widget = inputs.dialog.wpdialog('widget'),
// We're about to toggle visibility; it's currently the opposite
visible = !panel.is(':visible'),
win = $(window);
toggleInternalLinking: function() {
var visible = inputs.wrap.hasClass( 'search-panel-visible' );
$(this).toggleClass('toggle-arrow-active', visible);
inputs.dialog.height('auto');
panel.slideToggle( 300, function() {
setUserSetting('wplink', visible ? '1' : '0');
inputs[ visible ? 'search' : 'url' ].focus();
// Move the box if the box is now expanded, was opened in a collapsed state,
// and if it needs to be moved. (Judged by bottom not being positive or
// bottom being smaller than top.)
var scroll = win.scrollTop(),
top = widget.offset().top,
bottom = top + widget.outerHeight(),
diff = bottom - win.height();
if ( diff > scroll ) {
widget.animate({'top': diff < top ? top - diff : scroll }, 200);
}
});
event.preventDefault();
inputs.wrap.toggleClass( 'search-panel-visible', ! visible );
setUserSetting( 'wplink', visible ? '0' : '1' );
inputs[ ! visible ? 'search' : 'url' ].focus();
}
};
River = function( element, search ) {
var self = this;
this.element = element;
this.ul = element.children('ul');
this.waiting = element.find('.river-waiting');
this.ul = element.children( 'ul' );
this.contentHeight = element.children( '#link-selector-height' );
this.waiting = $( '#river-waiting' );
this.change( search );
this.refresh();
element.scroll( function(){ self.maybeLoad(); });
element.delegate('li', 'click', function(e){ self.select( $(this), e ); });
$( '#wp-link .query-results, #wp-link #link-selector' ).scroll( function() {
self.maybeLoad();
});
element.on( 'click', 'li', function( event ) {
self.select( $( this ), event );
});
};
$.extend( River.prototype, {
refresh: function() {
this.deselect();
this.visible = this.element.is(':visible');
this.visible = this.element.is( ':visible' );
},
show: function() {
if ( ! this.visible ) {
@ -418,11 +414,11 @@ var wpLink;
select: function( li, event ) {
var liHeight, elHeight, liTop, elTop;
if ( li.hasClass('unselectable') || li == this.selected )
if ( li.hasClass( 'unselectable' ) || li == this.selected )
return;
this.deselect();
this.selected = li.addClass('selected');
this.selected = li.addClass( 'selected' );
// Make sure the element is visible
liHeight = li.outerHeight();
elHeight = this.element.height();
@ -435,11 +431,11 @@ var wpLink;
this.element.scrollTop( elTop + liTop - elHeight + liHeight );
// Trigger the river-select event
this.element.trigger('river-select', [ li, event, this ]);
this.element.trigger( 'river-select', [ li, event, this ] );
},
deselect: function() {
if ( this.selected )
this.selected.removeClass('selected');
this.selected.removeClass( 'selected' );
this.selected = false;
},
prev: function() {
@ -448,7 +444,7 @@ var wpLink;
var to;
if ( this.selected ) {
to = this.selected.prev('li');
to = this.selected.prev( 'li' );
if ( to.length )
this.select( to );
}
@ -457,7 +453,7 @@ var wpLink;
if ( ! this.visible )
return;
var to = this.selected ? this.selected.next('li') : $('li:not(.unselectable):first', this.element);
var to = this.selected ? this.selected.next( 'li' ) : $( 'li:not(.unselectable):first', this.element );
if ( to.length )
this.select( to );
},
@ -478,13 +474,13 @@ var wpLink;
this._search = search;
this.query = new Query( search );
this.element.scrollTop(0);
this.element.scrollTop( 0 );
},
process: function( results, params ) {
var list = '', alt = true, classes = '',
firstPage = params.page == 1;
if ( !results ) {
if ( ! results ) {
if ( firstPage ) {
list += '<li class="unselectable"><span class="item-title"><em>' +
wpLinkL10n.noMatchesFound + '</em></span></li>';
@ -509,20 +505,22 @@ var wpLink;
el = this.element,
bottom = el.scrollTop() + el.height();
if ( ! this.query.ready() || bottom < this.ul.height() - wpLink.riverBottomThreshold )
if ( ! this.query.ready() || bottom < this.contentHeight.height() - wpLink.riverBottomThreshold )
return;
setTimeout(function() {
var newTop = el.scrollTop(),
newBottom = newTop + el.height();
if ( ! self.query.ready() || newBottom < self.ul.height() - wpLink.riverBottomThreshold )
if ( ! self.query.ready() || newBottom < self.contentHeight.height() - wpLink.riverBottomThreshold )
return;
self.waiting.show();
el.scrollTop( newTop + self.waiting.outerHeight() );
self.ajax( function() { self.waiting.hide(); });
self.ajax( function() {
self.waiting.hide();
});
}, wpLink.timeToTriggerRiver );
}
});
@ -536,7 +534,7 @@ var wpLink;
$.extend( Query.prototype, {
ready: function() {
return !( this.querying || this.allLoaded );
return ! ( this.querying || this.allLoaded );
},
ajax: function( callback ) {
var self = this,
@ -551,14 +549,14 @@ var wpLink;
this.querying = true;
$.post( ajaxurl, query, function(r) {
$.post( ajaxurl, query, function( r ) {
self.page++;
self.querying = false;
self.allLoaded = !r;
self.allLoaded = ! r;
callback( r, query );
}, 'json' );
}
});
$(document).ready( wpLink.init );
})(jQuery);
$( document ).ready( wpLink.init );
})( jQuery );

File diff suppressed because one or more lines are too long

View File

@ -338,7 +338,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), false, 1 );
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array(
'title' => __('Insert/edit link'),
'update' => __('Update'),