Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
colorbox-3127345
Commits
5cfb853b
Commit
5cfb853b
authored
Apr 03, 2010
by
frjo
Browse files
Adding in context to selectors and adding initColorbox-processed/initColorboxForm-processed classes
parent
c63c5f9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
js/colorbox.js
View file @
5cfb853b
// $Id$
Drupal
.
behaviors
.
initColorbox
=
function
(
context
)
{
var
settings
=
Drupal
.
settings
.
colorbox
;
$
(
'
.colorbox
'
).
colorbox
({
$
(
'
.colorbox
'
,
context
).
filter
(
'
:not(.initColorbox-processed)
'
).
addClass
(
'
initColorbox-processed
'
).
colorbox
({
transition
:
settings
.
transition
,
speed
:
settings
.
speed
,
opacity
:
settings
.
opacity
,
...
...
js/colorbox_admin_settings.js
View file @
5cfb853b
// $Id$
Drupal
.
behaviors
.
initColorboxAdminSettings
=
function
(
context
)
{
$
(
'
div.colorbox-custom-settings-activate input.form-radio
'
).
click
(
function
()
{
$
(
'
div.colorbox-custom-settings-activate input.form-radio
'
,
context
).
click
(
function
()
{
if
(
this
.
value
==
1
)
{
$
(
'
div.colorbox-custom-settings
'
).
show
();
}
...
...
js/colorbox_form.js
View file @
5cfb853b
...
...
@@ -6,7 +6,7 @@ Drupal.behaviors.initColorboxForm = function (context) {
if
(
!
results
)
{
return
0
;
}
return
results
[
1
]
||
0
;
};
$
(
'
.colorbox-form
'
,
context
).
colorbox
({
$
(
'
.colorbox-form
'
,
context
).
filter
(
'
:not(.initColorboxForm-processed)
'
).
addClass
(
'
initColorboxForm-processed
'
).
colorbox
({
innerWidth
:
function
(){
return
$
.
urlParam
(
'
width
'
,
$
(
this
).
attr
(
'
href
'
));
},
...
...
js/colorbox_image_module.js
View file @
5cfb853b
// $Id$
Drupal
.
behaviors
.
initColorboxImageModule
=
function
(
context
)
{
// Image Attach Functionality
$
(
'
.image-attach-body > a
'
).
each
(
function
(
i
)
{
$
(
'
.image-attach-body > a
'
,
context
).
each
(
function
(
i
)
{
// Modify link to jpg
this
.
href
=
$
(
'
.image-attach-body > a > img:eq(
'
+
i
+
'
)
'
).
attr
(
"
src
"
).
replace
(
"
.thumbnail
"
,
""
);
// Add rel tag to group
this
.
rel
=
"
image-gallery
"
;
// Colorbox it
});
$
(
"
a[rel='image-gallery']
"
).
colorbox
();
$
(
"
a[rel='image-gallery']
"
,
context
).
colorbox
();
};
js/colorbox_login.js
View file @
5cfb853b
// $Id$
Drupal
.
behaviors
.
initColorboxLogin
=
function
(
context
)
{
$
(
"
a[href*='/user/login'], a[href*='?q=user/login']
"
).
colorbox
({
iframe
:
true
,
innerWidth
:
250
,
innerHeight
:
230
}).
each
(
function
()
{
$
(
"
a[href*='/user/login'], a[href*='?q=user/login']
"
,
context
).
colorbox
({
iframe
:
true
,
innerWidth
:
250
,
innerHeight
:
230
}).
each
(
function
()
{
this
.
href
=
this
.
href
.
replace
(
/user
\/
login/
,
"
user/login/colorbox
"
);
});
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment