Ticket #25877: 25877.singlequotes.diff
File 25877.singlequotes.diff, 1.9 KB (added by , 12 years ago) |
---|
-
src/wp-admin/js/color-picker.js
29 29 // Set up HTML structure, hide things 30 30 el.addClass( 'wp-color-picker' ).hide().wrap( _wrap ); 31 31 self.wrap = el.parent(); 32 self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( "title", wpColorPickerL10n.pick ).attr( "data-current", wpColorPickerL10n.current );32 self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( 'title', wpColorPickerL10n.pick ).attr( 'data-current', wpColorPickerL10n.current ); 33 33 self.pickerContainer = $( _after ).insertAfter( el ); 34 34 self.button = $( _button ); 35 35 … … 69 69 70 70 // close picker when you click outside it 71 71 if ( self.toggler.hasClass( 'wp-picker-open' ) ) 72 $( "body").on( 'click', { wrap: self.wrap, toggler: self.toggler }, self._bodyListener );72 $( 'body' ).on( 'click', { wrap: self.wrap, toggler: self.toggler }, self._bodyListener ); 73 73 else 74 $( "body").off( 'click', self._bodyListener );74 $( 'body' ).off( 'click', self._bodyListener ); 75 75 }); 76 76 77 77 self.element.change(function( event ) { … … 114 114 // $("#input").wpColorPicker('color', '#bada55') to set 115 115 color: function( newColor ) { 116 116 if ( newColor === undef ) 117 return this.element.iris( "option", "color");117 return this.element.iris( 'option', 'color' ); 118 118 119 this.element.iris( "option", "color", newColor );119 this.element.iris( 'option', 'color', newColor ); 120 120 }, 121 121 //$("#input").wpColorPicker('defaultColor') returns the current default color 122 122 //$("#input").wpColorPicker('defaultColor', newDefaultColor) to set … … 129 129 } 130 130 131 131 $.widget( 'wp.wpColorPicker', ColorPicker ); 132 }( jQuery ) ); 133 No newline at end of file 132 }( jQuery ) );