3 angular.module("nero.app")
4 .controller("ViewerController", ViewerController);
6 ViewerController.$inject = ["$uibModalInstance", "$timeout", "parameters"];
9 Angular viewer controller
12 - attachment : Attachment file to display (Object)
13 - idProperties : Object containing ids info depending on portlet (used for conversion progress bar)
15 function ViewerController($uibModalInstance, $timeout, parameters) {
18 vm.attachment = parameters.attachment;
19 vm.title = vm.attachment.fileName;
20 vm.idProperties = parameters.idProperties;
21 vm.closeModal = closeModal;
24 Set viewer window resizable and draggable
26 $timeout(function () {
27 var modalWindow = $(".modal-viewer .modal-content");
28 modalWindow.resizable({
29 alsoResize: ".modal-viewer .nero-modal-body",
30 minHeight: modalWindow[0].offsetHeight,
31 minWidth: modalWindow[0].offsetWidth
34 $(".modal-viewer").draggable();
39 On close button click dismiss the window
41 function closeModal() {
42 $uibModalInstance.dismiss("cancel");