summaryrefslogtreecommitdiff
path: root/modules/menu
diff options
context:
space:
mode:
authorDries <dries@buytaert.net>2012-01-29 16:13:03 -0500
committerDries <dries@buytaert.net>2012-01-29 16:13:03 -0500
commit1dc0815d475b59969529fca1ae3f290b285e54ac (patch)
treecf7a381edc5af687927a0203af68dfc93e67594b /modules/menu
parent92dee11b7b0fc155d949bc19eae9958277b53328 (diff)
downloadbrdo-1dc0815d475b59969529fca1ae3f290b285e54ac.tar.gz
brdo-1dc0815d475b59969529fca1ae3f290b285e54ac.tar.bz2
- Patch #1420048 by nod_, droplet: fixed menu* JS indention.
Diffstat (limited to 'modules/menu')
-rw-r--r--modules/menu/menu.admin.js77
-rw-r--r--modules/menu/menu.js1
2 files changed, 38 insertions, 40 deletions
diff --git a/modules/menu/menu.admin.js b/modules/menu/menu.admin.js
index 4a2c73231..4fa094e71 100644
--- a/modules/menu/menu.admin.js
+++ b/modules/menu/menu.admin.js
@@ -1,47 +1,46 @@
-
(function ($) {
- Drupal.behaviors.menuChangeParentItems = {
- attach: function (context, settings) {
- $('fieldset#edit-menu input').each(function () {
- $(this).change(function () {
- // Update list of available parent menu items.
- Drupal.menu_update_parent_list();
- });
+Drupal.behaviors.menuChangeParentItems = {
+ attach: function (context, settings) {
+ $('fieldset#edit-menu input').each(function () {
+ $(this).change(function () {
+ // Update list of available parent menu items.
+ Drupal.menu_update_parent_list();
});
- }
- };
+ });
+ }
+};
- /**
- * Function to set the options of the menu parent item dropdown.
- */
- Drupal.menu_update_parent_list = function () {
- var values = [];
+/**
+ * Function to set the options of the menu parent item dropdown.
+ */
+Drupal.menu_update_parent_list = function () {
+ var values = [];
- $('input:checked', $('fieldset#edit-menu')).each(function () {
- // Get the names of all checked menus.
- values.push(Drupal.checkPlain($.trim($(this).val())));
- });
+ $('input:checked', $('fieldset#edit-menu')).each(function () {
+ // Get the names of all checked menus.
+ values.push(Drupal.checkPlain($.trim($(this).val())));
+ });
- var url = Drupal.settings.basePath + 'admin/structure/menu/parents';
- $.ajax({
- url: location.protocol + '//' + location.host + url,
- type: 'POST',
- data: {'menus[]' : values},
- dataType: 'json',
- success: function (options) {
- // Save key of last selected element.
- var selected = $('fieldset#edit-menu #edit-menu-parent :selected').val();
- // Remove all exisiting options from dropdown.
- $('fieldset#edit-menu #edit-menu-parent').children().remove();
- // Add new options to dropdown.
- jQuery.each(options, function(index, value) {
- $('fieldset#edit-menu #edit-menu-parent').append(
- $('<option ' + (index == selected ? ' selected="selected"' : '') + '></option>').val(index).text(value)
- );
- });
- }
- });
- };
+ var url = Drupal.settings.basePath + 'admin/structure/menu/parents';
+ $.ajax({
+ url: location.protocol + '//' + location.host + url,
+ type: 'POST',
+ data: {'menus[]' : values},
+ dataType: 'json',
+ success: function (options) {
+ // Save key of last selected element.
+ var selected = $('fieldset#edit-menu #edit-menu-parent :selected').val();
+ // Remove all exisiting options from dropdown.
+ $('fieldset#edit-menu #edit-menu-parent').children().remove();
+ // Add new options to dropdown.
+ jQuery.each(options, function(index, value) {
+ $('fieldset#edit-menu #edit-menu-parent').append(
+ $('<option ' + (index == selected ? ' selected="selected"' : '') + '></option>').val(index).text(value)
+ );
+ });
+ }
+ });
+};
})(jQuery);
diff --git a/modules/menu/menu.js b/modules/menu/menu.js
index 40c1bfe95..ff4ef1e17 100644
--- a/modules/menu/menu.js
+++ b/modules/menu/menu.js
@@ -1,4 +1,3 @@
-
(function ($) {
Drupal.behaviors.menuFieldsetSummaries = {