summaryrefslogtreecommitdiff
path: root/data/templates/edit-add.htm
blob: e504deb358b8e7e2bcb69212776b000e8dda10f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 <div class="well" style="text-align: center; display:none" id="add-button">
    <a class="btn" href="#">
     <i class="icon-plus"></i>
     Add file
    </a>
 </div>

 {% include 'edit-file.htm' with {'file': null, 'fileid': 'new', 'newfile': true} %}

<script type="application/javascript">
$(document).ready(function() {
    $('#add-button').show();
    $('#filegroupnew').hide();
    $('#add-button a').bind('click', function() {
        $('#add-button').before("{% filter escape('js') %}
            {% include 'edit-file.htm' with {'file': null, 'fileid': '###', 'newfile': true} %}
            {% endfilter %}"
            .replace(/###/g, $('.filegroup').length)
        );
        return false;
    });
});
</script>