Rev 1830 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1830 | Rev 1848 | ||
---|---|---|---|
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.CourseImpl" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.CourseImpl" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
5 | <%@ page import="pt.estgp.estgweb.utils.documentBuilder.TextComponent" %> |
5 | <%@ page import="pt.estgp.estgweb.utils.documentBuilder.TextComponent" %> |
6 | <%@ page import="pt.estgp.estgweb.utils.documentBuilder.ImageComponent" %> |
6 | <%@ page import="pt.estgp.estgweb.utils.documentBuilder.ImageComponent" %> |
- | 7 | <%@ page import="pt.estgp.estgweb.services.courses.CourseReportServices" %> |
|
- | 8 | <%@ page import="pt.estgp.estgweb.services.courses.coursereport.documentmodel.CourseReportDocument" %> |
|
- | 9 | <%@ page import="org.json.JSONException" %> |
|
7 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
8 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
9 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
13 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
13 | <%@taglib prefix="t" tagdir="/WEB-INF/tags" %> |
16 | <%@taglib prefix="t" tagdir="/WEB-INF/tags" %> |
14 | 17 | ||
15 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.css"> |
18 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.css"> |
16 | <script src="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.min.js"></script> |
19 | <script src="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.min.js"></script> |
17 | <link rel="stylesheet" href="<%=request.getContextPath()%>/css/flora-commons/flora.resizable.css"> |
20 | <link rel="stylesheet" href="<%=request.getContextPath()%>/css/flora-commons/flora.resizable.css"> |
18 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script> |
21 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script> |
19 | <script> |
22 | <script> |
20 | function demoFromHTML() { |
23 | function demoFromHTML() { |
21 | var pdf = new jsPDF('p', 'pt', 'letter'); |
24 | var pdf = new jsPDF('p', 'pt', 'letter'); |
22 | // source can be HTML-formatted string, or a reference |
25 | // source can be HTML-formatted string, or a reference |
23 | // to an actual DOM element from which the text will be scraped. |
26 | // to an actual DOM element from which the text will be scraped. |
24 | source = $('#courseReportApp')[0]; |
27 | source = $('#courseReportApp')[0]; |
25 | 28 | ||
26 | // we support special element handlers. Register them with jQuery-style |
29 | // we support special element handlers. Register them with jQuery-style |
27 | // ID selector for either ID or node name. ("#iAmID", "div", "span" etc.) |
30 | // ID selector for either ID or node name. ("#iAmID", "div", "span" etc.) |
28 | // There is no support for any other type of selectors |
31 | // There is no support for any other type of selectors |
29 | // (class, of compound) at this time. |
32 | // (class, of compound) at this time. |
30 | specialElementHandlers = { |
33 | specialElementHandlers = { |
31 | // element with id of "bypass" - jQuery style selector |
34 | // element with id of "bypass" - jQuery style selector |
32 | '#bypassme': function (element, renderer) { |
35 | '#bypassme': function (element, renderer) { |
33 | // true = "handled elsewhere, bypass text extraction" |
36 | // true = "handled elsewhere, bypass text extraction" |
34 | return true |
37 | return true |
35 | } |
38 | } |
36 | }; |
39 | }; |
37 | margins = { |
40 | margins = { |
38 | top: 80, |
41 | top: 80, |
39 | bottom: 60, |
42 | bottom: 60, |
40 | left: 40, |
43 | left: 40, |
41 | width: 522 |
44 | width: 522 |
42 | }; |
45 | }; |
43 | // all coords and widths are in jsPDF instance's declared units |
46 | // all coords and widths are in jsPDF instance's declared units |
44 | // 'inches' in this case |
47 | // 'inches' in this case |
45 | pdf.fromHTML( |
48 | pdf.fromHTML( |
46 | source, // HTML string or DOM elem ref. |
49 | source, // HTML string or DOM elem ref. |
47 | margins.left, // x coord |
50 | margins.left, // x coord |
48 | margins.top, { // y coord |
51 | margins.top, { // y coord |
49 | 'width': margins.width, // max width of content on PDF |
52 | 'width': margins.width, // max width of content on PDF |
50 | 'elementHandlers': specialElementHandlers |
53 | 'elementHandlers': specialElementHandlers |
51 | }, |
54 | }, |
52 | 55 | ||
53 | function (dispose) { |
56 | function (dispose) { |
54 | // dispose: object with X, Y of the last line add to the PDF |
57 | // dispose: object with X, Y of the last line add to the PDF |
55 | // this allow the insertion of new lines after html |
58 | // this allow the insertion of new lines after html |
56 | //var pdfDocument = pdf.save('Test.pdf'); |
59 | //var pdfDocument = pdf.save('Test.pdf'); |
57 | var pdfDocument = pdf.output(); |
60 | var pdfDocument = pdf.output(); |
58 | 61 | ||
59 | var boundary = '---------------------------'; |
62 | var boundary = '---------------------------'; |
60 | boundary += Math.floor(Math.random()*32768); |
63 | boundary += Math.floor(Math.random()*32768); |
61 | boundary += Math.floor(Math.random()*32768); |
64 | boundary += Math.floor(Math.random()*32768); |
62 | boundary += Math.floor(Math.random()*32768); |
65 | boundary += Math.floor(Math.random()*32768); |
63 | 66 | ||
64 | var body = ''; |
67 | var body = ''; |
65 | body += '--' + boundary + '\r\n' + |
68 | body += '--' + boundary + '\r\n' + |
66 | 'Content-Disposition: form-data; name="filesInputId-UPLOAD[]"; filename="20170530_210340.pdf"' + '\r\n'; |
69 | 'Content-Disposition: form-data; name="filesInputId-UPLOAD[]"; filename="20170530_210340.pdf"' + '\r\n'; |
67 | body += 'Content-Type: application/pdf'; |
70 | body += 'Content-Type: application/pdf'; |
68 | body += '\r\n\r\n'; |
71 | body += '\r\n\r\n'; |
69 | body += pdfDocument; |
72 | body += pdfDocument; |
70 | body += '\r\n' |
73 | body += '\r\n' |
71 | body += '--' + boundary + '--'; |
74 | body += '--' + boundary + '--'; |
72 | 75 | ||
73 | 76 | ||
74 | 77 | ||
75 | $.ajax({ |
78 | $.ajax({ |
76 | type: "POST", |
79 | type: "POST", |
77 | cache: false, |
80 | cache: false, |
78 | url: "<%=request.getContextPath()%>/filesUpload", |
81 | url: "<%=request.getContextPath()%>/filesUpload", |
79 | data: body , |
82 | data: body , |
80 | processData: false, |
83 | processData: false, |
81 | contentType : 'multipart/form-data; boundary=' + boundary, |
84 | contentType : 'multipart/form-data; boundary=' + boundary, |
82 | success: function (data) { |
85 | success: function (data) { |
83 | alert('success'); |
86 | alert('success'); |
84 | return false; |
87 | return false; |
85 | } |
88 | } |
86 | }); |
89 | }); |
87 | }, margins |
90 | }, margins |
88 | ); |
91 | ); |
89 | } |
92 | } |
90 | </script> |
93 | </script> |
91 | 94 | ||
92 | <% |
95 | <% |
93 | 96 | ||
94 | Long courseId = Long.parseLong(request.getParameter("courseId")); |
97 | String courseCode = request.getParameter("courseCode"); |
95 | AbstractDao.getCurrentSession().beginTransaction(); |
98 | AbstractDao.getCurrentSession().beginTransaction(); |
96 | CourseImpl courseImpl = (CourseImpl) DaoFactory.getCourseDaoImpl().get(courseId); |
99 | CourseImpl courseImpl = DaoFactory.getCourseDaoImpl().findCourseByCode(courseCode); |
97 | request.setAttribute("course",courseImpl); |
100 | request.setAttribute("course",courseImpl); |
- | 101 | CourseReportDocument courseReport = null; |
|
- | 102 | try { |
|
- | 103 | courseReport = new CourseReportServices().createNewCourseReportDocument("44", "201617"); |
|
- | 104 | } catch (Throwable e) { |
|
- | 105 | System.out.println(e); |
|
- | 106 | e.printStackTrace(); |
|
- | 107 | } |
|
- | 108 | String courseReportJson = courseReport.toJson(); |
|
- | 109 | request.setAttribute("courseDocumentJson",courseReportJson); |
|
- | 110 | request.setAttribute("courseDocument",courseReport); |
|
98 | 111 | ||
99 | String classTextComponent = TextComponent.class.getName(); |
- | |
100 | String classImageComponent = ImageComponent.class.getName(); |
- | |
101 | request.setAttribute("classTextComponent",classTextComponent); |
- | |
102 | request.setAttribute("classImageComponent",classImageComponent); |
- | |
103 | %> |
112 | %> |
104 | <a href="javascript:demoFromHTML()" class="button">Run Code</a> |
113 | <%--<a href="javascript:demoFromHTML()" class="button">Run Code</a>--%> |
105 | 114 | ||
106 | <div class="container-fluid"> |
115 | <div class="container-fluid"> |
107 | 116 | ||
108 | <style> |
117 | <style> |
109 | .separatorSection |
118 | .separatorSection |
110 | { |
119 | { |
111 | border: 1px solid #ddd; |
120 | border: 1px solid #ddd; |
112 | } |
121 | } |
113 | </style> |
122 | </style> |
114 | 123 | ||
115 | 124 | ||
116 | <!-- Apresentacao da Unidade --> |
125 | <!-- Apresentacao da Unidade --> |
117 | 126 | ||
118 | <div class="panel panel-default"> |
127 | <div class="panel panel-default"> |
119 | <div class="panel-heading"> |
128 | <div class="panel-heading"> |
120 | Relatório Anual do curso: ${course.name} |
129 | Relatório Anual do curso: ${course.name} |
121 | </div> |
130 | </div> |
122 | <div class="panel-body"> |
131 | <div class="panel-body"> |
123 | 132 | ||
124 | <p><b class="label-info">Tipo de Curso:</b> <bean:message key="course.${course.degree}"/></p> |
133 | <p><b class="label-info">Tipo de Curso:</b> <bean:message key="course.${course.degree}"/></p> |
125 | <p><b class="label-info">Ano Lectivo:</b> ${course.importYear}</p> |
134 | <p><b class="label-info">Ano Lectivo:</b> ${course.importYear}</p> |
126 | <p><b class="label-info">Departamento:</b> ${course.department.name}</p> |
135 | <p><b class="label-info">Departamento:</b> ${course.department.name}</p> |
127 | <p><b class="label-info">Escola:</b> ${course.department.courseSchool.name}</p> |
136 | <p><b class="label-info">Escola:</b> ${course.department.courseSchool.name}</p> |
128 | 137 | ||
129 | 138 | ||
130 | <script> |
- | |
131 | function showSep(id) |
- | |
132 | { |
- | |
133 | $(".separatorSectionNav").removeClass("active"); |
- | |
134 | $(".separatorSection").hide(); |
- | |
135 | $("#separatorSectionNav_" + id).addClass("active"); |
- | |
136 | $("#separatorSection_" + id).show(); |
- | |
137 | } |
- | |
138 | </script> |
- | |
139 | - | ||
140 | <ul class="nav nav-tabs"> |
- | |
141 | <li id="separatorSectionNav_introducao" class="active separatorSectionNav"><a href="javascript:showSep('introducao')">1 - Introdução</a></li> |
- | |
142 | <li id="separatorSectionNav_mapaUnidades" class="separatorSectionNav"><a href="javascript:showSep('mapaUnidades')">2 - Mapa Síntese </a></li> |
- | |
143 | <li id="separatorSectionNav_resultados" class="separatorSectionNav"><a href="javascript:showSep('resultados')">3 - Resultados </a></li> |
- | |
144 | <li id="separatorSectionNav_inqueritos" class="separatorSectionNav"><a href="javascript:showSep('inqueritos')">4 - Inquéritos </a></li> |
- | |
145 | <li id="separatorSectionNav_conclusoes" class="separatorSectionNav"><a href="javascript:showSep('conclusoes')">4 - Conclusões </a></li> |
- | |
146 | - | ||
147 | </ul> |
- | |
148 | - | ||
149 | 139 | ||
150 | 140 | ||
151 | <script> |
141 | <script> |
- | 142 | ||
152 | //Especifico da aplicacao |
143 | //Especifico da aplicacao |
153 | var courseReportApp = angular.module('courseReportApp', []); |
144 | var courseReportApp = angular.module('courseReportApp', []); |
154 | GLOBAL_BacoAngularAppDependencies.push('courseReportApp'); |
145 | GLOBAL_BacoAngularAppDependencies.push('courseReportApp'); |
155 | 146 | ||
156 | 147 | ||
157 | courseReportApp.directive('resizable', function () { |
148 | courseReportApp.directive('resizable', function () { |
158 | return { |
149 | return { |
159 | restrict: 'A', |
150 | restrict: 'A', |
160 | scope: { |
151 | scope: { |
161 | callback: '&onResize' |
152 | callback: '&onResize' |
162 | }, |
153 | }, |
163 | link: function postLink(scope, elem, attrs) { |
154 | link: function postLink(scope, elem, attrs) { |
164 | elem.resizable(); |
155 | elem.resizable(); |
165 | elem.on('resize', function (evt, ui, comp) { |
156 | elem.on('resize', function (evt, ui, comp) { |
166 | scope.$apply(function() { |
157 | scope.$apply(function() { |
167 | if (scope.callback) { |
158 | if (scope.callback) { |
168 | scope.callback({$evt: evt, $ui: ui, $comp: comp }); |
159 | scope.callback({$evt: evt, $ui: ui, $comp: comp }); |
169 | } |
160 | } |
170 | }) |
161 | }) |
171 | }); |
162 | }); |
172 | } |
163 | } |
173 | }; |
164 | }; |
174 | }); |
165 | }); |
175 | 166 | ||
176 | 167 | ||
177 | courseReportApp.controller('courseReportAppController', function($scope) |
168 | courseReportApp.controller('courseReportAppController', function($scope) |
178 | { |
169 | { |
179 | 170 | ||
180 | $scope.report = |
171 | $scope.docAppSelector = "#courseReportApp"; |
181 | { |
172 | $scope.report = <%=courseReportJson%> |
182 | - | ||
183 | } |
- | |
184 | 173 | ||
185 | $scope.resize = function(evt,ui,comp) { |
174 | $scope.resize = function(evt,ui,comp) { |
186 | //console.log (evt,ui); |
175 | //console.log (evt,ui); |
187 | comp.width = ui.size.width; |
176 | comp.width = ui.size.width; |
188 | comp.height = ui.size.height; |
177 | comp.height = ui.size.height; |
189 | } |
178 | } |
190 | 179 | ||
- | 180 | /** |
|
- | 181 | * @classe class to match |
|
- | 182 | * @superClasses array of strings |
|
- | 183 | * */ |
|
- | 184 | $scope.contains = function(obj,classe) |
|
- | 185 | { |
|
- | 186 | if(obj['@class'] && obj['@class'] == classe) |
|
- | 187 | return true; |
|
- | 188 | if(obj.allSuperClasses) |
|
- | 189 | { |
|
- | 190 | for(var i in obj.allSuperClasses) |
|
- | 191 | { |
|
- | 192 | if(classe == obj.allSuperClasses[i]) |
|
- | 193 | return true; |
|
- | 194 | } |
|
- | 195 | } |
|
- | 196 | return false; |
|
- | 197 | } |
|
- | 198 | ||
- | 199 | $scope.showSep = function(section) |
|
- | 200 | { |
|
- | 201 | $(".separatorSectionNav").each(function() |
|
- | 202 | { |
|
- | 203 | angular.element($(this)).scope().section.active = false; |
|
- | 204 | }); |
|
- | 205 | section.active = true; |
|
- | 206 | ||
- | 207 | } |
|
- | 208 | ||
- | 209 | $scope.class2id = function(obj) |
|
- | 210 | { |
|
- | 211 | return obj["@class"].replaceAll(".","_"); |
|
- | 212 | } |
|
- | 213 | ||
191 | $scope.addText = function(parentCustomPane) |
214 | $scope.addText = function(parentCustomPane) |
192 | { |
215 | { |
193 | $scope.addSimpleDocComponent(parentCustomPane,"${classTextComponent}") |
216 | $scope.addSimpleDocComponent(parentCustomPane,"pt.estgp.estgweb.utils.documentBuilder.TextComponent") |
194 | } |
217 | } |
195 | 218 | ||
196 | $scope.addImage = function(parentCustomPane) |
219 | $scope.addImage = function(parentCustomPane) |
197 | { |
220 | { |
198 | $scope.addSimpleDocComponent(parentCustomPane,"${classImageComponent}") |
221 | $scope.addSimpleDocComponent(parentCustomPane,"pt.estgp.estgweb.utils.documentBuilder.ImageComponent") |
199 | } |
222 | } |
200 | 223 | ||
201 | $scope.addSimpleDocComponent = function(parentCustomPane,classComponent) |
224 | $scope.addSimpleDocComponent = function(parentCustomPane,classComponent) |
202 | { |
225 | { |
203 | if(!parentCustomPane.components) |
226 | if(!parentCustomPane.components) |
204 | { |
227 | { |
205 | parentCustomPane.components = []; |
228 | parentCustomPane.components = []; |
206 | } |
229 | } |
207 | parentCustomPane.components.push( |
230 | parentCustomPane.components.push( |
208 | { |
231 | { |
209 | "@class" : classComponent, |
232 | "@class" : classComponent |
210 | "text" : "", |
- | |
211 | "title" : "" |
- | |
212 | } |
233 | } |
213 | ); |
234 | ); |
214 | } |
235 | } |
215 | $scope.removeComponent = function(index,array) |
236 | $scope.removeComponent = function(index,array) |
216 | { |
237 | { |
217 | array.splice(index,1); |
238 | array.splice(index,1); |
218 | 239 | ||
219 | 240 | ||
220 | } |
241 | } |
221 | $scope.callbackUploadedFiles = function(filesUploadResult,token,targetElement) |
242 | $scope.callbackUploadedFiles = function(filesUploadResult,token,targetElement) |
222 | { |
243 | { |
223 | var modelObject = BacoAngularUtils.getAngularElementModel(targetElement); |
244 | var modelObject = BacoAngularUtils.getAngularElementModel(targetElement); |
224 | modelObject.filesUploadResult = filesUploadResult; |
245 | modelObject.filesUploadResult = filesUploadResult; |
225 | if(modelObject.image && modelObject.image.identifier) |
246 | if(modelObject.image && modelObject.image.identifier) |
226 | { |
247 | { |
227 | widgetCallWithActionParameters( |
248 | widgetCallWithActionParameters( |
228 | "<%=request.getContextPath()%>/user/json/repository.do", |
249 | "<%=request.getContextPath()%>/user/json/repository.do", |
229 | "replaceRepositoryFileFromTempPrivateDomain", |
250 | "replaceRepositoryFileFromTempPrivateDomain", |
230 | { |
251 | { |
231 | "identifier" : modelObject.image.identifier, |
252 | "identifier" : modelObject.image.identifier, |
232 | "fileUploaded" : BacoJS.stringifyOrdered(filesUploadResult.uploadedFiles[0]) |
253 | "fileUploaded" : BacoJS.stringifyOrdered(filesUploadResult.uploadedFiles[0]) |
233 | }, |
254 | }, |
234 | "#courseReportApp", |
255 | "#courseReportApp", |
235 | function(repositoryFile4JsonView) |
256 | function(repositoryFile4JsonView) |
236 | { |
257 | { |
237 | modelObject.image = repositoryFile4JsonView; |
258 | modelObject.image = repositoryFile4JsonView; |
238 | modelObject.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + modelObject.image.identifier + "?" + new Date().getTime(); |
259 | modelObject.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + modelObject.image.identifier + "?" + new Date().getTime(); |
239 | delete modelObject.filesUploadResult; |
260 | delete modelObject.filesUploadResult; |
240 | angular.element($("#courseReportApp")).scope().$apply(); |
261 | angular.element($("#courseReportApp")).scope().$apply(); |
241 | }, |
262 | }, |
242 | function(){} |
263 | function(){} |
243 | ); |
264 | ); |
244 | } |
265 | } |
245 | else |
266 | else |
246 | { |
267 | { |
247 | widgetCallWithActionParameters( |
268 | widgetCallWithActionParameters( |
248 | "<%=request.getContextPath()%>/user/json/repository.do", |
269 | "<%=request.getContextPath()%>/user/json/repository.do", |
249 | "saveRepositoryFileFromTempPrivateDomain", |
270 | "saveRepositoryFileFromTempPrivateDomain", |
250 | { |
271 | { |
251 | "fileUploaded" : BacoJS.stringifyOrdered(filesUploadResult.uploadedFiles[0]) |
272 | "fileUploaded" : BacoJS.stringifyOrdered(filesUploadResult.uploadedFiles[0]) |
252 | }, |
273 | }, |
253 | "#courseReportApp", |
274 | "#courseReportApp", |
254 | function(repositoryFile4JsonView) |
275 | function(repositoryFile4JsonView) |
255 | { |
276 | { |
256 | modelObject.image = repositoryFile4JsonView; |
277 | modelObject.image = repositoryFile4JsonView; |
257 | modelObject.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + modelObject.image.identifier + "?" + new Date().getTime(); |
278 | modelObject.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + modelObject.image.identifier + "?" + new Date().getTime(); |
258 | delete modelObject.filesUploadResult; |
279 | delete modelObject.filesUploadResult; |
259 | angular.element($("#courseReportApp")).scope().$apply(); |
280 | angular.element($("#courseReportApp")).scope().$apply(); |
260 | }, |
281 | }, |
261 | function(){} |
282 | function(){} |
262 | ); |
283 | ); |
263 | } |
284 | } |
264 | } |
285 | } |
265 | 286 | ||
266 | 287 | ||
267 | }); |
288 | }); |
268 | </script> |
289 | </script> |
269 | <jsp:include page="../utils/documentsBuilder.jsp"/> |
- | |
270 | - | ||
271 | - | ||
272 | <div id="courseReportApp" ng-app="courseReportApp" ng-controller="courseReportAppController" class="form-vertical"> |
- | |
273 | - | ||
274 | - | ||
275 | <!--Introducao--> |
- | |
276 | <div id="separatorSection_introducao" class="separatorSection clearfix"> |
- | |
277 | 290 | ||
278 | <div class="documentSimpleComponent form-group clearfix"> |
- | |
279 | <label class="col-md-2 control-label">Texto</label> |
- | |
280 | <div class="col-md-10"> |
291 | <!--TEMPLATES FOR DOCUMENT BUILDER--> |
281 | <textarea class="form-control" rows="10" ng-model="report.introSection.textComponent.text"> |
- | |
282 | - | ||
283 | </textarea> |
- | |
284 | </div> |
- | |
285 | </div> |
- | |
286 | <div ng-include="'customPane_renderer.html'" |
292 | <jsp:include page="../utils/documentsBuilder.jsp"/> |
287 | ng-init="report.introSection.customPane = {};customPane = report.introSection.customPane;docAppSelector='#courseReportApp'"> |
- | |
288 | </div> |
- | |
289 | 293 | ||
- | 294 | <div class="form-vertical"> |
|
- | 295 | <div id="courseReportApp" ng-app="courseReportApp" ng-controller="courseReportAppController"> |
|
290 | 296 | ||
291 | </div> |
- | |
292 | <!--/Introducao--> |
- | |
293 | 297 | ||
294 | <!--Mapa Unidades--> |
298 | <ul class="nav nav-tabs"> |
- | 299 | <li ng-model="section" class="separatorSectionNav" ng-class="{ active: section.active}" ng-repeat="section in report.sections"> |
|
295 | <div id="separatorSection_mapaUnidades" class="separatorSection"> |
300 | <a ng-click="showSep(section)">{{section.title}}</a> |
- | 301 | </li> |
|
- | 302 | </ul> |
|
296 | 303 | ||
297 | </div> |
- | |
298 | <!--/Mapa Unidades--> |
- | |
299 | 304 | ||
300 | <!--Resultados--> |
- | |
301 | <div id="separatorSection_resultados" class="separatorSection"> |
- | |
302 | 305 | ||
303 | </div> |
306 | <!--DocumentSection--> |
304 | <!--/Resultados--> |
307 | <div ng-model="section" ng-class="{ hidden: !section.active}" ng-repeat="section in report.sections" class="separatorSection clearfix"> |
305 | 308 | ||
306 | <!--Inqueritos--> |
- | |
307 | <div id="separatorSection_inqueritos" class="separatorSection"> |
309 | <div ng-repeat="comp in section.components" ng-include="class2id(comp)"> |
308 | 310 | ||
309 | </div> |
311 | </div> |
310 | <!--/Inqueritos--> |
- | |
311 | 312 | ||
312 | <!--Conclusoes--> |
- | |
313 | <div id="separatorSection_conclusoes" class="separatorSection"> |
- | |
314 | 313 | ||
315 | </div> |
314 | </div> |
316 | <!--/Conclusoes--> |
315 | <!--/DocumentSection--> |
317 | 316 | ||
- | 317 | <%-- |
|
318 | <pre class="code">{{ report | json }}</pre> |
318 | <pre class="code">{{ report | json }}</pre> |
- | 319 | --%> |
|
- | 320 | ||
319 | 321 | ||
320 | </div><!--App--> |
322 | </div><!--App--> |
- | 323 | </div> <!--form--> |
|
321 | 324 | ||
322 | </div><!--Panel Body--> |
325 | </div><!--Panel Body--> |
323 | 326 | ||
324 | </div><!--Panel--> |
327 | </div><!--Panel--> |
325 | 328 | ||
326 | </div><!--container-fluid--> |
329 | </div><!--container-fluid--> |
327 | 330 | ||
328 | <% |
331 | <% |
329 | AbstractDao.getCurrentSession().getTransaction().commit(); |
332 | AbstractDao.getCurrentSession().getTransaction().commit(); |
330 | %> |
333 | %> |
331 | 334 | ||
332 | Generated by GNU Enscript 1.6.5.2. |
335 | Generated by GNU Enscript 1.6.5.2. |
333 | 336 | ||
334 | 337 |