summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/quickedit/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/quickedit/js/util.js')
-rw-r--r--core/modules/quickedit/js/util.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/modules/quickedit/js/util.js b/core/modules/quickedit/js/util.js
index a9c09728619e..7c3e80d2d246 100644
--- a/core/modules/quickedit/js/util.js
+++ b/core/modules/quickedit/js/util.js
@@ -7,9 +7,7 @@
(function ($, Drupal) {
Drupal.quickedit.util = Drupal.quickedit.util || {};
-
Drupal.quickedit.util.constants = {};
-
Drupal.quickedit.util.constants.transitionEnd = 'transitionEnd.quickedit webkitTransitionEnd.quickedit transitionend.quickedit msTransitionEnd.quickedit oTransitionEnd.quickedit';
Drupal.quickedit.util.buildUrl = function (id, urlFormat) {
@@ -24,7 +22,7 @@
};
Drupal.quickedit.util.networkErrorModal = function (title, message) {
- var $message = $('<div>' + message + '</div>');
+ var $message = $("<div>".concat(message, "</div>"));
var networkErrorModal = Drupal.dialog($message.get(0), {
title: title,
dialogClass: 'quickedit-network-error',
@@ -33,7 +31,6 @@
click: function click() {
networkErrorModal.close();
},
-
primary: true
}],
create: function create() {
@@ -49,7 +46,6 @@
Drupal.quickedit.util.form = {
load: function load(options, callback) {
var fieldID = options.fieldID;
-
var formLoaderAjax = Drupal.ajax({
url: Drupal.quickedit.util.buildUrl(fieldID, Drupal.url('quickedit/form/!entity_type/!id/!field_name/!langcode/!view_mode')),
submit: {
@@ -58,9 +54,10 @@
},
error: function error(xhr, url) {
var fieldLabel = Drupal.quickedit.metadata.get(fieldID, 'label');
- var message = Drupal.t('Could not load the form for <q>@field-label</q>, either due to a website problem or a network connection problem.<br>Please try again.', { '@field-label': fieldLabel });
+ var message = Drupal.t('Could not load the form for <q>@field-label</q>, either due to a website problem or a network connection problem.<br>Please try again.', {
+ '@field-label': fieldLabel
+ });
Drupal.quickedit.util.networkErrorModal(Drupal.t('Network problem!'), message);
-
var fieldModel = Drupal.quickedit.app.model.get('activeField');
fieldModel.set('state', 'candidate');
}
@@ -83,7 +80,6 @@
nocssjs: options.nocssjs,
other_view_modes: options.other_view_modes
},
-
success: function success(response, status) {
var _this = this;
@@ -93,11 +89,9 @@
}
});
},
-
base: $submit.attr('id'),
element: $submit[0]
};
-
return Drupal.ajax(settings);
},
unajaxifySaving: function unajaxifySaving(ajax) {