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
bbb0be66
Commit
bbb0be66
authored
Mar 28, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused notifications code
parent
63f5e956
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
122 deletions
+2
-122
common.scss
h/css/common.scss
+0
-12
sidebar.scss
h/css/sidebar.scss
+0
-26
controllers.coffee
h/js/controllers.coffee
+0
-46
directives.coffee
h/js/directives.coffee
+0
-11
host.coffee
h/js/host.coffee
+0
-4
toolbar.coffee
h/js/plugin/toolbar.coffee
+2
-23
No files found.
h/css/common.scss
View file @
bbb0be66
...
...
@@ -167,18 +167,6 @@ button, input[type=submit], .btn {
}
//Notifications///////////////////////////////
.notifications
{
padding
:
1em
0em
1em
1em
;
.paper
{
border
:
1px
solid
#75b8f3
;
}
}
//CLOSER////////////////////////////////
.close
{
@extend
.x-icon
;
...
...
h/css/sidebar.scss
View file @
bbb0be66
...
...
@@ -39,32 +39,6 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
-webkit-overflow-scrolling
:
touch
;
}
.bottombar
{
position
:
fixed
;
bottom
:
0px
;
left
:
0
;
height
:
3
.7em
;
width
:
100%
;
.notif-list
{
margin-right
:
1em
;
box-shadow
:
1px
1px
9px
#b5d4ff
;
}
.top-padding
{
padding-top
:
8px
;
}
.bottom-padding
{
padding-bottom
:
8px
;
}
.notif-text
{
font-family
:
$sansFontFamily
;
position
:
relative
;
bottom
:
2px
;
}
}
//SHEET////////////////////////////////
//This comes down from under the toolbar
...
...
h/js/controllers.coffee
View file @
bbb0be66
...
...
@@ -280,7 +280,6 @@ class App
$scope
.
reloadAnnotations
=
->
return
unless
annotator
.
plugins
.
Store
$scope
.
new_updates
=
0
$scope
.
$root
.
annotations
=
[]
annotator
.
threading
.
thread
[]
annotator
.
threading
.
idTable
=
{}
...
...
@@ -336,47 +335,6 @@ class App
cleanup
(
a
for
a
in
annotations
when
a
.
thread
)
annotator
.
subscribe
'annotationsLoaded'
,
cleanup
# Notifications
$scope
.
notifications
=
[]
$scope
.
removeNotificationUpdate
=
->
index
=
-
1
for
notif
in
$scope
.
notifications
if
notif
.
type
is
'update'
index
=
$scope
.
notifications
.
indexOf
notif
break
if
index
>
-
1
then
$scope
.
notifications
.
splice
index
,
1
$scope
.
addUpdateNotification
=
->
# Do not add an update notification twice
unless
$scope
.
new_updates
>
0
if
$scope
.
new_updates
<
2
then
text
=
'change.'
else
text
=
'changes.'
notification
=
type
:
'update'
text
:
'Click to load '
+
$scope
.
new_updates
+
' '
+
text
callback
:
=>
$scope
.
reloadAnnotations
()
$scope
.
removeNotificationUpdate
()
close
:
$scope
.
removeNotificationUpdate
$scope
.
notifications
.
unshift
notification
$scope
.
$watch
'new_updates'
,
(
updates
,
oldUpdates
)
->
return
unless
updates
or
oldUpdates
for
notif
in
$scope
.
notifications
if
notif
.
type
is
'update'
if
$scope
.
new_updates
<
2
then
text
=
'change.'
else
text
=
'changes.'
notif
.
text
=
'Click to load '
+
updates
+
' '
+
text
for
p
in
annotator
.
providers
p
.
channel
.
notify
method
:
'updateNotificationCounter'
params
:
updates
$scope
.
$watch
'show_search'
,
(
value
,
old
)
->
if
value
and
not
old
$timeout
->
...
...
@@ -385,8 +343,6 @@ class App
$scope
.
initUpdater
=
->
$scope
.
new_updates
=
0
filter
=
streamfilter
.
setPastDataNone
()
...
...
@@ -423,8 +379,6 @@ class App
p
=
$scope
.
auth
.
persona
user
=
if
p
?
then
"acct:"
+
p
.
username
+
"@"
+
p
.
provider
else
''
unless
data
instanceof
Array
then
data
=
[
data
]
$scope
.
$apply
=>
#if data.length > 0 then $scope.new_updates += 1
if
$scope
.
socialView
.
name
is
'single-player'
owndata
=
data
.
filter
(
d
)
->
d
.
user
is
user
...
...
h/js/directives.coffee
View file @
bbb0be66
...
...
@@ -328,16 +328,6 @@ tags = ['$window', ($window) ->
restrict
:
'C'
]
notification
=
[
'$filter'
,
(
$filter
)
->
controller
:
'NotificationController'
require
:
'?ngModel'
restrict
:
'C'
scope
:
model
:
'=ngModel'
click
:
'&onClick'
close
:
'&onClose'
templateUrl
:
'notification.html'
]
username
=
[
'$filter'
,
'$window'
,
(
$filter
,
$window
)
->
link
:
(
scope
,
elem
,
attr
,
ctrl
)
->
...
...
@@ -450,6 +440,5 @@ angular.module('h.directives', ['ngSanitize'])
.
directive
(
'username'
,
username
)
.
directive
(
'userPicker'
,
userPicker
)
.
directive
(
'repeatAnim'
,
repeatAnim
)
.
directive
(
'notification'
,
notification
)
.
directive
(
'streamviewer'
,
streamviewer
)
.
directive
(
'whenscrolled'
,
whenscrolled
)
h/js/host.coffee
View file @
bbb0be66
...
...
@@ -98,10 +98,6 @@ class Annotator.Host extends Annotator.Guest
Math
.
max
.
apply
(
Math
,
all
)
)
.
bind
(
'updateNotificationCounter'
,
(
ctx
,
count
)
=>
this
.
publish
'updateNotificationCounter'
,
count
)
.
bind
(
'showNotification'
,
(
ctx
,
n
)
=>
@
_pendingNotice
=
@
Annotator
.
showNotification
n
.
message
,
n
.
type
)
...
...
h/js/plugin/toolbar.coffee
View file @
bbb0be66
...
...
@@ -4,13 +4,10 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
events
:
'.annotator-toolbar li:first-child mouseenter'
:
'show'
'.annotator-toolbar mouseleave'
:
'hide'
'updateNotificationCounter'
:
'onUpdateNotificationCounter'
'setTool'
:
'onSetTool'
'setVisibleHighlights'
:
'onSetVisibleHighlights'
html
:
element
:
'<div class="annotator-toolbar annotator-hide"></div>'
notification
:
'<div class="annotator-notification-counter"></div>'
html
:
'<div class="annotator-toolbar annotator-hide"></div>'
options
:
items
:
[
...
...
@@ -51,15 +48,12 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
]
pluginInit
:
->
@
annotator
.
toolbar
=
@
toolbar
=
$
(
@
html
.
element
)
@
annotator
.
toolbar
=
@
toolbar
=
$
(
@
html
)
if
@
options
.
container
?
$
(
@
options
.
container
).
append
@
toolbar
else
$
(
@
element
).
append
@
toolbar
@
notificationCounter
=
$
(
@
html
.
notification
)
@
toolbar
.
append
(
@
notificationCounter
)
@
buttons
=
@
options
.
items
.
reduce
(
buttons
,
item
)
=>
anchor
=
$
(
'<a></a>'
)
.
attr
(
'href'
,
''
)
...
...
@@ -78,21 +72,6 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
hide
:
->
this
.
toolbar
.
addClass
(
'annotator-hide'
)
onUpdateNotificationCounter
:
(
count
)
->
element
=
$
(
@
buttons
[
0
])
element
.
toggle
(
'fg_highlight'
,
{
color
:
'lightblue'
})
setTimeout
->
element
.
toggle
(
'fg_highlight'
,
{
color
:
'lightblue'
})
,
500
switch
when
count
>
9
@
notificationCounter
.
text
(
'>9'
)
when
0
<
count
<=
9
@
notificationCounter
.
text
(
"+
#{
count
}
"
)
else
@
notificationCounter
.
text
(
''
)
onSetTool
:
(
name
)
->
if
name
is
'highlight'
$
(
@
buttons
[
2
]).
addClass
(
'pushed'
)
...
...
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