golden hour
/var/softaculous/sitepad/editor/site-admin/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
accordion.js
2.89 KB
Del
OK
accordion.min.js
835 B
Del
OK
admin-custom.js
5.28 KB
Del
OK
bootstrap.min.js
56.71 KB
Del
OK
code-editor.js
11.32 KB
Del
OK
code-editor.min.js
3.09 KB
Del
OK
color-picker.js
9.59 KB
Del
OK
color-picker.min.js
3.44 KB
Del
OK
comment.js
2.73 KB
Del
OK
comment.min.js
1.22 KB
Del
OK
common.js
41.77 KB
Del
OK
common.min.js
15.02 KB
Del
OK
custom-background.js
3.27 KB
Del
OK
custom-background.min.js
1.12 KB
Del
OK
customize-controls.js
283.99 KB
Del
OK
customize-controls.min.js
109.36 KB
Del
OK
customize-nav-menus.js
106.46 KB
Del
OK
customize-nav-menus.min.js
45.38 KB
Del
OK
edit-comments.js
27.89 KB
Del
OK
edit-comments.min.js
14.72 KB
Del
OK
editor-expand.js
41.48 KB
Del
OK
editor-expand.min.js
13.2 KB
Del
OK
editor.js
44.25 KB
Del
OK
editor.min.js
13.12 KB
Del
OK
gallery.js
5.51 KB
Del
OK
gallery.min.js
3.75 KB
Del
OK
image-edit.js
28.61 KB
Del
OK
image-edit.min.js
9.99 KB
Del
OK
inline-edit-post.js
15.93 KB
Del
OK
inline-edit-post.min.js
7.16 KB
Del
OK
inline-edit-tax.js
7.52 KB
Del
OK
inline-edit-tax.min.js
2.82 KB
Del
OK
iris.min.js
23.05 KB
Del
OK
language-chooser.js
875 B
Del
OK
language-chooser.min.js
374 B
Del
OK
link.js
3.79 KB
Del
OK
link.min.js
1.61 KB
Del
OK
media-gallery.js
1.19 KB
Del
OK
media-gallery.min.js
537 B
Del
OK
media-upload.js
3.38 KB
Del
OK
media-upload.min.js
1.1 KB
Del
OK
media.js
5.11 KB
Del
OK
media.min.js
1.82 KB
Del
OK
nav-menu.js
41.48 KB
Del
OK
nav-menu.min.js
20.75 KB
Del
OK
password-strength-meter.js
3.1 KB
Del
OK
password-strength-meter.min.js
769 B
Del
OK
post.js
36.51 KB
Del
OK
post.min.js
17.88 KB
Del
OK
postbox.js
11.49 KB
Del
OK
postbox.min.js
4.09 KB
Del
OK
revisions.js
33 KB
Del
OK
revisions.min.js
17.51 KB
Del
OK
set-post-thumbnail.js
843 B
Del
OK
set-post-thumbnail.min.js
533 B
Del
OK
svg-painter.js
5.39 KB
Del
OK
svg-painter.min.js
2.35 KB
Del
OK
tags-box.js
10.83 KB
Del
OK
tags-box.min.js
3.07 KB
Del
OK
tags-suggest.js
5.12 KB
Del
OK
tags-suggest.min.js
2.12 KB
Del
OK
tags.js
4.25 KB
Del
OK
tags.min.js
1.67 KB
Del
OK
theme.js
53.11 KB
Del
OK
theme.min.js
25.99 KB
Del
OK
trail.js
4.39 KB
Del
OK
updates.js
78.62 KB
Del
OK
updates.min.js
34.96 KB
Del
OK
user-profile.js
11.96 KB
Del
OK
user-profile.min.js
6.17 KB
Del
OK
user-suggest.js
2.27 KB
Del
OK
user-suggest.min.js
679 B
Del
OK
word-count.js
7.51 KB
Del
OK
word-count.min.js
1.47 KB
Del
OK
wp-fullscreen-stub.js
680 B
Del
OK
wp-fullscreen-stub.min.js
331 B
Del
OK
xfn.js
7.53 KB
Del
OK
xfn.min.js
3.42 KB
Del
OK
Edit: color-picker.js
/** * @output site-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