Changeset 14098 in project


Ignore:
Timestamp:
04/06/09 01:13:09 (11 years ago)
Author:
azul
Message:

Use new 'javascript' extension type.

File:
1 edited

Legend:

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

    r14032 r14098  
    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 'rating html-head-data)
    15 
    16 (define (create-rating-helper env)
    17   (let-from-environment env (path-out program)
    18     (assert (and 'create-rating-helper (string? path-out)))
    19     (write-file-with-tmp
    20       (svnwiki-make-pathname (list "xsvnwiki-helper" "rating") "rating")
    21       "text/javascript"
    22       path-out
    23       *rating-js-code*)))
    247
    258(define (rating-render-bottom-span env)
     
    6548             (format #f "Vote ~A" name))))))))
    6649
    67 (define *rating-js-code*
     50(define (rating-js-code env)
    6851#<<EOF
    6952var svnwikiRating = new Object();
     
    292275(svnwiki-extension-define 'dynamic 'rating rating-dynamic)
    293276(svnwiki-extension-define 'update-notify 'rating rating-update)
    294 (svnwiki-extension-define 'start-update-notify 'rating create-rating-helper)
     277(svnwiki-extension-define 'javascript 'rating rating-js-code)
Note: See TracChangeset for help on using the changeset viewer.