PluginProbe ʕ •ᴥ•ʔ
Permalink Manager Lite / 2.4.0
Permalink Manager Lite v2.4.0
2.6.0 2.5.5 2.5.4 2.5.3.4 2.2.18 2.2.19.2 2.2.19.3 2.2.19.3.1 2.2.2 2.2.20 2.2.20.1 2.2.20.3 2.2.4 2.2.5 2.2.6 2.2.7.2 2.2.7.3 2.2.7.5 2.2.7.6 2.2.8.4 2.2.8.5 2.2.8.6 2.2.8.7 2.2.8.9 2.2.9.1 2.2.9.2 2.2.9.2.1 2.2.9.3 2.2.9.4 2.2.9.6 2.2.9.7 2.2.9.9 2.3.0 2.3.1.1 2.4.0 2.4.1 2.4.1.2 2.4.1.3 2.4.1.4 2.4.1.5 2.4.1.6 2.4.2 2.4.2.1 2.4.3 2.4.3.1 2.4.3.2 2.4.3.3 2.4.3.4 2.4.4 2.4.4.1 2.4.4.2 2.4.4.3 2.5.0 2.5.1 2.5.1.1 2.5.1.2 2.5.1.3 2.5.1.4 2.5.2 2.5.2.1 2.5.2.2 2.5.2.3 2.5.2.4 2.5.3 2.5.3.1 2.5.3.2 2.5.3.3 trunk 0.2 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 0.4.4 0.4.6 0.4.7 0.4.8 0.4.9 0.5.3 0.5.4 1.0.0 1.0.1 1.0.4 1.1.0 1.1.1 1.1.2 1.11.6.3 2.0.0 2.0.3 2.0.4 2.0.4.3 2.0.5.1 2.0.5.2 2.0.5.3 2.0.5.3.1 2.0.5.4 2.0.5.4a 2.0.5.5 2.0.5.6 2.0.5.6.1 2.0.5.7 2.0.5.9a 2.0.6.2.1 2.0.6.2a 2.0.6.3 2.1.0 2.1.1 2.1.2.4 2.2.0 2.2.1.1 2.2.1.2 2.2.11 2.2.12 2.2.13.1 2.2.14 2.2.15.1 2.2.16 2.2.17
permalink-manager / out / permalink-manager-admin.js
permalink-manager / out Last commit date
permalink-manager-admin.css 3 years ago permalink-manager-admin.js 3 years ago permalink-manager-gutenberg.js 3 years ago permalink-manager-plugins.css 3 years ago permalink-manager-plugins.js 3 years ago
permalink-manager-admin.js
673 lines
1 jQuery(document).ready(function() {
2
3 /**
4 * "(Un)select all" checkboxes
5 */
6 var checkbox_actions = ['select_all', 'unselect_all'];
7 checkbox_actions.forEach(function(element) {
8 jQuery('#permalink-manager .' + element).on('click', function() {
9 jQuery(this).parents('.field-container').find('.checkboxes input[type="checkbox"]').each(function() {
10 var action = (element == 'select_all') ? true : false;
11 jQuery(this).prop('checked', action);
12 });
13
14 return false;
15 });
16 });
17
18 jQuery('#permalink-manager .checkboxes label, #permalink-manager .single_checkbox label').not('input').on('click', function(ev) {
19 var input = jQuery(this).find("input");
20 if(!jQuery(ev.target).is("input")) {
21 input.prop('checked', !(input.prop("checked")));
22 }
23 });
24
25 /**
26 * Confirm action
27 */
28 jQuery('.pm-confirm-action').on('click', function () {
29 return confirm(permalink_manager.confirm);
30 });
31
32 /**
33 * Filter by dates + Search in URI Editor
34 */
35 jQuery('#permalink-manager #months-filter-button, #permalink-manager #search-submit').on('click', function(e) {
36 var search_value = jQuery('#permalink-manager input[name="s"]').val();
37 var filter_value = jQuery("#months-filter-select").val();
38
39 var filter_url = window.location.href;
40
41 // Date filter
42 if(filter_url.indexOf('month=') > 1) {
43 filter_url = filter_url.replace(/month=([^&]+)/gm, 'month=' + filter_value);
44 } else if(filter_value != '') {
45 filter_url = filter_url + '&month=' + filter_value;
46 }
47
48 // Search query
49 if(filter_url.indexOf('s=') > 1) {
50 filter_url = filter_url.replace(/s=([^&]+)/gm, 's=' + search_value);
51 } else if(search_value != '') {
52 filter_url = filter_url + '&s=' + search_value;
53 }
54
55 window.location.href = filter_url;
56
57 e.preventDefault();
58 return false;
59 });
60
61 jQuery('#permalink-manager #uri_editor form input[name="s"]').on('keydown keypress keyup', function(e){
62 if(e.keyCode == 13) {
63 jQuery('#permalink-manager #search-submit').trigger('click');
64
65 e.preventDefault();
66 return false;
67 }
68 });
69
70 /**
71 * Filter by content types in "Tools"
72 */
73 jQuery('#permalink-manager *[data-field="content_type"] select').on('change', function() {
74 var content_type = jQuery(this).val();
75 if(content_type == 'post_types') {
76 jQuery(this).parents('.form-table').find('*[data-field="post_types"],*[data-field="post_statuses"]').removeClass('hidden');
77 jQuery(this).parents('.form-table').find('*[data-field="taxonomies"]').addClass('hidden');
78 } else {
79 jQuery(this).parents('.form-table').find('*[data-field="post_types"],*[data-field="post_statuses"]').addClass('hidden');
80 jQuery(this).parents('.form-table').find('*[data-field="taxonomies"]').removeClass('hidden');
81 }
82 }).trigger("change");
83
84 /**
85 * Toggle "Edit URI" box
86 */
87 jQuery('#permalink-manager-toggle, .permalink-manager-edit-uri-box .close-button').on('click', function() {
88 jQuery('.permalink-manager-edit-uri-box').slideToggle();
89
90 return false;
91 });
92
93 /**
94 * Toggle "Edit Redirects" box
95 */
96 jQuery('#permalink-manager').on('click', '#toggle-redirect-panel', function() {
97 jQuery('#redirect-panel-inside').slideToggle();
98
99 return false;
100 });
101
102 jQuery('#permalink-manager').on('click', '.permalink-manager.redirects-panel #permalink-manager-new-redirect', function() {
103 // Find the table
104 var table = jQuery(this).parents('.redirects-panel').find('table');
105
106 // Copy the row from the sample
107 var new_row = jQuery(this).parents('.redirects-panel').find('.sample-row').clone().removeClass('sample-row');
108
109 // Adjust the array key
110 var last_key = jQuery(table).find("tr:last-of-type input[data-index]").data("index") + 1;
111 jQuery("input[data-index]", new_row).attr("data-index", last_key).attr("name", function(){ return jQuery(this).attr("name") + "[" + last_key + "]" });
112
113 // Append the new row
114 jQuery(table).append(new_row);
115
116 return false;
117 });
118
119 jQuery('#permalink-manager').on('click', '.remove-redirect', function() {
120 jQuery(this).closest('tr').remove();
121
122 return false;
123 });
124
125 /**
126 * Synchronize "Edit URI" input field with the sample permalink
127 */
128 var custom_uri_input = jQuery('.permalink-manager-edit-uri-box input[name="custom_uri"]');
129 jQuery(custom_uri_input).on('keyup change', function() {
130 jQuery('.sample-permalink-span .editable').text(jQuery(this).val());
131 });
132
133 /**
134 * Synchronize "Coupon URI" input field with the final permalink
135 */
136 jQuery('#permalink-manager-coupon-url input[name="custom_uri"]').on('keyup change', function() {
137 var uri = jQuery(this).val();
138 jQuery('#permalink-manager-coupon-url code span').text(uri);
139
140 if(!uri) {
141 jQuery('#permalink-manager-coupon-url .coupon-full-url').addClass("hidden");
142 } else {
143 jQuery('#permalink-manager-coupon-url .coupon-full-url').removeClass("hidden");
144 }
145 });
146
147 function permalink_manager_duplicate_check(custom_uri_input) {
148 // Set default values
149 custom_uri_input = typeof custom_uri_input !== 'undefined' ? custom_uri_input : false;
150
151 var all_custom_uris_values = {};
152
153 if(custom_uri_input) {
154 var custom_uri = jQuery(custom_uri_input).val();
155 var element_id = jQuery(custom_uri_input).attr("data-element-id");
156
157 all_custom_uris_values[element_id] = custom_uri;
158 } else {
159 jQuery('.custom_uri').each(function(i, obj) {
160 var field_name = jQuery(obj).attr('data-element-id');
161 all_custom_uris_values[field_name] = jQuery(obj).val();
162 });
163 }
164
165 if(all_custom_uris_values) {
166 jQuery.ajax(permalink_manager.ajax_url, {
167 type: 'POST',
168 async: true,
169 data: {
170 action: 'pm_detect_duplicates',
171 custom_uris: all_custom_uris_values
172 },
173 success: function(data) {
174 if(data.length > 5) {
175 try {
176 var results = JSON.parse(data);
177 } catch (e) {
178 console.log(e);
179 console.log(data);
180 return;
181 }
182
183 // Loop through results
184 jQuery.each(results, function(key, is_duplicate) {
185 var alert_container = jQuery('.custom_uri[data-element-id="' + key + '"]').parents('.custom_uri_container').find('.duplicated_uri_alert');
186
187 if(is_duplicate) {
188 jQuery(alert_container).text(is_duplicate);
189 } else {
190 jQuery(alert_container).empty();
191 }
192 });
193 }
194 }
195 });
196 }
197 }
198
199 /**
200 * Check if a single custom URI is not duplicated
201 */
202 var custom_uri_check_timeout = null;
203 jQuery('.custom_uri_container input[name="custom_uri"], .custom_uri_container input.custom_uri').each(function() {
204 var input = this;
205
206 jQuery(this).on('keyup change', function() {
207 clearTimeout(custom_uri_check_timeout);
208
209 // Wait until user finishes typing
210 custom_uri_check_timeout = setTimeout(function() {
211 permalink_manager_duplicate_check(input);
212 }, 500);
213 });
214
215 });
216
217 /**
218 * Check if any of displayed custom URIs is not duplicated
219 */
220 if(jQuery('#uri_editor .custom_uri').length > 0) {
221 permalink_manager_duplicate_check(false);
222 }
223
224 /**
225 * Disable "Edit URI" input if URI should be updated automatically
226 */
227 jQuery('#permalink-manager').on('change', 'select[name="auto_update_uri"]', function() {
228 var selected = jQuery(this).find('option:selected');
229 var auto_update_status = jQuery(selected).data('readonly');
230 var container = jQuery(this).parents('#permalink-manager');
231
232 if(auto_update_status == 1 || auto_update_status == 2) {
233 jQuery(container).find('input[name="custom_uri"]').attr("readonly", true);
234 jQuery(container).find('.uri_locked').removeClass("hidden");
235 } else {
236 jQuery(container).find('input[name="custom_uri"]').removeAttr("readonly", true);
237 jQuery(container).find('.uri_locked').addClass("hidden");
238 }
239 });
240 jQuery('select[name="auto_update_uri"]').trigger("change");
241
242 /**
243 * Restore "Default URI"
244 */
245 jQuery('#permalink-manager').on('click', '.restore-default', function() {
246 var input = jQuery(this).parents('.field-container, .permalink-manager-edit-uri-box, #permalink-manager .inside').find('input.custom_uri, input.permastruct-field');
247 var default_uri = jQuery(input).attr('data-default');
248
249 jQuery(input).val(default_uri).trigger('keyup');
250
251 return false;
252 });
253
254 /**
255 * Display additional permastructure settings
256 */
257 jQuery('#permalink-manager').on('click', '.permastruct-toggle-button a', function() {
258 jQuery(this).parents('.field-container').find('.permastruct-toggle').slideToggle();
259
260 return false;
261 });
262
263 /**
264 * Settings tabs
265 */
266 jQuery('#permalink-manager').on('click', '.settings-tabs .subsubsub a', function() {
267 var tab_id = jQuery(this).attr('data-tab');
268
269 jQuery('#permalink-manager .settings-tabs .subsubsub a').removeClass('current');
270 jQuery(this).addClass('current');
271
272 jQuery('#permalink-manager .settings-tabs form > div').hide().removeClass('active-tab');
273 jQuery('#permalink-manager .settings-tabs form > div#pm_' + tab_id).show().addClass('active-tab');
274
275 jQuery('#permalink-manager .settings-tabs form input[name="pm_active_tab"]').val(tab_id);
276
277 return false;
278 });
279
280 /**
281 * Conditional fields in Permalink Manager settings
282 */
283 jQuery('#permalink-manager .settings-tabs #extra_redirects input[type="checkbox"]').on('change', function() {
284 var is_checked = jQuery(this).is(':checked');
285 var rel_field_container = jQuery('#permalink-manager .settings-tabs #setup_redirects');
286
287 if(is_checked == true) {
288 rel_field_container.removeClass('hidden');
289 } else {
290 rel_field_container.addClass('hidden');
291 }
292 }).trigger("change");
293
294 /**
295 * Hide global admin notices
296 */
297 jQuery(document).on('click', '.permalink-manager-notice.is-dismissible .notice-dismiss', function() {
298 var alert_id = jQuery(this).closest('.permalink-manager-notice').data('alert_id');
299
300 jQuery.ajax(permalink_manager.ajax_url, {
301 type: 'POST',
302 data: {
303 action: 'pm_dismissed_notice_handler',
304 alert_id: alert_id,
305 }
306 });
307 });
308
309 /**
310 * Save permalinks from Gutenberg with AJAX
311 */
312 var pm_container = jQuery('#permalink-manager.postbox');
313 var pm_container_disabled = false;
314 var pm_container_reloading = false;
315 jQuery('#permalink-manager .save-row.hidden').removeClass('hidden');
316 jQuery('#permalink-manager').on('click', '#permalink-manager-save-button', pm_gutenberg_save_uri);
317
318 function pm_gutenberg_loading_overlay(show = true) {
319 if(show && !pm_container_disabled) {
320 pm_container_disabled = true;
321
322 jQuery(pm_container).LoadingOverlay('show', {
323 background: 'rgba(0, 0, 0, 0.1)',
324 });
325 } else if(!show && pm_container_disabled) {
326 pm_container_disabled = false;
327
328 jQuery(pm_container).LoadingOverlay('hide', true);
329 }
330 }
331
332 function pm_gutenberg_reload() {
333 var pm_post_id = jQuery('input[name="permalink-manager-edit-uri-element-id"]').val();
334
335 jQuery.ajax({
336 type: 'GET',
337 url: permalink_manager.ajax_url + '?action=pm_get_uri_editor',
338 data: {
339 'post_id': pm_post_id
340 },
341 beforeSend: pm_gutenberg_loading_overlay,
342 success: function(html) {
343 jQuery(pm_container).find('.permalink-manager-gutenberg').replaceWith(html);
344 pm_gutenberg_loading_overlay(false);
345
346 jQuery(pm_container).find('select[name="auto_update_uri"]').trigger("change");
347 pm_help_tooltips();
348 }
349 });
350 }
351
352 function pm_gutenberg_save_uri() {
353 var pm_fields = jQuery(pm_container).find("input, select");
354
355 jQuery.ajax({
356 type: 'POST',
357 url: permalink_manager.ajax_url,
358 async: true,
359 data: jQuery(pm_fields).serialize() + '&action=pm_save_permalink',
360 beforeSend: pm_gutenberg_loading_overlay,
361 success: pm_gutenberg_reload
362 });
363
364 return false;
365 }
366
367 /**
368 * Reload the URI Editor in Gutenberg after the post is published or the title/slug is changed
369 */
370 if(typeof wp !== 'undefined' && typeof wp.data !== 'undefined' && typeof wp.data.select !== 'undefined' && typeof wp.data.subscribe !== 'undefined' && wp.data.select('core/editor') != null && wp.data.select('core/edit-post') != null) {
371 wp.data.subscribe(function() {
372 try {
373 var isSavingPost = wp.data.select('core/editor').isSavingPost();
374 var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost();
375 var isSavingMetaBoxes = wp.data.select('core/edit-post').isSavingMetaBoxes();
376
377 // Disable URI Editor until it is reloaded
378 if(isSavingPost && !isAutosavingPost) {
379 pm_gutenberg_loading_overlay();
380 }
381
382 // Reload URI Editor only after metaboxes are saved
383 if(isSavingMetaBoxes) {
384 pm_container_reloading = true;
385 } else if(pm_container_reloading) {
386 pm_container_reloading = false;
387
388 pm_gutenberg_reload();
389 }
390 } catch (err) {
391 console.log('Permalink Manager', err);
392 }
393 });
394 }
395
396 /**
397 * Help tooltips
398 */
399 function pm_help_tooltips() {
400 if(jQuery('#permalink-manager .help_tooltip').length > 0) {
401 jQuery('#permalink-manager .help_tooltip').each(function() {
402 var helpTooltip = this;
403
404 tippy(helpTooltip, {
405 // placement: 'top-start',
406 arrow: true,
407 content: jQuery(helpTooltip).attr('title'),
408 distance: 20
409 });
410 });
411 }
412 }
413 pm_help_tooltips();
414
415
416 /**
417 * Check expiration date
418 */
419 jQuery(document).on('click', '#pm_get_exp_date', function() {
420 jQuery.ajax(permalink_manager.ajax_url, {
421 type: 'POST',
422 data: {
423 action: 'pm_get_exp_date',
424 licence: {
425 licence_key: jQuery('#permalink-manager #settings #licence_key input[type="text"]').val()
426 }
427 },
428 beforeSend: function() {
429 var spinner = '<img src="' + permalink_manager.spinners + '/wpspin_light-2x.gif" width="16" height="16">';
430 jQuery('#permalink-manager .licence-info').html(spinner);
431 },
432 success: function(data) {
433 jQuery('#permalink-manager .licence-info').html(data);
434 }
435 });
436
437 return false;
438 });
439
440 /**
441 * Bulk tools
442 */
443 function pm_show_progress(elem, progress) {
444 if(progress) {
445 jQuery(elem).LoadingOverlay("text", progress + "%");
446 } else {
447 jQuery(elem).LoadingOverlay("show", {
448 background : "rgba(0, 0, 0, 0.1)",
449 text: '0%'
450 });
451 }
452 }
453
454 jQuery('#permalink-manager #tools form.form-ajax').on('submit', function () {
455 var total_iterations = updated_count = total = progress = 0;
456 var iteration = 1;
457 var data = jQuery(this).serialize() + '&action=pm_bulk_tools&iteration=' + iteration;
458
459 // Hide alert & results table
460 jQuery('#permalink-manager .updated-slugs-table, .permalink-manager-notice.updated_slugs, #permalink-manager #updated-list').remove();
461
462 jQuery.ajax({
463 type: 'POST',
464 url: permalink_manager.ajax_url,
465 data: data,
466 beforeSend: function () {
467 // Show progress overlay
468 pm_show_progress("#permalink-manager #tools", progress);
469 },
470 success: function (data) {
471 var table_dom = jQuery('#permalink-manager .updated-slugs-table');
472 var ajax_request = this;
473
474 // The first AJAX request should return the total items & iterations count
475 if (data.hasOwnProperty('total_iterations') && data.hasOwnProperty('total')) {
476 total_iterations = parseInt(data.total_iterations);
477 total = parseInt(data.total);
478
479 // If prior requests were handled with errors, remove those alerts
480 jQuery('.permalink-manager-notice.updated_slugs.error').remove();
481
482 // Add the alert container with the status but do not display it yet
483 if (data.hasOwnProperty('alert')) {
484 jQuery('#plugin-name-heading').after(jQuery(data.alert).hide());
485 }
486 }
487 // Check if the iteration and total count were correctly set in the first AJAX request
488 else if (total_iterations === 0 || total === 0) {
489 console.log('No items have been processed.');
490 jQuery('#permalink-manager #tools').LoadingOverlay("hide", true);
491
492 return true;
493 }
494
495 // Display the table
496 if (data.hasOwnProperty('html')) {
497 var table = jQuery(data.html);
498
499 if (table_dom.length == 0) {
500 jQuery('#permalink-manager #tools').after(data.html);
501 } else {
502 jQuery(table_dom).append(jQuery(table).find('tbody').html());
503 }
504 }
505
506 // Increase updated count
507 if (data.hasOwnProperty('updated_count')) {
508 updated_count = updated_count + parseInt(data.updated_count);
509
510 jQuery('.permalink-manager-notice.updated_slugs .updated_count').text(updated_count);
511 }
512
513 // Repeat the AJAX request for the next chunk of items
514 if (iteration < total_iterations) {
515 // Update the progress
516 progress = Math.floor((iteration / total_iterations) * 100);
517 console.log(iteration + "/" + total_iterations + " = " + progress + "%");
518
519 // Go to the next chunk
520 iteration++;
521
522 // Change the iteration number in the AJAX data
523 ajax_request.data = ajax_request.data.replace(/(&iteration=)([\d]+)/gm, "$1" + iteration);
524 jQuery.ajax(ajax_request);
525 } else {
526 // Display the alert container and hide the loading overlay
527 jQuery('.permalink-manager-notice.updated_slugs').fadeIn();
528 jQuery('#permalink-manager #tools').LoadingOverlay("hide", true);
529
530 if (table_dom.length > 0) {
531 jQuery('html, body').animate({
532 scrollTop: table_dom.offset().top - 100
533 }, 2000);
534 }
535
536 // Reset progress & updated count
537 progress = updated_count = 0;
538 }
539
540 return true;
541 },
542 error: function (xhr, status, error_data) {
543 alert('There was a problem running this tool and the process could not be completed. You can find more details in browser\'s console log.');
544 console.log('Status: ' + status);
545 console.log('Please send the debug data to contact@permalinkmanager.pro:\n\n' + xhr.responseText);
546
547 jQuery('#permalink-manager #tools').LoadingOverlay("hide", true);
548 }
549 });
550
551 return false;
552 });
553
554 /**
555 * Stop-words
556 */
557 var stop_words_input = '#permalink-manager .field-container textarea.stop_words';
558
559 if(jQuery(stop_words_input).length > 0) {
560 var stop_words = new TIB(document.querySelector(stop_words_input), {
561 alert: false,
562 //escape: null,
563 escape: [','],
564 classes: ['tags words-editor', 'tag', 'tags-input', 'tags-output', 'tags-view'],
565 });
566 jQuery('.tags-output').hide();
567
568 // Force lowercase
569 stop_words.filter = function(text) {
570 return text.toLowerCase();
571 };
572
573 // Remove all words
574 jQuery('#permalink-manager .field-container .clear_all_words').on('click', function() {
575 stop_words.reset();
576 });
577
578 // Load stop-words list
579 jQuery('#permalink-manager #load_stop_words_button').on('click', function() {
580 var lang = jQuery( ".load_stop_words option:selected" ).val();
581 if(lang) {
582 var json_url = permalink_manager.url + "/includes/vendor/stopwords-json/dist/" + lang + ".json";
583
584 // Load JSON with words list
585 jQuery.getJSON(json_url, function(data) {
586 var new_words = [];
587
588 jQuery.each(data, function(key, val) {
589 new_words.push(val);
590 });
591
592 stop_words.update(new_words);
593 });
594 }
595
596 return false;
597 });
598 }
599
600 /**
601 * Quick Edit
602 */
603 function pm_quick_edit(item, inlineEdit) {
604 // Get the item ID and type
605 let item_id = 0;
606 let item_uri_id = '';
607 let item_type = '';
608 let item_row = '';
609
610 // Get the ID
611 if(typeof(inlineEdit) == 'object') {
612 item_id = parseInt(inlineEdit.getId(item));
613 item_type = inlineEdit.type;
614 } else {
615 return;
616 }
617
618 // Get the edit row
619 let edit_row = jQuery('#edit-' + item_id);
620
621 // Get the post/term row
622 if(item_type === 'tag') {
623 item_row = jQuery('#tag-' + item_id);
624 item_uri_id = "tax-" + item_id;
625 } else if(item_type === 'post' || item_type === 'page') {
626 item_row = jQuery('#post-' + item_id);
627 item_uri_id = item_id;
628 } else {
629 return;
630 }
631
632 if(item_id !== 0) {
633 // Get the row & "Custom URI" field
634 let custom_uri_field = edit_row.find('.custom_uri');
635
636 // Prepare the Custom URI
637 let custom_uri = item_row.find(".column-permalink-manager-col").text();
638
639 // Fill with the Custom URI
640 custom_uri_field.val(custom_uri);
641
642 // Get auto-update settings
643 let auto_update = item_row.find(".permalink-manager-col-uri").attr('data-disabled');
644
645 if(typeof auto_update !== "undefined" && (auto_update == 1 || auto_update == 2)) {
646 custom_uri_field.attr('disabled', 'disabled');
647 }
648
649 // Set the element ID
650 edit_row.find('.permalink-manager-edit-uri-element-id').val(item_uri_id);
651 }
652 }
653
654 if(typeof inlineEditPost !== "undefined") {
655 var inline_post_editor = inlineEditPost.edit;
656 inlineEditPost.edit = function(id) {
657 inline_post_editor.apply(this, arguments);
658
659 pm_quick_edit(id, this);
660 }
661 }
662
663 if(typeof inlineEditTax !== "undefined") {
664 var inline_tax_editor = inlineEditTax.edit;
665 inlineEditTax.edit = function(id) {
666 inline_tax_editor.apply(this, arguments);
667
668 pm_quick_edit(id, this);
669 }
670 }
671
672 });
673