diff --git a/core/modules/quickedit/js/edit.js b/core/modules/quickedit/js/edit.js index 498865e..3c78b2d 100644 --- a/core/modules/quickedit/js/edit.js +++ b/core/modules/quickedit/js/edit.js @@ -245,7 +245,7 @@ function fetchMissingMetadata (callback) { fieldsMetadataQueue = []; $.ajax({ - url: Drupal.url('edit/metadata'), + url: Drupal.url('quickedit/metadata'), type: 'POST', data: { 'fields[]': fieldIDs, @@ -296,7 +296,7 @@ function loadMissingEditors (callback) { var $el = $('
').appendTo('body'); // Create a Drupal.ajax instance to load the form. var loadEditorsAjax = new Drupal.ajax(id, $el, { - url: Drupal.url('edit/attachments'), + url: Drupal.url('quickedit/attachments'), event: 'edit-internal.edit', submit: { 'editors[]': missingEditors }, // No progress indicator. diff --git a/core/modules/quickedit/js/models/EntityModel.js b/core/modules/quickedit/js/models/EntityModel.js index a4d101f..3c6ae71 100644 --- a/core/modules/quickedit/js/models/EntityModel.js +++ b/core/modules/quickedit/js/models/EntityModel.js @@ -335,7 +335,7 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ var $el = $('#edit-entity-toolbar').find('.action-save'); // This is the span element inside the button. // Create a Drupal.ajax instance to save the entity. var entitySaverAjax = new Drupal.ajax(id, $el, { - url: Drupal.url('edit/entity/' + entityModel.id), + url: Drupal.url('quickedit/entity/' + entityModel.id), event: 'edit-save.edit', progress: { type: 'none' } }); diff --git a/core/modules/quickedit/js/util.js b/core/modules/quickedit/js/util.js index 9d4bc45..916c1e6 100644 --- a/core/modules/quickedit/js/util.js +++ b/core/modules/quickedit/js/util.js @@ -18,7 +18,7 @@ Drupal.edit.util.constants.transitionEnd = "transitionEnd.edit webkitTransitionE * The id of an editable field. For example, 'node/1/body/und/full'. * @param String urlFormat * The Controller route for field processing. For example, - * '/edit/form/%21entity_type/%21id/%21field_name/%21langcode/%21view_mode'. + * '/quickedit/form/%21entity_type/%21id/%21field_name/%21langcode/%21view_mode'. */ Drupal.edit.util.buildUrl = function (id, urlFormat) { var parts = id.split('/'); diff --git a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickeditLoadingTest.php b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickeditLoadingTest.php index 91750ee..5c58072 100644 --- a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickeditLoadingTest.php +++ b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickeditLoadingTest.php @@ -223,7 +223,7 @@ protected function retrieveMetadata($ids) { // Perform HTTP request. return $this->curlExec(array( - CURLOPT_URL => url('edit/metadata', array('absolute' => TRUE)), + CURLOPT_URL => url('quickedit/metadata', array('absolute' => TRUE)), CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $post . $this->getAjaxPageStatePostData(), CURLOPT_HTTPHEADER => array( @@ -260,7 +260,7 @@ protected function retrieveAttachments($editors) { // Perform HTTP request. return $this->curlExec(array( - CURLOPT_URL => url('edit/attachments', array('absolute' => TRUE)), + CURLOPT_URL => url('quickedit/attachments', array('absolute' => TRUE)), CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $post . $this->getAjaxPageStatePostData(), CURLOPT_HTTPHEADER => array( @@ -293,7 +293,7 @@ protected function submitFieldForm($field_id, $post) { // Perform HTTP request. return $this->curlExec(array( - CURLOPT_URL => url('edit/form/' . $field_id, array('absolute' => TRUE)), + CURLOPT_URL => url('quickedit/form/' . $field_id, array('absolute' => TRUE)), CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $post . $this->getAjaxPageStatePostData(), CURLOPT_HTTPHEADER => array( @@ -319,7 +319,7 @@ protected function retrieveFieldForm($field_id) { // Perform HTTP request. return $this->curlExec(array( - CURLOPT_URL => url('edit/form/' . $field_id, array('absolute' => TRUE)), + CURLOPT_URL => url('quickedit/form/' . $field_id, array('absolute' => TRUE)), CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $post . $this->getAjaxPageStatePostData(), CURLOPT_HTTPHEADER => array( @@ -344,7 +344,7 @@ protected function saveEntity($entity_type_id) { // Perform HTTP request. return $this->curlExec(array( - CURLOPT_URL => url('edit/entity/' . $entity_type_id, array('absolute' => TRUE)), + CURLOPT_URL => url('quickedit/entity/' . $entity_type_id, array('absolute' => TRUE)), CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $post . $this->getAjaxPageStatePostData(), CURLOPT_HTTPHEADER => array( diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module index ff15c6a..af70a72 100644 --- a/core/modules/quickedit/quickedit.module +++ b/core/modules/quickedit/quickedit.module @@ -23,11 +23,11 @@ function quickedit_menu() { // @todo Remove these menu items in http://drupal.org/node/1954892 when theme // callbacks are replaced with something else. - $items['edit/metadata'] = array( + $items['quickedit/metadata'] = array( 'route_name' => 'quickedit_metadata', 'theme callback' => 'ajax_base_page_theme', ); - $items['edit/form/%/%/%/%/%'] = array( + $items['quickedit/form/%/%/%/%/%'] = array( 'route_name' => 'quickedit_field_form', 'theme callback' => 'ajax_base_page_theme', ); @@ -60,7 +60,7 @@ function quickedit_page_build(&$page) { $page['#attached']['js'][] = array( 'type' => 'setting', 'data' => array('edit' => array( - 'fieldFormURL' => url('edit/form/!entity_type/!id/!field_name/!langcode/!view_mode'), + 'fieldFormURL' => url('quickedit/form/!entity_type/!id/!field_name/!langcode/!view_mode'), 'context' => 'body', )), ); diff --git a/core/modules/quickedit/quickedit.routing.yml b/core/modules/quickedit/quickedit.routing.yml index 4f8ece9..1d2d2db 100644 --- a/core/modules/quickedit/quickedit.routing.yml +++ b/core/modules/quickedit/quickedit.routing.yml @@ -1,19 +1,19 @@ quickedit_metadata: - pattern: '/edit/metadata' + pattern: '/quickedit/metadata' defaults: _controller: '\Drupal\quickedit\QuickeditController::metadata' requirements: _permission: 'access in-place editing' quickedit_attachments: - pattern: '/edit/attachments' + pattern: '/quickedit/attachments' defaults: _controller: '\Drupal\quickedit\QuickeditController::attachments' requirements: _permission: 'access in-place editing' quickedit_field_form: - pattern: '/edit/form/{entity_type}/{entity}/{field_name}/{langcode}/{view_mode_id}' + pattern: '/quickedit/form/{entity_type}/{entity}/{field_name}/{langcode}/{view_mode_id}' defaults: _controller: '\Drupal\quickedit\QuickeditController::fieldForm' requirements: @@ -21,7 +21,7 @@ quickedit_field_form: _access_edit_entity_field: 'TRUE' quickedit_entity_save: - pattern: '/edit/entity/{entity_type}/{entity}' + pattern: '/quickedit/entity/{entity_type}/{entity}' defaults: _controller: '\Drupal\quickedit\QuickeditController::entitySave' requirements: