Changeset 20802 for trunk/wp-includes/js/customize-controls.dev.js
- Timestamp:
- 05/16/2012 05:55:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/customize-controls.dev.js
r20798 r20802 393 393 $( function() { 394 394 api.settings = window._wpCustomizeSettings; 395 api.l10n = window._wpCustomizeControlsL10n; 396 395 397 if ( ! api.settings ) 396 398 return; … … 409 411 container: '#customize-preview', 410 412 form: '#customize-controls', 411 url: api.settings. preview413 url: api.settings.url.preview 412 414 }, { 413 415 query: function() { 414 416 return { 415 417 customize: 'on', 416 theme: api.settings.theme ,418 theme: api.settings.theme.stylesheet, 417 419 customized: JSON.stringify( api.get() ) 418 420 }; … … 426 428 nonce: this.nonce 427 429 }), 428 request = $.post( api.settings.ajax, query ); 430 request = $.post( api.settings.url.ajax, query ); 431 432 api.trigger( 'save', request ); 429 433 430 434 body.addClass('saving'); … … 473 477 474 478 // Create a potential postMessage connection with the parent frame. 475 parent = new api.Messenger( api.settings. parent );479 parent = new api.Messenger( api.settings.url.parent ); 476 480 477 481 // If we receive a 'back' event, we're inside an iframe. 478 482 // Send any clicks to the 'Return' link to the parent page. 479 483 parent.bind( 'back', function( text ) { 480 $('.back').text( text ).click( function( event ) { 484 var back = $('.back'); 485 486 if ( text ) 487 back.text( text ); 488 489 back.on( 'click.back', function( event ) { 481 490 event.preventDefault(); 482 491 parent.send( 'close' ); 483 492 }); 484 493 }); 494 495 // If the current theme isn't active, it will be activated on save, 496 // rendering the previous page 497 api.bind( 'save', function( request ) { 498 request.done( function() { 499 parent.send( 'saved' ); 500 501 if ( ! api.settings.theme.active ) { 502 parent.send( 'switched' ); 503 $('#save').val( api.l10n.save ); 504 } 505 506 api.settings.theme.active = true; 507 }); 508 } ); 485 509 486 510 // Initialize the connection with the parent frame.
Note: See TracChangeset
for help on using the changeset viewer.