In media_gallery.form.js Media gallery overwrites the menu.module behavior vertical tabs summary.

Vertical tab summary bug
Vertical tab summary fixed

Simple fix, patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Moloc’s picture

In the JS Coding Standards, CamelCasing is defined, as you have done.

In the vertical tabs example, they use the exact module name, without CamelCasing.

   3 /**
   4  * Update the summary for the module's vertical tab.
   5  */
   6 Drupal.behaviors.vertical_tabs_exampleFieldsetSummaries = {
   7   attach: function (context) {

Should we do the same as the example, or is CamelCasing ok?

smartinm’s picture

I think we should respect the coding style. Currently, Media gallery module mix both styles, for example:

In media_gallery.js:

Drupal.behaviors.media_gallery = {};

Drupal.behaviors.media_gallery.attach = function (context, settings) {
  $(window).bind('media_youtube_load', Drupal.media_gallery.handleMediaYoutubeLoad);
};

In media_gallery.dragdrop.js:

Drupal.behaviors.mediaGallerySort = {};

Drupal.behaviors.mediaGallerySort.attach = function (context, settings) {
  var $ = jQuery;

Maybe we can create another issue to apply the JS coding standards to all the files.

Moloc’s picture

Status: Active » Fixed

Thank you. Just checked the core modules. They also use CamelCase.

Patch commited: http://drupalcode.org/project/media_gallery.git/commit/bc3c4c5

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added screenshots images.