From 70d72e5f28f85b789026eec5438cd02946876137 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Fri, 11 Jun 2010 23:14:30 +0200 Subject: [PATCH 1/9] handle empty email field onBlur event correctly --- .../templates/showformscript.mako | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/ddportfolioservice/templates/showformscript.mako b/ddportfolioservice/templates/showformscript.mako index 93a85bc..84202c3 100644 --- a/ddportfolioservice/templates/showformscript.mako +++ b/ddportfolioservice/templates/showformscript.mako @@ -65,16 +65,22 @@ function updateFields(data, textStatus) { } } +function onChangeShowAll(event) { + alert(event); +} + function onBlurEmail() { - $.ajax({ - 'url' : '${h.url_for(action='fetchdddata')}', - 'data' : {'email' : $('#email').attr('value')}, - 'dataType' : 'json', - 'success' : updateFields, - 'error' : function(request, textStatus, errorThrown) { - $('#email').focus(); - } - }); + if ($.trim($('#email').attr('value')).length > 0) { + $.ajax({ + 'url' : '${h.url_for(action='fetchdddata')}', + 'data' : {'email' : $('#email').attr('value')}, + 'dataType' : 'json', + 'success' : updateFields, + 'error' : function(request, textStatus, errorThrown) { + $('#email').focus(); + } + }); + } } $(document).ready(function() { From d3fe053dd31c229ddec27d6a5d79ed6428eb4578 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Fri, 11 Jun 2010 23:35:32 +0200 Subject: [PATCH 2/9] enable GPG fingerprint entry with disabled ECMAScript --- ddportfolioservice/templates/showform.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddportfolioservice/templates/showform.mako b/ddportfolioservice/templates/showform.mako index 0458394..3ffbb36 100644 --- a/ddportfolioservice/templates/showform.mako +++ b/ddportfolioservice/templates/showform.mako @@ -56,7 +56,7 @@ ${h.form(h.url_for(action='urllist'), method='get')} ${h.text('name', h.escape(request.params.get('name', None)), id='name')}
-