Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template unilabeltype_grid/dialog
19
    Template to show a bootstrap modal dialog.
20
 
21
    Example context (json):
22
    {
23
        "title": "Title",
24
        "name": "Topic 1",
25
        "section": "1",
26
        "summary": "",
27
        "cmlist": "<ul class=\"section img-text\"><\/ul>",
28
        "nr": 0,
29
        "first": true
30
    }
31
}}
32
 
33
<!-- The Modal -->
34
<div class="modal fade" tabindex="-1" id="grid-modal-{{cmid}}-{{nr}}">
35
    <div class="modal-dialog modal-lg">
36
        <div class="modal-content">
37
 
38
            <!-- Modal Header -->
39
            <div class="modal-header">
40
                <h4 class="modal-title">{{title}}</h4>
41
                <button type="button" class="close" data-dismiss="modal">&times;</button>
42
            </div>
43
 
44
            <!-- Modal body -->
45
            <div class="modal-body">
46
                {{{content}}}
47
            </div>
48
            <!-- Modal footer -->
49
            <div class="modal-footer">
50
                <button type="button" class="btn btn-primary" data-dismiss="modal">{{#str}} closebuttontitle {{/str}}</button>
51
            </div>
52
        </div>
53
    </div>
54
</div>
55
 
56
{{#js}}
57
    require(['jquery'], function($) {
58
        $('#grid-modal-{{cmid}}-{{nr}}').on('show.bs.modal', function() {
59
            $('#grid-modal-{{cmid}}-{{nr}}').appendTo('body');
60
        });
61
    });
62
{{/js}}