Changeset 29082
- Timestamp:
- 07/10/2014 11:05:05 PM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/css/media-views.css
r29081 r29082 1019 1019 .attachments-browser .uploader-inline-content { 1020 1020 top: 0; 1021 } 1022 1023 .uploader-inline .close { 1024 background-color: transparent; 1025 border: 0; 1026 cursor: pointer; 1027 height: 48px; 1028 position: absolute; 1029 right: 20px; 1030 text-align: center; 1031 top: 20px; 1032 width: 50px; 1033 z-index: 1; 1034 } 1035 1036 .uploader-inline .close:before { 1037 font: normal 30px/50px 'dashicons' !important; 1038 color: #777; 1039 display: inline-block; 1040 content: '\f335'; 1041 font-weight: 300; 1021 1042 } 1022 1043 -
trunk/src/wp-includes/js/media-views.js
r29081 r29082 3655 3655 template: media.template('uploader-inline'), 3656 3656 3657 events: { 3658 'click .close': 'hide' 3659 }, 3660 3657 3661 initialize: function() { 3658 3662 _.defaults( this.options, { 3659 3663 message: '', 3660 status: true 3664 status: true, 3665 canClose: false 3661 3666 }); 3662 3667 … … 3678 3683 prepare: function() { 3679 3684 var suggestedWidth = this.controller.state().get('suggestedWidth'), 3680 suggestedHeight = this.controller.state().get('suggestedHeight'); 3685 suggestedHeight = this.controller.state().get('suggestedHeight'), 3686 data = {}; 3687 3688 data.canClose = this.options.canClose; 3681 3689 3682 3690 if ( suggestedWidth && suggestedHeight ) { 3683 return { 3684 suggestedWidth: suggestedWidth, 3685 suggestedHeight: suggestedHeight 3686 }; 3687 } 3691 data.suggestedWidth = suggestedWidth; 3692 data.suggestedHeight = suggestedHeight; 3693 } 3694 return data; 3688 3695 }, 3689 3696 /** … … 3746 3753 this.refresh(); 3747 3754 return this; 3755 }, 3756 show: function() { 3757 this.$el.removeClass( 'hidden' ); 3758 }, 3759 hide: function() { 3760 this.$el.addClass( 'hidden' ); 3748 3761 } 3762 3749 3763 }); 3750 3764 … … 5723 5737 controller: this.controller, 5724 5738 status: false, 5725 message: l10n.noItemsFound 5739 message: l10n.noItemsFound, 5740 canClose: this.controller.isModeActive( 'grid' ) 5726 5741 }); 5727 5742 … … 5731 5746 5732 5747 showUploader: function() { 5733 this.uploader. $el.removeClass( 'hidden');5748 this.uploader.show(); 5734 5749 }, 5735 5750 -
trunk/src/wp-includes/media-template.php
r29078 r29082 161 161 <script type="text/html" id="tmpl-uploader-inline"> 162 162 <# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #> 163 <# if ( data.canClose ) { #> 164 <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close overlay</span></button> 165 <# } #> 163 166 <div class="uploader-inline-content {{ messageClass }}"> 164 167 <# if ( data.message ) { #>
Note: See TracChangeset
for help on using the changeset viewer.