summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-02-29 03:25:57 (GMT)
committerNathaniel Catchpole2016-02-29 03:25:57 (GMT)
commit00606660c8166972c7f0128d39117b5a7be8bb7a (patch)
tree58966f2bafa42bcf8697f4e1a7013552c1e1e8dc
parent490397539c3112be7abead76d9a95be00aad2adb (diff)
Issue #2672200 by Sweetchuck, gauravjeet: Wrap Drupal with closure variable
-rw-r--r--core/misc/ajax.js2
-rw-r--r--core/misc/states.js4
-rw-r--r--core/misc/timezone.js4
-rw-r--r--core/misc/vertical-tabs.js4
-rw-r--r--core/modules/block/js/block.js6
-rw-r--r--core/modules/block_content/js/block_content.js4
-rw-r--r--core/modules/book/book.js4
-rw-r--r--core/modules/ckeditor/js/ckeditor.admin.js4
-rw-r--r--core/modules/ckeditor/js/ckeditor.stylescombo.admin.js4
-rw-r--r--core/modules/ckeditor/js/views/ControllerView.js4
-rw-r--r--core/modules/ckeditor/js/views/KeyboardView.js4
-rw-r--r--core/modules/color/color.js4
-rw-r--r--core/modules/color/preview.js4
-rw-r--r--core/modules/comment/comment-entity-form.js4
-rw-r--r--core/modules/comment/js/node-new-comments-link.js4
-rw-r--r--core/modules/editor/js/editor.formattedTextEditor.js4
-rw-r--r--core/modules/filter/filter.admin.js4
-rw-r--r--core/modules/filter/filter.filter_html.admin.js4
-rw-r--r--core/modules/filter/filter.js4
-rw-r--r--core/modules/menu_ui/menu_ui.admin.js4
-rw-r--r--core/modules/menu_ui/menu_ui.js4
-rw-r--r--core/modules/node/content_types.js4
-rw-r--r--core/modules/path/path.js4
-rw-r--r--core/modules/quickedit/js/editors/formEditor.js4
-rw-r--r--core/modules/quickedit/js/models/BaseModel.js4
-rw-r--r--core/modules/simpletest/simpletest.js4
-rw-r--r--core/modules/taxonomy/taxonomy.js4
-rw-r--r--core/modules/text/text.js4
-rw-r--r--core/modules/user/user.permissions.js4
-rw-r--r--core/modules/views/js/ajax_view.js10
30 files changed, 63 insertions, 63 deletions
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index 88a8025..4218727 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -1195,4 +1195,4 @@
}
};
-})(jQuery, this, Drupal, drupalSettings);
+})(jQuery, window, Drupal, drupalSettings);
diff --git a/core/misc/states.js b/core/misc/states.js
index cdbcba6..24374b6 100644
--- a/core/misc/states.js
+++ b/core/misc/states.js
@@ -3,7 +3,7 @@
* Drupal's states library.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -721,4 +721,4 @@
}
}
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/misc/timezone.js b/core/misc/timezone.js
index f1ba7c9..3c88d46 100644
--- a/core/misc/timezone.js
+++ b/core/misc/timezone.js
@@ -3,7 +3,7 @@
* Timezone detection.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -73,4 +73,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js
index 51038bc..c7ad2fd 100644
--- a/core/misc/vertical-tabs.js
+++ b/core/misc/vertical-tabs.js
@@ -12,7 +12,7 @@
* @event summaryUpdated
*/
-(function ($) {
+(function ($, Drupal, drupalSettings) {
'use strict';
@@ -249,4 +249,4 @@
return tab;
};
-})(jQuery);
+})(jQuery, Drupal, drupalSettings);
diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js
index b3c8c31..b9fced1 100644
--- a/core/modules/block/js/block.js
+++ b/core/modules/block/js/block.js
@@ -3,7 +3,7 @@
* Block behaviors.
*/
-(function ($, window) {
+(function ($, window, Drupal) {
'use strict';
@@ -20,7 +20,7 @@
// The drupalSetSummary method required for this behavior is not available
// on the Blocks administration page, so we need to make sure this
// behavior is processed only if drupalSetSummary is defined.
- if (typeof jQuery.fn.drupalSetSummary === 'undefined') {
+ if (typeof $.fn.drupalSetSummary === 'undefined') {
return;
}
@@ -218,4 +218,4 @@
}
};
-})(jQuery, window);
+})(jQuery, window, Drupal);
diff --git a/core/modules/block_content/js/block_content.js b/core/modules/block_content/js/block_content.js
index dbc89f9..bbc0533 100644
--- a/core/modules/block_content/js/block_content.js
+++ b/core/modules/block_content/js/block_content.js
@@ -3,7 +3,7 @@
* Defines Javascript behaviors for the block_content module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -54,4 +54,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/book/book.js b/core/modules/book/book.js
index fa40818..2cc7881 100644
--- a/core/modules/book/book.js
+++ b/core/modules/book/book.js
@@ -3,7 +3,7 @@
* Javascript behaviors for the Book module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -34,4 +34,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/ckeditor/js/ckeditor.admin.js b/core/modules/ckeditor/js/ckeditor.admin.js
index 7adc9b1..27f80b9 100644
--- a/core/modules/ckeditor/js/ckeditor.admin.js
+++ b/core/modules/ckeditor/js/ckeditor.admin.js
@@ -3,7 +3,7 @@
* CKEditor button and group configuration user interface.
*/
-(function ($, Drupal, _, CKEDITOR) {
+(function ($, Drupal, drupalSettings, _) {
'use strict';
@@ -496,4 +496,4 @@
return '<li class="ckeditor-add-new-group"><button role="button" aria-label="' + Drupal.t('Add a CKEditor button group to the end of this row.') + '">' + Drupal.t('Add group') + '</button></li>';
};
-})(jQuery, Drupal, _, CKEDITOR);
+})(jQuery, Drupal, drupalSettings, _);
diff --git a/core/modules/ckeditor/js/ckeditor.stylescombo.admin.js b/core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
index 5b8ad4a..c425dbb 100644
--- a/core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
+++ b/core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
@@ -3,7 +3,7 @@
* CKEditor StylesCombo admin behavior.
*/
-(function ($, Drupal, drupalSettings) {
+(function ($, Drupal, drupalSettings, _) {
'use strict';
@@ -125,4 +125,4 @@
}
};
-})(jQuery, Drupal, drupalSettings);
+})(jQuery, Drupal, drupalSettings, _);
diff --git a/core/modules/ckeditor/js/views/ControllerView.js b/core/modules/ckeditor/js/views/ControllerView.js
index 8d215a1..e6cbe24 100644
--- a/core/modules/ckeditor/js/views/ControllerView.js
+++ b/core/modules/ckeditor/js/views/ControllerView.js
@@ -3,7 +3,7 @@
* A Backbone View acting as a controller for CKEditor toolbar configuration.
*/
-(function (Drupal, Backbone, $) {
+(function ($, Drupal, Backbone, CKEDITOR, _) {
'use strict';
@@ -380,4 +380,4 @@
}
});
-})(Drupal, Backbone, jQuery);
+})(jQuery, Drupal, Backbone, CKEDITOR, _);
diff --git a/core/modules/ckeditor/js/views/KeyboardView.js b/core/modules/ckeditor/js/views/KeyboardView.js
index 27d6c88..9f2ab5b 100644
--- a/core/modules/ckeditor/js/views/KeyboardView.js
+++ b/core/modules/ckeditor/js/views/KeyboardView.js
@@ -3,7 +3,7 @@
* Backbone View providing the aural view of CKEditor keyboard UX configuration.
*/
-(function (Drupal, Backbone, $) {
+(function ($, Drupal, Backbone, _) {
'use strict';
@@ -263,4 +263,4 @@
}
});
-})(Drupal, Backbone, jQuery);
+})(jQuery, Drupal, Backbone, _);
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index ed68732..984f740 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -3,7 +3,7 @@
* Attaches the behaviors for the Color module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -294,4 +294,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/color/preview.js b/core/modules/color/preview.js
index 0796ee9..38c62ae 100644
--- a/core/modules/color/preview.js
+++ b/core/modules/color/preview.js
@@ -3,7 +3,7 @@
* Attaches preview-related behavior for the Color module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -71,4 +71,4 @@
}
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/comment/comment-entity-form.js b/core/modules/comment/comment-entity-form.js
index 3ad1a3d..fd16d8b 100644
--- a/core/modules/comment/comment-entity-form.js
+++ b/core/modules/comment/comment-entity-form.js
@@ -3,7 +3,7 @@
* Attaches comment behaviors to the entity form.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -20,4 +20,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/comment/js/node-new-comments-link.js b/core/modules/comment/js/node-new-comments-link.js
index 54506d9..291bcbd 100644
--- a/core/modules/comment/js/node-new-comments-link.js
+++ b/core/modules/comment/js/node-new-comments-link.js
@@ -6,7 +6,7 @@
* installed.
*/
-(function ($, Drupal) {
+(function ($, Drupal, drupalSettings) {
'use strict';
@@ -174,4 +174,4 @@
}
}
-})(jQuery, Drupal);
+})(jQuery, Drupal, drupalSettings);
diff --git a/core/modules/editor/js/editor.formattedTextEditor.js b/core/modules/editor/js/editor.formattedTextEditor.js
index 3efbaa2..fec73e0 100644
--- a/core/modules/editor/js/editor.formattedTextEditor.js
+++ b/core/modules/editor/js/editor.formattedTextEditor.js
@@ -11,7 +11,7 @@
* - Drupal.editors.magical.attachInlineEditor()
*/
-(function ($, Drupal, drupalSettings) {
+(function ($, Drupal, drupalSettings, _) {
'use strict';
@@ -228,4 +228,4 @@
});
-})(jQuery, Drupal, drupalSettings);
+})(jQuery, Drupal, drupalSettings, _);
diff --git a/core/modules/filter/filter.admin.js b/core/modules/filter/filter.admin.js
index 8010671..31e0582 100644
--- a/core/modules/filter/filter.admin.js
+++ b/core/modules/filter/filter.admin.js
@@ -3,7 +3,7 @@
* Attaches administration-specific behavior for the Filter module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -66,4 +66,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/filter/filter.filter_html.admin.js b/core/modules/filter/filter.filter_html.admin.js
index 8c9cef6..7ddca90 100644
--- a/core/modules/filter/filter.filter_html.admin.js
+++ b/core/modules/filter/filter.filter_html.admin.js
@@ -3,7 +3,7 @@
* Attaches behavior for updating filter_html's settings automatically.
*/
-(function ($, _, document, window) {
+(function ($, Drupal, _, document) {
'use strict';
@@ -325,4 +325,4 @@
return html;
};
-})(jQuery, _, document, window);
+})(jQuery, Drupal, _, document);
diff --git a/core/modules/filter/filter.js b/core/modules/filter/filter.js
index 2455b7f..b791047 100644
--- a/core/modules/filter/filter.js
+++ b/core/modules/filter/filter.js
@@ -3,7 +3,7 @@
* Attaches behavior for the Filter module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -36,4 +36,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/menu_ui/menu_ui.admin.js b/core/modules/menu_ui/menu_ui.admin.js
index 2bc80dd..345138f 100644
--- a/core/modules/menu_ui/menu_ui.admin.js
+++ b/core/modules/menu_ui/menu_ui.admin.js
@@ -3,7 +3,7 @@
* Menu UI admin behaviors.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -65,4 +65,4 @@
});
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/menu_ui/menu_ui.js b/core/modules/menu_ui/menu_ui.js
index 113b90a..5eb10e0 100644
--- a/core/modules/menu_ui/menu_ui.js
+++ b/core/modules/menu_ui/menu_ui.js
@@ -3,7 +3,7 @@
* Menu UI behaviors.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -88,4 +88,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js
index 96733a2..eed93f0 100644
--- a/core/modules/node/content_types.js
+++ b/core/modules/node/content_types.js
@@ -3,7 +3,7 @@
* Javascript for the node content editing form.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -59,4 +59,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/path/path.js b/core/modules/path/path.js
index 4cca889..dfa2c05 100644
--- a/core/modules/path/path.js
+++ b/core/modules/path/path.js
@@ -2,7 +2,7 @@
* @file
* Attaches behaviors for the Path module.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -26,4 +26,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/quickedit/js/editors/formEditor.js b/core/modules/quickedit/js/editors/formEditor.js
index 49fc6f0..374e5c2 100644
--- a/core/modules/quickedit/js/editors/formEditor.js
+++ b/core/modules/quickedit/js/editors/formEditor.js
@@ -3,7 +3,7 @@
* Form-based in-place editor. Works for any field type.
*/
-(function ($, Drupal) {
+(function ($, Drupal, _) {
'use strict';
@@ -252,4 +252,4 @@
}
});
-})(jQuery, Drupal);
+})(jQuery, Drupal, _);
diff --git a/core/modules/quickedit/js/models/BaseModel.js b/core/modules/quickedit/js/models/BaseModel.js
index f1c31d7..7579b6f 100644
--- a/core/modules/quickedit/js/models/BaseModel.js
+++ b/core/modules/quickedit/js/models/BaseModel.js
@@ -3,7 +3,7 @@
* A Backbone Model subclass that enforces validation when calling set().
*/
-(function (Backbone) {
+(function (Drupal, Backbone) {
'use strict';
@@ -57,4 +57,4 @@
});
-}(Backbone));
+}(Drupal, Backbone));
diff --git a/core/modules/simpletest/simpletest.js b/core/modules/simpletest/simpletest.js
index dfe5fba..ba54cbf 100644
--- a/core/modules/simpletest/simpletest.js
+++ b/core/modules/simpletest/simpletest.js
@@ -3,7 +3,7 @@
* Simpletest behaviors.
*/
-(function ($) {
+(function ($, Drupal, drupalSettings) {
'use strict';
@@ -127,4 +127,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal, drupalSettings);
diff --git a/core/modules/taxonomy/taxonomy.js b/core/modules/taxonomy/taxonomy.js
index 09e5b46..99338d5 100644
--- a/core/modules/taxonomy/taxonomy.js
+++ b/core/modules/taxonomy/taxonomy.js
@@ -3,7 +3,7 @@
* Taxonomy behaviors.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -53,4 +53,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/text/text.js b/core/modules/text/text.js
index 615a1e6..ad89bd8 100644
--- a/core/modules/text/text.js
+++ b/core/modules/text/text.js
@@ -3,7 +3,7 @@
* Text behaviors.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -58,4 +58,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/user/user.permissions.js b/core/modules/user/user.permissions.js
index ec90b38..c3dc24f 100644
--- a/core/modules/user/user.permissions.js
+++ b/core/modules/user/user.permissions.js
@@ -3,7 +3,7 @@
* User permission page behaviors.
*/
-(function ($) {
+(function ($, Drupal) {
'use strict';
@@ -85,4 +85,4 @@
}
};
-})(jQuery);
+})(jQuery, Drupal);
diff --git a/core/modules/views/js/ajax_view.js b/core/modules/views/js/ajax_view.js
index b3a8ace..ad61000 100644
--- a/core/modules/views/js/ajax_view.js
+++ b/core/modules/views/js/ajax_view.js
@@ -85,20 +85,20 @@
// Add the ajax to exposed forms.
this.$exposed_form = $('form#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
- this.$exposed_form.once('exposed-form').each(jQuery.proxy(this.attachExposedFormAjax, this));
+ this.$exposed_form.once('exposed-form').each($.proxy(this.attachExposedFormAjax, this));
// Add the ajax to pagers.
this.$view
// Don't attach to nested views. Doing so would attach multiple behaviors
// to a given element.
- .filter(jQuery.proxy(this.filterNestedViews, this))
- .once('ajax-pager').each(jQuery.proxy(this.attachPagerAjax, this));
+ .filter($.proxy(this.filterNestedViews, this))
+ .once('ajax-pager').each($.proxy(this.attachPagerAjax, this));
// Add a trigger to update this view specifically. In order to trigger a
// refresh use the following code.
//
// @code
- // jQuery('.view-name').trigger('RefreshView');
+ // $('.view-name').trigger('RefreshView');
// @endcode
var self_settings = $.extend({}, this.element_settings, {
event: 'RefreshView',
@@ -140,7 +140,7 @@
*/
Drupal.views.ajaxView.prototype.attachPagerAjax = function () {
this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a')
- .each(jQuery.proxy(this.attachPagerLinkAjax, this));
+ .each($.proxy(this.attachPagerLinkAjax, this));
};
/**