OSDN Git Service

input@istyle for XHTML(ez,y!)
authorcoltware@gmail.com <coltware@gmail.com>
Tue, 10 Nov 2009 17:15:24 +0000 (17:15 +0000)
committerAtsushi Konno <atkonn@gmail.com>
Thu, 10 Dec 2009 03:28:38 +0000 (12:28 +0900)
src/chxj_jxhtml.c [changed mode: 0644->0755]
src/chxj_xhtml_mobile_1_0.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index e5bc7fa..f4dc3b5
@@ -1947,29 +1947,9 @@ s_jxhtml_start_input_tag(void *pdoc, Node *node)
     W_L("\"");
   }
   if (attr_istyle && (*attr_istyle == '1' || *attr_istyle == '2' || *attr_istyle == '3' || *attr_istyle == '4')) {
-    /*------------------------------------------------------------------------*/
-    /* CHTML 2.0                                                              */
-    /*------------------------------------------------------------------------*/
-    if (attr_type && STRCASEEQ('p','P',"password", attr_type) && ! jxhtml->entryp->pc_flag ) {
-      char *vv = qs_conv_istyle_to_format(doc->buf.pool, "4");
-      W_L(" style=\"-wap-input-format:&quot;*");
-      W_V(vv);
-      W_L("&quot;;\"");
-    }
-    else {
-      char *vv = qs_conv_istyle_to_format(doc->buf.pool, attr_istyle);
-      W_L(" style=\"");
-      W_L("-wap-input-format:&quot;*");
-      W_V(vv);
-      W_L("&quot;;");
-      W_L("\"");
-    }
-  }
-  else if (attr_type && STRCASEEQ('p','P',"password",attr_type)) {
-    char *vv = qs_conv_istyle_to_format(doc->buf.pool, "4");
-    W_L(" style=\"-wap-input-format:&quot;*");
-    W_V(vv);
-    W_L("&quot;;\"");
+    W_L(" istyle=\"");
+    W_V(attr_istyle);
+    W_L("\"");
   }
   /*--------------------------------------------------------------------------*/
   /* The figure is default for the password.                                  */
old mode 100644 (file)
new mode 100755 (executable)
index 06bfdb7..01aebf0
@@ -1838,37 +1838,15 @@ s_xhtml_1_0_start_input_tag(void *pdoc, Node *node)
     W_L("\"");
   }
   if (attr_istyle && *attr_istyle && (*attr_istyle == '1' || *attr_istyle == '2' || *attr_istyle == '3' || *attr_istyle == '4')) {
-    char *fmt = qs_conv_istyle_to_format(r->pool,attr_istyle);
-    if (attr_max_length && *attr_max_length) {
-      int ii;
-      for (ii=0; (unsigned int)ii<strlen(attr_max_length); ii++) {
-        if (attr_max_length[ii] < '0' || attr_max_length[ii] > '9') {
-          attr_max_length = apr_psprintf(r->pool, "0");
-          break;
-        }
-      }
-
-      if (strcmp(attr_max_length, "0")) {
-        char *vv = apr_psprintf(r->pool, " FORMAT=\"%d%s\"", atoi(attr_max_length), fmt);
-        W_V(vv);
-      }
-    }
-    else {
-      W_L(" FORMAT=\"");
-      W_L("*");
-      W_V(fmt);
-      W_L("\"");
-    }
+    W_L(" istyle=\"");
+    W_V(attr_istyle);
+    W_L("\"");
   }
-  else {
-    if (attr_max_length && *attr_max_length) {
-      if (chxj_chk_numeric(attr_max_length) != 0) {
-        attr_max_length = apr_psprintf(r->pool, "0");
-      }
-      if (strcmp(attr_max_length, "0")) {
-        char *vv = apr_psprintf(r->pool, " FORMAT=\"%dm\"", atoi(attr_max_length));
-        W_V(vv);
-      }
+  if (attr_max_length && *attr_max_length) {
+    if (chxj_chk_numeric(attr_max_length) == 0) {
+      W_L(" maxlength=\"");
+      W_V(attr_max_length);
+      W_L("\"");
     }
   }
   /*--------------------------------------------------------------------------*/