student view pdf done
This commit is contained in:
parent
0f65c62316
commit
4c618df65c
@ -4,13 +4,13 @@
|
|||||||
* Simple table with sorting and filtering on AngularJS
|
* Simple table with sorting and filtering on AngularJS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", "$modal", "$log", function ($scope,$rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state, $modal,$log) {
|
||||||
/*
|
/*
|
||||||
* used to get student course details
|
* used to get student course details
|
||||||
* this method called from view ng-init directive
|
* this method called from view ng-init directive
|
||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
|
$rootScope.studentAllDetails
|
||||||
$scope.getStudentDetails = function () {
|
$scope.getStudentDetails = function () {
|
||||||
var getcourse = {
|
var getcourse = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -26,6 +26,7 @@ app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter",
|
|||||||
$http(getcourse).then(function (response) {
|
$http(getcourse).then(function (response) {
|
||||||
|
|
||||||
if (response.data.status == 200 && response.data.studentStatus== true) {
|
if (response.data.status == 200 && response.data.studentStatus== true) {
|
||||||
|
$rootScope.studentAllDetails = response.data;
|
||||||
$scope.studentDetails = response.data.studentDetails;
|
$scope.studentDetails = response.data.studentDetails;
|
||||||
$scope.courseDetails = response.data.courseDetails;
|
$scope.courseDetails = response.data.courseDetails;
|
||||||
|
|
||||||
@ -33,11 +34,40 @@ app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter",
|
|||||||
} else {
|
} else {
|
||||||
$scope.studentDetails = "";
|
$scope.studentDetails = "";
|
||||||
$scope.courseDetails = "";
|
$scope.courseDetails = "";
|
||||||
|
$rootScope.studentAllDetails="";
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
$scope.printStudentDetails = function (details) {
|
||||||
|
$rootScope.pdfItems = details;
|
||||||
|
|
||||||
|
var modalInstancePrint = $modal.open({
|
||||||
|
templateUrl: 'assets/views/student/studentViewPdf.html',
|
||||||
|
controller: 'studentViewCtrl',
|
||||||
|
// size: size,
|
||||||
|
resolve: {
|
||||||
|
list: function () {
|
||||||
|
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
modalInstancePrint.result.then(function (selectedItem) {
|
||||||
|
$scope.selected2 = selectedItem;
|
||||||
|
}, function () {
|
||||||
|
$log.info('Modal dismissed at: ' + new Date());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// generate pdf for student view
|
||||||
|
$scope.export = function(getName) {
|
||||||
|
kendo.drawing.drawDOM($("#exportthis")).then(function(group) {
|
||||||
|
kendo.drawing.pdf.saveAs(group, getName+".pdf");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user