Skip to content

Commit

Permalink
jqplot: fix paths to js and css files
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22789 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed Feb 20, 2013
1 parent 6776fc0 commit f8dabf5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
24 changes: 8 additions & 16 deletions src/report/report-system/html-barchart.scm
Expand Up @@ -349,26 +349,18 @@
(push "\"});\n")
(push "data.push(d")
(push series-index)
(push ");\n")))
(js-include (lambda (file)
(push "<script language=\"javascript\" type=\"text/javascript\" src=\"")
(push (gnc:find-file file (gnc:config-var-value-get gnc:*doc-path*)))
(push "\"></script>\n")))
(css-include (lambda (file)
(push "<link rel=\"stylesheet\" type=\"text/css\" href=\"")
(push (gnc:find-file file (gnc:config-var-value-get gnc:*doc-path*)))
(push "\" />\n"))))
(push ");\n"))))
(if (and (list? data)
(not (null? data))
(gnc:not-all-zeros data))
(begin
(push (gnc:html-js-include "gnucash/jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "gnucash/jqplot/jquery.jqplot.js"))
(push (gnc:html-js-include "gnucash/jqplot/jqplot.barRenderer.js"))
(push (gnc:html-js-include "gnucash/jqplot/jqplot.categoryAxisRenderer.js"))
(push (gnc:html-js-include "gnucash/jqplot/jqplot.canvasTextRenderer.js"))
(push (gnc:html-js-include "gnucash/jqplot/jqplot.canvasAxisTickRenderer.js"))
(push (gnc:html-css-include "gnucash/jqplot/jquery.jqplot.css"))
(push (gnc:html-js-include "jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "jqplot/jquery.jqplot.js"))
(push (gnc:html-js-include "jqplot/jqplot.barRenderer.js"))
(push (gnc:html-js-include "jqplot/jqplot.categoryAxisRenderer.js"))
(push (gnc:html-js-include "jqplot/jqplot.canvasTextRenderer.js"))
(push (gnc:html-js-include "jqplot/jqplot.canvasAxisTickRenderer.js"))
(push (gnc:html-css-include "jqplot/jquery.jqplot.css"))

(push "<div id=\"placeholder\" style=\"width:")
(push (gnc:html-barchart-width barchart))
Expand Down
10 changes: 6 additions & 4 deletions src/report/report-system/html-piechart.scm
Expand Up @@ -21,6 +21,8 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(load-from-path "html-jqplot.scm")

(define <html-piechart>
(make-record-type "<html-piechart>"
'(width
Expand Down Expand Up @@ -197,10 +199,10 @@
(if (and (list? data)
(not (null? data)))
(begin
(push (gnc:html-js-include "gnucash/jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "gnucash/jqplot/jquery.jqplot.js"))
(push (gnc:html-js-include "gnucash/jqplot/jqplot.pieRenderer.js"))
(push (gnc:html-css-include "gnucash/jqplot/jquery.jqplot.css"))
(push (gnc:html-js-include "jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "jqplot/jquery.jqplot.js"))
(push (gnc:html-js-include "jqplot/jqplot.pieRenderer.js"))
(push (gnc:html-css-include "jqplot/jquery.jqplot.css"))

(push "<div id=\"placeholder\" style=\"width:")
(push (gnc:html-piechart-width piechart))
Expand Down
6 changes: 3 additions & 3 deletions src/report/report-system/html-scatter.scm
Expand Up @@ -170,9 +170,9 @@
(if (and (list? data)
(not (null? data)))
(begin
(push (gnc:html-js-include "gnucash/jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "gnucash/jqplot/jquery.jqplot.js"))
(push (gnc:html-css-include "gnucash/jqplot/jquery.jqplot.css"))
(push (gnc:html-js-include "jqplot/jquery-1.4.2.min.js"))
(push (gnc:html-js-include "jqplot/jquery.jqplot.js"))
(push (gnc:html-css-include "jqplot/jquery.jqplot.css"))

(push "<div id=\"placeholder\" style=\"width:")
(push (gnc:html-scatter-width scatter))
Expand Down

0 comments on commit f8dabf5

Please sign in to comment.