-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
… area
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* @output wp-includes/js/admin-media.js | ||
*/ | ||
/** | ||
* Admin media event handlers. | ||
* | ||
* @since 5.3.1 | ||
* | ||
* @param {Object} document The document object. | ||
* @param {Object} window The window object. | ||
This comment has been minimized.
Sorry, something went wrong. |
||
* @param {Object} navigator The navigator object. | ||
* | ||
* @return {void} | ||
*/ | ||
( function( document, window, navigator ) { | ||
document.addEventListener( 'DOMContentLoaded', function() { | ||
document.querySelectorAll( '.imgedit-open-btn' ).forEach( function (item) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
item.addEventListener( 'click', function() { | ||
imageEdit.open( parseInt( item.dataset.postId ), item.dataset.nonce ); | ||
} ); | ||
} ); | ||
|
||
document.querySelectorAll( '.del-link' ).forEach( function (item) { | ||
item.addEventListener( 'click', function() { | ||
|
||
document.getElementById( 'del_attachment_' + item.dataset.attachmentId ).style.display = 'block'; | ||
return false; | ||
This comment has been minimized.
Sorry, something went wrong.
vrana
|
||
} ); | ||
} ); | ||
|
||
document.querySelectorAll( '.cancel-del-link' ).forEach( function (item) { | ||
item.addEventListener( 'click', function() { | ||
this.parentNode.style.display = 'none'; | ||
return false; | ||
} ); | ||
} ); | ||
|
||
|
||
document.querySelectorAll( '.wp-post-thumbnail' ).forEach( function (item) { | ||
item.addEventListener( 'click', function() { | ||
WPSetAsThumbnail( item.dataset.attachmentId, item.dataset.ajaxNonce ); | ||
return false; | ||
} ); | ||
} ); | ||
|
||
|
||
document.getElementById( 'cancel-async-upload' ).addEventListener( 'click' , function () { | ||
try{ | ||
This comment has been minimized.
Sorry, something went wrong. |
||
top.tb_remove(); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} catch(e) {}; | ||
return false; | ||
}); | ||
|
||
[ document.getElementById( 'update-gallery' ), document.getElementById( 'insert-gallery' )] | ||
This comment has been minimized.
Sorry, something went wrong.
vrana
|
||
.forEach( function (item) { | ||
item.addEventListener( 'mousedown' , function () { | ||
wpgallery.update(); | ||
}); | ||
}); | ||
|
||
|
||
} ); | ||
|
||
|
||
|
||
} )( document, window, navigator ); |
These are not used. Why they are passed?