From 38f4c55ed6e32d862f32c88663726097c53ac4cd Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Mon, 29 Mar 2010 04:50:22 +0900 Subject: [PATCH] (www-edit-display-feature-input-box): Add new optional argument `value'. (www-edit-display-feature-desc): - Use `www-edit-display-feature-input-box' instead of `www-edit-display-input-box'. - Display `value-format'. --- cwiki-edit.el | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/cwiki-edit.el b/cwiki-edit.el index f58bd94..9bcda3b 100644 --- a/cwiki-edit.el +++ b/cwiki-edit.el @@ -54,9 +54,11 @@ size=\"30\" maxlength=\"30\" value=\"%s\"> )))) (defun www-edit-display-feature-input-box (char feature-name - &optional format) + &optional format value) (unless format (setq format 'default)) + (unless value + (setq value (www-char-feature char feature-name))) (princ (format "

" @@ -75,12 +77,11 @@ size=\"64\" maxlength=\"256\" value=\"%s\"> (cond ;; ((eq c ?<) "&lt;") ;; ((eq c ?>) "&gt;") - ((eq c ?") """) + ((eq c ?\u0022) """) (t (char-to-string c)))) (www-format-value char feature-name - (www-char-feature char feature-name) - format 'without-tags) + value format 'without-tags) ""))) ) @@ -176,10 +177,13 @@ size=\"30\" maxlength=\"30\" value=\"%s\">に限\u5B9Aしない) 'utf-8-mcs-er)) (princ "

") (if (eq property-name 'name) - (www-edit-display-input-box - feature-name - property-name - (or (www-format-feature-name* feature-name) "")) + ;; (www-edit-display-input-box + ;; feature-name + ;; property-name + ;; (or (www-format-feature-name* feature-name) "")) + (www-edit-display-feature-input-box + feature-name property-name + 'string (or (www-format-feature-name* feature-name) "")) (www-html-display-paragraph (format "name : %s [[[edit|edit.cgi?feature=%s&property=name]]]" (or (www-format-feature-name* feature-name) "") @@ -189,10 +193,13 @@ size=\"30\" maxlength=\"30\" value=\"%s\">に限\u5B9Aしない) (when lang (setq name@lang (intern (format "name@%s" lang))) (if (eq property-name name@lang) - (www-edit-display-input-box - feature-name - name@lang - (or (char-feature-property feature-name name@lang) "")) + ;; (www-edit-display-input-box + ;; feature-name + ;; name@lang + ;; (or (char-feature-property feature-name name@lang) "")) + (www-edit-display-feature-input-box + feature-name name@lang + 'string (or (char-feature-property feature-name name@lang) "")) (www-html-display-paragraph (format "%s : %s [[[edit|edit.cgi?feature=%s&property=%s]]]" name@lang @@ -204,6 +211,20 @@ size=\"30\" maxlength=\"30\" value=\"%s\">に限\u5B9Aしない) (or (www-feature-type feature-name) ;; (char-feature-property feature-name 'type) 'generic))) + (if (eq property-name 'value-format) + (www-edit-display-feature-input-box + feature-name property-name + 'default ; 'wiki-text + (or (www-feature-value-format feature-name) + 'default)) + (www-html-display-paragraph + (format "value-format : %s [[[edit|edit.cgi?feature=%s&property=name]]]" + (www-xml-format-list + (or (www-feature-value-format feature-name) + 'default)) + ;; (char-feature-property feature-name 'name) + uri-feature-name ; (www-uri-encode-feature-name feature-name) + ))) (www-html-display-paragraph (format "description : %s" (or (char-feature-property feature-name 'description) -- 1.7.10.4