Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
b7b74aa8
Commit
b7b74aa8
authored
Oct 24, 2011
by
cniska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few minor issues with the jQuery UI widgets.
parent
e0ef21b1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
22 deletions
+41
-22
jquery.ui.bootalert.js
assets/js/jquery.ui.bootalert.js
+31
-21
jquery.ui.bootmodal.js
assets/js/jquery.ui.bootmodal.js
+2
-1
jquery.ui.bootpopover.js
assets/js/jquery.ui.bootpopover.js
+4
-0
jquery.ui.boottwipsy.js
assets/js/jquery.ui.boottwipsy.js
+4
-0
No files found.
assets/js/jquery.ui.bootalert.js
View file @
b7b74aa8
...
...
@@ -17,23 +17,36 @@
name
:
'alert'
,
/**
* Widget options.
* - keys: The valid alert types.
* - template: The HTML template for displaying alerts.
* - displayTime: The time to display each alert.
* - closeTime: The duration for closing each alert.
* @type Object
*/
options
:
{
keys
:
[
'success'
,
'info'
,
'warning'
,
'error'
],
template
:
'<div class="alert-message {key}"><p>{message}</p></div>'
,
displayTime
:
5000
,
fadeOut
Time
:
350
close
Time
:
350
},
/**
* Creates the widget.
*/
_create
:
function
()
{
var
alerts
=
this
.
element
.
find
(
'.alert-message'
);
var
self
=
this
,
alerts
=
self
.
element
.
find
(
'.alert-message'
);
for
(
var
i
=
0
,
l
=
alerts
.
length
;
i
<
l
;
++
i
)
{
var
alert
=
$
(
alerts
[
i
]
);
this
.
_appendCloseLink
(
alert
);
var
alert
=
$
(
alerts
[
i
]
),
closeLink
=
self
.
_createCloseLink
(
alert
);
closeLink
.
prependTo
(
alert
);
if
(
self
.
options
.
closeTime
>
0
)
{
setTimeout
(
function
()
{
self
.
close
(
alert
);
},
self
.
options
.
displayTime
);
}
}
},
/**
...
...
@@ -50,41 +63,38 @@
var
alert
=
$
(
template
)
.
appendTo
(
this
.
element
);
this
.
_appendCloseLink
(
alert
);
var
closeLink
=
this
.
_createCloseLink
(
alert
);
closeLink
.
prependTo
(
alert
);
}
return
this
;
},
/**
* Closes
the alert
.
* @param {
HTMLElemen
t} alert The alert element.
* Closes
a specific alert message
.
* @param {
Objec
t} alert The alert element.
*/
close
:
function
(
alert
)
{
alert
.
fadeOut
(
this
.
options
.
fadeTime
,
function
()
{
alert
.
html
(
''
);
if
(
alert
)
{
alert
.
fadeOut
(
this
.
options
.
closeTime
,
function
()
{
$
(
this
).
html
(
''
);
});
}
return
this
;
},
/**
* Creates the close link
for a specific alert message
.
* @param {
HTMLElemen
t} alert The alert element.
* Creates the close link.
* @param {
Objec
t} alert The alert element.
*/
_
append
CloseLink
:
function
(
alert
)
{
_
create
CloseLink
:
function
(
alert
)
{
var
self
=
this
;
$
(
'<a class="close" href="#">x</a>'
)
return
$
(
'<a class="close" href="#">x</a>'
)
.
bind
(
'click'
,
function
(
event
)
{
self
.
close
(
alert
,
self
.
options
.
fadeOutTime
);
self
.
close
(
alert
);
event
.
preventDefault
();
return
false
;
}
).
prependTo
(
self
.
element
.
children
()
);
if
(
self
.
options
.
fadeOutTime
>
0
)
{
setTimeout
(
function
()
{
self
.
close
(
alert
,
self
.
options
.
fadeOutTime
);
},
self
.
options
.
displayTime
);
}
}
);
},
/**
* Destructs this widget.
...
...
assets/js/jquery.ui.bootmodal.js
View file @
b7b74aa8
...
...
@@ -29,9 +29,10 @@
* Widget options.
* - backdropClose: Indicates whether clicking on the backdrop closes the modal.
* - buttons: Button configurations.
* - closeTime: The d
elay
for closing the modal.
* - closeTime: The d
uration
for closing the modal.
* - escapeClose: Indicates whether pressing escape closes the modal.
* - open: Indicates whether to open the modal on initialization.
* - openTime: The duration for opening the modal.
* - title: The modal title text.
* @type Object
*/
...
...
assets/js/jquery.ui.bootpopover.js
View file @
b7b74aa8
...
...
@@ -22,6 +22,10 @@
tooltipId
:
'popover'
,
/**
* Widget options.
* - placement: The placement of the tooltip. Valid values are: "above", "right", "below" and "left".
* - showEvent: The event for showing the tooltip.
* - hideEvent: The event for hiding the tooltip.
* - live: Indicates whether to use jQuery.live or jQuery.bind.
* @type Object
*/
options
:
{
...
...
assets/js/jquery.ui.boottwipsy.js
View file @
b7b74aa8
...
...
@@ -27,6 +27,10 @@
visible
:
false
,
/**
* Widget options.
* - placement: The placement of the tooltip. Valid values are: "above", "right", "below" and "left".
* - showEvent: The event for showing the tooltip.
* - hideEvent: The event for hiding the tooltip.
* - live: Indicates whether to use jQuery.live or jQuery.bind.
* @type Object
*/
options
:
{
...
...
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