Ticket #2668: 2668.patch
File 2668.patch, 2.7 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
108 108 switch ( $hook_suffix ) { 109 109 case 'post.php': 110 110 wp_enqueue_style( 'plugin-admin-post-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 4 ); 111 wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 1);111 wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 2 ); 112 112 wp_localize_script( 'plugin-admin-post-js', 'pluginDirectory', array( 113 113 'removeCommitterAYS' => __( 'Are you sure you want to remove this committer?', 'wporg-plugins' ), 114 114 ) ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js
22 22 _.each( $( '#post-body' ).find( '.comments-box' ), PluginEdit.loadComments ); 23 23 24 24 $( '#add-new-comment' ).on( 'click', 'a.button', PluginEdit.prepareCommentForm ); 25 $( '#the-comment-list' ).on( 'click', '.reply a', PluginEdit.addCommentTypeField ); 25 26 26 27 $( '#add-committer-toggle' ).on( 'click', PluginEdit.toggleCommitterForm ); 27 28 … … 107 108 108 109 window.commentReply && commentReply.addcomment( $( '#post_ID' ).val() ); 109 110 110 // Add a field with the custom comment type. 111 $( '#replyrow' ).find( '.comment-reply' ).append( $( '<input/>' ).attr({ 112 type: 'hidden', 113 name: 'comment_type', 114 value: $( '.comments-box' ).data( 'comment-type' ) 115 }) ); 111 PluginEdit.addCommentTypeField( event ); 116 112 }, 117 113 114 addCommentTypeField: function( event ) { 115 if ( 0 === $( '#replyrow' ).find( '.comment-reply input[name="comment_type"]' ).length ) { 116 // Add a field with the custom comment type. 117 $( '#replyrow' ).find( '.comment-reply' ).append( $( '<input/>' ).attr({ 118 type: 'hidden', 119 name: 'comment_type', 120 value: $( '.comments-box' ).data( 'comment-type' ) 121 }) ); 122 } 123 }, 124 118 125 toggleCommitterForm: function( event ) { 119 126 var $form = $( '#add-committer' ); 120 127