Commit Graph
32 Commits
Author SHA1 Message Date
Philip Peitsch 6f5abf29b4 Revert incorrect annotation scroll attempt from 9034648
Implementation would scroll to *any* annotation rather than
just annotations created by the local member.
2014-08-07 20:52:08 +10:00
Philip Peitsch 9034648042 Scroll the annotation node into view after creation
Makes annotation insertion feel cleaner as the user can now see the
complete annotation on insertion.

Fixes #486
2014-08-05 21:26:28 +10:00
Friedrich W. H. Kossebau 40c43e4d97 parentElement is not defined on non-Element nodes in IE10
To have a "blanket rule", just use parentNode everywhere to prevent future problems,
as it is equivalent to parentElement for all practical usages.
2014-07-16 15:15:13 +02:00
Aditya Bhatt a1c82c5bb4 Never completely re-wrap annotation highlights, only wrap
those text nodes which should be within but are as of yet
unhighlighted.
2014-06-20 12:52:07 +02:00
Aditya Bhatt 5dca8a15fa Re-highlight annotations whenever an edit occurs.
* To make it less expensive, a method has been added
to AnnotationViewManager to refresh not all annotations
but only the highlights.

* This is used as a scheduled redraw task inside SessionView
to not make it a CPU hog.

* The destroy mechanism for SessionView has been restructured
to accomodate multiple asynchronous destructors.
2014-06-19 15:05:51 +02:00
Aditya Bhatt 033bda34a8 Hide annotation removal buttons of other authors
when the edit.annotations.onlyDeleteOwn constraint
is enabled.
2014-06-06 15:11:32 +02:00
Friedrich W. H. Kossebau 1e2a4a8323 Normalize license headers of the webodf.js source files
* remove @license tag (to prevent Closure compiler keeping the comment)
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released webodf.js
* separate license header by empty line from following content
2014-06-02 12:19:05 +02:00
Friedrich W. H. Kossebau 071dc4ae91 prefix "annotationHighlight" element classname with "webodf-" 2014-03-10 15:43:48 +01:00
Friedrich W. H. Kossebau 6151a2451b Fix incorrect (by pattern) check of compareDocumentPosition result 2014-02-06 12:44:44 +01:00
Friedrich W. H. Kossebau b9beecaf9f Create direct linking between matching annotation and annotation-end elements 2014-02-06 12:44:44 +01:00
Friedrich W. H. Kossebau b7b4185a1a Ensure that all annotations are displayed (by setting min-height to sizer element) 2013-12-12 18:15:40 +01:00
Friedrich W. H. Kossebau 3758ebf9e5 Add flag "showRemoveButton" to AnnotationViewManager, to not show the button if wanted 2013-12-12 18:07:42 +01:00
Philip Peitsch c6f27de5b7 Removed all references to node.parentElement (IE compatibility)
Internet Explorer 11 does not support this property on HTML nodes.
2013-12-12 00:59:07 +11:00
Jos van den Oever 9984265c10 Make odf.OdfCanvas 100% typed. 2013-12-02 13:01:56 +01:00
Jos van den Oever e2b51962fa Make AnnotationViewManager 100% typed. 2013-12-02 13:01:56 +01:00
Jos van den Oever 1136dac1e2 Break circular dependency between odf.OdfCanvas and gui.AnnotationViewManager.
There is new a new class AnnotatableCanvas that is used by gui.AnnotationViewManager.
2013-12-02 13:01:56 +01:00
Jos van den Oever f7b821c2fb Some type improvements on AnnotationViewManager.
Unfortunately, OdfCanvas and AnnotationViewManager have a circular dependency
and until that is resolved no type progress can be made.
2013-11-26 16:55:00 +01:00
Aditya Bhatt bcc460eb2d Changes related to MemberData w.r.t Annotations:
* Remove old artifacts from AnnotationViewManager.
 * Make OpUpdateMember updated all dc:creator elements
 that have been labelled with an editinfo:memberid attribute.
 * Add tests for member data operations in conjunction with
 annotations.
 * Add a member "Alice" by default in OperationTests.js,
 so that annotations in tests can also have an author name.
2013-11-20 18:56:47 +01:00
Aditya Bhatt cb8ff428cd Remove terrible hack for setting the dc:creator
field's text in an annotation; now that we
have first-class access to member data,
we can set this value directly within
OpAddAnnotation.
2013-11-20 18:56:47 +01:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Friedrich W. H. Kossebau 06c5307598 Unbreak build due to jslint complaining about "Insecure '.'" 2013-10-18 13:44:15 +02:00
Friedrich W. H. Kossebau 0d4437a855 Only strip first and last char from annotation creator name if indeed quotes were found 2013-10-18 12:31:01 +02:00
Aditya Bhatt 0d40dffae8 Add a method getSizer() to OdfCanvas and use it in
AnnotationViewManager.
No longer using element.firstChild and getElementById to retrieve it,
just make it a variable inside OdfCanvas
2013-08-29 16:45:35 +02:00
Aditya Bhatt 2c90904588 Hide annotations pane when no annotations are there;
even if annotations are enabled.
2013-08-29 16:25:23 +02:00
Aditya Bhatt d17e0a1c02 * Add a cicrular button to the annotation note in AnnotationViewManager
to delete the annotation
* Add click-handling for such buttons in SessionController
* Add OdfCanvas.forgetAnnotations() to untrack annotations
* Add OpRemoveAnnotation that takes a position within the
 annotation, and deletes that annotation. It also takes the
 walkable length of the annotation node for OT purposes.
 Any cursors inside are moved to the left of the annotation.
2013-08-14 13:49:33 +02:00
Aditya Bhatt ecd64cea98 Take the zoom level into account when rendering annotations 2013-08-09 14:48:23 +02:00
Friedrich W. H. Kossebau 4322b22858 Rename everything with "[Uu]ser|[Ppeople]" to "[Mm]ember"
consolidates the terms used a little
2013-08-07 18:03:19 +02:00
Aditya Bhatt df4f68ac9b Make annotation authors render properly in Firefox:
The the CSS `content: ` property for pseudo elements is
'none' for gecko unlike '' in webkit, so add an extra check for that.
2013-08-06 05:08:07 +02:00
Aditya Bhatt 825a44affc * OpAddAnnotation that lets you create annotations. This only creates an
annotation-end node if the length of the selection > 0.
* Adds a button to the editor to add an annotation at the given cursor position
or selection
* A bad hack in AnnotationViewManager: The dc:creator of
a created annotation is initially empty because the operation has no
way to access the user model even if it knows the memberid. The
SessionView has a new rule for editinfo:memberid attributes that sets
the CSS content: attribute to the user name. AnnotationViewManager,
for now, will read this CSS property and set the text of dc:creator to
that; at least till we have a better way to access the usermodel in
the future
* Rerenders annotations when an annotation is added for tracking (like upon creation)
* SessionView gets a way to concretely specify the CSS pseudo-class for a rule (:before, :after, etc)
* enableAnnotations only allows handles annotations if the allow value
changes
* Add translation strings for annotate
2013-08-05 19:16:32 +02:00
Aditya Bhatt b8b5e9a68d * Dox for modifyAnnotations
* Cache only the annotation node name instead of the node
2013-08-01 18:58:34 +02:00
Aditya Bhatt 281b9675d2 * Rename AnnotationManger to AnnotaitonViewManager,
* label constants, improve jsdoc
* Remove unused call this.forgetAnnotation
* set the annotation.end as null if no end was found
2013-08-01 17:16:30 +02:00