Posted by smartinm on October 7, 2012 at 12:39pm
3 followers
Jump to:
| 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.


Simple fix, patch attached.
| Attachment | Size |
|---|---|
| media_gallery_menu_js.png | 8.63 KB |
| media_gallery_menu_js_fixed.png | 9.09 KB |
| media_gallery_fieldset_summary.patch | 466 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
Thank you. Just checked the core modules. They also use CamelCase.
Patch commited: http://drupalcode.org/project/media_gallery.git/commit/bc3c4c5
#4
Automatically closed -- issue fixed for 2 weeks with no activity.