Subversion Repositories SmartDukaan

Rev

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

Rev 18308 Rev 18345
Line 181... Line 181...
181
                $('#activity-row-' + activityId).addClass('selected');
181
                $('#activity-row-' + activityId).addClass('selected');
182
            }
182
            }
183
            
183
            
184
            $('#order-table').dataTable({
184
            $('#order-table').dataTable({
185
                "aaSorting" : [ [ 2, 'desc' ] ],
185
                "aaSorting" : [ [ 2, 'desc' ] ],
186
//            "bAutoWidth": false,
186
	            "bAutoWidth": false,
187
//            "aoColumns" : [{ "sWidth": "5%" },
187
	            "aoColumns" : [{ "sWidth": "8%" },
188
//                           { "sWidth": "20%" },
188
	                           { "sWidth": "37%" },
189
//                           { "sWidth": "20%" },
189
	                           { "sWidth": "15%" },
190
//                           { "sWidth": "12.5%" },
190
	                           { "sWidth": "8%" },
191
//                           { "sWidth": "12.5%" },
191
	                           { "sWidth": "12%" },
192
//                           { "sWidth": "10%" },
192
	                           { "sWidth": "10%" },
-
 
193
	                 		   { "sWidth": "10%" }],
-
 
194
                //"iDisplayLength" : 10,
-
 
195
                //"fnDrawCallback": function() {truncateText(100);},
-
 
196
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 10, 20, "All" ] ]
-
 
197
            });
-
 
198
            $('#tr-table').dataTable({
-
 
199
                "aaSorting" : [ [ 2, 'desc' ] ],
-
 
200
            "bAutoWidth": false,
-
 
201
            "aoColumns" : [{ "sWidth": "8%" },
-
 
202
                           { "sWidth": "8%" },
-
 
203
                           { "sWidth": "8%" },
193
//                           { "sWidth": "10%" },
204
                           { "sWidth": "50%" },
194
//                           { "sWidth": "10%" }],
205
                           { "sWidth": "20%" }],
-
 
206
 
195
                "iDisplayLength" : 10,
207
                "iDisplayLength" : 10,
196
                "fnDrawCallback": function() {truncateText(100);},
208
                //"fnDrawCallback": function() {truncateText(100);},
197
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
209
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 10, 20, "All" ] ]
198
            });
210
            });
199
        }
211
        }
200
    });
212
    });
201
}
213
}
202
 
214
 
Line 560... Line 572...
560
            var activityTable = createActivityDataTable('activity');
572
            var activityTable = createActivityDataTable('activity');
561
        }
573
        }
562
    });
574
    });
563
}
575
}
564
 
576
 
565
function truncateText(widthSize) {
577
function truncateText(widthSize, jqueryContainer) {
-
 
578
	if(typeof jqueryContainer!="undefined"){
-
 
579
	    jqueryContainer.find(".truncated-text").each(function() {
-
 
580
	    	$(this).truncate({
-
 
581
	            width : $(this).attr('truncatedTextWidth'),
-
 
582
	            addtitle : true
-
 
583
	        });
-
 
584
		})
-
 
585
	}else {
566
    $(".truncated-text").each(function() {
586
	    $(".truncated-text").each(function() {
567
    	$(this).truncate({
587
	    	$(this).truncate({
568
            width : $(this).attr('truncatedTextWidth'),
588
	            width : $(this).attr('truncatedTextWidth'),
569
            addtitle : true
589
	            addtitle : true
570
        });
590
	        });
571
	})
591
		})
-
 
592
	}
572
}
593
}
573
 
594
 
574
function markAsRead(activityId) {
595
function markAsRead(activityId) {
575
    $.ajax({
596
    $.ajax({
576
        type : "POST",
597
        type : "POST",
Line 1088... Line 1109...
1088
                     { "sWidth": "16%" },//created
1109
                     { "sWidth": "16%" },//created
1089
                     { "sWidth": "7%" },//amount
1110
                     { "sWidth": "7%" },//amount
1090
                     { "sWidth": "15%" },//status
1111
                     { "sWidth": "15%" },//status
1091
                     { "sWidth": "10%" },//mobile no.
1112
                     { "sWidth": "10%" },//mobile no.
1092
                     { "sWidth": "20%" }],//email
1113
                     { "sWidth": "20%" }],//email
1093
        "fnDrawCallback": function() { truncateText(125); },
1114
        "fnDrawCallback": function() { truncateText(125, $(this)); },
1094
        "iDisplayLength" : 10,
1115
        "iDisplayLength" : 10,
1095
        "sDom" : 'T<"clear">lfrtip',
1116
        "sDom" : 'T<"clear">lfrtip',
1096
        "oTableTools" : {
1117
        "oTableTools" : {
1097
            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
1118
            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
1098
        },
1119
        },