┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
webm008.cluster103.gra.hosting.ovh.net
LOCATION:
/home/paxmediccp/www/old wp/wp-content/themes/cosmos-child/admin/js
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: upload.js
jQuery( document ).ready(function( $ ) { $('.custom_media_upload').click(function(e) { e.preventDefault(); var custom_uploader = wp.media({ title: 'Select Image for Cosmos 125x125 Banner', button: { text: 'Insert Banner to Widget', }, multiple: false // Set this to true to allow multiple files to be selected }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $('.custom_media_image').attr('src', attachment.url); $('.custom_media_url').val(attachment.url); $('.custom_media_id').val(attachment.id); }) .open(); }); $('.custom_media_upload2').click(function(e) { e.preventDefault(); var custom_uploader = wp.media({ title: 'Select Image for Cosmos 125x125 Banner', button: { text: 'Insert Banner to Widget', }, multiple: false // Set this to true to allow multiple files to be selected }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $('.custom_media_image2').attr('src', attachment.url); $('.custom_media_url2').val(attachment.url); $('.custom_media_id2').val(attachment.id); }) .open(); }); $('.custom_media_upload3').click(function(e) { e.preventDefault(); var custom_uploader = wp.media({ title: 'Select Image for Cosmos 125x125 Banner', button: { text: 'Insert Banner to Widget', }, multiple: false // Set this to true to allow multiple files to be selected }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $('.custom_media_image3').attr('src', attachment.url); $('.custom_media_url3').val(attachment.url); $('.custom_media_id3').val(attachment.id); }) .open(); }); $('.custom_media_upload4').click(function(e) { e.preventDefault(); var custom_uploader = wp.media({ title: 'Select Image for Cosmos 125x125 Banner', button: { text: 'Insert Banner to Widget', }, multiple: false // Set this to true to allow multiple files to be selected }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $('.custom_media_image4').attr('src', attachment.url); $('.custom_media_url4').val(attachment.url); $('.custom_media_id4').val(attachment.id); }) .open(); }); $('.map_img_upload').click(function(e) { e.preventDefault(); var custom_uploader = wp.media({ title: 'Map Widget Image', button: { text: 'Insert Image to Map Widget', }, multiple: false // Set this to true to allow multiple files to be selected }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $('.map_img_src').attr('src', attachment.url); $('.map_img_url').val(attachment.url); $('.map_upload_id5').val(attachment.id); }) .open(); }); });
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 upload.js
JS
3.4 KB
2016-06-06 18:48
EDIT