R
Ricardo Perdigao
Guest
Richard, This sample still have a long way to go, but see if you can get this far: You will need to locate the controller.public.js file associated with the viewer. It should be locate at: >\ >\app\src\modules\ >\ > After that you will have to Edit the controller.public.js to write the JavaScript/Angular code to do what you want ... Please look for the onShow function and make it look like this: onShow($scope) { console.log('Show'); this.scope = $scope; global.showDetails = function showDetails(e) { e.preventDefault(); alert (this.$angular_scope.vm.model.Name); // window.open(' localhost:8810/.../test.pdf' , 'PDF Window', 'toolbar=no'); }; var newCommand = {command: { text: "View Details", click: showDetails }, title: " ", width: "180px" }; this.$model.options.columns.push(newCommand); } After you've done that: - Save - See if you get the extra column with the Button Still to be done: - Build the correct path for the PDF file pointing to a pdf file on your Tomcat/WebServer - Possibly building a backend logic to place the file there when needed - Open the PDF on the new Window based on the line selected by the user.
Continue reading...
Continue reading...