Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
colorbox
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
colorbox
Commits
ce1d1a90
Commit
ce1d1a90
authored
Dec 31, 2015
by
Sam152
Committed by
frjo
Dec 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2642380
by Sam152: Use states API for the admin form instead of custom JavaScript toggles
parent
c84536e6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
70 deletions
+55
-70
colorbox.libraries.yml
colorbox.libraries.yml
+0
-8
js/colorbox_admin_settings.js
js/colorbox_admin_settings.js
+0
-32
src/Form/ColorboxSettingsForm.php
src/Form/ColorboxSettingsForm.php
+55
-30
No files found.
colorbox.libraries.yml
View file @
ce1d1a90
...
...
@@ -30,14 +30,6 @@ init:
-
core/jquery
-
core/drupal
admin_settings
:
version
:
VERSION
js
:
js/colorbox_admin_settings.js
:
{
preprocess
:
false
}
dependencies
:
-
core/jquery
-
core/drupal
plain
:
version
:
VERSION
js
:
...
...
js/colorbox_admin_settings.js
deleted
100644 → 0
View file @
c84536e6
(
function
(
$
)
{
Drupal
.
behaviors
.
initColorboxAdminSettings
=
{
attach
:
function
(
context
,
settings
)
{
$
(
'
div.colorbox-custom-settings-activate input.form-radio
'
,
context
).
click
(
function
()
{
if
(
this
.
value
==
1
)
{
$
(
'
div.colorbox-custom-settings
'
,
context
).
show
();
}
else
{
$
(
'
div.colorbox-custom-settings
'
,
context
).
hide
();
}
});
$
(
'
div.colorbox-slideshow-settings-activate input.form-radio
'
,
context
).
click
(
function
()
{
if
(
this
.
value
==
1
)
{
$
(
'
div.colorbox-slideshow-settings
'
,
context
).
show
();
}
else
{
$
(
'
div.colorbox-slideshow-settings
'
,
context
).
hide
();
}
});
$
(
'
div.colorbox-title-trim-settings-activate input.form-radio
'
,
context
).
click
(
function
()
{
if
(
this
.
value
==
1
)
{
$
(
'
div.colorbox-title-trim-settings
'
,
context
).
show
();
}
else
{
$
(
'
div.colorbox-title-trim-settings
'
,
context
).
hide
();
}
});
}
};
})(
jQuery
);
src/Form/ColorboxSettingsForm.php
View file @
ce1d1a90
This diff is collapsed.
Click to expand it.
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