Rev 1848 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1830 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | |||
3 | <%-- |
||
4 | customPane Need component customPane in variable customPane |
||
5 | docAppSelector selector usualy an html ID for ng-app example #docReport |
||
6 | Attribute in request classTextComponent |
||
7 | Attribute in request classImageComponent |
||
8 | --%> |
||
9 | <script type="text/ng-template" id="customPane_renderer.html"> |
||
10 | <div class="customPane clearfix"> |
||
11 | <style> |
||
12 | .buttonTools |
||
13 | { |
||
14 | border: 1px solid gray; |
||
15 | background-color: lightgray; |
||
16 | padding: 5px; |
||
17 | } |
||
18 | .customPane |
||
19 | { |
||
20 | padding: 15px; |
||
21 | } |
||
22 | .documentSimpleComponent |
||
23 | { |
||
24 | border: 1px solid gray; |
||
25 | padding: 5px; |
||
26 | margin-bottom: 5px; |
||
27 | } |
||
28 | .componentBody |
||
29 | { |
||
30 | border: 1px solid gray; |
||
31 | padding: 5px; |
||
32 | } |
||
33 | </style> |
||
34 | |||
35 | <div class="buttonTools clearfix"> |
||
36 | <button class="btn btn-default pullleft" type="button" ng-click="addText(report.introSection.customPane)"> |
||
37 | <span class="glyphicon glyphicon-plus"></span> |
||
38 | <span class="glyphicon glyphicon-font"></span> |
||
39 | </button> |
||
40 | |||
41 | <button class="btn btn-default pullleft" type="button" ng-click="addImage(report.introSection.customPane)"> |
||
42 | <span class="glyphicon glyphicon-plus"></span> |
||
43 | <span class="glyphicon glyphicon-picture"></span> |
||
44 | </button> |
||
45 | |||
46 | Secção personalizada |
||
47 | </div> |
||
48 | <div class="customPane"> |
||
49 | |||
50 | |||
51 | <div class="clearfix documentSimpleComponent" ng-repeat="comp in customPane.components"> |
||
52 | <div class="buttonTools clearfix"> |
||
53 | <button class="btn btn-danger pullright" type="button" ng-click="removeComponent($index,customPane.components)"> |
||
54 | <span class="glyphicon glyphicon-remove"></span> |
||
55 | </button> |
||
56 | <label ng-if="comp.class=='${classTextComponent}'">Componente de Texto</label> |
||
57 | <label ng-if="comp.class=='${classImageComponent}'">Componente de Imagem (Use esta funcinalidade para adicionar gráficos ou tabelas que ache necessárias)</label> |
||
58 | |||
59 | </div> |
||
60 | |||
61 | <div class="componentBody" ng-if="comp.class=='${classImageComponent}'"> |
||
62 | <div class="form-group clearfix" ng-if="comp.image.identifier"> |
||
63 | <label class="col-md-2 control-label">Legenda</label> |
||
64 | <div class="col-md-10"> |
||
65 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
66 | </div> |
||
67 | </div> |
||
68 | <div class="form-group clearfix"> |
||
69 | <div class="col-md-2 control-label"> |
||
70 | <a class="btn btn-default" href="#" ng-model="comp" |
||
71 | data-title="Escolha Imagem" |
||
72 | data-showmetafields="false" |
||
73 | data-confirmonupload="true" |
||
74 | data-toggle="modal" |
||
75 | data-target="#filesUploadModal" |
||
76 | data-multiple="false" |
||
77 | data-allowed-extensions="jpg,png,gif" |
||
78 | data-callback-target-function="angular.element($('{{docAppSelector}}')).scope().callbackUploadedFiles"> |
||
79 | <span ng-if="comp.image.identifier"> |
||
80 | Substituir Imagem |
||
81 | </span> |
||
82 | <span ng-if="!(comp.image.identifier)"> |
||
83 | Carregar Imagem |
||
84 | </span> |
||
85 | |||
86 | <span class="glyphicon glyphicon-upload"/> |
||
87 | |||
88 | </a> |
||
89 | </div> |
||
90 | |||
91 | <div class="col-md-10"> |
||
92 | <div ng-if="!(comp.image.identifier)"> |
||
93 | Clique em carregar imagens e escolha uma imagem para adicionar nesta secção. |
||
94 | </div> |
||
95 | |||
96 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
||
97 | <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
||
98 | <center> |
||
99 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)"> |
||
100 | <img style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
||
101 | </div> |
||
102 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
||
103 | </center> |
||
104 | </div> |
||
105 | </div> |
||
106 | </div> |
||
107 | </div> |
||
108 | |||
109 | |||
110 | <div class="componentBody" ng-if="comp.class=='${classTextComponent}'"> |
||
111 | <div class="form-group clearfix"> |
||
112 | <label class="col-md-2 control-label">Titulo</label> |
||
113 | <div class="col-md-10"> |
||
114 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
115 | </div> |
||
116 | </div> |
||
117 | <div class="form-group clearfix"> |
||
118 | <label class="col-md-2 control-label">Texto</label> |
||
119 | <div class="col-md-10"> |
||
120 | <textarea class="form-control" rows="10" ng-model="comp.text"> |
||
121 | |||
122 | </textarea> |
||
123 | </div> |
||
124 | </div> |
||
125 | </div> |
||
126 | </div> |
||
127 | <div> |
||
128 | </script> |