Download & Extend

Media gallery overwrites the menu fieldset vertical tabs summary

Project:Media Gallery
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSize
media_gallery_menu_js.png8.63 KB
media_gallery_menu_js_fixed.png9.09 KB
media_gallery_fieldset_summary.patch466 bytes

Comments

#1

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?

#2

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.

#3

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

#4

Status:fixed» closed (fixed)

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

nobody click here