Commit 00606660 authored by catch's avatar catch

Issue #2672200 by Sweetchuck, gauravjeet: Wrap Drupal with closure variable

parent 49039753
......@@ -1195,4 +1195,4 @@
}
};
})(jQuery, this, Drupal, drupalSettings);
})(jQuery, window, Drupal, drupalSettings);
......@@ -3,7 +3,7 @@
* Drupal's states library.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -721,4 +721,4 @@
}
}
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Timezone detection.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -73,4 +73,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -12,7 +12,7 @@
* @event summaryUpdated
*/
(function ($) {
(function ($, Drupal, drupalSettings) {
'use strict';
......@@ -249,4 +249,4 @@
return tab;
};
})(jQuery);
})(jQuery, Drupal, drupalSettings);
......@@ -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);
......@@ -3,7 +3,7 @@
* Defines Javascript behaviors for the block_content module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -54,4 +54,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Javascript behaviors for the Book module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -34,4 +34,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -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, _);
......@@ -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, _);
......@@ -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, _);
......@@ -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, _);
......@@ -3,7 +3,7 @@
* Attaches the behaviors for the Color module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -294,4 +294,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Attaches preview-related behavior for the Color module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -71,4 +71,4 @@
}
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Attaches comment behaviors to the entity form.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -20,4 +20,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -6,7 +6,7 @@
* installed.
*/
(function ($, Drupal) {
(function ($, Drupal, drupalSettings) {
'use strict';
......@@ -174,4 +174,4 @@
}
}
})(jQuery, Drupal);
})(jQuery, Drupal, drupalSettings);
......@@ -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, _);
......@@ -3,7 +3,7 @@
* Attaches administration-specific behavior for the Filter module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -66,4 +66,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -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);
......@@ -3,7 +3,7 @@
* Attaches behavior for the Filter module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -36,4 +36,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Menu UI admin behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -65,4 +65,4 @@
});
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Menu UI behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -88,4 +88,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Javascript for the node content editing form.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -59,4 +59,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -2,7 +2,7 @@
* @file
* Attaches behaviors for the Path module.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -26,4 +26,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -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, _);
......@@ -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));
......@@ -3,7 +3,7 @@
* Simpletest behaviors.
*/
(function ($) {
(function ($, Drupal, drupalSettings) {
'use strict';
......@@ -127,4 +127,4 @@
}
};
})(jQuery);
})(jQuery, Drupal, drupalSettings);
......@@ -3,7 +3,7 @@
* Taxonomy behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -53,4 +53,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* Text behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -58,4 +58,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -3,7 +3,7 @@
* User permission page behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
......@@ -85,4 +85,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);
......@@ -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));
};
/**
......
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