░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/cultivarts/wp-content/plugins/seo-ultimate/plugin/sdf
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: sdf.media.upload.js
/*global jQuery:false */ (function($) { "use strict"; jQuery(document).ready(function($) { // sdf media upload var sdf_image_media_frame; $(document.body).on('click.sdf-open-media-manager', '.sdf-open-media', function(e) { e.preventDefault(); var current_widget_form = $(e.currentTarget).parents('form:first'); if ( sdf_image_media_frame ) { sdf_image_media_frame.open(); return; } sdf_image_media_frame = wp.media.frames.sdf_image_media_frame = wp.media({ className: 'media-frame sdf-image-media-frame', frame: 'select', multiple: false, title: 'Choose an Image', library: { type: 'image' }, button: { text: 'Insert into the Widget' } }); sdf_image_media_frame.on('select', function() { var media_attachment = sdf_image_media_frame.state().get('selection').first().toJSON(); current_widget_form.find('.sdf-image-url').val(media_attachment.url) current_widget_form.find('.sdf-image-preview').attr('src', media_attachment.url) }); sdf_image_media_frame.open(); }); $( ".wpu-media-upload" ).click( function( e ) { e.preventDefault(); var activeFileUploadContext = $(this).parent().parent(), custom_file_frame = null, item_clicked = $(this); // Create the media frame. custom_file_frame = wp.media.frames.customHeader = wp.media({ title: $(this).data( "choose" ), library: { type: 'image' }, button: { text: $(this).data( "update" ) } }); custom_file_frame.on( "select", function() { var attachment = custom_file_frame.state().get( "selection" ).first(); // Update value of the targetfield input with the attachment url. //$( '.mfn-opts-screenshot', activeFileUploadContext ).attr( 'src', attachment.attributes.url ); $( 'input.wpu-image', activeFileUploadContext ) .val( attachment.attributes.url ) .trigger( 'change' ); //$( '.wpu-media-upload', activeFileUploadContext ).hide(); // $( '.mfn-opts-screenshot', activeFileUploadContext ).show(); }); custom_file_frame.open(); }); }); })(jQuery);
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 bootstrap/
DIR
—
2016-12-07 07:10
📄 sdf.media.upload.js
JS
2.1 KB
2016-12-07 07:10
EDIT
📄 sdf.wp-color.css
CSS
291 B
2016-12-07 07:10
EDIT
📄 sdf.wp.css
CSS
150 B
2016-12-07 07:10
EDIT