Subversion Repositories SmartDukaan

Rev

Rev 35603 | Rev 35626 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35603 Rev 35606
Line 1... Line 1...
1
<script>
1
<script>
2
    $('#myModal').on('hidden.bs.modal', function (e) {
2
    $(document).ready(function () {
3
        $(".activity-container .modal-body").empty();
-
 
4
    });
-
 
5
 
-
 
6
    // Cleanup for theModal (edit/assign ticket modal)
3
        // Cleanup for myModal (activity/message modal)
7
    $('#theModal').on('hidden.bs.modal', function (e) {
4
        $('#myModal').on('hidden.bs.modal', function (e) {
8
        $("#theModal .modal-content").empty();
5
            $(".activity-container .modal-body").empty();
9
        $('body').removeClass('modal-open');
-
 
10
        $('.modal-backdrop').remove();
-
 
11
    });
6
        });
12
 
7
 
13
    // Ensure backdrop is removed on any modal close
8
        // Cleanup for theModal (edit/assign ticket modal)
14
    $(document).on('hidden.bs.modal', '.modal', function () {
9
        $('#theModal').on('hidden.bs.modal', function (e) {
15
        if ($('.modal:visible').length === 0) {
10
            $("#theModal .modal-content").empty();
16
            $('body').removeClass('modal-open');
11
            $('body').removeClass('modal-open');
17
            $('.modal-backdrop').remove();
12
            $('.modal-backdrop').remove();
18
        }
13
        });
-
 
14
 
-
 
15
        // Ensure backdrop is removed on any modal close
-
 
16
        $(document).on('hidden.bs.modal', '.modal', function () {
-
 
17
            if ($('.modal:visible').length === 0) {
-
 
18
                $('body').removeClass('modal-open');
-
 
19
                $('.modal-backdrop').remove();
-
 
20
            }
19
    });
21
        });
20
 
22
 
21
    $(function () {
-
 
22
        getPartnerAheadOptions($("#typeaheadpartnernameforassignee"), function (selectedPartner) {
23
        getPartnerAheadOptions($("#typeaheadpartnernameforassignee"), function (selectedPartner) {
23
            $("#assignee-ticket-search-by-partner-name").data('id', selectedPartner.partnerId);
24
            $("#assignee-ticket-search-by-partner-name").data('id', selectedPartner.partnerId);
24
            $("#assignee-partner-name-input").val(selectedPartner.partnerId);
25
            $("#assignee-partner-name-input").val(selectedPartner.partnerId);
25
        });
26
        });
26
    });
-
 
27
 
-
 
28
 
-
 
29
    $(document).ready(function () {
-
 
30
 
27
 
31
        $('#ticket-table thead tr').clone(true).appendTo('#ticket-table thead');
28
        $('#ticket-table thead tr').clone(true).appendTo('#ticket-table thead');
32
        $('#ticket-table thead tr:eq(1) th').each(function (i) {
29
        $('#ticket-table thead tr:eq(1) th').each(function (i) {
33
            var title = $(this).text();
30
            var title = $(this).text();
34
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');
31
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');