Commit 8e7a2905 authored by webchick's avatar webchick
Browse files

Issue #2135689 by Wim Leers: Clean up edit.module to match coding standards.

parent f699ab0b
/**
* @file edit.icons.css
* @file
* Icons for contextual module.
*/
.edit .icon {
......
/**
* @file edit.module.css
* @file
* Generic base styles for edit module.
*
* Note: every class is prefixed with "edit-" to prevent collisions with modules
* or themes. In Edit module-specific DOM subtrees, this is not necessary.
......
/**
* @file edit.theme.css
* @file
* Styling for contextual module.
*/
/**
......
......@@ -16,6 +16,7 @@
* - contextualLinksQueue: queue of contextual links on entities for which it
* is not yet known whether the user has permission to edit at >=1 of them.
*/
(function ($, _, Backbone, Drupal, drupalSettings) {
"use strict";
......
......@@ -2,6 +2,7 @@
* @file
* Form-based in-place editor. Works for any field type.
*/
(function ($, Drupal) {
"use strict";
......
......@@ -2,7 +2,7 @@
* @file
* contentEditable-based in-place editor for plain text content.
*/
(function ($, _, Backbone, Drupal) {
(function ($, _, Drupal) {
"use strict";
......@@ -110,4 +110,4 @@ Drupal.edit.editors.plain_text = Drupal.edit.EditorView.extend({
});
})(jQuery, _, Backbone, Drupal);
})(jQuery, _, Drupal);
(function ($, _, Backbone, Drupal) {
/**
* @file
* A Backbone Model for the state of the in-place editing application.
*
* @see Drupal.edit.AppView
*/
(function (Backbone, Drupal) {
"use strict";
Drupal.edit.AppModel = Backbone.Model.extend({
defaults: {
// The currently state = 'highlighted' Drupal.edit.FieldModel, if any.
// @see Drupal.edit.FieldModel.states
......@@ -14,6 +22,7 @@ Drupal.edit.AppModel = Backbone.Model.extend({
// confirmation.
activeModal: null
}
});
}(jQuery, _, Backbone, Drupal));
}(Backbone, Drupal));
/**
* @file
* A Backbone Model for the state of an in-place editor.
*
* @see Drupal.edit.EditorView
*/
(function (Backbone, Drupal) {
"use strict";
/**
* State of an in-place editor.
*/
Drupal.edit.EditorModel = Backbone.Model.extend({
defaults: {
......
/**
* @file
* A Backbone Model for the state of an in-place editable entity in the DOM.
*/
(function (_, $, Backbone, Drupal) {
"use strict";
/**
* State of an in-place editable entity in the DOM.
*/
Drupal.edit.EntityModel = Backbone.Model.extend({
defaults: {
......
/**
* @file
* A Backbone Model for the state of an in-place editable field in the DOM.
*/
(function (_, Backbone, Drupal) {
"use strict";
......
......@@ -2,6 +2,7 @@
* @file
* Provides overridable theme functions for all of Edit's client-side HTML.
*/
(function ($, Drupal) {
"use strict";
......
......@@ -2,6 +2,7 @@
* @file
* Provides utility functions for Edit.
*/
(function ($, Drupal) {
"use strict";
......@@ -32,6 +33,7 @@ Drupal.edit.util.buildUrl = function (id, urlFormat) {
};
Drupal.edit.util.form = {
/**
* Loads a form, calls a callback to insert.
*
......@@ -118,6 +120,7 @@ Drupal.edit.util.form = {
unajaxifySaving: function (ajax) {
$(ajax.element).off('click.edit');
}
};
})(jQuery, Drupal);
(function ($, _, Backbone, Drupal, drupalSettings) {
/**
* @file
* A Backbone View that controls the overall "in-place editing application".
*
* @see Drupal.edit.AppModel
*/
(function ($, _, Backbone, Drupal) {
"use strict";
......@@ -10,9 +17,6 @@
// makes it impossible for Edit to know where to restore the original HTML.
var reload = false;
/**
*
*/
Drupal.edit.AppView = Backbone.View.extend({
/**
......@@ -490,6 +494,7 @@ Drupal.edit.AppView = Backbone.View.extend({
entityModel.set('state', 'deactivating');
});
}
});
}(jQuery, _, Backbone, Drupal, drupalSettings));
}(jQuery, _, Backbone, Drupal));
/**
* @file
* A Backbone View that a dynamic contextual link.
* A Backbone View that provides a dynamic contextual link.
*/
(function ($, _, Backbone, Drupal) {
(function ($, Backbone, Drupal) {
"use strict";
......@@ -55,4 +56,4 @@ Drupal.edit.ContextualLinkView = Backbone.View.extend({
});
})(jQuery, _, Backbone, Drupal);
})(jQuery, Backbone, Drupal);
......@@ -2,6 +2,7 @@
* @file
* A Backbone View that decorates the in-place edited element.
*/
(function ($, Backbone, Drupal) {
"use strict";
......@@ -346,6 +347,7 @@ Drupal.edit.EditorDecorationView = Backbone.View.extend({
}
return pos;
}
});
})(jQuery, Backbone, Drupal);
(function ($, _, Backbone, Drupal) {
/**
* @file
* An abstract Backbone View that controls an in-place editor.
*/
(function ($, Backbone, Drupal) {
"use strict";
......@@ -10,6 +15,8 @@
*
* Look at Drupal.edit.editors.form and Drupal.edit.editors.plain_text for
* examples.
*
* @see Drupal.edit.EditorModel
*/
Drupal.edit.EditorView = Backbone.View.extend({
......@@ -278,4 +285,4 @@ Drupal.edit.EditorView = Backbone.View.extend({
});
}(jQuery, _, Backbone, Drupal));
}(jQuery, Backbone, Drupal));
(function ($, Backbone) {
/**
* @file
* A Backbone view that decorates the in-place editable entity.
*/
(function (Drupal, $, Backbone) {
"use strict";
......@@ -30,4 +35,4 @@ Drupal.edit.EntityDecorationView = Backbone.View.extend({
});
}(jQuery, Backbone));
}(Drupal, jQuery, Backbone));
......@@ -2,7 +2,8 @@
* @file
* A Backbone View that provides an entity level toolbar.
*/
(function ($, Backbone, Drupal, debounce) {
(function ($, _, Backbone, Drupal, debounce) {
"use strict";
......@@ -439,6 +440,7 @@ Drupal.edit.EntityToolbarView = Backbone.View.extend({
show: function (toolgroup) {
this.$el.removeClass('edit-animate-invisible');
}
});
})(jQuery, Backbone, Drupal, Drupal.debounce);
})(jQuery, _, Backbone, Drupal, Drupal.debounce);
......@@ -2,6 +2,7 @@
* @file
* A Backbone View that provides an interactive toolbar (1 per in-place editor).
*/
(function ($, _, Backbone, Drupal) {
"use strict";
......@@ -181,6 +182,7 @@ Drupal.edit.FieldToolbarView = Backbone.View.extend({
$group.removeClass('edit-animate-invisible');
}, 0);
}
});
})(jQuery, _, Backbone, Drupal);
......@@ -40,7 +40,7 @@ public function __construct($command, $data) {
}
/**
* Implements Drupal\Core\Ajax\CommandInterface:render().
* {@inheritdoc}
*/
public function render() {
return array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment