/
home
/
desid573
/
public_html
/
magicride.ng
/
wp-admin
/
js
/
/home/desid573/public_html/magicride.ng/wp-admin/js
mkdir
upload
Name
Size
Mode
Actions
widgets/
-
0755
rm
accordion.js
2953
0644
edit
dl
rm
accordion.min.js
830
0644
edit
dl
rm
code-editor.js
11587
0644
edit
dl
rm
code-editor.min.js
3069
0644
edit
dl
rm
color-picker.js
9823
0644
edit
dl
rm
color-picker.min.js
3486
0644
edit
dl
rm
comment.js
2795
0644
edit
dl
rm
comment.min.js
1230
0644
edit
dl
rm
common.js
42764
0644
edit
dl
rm
common.min.js
15219
0644
edit
dl
rm
custom-background.js
3426
0644
edit
dl
rm
custom-background.min.js
1162
0644
edit
dl
rm
custom-header.js
2019
0644
edit
dl
rm
customize-controls.js
290802
0644
edit
dl
rm
customize-controls.min.js
110748
0644
edit
dl
rm
customize-nav-menus.js
109010
0644
edit
dl
rm
customize-nav-menus.min.js
45975
0644
edit
dl
rm
customize-widgets.js
71489
0644
edit
dl
rm
customize-widgets.min.js
27966
0644
edit
dl
rm
dashboard.js
18858
0644
edit
dl
rm
dashboard.min.js
6615
0644
edit
dl
rm
edit-comments.js
29270
0644
edit
dl
rm
edit-comments.min.js
15044
0644
edit
dl
rm
editor-expand.js
42631
0644
edit
dl
rm
editor-expand.min.js
13416
0644
edit
dl
rm
editor.js
45313
0644
edit
dl
rm
editor.min.js
13192
0644
edit
dl
rm
farbtastic.js
7689
0644
edit
dl
rm
gallery.js
5638
0644
edit
dl
rm
gallery.min.js
3801
0644
edit
dl
rm
image-edit.js
29294
0644
edit
dl
rm
image-edit.min.js
10070
0644
edit
dl
rm
inline-edit-post.js
16307
0644
edit
dl
rm
inline-edit-post.min.js
7284
0644
edit
dl
rm
inline-edit-tax.js
7701
0644
edit
dl
rm
inline-edit-tax.min.js
2871
0644
edit
dl
rm
iris.min.js
23608
0644
edit
dl
rm
language-chooser.js
873
0644
edit
dl
rm
language-chooser.min.js
374
0644
edit
dl
rm
link.js
3875
0644
edit
dl
rm
link.min.js
1635
0644
edit
dl
rm
media-gallery.js
1306
0644
edit
dl
rm
media-gallery.min.js
578
0644
edit
dl
rm
media-upload.js
3463
0644
edit
dl
rm
media-upload.min.js
1112
0644
edit
dl
rm
media.js
5227
0644
edit
dl
rm
media.min.js
1867
0644
edit
dl
rm
nav-menu.js
42482
0644
edit
dl
rm
nav-menu.min.js
20949
0644
edit
dl
rm
password-strength-meter.js
3173
0644
edit
dl
rm
password-strength-meter.min.js
731
0644
edit
dl
rm
plugin-install.js
7017
0644
edit
dl
rm
plugin-install.min.js
2353
0644
edit
dl
rm
post.js
37407
0644
edit
dl
rm
post.min.js
18027
0644
edit
dl
rm
postbox.js
11765
0644
edit
dl
rm
postbox.min.js
4144
0644
edit
dl
rm
revisions.js
33790
0644
edit
dl
rm
revisions.min.js
17840
0644
edit
dl
rm
set-post-thumbnail.js
841
0644
edit
dl
rm
set-post-thumbnail.min.js
533
0644
edit
dl
rm
site-health.js
8626
0644
edit
dl
rm
site-health.min.js
4663
0644
edit
dl
rm
svg-painter.js
5522
0644
edit
dl
rm
svg-painter.min.js
2337
0644
edit
dl
rm
tags-box.js
11040
0644
edit
dl
rm
tags-box.min.js
3025
0644
edit
dl
rm
tags-suggest.js
5440
0644
edit
dl
rm
tags-suggest.min.js
2194
0644
edit
dl
rm
tags.js
4346
0644
edit
dl
rm
tags.min.js
1655
0644
edit
dl
rm
theme-plugin-editor.js
24676
0644
edit
dl
rm
theme-plugin-editor.min.js
11201
0644
edit
dl
rm
theme.js
54392
0644
edit
dl
rm
theme.min.js
26462
0644
edit
dl
rm
updates.js
80573
0644
edit
dl
rm
updates.min.js
35629
0644
edit
dl
rm
user-profile.js
12252
0644
edit
dl
rm
user-profile.min.js
6238
0644
edit
dl
rm
user-suggest.js
2317
0644
edit
dl
rm
user-suggest.min.js
657
0644
edit
dl
rm
widgets.js
22876
0644
edit
dl
rm
widgets.min.js
12395
0644
edit
dl
rm
word-count.js
7690
0644
edit
dl
rm
word-count.min.js
1500
0644
edit
dl
rm
wp-fullscreen-stub.js
678
0644
edit
dl
rm
wp-fullscreen-stub.min.js
326
0644
edit
dl
rm
xfn.js
7710
0644
edit
dl
rm
xfn.min.js
3352
0644
edit
dl
rm
Edit:
/home/desid573/public_html/magicride.ng/wp-admin/js/color-picker.js
(9823B)
/** * @output wp-admin/js/color-picker.js */ /* global wpColorPickerL10n */ ( function( $, undef ) { var ColorPicker, _before = '<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>', _after = '<div class="wp-picker-holder" />', _wrap = '<div class="wp-picker-container" />', _button = '<input type="button" class="button button-small" />', _wrappingLabel = '<label></label>', _wrappingLabelText = '<span class="screen-reader-text"></span>'; /** * Creates a jQuery UI color picker that is used in the theme customizer. * * @class $.widget.wp.wpColorPicker * * @since 3.5.0 */ ColorPicker = /** @lends $.widget.wp.wpColorPicker.prototype */{ options: { defaultColor: false, change: false, clear: false, hide: true, palettes: true, width: 255, mode: 'hsv', type: 'full', slider: 'horizontal' }, /** * Creates a color picker that only allows you to adjust the hue. * * @since 3.5.0 * * @access private * * @returns {void} */ _createHueOnly: function() { var self = this, el = self.element, color; el.hide(); // Set the saturation to the maximum level. color = 'hsl(' + el.val() + ', 100, 50)'; // Create an instance of the color picker, using the hsl mode. el.iris( { mode: 'hsl', type: 'hue', hide: false, color: color, /** * Handles the onChange event if one has been defined in the options. * * @ignore * * @param {Event} event The event that's being called. * @param {HTMLElement} ui The HTMLElement containing the color picker. * * @returns {void} */ change: function( event, ui ) { if ( $.isFunction( self.options.change ) ) { self.options.change.call( this, event, ui ); } }, width: self.options.width, slider: self.options.slider } ); }, /** * Creates the color picker, sets default values, css classes and wraps it all in HTML. * * @since 3.5.0 * * @access private * * @returns {void} */ _create: function() { // Return early if Iris support is missing. if ( ! $.support.iris ) { return; } var self = this, el = self.element; // Override default options with options bound to the element. $.extend( self.options, el.data() ); // Create a color picker which only allows adjustments to the hue. if ( self.options.type === 'hue' ) { return self._createHueOnly(); } // Bind the close event. self.close = $.proxy( self.close, self ); self.initialValue = el.val(); // Add a CSS class to the input field. el.addClass( 'wp-color-picker' ); /* * Check if there's already a wrapping label, e.g. in the Customizer. * If there's no label, add a default one to match the Customizer template. */ if ( ! el.parent( 'label' ).length ) { // Wrap the input field in the default label. el.wrap( _wrappingLabel ); // Insert the default label text. self.wrappingLabelText = $( _wrappingLabelText ) .insertBefore( el ) .text( wpColorPickerL10n.defaultLabel ); } /* * At this point, either it's the standalone version or the Customizer * one, we have a wrapping label to use as hook in the DOM, let's store it. */ self.wrappingLabel = el.parent(); // Wrap the label in the main wrapper. self.wrappingLabel.wrap( _wrap ); // Store a reference to the main wrapper. self.wrap = self.wrappingLabel.parent(); // Set up the toggle button and insert it before the wrapping label. self.toggler = $( _before ) .insertBefore( self.wrappingLabel ) .css( { backgroundColor: self.initialValue } ); // Set the toggle button span element text. self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick ); // Set up the Iris container and insert it after the wrapping label. self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel ); // Store a reference to the Clear/Default button. self.button = $( _button ); // Set up the Clear/Default button. if ( self.options.defaultColor ) { self.button .addClass( 'wp-picker-default' ) .val( wpColorPickerL10n.defaultString ) .attr( 'aria-label', wpColorPickerL10n.defaultAriaLabel ); } else { self.button .addClass( 'wp-picker-clear' ) .val( wpColorPickerL10n.clear ) .attr( 'aria-label', wpColorPickerL10n.clearAriaLabel ); } // Wrap the wrapping label in its wrapper and append the Clear/Default button. self.wrappingLabel .wrap( '<span class="wp-picker-input-wrap hidden" />' ) .after( self.button ); /* * The input wrapper now contains the label+input+Clear/Default button. * Store a reference to the input wrapper: we'll use this to toggle * the controls visibility. */ self.inputWrapper = el.closest( '.wp-picker-input-wrap' ); el.iris( { target: self.pickerContainer, hide: self.options.hide, width: self.options.width, mode: self.options.mode, palettes: self.options.palettes, /** * Handles the onChange event if one has been defined in the options and additionally * sets the background color for the toggler element. * * @since 3.5.0 * * @ignore * * @param {Event} event The event that's being called. * @param {HTMLElement} ui The HTMLElement containing the color picker. * * @returns {void} */ change: function( event, ui ) { self.toggler.css( { backgroundColor: ui.color.toString() } ); if ( $.isFunction( self.options.change ) ) { self.options.change.call( this, event, ui ); } } } ); el.val( self.initialValue ); self._addListeners(); // Force the color picker to always be closed on initial load. if ( ! self.options.hide ) { self.toggler.click(); } }, /** * Binds event listeners to the color picker. * * @since 3.5.0 * * @access private * * @returns {void} */ _addListeners: function() { var self = this; /** * Prevent any clicks inside this widget from leaking to the top and closing it. * * @since 3.5.0 * * @param {Event} event The event that's being called. * * @returs {void} */ self.wrap.on( 'click.wpcolorpicker', function( event ) { event.stopPropagation(); }); /** * Open or close the color picker depending on the class. * * @since 3.5 */ self.toggler.click( function(){ if ( self.toggler.hasClass( 'wp-picker-open' ) ) { self.close(); } else { self.open(); } }); /** * Checks if value is empty when changing the color in the color picker. * If so, the background color is cleared. * * @since 3.5.0 * * @param {Event} event The event that's being called. * * @returns {void} */ self.element.change( function( event ) { var me = $( this ), val = me.val(); if ( val === '' || val === '#' ) { self.toggler.css( 'backgroundColor', '' ); // Fire clear callback if we have one. if ( $.isFunction( self.options.clear ) ) { self.options.clear.call( this, event ); } } }); /** * Enables the user to either clear the color in the color picker or revert back to the default color. * * @since 3.5.0 * * @param {Event} event The event that's being called. * * @returns {void} */ self.button.click( function( event ) { var me = $( this ); if ( me.hasClass( 'wp-picker-clear' ) ) { self.element.val( '' ); self.toggler.css( 'backgroundColor', '' ); if ( $.isFunction( self.options.clear ) ) { self.options.clear.call( this, event ); } } else if ( me.hasClass( 'wp-picker-default' ) ) { self.element.val( self.options.defaultColor ).change(); } }); }, /** * Opens the color picker dialog. * * @since 3.5.0 * * @returns {void} */ open: function() { this.element.iris( 'toggle' ); this.inputWrapper.removeClass( 'hidden' ); this.wrap.addClass( 'wp-picker-active' ); this.toggler .addClass( 'wp-picker-open' ) .attr( 'aria-expanded', 'true' ); $( 'body' ).trigger( 'click.wpcolorpicker' ).on( 'click.wpcolorpicker', this.close ); }, /** * Closes the color picker dialog. * * @since 3.5.0 * * @returns {void} */ close: function() { this.element.iris( 'toggle' ); this.inputWrapper.addClass( 'hidden' ); this.wrap.removeClass( 'wp-picker-active' ); this.toggler .removeClass( 'wp-picker-open' ) .attr( 'aria-expanded', 'false' ); $( 'body' ).off( 'click.wpcolorpicker', this.close ); }, /** * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color. * * @param newColor {string|*} The new color to use. Can be undefined. * * @since 3.5.0 * * @returns {string} The element's color */ color: function( newColor ) { if ( newColor === undef ) { return this.element.iris( 'option', 'color' ); } this.element.iris( 'option', 'color', newColor ); }, /** * Returns the iris object if no new default color is provided. * If a new default color is provided, it sets the new default color. * * @param newDefaultColor {string|*} The new default color to use. Can be undefined. * * @since 3.5.0 * * @returns {boolean|string} The element's color. */ defaultColor: function( newDefaultColor ) { if ( newDefaultColor === undef ) { return this.options.defaultColor; } this.options.defaultColor = newDefaultColor; } }; // Register the color picker as a widget. $.widget( 'wp.wpColorPicker', ColorPicker ); }( jQuery ) );
Save
cmd:
run