Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443488
Commits
becdc432
Commit
becdc432
authored
17 years ago
by
Gábor Hojtsy
Browse files
Options
Downloads
Patches
Plain Diff
#214292
by theborg: collapse.js alters the default submit buttons in forms in Internet Explorer
parent
d04ebcee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/collapse.js
+7
-3
7 additions, 3 deletions
misc/collapse.js
with
7 additions
and
3 deletions
misc/collapse.js
+
7
−
3
View file @
becdc432
...
...
@@ -5,7 +5,9 @@
*/
Drupal
.
toggleFieldset
=
function
(
fieldset
)
{
if
(
$
(
fieldset
).
is
(
'
.collapsed
'
))
{
var
content
=
$
(
'
> div
'
,
fieldset
);
// Action div containers are processed separately because of a IE bug
// that alters the default submit button behavior.
var
content
=
$
(
'
> div:not(.action)
'
,
fieldset
);
$
(
fieldset
).
removeClass
(
'
collapsed
'
);
content
.
hide
();
content
.
slideDown
(
{
...
...
@@ -14,6 +16,7 @@ Drupal.toggleFieldset = function(fieldset) {
complete
:
function
()
{
Drupal
.
collapseScrollIntoView
(
this
.
parentNode
);
this
.
parentNode
.
animating
=
false
;
$
(
'
div.action
'
,
fieldset
).
show
();
},
step
:
function
()
{
// Scroll the fieldset into view
...
...
@@ -22,7 +25,8 @@ Drupal.toggleFieldset = function(fieldset) {
});
}
else
{
var
content
=
$
(
'
> div
'
,
fieldset
).
slideUp
(
'
fast
'
,
function
()
{
$
(
'
div.action
'
,
fieldset
).
hide
();
var
content
=
$
(
'
> div:not(.action)
'
,
fieldset
).
slideUp
(
'
fast
'
,
function
()
{
$
(
this
.
parentNode
).
addClass
(
'
collapsed
'
);
this
.
parentNode
.
animating
=
false
;
});
...
...
@@ -67,7 +71,7 @@ Drupal.behaviors.collapse = function (context) {
return
false
;
}))
.
after
(
$
(
'
<div class="fieldset-wrapper"></div>
'
)
.
append
(
fieldset
.
children
(
'
:not(legend)
'
)))
.
append
(
fieldset
.
children
(
'
:not(legend)
:not(.action)
'
)))
.
addClass
(
'
collapse-processed
'
);
});
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment