Changeset 12862 in project


Ignore:
Timestamp:
12/21/08 04:37:06 (11 years ago)
Author:
azul
Message:

Optimization: only include the rating JS once per file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/svnwiki-rating/trunk/svnwiki-rating.scm

    r12860 r12862  
    55(declare (export))
    66(use svnwiki-extensions-support srfi-40 html-stream stream-ext format-modular orders srfi-1 svn-client svn-post-commit-hooks)
     7
     8(define (html-head-data env)
     9  (let-from-environment env (return static-url)
     10    (return
     11      (html-stream
     12        ((script type "text/javascript" src (format #f "~A/xsvnwiki-helper/rating/rating" static-url)))))))
     13
     14(svnwiki-extension-define 'html-head-data 'inline-edit html-head-data)
    715
    816(define (create-rating-helper env)
     
    2836          env
    2937          (html-stream
    30             ; TODO: Don't get this more than once per file.
    31             ((script type "text/javascript" src (format #f "~A/xsvnwiki-helper/rating/rating" static-url)))
    3238            ((span id span-id class "render-bottom-span render-bottom-span-rating") "Loading...")
    3339            ((script type "text/javascript")
Note: See TracChangeset for help on using the changeset viewer.