Subversion Repositories bacoAlunos

Rev

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

Rev 1967 Rev 1989
Line 689... Line 689...
689
                    </div>
689
                    </div>
690
                </div>
690
                </div>
691
            </div>
691
            </div>
692
        </div>
692
        </div>
693
    </div>
693
    </div>
-
 
694
</script>
-
 
695
 
-
 
696
 
-
 
697
<!-- Johny -->
-
 
698
<script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_GlobalLearningResultsChartYearImg">
-
 
699
    <globallearningresultschartyearimg>
-
 
700
    </globallearningresultschartyearimg>
-
 
701
</script>
-
 
702
<script>
-
 
703
    angular.module("courseReportApp").directive('globallearningresultschartyearimg', function() {
-
 
704
 
-
 
705
        return {
-
 
706
            restrict: 'E',
-
 
707
            link: function($scope, element, attrs)
-
 
708
            {
-
 
709
                $scope.generateChart = function(comp)
-
 
710
                {
-
 
711
 
-
 
712
                    widgetCallWithActionParameters(
-
 
713
                        "<%=request.getContextPath()%>/user/courseReport.do",
-
 
714
                        "generateGlobalLearningResultsChartYearImg",
-
 
715
                        {
-
 
716
                            "courseReportDocument" : BacoJS.stringifyOrdered(angular.element($("#courseReportApp")).scope().report)
-
 
717
                        },
-
 
718
                        "#courseReportApp",
-
 
719
                        function(repositoryFile4JsonView)
-
 
720
                        {
-
 
721
                            comp.image = repositoryFile4JsonView;
-
 
722
                            comp.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + comp.image.identifier + "?" + new Date().getTime();
-
 
723
                            angular.element($("#courseReportApp")).scope().$apply();
-
 
724
                        },
-
 
725
                        function(){}
-
 
726
                    );
-
 
727
                }
-
 
728
 
-
 
729
 
-
 
730
            },
-
 
731
            templateUrl: function(elem,attrs) {
-
 
732
                return "globallearningresultschartyearimg";
-
 
733
            }
-
 
734
        }
-
 
735
    });
-
 
736
</script>
-
 
737
<script type="text/ng-template" id="globallearningresultschartyearimg">
-
 
738
    <div class="imageComponent component">
-
 
739
 
-
 
740
        <div class="componentBody">
-
 
741
            <div class="form-group clearfix">
-
 
742
                <label class="col-md-2 control-label">Legenda</label>
-
 
743
                <div class="col-md-10">
-
 
744
                    <input type="text" class="form-control" rows="10" ng-model="comp.title">
-
 
745
                </div>
-
 
746
            </div>
-
 
747
            <div class="form-group clearfix">
-
 
748
                <div class="col-md-2 control-label">
-
 
749
                    <button class="btn btn-default" ng-click="generateChart(comp)">Refrescar/Gerar Gráfico</button>
-
 
750
                </div>
-
 
751
                <div class="col-md-10">
-
 
752
                    <label ng-if="comp.image.identifier"> Limites do PDF </label>
-
 
753
                    <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px">
-
 
754
                        <center>
-
 
755
                            <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)">
-
 
756
                                <img ng-if="comp.imageUrl" style="width: 100%;height: 100%"  ng-src="{{comp.imageUrl}}">
-
 
757
                                <img ng-if="!comp.imageUrl" style="width: 100%;height: 100%"  ng-src="{{'<%=request.getContextPath()%>/repositoryStream/' + comp.image.identifier}}">
-
 
758
                            </div>
-
 
759
                            (Se desejar altere o tamanho da imagem arrastando no canto inferior direito)
-
 
760
                        </center>
-
 
761
                    </div>
-
 
762
                </div>
-
 
763
            </div>
-
 
764
        </div>
-
 
765
    </div>
694
</script>
766
</script>
695
 
767