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: inline-edit-tax.js
/** * This file is used on the term overview page to power quick-editing terms. * * @output site-admin/js/inline-edit-tax.js */ /* global inlineEditL10n, ajaxurl, inlineEditTax */ window.wp = window.wp || {}; /** * Consists of functions relevant to the inline taxonomy editor. * * @namespace inlineEditTax * * @property {string} type The type of inline edit we are currently on. * @property {string} what The type property with a hash prefixed and a dash * suffixed. */ ( function( $, wp ) { window.inlineEditTax = { /** * Initializes the inline taxonomy editor by adding event handlers to be able to * quick edit. * * @since 2.7.0 * * @this inlineEditTax * @memberof inlineEditTax * @returns {void} */ init : function() { var t = this, row = $('#inline-edit'); t.type = $('#the-list').attr('data-wp-lists').substr(5); t.what = '#'+t.type+'-'; $( '#the-list' ).on( 'click', '.editinline', function() { $( this ).attr( 'aria-expanded', 'true' ); inlineEditTax.edit( this ); }); /** * Cancels inline editing when pressing escape inside the inline editor. * * @param {Object} e The keyup event that has been triggered. */ row.keyup( function( e ) { // 27 = [escape] if ( e.which === 27 ) { return inlineEditTax.revert(); } }); /** * Cancels inline editing when clicking the cancel button. */ $( '.cancel', row ).click( function() { return inlineEditTax.revert(); }); /** * Saves the inline edits when clicking the save button. */ $( '.save', row ).click( function() { return inlineEditTax.save(this); }); /** * Saves the inline edits when pressing enter inside the inline editor. */ $( 'input, select', row ).keydown( function( e ) { // 13 = [enter] if ( e.which === 13 ) { return inlineEditTax.save( this ); } }); /** * Saves the inline edits on submitting the inline edit form. */ $( '#posts-filter input[type="submit"]' ).mousedown( function() { t.revert(); }); }, /** * Toggles the quick edit based on if it is currently shown or hidden. * * @since 2.7.0 * * @this inlineEditTax * @memberof inlineEditTax * * @param {HTMLElement} el An element within the table row or the table row * itself that we want to quick edit. * @returns {void} */ toggle : function(el) { var t = this; $(t.what+t.getId(el)).css('display') === 'none' ? t.revert() : t.edit(el); }, /** * Shows the quick editor * * @since 2.7.0 * * @this inlineEditTax * @memberof inlineEditTax * * @param {string|HTMLElement} id The ID of the term we want to quick edit or an * element within the table row or the * table row itself. * @returns {boolean} Always returns false. */ edit : function(id) { var editRow, rowData, val, t = this; t.revert(); // Makes sure we can pass an HTMLElement as the ID. if ( typeof(id) === 'object' ) { id = t.getId(id); } editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length ); $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>'); val = $('.name', rowData); val.find( 'img' ).replaceWith( function() { return this.alt; } ); val = val.text(); $(':input[name="name"]', editRow).val( val ); val = $('.slug', rowData); val.find( 'img' ).replaceWith( function() { return this.alt; } ); val = val.text(); $(':input[name="slug"]', editRow).val( val ); $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); $('.ptitle', editRow).eq(0).focus(); return false; }, /** * Saves the quick edit data. * * Saves the quick edit data to the server and replaces the table row with the * HTML retrieved from the server. * * @since 2.7.0 * * @this inlineEditTax * @memberof inlineEditTax * * @param {string|HTMLElement} id The ID of the term we want to quick edit or an * element within the table row or the * table row itself. * @returns {boolean} Always returns false. */ save : function(id) { var params, fields, tax = $('input[name="taxonomy"]').val() || ''; // Makes sure we can pass an HTMLElement as the ID. if( typeof(id) === 'object' ) { id = this.getId(id); } $( 'table.widefat .spinner' ).addClass( 'is-active' ); params = { action: 'inline-save-tax', tax_type: this.type, tax_ID: id, taxonomy: tax }; fields = $('#edit-'+id).find(':input').serialize(); params = fields + '&' + $.param(params); // Do the ajax request to save the data to the server. $.post( ajaxurl, params, /** * Handles the response from the server * * Handles the response from the server, replaces the table row with the response * from the server. * * @param {string} r The string with which to replace the table row. */ function(r) { var row, new_id, option_value, $errorNotice = $( '#edit-' + id + ' .inline-edit-save .notice-error' ), $error = $errorNotice.find( '.error' ); $( 'table.widefat .spinner' ).removeClass( 'is-active' ); if (r) { if ( -1 !== r.indexOf( '<tr' ) ) { $(inlineEditTax.what+id).siblings('tr.hidden').addBack().remove(); new_id = $(r).attr('id'); $('#edit-'+id).before(r).remove(); if ( new_id ) { option_value = new_id.replace( inlineEditTax.type + '-', '' ); row = $( '#' + new_id ); } else { option_value = id; row = $( inlineEditTax.what + id ); } // Update the value in the Parent dropdown. $( '#parent' ).find( 'option[value=' + option_value + ']' ).text( row.find( '.row-title' ).text() ); row.hide().fadeIn( 400, function() { // Move focus back to the Quick Edit button. row.find( '.editinline' ) .attr( 'aria-expanded', 'false' ) .focus(); wp.a11y.speak( inlineEditL10n.saved ); }); } else { $errorNotice.removeClass( 'hidden' ); $error.html( r ); /* * Some error strings may contain HTML entities (e.g. `“`), let's use * the HTML element's text. */ wp.a11y.speak( $error.text() ); } } else { $errorNotice.removeClass( 'hidden' ); $error.html( inlineEditL10n.error ); wp.a11y.speak( inlineEditL10n.error ); } } ); // Prevent submitting the form when pressing Enter on a focused field. return false; }, /** * Closes the quick edit form. * * @since 2.7.0 * * @this inlineEditTax * @memberof inlineEditTax * @returns {void} */ revert : function() { var id = $('table.widefat tr.inline-editor').attr('id'); if ( id ) { $( 'table.widefat .spinner' ).removeClass( 'is-active' ); $('#'+id).siblings('tr.hidden').addBack().remove(); id = id.substr( id.lastIndexOf('-') + 1 ); // Show the taxonomy row and move focus back to the Quick Edit button. $( this.what + id ).show().find( '.editinline' ) .attr( 'aria-expanded', 'false' ) .focus(); } }, /** * Retrieves the ID of the term of the element inside the table row. * * @since 2.7.0 * * @memberof inlineEditTax * * @param {HTMLElement} o An element within the table row or the table row itself. * @returns {string} The ID of the term based on the element. */ getId : function(o) { var id = o.tagName === 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-'); return parts[parts.length - 1]; } }; $(document).ready(function(){inlineEditTax.init();}); })( jQuery, window.wp );
Save