Commit 0b616f93 authored by Randall Leeds's avatar Randall Leeds

Remove heatmap tab blinking and dead styles

I find the tab blinking to be too subtle to be meaningful and not
a worthy enough feature to justify more jQuery UI use or storing
an additional property on the annotation (see #1207).

If we want a feature like this we'll have to come back and revisit
it with a more critical eye.
parent 2f262490
......@@ -387,12 +387,9 @@ class App
if annotation.references?
container = annotator.threading.getContainer annotation.references[0]
if container?.message?
container.message._updatedAnnotation = true
# Temporary workarund to force publish changes
if plugins.Store?
plugins.Store._onLoadAnnotations [container.message]
else
annotation._updatedAnnotation = true
$scope.applyUpdates = (action, data) ->
return unless data?.length
......
......@@ -509,23 +509,6 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
_getCommentBucket: => @index.length - 2
blinkBuckets: =>
for tab, index in @tabs[0]
bucket = @buckets[@bucketIndices[index]]
hasUpdate = false
for annotation in bucket
if annotation._updatedAnnotation?
hasUpdate = true
delete annotation._updatedAnnotation
unless hasUpdate then continue
element = $(tab)
element.toggle('fg_highlight', {color: 'lightblue'})
setTimeout ->
element.toggle('fg_highlight', {color: 'lightblue'})
, 500
isUpper: (i) => i == 1
isLower: (i) => i == @index.length - 3
isComment: (i) => i is @_getCommentBucket()
......
......@@ -81,7 +81,7 @@ class Hypothesis extends Annotator
# between the host page and the panel widget.
whitelist = [
'diffHTML', 'inject', 'quote', 'ranges', 'target', 'id', 'references',
'uri', 'diffCaseOnly', 'document', '_updatedAnnotation'
'uri', 'diffCaseOnly', 'document',
]
this.addPlugin 'Bridge',
gateway: true
......
/*!
* jQuery UI Effects Forecolor Highlight 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/highlight-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
$.effects.effect.fg_highlight = function( o, done ) {
var elem = $( this ),
props = ["color", "opacity" ],
mode = $.effects.setMode( elem, o.mode || "show" ),
animation = {
color: elem.css("color" )
};
if (mode === "hide") {
animation.opacity = 0;
}
$.effects.save( elem, props );
elem
.show()
.css({
color: o.color || "#ffff99"
})
.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
elem.hide();
}
$.effects.restore( elem, props );
done();
}
});
};
})(jQuery);
\ No newline at end of file
......@@ -390,18 +390,6 @@ $base-font-size: 14px;
}
// Toolbar notification counter
.annotator-notification-counter {
font-family: $sans-font-family;
pointer-events: none;
position: absolute;
margin-left: 11px;
margin-top: 4px;
z-index: 2;
font-size: .86em;
}
/*
Mobile layout
240-479 px
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment