[claw-cvs] r123 - trunk/main/claw-html.dojo/src
Andrea Chiumenti
achiumenti at common-lisp.net
Tue Oct 21 13:03:31 UTC 2008
Author: achiumenti
Date: Tue Oct 21 13:03:31 2008
New Revision: 123
Log:
several bugfixes and enhancements
Added:
trunk/main/claw-html.dojo/src/djdnd.lisp
trunk/main/claw-html.dojo/src/djxpassword.lisp
Modified:
trunk/main/claw-html.dojo/src/djwidget.lisp
trunk/main/claw-html.dojo/src/misc.lisp
trunk/main/claw-html.dojo/src/packages.lisp
Added: trunk/main/claw-html.dojo/src/djdnd.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djdnd.lisp Tue Oct 21 13:03:31 2008
@@ -0,0 +1,88 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djdnd.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti. All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;; * Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+
+;;; * Redistributions in binary form must reproduce the above
+;;; copyright notice, this list of conditions and the following
+;;; disclaimer in the documentation and/or other materials
+;;; provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djdnd-avatar (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.Avatar")
+ (:documentation "Teansform an element into a dnd avatar"))
+
+(defclass djdnd-container (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.Container")
+ (:documentation "Teansform an element into a dnd container"))
+
+(defclass djdnd-moveable (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.Moveable")
+ (:documentation "Teansform an element into a dnd moveable"))
+
+(defclass djdnd-mover (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.Mover")
+ (:documentation "Teansform an element into a dnd mover"))
+
+(defclass djdnd-source (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.Source")
+ (:documentation "Teansform an element into a dnd source container"))
+
+(defclass djdnd-timed-moveable (djwidget)
+ ()
+ (:metaclass metacomponent)
+ (:default-initargs :dojo-type "claw.dnd.TimedMoveable")
+ (:documentation "Teansform an element into a dnd timed moveable"))
+
+(defclass djdnd-item (wcomponent)
+ ((tag-name :initarg :tag-name
+ :reader djwidget-tag-name
+ :documentation "The HTML tag element that will be rendered")
+ (css-class :initarg :class
+ :reader css-class
+ :documentation "The html CLASS attribute"))
+ (:default-initargs :tag-name "div" :class nil)
+ (:metaclass metacomponent))
+
+(defmethod wcomponent-template ((obj djdnd-item))
+ (let ((tag-name (djwidget-tag-name obj)))
+ (when tag-name
+ (let ((parameters (list :static-id (htcomponent-client-id obj) :class (format nil "dojoDndItem~@[ ~a~]" (css-class obj)))))
+ (build-tagf tag-name
+ 'tag
+ (not (null (find tag-name *empty-tags*)))
+ (list
+ parameters
+ (wcomponent-informal-parameters obj)
+ (htcomponent-body obj)))))))
Modified: trunk/main/claw-html.dojo/src/djwidget.lisp
==============================================================================
--- trunk/main/claw-html.dojo/src/djwidget.lisp (original)
+++ trunk/main/claw-html.dojo/src/djwidget.lisp Tue Oct 21 13:03:31 2008
@@ -80,30 +80,3 @@
(wcomponent-informal-parameters obj)
(htcomponent-body obj)))))))
-(defclass djdnd-source (djwidget)
- ()
- (:metaclass metacomponent)
- (:default-initargs :dojo-type "dojo.dnd.Source")
- (:documentation "Teansform an element into a dnd source container"))
-
-(defclass djdnd-item (wcomponent)
- ((tag-name :initarg :tag-name
- :reader djwidget-tag-name
- :documentation "The HTML tag element that will be rendered")
- (css-class :initarg :class
- :reader css-class
- :documentation "The html CLASS attribute"))
- (:default-initargs :tag-name "div" :class nil)
- (:metaclass metacomponent))
-
-(defmethod wcomponent-template ((obj djdnd-item))
- (let ((tag-name (djwidget-tag-name obj)))
- (when tag-name
- (let ((parameters (list :static-id (htcomponent-client-id obj) :class (format nil "dojoDndItem~@[ ~a~]" (css-class obj)))))
- (build-tagf tag-name
- 'tag
- (not (null (find tag-name *empty-tags*)))
- (list
- parameters
- (wcomponent-informal-parameters obj)
- (htcomponent-body obj)))))))
\ No newline at end of file
Added: trunk/main/claw-html.dojo/src/djxpassword.lisp
==============================================================================
--- (empty file)
+++ trunk/main/claw-html.dojo/src/djxpassword.lisp Tue Oct 21 13:03:31 2008
@@ -0,0 +1,87 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: dojo/src/djxpassword.lisp $
+
+;;; Copyright (c) 2008, Andrea Chiumenti. All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;; * Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+
+;;; * Redistributions in binary form must reproduce the above
+;;; copyright notice, this list of conditions and the following
+;;; disclaimer in the documentation and/or other materials
+;;; provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :dojo)
+
+(defclass djxpassword-validator (cinput djwidget)
+ ((required :initarg :required
+ :reader djxpassword-validator-required))
+ (:documentation "CLAW implementation of dojox.form.PasswordValidator")
+ (:default-initargs :dojo-type "dojox.form.PasswordValidator" :required t)
+ (:metaclass metacomponent))
+
+(defmethod wcomponent-after-rewind :after ((obj djxpassword-validator) (p page))
+ (claw:log-message :info "PPPPPPPPPP> ~a ::: ~a"
+ (translated-value obj)
+ (multiple-value-list (claw-html::component-id-and-value obj)))
+ )
+
+(defmethod wcomponent-template ((obj djxpassword-validator))
+ (let ((required (djxpassword-validator-required obj)))
+ (div> :static-id (htcomponent-client-id obj)
+ :name (name-attr obj)
+ :dojo-type (djwidget-dojo-type obj)
+ :required (unless required
+ "false")
+ (wcomponent-informal-parameters obj)
+ (htcomponent-body obj))))
+
+(defclass djxpassword-validator-input-mixin (wcomponent)
+ ((pw-type :initarg :pw-type
+ :reader djxpassword-validator-input-mixin-pw-type))
+ (:documentation "CLAW implementation of dojox.form.PasswordValidator mixin password input box")
+ (:default-initargs :reserved-parameters (list :type :name :value :pw-type))
+ (:metaclass metacomponent))
+
+(defmethod wcomponent-template ((obj djxpassword-validator-input-mixin))
+ (input> :static-id (htcomponent-client-id obj)
+ :type "password"
+ :pw-type (djxpassword-validator-input-mixin-pw-type obj)
+ (wcomponent-informal-parameters obj)))
+
+
+(defclass djxpassword-old (djxpassword-validator-input-mixin)
+ ()
+ (:documentation "CLAW implementation of dojox.form.PasswordValidator old password input box")
+ (:default-initargs :pw-type "old")
+ (:metaclass metacomponent))
+
+(defclass djxpassword-new (djxpassword-validator-input-mixin)
+ ()
+ (:documentation "CLAW implementation of dojox.form.PasswordValidator new password input box")
+ (:default-initargs :pw-type "new")
+ (:metaclass metacomponent))
+
+(defclass djxpassword-verify (djxpassword-validator-input-mixin)
+ ()
+ (:documentation "CLAW implementation of dojox.form.PasswordValidator verify password input box")
+ (:default-initargs :pw-type "verify")
+ (:metaclass metacomponent))
+
+
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 Tue Oct 21 13:03:31 2008
@@ -36,6 +36,7 @@
(substitute #\- #\_ (string-downcase (user-locale))))
(register-library-resource "dojotoolkit/" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("dojotoolkit"))))
+(register-library-resource "dojotoolkit/claw.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "claw" :type "js"))
(register-library-resource "dojotoolkit/claw/HardLink.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "HardLink" :type "js"))
(register-library-resource "dojotoolkit/claw/FloatingContent.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "FloatingContent" :type "js"))
(register-library-resource "dojotoolkit/claw/Rounded.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js")) :name "Rounded" :type "js"))
@@ -44,3 +45,12 @@
(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"))
+
+(register-library-resource "dojotoolkit/claw/dnd/common.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "common" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Avatar.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Avatar" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Container.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Container" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Moveable.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Moveable" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Mover.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Mover" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Selector.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Selector" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/Source.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "Source" :type "js"))
+(register-library-resource "dojotoolkit/claw/dnd/TimedMoveable.js" (make-pathname :directory (append (pathname-directory *dojo-misc-file*) '("js" "dnd")) :name "TimedMoveable" :type "js"))
Modified: trunk/main/claw-html.dojo/src/packages.lisp
==============================================================================
--- trunk/main/claw-html.dojo/src/packages.lisp (original)
+++ trunk/main/claw-html.dojo/src/packages.lisp Tue Oct 21 13:03:31 2008
@@ -38,8 +38,18 @@
:djwidget-dojo-require
:djwidget
:djwidget>
+ #:djdnd-avatar
+ #:djdnd-avatar>
+ #:djdnd-container
+ #:djdnd-container>
+ #:djdnd-moveable
+ #:djdnd-moveable>
+ #:djdnd-mover
+ #:djdnd-mover>
#:djdnd-source
#:djdnd-source>
+ #:djdnd-timed-moveable
+ #:djdnd-timed-moveable>
#:djdnd-item
#:djdnd-item>
:djwidget-formal-parameters
@@ -186,4 +196,12 @@
:djhard-link
:djhard-link>
:djrounded
- :djrounded>))
+ :djrounded>
+ #:djxpassword-validator
+ #:djxpassword-validator>
+ #:djxpassword-old
+ #:djxpassword-old>
+ #:djxpassword-new
+ #:djxpassword-new>
+ #:djxpassword-verify
+ #:djxpassword-verify>))
More information about the Claw-cvs
mailing list