Subversion Repositories SmartDukaan

Rev

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

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