[claw-cvs] r59 - trunk/main/dojo/src
achiumenti at common-lisp.net
achiumenti at common-lisp.net
Thu Jul 17 13:18:59 UTC 2008
Author: achiumenti
Date: Thu Jul 17 09:18:59 2008
New Revision: 59
Modified:
trunk/main/dojo/src/djbody.lisp
trunk/main/dojo/src/djbutton.lisp
trunk/main/dojo/src/djform.lisp
trunk/main/dojo/src/djlink.lisp
trunk/main/dojo/src/misc.lisp
Log:
commit of version 0.1.0 (dojo)
Modified: trunk/main/dojo/src/djbody.lisp
==============================================================================
--- trunk/main/dojo/src/djbody.lisp (original)
+++ trunk/main/dojo/src/djbody.lisp Thu Jul 17 09:18:59 2008
@@ -55,7 +55,7 @@
:documentation "Additional dojo configurations"))
(:metaclass metacomponent)
(:default-initargs :class "" :theme "tundra"
- :themes-url (format nil "~a/dojotoolkit/dijit/themes/" (clawserver-base-path (current-server)))
+ :themes-url (format nil "~a/dojotoolkit/dijit/themes/" (clawserver-base-path *clawserver*))
:parse-on-load "true"
:load-dojo-js t
:is-debug nil
@@ -77,7 +77,7 @@
(djconfig (djbody-djconfig o)))
(when (load-dojo-js o)
(script> :type "text/javascript"
- :src (format nil "~a/dojotoolkit/dojo/dojo.js" (clawserver-base-path (current-server)))
+ :src (format nil "~a/dojotoolkit/dojo/dojo.js" (clawserver-base-path *clawserver*))
:djconfig (if (null djconfig)
(format nil
"parseOnLoad:~a,usePlainJson:true,isDebug:~a"
@@ -90,8 +90,8 @@
(defmethod htcomponent-stylesheet-files ((o djbody))
(let ((theme (djbody-theme o)))
(list
- (format nil "~a/dojotoolkit/dojo/resources/dojo.css" (clawserver-base-path (current-server)))
- (format nil "~a/dojotoolkit/dijit/themes/dijit.css" (clawserver-base-path (current-server)))
+ (format nil "~a/dojotoolkit/dojo/resources/dojo.css" (clawserver-base-path *clawserver*))
+ (format nil "~a/dojotoolkit/dijit/themes/dijit.css" (clawserver-base-path *clawserver*))
(format nil "~a~a/~a.css" (djbody-themes-url o) theme theme))))
Modified: trunk/main/dojo/src/djbutton.lisp
==============================================================================
--- trunk/main/dojo/src/djbutton.lisp (original)
+++ trunk/main/dojo/src/djbutton.lisp Thu Jul 17 09:18:59 2008
@@ -71,11 +71,9 @@
value)))
(defmethod wcomponent-before-prerender ((obj djsubmit-button) (page page))
- (hunchentoot:log-message :info "PRERENDER@@@@@@@@@@@@@@@~a" (page-current-form page))
(setf (djsubmit-button-form obj) (page-current-form page)))
(defmethod wcomponent-before-render ((obj djsubmit-button) (page page))
- (hunchentoot:log-message :info "RENDER@@@@@@@@@@@@@@@~a" (page-current-form page))
(setf (djsubmit-button-form obj) (page-current-form page)))
(defmethod htcomponent-instance-initscript ((obj djsubmit-button))
Modified: trunk/main/dojo/src/djform.lisp
==============================================================================
--- trunk/main/dojo/src/djform.lisp (original)
+++ trunk/main/dojo/src/djform.lisp Thu Jul 17 09:18:59 2008
@@ -422,7 +422,7 @@
:translator *file-translator*))
(defmethod htcomponent-stylesheet-files((djtext-box-file djtext-box-file))
- (list (format nil "~a/dojotoolkit/dojox/widget/FileInput/FileInput.css" (clawserver-base-path (current-server)))))
+ (list (format nil "~a/dojotoolkit/dojox/widget/FileInput/FileInput.css" (clawserver-base-path *clawserver*))))
(defclass djeditor (djtextarea)
((form :initform nil
Modified: trunk/main/dojo/src/djlink.lisp
==============================================================================
--- trunk/main/dojo/src/djlink.lisp (original)
+++ trunk/main/dojo/src/djlink.lisp Thu Jul 17 09:18:59 2008
@@ -35,29 +35,20 @@
:documentation "A list of the component id to update"))
(:metaclass metacomponent)
(:documentation "Class that extends ACTION-LINK to handle XHR requests.")
- (:default-initargs :dojo-type "dijit.form.Form" :update-id ()))
+ (:default-initargs :dojo-type "claw.ActionLink" :update-id ()))
(defmethod wcomponent-template((o djaction-link))
- (let ((client-id (htcomponent-client-id o)))
+ (let ((client-id (htcomponent-client-id o))
+ (update-id (update-id o))
+ (dojo-type (djwidget-dojo-type o)))
(a> :static-id client-id
:href "#"
+ :hxr t
+ :dojotype dojo-type
+ :update-id (when update-id
+ (let ((js-array (ps* `(array ,update-id))))
+ (subseq js-array 0 (1- (length js-array)))))
(wcomponent-informal-parameters o)
(htcomponent-body o))))
-(defmethod htcomponent-instance-initscript((obj djaction-link))
- (let ((id (htcomponent-client-id obj))
- (page-url (page-url (htcomponent-page obj)))
- (update-id-list (update-id obj)))
- (ps*
- `(dojo.connect (dojo.by-id ,id)
- "onclick"
- (lambda (e) (progn
- (e.prevent-default)
- (dojo.xhr-post (create :url ,page-url
- :load (lambda (data) (claw.update-and-eval data))
- :error (lambda (data) (console.error data))
- :timeout 2000
- :handle-as "json"
- :content (create :json (array ,update-id-list)
- ,*rewind-parameter* ,id)))))))))
Modified: trunk/main/dojo/src/misc.lisp
==============================================================================
--- trunk/main/dojo/src/misc.lisp (original)
+++ trunk/main/dojo/src/misc.lisp Thu Jul 17 09:18:59 2008
@@ -41,3 +41,4 @@
(register-library-resource "dojotoolkit/claw/Rounded.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Rounded" :type "js"))
(register-library-resource "dojotoolkit/claw/Form.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Form" :type "js"))
(register-library-resource "dojotoolkit/claw/Editor.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Editor" :type "js"))
+(register-library-resource "dojotoolkit/claw/ActionLink.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "ActionLink" :type "js"))
More information about the Claw-cvs
mailing list