Changeset 26206
- Timestamp:
- 11/15/2013 06:07:21 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/js/customize-controls.js (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r26081 r26206 9 9 api.Setting = api.Value.extend({ 10 10 initialize: function( id, value, options ) { 11 var element;12 13 11 api.Value.prototype.initialize.call( this, value, options ); 14 12 … … 86 84 87 85 dropdownInit: function() { 88 var control = this, 89 statuses = this.container.find('.dropdown-status'), 90 params = this.params, 91 update = function( to ) { 92 if ( typeof to === 'string' && params.statuses && params.statuses[ to ] ) 86 var control = this, 87 statuses = this.container.find('.dropdown-status'), 88 params = this.params, 89 toggleFreeze = false, 90 update = function( to ) { 91 if ( typeof to === 'string' && params.statuses && params.statuses[ to ] ) 93 92 statuses.html( params.statuses[ to ] ).show(); 94 93 else 95 94 statuses.hide(); 96 95 }; 97 98 var toggleFreeze = false;99 96 100 97 // Support the .dropdown class to open/close complex elements … … 129 126 130 127 picker.val( control.setting() ).wpColorPicker({ 131 change: function( event, options) {128 change: function() { 132 129 control.setting.set( picker.wpColorPicker('color') ); 133 },134 clear: function() {135 control.setting.set( false );136 }130 }, 131 clear: function() { 132 control.setting.set( false ); 133 } 137 134 }); 138 135 } … … 198 195 199 196 this.uploader = { 200 init: function( up) {197 init: function() { 201 198 var fallback, button; 202 199 … … 320 317 321 318 initialize: function( params, options ) { 322 var deferred = $.Deferred(), 323 self = this; 319 var deferred = $.Deferred(); 324 320 325 321 // This is the promise object. … … 489 485 initialize: function( params, options ) { 490 486 var self = this, 491 rscheme = /^https?/, 492 url; 487 rscheme = /^https?/; 493 488 494 489 $.extend( this, options || {} ); … … 707 702 return window.location = api.settings.url.fallback; 708 703 709 var body = $( document.body ),710 overlay = body.children('.wp-full-overlay'),711 query, previewer, parent;704 var previewer, parent, topFocus, 705 body = $( document.body ), 706 overlay = body.children('.wp-full-overlay'); 712 707 713 708 // Prevent the form from saving when enter is pressed. … … 734 729 return { 735 730 wp_customize: 'on', 736 theme: api.settings.theme.stylesheet,737 customized: JSON.stringify( api.get() ),738 nonce: this.nonce.preview731 theme: api.settings.theme.stylesheet, 732 customized: JSON.stringify( api.get() ), 733 nonce: this.nonce.preview 739 734 }; 740 735 }, … … 779 774 780 775 // Refresh the nonces if the preview sends updated nonces over. 781 previewer.bind( 'nonce', function( nonce ) {782 $.extend( this.nonce, nonce );783 });776 previewer.bind( 'nonce', function( nonce ) { 777 $.extend( this.nonce, nonce ); 778 }); 784 779 785 780 $.each( api.settings.settings, function( id, data ) { … … 921 916 'background_image': { 922 917 controls: [ 'background_repeat', 'background_position_x', 'background_attachment' ], 923 callback: function( to ) { return !! to }918 callback: function( to ) { return !! to; } 924 919 }, 925 920 'show_on_front': { 926 921 controls: [ 'page_on_front', 'page_for_posts' ], 927 callback: function( to ) { return 'page' === to }922 callback: function( to ) { return 'page' === to; } 928 923 }, 929 924 'header_textcolor': { 930 925 controls: [ 'header_textcolor' ], 931 callback: function( to ) { return 'blank' !== to }926 callback: function( to ) { return 'blank' !== to; } 932 927 } 933 928 }, function( settingId, o ) { … … 974 969 }); 975 970 976 control.library.on( 'click', 'a', function( event) {971 control.library.on( 'click', 'a', function() { 977 972 control.settings.data.set( $(this).data('customizeHeaderImageData') ); 978 973 }); … … 999 994 1000 995 // Make sure left column gets focus 1001 vartopFocus = $('.back');996 topFocus = $('.back'); 1002 997 topFocus.focus(); 1003 998 setTimeout(function () {
Note: See TracChangeset
for help on using the changeset viewer.