Subversion Repositories SmartDukaan

Rev

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

Rev 9174 Rev 11890
Line 615... Line 615...
615
            $('#' + domId).html(response);
615
            $('#' + domId).html(response);
616
        }
616
        }
617
    });
617
    });
618
}
618
}
619
 
619
 
-
 
620
function addPrivateDealUser(domId, userId) {
-
 
621
    $.ajax({
-
 
622
        type : "PUT",
-
 
623
        url : "/crm/user-info!addPrivateDealUser?userId=" + userId,
-
 
624
        success : function(response) {
-
 
625
            $('#' + domId).html(response);
-
 
626
        }
-
 
627
    });
-
 
628
}
-
 
629
 
-
 
630
function changePrivateDealUserStatus(domId, userId, state) {
-
 
631
    $.ajax({
-
 
632
        type : "PUT",
-
 
633
        url : "/crm/user-info!changeStatusOfPrivateDealUser?userId=" + userId+ "&isPrivateDealUserActive=" + state,
-
 
634
        success : function(response) {
-
 
635
            $('#' + domId).html(response);
-
 
636
        }
-
 
637
    });
-
 
638
}
-
 
639
 
-
 
640
function resetPasswordForPrivateDealUser(domId, userId) {
-
 
641
    $.ajax({
-
 
642
        type : "PUT",
-
 
643
        url : "/crm/user-info!resetPrivateDealUserPassword?userId=" + userId,
-
 
644
        success : function(response) {
-
 
645
            $('#' + domId).html(response);
-
 
646
        },
-
 
647
    	error : function() {
-
 
648
    		alert("Unable to reset password.");
-
 
649
    	}
-
 
650
    });
-
 
651
}
-
 
652
 
620
function displayCancelOrderPopUp() {
653
function displayCancelOrderPopUp() {
621
    	$.colorbox({
654
    	$.colorbox({
622
            inline : true,
655
            inline : true,
623
            width : "650px",
656
            width : "650px",
624
            height : "550px",
657
            height : "550px",
Line 1046... Line 1079...
1046
 
1079
 
1047
function loadOrdersByMobile(domId) {
1080
function loadOrdersByMobile(domId) {
1048
    orderTable = $('#orders-without-user').dataTable({
1081
    orderTable = $('#orders-without-user').dataTable({
1049
      "aaSorting" : [ [ 1, 'desc' ] ],
1082
      "aaSorting" : [ [ 1, 'desc' ] ],
1050
      "bAutoWidth": false,
1083
      "bAutoWidth": false,
1051
      "aoColumns" : [{ "sWidth": "13%" },//order id
1084
      "aoColumns" : [{ "sWidth": "5%" },//order id
1052
                     { "sWidth": "13%" },//Source
1085
                     { "sWidth": "7%" },//Source
1053
                     { "sWidth": "26%" },//item desc
1086
                     { "sWidth": "20%" },//item desc
1054
                     { "sWidth": "16%" },//created
1087
                     { "sWidth": "16%" },//created
1055
                     { "sWidth": "7%" },//amount
1088
                     { "sWidth": "7%" },//amount
1056
                     { "sWidth": "15%" },//status
1089
                     { "sWidth": "15%" },//status
1057
                     { "sWidth": "10%" }],//mobile no.
1090
                     { "sWidth": "10%" },//mobile no.
-
 
1091
                     { "sWidth": "20%" }],//email
1058
        "fnDrawCallback": function() { truncateText(125); },
1092
        "fnDrawCallback": function() { truncateText(125); },
1059
        "iDisplayLength" : 10,
1093
        "iDisplayLength" : 10,
1060
        "sDom" : 'T<"clear">lfrtip',
1094
        "sDom" : 'T<"clear">lfrtip',
1061
        "oTableTools" : {
1095
        "oTableTools" : {
1062
            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
1096
            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"