Rev 1860 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1830 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
1848 | jmachado | 2 | <style> |
1918 | grupo4 | 3 | .sections |
4 | { |
||
5 | padding-left: 20px; |
||
6 | } |
||
1848 | jmachado | 7 | .buttonTools |
8 | { |
||
9 | border: 1px solid gray; |
||
10 | background-color: lightgray; |
||
11 | padding: 5px; |
||
12 | } |
||
13 | .customComponent |
||
14 | { |
||
15 | padding: 0; |
||
16 | } |
||
17 | .documentSimpleComponent |
||
18 | { |
||
19 | border: 1px solid gray; |
||
20 | padding: 5px; |
||
21 | margin-bottom: 5px; |
||
22 | } |
||
23 | .componentBody |
||
24 | { |
||
25 | border: 1px solid gray; |
||
26 | padding: 5px; |
||
27 | } |
||
28 | </style> |
||
1830 | jmachado | 29 | |
1918 | grupo4 | 30 | <!--Require templateObj--> |
31 | <script type="text/ng-template" id="callDocumentTemplate"> |
||
1848 | jmachado | 32 | |
1918 | grupo4 | 33 | <div ng-include="class2id(templateObj)"></div> |
34 | </script> |
||
35 | |||
1830 | jmachado | 36 | <%-- |
37 | customPane Need component customPane in variable customPane |
||
38 | docAppSelector selector usualy an html ID for ng-app example #docReport |
||
39 | --%> |
||
1848 | jmachado | 40 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_CustomPane"> |
41 | <div class="customComponent clearfix component"> |
||
1830 | jmachado | 42 | <div class="buttonTools clearfix"> |
1848 | jmachado | 43 | <button class="btn btn-default pullleft" type="button" ng-click="addText(comp)"> |
1830 | jmachado | 44 | <span class="glyphicon glyphicon-plus"></span> |
45 | <span class="glyphicon glyphicon-font"></span> |
||
46 | </button> |
||
47 | |||
1848 | jmachado | 48 | <button class="btn btn-default pullleft" type="button" ng-click="addImage(comp)"> |
1830 | jmachado | 49 | <span class="glyphicon glyphicon-plus"></span> |
50 | <span class="glyphicon glyphicon-picture"></span> |
||
51 | </button> |
||
52 | Secção personalizada |
||
53 | </div> |
||
1848 | jmachado | 54 | <div class="componentBody"> |
55 | <div class="clearfix" ng-repeat="subComp in comp.components" ng-init="parent=comp;comp=subComp" ng-include="class2id(subComp)"> |
||
1830 | jmachado | 56 | |
1848 | jmachado | 57 | </div> |
1918 | grupo4 | 58 | <div> |
59 | </div> |
||
1848 | jmachado | 60 | </script> |
1830 | jmachado | 61 | |
1848 | jmachado | 62 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_ImageComponent"> |
63 | <div class="imageComponent component"> |
||
64 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix"> |
||
1918 | grupo4 | 65 | <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)"> |
66 | <span class="glyphicon glyphicon-remove"></span> |
||
67 | </button> |
||
68 | <label>Componente de Imagem (Use esta funcinalidade para adicionar gráficos ou tabelas que ache necessárias)</label> |
||
1848 | jmachado | 69 | </div> |
1830 | jmachado | 70 | |
1918 | grupo4 | 71 | <div class="componentBody"> |
72 | <div class="form-group clearfix" ng-if="comp.image.identifier"> |
||
73 | <label class="col-md-2 control-label">Legenda</label> |
||
74 | <div class="col-md-10"> |
||
75 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
1830 | jmachado | 76 | </div> |
1918 | grupo4 | 77 | </div> |
78 | <div class="form-group clearfix"> |
||
79 | <div class="col-md-2 control-label"> |
||
80 | <a class="btn btn-default" href="#" ng-model="comp" |
||
81 | data-title="Escolha Imagem" |
||
82 | data-showmetafields="false" |
||
83 | data-confirmonupload="true" |
||
84 | data-toggle="modal" |
||
85 | data-target="#filesUploadModal" |
||
86 | data-multiple="false" |
||
87 | data-allowed-extensions="jpg,png,gif" |
||
88 | data-callback-target-function="angular.element($('{{docAppSelector}}')).scope().callbackUploadedFiles"> |
||
1830 | jmachado | 89 | <span ng-if="comp.image.identifier"> |
1848 | jmachado | 90 | Substituir Imagem |
1830 | jmachado | 91 | </span> |
92 | <span ng-if="!(comp.image.identifier)"> |
||
1848 | jmachado | 93 | Carregar Imagem |
1830 | jmachado | 94 | </span> |
95 | |||
1918 | grupo4 | 96 | <span class="glyphicon glyphicon-upload"/> |
1830 | jmachado | 97 | |
1918 | grupo4 | 98 | </a> |
99 | </div> |
||
100 | |||
101 | <div class="col-md-10"> |
||
102 | <div ng-if="!(comp.image.identifier)"> |
||
103 | Clique em carregar imagens e escolha uma imagem para adicionar nesta secção. |
||
1830 | jmachado | 104 | </div> |
105 | |||
1918 | grupo4 | 106 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
107 | <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
||
108 | <center> |
||
109 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)"> |
||
110 | <img style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
||
111 | </div> |
||
112 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
||
113 | </center> |
||
1830 | jmachado | 114 | </div> |
1918 | grupo4 | 115 | </div> |
1830 | jmachado | 116 | </div> |
1848 | jmachado | 117 | </div> |
118 | </div> |
||
119 | </script> |
||
1830 | jmachado | 120 | |
1848 | jmachado | 121 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_TextComponent"> |
122 | <div class="textComponent component"> |
||
1830 | jmachado | 123 | |
1848 | jmachado | 124 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix"> |
125 | <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)"> |
||
126 | <span class="glyphicon glyphicon-remove"></span> |
||
127 | </button> |
||
128 | <label>Componente de Texto</label> |
||
129 | </div> |
||
130 | <div class="componentBody"> |
||
131 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="form-group clearfix"> |
||
132 | <label class="col-md-2 control-label">Titulo de Parágrafo</label> |
||
133 | <div class="col-md-10"> |
||
134 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
1830 | jmachado | 135 | </div> |
1848 | jmachado | 136 | </div> |
137 | <div class="form-group clearfix"> |
||
138 | <label class="col-md-2 control-label">Texto</label> |
||
139 | <div class="col-md-10"> |
||
140 | <textarea class="form-control" rows="10" ng-model="comp.text"> |
||
1830 | jmachado | 141 | |
1848 | jmachado | 142 | </textarea> |
1830 | jmachado | 143 | </div> |
144 | </div> |
||
145 | </div> |
||
1848 | jmachado | 146 | </div> |
1918 | grupo4 | 147 | </script> |
148 | |||
149 | <!-- |
||
150 | @section objeto com seccoes e componentes |
||
151 | @optional @chapter capitulo do documento para esta seccao para contcatenar às subsections |
||
152 | --> |
||
153 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_DocumentSection"> |
||
154 | <div class="sections"> |
||
155 | <ul class="nav nav-tabs"> |
||
156 | <li ng-model="section" class="separatorSectionNav" |
||
157 | ng-class="{ active : subSection.active}" |
||
158 | ng-repeat="subSection in section.sections"> |
||
159 | <a ng-click="showSep(section,subSection)"> {{$chapter}}{{$index+1}} - {{subSection.title}}</a> |
||
160 | </li> |
||
161 | </ul> |
||
162 | <div ng-model="subSection" |
||
163 | ng-class="{ hidden: !subSection.active }" |
||
164 | ng-repeat="subSection in section.sections" |
||
165 | class="separatorSection clearfix"> |
||
166 | <div ng-repeat="comp in subSection.components" |
||
167 | ng-include="class2id(comp)"> |
||
168 | |||
169 | </div> |
||
170 | <div ng-if="subSection.sections" |
||
171 | ng-init="section=subSection;$chapter=$chapter+($index+1)+'.'" |
||
172 | ng-include="class2id(subSection)"> |
||
173 | </div> |
||
174 | </div> |
||
175 | </div> |
||
176 | </script> |