Loading core/lib/Drupal/Core/Render/Element/RenderElement.php +2 −2 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ public static function processAjaxForm(&$element, FormStateInterface $form_state * - #ajax['event'] * - #ajax['prevent'] * - #ajax['url'] * - #ajax['type'] * - #ajax['httpMethod'] * - #ajax['callback'] * - #ajax['options'] * - #ajax['wrapper'] Loading Loading @@ -341,7 +341,7 @@ public static function preRenderAjaxForm($element) { // to be substantially different for a JavaScript triggered submission. $settings += [ 'url' => NULL, 'type' => 'POST', 'httpMethod' => 'POST', 'options' => ['query' => []], 'dialogType' => 'ajax', ]; Loading core/misc/ajax.js +6 −6 Original line number Diff line number Diff line Loading @@ -325,12 +325,12 @@ elementSettings.url = href; elementSettings.event = 'click'; } const type = $linkElement.data('ajax-type'); const httpMethod = $linkElement.data('ajax-http-method'); /** * In case of setting custom ajax type for link we rewrite ajax.type. * In case of setting custom ajax http method for link we rewrite ajax.httpMethod. */ if (type) { elementSettings.type = type; if (httpMethod) { elementSettings.httpMethod = httpMethod; } Drupal.ajax(elementSettings); }); Loading Loading @@ -398,7 +398,7 @@ */ Drupal.Ajax = function (base, element, elementSettings) { const defaults = { type: 'POST', httpMethod: 'POST', event: element ? 'mousedown' : null, keypress: true, selector: base ? `#${base}` : null, Loading Loading @@ -599,7 +599,7 @@ }, dataType: 'json', jsonp: false, type: ajax.type, method: ajax.httpMethod, }; if (elementSettings.dialog) { Loading core/modules/views/js/ajax_view.js +3 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ this.element_settings = { url: ajaxPath + queryString, submit: settings, type: 'GET', httpMethod: 'GET', setClick: true, event: 'click', selector, Loading Loading @@ -128,7 +128,7 @@ const selfSettings = $.extend({}, this.element_settings, { event: 'RefreshView', base: this.selector, type: 'GET', httpMethod: 'GET', element: this.$view.get(0), }); this.refreshViewAjax = Drupal.ajax(selfSettings); Loading Loading @@ -203,7 +203,7 @@ submit: viewData, base: false, element: link, type: 'GET', httpMethod: 'GET', }); this.pagerAjax = Drupal.ajax(selfSettings); }; Loading Loading
core/lib/Drupal/Core/Render/Element/RenderElement.php +2 −2 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ public static function processAjaxForm(&$element, FormStateInterface $form_state * - #ajax['event'] * - #ajax['prevent'] * - #ajax['url'] * - #ajax['type'] * - #ajax['httpMethod'] * - #ajax['callback'] * - #ajax['options'] * - #ajax['wrapper'] Loading Loading @@ -341,7 +341,7 @@ public static function preRenderAjaxForm($element) { // to be substantially different for a JavaScript triggered submission. $settings += [ 'url' => NULL, 'type' => 'POST', 'httpMethod' => 'POST', 'options' => ['query' => []], 'dialogType' => 'ajax', ]; Loading
core/misc/ajax.js +6 −6 Original line number Diff line number Diff line Loading @@ -325,12 +325,12 @@ elementSettings.url = href; elementSettings.event = 'click'; } const type = $linkElement.data('ajax-type'); const httpMethod = $linkElement.data('ajax-http-method'); /** * In case of setting custom ajax type for link we rewrite ajax.type. * In case of setting custom ajax http method for link we rewrite ajax.httpMethod. */ if (type) { elementSettings.type = type; if (httpMethod) { elementSettings.httpMethod = httpMethod; } Drupal.ajax(elementSettings); }); Loading Loading @@ -398,7 +398,7 @@ */ Drupal.Ajax = function (base, element, elementSettings) { const defaults = { type: 'POST', httpMethod: 'POST', event: element ? 'mousedown' : null, keypress: true, selector: base ? `#${base}` : null, Loading Loading @@ -599,7 +599,7 @@ }, dataType: 'json', jsonp: false, type: ajax.type, method: ajax.httpMethod, }; if (elementSettings.dialog) { Loading
core/modules/views/js/ajax_view.js +3 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ this.element_settings = { url: ajaxPath + queryString, submit: settings, type: 'GET', httpMethod: 'GET', setClick: true, event: 'click', selector, Loading Loading @@ -128,7 +128,7 @@ const selfSettings = $.extend({}, this.element_settings, { event: 'RefreshView', base: this.selector, type: 'GET', httpMethod: 'GET', element: this.$view.get(0), }); this.refreshViewAjax = Drupal.ajax(selfSettings); Loading Loading @@ -203,7 +203,7 @@ submit: viewData, base: false, element: link, type: 'GET', httpMethod: 'GET', }); this.pagerAjax = Drupal.ajax(selfSettings); }; Loading