Issue #2530706 by nod_, eiriksm: JSDoc node module
parent
524b3c0f02
commit
b154a8cf4e
|
@ -8,8 +8,12 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Behaviors for setting summaries on content type form.
|
||||||
*
|
*
|
||||||
* @type {Drupal~behavior}
|
* @type {Drupal~behavior}
|
||||||
|
*
|
||||||
|
* @prop {Drupal~behaviorAttach} attach
|
||||||
|
* Attaches summary behaviors on content type edit forms.
|
||||||
*/
|
*/
|
||||||
Drupal.behaviors.contentTypes = {
|
Drupal.behaviors.contentTypes = {
|
||||||
attach: function (context) {
|
attach: function (context) {
|
||||||
|
|
|
@ -8,8 +8,12 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Behaviors for tabs in the node edit form.
|
||||||
*
|
*
|
||||||
* @type {Drupal~behavior}
|
* @type {Drupal~behavior}
|
||||||
|
*
|
||||||
|
* @prop {Drupal~behaviorAttach} attach
|
||||||
|
* Attaches summary behavior for tabs in the node edit form.
|
||||||
*/
|
*/
|
||||||
Drupal.behaviors.nodeDetailsSummaries = {
|
Drupal.behaviors.nodeDetailsSummaries = {
|
||||||
attach: function (context) {
|
attach: function (context) {
|
||||||
|
@ -18,10 +22,11 @@
|
||||||
var $revisionContext = $(context);
|
var $revisionContext = $(context);
|
||||||
var revisionCheckbox = $revisionContext.find('.form-item-revision input');
|
var revisionCheckbox = $revisionContext.find('.form-item-revision input');
|
||||||
|
|
||||||
// Return 'New revision' if the 'Create new revision' checkbox is checked,
|
// Return 'New revision' if the 'Create new revision' checkbox is
|
||||||
// or if the checkbox doesn't exist, but the revision log does. For users
|
// checked, or if the checkbox doesn't exist, but the revision log does.
|
||||||
// without the "Administer content" permission the checkbox won't appear,
|
// For users without the "Administer content" permission the checkbox
|
||||||
// but the revision log will if the content type is set to auto-revision.
|
// won't appear, but the revision log will if the content type is set to
|
||||||
|
// auto-revision.
|
||||||
if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $revisionContext.find('.form-item-revision-log textarea').length)) {
|
if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $revisionContext.find('.form-item-revision-log textarea').length)) {
|
||||||
return Drupal.t('New revision');
|
return Drupal.t('New revision');
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,17 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disabling all links (except local fragment identifiers such as href="#frag")
|
* Disables all non-relevant links in node previews.
|
||||||
* in node previews to prevent users from leaving the page.
|
*
|
||||||
|
* Destroys links (except local fragment identifiers such as href="#frag") in
|
||||||
|
* node previews to prevent users from leaving the page.
|
||||||
*
|
*
|
||||||
* @type {Drupal~behavior}
|
* @type {Drupal~behavior}
|
||||||
|
*
|
||||||
|
* @prop {Drupal~behaviorAttach} attach
|
||||||
|
* Attaches confirmation prompt for clicking links in node preview mode.
|
||||||
|
* @prop {Drupal~behaviorDetach} detach
|
||||||
|
* Detaches confirmation prompt for clicking links in node preview mode.
|
||||||
*/
|
*/
|
||||||
Drupal.behaviors.nodePreviewDestroyLinks = {
|
Drupal.behaviors.nodePreviewDestroyLinks = {
|
||||||
attach: function (context) {
|
attach: function (context) {
|
||||||
|
@ -61,6 +68,9 @@
|
||||||
* Switch view mode.
|
* Switch view mode.
|
||||||
*
|
*
|
||||||
* @type {Drupal~behavior}
|
* @type {Drupal~behavior}
|
||||||
|
*
|
||||||
|
* @prop {Drupal~behaviorAttach} attach
|
||||||
|
* Attaches automatic submit on `formUpdated.preview` events.
|
||||||
*/
|
*/
|
||||||
Drupal.behaviors.nodePreviewSwitchViewMode = {
|
Drupal.behaviors.nodePreviewSwitchViewMode = {
|
||||||
attach: function (context) {
|
attach: function (context) {
|
||||||
|
@ -74,8 +84,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Theme function for node preview modal.
|
||||||
*
|
*
|
||||||
* @return {string}
|
* @return {string}
|
||||||
|
* Markup for the node preview modal.
|
||||||
*/
|
*/
|
||||||
Drupal.theme.nodePreviewModal = function () {
|
Drupal.theme.nodePreviewModal = function () {
|
||||||
return '<p>' +
|
return '<p>' +
|
||||||
|
|
Loading…
Reference in New Issue