Author: achiumenti Date: Thu Sep 18 09:30:33 2008 New Revision: 91
Modified: trunk/main/claw-html.dojo/src/djbutton.lisp trunk/main/claw-html.dojo/src/djform.lisp trunk/main/claw-html.dojo/src/misc.lisp Log: several bugfixes
Modified: trunk/main/claw-html.dojo/src/djbutton.lisp ============================================================================== --- trunk/main/claw-html.dojo/src/djbutton.lisp (original) +++ trunk/main/claw-html.dojo/src/djbutton.lisp Thu Sep 18 09:30:33 2008 @@ -33,7 +33,7 @@ () (:metaclass metacomponent) (:documentation "Class for dojo dijit.form.Button component. More info at http://api.dojotoolkit.org/") - (:default-initargs :dojo-type "dijit.form.Button" :tag-name "button")) + (:default-initargs :dojo-type "claw.Button" :tag-name "button"))
(defclass djdrop-down-button (djwidget) () @@ -65,12 +65,16 @@
(defmethod wcomponent-template ((obj djsubmit-button)) (let* ((id (htcomponent-client-id obj)) - (value (csubmit-value obj))) + (value (csubmit-value obj)) + (form (page-current-form *claw-current-page*))) (djbutton> :static-id id + :form-id (when form (htcomponent-client-id form)) + :name (name-attr obj) :type "submit" :value value + :label value (wcomponent-informal-parameters obj) - (or (htcomponent-body obj) value)))) + #|(or (htcomponent-body obj) value)|#)))
(defmethod wcomponent-before-prerender ((obj djsubmit-button) (page page)) (setf (djsubmit-button-form obj) (page-current-form page)))
Modified: trunk/main/claw-html.dojo/src/djform.lisp ============================================================================== --- trunk/main/claw-html.dojo/src/djform.lisp (original) +++ trunk/main/claw-html.dojo/src/djform.lisp Thu Sep 18 09:30:33 2008 @@ -40,6 +40,7 @@ (:documentation "Class to generate a <form> element that is capable of XHR requests. More info at http://api.dojotoolkit.org/") (:default-initargs :dojo-type "claw.Form" :update-id () :ajax-form-p t))
+ (defmethod wcomponent-template :before ((obj djform)) (let ((dojo-type (djwidget-dojo-type obj)) (update-id (update-id obj))) @@ -166,26 +167,10 @@ (:documentation "This class inherits from a CCHECKBOX, but is used to render a dojo dijit.form.CheckBox") (:default-initargs :dojo-type "dijit.form.CheckBox"))
-(defmethod wcomponent-template ((cinput djcheck-box)) - (let* ((client-id (htcomponent-client-id cinput)) - (dojo-type (djwidget-dojo-type cinput)) - (translator (translator cinput)) - (type (input-type cinput)) - (value (translator-value-type-to-string translator (ccheckbox-value cinput))) - (current-value (translator-type-to-string translator cinput)) - (class (css-class cinput))) - (when (component-validation-errors cinput) - (if (or (null class) (string= class "")) - (setf class "error") - (setf class (format nil "~a error" class)))) - (input> :static-id client-id - :type type - :dojoType dojo-type - :name (name-attr cinput) - :class class - :value value - :checked (when (and current-value (equal value current-value)) "checked") - (wcomponent-informal-parameters cinput)))) +(defmethod wcomponent-template :before ((cinput djcheck-box)) + (setf (wcomponent-informal-parameters cinput) + (append (wcomponent-informal-parameters cinput) + (list :dojo-type (djwidget-dojo-type cinput)))))
(defclass djradio-button (cradio djwidget) ()
Modified: trunk/main/claw-html.dojo/src/misc.lisp ============================================================================== --- trunk/main/claw-html.dojo/src/misc.lisp (original) +++ trunk/main/claw-html.dojo/src/misc.lisp Thu Sep 18 09:30:33 2008 @@ -43,3 +43,4 @@ (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")) (register-library-resource "dojotoolkit/claw/Dialog.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Dialog" :type "js")) +(register-library-resource "dojotoolkit/claw/Button.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Button" :type "js"))