Ticket #22613: 22613.2.diff
| File 22613.2.diff, 3.8 KB (added by koopersmith, 6 months ago) |
|---|
-
wp-includes/css/media-views.css
693 693 background-position: -60px 0; 694 694 } 695 695 696 .media-frame . describe {696 .media-frame .attachment .describe { 697 697 position: relative; 698 698 display: block; 699 699 width: 100%; … … 1161 1161 } 1162 1162 1163 1163 /** 1164 * Spinner 1165 */ 1166 .media-sidebar .settings-save-status { 1167 background: #f5f5f5; 1168 float: right; 1169 text-transform: none; 1170 z-index: 10; 1171 } 1172 1173 .media-sidebar .settings-save-status .spinner { 1174 background: url(../../wp-admin/images/wpspin_light.gif) no-repeat; 1175 background-size: 16px 16px; 1176 display: none; 1177 float: right; 1178 opacity: 0.7; 1179 filter: alpha(opacity=70); 1180 width: 16px; 1181 height: 16px; 1182 margin: 0 5px 0; 1183 } 1184 1185 .media-sidebar .settings-save-status .saved { 1186 float: right; 1187 display: none; 1188 } 1189 1190 .media-sidebar .save-waiting .settings-save-status .spinner, 1191 .media-sidebar .save-complete .settings-save-status .saved { 1192 display: block; 1193 } 1194 1195 /** 1164 1196 * Attachment Details 1165 1197 */ 1166 1198 .attachment-details { 1199 position: relative; 1167 1200 overflow: auto; 1168 1201 } 1169 1202 -
wp-includes/js/media-views.js
2584 2584 // Check if the model is selected. 2585 2585 this.updateSelect(); 2586 2586 2587 // Update the save status. 2588 this.updateSave(); 2589 2587 2590 this.views.render(); 2588 2591 return this; 2589 2592 }, … … 2688 2691 value = event.target.value; 2689 2692 2690 2693 if ( this.model.get( setting ) !== value ) 2691 this. model.save( setting, value );2694 this.save( setting, value ); 2692 2695 }, 2693 2696 2697 // Pass all the arguments to the model's save method. 2698 // 2699 // Records the aggregate status of all save requests and updates the 2700 // view's classes accordingly. 2701 save: function() { 2702 var view = this, 2703 save = this._save = this._save || { status: 'ready' }, 2704 request = this.model.save.apply( this.model, arguments ), 2705 requests = save.requests ? $.when( request, save.requests ) : request; 2706 2707 // If we're waiting to remove 'Saved.', stop. 2708 if ( save.savedTimer ) 2709 clearTimeout( save.savedTimer ); 2710 2711 this.updateSave('waiting'); 2712 save.requests = requests; 2713 requests.done( function() { 2714 // If we've performed another request since this one, bail. 2715 if ( save.requests !== requests ) 2716 return; 2717 2718 view.updateSave('complete'); 2719 save.savedTimer = setTimeout( function() { 2720 view.updateSave('ready'); 2721 delete save.savedTimer; 2722 }, 2000 ); 2723 }); 2724 2725 }, 2726 2727 updateSave: function( status ) { 2728 var save = this._save = this._save || { status: 'ready' }; 2729 2730 if ( status && status !== save.status ) { 2731 this.$el.removeClass( 'save-' + save.status ); 2732 save.status = status; 2733 } 2734 2735 this.$el.addClass( 'save-' + save.status ); 2736 return this; 2737 }, 2738 2694 2739 updateAll: function() { 2695 2740 var $settings = this.$('[data-setting]'), 2696 2741 model = this.model, … … 3835 3880 this.$('img').attr( 'src', this.model.get('url') ); 3836 3881 } 3837 3882 }); 3838 }(jQuery)); 3839 No newline at end of file 3883 }(jQuery)); -
wp-includes/media.php
1665 1665 </script> 1666 1666 1667 1667 <script type="text/html" id="tmpl-attachment-details"> 1668 <h3><?php _e('Attachment Details'); ?></h3> 1668 <h3> 1669 <?php _e('Attachment Details'); ?> 1670 1671 <span class="settings-save-status"> 1672 <span class="spinner"></span> 1673 <span class="saved"><?php esc_html_e('Saved.'); ?></span> 1674 </span> 1675 </h3> 1669 1676 <div class="attachment-info"> 1670 1677 <div class="thumbnail"> 1671 1678 <# if ( data.uploading ) { #>
