Rev 1901 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1901 | Rev 1929 | ||
---|---|---|---|
Line 751... | Line 751... | ||
751 | </div> |
751 | </div> |
752 | </div> |
752 | </div> |
753 | </div> |
753 | </div> |
754 | </div> |
754 | </div> |
755 | </div> |
755 | </div> |
- | 756 | </script> |
|
- | 757 | ||
- | 758 | ||
- | 759 | <script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_LearningResultsChartSem"> |
|
- | 760 | <learningresultschartsem> |
|
- | 761 | </learningresultschartsem> |
|
- | 762 | </script> |
|
- | 763 | ||
- | 764 | <script> |
|
- | 765 | angular.module("courseReportApp").directive('learningresultschartsem', function() { |
|
- | 766 | ||
- | 767 | return { |
|
- | 768 | restrict: 'E', |
|
- | 769 | link: function($scope, element, attrs) |
|
- | 770 | { |
|
- | 771 | $scope.generateChart = function(comp) |
|
- | 772 | { |
|
- | 773 | ||
- | 774 | widgetCallWithActionParameters( |
|
- | 775 | "<%=request.getContextPath()%>/user/courseReport.do", |
|
- | 776 | "generateGenerateGlobalLearningResultsChartSem", |
|
- | 777 | { |
|
- | 778 | "courseReportDocument" : BacoJS.stringifyOrdered(angular.element($("#courseReportApp")).scope().report), |
|
- | 779 | "semesterCode" : comp.semesterCode |
|
- | 780 | }, |
|
- | 781 | "#courseReportApp", |
|
- | 782 | function(repositoryFile4JsonView) |
|
- | 783 | { |
|
- | 784 | comp.image = repositoryFile4JsonView; |
|
- | 785 | comp.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + comp.image.identifier + "?" + new Date().getTime(); |
|
- | 786 | angular.element($("#courseReportApp")).scope().$apply(); |
|
- | 787 | }, |
|
- | 788 | function(){} |
|
- | 789 | ); |
|
- | 790 | } |
|
- | 791 | ||
- | 792 | ||
- | 793 | }, |
|
- | 794 | templateUrl: function(elem,attrs) { |
|
- | 795 | return "learningresultschartsem"; |
|
- | 796 | } |
|
- | 797 | } |
|
- | 798 | }); |
|
- | 799 | </script> |
|
- | 800 | <script type="text/ng-template" id="learningresultschartsem"> |
|
- | 801 | <div class="imageComponent component"> |
|
- | 802 | ||
- | 803 | <div class="componentBody"> |
|
- | 804 | <div class="form-group clearfix"> |
|
- | 805 | <label class="col-md-2 control-label">Legenda</label> |
|
- | 806 | <div class="col-md-10"> |
|
- | 807 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
|
- | 808 | </div> |
|
- | 809 | </div> |
|
- | 810 | <div class="form-group clearfix"> |
|
- | 811 | <div class="col-md-2 control-label"> |
|
- | 812 | <button class="btn btn-default" ng-click="generateChart(comp)">Refrescar/Gerar Gráfico</button> |
|
- | 813 | </div> |
|
- | 814 | <div class="col-md-10"> |
|
- | 815 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
|
- | 816 | <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
|
- | 817 | <center> |
|
- | 818 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)"> |
|
- | 819 | <img ng-if="comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
|
- | 820 | <img ng-if="!comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{'<%=request.getContextPath()%>/repositoryStream/' + comp.image.identifier}}"> |
|
- | 821 | </div> |
|
- | 822 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
|
- | 823 | </center> |
|
- | 824 | </div> |
|
- | 825 | </div> |
|
- | 826 | </div> |
|
- | 827 | </div> |
|
- | 828 | </div> |
|
756 | </script> |
829 | </script> |
757 | 830 |