Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jquery_loadinganimation
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
jquery_loadinganimation
Commits
f91185ed
Commit
f91185ed
authored
12 years ago
by
Julian Pustkuchen
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1827016
by Anybody: Added further admin options to close layer.
parent
3d6f11f6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jquery_loadinganimation.admin.inc
+14
-0
14 additions, 0 deletions
jquery_loadinganimation.admin.inc
jquery_loadinganimation.js
+13
-9
13 additions, 9 deletions
jquery_loadinganimation.js
with
27 additions
and
9 deletions
jquery_loadinganimation.admin.inc
+
14
−
0
View file @
f91185ed
...
...
@@ -53,5 +53,19 @@ function jquery_loadinganimation_settings_form() {
'#required'
=>
FALSE
,
'#default_value'
=>
variable_get
(
'jquery_loadinganimation_settings_form'
,
''
));
$form
[
'jquery_loadinganimation_close_on_click'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Close on layer click'
),
'#description'
=>
t
(
"Close the layer if user clicks on it while loading process is still in progress."
),
'#default_value'
=>
variable_get
(
'jquery_loadinganimation_close_on_click'
,
TRUE
));
$form
[
'jquery_loadinganimation_close_on_esc'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Close on ESC press'
),
'#description'
=>
t
(
"Close the layer if user presses ESC while loading process is still in progress."
),
'#default_value'
=>
variable_get
(
'jquery_loadinganimation_close_on_esc'
,
TRUE
));
return
system_settings_form
(
$form
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
jquery_loadinganimation.js
+
13
−
9
View file @
f91185ed
...
...
@@ -68,17 +68,21 @@
}
// Hide on animation click!
$
(
"
div#loadinganimation
"
).
live
(
'
click
'
,
function
()
{
Drupal
.
behaviors
.
jquery_loadinganimation
.
Loadinganimation
.
hide
();
});
if
(
Drupal
.
settings
.
jquery_loadinganimation
.
close_on_click
)
{
$
(
"
div#loadinganimation
"
).
live
(
'
click
'
,
function
()
{
Drupal
.
behaviors
.
jquery_loadinganimation
.
Loadinganimation
.
hide
();
});
}
// Hide on ESC press.
$
(
document
).
keyup
(
function
(
event
)
{
var
keycode
=
event
.
which
;
if
(
keycode
==
27
)
{
// escape, close box
Drupal
.
behaviors
.
jquery_loadinganimation
.
Loadinganimation
.
hide
();
}
});
if
(
Drupal
.
settings
.
jquery_loadinganimation
.
close_on_esc
)
{
$
(
document
).
keyup
(
function
(
event
)
{
var
keycode
=
event
.
which
;
if
(
keycode
==
27
)
{
// escape, close box
Drupal
.
behaviors
.
jquery_loadinganimation
.
Loadinganimation
.
hide
();
}
});
}
};
// Initialize!
...
...
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