Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
c8c4d5b3
Commit
c8c4d5b3
authored
Feb 06, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix alert tests + add show option back to modals
parent
f68f7870
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
docs/assets/bootstrap.zip
docs/assets/bootstrap.zip
+0
-0
docs/assets/js/bootstrap-modal.js
docs/assets/js/bootstrap-modal.js
+4
-3
docs/javascript.html
docs/javascript.html
+6
-0
docs/templates/pages/javascript.mustache
docs/templates/pages/javascript.mustache
+6
-0
js/bootstrap-modal.js
js/bootstrap-modal.js
+4
-3
js/tests/unit/bootstrap-alert.js
js/tests/unit/bootstrap-alert.js
+2
-2
No files found.
docs/assets/bootstrap.zip
View file @
c8c4d5b3
No preview for this file type
docs/assets/js/bootstrap-modal.js
View file @
c8c4d5b3
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
* ====================== */
* ====================== */
var
Modal
=
function
(
content
,
options
)
{
var
Modal
=
function
(
content
,
options
)
{
this
.
options
=
$
.
extend
({},
$
.
fn
.
modal
.
defaults
,
options
)
this
.
options
=
options
this
.
$element
=
$
(
content
)
this
.
$element
=
$
(
content
)
.
delegate
(
'
[data-dismiss="modal"]
'
,
'
click.dismiss.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
.
delegate
(
'
[data-dismiss="modal"]
'
,
'
click.dismiss.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
}
}
...
@@ -177,16 +177,17 @@
...
@@ -177,16 +177,17 @@
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
,
data
=
$this
.
data
(
'
modal
'
)
,
data
=
$this
.
data
(
'
modal
'
)
,
options
=
typeof
option
==
'
object
'
&&
option
,
options
=
$
.
extend
({},
$
.
fn
.
modal
.
defaults
,
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
else
data
.
show
()
else
if
(
options
.
show
)
data
.
show
()
})
})
}
}
$
.
fn
.
modal
.
defaults
=
{
$
.
fn
.
modal
.
defaults
=
{
backdrop
:
true
backdrop
:
true
,
keyboard
:
true
,
keyboard
:
true
,
show
:
true
}
}
$
.
fn
.
modal
.
Constructor
=
Modal
$
.
fn
.
modal
.
Constructor
=
Modal
...
...
docs/javascript.html
View file @
c8c4d5b3
...
@@ -273,6 +273,12 @@
...
@@ -273,6 +273,12 @@
<td>
true
</td>
<td>
true
</td>
<td>
Closes the modal when escape key is pressed
</td>
<td>
Closes the modal when escape key is pressed
</td>
</tr>
</tr>
<tr>
<td>
show
</td>
<td>
boolean
</td>
<td>
true
</td>
<td>
Shows the modal when initialized.
</td>
</tr>
</tbody>
</tbody>
</table>
</table>
<h3>
Markup
</h3>
<h3>
Markup
</h3>
...
...
docs/templates/pages/javascript.mustache
View file @
c8c4d5b3
...
@@ -197,6 +197,12 @@
...
@@ -197,6 +197,12 @@
<td>
{{
_i
}}
true
{{/
i
}}
</td>
<td>
{{
_i
}}
true
{{/
i
}}
</td>
<td>
{{
_i
}}
Closes the modal when escape key is pressed
{{/
i
}}
</td>
<td>
{{
_i
}}
Closes the modal when escape key is pressed
{{/
i
}}
</td>
</tr>
</tr>
<tr>
<td>
{{
_i
}}
show
{{/
i
}}
</td>
<td>
{{
_i
}}
boolean
{{/
i
}}
</td>
<td>
{{
_i
}}
true
{{/
i
}}
</td>
<td>
{{
_i
}}
Shows the modal when initialized.
{{/
i
}}
</td>
</tr>
</tbody>
</tbody>
</table>
</table>
<h3>
{{
_i
}}
Markup
{{/
i
}}
</h3>
<h3>
{{
_i
}}
Markup
{{/
i
}}
</h3>
...
...
js/bootstrap-modal.js
View file @
c8c4d5b3
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
* ====================== */
* ====================== */
var
Modal
=
function
(
content
,
options
)
{
var
Modal
=
function
(
content
,
options
)
{
this
.
options
=
$
.
extend
({},
$
.
fn
.
modal
.
defaults
,
options
)
this
.
options
=
options
this
.
$element
=
$
(
content
)
this
.
$element
=
$
(
content
)
.
delegate
(
'
[data-dismiss="modal"]
'
,
'
click.dismiss.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
.
delegate
(
'
[data-dismiss="modal"]
'
,
'
click.dismiss.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
}
}
...
@@ -177,16 +177,17 @@
...
@@ -177,16 +177,17 @@
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
,
data
=
$this
.
data
(
'
modal
'
)
,
data
=
$this
.
data
(
'
modal
'
)
,
options
=
typeof
option
==
'
object
'
&&
option
,
options
=
$
.
extend
({},
$
.
fn
.
modal
.
defaults
,
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
)
$this
.
data
(
'
modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
modal
'
,
(
data
=
new
Modal
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
else
data
.
show
()
else
if
(
options
.
show
)
data
.
show
()
})
})
}
}
$
.
fn
.
modal
.
defaults
=
{
$
.
fn
.
modal
.
defaults
=
{
backdrop
:
true
backdrop
:
true
,
keyboard
:
true
,
keyboard
:
true
,
show
:
true
}
}
$
.
fn
.
modal
.
Constructor
=
Modal
$
.
fn
.
modal
.
Constructor
=
Modal
...
...
js/tests/unit/bootstrap-alert.js
View file @
c8c4d5b3
...
@@ -13,7 +13,7 @@ $(function () {
...
@@ -13,7 +13,7 @@ $(function () {
test
(
"
should fade element out on clicking .close
"
,
function
()
{
test
(
"
should fade element out on clicking .close
"
,
function
()
{
var
alertHTML
=
'
<div class="alert-message warning fade in">
'
var
alertHTML
=
'
<div class="alert-message warning fade in">
'
+
'
<a class="close" href="#" data-dismiss="alert">×</a>
'
+
'
<a class="close" href="#" data-dismiss="alert">×</a>
'
+
'
<p><strong>Holy guacamole!</strong> Best check yo self, you
'
re
not
looking
too
good
.
<
/p>
'
+
'
<p><strong>Holy guacamole!</strong> Best check yo self, you
\
'
re not looking too good.</p>
'
+
'
</div>
'
+
'
</div>
'
,
alert
=
$
(
alertHTML
).
alert
()
,
alert
=
$
(
alertHTML
).
alert
()
...
@@ -27,7 +27,7 @@ $(function () {
...
@@ -27,7 +27,7 @@ $(function () {
var
alertHTML
=
'
<div class="alert-message warning fade in">
'
var
alertHTML
=
'
<div class="alert-message warning fade in">
'
+
'
<a class="close" href="#" data-dismiss="alert">×</a>
'
+
'
<a class="close" href="#" data-dismiss="alert">×</a>
'
+
'
<p><strong>Holy guacamole!</strong> Best check yo self, you
'
re
not
looking
too
good
.
<
/p>
'
+
'
<p><strong>Holy guacamole!</strong> Best check yo self, you
\
'
re not looking too good.</p>
'
+
'
</div>
'
+
'
</div>
'
,
alert
=
$
(
alertHTML
).
appendTo
(
'
#qunit-fixture
'
).
alert
()
,
alert
=
$
(
alertHTML
).
appendTo
(
'
#qunit-fixture
'
).
alert
()
...
...
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