Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
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
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
c5f61c21
Commit
c5f61c21
authored
Jan 13, 2014
by
Ujvari Gergely
Committed by
Randall Leeds
Mar 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jquery.ui.tooltip generates fuzzytime tooltip
parent
61c7d58f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
421 additions
and
0 deletions
+421
-0
directives.coffee
h/js/directives.coffee
+19
-0
jquery.ui.tooltip.js
h/lib/jquery.ui.tooltip.js
+402
-0
No files found.
h/js/directives.coffee
View file @
c5f61c21
...
@@ -360,6 +360,16 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
...
@@ -360,6 +360,16 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
link
:
(
scope
,
elem
,
attr
,
ctrl
)
->
link
:
(
scope
,
elem
,
attr
,
ctrl
)
->
return
unless
ctrl
?
return
unless
ctrl
?
elem
.
find
(
'a'
)
.
bind
'click'
,
(
event
)
->
event
.
stopPropagation
()
.
tooltip
tooltipClass
:
'small'
position
:
collision
:
'fit'
at
:
"left center"
ctrl
.
$render
=
->
ctrl
.
$render
=
->
scope
.
ftime
=
(
$filter
'fuzzyTime'
)
ctrl
.
$viewValue
scope
.
ftime
=
(
$filter
'fuzzyTime'
)
ctrl
.
$viewValue
...
@@ -379,6 +389,15 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
...
@@ -379,6 +389,15 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
# For invalid timezone, use the default
# For invalid timezone, use the default
scope
.
hint
=
momentDate
.
format
(
'LLLL'
)
scope
.
hint
=
momentDate
.
format
(
'LLLL'
)
toolparams
=
tooltipClass
:
'small'
position
:
collision
:
'none'
at
:
"left center"
elem
.
tooltip
(
toolparams
)
timefunct
=
->
timefunct
=
->
$window
.
setInterval
=>
$window
.
setInterval
=>
scope
.
ftime
=
(
$filter
'fuzzyTime'
)
ctrl
.
$viewValue
scope
.
ftime
=
(
$filter
'fuzzyTime'
)
ctrl
.
$viewValue
...
...
h/lib/jquery.ui.tooltip.js
0 → 100644
View file @
c5f61c21
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