wp/wp-admin/js/media.js
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
--- a/wp/wp-admin/js/media.js	Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-admin/js/media.js	Mon Oct 14 18:28:13 2019 +0200
@@ -1,21 +1,21 @@
-/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */
-
 /**
- * @summary Creates a dialog containing posts that can have a particular media attached to it.
+ * Creates a dialog containing posts that can have a particular media attached
+ * to it.
  *
  * @since 2.7.0
+ * @output wp-admin/js/media.js
  *
- * @global
- * @namespace
+ * @namespace findPosts
  *
  * @requires jQuery
  */
-var findPosts;
+
+/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice, findPosts */
 
 ( function( $ ){
-	findPosts = {
+	window.findPosts = {
 		/**
-		 * @summary Opens a dialog to attach media to a post.
+		 * Opens a dialog to attach media to a post.
 		 *
 		 * Adds an overlay prior to retrieving a list of posts to attach the media to.
 		 *
@@ -59,7 +59,7 @@
 		},
 
 		/**
-		 * @summary Clears the found posts lists before hiding the attach media dialog.
+		 * Clears the found posts lists before hiding the attach media dialog.
 		 *
 		 * @since 2.7.0
 		 *
@@ -74,7 +74,8 @@
 		},
 
 		/**
-		 * @summary Binds a click event listener to the overlay which closes the attach media dialog.
+		 * Binds a click event listener to the overlay which closes the attach media
+		 * dialog.
 		 *
 		 * @since 3.5.0
 		 *
@@ -89,10 +90,11 @@
 		},
 
 		/**
-		 * @summary Retrieves and displays posts based on the search term.
+		 * Retrieves and displays posts based on the search term.
 		 *
-		 * Sends a post request to the admin_ajax.php, requesting posts based on the search term provided by the user.
-		 * Defaults to all posts if no search term is provided.
+		 * Sends a post request to the admin_ajax.php, requesting posts based on the
+		 * search term provided by the user. Defaults to all posts if no search term is
+		 * provided.
 		 *
 		 * @since 2.7.0
 		 *
@@ -111,8 +113,8 @@
 			spinner.addClass( 'is-active' );
 
 			/**
-			 * Send a POST request to admin_ajax.php, hide the spinner and replace the list of posts with the response data.
-			 * If an error occurs, display it.
+			 * Send a POST request to admin_ajax.php, hide the spinner and replace the list
+			 * of posts with the response data. If an error occurs, display it.
 			 */
 			$.ajax( ajaxurl, {
 				type: 'POST',
@@ -133,7 +135,8 @@
 	};
 
 	/**
-	 * @summary Initializes the file once the DOM is fully loaded and attaches events to the various form elements.
+	 * Initializes the file once the DOM is fully loaded and attaches events to the
+	 * various form elements.
 	 *
 	 * @returns {void}
 	 */
@@ -193,7 +196,7 @@
 		});
 
 		/**
-		 * @summary Enables clicking on the entire table row.
+		 * Enables clicking on the entire table row.
 		 *
 		 * @returns {void}
 		 */