Rev 1902 | 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> |
1902 | grupo1 | 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 | |
1902 | grupo1 | 30 | <!--Require templateObj--> |
31 | <script type="text/ng-template" id="callDocumentTemplate"> |
||
1848 | jmachado | 32 | |
1902 | grupo1 | 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> |
1902 | grupo1 | 58 | </div></div> |
1916 | grupo1 | 59 | </div> |
60 | </div> |
||
1848 | jmachado | 61 | </script> |
1902 | grupo1 | 62 | |
1848 | jmachado | 63 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_ImageComponent"> |
64 | <div class="imageComponent component"> |
||
65 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix"> |
||
1902 | grupo1 | 66 | <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)"> |
67 | <span class="glyphicon glyphicon-remove"></span> |
||
68 | </button> |
||
69 | <label>Componente de Imagem (Use esta funcinalidade para adicionar gráficos ou tabelas que ache necessárias)</label> |
||
1848 | jmachado | 70 | </div> |
1830 | jmachado | 71 | |
1902 | grupo1 | 72 | <div class="componentBody"> |
73 | <div class="form-group clearfix" ng-if="comp.image.identifier"> |
||
74 | <label class="col-md-2 control-label">Legenda</label> |
||
75 | <div class="col-md-10"> |
||
76 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
1830 | jmachado | 77 | </div> |
1902 | grupo1 | 78 | </div> |
79 | <div class="form-group clearfix"> |
||
80 | <div class="col-md-2 control-label"> |
||
81 | <a class="btn btn-default" href="#" ng-model="comp" |
||
82 | data-title="Escolha Imagem" |
||
83 | data-showmetafields="false" |
||
84 | data-confirmonupload="true" |
||
85 | data-toggle="modal" |
||
86 | data-target="#filesUploadModal" |
||
87 | data-multiple="false" |
||
88 | data-allowed-extensions="jpg,png,gif" |
||
89 | data-callback-target-function="angular.element($('{{docAppSelector}}')).scope().callbackUploadedFiles"> |
||
1830 | jmachado | 90 | <span ng-if="comp.image.identifier"> |
1848 | jmachado | 91 | Substituir Imagem |
1830 | jmachado | 92 | </span> |
1902 | grupo1 | 93 | <span ng-if="!(comp.image.identifier)"> |
1848 | jmachado | 94 | Carregar Imagem |
1830 | jmachado | 95 | </span> |
96 | |||
1902 | grupo1 | 97 | <span class="glyphicon glyphicon-upload"/> |
1830 | jmachado | 98 | |
1902 | grupo1 | 99 | </a> |
100 | </div> |
||
101 | |||
102 | <div class="col-md-10"> |
||
103 | <div ng-if="!(comp.image.identifier)"> |
||
104 | Clique em carregar imagens e escolha uma imagem para adicionar nesta secção. |
||
1830 | jmachado | 105 | </div> |
106 | |||
1902 | grupo1 | 107 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
108 | <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
||
109 | <center> |
||
110 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)"> |
||
111 | <img style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
||
112 | </div> |
||
113 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
||
114 | </center> |
||
1830 | jmachado | 115 | </div> |
1902 | grupo1 | 116 | </div> |
1830 | jmachado | 117 | </div> |
1848 | jmachado | 118 | </div> |
119 | </div> |
||
120 | </script> |
||
1830 | jmachado | 121 | |
1848 | jmachado | 122 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_TextComponent"> |
123 | <div class="textComponent component"> |
||
1830 | jmachado | 124 | |
1848 | jmachado | 125 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix"> |
126 | <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)"> |
||
127 | <span class="glyphicon glyphicon-remove"></span> |
||
128 | </button> |
||
129 | <label>Componente de Texto</label> |
||
130 | </div> |
||
131 | <div class="componentBody"> |
||
132 | <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="form-group clearfix"> |
||
133 | <label class="col-md-2 control-label">Titulo de Parágrafo</label> |
||
134 | <div class="col-md-10"> |
||
135 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
||
1830 | jmachado | 136 | </div> |
1848 | jmachado | 137 | </div> |
138 | <div class="form-group clearfix"> |
||
139 | <label class="col-md-2 control-label">Texto</label> |
||
140 | <div class="col-md-10"> |
||
141 | <textarea class="form-control" rows="10" ng-model="comp.text"> |
||
1830 | jmachado | 142 | |
1848 | jmachado | 143 | </textarea> |
1830 | jmachado | 144 | </div> |
145 | </div> |
||
146 | </div> |
||
1848 | jmachado | 147 | </div> |
1902 | grupo1 | 148 | </script> |
149 | |||
150 | <!-- |
||
151 | @section objeto com seccoes e componentes |
||
152 | @optional @chapter capitulo do documento para esta seccao para contcatenar às subsections |
||
153 | --> |
||
154 | <script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_DocumentSection"> |
||
155 | <div class="sections"> |
||
156 | <ul class="nav nav-tabs"> |
||
157 | <li ng-model="section" class="separatorSectionNav" |
||
158 | ng-class="{ active : subSection.active}" |
||
159 | ng-repeat="subSection in section.sections"> |
||
160 | <a ng-click="showSep(section,subSection)"> {{$chapter}}{{$index+1}} - {{subSection.title}}</a> |
||
161 | </li> |
||
162 | </ul> |
||
163 | <div ng-model="subSection" |
||
164 | ng-class="{ hidden: !subSection.active }" |
||
165 | ng-repeat="subSection in section.sections" |
||
166 | class="separatorSection clearfix"> |
||
167 | <div ng-repeat="comp in subSection.components" |
||
168 | ng-include="class2id(comp)"> |
||
169 | |||
170 | </div> |
||
171 | <div ng-if="subSection.sections" |
||
172 | ng-init="section=subSection;$chapter=$chapter+($index+1)+'.'" |
||
173 | ng-include="class2id(subSection)"> |
||
174 | </div> |
||
175 | </div> |
||
176 | </div> |
||
1830 | jmachado | 177 | </script> |