[report-core] don't need to remove jquery anymore

This commit is contained in:
Christopher Lam 2020-02-18 21:24:41 +08:00
parent 8e1dba7eae
commit d5729306a0

View File

@ -730,22 +730,13 @@ not found.")))
;; looks up the report by id and renders it with gnc:report-render-html
;; marks the cursor busy during rendering; returns the html
;; Note: the final html document is post-processed to ensure there's only one single
;; inclusion of the jquery/jqplot libraries. This is only needed to fix multicolumn
;; reports with multiple charts, but doing it more generally is an
;; acceptable hack until a cleaner solution can be found (bug #704525)
(define (gnc:report-run id)
(let ((report (gnc-report-find id))
(html #f))
(gnc-set-busy-cursor '() #t)
(gnc:backtrace-if-exception
(lambda ()
(if report
(begin
(set! html (gnc:report-render-html report #t))
(set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.min.js") "" 2 -1))
(set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.jqplot.js") "" 2 -1))
))))
(if report (set! html (gnc:report-render-html report #t)))))
(gnc-unset-busy-cursor '())
html))