Changeset 20049
- Timestamp:
- 02/29/2012 10:24:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/customize-controls.dev.js
r20035 r20049 13 13 initialize: function( params, options ) { 14 14 $.extend( this, options || {} ); 15 16 this.loaded = $.proxy( this.loaded, this ); 15 17 16 18 this.loaderUuid = 0; … … 54 56 this.iframe = api.ensure( params.iframe ); 55 57 this.form = api.ensure( params.form ); 58 this.name = this.iframe.prop('name'); 56 59 57 60 this.container = this.iframe.parent(); … … 84 87 }, 85 88 loader: function() { 86 var self = this,87 name;88 89 89 if ( this.loading ) 90 90 return this.loading; 91 91 92 name = this.iframe.prop('name');93 94 92 this.loading = $('<iframe />', { 95 name: name + '-loading-' + this.loaderUuid++93 name: this.name + '-loading-' + this.loaderUuid++ 96 94 }).appendTo( this.container ); 97 98 this.loading.one( 'load', function() {99 self.iframe.remove();100 self.iframe = self.loading;101 delete self.loading;102 self.iframe.prop( 'name', name );103 });104 95 105 96 return this.loading; 106 97 }, 98 loaded: function() { 99 this.iframe.remove(); 100 this.iframe = this.loading; 101 delete this.loading; 102 this.iframe.prop( 'name', this.name ); 103 }, 107 104 refresh: function() { 105 this.loader().one( 'load', this.loaded ); 106 108 107 this.submit({ 109 108 target: this.loader().prop('name'),
Note: See TracChangeset
for help on using the changeset viewer.