[annotator-dev] colored notes

Albert Juhé albertjuhe at gmail.com
Thu Dec 5 09:51:18 UTC 2013


Yes, no problem, in UOC all is opensource, the annotations on the right is
a plugin too.
I can send you the code, as I say previously I had to modify the annotator
1.2.9, I don't work with cofeescript because desn't work in my windows pc.

One of the diference is that each annotation need and unique id.

This is the javascript that I use for include annotations:

 jQuery(function($) {
                    // Customise the default plugin options with the third
argument.
                    var annotator =
$('body').annotator().annotator().data('annotator');
                    annotator.addPlugin('Permissions', {
                        user: propietary,
                        permissions: {
                            'read': [propietary],
                            'update': [propietary],
                            'delete': [propietary],
                            'admin': [propietary]
                        },
                        showViewPermissionsCheckbox: true,
                        showEditPermissionsCheckbox: false
                    });
                       $('body').annotator().annotator('addPlugin',
'Categories',{
                           errata:'annotator-hl-errata',
                           destacat:'annotator-hl-destacat',
                           subratllat:'annotator-hl-subratllat' }
                     );
                   $('body').annotator().annotator('addPlugin', 'Markdown');
                    $('body').annotator('addPlugin', 'Store', {
                        prefix: 'http://localhost:3000/annotation',
                        urls: {
                            // These are the default URLs.
                            create: '/new/'+pid+'/'+modul+'/'+code,
                            read: '/get/'+pid+'/'+modul+'/'+code,
                            update: '/update/'+code+'/:id',
                            destroy: '/destroy/'+code+'/:id'
                        }
                    });
                   $('body').annotator().annotator('addPlugin',
'visorAnotacions');
                   $('#anotacions-uoc-panel').slimscroll({height: '100%'});
                });



2013/12/5 Riccardo Tasso <riccardo.tasso at gmail.com>

> That's wonderful!
>
> I also like the list of annotations on the right. Is it a plugin too?
>
> Can I ask you to share the code?
>
> Cheers,
>    Riccardo
>
>
> 2013/12/5 Albert Juhé <albertjuhe at gmail.com>
>
>> Hi,
>>
>> I am Albert from the UOC (Open University of Catalonia), in 2014 we
>> include the annotador lib in the HTML5 subjects for the students, to allow
>> them annotate it.
>> For the annotations I ve used the annotator with some modifications
>> because I have to include categories and anotations order.
>>
>> Categories:
>> - Errata (the subject contains an erroneus content)  RED
>> - Destacat (highlight) GREEN
>> - Subratllat (underscore) YELLOW..
>>
>> The order in the annotations is important for the students. The students
>> wants to view the annotations in the same order that in the document.
>>
>> For the categories I've used the
>> https://github.com/ezietsman/annotator/blob/master/src/plugin/categories.coffeewith some modifications to adapt it to the new annotator 1.2.9, creating a
>> new plugin, now works perfect.
>>
>> Another think that I ve developed is an annoator viewer, another plugin,
>> I ve added an image where you can see a sample, the document  is in Catalan.
>>
>> I you want I can send the development.
>>
>> Albert
>>
>>
>> 2013/12/5 Ewald Zietsman <ewald at siyavula.com>
>>
>>>  I left that up to the css engine, the colours did sum in a way, I
>>> didn't do anything in that regard.
>>>
>>>
>>> On Thu, Dec 5, 2013 at 10:43 AM, Riccardo Tasso <
>>> riccardo.tasso at gmail.com> wrote:
>>>
>>>> What is the behaviour when, for example, a blue annotation is overlayed
>>>> on a yellow one? Is it possibile to sum their colors?
>>>>
>>>> Thanks,
>>>>    Riccardo
>>>>
>>>>
>>>> 2013/12/5 Ewald Zietsman <ewald at siyavula.com>
>>>>
>>>>> That plugin is one I wrote, but I changed the annotator core code to
>>>>> make it work (I didn't know any coffee/javascript then), so it is woefully
>>>>> outdated. It basically adds an extra input field on the annotator widget
>>>>> that lets you select a 'type' and depending on the type it saves a 'type'
>>>>> field into the annotation object that goes to the database. Other than that
>>>>> you need a line or two of css (and add a class to the annotation spans) to
>>>>> make the colours work.
>>>>>
>>>>>
>>>>> On Thu, Dec 5, 2013 at 12:43 AM, Riccardo Tasso <
>>>>> riccardo.tasso at gmail.com> wrote:
>>>>>
>>>>>> I've found this plugin:
>>>>>> https://github.com/ezietsman/annotator/blob/master/src/plugin/categories.coffee
>>>>>> Do you think it can still be used, or maybe is it outdated?
>>>>>>
>>>>>> Cheers,
>>>>>>    Riccardo
>>>>>>
>>>>>>
>>>>>> 2013/11/29 Riccardo Tasso <riccardo.tasso at gmail.com>
>>>>>>
>>>>>>> Hi, I'd like to know if it's possibile, or maybe already exists, a
>>>>>>> plugin to make the user choose a color during the insertion of a note, such
>>>>>>> that also the highlighted text respects this choice.
>>>>>>>
>>>>>>> Cheers,
>>>>>>>    Riccardo
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> annotator-dev mailing list
>>>>>> annotator-dev at lists.okfn.org
>>>>>> http://lists.okfn.org/mailman/listinfo/annotator-dev
>>>>>> Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> *Ewald Zietsman Technical Coor**dinator*
>>>>>
>>>>> Website: www.siyavula.com
>>>>> The Open Innovation Studio, 27 Buitenkant Street, Cape Town, 8001
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Ewald ZietsmanTechnical Coor**dinator*
>>>
>>> Website: www.siyavula.com
>>> The Open Innovation Studio, 27 Buitenkant Street, Cape Town, 8001
>>>
>>> _______________________________________________
>>> annotator-dev mailing list
>>> annotator-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/annotator-dev
>>> Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131205/b74b6e0f/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visor-anotacions.js
Type: application/x-javascript
Size: 4843 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131205/b74b6e0f/attachment-0012.js>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: categories.js
Type: application/x-javascript
Size: 4770 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131205/b74b6e0f/attachment-0013.js>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotator-full-1_9.js
Type: application/x-javascript
Size: 105379 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131205/b74b6e0f/attachment-0014.js>


More information about the annotator-dev mailing list