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