summaryrefslogtreecommitdiff
path: root/misc/collapse.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
commitbda52632a5aa033d44151c224a39236b223c6b0e (patch)
treeda56b8095f58963707655312071d41de95adca84 /misc/collapse.js
parenta4dc8467bbe69ba984be31309f536af74dc64e73 (diff)
downloadbrdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.gz
brdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.bz2
#444402 by kkaefer and RobLoach: Enforce coding standards on all core JavaScript.
Diffstat (limited to 'misc/collapse.js')
-rw-r--r--misc/collapse.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/collapse.js b/misc/collapse.js
index 11426a1de..4c07506df 100644
--- a/misc/collapse.js
+++ b/misc/collapse.js
@@ -11,7 +11,7 @@ Drupal.toggleFieldset = function(fieldset) {
var content = $('> div:not(.action)', fieldset);
$(fieldset).removeClass('collapsed');
content.hide();
- content.slideDown( {
+ content.slideDown({
duration: 'fast',
easing: 'linear',
complete: function() {
@@ -37,7 +37,7 @@ Drupal.toggleFieldset = function(fieldset) {
/**
* Scroll a given fieldset into view as much as possible.
*/
-Drupal.collapseScrollIntoView = function (node) {
+Drupal.collapseScrollIntoView = function(node) {
var h = self.innerHeight || document.documentElement.clientHeight || $('body')[0].clientHeight || 0;
var offset = self.pageYOffset || document.documentElement.scrollTop || $('body')[0].scrollTop || 0;
var posY = $(node).offset().top;
@@ -71,7 +71,7 @@ Drupal.behaviors.collapse = {
// Turn the legend into a clickable link and wrap the contents of the fieldset
// in a div for easier animation
var text = this.innerHTML;
- $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() {
+ $(this).empty().append($('<a href="#">' + text + '</a>').click(function() {
var fieldset = $(this).parents('fieldset:first')[0];
// Don't animate multiple times
if (!fieldset.animating) {
@@ -82,8 +82,8 @@ Drupal.behaviors.collapse = {
}))
.append(summary)
.after($('<div class="fieldset-wrapper"></div>')
- .append(fieldset.children(':not(legend):not(.action)')))
- .addClass('collapse-processed');
+ .append(fieldset.children(':not(legend):not(.action)'))
+ ).addClass('collapse-processed');
});
}
};