Changeset 15016
- Timestamp:
- 05/28/2010 12:01:59 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r14775 r15016 233 233 <table class="form-table"> 234 234 <tbody> 235 <tr valign="top">236 <th scope="row"><?php _e( 'Color' ); ?></th>237 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>238 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" />239 <input type="button" class="button" value="<?php esc_attr_e('Select a Color'); ?>" id="pickcolor" />240 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>241 </fieldset></td>242 </tr>243 235 <?php if ( get_background_image() ) : ?> 244 236 <tr valign="top"> … … 262 254 <tr valign="top"> 263 255 <th scope="row"><?php _e( 'Repeat' ); ?></th> 264 <td><fieldset><legend class="screen-reader-text"><span><?php _e( ' Repeat' ); ?></span></legend>256 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Repeat' ); ?></span></legend> 265 257 <label><input type="radio" name="background-repeat" value="no-repeat"<?php checked('no-repeat', get_theme_mod('background_repeat', 'repeat')); ?>> <?php _e('No Repeat'); ?></option></label> 266 258 <label><input type="radio" name="background-repeat" value="repeat"<?php checked('repeat', get_theme_mod('background_repeat', 'repeat')); ?>> <?php _e('Tile'); ?></option></label> … … 272 264 <tr valign="top"> 273 265 <th scope="row"><?php _e( 'Attachment' ); ?></th> 274 <td><fieldset><legend class="screen-reader-text"><span><?php _e( ' Attachment' ); ?></span></legend>266 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Attachment' ); ?></span></legend> 275 267 <label> 276 268 <input name="background-attachment" type="radio" value="scroll" <?php checked('scroll', get_theme_mod('background_attachment', 'fixed')); ?> /> … … 284 276 </tr> 285 277 <?php endif; // get_background_image() ?> 278 <tr valign="top"> 279 <th scope="row"><?php _e( 'Color' ); ?></th> 280 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend> 281 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" /> 282 <a class="hide-if-no-js" href="#" id="pickcolor"><?php _e('Select a Color'); ?></a> 283 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> 284 </fieldset></td> 285 </tr> 286 286 </tbody> 287 287 </table> -
trunk/wp-admin/js/custom-background.dev.js
r14684 r15016 10 10 jQuery('#pickcolor').click(function() { 11 11 jQuery('#colorPickerDiv').show(); 12 return false; 12 13 }); 13 14 -
trunk/wp-admin/js/custom-background.js
r14684 r15016 1 var farbtastic;function pickColor(a){farbtastic.setColor(a);jQuery("#background-color").val(a);jQuery("#custom-background-image").css("background-color",a)}jQuery(document).ready(function(){jQuery("#pickcolor").click(function(){jQuery("#colorPickerDiv").show() });jQuery("#background-color").keyup(function(){var b=jQuery("#background-color").val(),a=b;if(a[0]!="#"){a="#"+a}a=a.replace(/[^#a-fA-F0-9]+/,"");if(a!=b){jQuery("#background-color").val(a)}if(a.length==4||a.length==7){pickColor(a)}});jQuery('input[name="background-position-x"]').change(function(){jQuery("#custom-background-image").css("background-position",jQuery(this).val()+" top")});jQuery('select[name="background-repeat"]').change(function(){jQuery("#custom-background-image").css("background-repeat",jQuery(this).val())});farbtastic=jQuery.farbtastic("#colorPickerDiv",function(a){pickColor(a)});pickColor(jQuery("#background-color").val());jQuery(document).mousedown(function(){jQuery("#colorPickerDiv").each(function(){var a=jQuery(this).css("display");if(a=="block"){jQuery(this).fadeOut(2)}})})});1 var farbtastic;function pickColor(a){farbtastic.setColor(a);jQuery("#background-color").val(a);jQuery("#custom-background-image").css("background-color",a)}jQuery(document).ready(function(){jQuery("#pickcolor").click(function(){jQuery("#colorPickerDiv").show();return false});jQuery("#background-color").keyup(function(){var b=jQuery("#background-color").val(),a=b;if(a[0]!="#"){a="#"+a}a=a.replace(/[^#a-fA-F0-9]+/,"");if(a!=b){jQuery("#background-color").val(a)}if(a.length==4||a.length==7){pickColor(a)}});jQuery('input[name="background-position-x"]').change(function(){jQuery("#custom-background-image").css("background-position",jQuery(this).val()+" top")});jQuery('select[name="background-repeat"]').change(function(){jQuery("#custom-background-image").css("background-repeat",jQuery(this).val())});farbtastic=jQuery.farbtastic("#colorPickerDiv",function(a){pickColor(a)});pickColor(jQuery("#background-color").val());jQuery(document).mousedown(function(){jQuery("#colorPickerDiv").each(function(){var a=jQuery(this).css("display");if(a=="block"){jQuery(this).fadeOut(2)}})})}); -
trunk/wp-includes/script-loader.php
r15010 r15016 396 396 ) ); 397 397 398 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '201005 16' );398 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '20100527' ); 399 399 $scripts->add_data( 'custom-background', 'group', 1 ); 400 400 }
Note: See TracChangeset
for help on using the changeset viewer.