Rev 1907 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1907 | Rev 1919 | ||
---|---|---|---|
Line 89... | Line 89... | ||
89 | }, margins |
89 | }, margins |
90 | ); |
90 | ); |
91 | } |
91 | } |
92 | </script> |
92 | </script> |
93 | 93 | ||
94 | <% |
- | |
95 | 94 | ||
96 | String courseCode = request.getParameter("courseCode"); |
- | |
97 | String year = request.getParameter("year"); |
- | |
98 | AbstractDao.getCurrentSession().beginTransaction(); |
- | |
99 | CourseImpl courseImpl = DaoFactory.getCourseDaoImpl().findCourseByCode(courseCode); |
- | |
100 | request.setAttribute("course", courseImpl); |
- | |
101 | CourseReportDocument courseReport = null; |
- | |
102 | try { |
- | |
103 | courseReport = new CourseReportServices().createNewCourseReportDocument(courseCode, year); |
- | |
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); |
- | |
111 | - | ||
112 | %> |
- | |
113 | <%--<a href="javascript:demoFromHTML()" class="button">Run Code</a>--%> |
95 | <%--<a href="javascript:demoFromHTML()" class="button">Run Code</a>--%> |
114 | 96 | ||
115 | <div class="container-fluid"> |
97 | <div class="container-fluid"> |
116 | 98 | ||
117 | <style> |
99 | <style> |
Line 163... | Line 145... | ||
163 | 145 | ||
164 | 146 | ||
165 | courseReportApp.controller('courseReportAppController', function ($scope) { |
147 | courseReportApp.controller('courseReportAppController', function ($scope) { |
166 | 148 | ||
167 | $scope.docAppSelector = "#courseReportApp"; |
149 | $scope.docAppSelector = "#courseReportApp"; |
168 | $scope.report = <%=courseReportJson%> |
150 | $scope.report = ${courseDocumentJson} |
169 | 151 | ||
170 | $scope.resize = function (evt, ui, comp) { |
152 | $scope.resize = function (evt, ui, comp) { |
171 | //console.log (evt,ui); |
153 | //console.log (evt,ui); |
172 | comp.width = ui.size.width; |
154 | comp.width = ui.size.width; |
173 | comp.height = ui.size.height; |
155 | comp.height = ui.size.height; |
Line 336... | Line 318... | ||
336 | </div><!--Panel--> |
318 | </div><!--Panel--> |
337 | 319 | ||
338 | </div> |
320 | </div> |
339 | <!--container-fluid--> |
321 | <!--container-fluid--> |
340 | 322 | ||
341 | <% |
- | |
342 | AbstractDao.getCurrentSession().getTransaction().commit(); |
- | |
343 | %> |
- | |
344 | 323 |