Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

# Copyright 2008-2015 Luc Saffre 

# License: BSD (see file COPYING for details) 

 

""" 

Database models for `lino.modlib.davlink`. 

 

.. autosummary:: 

 

""" 

 

from __future__ import unicode_literals 

from __future__ import print_function 

 

import logging 

logger = logging.getLogger(__name__) 

 

from django.utils.translation import ugettext_lazy as _ 

 

from lino.api import dd 

 

 

class ResetDavLink(dd.Action): 

    label = _("Reset DavLink") 

    js_handler = 'Lino.davlink_reset' 

    readonly = True 

 

    def attach_to_actor(self, actor, name): 

        # logger.info("20140923 %r %r", actor, name) 

        return super(ResetDavLink, self).attach_to_actor(actor, name) 

 

 

class Toolbar(dd.Actor): 

    reset_davlink = ResetDavLink() 

 

 

def setup_quicklinks(self, ar, tb): 

    tb.add_action('davlink.Toolbar', 'reset_davlink')  # , align="right")