Changeset 43577
- Timestamp:
- 08/19/2018 01:32:27 PM (6 years ago)
- Location:
- trunk/src/js/_enqueues
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/common.js
r43347 r43577 4 4 5 5 /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */ 6 var showNotice, adminMenu, columns, validateForm, screenMeta; 6 /* global columns, screenMeta */ 7 7 8 8 /** … … 24 24 * @deprecated 3.3.0 25 25 */ 26 adminMenu = {26 window.adminMenu = { 27 27 init : function() {}, 28 28 fold : function() {}, … … 33 33 34 34 // Show/hide/save table columns. 35 columns = {35 window.columns = { 36 36 37 37 /** … … 159 159 * @returns {boolean} Returns true if all required fields are not an empty string. 160 160 */ 161 validateForm = function( form ) {161 window.validateForm = function( form ) { 162 162 return !$( form ) 163 163 .find( '.form-required' ) … … 179 179 * @returns {void} 180 180 */ 181 showNotice = {181 window.showNotice = { 182 182 183 183 /** … … 220 220 * @returns {void} 221 221 */ 222 screenMeta = {222 window.screenMeta = { 223 223 element: null, // #screen-meta 224 224 toggles: null, // .screen-meta-toggle -
trunk/src/js/_enqueues/admin/edit-comments.js
r43347 r43577 4 4 5 5 /* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ 6 var setCommentsList, theList, theExtraList, commentReply; 6 /* global commentReply, theExtraList, theList, setCommentsList */ 7 7 8 8 (function($) { … … 189 189 }; 190 190 191 setCommentsList = function() {191 window.setCommentsList = function() { 192 192 var totalInput, perPageInput, pageInput, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList, diff, 193 193 lastConfidentTime = 0; … … 565 565 }; 566 566 567 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );568 theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )567 window.theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); 568 window.theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ) 569 569 .bind('wpListDelEnd', function(e, s){ 570 570 var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, ''); … … 575 575 }; 576 576 577 commentReply = {577 window.commentReply = { 578 578 cid : '', 579 579 act : '', -
trunk/src/js/_enqueues/admin/inline-edit-post.js
r43347 r43577 6 6 */ 7 7 8 /* global inlineEditL10n, ajaxurl, typenow */8 /* global inlineEditL10n, ajaxurl, typenow, inlineEditPost */ 9 9 10 10 window.wp = window.wp || {}; … … 23 23 * 24 24 */ 25 var inlineEditPost;26 25 ( function( $, wp ) { 27 26 28 inlineEditPost = {27 window.inlineEditPost = { 29 28 30 29 /** -
trunk/src/js/_enqueues/admin/inline-edit-tax.js
r43347 r43577 5 5 */ 6 6 7 /* global inlineEditL10n, ajaxurl */7 /* global inlineEditL10n, ajaxurl, inlineEditTax */ 8 8 9 9 window.wp = window.wp || {}; … … 18 18 * suffixed. 19 19 */ 20 var inlineEditTax;21 22 20 ( function( $, wp ) { 23 21 24 inlineEditTax = {22 window.inlineEditTax = { 25 23 26 24 /** -
trunk/src/js/_enqueues/admin/media-upload.js
r43347 r43577 13 13 */ 14 14 15 /* global tinymce, QTags */ 16 17 var wpActiveEditor, send_to_editor; 15 /* global tinymce, QTags, wpActiveEditor, tb_position */ 18 16 19 17 /** … … 29 27 * sent to the editor. 30 28 */ 31 send_to_editor = function( html ) {29 window.send_to_editor = function( html ) { 32 30 var editor, 33 31 hasTinymce = typeof tinymce !== 'undefined', … … 38 36 if ( hasTinymce && tinymce.activeEditor ) { 39 37 editor = tinymce.activeEditor; 40 w pActiveEditor = editor.id;38 window.wpActiveEditor = editor.id; 41 39 } else if ( ! hasQuicktags ) { 42 40 return false; … … 65 63 }; 66 64 67 var tb_position;68 65 (function($) { 69 66 /** … … 78 75 * ThickBox anchors. 79 76 */ 80 tb_position = function() {77 window.tb_position = function() { 81 78 var tbWindow = $('#TB_window'), 82 79 width = $(window).width(), -
trunk/src/js/_enqueues/admin/media.js
r43347 r43577 11 11 */ 12 12 13 /* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */ 14 15 var findPosts; 13 /* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice, findPosts */ 16 14 17 15 ( function( $ ){ 18 findPosts = {16 window.findPosts = { 19 17 /** 20 18 * Opens a dialog to attach media to a post. -
trunk/src/js/_enqueues/admin/plugin-install.js
r43347 r43577 5 5 */ 6 6 7 /* global plugininstallL10n, tb_click, tb_remove */8 var tb_position; 7 /* global plugininstallL10n, tb_click, tb_remove, tb_position */ 8 9 9 jQuery( document ).ready( function( $ ) { 10 10 … … 19 19 $body = $( document.body ); 20 20 21 tb_position = function() {21 window.tb_position = function() { 22 22 var width = $( window ).width(), 23 23 H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ), -
trunk/src/js/_enqueues/admin/post.js
r43347 r43577 6 6 7 7 /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ 8 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */9 10 var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink; 8 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */ 9 /* global WPSetThumbnailHTML, wptitlehint */ 10 11 11 // Backwards compatibility: prevent fatal errors. 12 makeSlugeditClickable =editPermalink = function(){};12 window.makeSlugeditClickable = window.editPermalink = function(){}; 13 13 14 14 // Make sure the wp object exists. … … 25 25 * @namespace commentsBox 26 26 */ 27 commentsBox = {27 window.commentsBox = { 28 28 // Comment offset to use when fetching new comments. 29 29 st : 0, … … 109 109 * @global 110 110 */ 111 WPSetThumbnailHTML = function(html){111 window.WPSetThumbnailHTML = function(html){ 112 112 $('.inside', '#postimagediv').html(html); 113 113 }; … … 120 120 * @global 121 121 */ 122 WPSetThumbnailID = function(id){122 window.WPSetThumbnailID = function(id){ 123 123 var field = $('input[value="_thumbnail_id"]', '#list-table'); 124 124 if ( field.length > 0 ) { … … 134 134 * @global 135 135 */ 136 WPRemoveThumbnail = function(nonce){136 window.WPRemoveThumbnail = function(nonce){ 137 137 $.post(ajaxurl, { 138 138 action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) … … 1049 1049 * @returns void 1050 1050 */ 1051 w ptitlehint = function(id) {1051 window.wptitlehint = function(id) { 1052 1052 id = id || 'title'; 1053 1053 -
trunk/src/js/_enqueues/admin/postbox.js
r43347 r43577 8 8 */ 9 9 10 /* global ajaxurl, postBoxL10n */ 11 12 /** 13 * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see 14 * around the content on the edit page. 15 * 16 * @since 2.7.0 17 * 18 * @namespace postboxes 19 * 20 * @type {Object} 21 */ 22 var postboxes; 10 /* global ajaxurl, postBoxL10n, postboxes */ 23 11 24 12 (function($) { 25 13 var $document = $( document ); 26 14 27 postboxes = { 15 /** 16 * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see 17 * around the content on the edit page. 18 * 19 * @since 2.7.0 20 * 21 * @namespace postboxes 22 * 23 * @type {Object} 24 */ 25 window.postboxes = { 28 26 29 27 /** -
trunk/src/js/_enqueues/admin/set-post-thumbnail.js
r43347 r43577 6 6 /* exported WPSetAsThumbnail */ 7 7 8 function WPSetAsThumbnail( id, nonce ) {8 window.WPSetAsThumbnail = function( id, nonce ) { 9 9 var $link = jQuery('a#wp-post-thumbnail-' + id); 10 10 … … 26 26 } 27 27 ); 28 } 28 }; -
trunk/src/js/_enqueues/admin/tags-box.js
r43347 r43577 4 4 5 5 /* jshint curly: false, eqeqeq: false */ 6 /* global ajaxurl */ 7 8 var tagBox, array_unique_noempty; 6 /* global ajaxurl, tagBox, array_unique_noempty */ 9 7 10 8 ( function( $ ) { … … 25 23 * @return {Array} A new array containing only the unique items. 26 24 */ 27 array_unique_noempty = function( array ) {25 window.array_unique_noempty = function( array ) { 28 26 var out = []; 29 27 … … 50 48 * @global 51 49 */ 52 tagBox = {50 window.tagBox = { 53 51 /** 54 52 * Cleans up tags by removing redundant characters. -
trunk/src/js/_enqueues/admin/widgets.js
r43347 r43577 3 3 */ 4 4 5 /* global ajaxurl, isRtl */6 var wpWidgets; 5 /* global ajaxurl, isRtl, wpWidgets */ 6 7 7 (function($) { 8 8 var $document = $( document ); 9 9 10 w pWidgets = {10 window.wpWidgets = { 11 11 /** 12 12 * A closed Sidebar that gets a Widget dragged over it. -
trunk/src/js/_enqueues/lib/ajax-response.js
r43347 r43577 3 3 */ 4 4 5 var wpAjax = jQuery.extend( { 5 /* global wpAjax */ 6 7 window.wpAjax = jQuery.extend( { 6 8 unserialize: function( s ) { 7 9 var r = {}, q, pp, i, p; -
trunk/src/js/_enqueues/lib/comment-reply.js
r43347 r43577 9 9 * @type {Object} 10 10 */ 11 var addComment; 12 addComment = ( function( window ) { 11 window.addComment = ( function( window ) { 13 12 // Avoid scope lookups on commonly used variables. 14 13 var document = window.document; -
trunk/src/js/_enqueues/lib/cookies.js
r43347 r43577 5 5 */ 6 6 7 /* global userSettings */7 /* global userSettings, getAllUserSettings, wpCookies, setUserSetting */ 8 8 /* exported getUserSetting, setUserSetting, deleteUserSetting */ 9 9 10 varwpCookies = {10 window.wpCookies = { 11 11 // The following functions are from Cookie.js class in TinyMCE 3, Moxiecode, used under LGPL. 12 12 … … 140 140 141 141 // Returns the value as string. Second arg or empty string is returned when value is not set. 142 function getUserSetting( name, def ) {142 window.getUserSetting = function( name, def ) { 143 143 var settings = getAllUserSettings(); 144 144 … … 152 152 153 153 return ''; 154 } 154 }; 155 155 156 156 // Both name and value must be only ASCII letters, numbers or underscore 157 157 // and the shorter, the better (cookies can store maximum 4KB). Not suitable to store text. 158 158 // The value is converted and stored as string. 159 function setUserSetting( name, value, _del ) {159 window.setUserSetting = function( name, value, _del ) { 160 160 if ( 'object' !== typeof userSettings ) { 161 161 return false; … … 187 187 188 188 return name; 189 } 190 191 function deleteUserSetting( name ) {189 }; 190 191 window.deleteUserSetting = function( name ) { 192 192 return setUserSetting( name, '', 1 ); 193 } 193 }; 194 194 195 195 // Returns all settings as js object. 196 function getAllUserSettings() {196 window.getAllUserSettings = function() { 197 197 if ( 'object' !== typeof userSettings ) { 198 198 return {}; … … 200 200 201 201 return wpCookies.getHash( 'wp-settings-' + userSettings.uid ) || {}; 202 } 202 }; -
trunk/src/js/_enqueues/lib/gallery.js
r43347 r43577 3 3 */ 4 4 5 /* global unescape, getUserSetting, setUserSetting */5 /* global unescape, getUserSetting, setUserSetting, wpgallery, tinymce */ 6 6 7 7 jQuery(document).ready(function($) { … … 89 89 }); 90 90 91 jQuery(window).unload( function () { tinymce = tinyMCE =wpgallery = null; } ); // Cleanup91 jQuery(window).unload( function () { window.tinymce = window.tinyMCE = window.wpgallery = null; } ); // Cleanup 92 92 93 93 /* gallery settings */ 94 var tinymce = null, tinyMCE, wpgallery;95 96 w pgallery = {94 window.tinymce = null; 95 96 window.wpgallery = { 97 97 mcemode : false, 98 98 editor : {}, … … 124 124 125 125 // Find window & API 126 tinymce = w.tinymce;127 tinyMCE = w.tinyMCE;126 window.tinymce = w.tinymce; 127 window.tinyMCE = w.tinyMCE; 128 128 t.editor = tinymce.EditorManager.activeEditor; 129 129 -
trunk/src/js/_enqueues/lib/link.js
r43347 r43577 3 3 */ 4 4 5 var wpLink; 5 /* global wpLink */ 6 6 7 7 ( function( $, wpLinkL10n, wp ) { … … 17 17 } 18 18 19 w pLink = {19 window.wpLink = { 20 20 timeToTriggerRiver: 150, 21 21 minRiverAJAXDuration: 200, -
trunk/src/js/_enqueues/lib/nav-menu.js
r43347 r43577 10 10 */ 11 11 12 /* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */ 13 14 /** 15 * Contains all the functions to handle WordPress navigation menus administration. 16 * 17 * @namespace 18 */ 19 var wpNavMenu; 12 /* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl, wpNavMenu */ 20 13 21 14 (function($) { … … 23 16 var api; 24 17 25 api = wpNavMenu = { 18 /** 19 * Contains all the functions to handle WordPress navigation menus administration. 20 * 21 * @namespace wpNavMenu 22 */ 23 api = window.wpNavMenu = { 26 24 27 25 options : { -
trunk/src/js/_enqueues/lib/quicktags.js
r43347 r43577 25 25 // http://www.alexking.org/ 26 26 27 /* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */ 28 29 var QTags, edCanvas, 30 edButtons = []; 27 /* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt, edButtons */ 28 29 window.edButtons = []; 31 30 32 31 /* jshint ignore:start */ … … 37 36 * Define all former global functions so plugins that hack quicktags.js directly don't cause fatal errors. 38 37 */ 39 varedAddTag = function(){},40 edCheckOpenTags = function(){},41 edCloseAllTags = function(){},42 edInsertImage = function(){},43 edInsertLink = function(){},44 edInsertTag = function(){},45 edLink = function(){},46 edQuickLink = function(){},47 edRemoveTag = function(){},48 edShowButton = function(){},49 edShowLinks = function(){},50 edSpell = function(){},51 edToolbar = function(){};38 window.edAddTag = function(){}, 39 window.edCheckOpenTags = function(){}, 40 window.edCloseAllTags = function(){}, 41 window.edInsertImage = function(){}, 42 window.edInsertLink = function(){}, 43 window.edInsertTag = function(){}, 44 window.edLink = function(){}, 45 window.edQuickLink = function(){}, 46 window.edRemoveTag = function(){}, 47 window.edShowButton = function(){}, 48 window.edShowLinks = function(){}, 49 window.edSpell = function(){}, 50 window.edToolbar = function(){}; 52 51 53 52 /** 54 53 * Initialize new instance of the Quicktags editor 55 54 */ 56 function quicktags(settings) {55 window.quicktags = function(settings) { 57 56 return new QTags(settings); 58 57 } … … 64 63 * @see QTags.insertContent() 65 64 */ 66 function edInsertContent(bah, txt) {65 window.edInsertContent = function(bah, txt) { 67 66 return QTags.insertContent(txt); 68 67 } … … 74 73 * @see QTags.addButton() 75 74 */ 76 function edButton(id, display, tagStart, tagEnd, access) {75 window.edButton = function(id, display, tagStart, tagEnd, access) { 77 76 return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 ); 78 77 } … … 154 153 zeroise( now.getUTCSeconds() ) + 155 154 '+00:00'; 156 })(), 157 qt; 158 159 qt = QTags = function(settings) { 155 })(); 156 157 var qt = window.QTags = function(settings) { 160 158 if ( typeof(settings) === 'string' ) { 161 159 settings = {id: settings}; … … 181 179 if ( id === 'content' && typeof(adminpage) === 'string' && ( adminpage === 'post-new-php' || adminpage === 'post-php' ) ) { 182 180 // back compat hack :-( 183 edCanvas = canvas;181 window.edCanvas = canvas; 184 182 toolbar_id = 'ed_toolbar'; 185 183 } else { -
trunk/src/js/_enqueues/wp/dashboard.js
r43347 r43577 3 3 */ 4 4 5 /* global pagenow, ajaxurl, postboxes, wpActiveEditor:true */6 var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad; 5 /* global pagenow, ajaxurl, postboxes, wpActiveEditor:true, ajaxWidgets */ 6 /* global ajaxPopulateWidgets, quickPressLoad, */ 7 7 window.wp = window.wp || {}; 8 8 … … 62 62 * @global 63 63 */ 64 ajaxWidgets = ['dashboard_primary'];64 window.ajaxWidgets = ['dashboard_primary']; 65 65 66 66 /** … … 75 75 * @returns {void} 76 76 */ 77 ajaxPopulateWidgets = function(el) {77 window.ajaxPopulateWidgets = function(el) { 78 78 /** 79 79 * Fetch the latest representation of the widget via Ajax and show it. … … 130 130 * @returns {void} 131 131 */ 132 quickPressLoad = function() {132 window.quickPressLoad = function() { 133 133 var act = $('#quickpost-action'), t; 134 134 … … 211 211 autoResizeTextarea(); 212 212 }; 213 quickPressLoad();213 window.quickPressLoad(); 214 214 215 215 // Enable the dragging functionality of the widgets. -
trunk/src/js/_enqueues/wp/password-strength-meter.js
r43347 r43577 6 6 window.wp = window.wp || {}; 7 7 8 var passwordStrength;9 8 (function($){ 10 9 … … 119 118 * @type {wp.passwordStrength.meter} 120 119 */ 121 passwordStrength = wp.passwordStrength.meter;120 window.passwordStrength = wp.passwordStrength.meter; 122 121 })(jQuery); -
trunk/src/js/_enqueues/wp/theme.js
r43347 r43577 3 3 */ 4 4 5 /* global _wpThemeSettings, confirm */5 /* global _wpThemeSettings, confirm, tb_position */ 6 6 window.wp = window.wp || {}; 7 7 … … 2042 2042 2043 2043 // Align theme browser thickbox 2044 var tb_position;2045 2044 jQuery(document).ready( function($) { 2046 tb_position = function() {2045 window.tb_position = function() { 2047 2046 var tbWindow = $('#TB_window'), 2048 2047 width = $(window).width(),
Note: See TracChangeset
for help on using the changeset viewer.