Rev 1928 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1928 | Rev 1934 | ||
---|---|---|---|
Line 1... | Line 1... | ||
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" %> |
- | |
3 | <%@ page import="pt.estgp.estgweb.domain.CourseImpl" %> |
- | |
4 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
- | |
5 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
- | |
6 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
- | |
7 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
- | |
8 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
9 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
3 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
4 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
5 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
6 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
Line 18... | Line 12... | ||
18 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.css"> |
12 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.css"> |
19 | <script src="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.min.js"></script> |
13 | <script src="<%=request.getContextPath()%>/js/jquery-ui-1.12.1/jquery-ui.min.js"></script> |
20 | <link rel="stylesheet" href="<%=request.getContextPath()%>/css/flora-commons/flora.resizable.css"> |
14 | <link rel="stylesheet" href="<%=request.getContextPath()%>/css/flora-commons/flora.resizable.css"> |
21 | <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>--> |
15 | <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>--> |
22 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js"></script> |
16 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js"></script> |
- | 17 | ||
- | 18 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
|
- | 19 | <script src='http://cdnjs.cloudflare.com/ajax/libs/textAngular/1.5.0/textAngular-rangy.min.js'></script> |
|
- | 20 | <script src='http://cdnjs.cloudflare.com/ajax/libs/textAngular/1.5.0/textAngular-sanitize.min.js'></script> |
|
- | 21 | <script src='http://cdnjs.cloudflare.com/ajax/libs/textAngular/1.5.0/textAngular.min.js'></script> |
|
- | 22 | ||
- | 23 | ||
23 | <script> |
24 | <script> |
24 | function demoFromHTML() { |
25 | function demoFromHTML() { |
25 | var pdf = new jsPDF('p', 'pt', 'letter'); |
26 | var pdf = new jsPDF('p', 'pt', 'letter'); |
26 | // source can be HTML-formatted string, or a reference |
27 | // source can be HTML-formatted string, or a reference |
27 | // to an actual DOM element from which the text will be scraped. |
28 | // to an actual DOM element from which the text will be scraped. |
Line 96... | Line 97... | ||
96 | <script>ping()</script> |
97 | <script>ping()</script> |
97 | 98 | ||
98 | <jsp:useBean id="courseReportJson" type="java.lang.String" scope="request"/> |
99 | <jsp:useBean id="courseReportJson" type="java.lang.String" scope="request"/> |
99 | <jsp:useBean id="course" type="pt.estgp.estgweb.domain.CourseImpl" scope="request"/> |
100 | <jsp:useBean id="course" type="pt.estgp.estgweb.domain.CourseImpl" scope="request"/> |
100 | 101 | ||
101 | <% |
- | |
102 | //AbstractDao.getCurrentSession().beginTransaction(); |
- | |
103 | %> |
- | |
104 | <%--<a href="javascript:demoFromHTML()" class="button">Run Code</a>--%> |
102 | <%--<a href="javascript:demoFromHTML()" class="button">Run Code</a>--%> |
105 | 103 | ||
106 | <div class="container-fluid"> |
104 | <div class="container-fluid"> |
107 | 105 | ||
108 | <style> |
106 | <style> |
Line 130... | Line 128... | ||
130 | 128 | ||
131 | 129 | ||
132 | <script> |
130 | <script> |
133 | 131 | ||
134 | //Especifico da aplicacao |
132 | //Especifico da aplicacao |
135 | var courseReportApp = angular.module('courseReportApp', ['ui.tree']); |
133 | var courseReportApp = angular.module('courseReportApp', ['textAngular', 'ngSanitize']); |
136 | GLOBAL_BacoAngularAppDependencies.push('courseReportApp'); |
134 | GLOBAL_BacoAngularAppDependencies.push('courseReportApp'); |
137 | 135 | ||
138 | 136 | ||
139 | courseReportApp.directive('resizable', function () { |
137 | courseReportApp.directive('resizable', function () { |
140 | return { |
138 | return { |
Line 160... | Line 158... | ||
160 | { |
158 | { |
161 | 159 | ||
162 | $scope.docAppSelector = "#courseReportApp"; |
160 | $scope.docAppSelector = "#courseReportApp"; |
163 | $scope.report = ${courseReportJson} |
161 | $scope.report = ${courseReportJson} |
164 | 162 | ||
165 | $scope.resize = function(evt,ui,comp) { |
163 | $scope.resize = function(evt,ui,comp) { |
166 | //console.log (evt,ui); |
164 | //console.log (evt,ui); |
167 | comp.width = ui.size.width; |
165 | comp.width = ui.size.width; |
168 | comp.height = ui.size.height; |
166 | comp.height = ui.size.height; |
169 | } |
167 | } |
170 | 168 | ||
171 | /** |
169 | /** |
172 | * @classe class to match |
170 | * @classe class to match |
173 | * @superClasses array of strings |
171 | * @superClasses array of strings |
174 | * */ |
172 | * */ |
Line 312... | Line 310... | ||
312 | "courseReportDocument" : BacoJS.stringifyOrdered($scope.report) |
310 | "courseReportDocument" : BacoJS.stringifyOrdered($scope.report) |
313 | }, |
311 | }, |
314 | "#courseReportApp", |
312 | "#courseReportApp", |
315 | function(data) |
313 | function(data) |
316 | { |
314 | { |
317 | alert(BacoJS.stringifyOrdered(data)); |
315 | //alert(BacoJS.stringifyOrdered(data)); |
318 | }, |
316 | }, |
319 | function(){} |
317 | function(){} |
320 | ); |
318 | ); |
321 | } |
319 | } |
322 | 320 | ||
323 | - | ||
324 | - | ||
325 | }); |
321 | }); |
326 | </script> |
322 | </script> |
327 | 323 | ||
328 | <!--TEMPLATES FOR DOCUMENT BUILDER--> |
324 | <!--TEMPLATES FOR DOCUMENT BUILDER--> |
329 | <jsp:include page="documentsBuilder.jsp"/> |
325 | <jsp:include page="documentsBuilder.jsp"/> |
Line 331... | Line 327... | ||
331 | <div class="form-vertical"> |
327 | <div class="form-vertical"> |
332 | <div id="courseReportApp" ng-app="courseReportApp" ng-controller="courseReportAppController"> |
328 | <div id="courseReportApp" ng-app="courseReportApp" ng-controller="courseReportAppController"> |
333 | <div class="web-messages"></div> |
329 | <div class="web-messages"></div> |
334 | 330 | ||
335 | <button class="btn btn-success" ng-click="saveCourseReportDocument()">Gravar</button> |
331 | <button class="btn btn-success" ng-click="saveCourseReportDocument()">Gravar</button> |
336 | <button class="btn btn-success" onclick="demoFromHTML()">PDF</button> |
332 | <a class="btn btn-success" href="<%=request.getContextPath()%>/user/formattedCourseReport.do?courseCode={{report.courseCode}}&year={{report.year}}">PDF</a> |
337 | 333 | ||
338 | <div ng-init="section=report;" ng-include="'pt_estgp_estgweb_utils_documentBuilder_DocumentSection'"> |
334 | <div ng-init="section=report;" ng-include="'pt_estgp_estgweb_utils_documentBuilder_DocumentSection'"> |
339 | 335 | ||
340 | </div> |
336 | </div> |
341 | 337 | ||
342 | <!--<pre class="code">{{ report | json }}</pre>--> |
338 | <!--<pre class="code">{{ report | json }}</pre>--> |
343 | 339 | ||
344 | 340 | ||
345 | - | ||
346 | </div><!--App--> |
341 | </div><!--App--> |
347 | </div> <!--form--> |
342 | </div> <!--form--> |
348 | 343 | ||
349 | </div><!--Panel Body--> |
344 | </div><!--Panel Body--> |
350 | 345 | ||
351 | </div><!--Panel--> |
346 | </div><!--Panel--> |
352 | 347 | ||
353 | </div><!--container-fluid--> |
348 | </div><!--container-fluid--> |
354 | - | ||
355 | <% |
- | |
356 | //AbstractDao.getCurrentSession().getTransaction().commit(); |
- | |
357 | %> |
- | |
358 | 349 |