summaryrefslogtreecommitdiff
path: root/plugins/kolab_notes/skins/larry/templates/dialogview.html
blob: bc1f7f95acfc6bd5b50732960b51616b82f98951 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<roundcube:object name="doctype" value="html5" />
<html>
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
<body class="iframe notesview notesdialog noscroll">

<div id="notedetailsbox">
    <div id="notesdialogheader" class="boxtitle">
        <roundcube:object name="plugin.notetitle" id="notedetailstitle" />
        <div class="notebookselect" style="display:none">
            <label for="notebook"><roundcube:label name="kolab_notes.savein" /></label>
            <roundcube:object name="plugin.notebooks" id="kolab-notebook" type="select" />
        </div>
    </div>
    <roundcube:object name="plugin.editform" id="noteform" />
    <roundcube:object name="plugin.detailview" id="notedetails" class="scroller" />
    <div id="notereferences">
        <roundcube:object name="plugin.attachments_list" id="attachment-list" class="attachmentslist" />
    </div>
</div>

<script type="text/javascript">

// UI startup
var UI = new rcube_mail_ui();

$(document).ready(function(e){
    UI.init();

    function layout_view()
    {
        var form = $('#noteform, #notedetails'),
            content = $('#notecontent'),
            header = $('#notesdialogheader'),
            w, h;

        form.css('top', header.outerHeight()+'px');

        w = form.outerWidth();
        h = form.outerHeight();
        content.width(w).height(h);

        $('#noteform > div.mce-tinymce').width(w);

        h = h - 4 - $('div.mce-toolbar').height();

        $('#notecontent_ifr').width(w).height(h);

        // fixes issue when toolbar is not ready yet and content
        // area height is set to 0, wait and try again later...
        if (h < 0)
            setTimeout(function() { layout_view(); }, 1000);
    }

    $(window).resize(function(e){
        layout_view();
    });

    rcmail.addEventListener('kolab_notes_render', function(p){
        $('#notesdialogheader .notebookselect')[p.readonly ? 'hide' : 'show']();
    });
});

</script>

</body>
</html>