Changeset 29019
- Timestamp:
- 07/07/2014 10:40:33 PM (10 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r28994 r29019 37 37 _.extend( wp.mce.View.prototype, { 38 38 initialize: function() {}, 39 getHtml: function() {}, 39 getHtml: function() { 40 return ''; 41 }, 42 loadingPlaceholder: function() { 43 return '' + 44 '<div class="loading-placeholder">' + 45 '<div class="dashicons dashicons-admin-media"></div>' + 46 '<div class="wpview-loading"><ins></ins></div>' + 47 '</div>'; 48 }, 40 49 render: function() { 50 var html = this.getHtml() || this.loadingPlaceholder(); 51 41 52 this.setContent( 42 53 '<p class="wpview-selection-before">\u00a0</p>' + … … 47 58 '</div>' + 48 59 '<div class="wpview-content wpview-type-' + this.type + '">' + 49 this.getHtml()+60 html + 50 61 '</div>' + 51 62 ( this.overlay ? '<div class="wpview-overlay"></div>' : '' ) + … … 83 94 element = editor.dom.replace( html, wrap ); 84 95 } else { 85 element.appendChild( html );96 $( element ).empty().append( html ); 86 97 } 87 98 } … … 360 371 // Don't render errors while still fetching attachments 361 372 if ( this.dfd && 'pending' === this.dfd.state() && ! this.attachments.length ) { 362 return ;373 return ''; 363 374 } 364 375 … … 606 617 // Don't render errors while still fetching attachments 607 618 if ( this.dfd && 'pending' === this.dfd.state() && ! this.attachments.length ) { 608 return ;619 return ''; 609 620 } 610 621 … … 814 825 self.players.push( new MediaElementPlayer( element, self.mejsSettings ) ); 815 826 } ); 816 },817 getHtml: function() {818 return '';819 827 } 820 828 } ); -
trunk/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
r29010 r29019 310 310 .wpview-wrap[data-mce-selected] .toolbar { 311 311 display: block; 312 } 313 314 .wpview-wrap .loading-placeholder { 315 border: 1px dashed #ccc; 316 padding: 10px; 317 } 318 319 .wpview-wrap[data-mce-selected] .loading-placeholder { 320 border-color: transparent; 321 } 322 323 /* A little "loading" animation, not showing in IE < 10 */ 324 .wpview-wrap .wpview-loading { 325 width: 60px; 326 height: 5px; 327 overflow: hidden; 328 background-color: transparent; 329 margin: 10px auto 0; 330 } 331 332 .wpview-wrap .wpview-loading ins { 333 background-color: #333; 334 margin: 0 0 0 -60px; 335 width: 60px; 336 height: 5px; 337 display: block; 338 -webkit-animation: wpview-loading 1.3s infinite 1s linear; 339 animation: wpview-loading 1.3s infinite 1s linear; 340 } 341 342 @-webkit-keyframes wpview-loading { 343 0% { 344 margin-left: -60px; 345 } 346 100% { 347 margin-left: 60px; 348 } 349 } 350 351 @keyframes wpview-loading { 352 0% { 353 margin-left: -60px; 354 } 355 100% { 356 margin-left: 60px; 357 } 312 358 } 313 359 … … 361 407 } 362 408 363 .wpview-error .dashicons { 409 .wpview-error .dashicons, 410 .loading-placeholder .dashicons { 364 411 display: block; 365 412 margin: 0 auto;
Note: See TracChangeset
for help on using the changeset viewer.