Changeset 16393 for trunk/wp-includes/js/tinymce/wp-mce-link.php
- Timestamp:
- 11/15/2010 11:48:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/wp-mce-link.php
r16159 r16393 24 24 wp_print_scripts( array('jquery', 'jquery-ui-widget') ); 25 25 ?> 26 <script type="text/javascript" src="plugins/wplink/js/wplink.js?ver=20101023"></script> 26 <?php 27 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; 28 $src = "plugins/wplink/js/wplink$suffix.js?ver=20101023"; 29 ?> 30 <script type="text/javascript" src="<?php echo $src; ?>"></script> 27 31 <?php 28 32 wp_admin_css( 'global', true ); … … 44 48 } 45 49 46 #link-header,47 50 #link-options, 48 51 #link-advanced-options { … … 50 53 border-bottom: 1px solid #dfdfdf; 51 54 } 52 #link-header {53 padding-bottom: 0;54 background: #fff;55 }56 #link-panel-tab-bar li {57 font-weight: bold;58 border: #dfdfdf solid;59 margin-right: 5px;60 border-width: 1px 1px 0;61 }62 #link-panel-tab-bar .wp-tab-active {63 border-color:#ccc;64 background-color: #f1f1f1;65 }66 55 67 56 #link-type { … … 78 67 79 68 label input[type="text"] { 80 width: 220px; 81 } 82 .wp-tab-panel label input[type="text"] { 83 float: left; 84 width: 200px; 85 } 69 width: 360px; 70 margin-top: 5px; 71 } 86 72 87 73 label span { … … 91 77 padding-right: 5px; 92 78 } 93 .wp-tab-panel label span {94 width: auto;95 text-align: left;96 float: left;97 margin-top: 3px;98 }99 79 .link-search-wrapper { 100 80 padding: 5px; 101 border-bottom: solid 1px #dfdfdf;102 81 display: block; 103 82 overflow: hidden; 104 83 } 84 .link-search-wrapper span { 85 float: left; 86 margin-top: 6px; 87 } 88 .link-search-wrapper input[type="text"] { 89 float: left; 90 width: 220px; 91 } 105 92 .link-search-wrapper img.waiting { 106 margin: 4px 1px 0 4px;93 margin: 8px 1px 0 4px; 107 94 float: left; 108 95 display: none; … … 117 104 font-size: 11px; 118 105 } 106 107 .query-results { 108 border: #dfdfdf solid; 109 border-width: 1px 0; 110 margin: 5px 0; 111 background: #fff; 112 height: 220px; 113 overflow: auto; 114 } 115 .query-results li { 116 margin-bottom: 0; 117 border-bottom: 1px solid #dfdfdf; 118 color: #555; 119 padding: 4px 6px; 120 cursor: pointer; 121 } 122 .query-results li:hover { 123 background: #EAF2FA; 124 color: #333; 125 } 126 .query-results li.selected { 127 background: #f1f1f1; 128 font-weight: bold; 129 color: #333; 130 } 131 .item-info { 132 text-transform: uppercase; 133 color: #aaa; 134 font-weight: bold; 135 font-size: 11px; 136 float: right; 137 } 138 #search-results { 139 display: none; 140 } 141 142 .wp-results-pagelinks { 143 padding:4px 0; 144 margin:0 auto; 145 text-align:center; 146 } 147 .wp-results-pagelinks-top { 148 border-bottom: 1px solid #dfdfdf; 149 } 119 150 120 151 .submitbox { 121 padding: 5px ;152 padding: 5px 5px 0; 122 153 font-size: 11px; 123 154 overflow: auto; … … 135 166 display: inline-block; 136 167 } 137 .wp-tab-active,138 .wp-tab-panel {139 background: #fff;140 }141 .wp-tab-panel {142 height: 160px;143 padding: 0;144 }145 .wp-tab-panel li {146 margin-bottom: 0;147 border-bottom: 1px solid #dfdfdf;148 color: #555;149 padding: 4px 6px;150 cursor: pointer;151 }152 .wp-tab-panel li:hover {153 background: #EAF2FA;154 color: #333;155 }156 .wp-tab-panel li.selected {157 background: #f1f1f1;158 font-weight: bold;159 color: #333;160 }161 .wp-tab-panel-pagelinks {162 display: none;163 padding:4px 0;164 margin:0 auto;165 text-align:center;166 }167 .wp-tab-panel-pagelinks-top {168 border-bottom: 1px solid #dfdfdf;169 }170 168 </style> 171 169 </head> 172 170 <?php 173 // @TODO: Support custom post types.174 // $pts = get_post_types( array( 'public' => true ), 'objects' );175 $pts = array( get_post_type_object( 'post' ), get_post_type_object( 'page' ) );176 $queries = array(177 array( 'preset' => 'all', 'label' => __('View All') ),178 array( 'preset' => 'recent', 'label' => __('Most Recent') ),179 array( 'preset' => 'search', 'label' => __('Search') )180 );181 182 $tb = new WP_Tab_Bar();183 $tb->id = 'link-panel-tab-bar';184 $tb->add( 'link-panel-id-custom', __('External Link') );185 foreach( $pts as $pt ) {186 $tb->add( "link-panel-id-pt-$pt->name", $pt->labels->singular_name );187 }188 171 189 172 190 173 ?> 191 174 <body id="post-body"> 192 <div id="link-header">193 <?php $tb->render(); ?>194 </div>195 175 <div id="link-selector"> 196 <?php197 wp_link_panel_custom();198 foreach( $pts as $pt )199 wp_link_panel_structure('pt', $pt->name, $queries);200 ?>201 176 <div id="link-options"> 177 <label for="url-field"> 178 <span><?php _e('URL:'); ?></span><input id="url-field" type="text" /> 179 </label> 202 180 <label for="link-title-field"> 203 181 <span><?php _e('Description:'); ?></span><input id="link-title-field" type="text" /> … … 206 184 <input type="checkbox" id="link-target-checkbox" /><span><?php _e('Open in new tab'); ?></span> 207 185 </label> 186 </div> 187 <div id="search-panel"> 188 <label for="search-field" class="link-search-wrapper"> 189 <span><?php _e('Search:'); ?></span> 190 <input type="text" id="search-field" class="link-search-field" /> 191 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /> 192 </label> 193 194 <div id="search-results" class="query-results"> 195 <div class="wp-results-pagelinks wp-results-pagelinks-top"></div> 196 <ul> 197 <li class="wp-results-loading unselectable"><em><?php _e('Loading...'); ?></em></li> 198 </ul> 199 <div class="wp-results-pagelinks wp-results-pagelinks-bottom"></div> 200 </div> 201 202 <?php $most_recent = wp_link_query(); ?> 203 <div id="most-recent-results" class="query-results"> 204 <div class="wp-results-pagelinks wp-results-pagelinks-top"> 205 <?php echo $most_recent['pages']['page_links']; ?> 206 </div> 207 <ul> 208 <?php foreach ( $most_recent['results'] as $item ): ?> 209 <li> 210 <input type="hidden" class="item-permalink" value="<?php echo esc_url( $item['permalink'] ); ?>" /> 211 <span class="item-title"><?php echo $item['title']; ?></span> 212 <span class="item-info"><?php echo esc_html( $item['info'] ); ?></span> 213 </li> 214 <?php endforeach; ?> 215 </ul> 216 <div class="wp-results-pagelinks wp-results-pagelinks-bottom"> 217 <?php echo $most_recent['pages']['page_links']; ?> 218 </div> 219 </div> 208 220 </div> 209 221 </div>
Note: See TracChangeset
for help on using the changeset viewer.