Mercurial > urweb
changeset 1835:a8b273f1f7e3
add Placeholder attribute to <password>; change <textbox> code generation to set 'type' to 'text'
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 30 Nov 2012 10:02:13 -0500 |
parents | 690638bd9fef |
children | 276fa06428ba |
files | lib/js/urweb.js lib/ur/basis.urs src/monoize.sml |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/js/urweb.js Fri Nov 30 09:50:00 2012 -0500 +++ b/lib/js/urweb.js Fri Nov 30 10:02:13 2012 -0500 @@ -1004,7 +1004,7 @@ return; var x = input(document.createElement("input"), s, - function(x) { return function(v) { if (x.value != v) x.value = v; }; }, null, name); + function(x) { return function(v) { if (x.value != v) x.value = v; }; }, "text", name); x.value = s.data; x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) };
--- a/lib/ur/basis.urs Fri Nov 30 09:50:00 2012 -0500 +++ b/lib/ur/basis.urs Fri Nov 30 10:02:13 2012 -0500 @@ -883,7 +883,7 @@ val hidden : formTag string [] [Id = string, Value = string] val textbox : formTag string [] ([Value = string, Size = int, Placeholder = string, Source = source string, Onchange = transaction unit, Ontext = transaction unit] ++ boxAttrs) -val password : formTag string [] ([Value = string, Size = int] ++ boxAttrs) +val password : formTag string [] ([Value = string, Size = int, Placeholder = string] ++ boxAttrs) val textarea : formTag string [] ([Rows = int, Cols = int, Onchange = transaction unit, Ontext = transaction unit] ++ boxAttrs)
--- a/src/monoize.sml Fri Nov 30 09:50:00 2012 -0500 +++ b/src/monoize.sml Fri Nov 30 10:02:13 2012 -0500 @@ -3602,7 +3602,7 @@ val (ts, fm) = tagStart "input" in ((L'.EStrcat (ts, - (L'.EPrim (Prim.String (" name=\"" ^ name ^ "\" />")), + (L'.EPrim (Prim.String (" type=\"text\" name=\"" ^ name ^ "\" />")), loc)), loc), fm) end | SOME (_, src, _) => @@ -3674,7 +3674,7 @@ val (ts, fm) = tagStart "input" in ((L'.EStrcat (ts, - (L'.EPrim (Prim.String " />"), loc)), + (L'.EPrim (Prim.String " type=\"text\" />"), loc)), loc), fm) end | SOME (_, src, _) =>