117 | 117 | $( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) { |
118 | 118 | $( element ).wpTagsSuggest(); |
119 | 119 | } ); |
120 | 120 | } |
121 | 121 | $('html, body').animate( { scrollTop: 0 }, 'fast' ); |
122 | 122 | }, |
123 | 123 | |
124 | 124 | edit : function(id) { |
125 | 125 | var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, f, val, pw; |
126 | 126 | t.revert(); |
127 | 127 | |
128 | 128 | if ( typeof(id) === 'object' ) { |
129 | 129 | id = t.getId(id); |
130 | 130 | } |
131 | 131 | |
132 | | fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order']; |
| 132 | fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order', 'page_template']; |
135 | 135 | } |
136 | 136 | |
137 | 137 | // add the new edit row with an extra blank row underneath to maintain zebra striping. |
138 | 138 | editRow = $('#inline-edit').clone(true); |
139 | 139 | $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); |
140 | 140 | |
141 | 141 | $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>'); |
142 | 142 | |
143 | 143 | // populate the data |
144 | 144 | rowData = $('#inline_'+id); |
145 | 145 | if ( !$(':input[name="post_author"] option[value="' + $('.post_author', rowData).text() + '"]', editRow).val() ) { |
146 | 146 | // author no longer has edit caps, so we need to add them to the list of authors |
147 | 147 | $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>'); |
148 | 148 | } |
149 | 149 | if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) { |