[wp-trac] [WordPress Trac] #22464: Featured Image

WordPress Trac noreply at wordpress.org
Sun Nov 18 01:41:22 UTC 2012


#22464: Featured Image
-------------------------------+------------------------------
 Reporter:  jetonr             |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by jetonr):

 The thing with featured image is, after the image is uploaded I click on
 it I can see the tick added to the image but the button value/text at the
 bottom right corner is "select"! By clicking it the featured image will
 not be set,  If I switch tabs to media library and than back again to
 uploaded files the button value/text at the bottom right corner is "update
 featured image" and this works!
 So basically before users can set featured image they need to switch
 between tabs uploaded files and media library!
 I hope that part is clear!

 Now the color picker used in the NHP Framework is farbtastic and the code
 used to call the color picker for the filed is this:


 {{{
 jQuery(document).ready(function(){

         /*
          *
          * NHP_Options_color function
          * Adds farbtastic to color elements
          *
          */
         //$colorpicker_inputs = jQuery('input.popup-colorpicker');
         $colorpicker_inputs = jQuery('input.popup-
 colorpicker').wpColorPicker();
         $colorpicker_inputs.each(
         function(){
         var $input = jQuery(this);
         var sIdSelector = "#" + jQuery(this).attr('id') + "picker";
         var oFarb = jQuery.farbtastic(
         sIdSelector,
         function( color ){

         $input.css({
         backgroundColor: color,
         color: oFarb.hsl[2] > 0.5 ? '#000' : '#fff'
         }).val( color );


         if( oFarb.bound == true ){
         $input.change();
         }else{
         oFarb.bound = true;
         }
         }
         );
         oFarb.setColor( $input.val() );

         }
         );

         $colorpicker_inputs.each(function(e){
         jQuery(this).next('.farb-popup').hide();
         });


         $colorpicker_inputs.live('focus',function(e){
         jQuery(this).next('.farb-popup').show();
         jQuery(this).parents('li').css({
         position : 'relative',
         zIndex : '9999'
         })
         jQuery('#tabber').css({overflow:'visible'});
         });

         $colorpicker_inputs.live('blur',function(e){
         jQuery(this).next('.farb-popup').hide();
         jQuery(this).parents('li').css({
         zIndex : '0'
         })
         });
 });
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22464#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list