Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
95732b42
Commit
95732b42
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
add dependency support to customizer
parent
f891f91b
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/js/customizer.js
+22
-0
assets/js/customizer.js
customize.html
+7
-7
customize.html
with
29 additions
and
7 deletions
+29
-7
assets/js/customizer.js
+
22
-
0
View file @
95732b42
...
@@ -216,5 +216,27 @@ window.onload = function () { // wait for load in a dumb way because B-0
...
@@ -216,5 +216,27 @@ window.onload = function () { // wait for load in a dumb way because B-0
inputsVariables
.
val
(
''
)
inputsVariables
.
val
(
''
)
})
})
$
(
'
[data-dependencies]
'
).
on
(
'
click
'
,
function
()
{
if
(
!
$
(
this
).
is
(
'
:checked
'
))
return
var
dependencies
=
this
.
getAttribute
(
'
data-dependencies
'
)
if
(
!
dependencies
)
return
dependencies
=
dependencies
.
split
(
'
,
'
)
for
(
var
i
=
0
;
i
<
dependencies
.
length
;
i
++
)
{
var
dependency
=
$
(
'
[value="
'
+
dependencies
[
i
]
+
'
"]
'
)
dependency
&&
dependency
.
prop
(
'
checked
'
,
true
)
}
})
$
(
'
[data-dependents]
'
).
on
(
'
click
'
,
function
()
{
if
(
$
(
this
).
is
(
'
:checked
'
))
return
var
dependents
=
this
.
getAttribute
(
'
data-dependents
'
)
if
(
!
dependents
)
return
dependents
=
dependents
.
split
(
'
,
'
)
for
(
var
i
=
0
;
i
<
dependents
.
length
;
i
++
)
{
var
dependent
=
$
(
'
[value="
'
+
dependents
[
i
]
+
'
"]
'
)
dependent
&&
dependent
.
prop
(
'
checked
'
,
false
)
}
})
parseUrl
()
parseUrl
()
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
customize.html
+
7
-
7
View file @
95732b42
...
@@ -66,13 +66,13 @@ base_url: "../"
...
@@ -66,13 +66,13 @@ base_url: "../"
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"forms.less"
>
<input
type=
"checkbox"
checked
value=
"forms.less"
data-dependents=
"navbar.less,input-groups.less"
>
Forms
Forms
</label>
</label>
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"buttons.less"
>
<input
type=
"checkbox"
checked
value=
"buttons.less"
data-dependents=
"button-groups.less"
>
Buttons
Buttons
</label>
</label>
</div>
</div>
...
@@ -112,7 +112,7 @@ base_url: "../"
...
@@ -112,7 +112,7 @@ base_url: "../"
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"navbar.less"
data-dependenc
y
=
"forms.less"
>
<input
type=
"checkbox"
checked
value=
"navbar.less"
data-dependenc
ies
=
"forms.less"
>
Navbar
Navbar
</label>
</label>
</div>
</div>
...
@@ -223,13 +223,13 @@ base_url: "../"
...
@@ -223,13 +223,13 @@ base_url: "../"
<h4>
Miscellaneous
</h4>
<h4>
Miscellaneous
</h4>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"input-groups.less"
data-dependenc
y
=
"forms.less"
>
<input
type=
"checkbox"
checked
value=
"input-groups.less"
data-dependenc
ies
=
"forms.less"
>
Input groups
Input groups
</label>
</label>
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"button-groups.less"
data-dependenc
y
=
"buttons.less"
>
<input
type=
"checkbox"
checked
value=
"button-groups.less"
data-dependenc
ies
=
"buttons.less"
>
Button groups
Button groups
</label>
</label>
</div>
</div>
...
@@ -304,13 +304,13 @@ base_url: "../"
...
@@ -304,13 +304,13 @@ base_url: "../"
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"tooltip.js"
>
<input
type=
"checkbox"
checked
value=
"tooltip.js"
data-dependents=
"popover.js"
>
Tooltips
Tooltips
</label>
</label>
</div>
</div>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<input
type=
"checkbox"
checked
value=
"popover.js"
data-dependenc
y
=
"tooltip.js"
>
<input
type=
"checkbox"
checked
value=
"popover.js"
data-dependenc
ies
=
"tooltip.js"
>
Popovers
<small>
(requires Tooltips)
</small>
Popovers
<small>
(requires Tooltips)
</small>
</label>
</label>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets