Ignore:
Timestamp:
03/18/09 14:32:50 (16 years ago)
Author:
lgiessmann
Message:

finished a prototype of the ajax-interface with the frameworks "prototype" and "scriptaculous" as a framework combination+ssh://lgiessmann@common-lisp.net/project/isidorus/svn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/rest_interface/set-up-json-interface.lisp ΒΆ

    r17 r18  
    1515  (declare (string json-get-prefix json-get-all-psis json-commit-url json-user-interface-url json-user-interface-file-path))
    1616  (push ;TODO create a static-file-and-folder-handler for all static files
    17    (create-regex-dispatcher json-user-interface-url #'(lambda()
    18                                                         (hunchentoot:handle-static-file json-user-interface-file-path)))
     17   (create-regex-dispatcher json-user-interface-url
     18                            #'(lambda()
     19                                (hunchentoot:handle-static-file json-user-interface-file-path "text/html")))
    1920   hunchentoot:*dispatch-table*)
    20   (push
    21    (create-regex-dispatcher "/prototype-1.6.0.3.js" #'(lambda()
    22                                                         (hunchentoot:handle-static-file "json/prototype-1.6.0.3.js")))
    23    hunchentoot:*dispatch-table*)
     21  ;; === ajax frameworks =======================================================
     22  ;; TODO: *define a new parameter which represents the folder of the javascript
     23  ;;        files and load all files, better would be a "folder-dispatcher-and-handler"
     24  ;;        of hunchentoot, but it seems to have some problems???
     25  ;;       *a second parameter should represent the prefix of the javascript files
     26  ;;       *the own javascript code should be extracted of the .html-file into a
     27  ;;        javascript file in the javascripts directory
     28  (dolist (script '("builder.js" "controls.js" "dragdrop.js" "effects.js" "prototype-1.6.0.3.js" "scriptaculous.js" "slider.js" "sound.js" "unittest.js"))
     29    (let ((script-path (concatenate 'string "json/javascripts/" script))
     30          (script-url (concatenate 'string "/javascripts/" script)))
     31      (push
     32       (create-regex-dispatcher script-url
     33                                #'(lambda()
     34                                    (hunchentoot:handle-static-file script-path "text/javascript")))
     35       hunchentoot:*dispatch-table*)))
     36  ;; === ajax frameworks end ===================================================
    2437  (push
    2538   (create-regex-dispatcher json-get-all-psis #'return-all-topic-psis)
Note: See TracChangeset for help on using the changeset viewer.