[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH] Taking into accout sam`'s remarks :
From: |
Pierre Mauduit |
Subject: |
[Maposmatic-dev] [PATCH] Taking into accout sam`'s remarks : |
Date: |
Mon, 21 Dec 2009 19:12:07 +0100 |
From: Pierre Mauduit <address@hidden>
- give a title param to little yellow panes to mention
why the place is not available
- toggle disable / enable "generate" button : remove the
"link" mouse pointer when unavailable and give an
explanation on why the form could not be submitted
at the moment.
---
www/media/style.css | 9 +++++++++
www/templates/maposmatic/index.html | 21 ++++++++++++---------
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/www/media/style.css b/www/media/style.css
index 987ae18..1d7419c 100644
--- a/www/media/style.css
+++ b/www/media/style.css
@@ -192,6 +192,15 @@ table#mapform td.image
padding-right: 3em;
vertical-align: middle;
}
+#mapform input[type=image].btn-enabled:hover
+{
+ cursor: auto;
+}
+
+#mapform input[type=image].btn-disabled:hover
+{
+ cursor: default;
+}
ul.errorlist
{
diff --git a/www/templates/maposmatic/index.html
b/www/templates/maposmatic/index.html
index f6c39a8..f1e4d60 100644
--- a/www/templates/maposmatic/index.html
+++ b/www/templates/maposmatic/index.html
@@ -73,10 +73,10 @@ function pageinit()
else
area_selection_mode_switch('admin-mode');
-
$('#id_administrative_city').attr('onchange','javascript:reset_osmid_field()');
$('#id_administrative_city').keypress(function (e)
{
- /* disable autoposting - doing a
search instead */
+ /* disable autoposting (keypress on
return(13))
+ * doing a search instead */
if (e.which == 13)
{
validate_city_search();
@@ -93,22 +93,23 @@ function toggle_form_validation(enableForm)
if (enableForm == "true")
{
$("#id-go-next-btn").removeAttr("disabled");
+ $("#id-go-next-btn").attr("class", "btn-enabled");
+ $("#id-go-next-btn").attr("title", "{% trans "Generate" %}");
$("#id-go-next-btn").attr("src", "/smedia/Go-next.png");
}
else
{
$("#id-go-next-btn").attr("disabled", "true");
+ $("#id-go-next-btn").attr("class", "btn-disabled");
+ $("#id-go-next-btn").attr("title", "{% trans "Please fill in the form
before trying to proceed" %}");
$("#id-go-next-btn").attr("src", "/smedia/Go-next-disabled.png");
}
}
-function dummy_validate()
-{
- alert("blah");
- return false;
-}
function validate_city_search()
{
+
+ toggle_form_validation('false');
$("#result_nominatim_search").empty();
$("#result_nominatim_search").append("<li><img src=\"/smedia/loading.gif\"
alt=\"Loading\" /></li>");
@@ -125,7 +126,8 @@ function validate_city_search()
if (typeof item.ocitysmap_params == "undefined")
{
$("#result_nominatim_search").append("<li><img
src=\"/smedia/icon_alert.png\" "+
- "alt=\"Work In Progress\" /> <label
class=\"place_unavailable\""
+ "alt=\"Work In Progress\" title=\"{% trans "This place could
not be rendered by MapOSMatic, see help to figure out why." %}\" />"+
+ " <label class=\"place_unavailable\""
+ ">" +item.display_name + "</label></li>");
}
else
@@ -224,7 +226,7 @@ maps.{% endblocktrans %}</p>
<td>{% trans "Area selection mode:" %}</td>
<td rowspan="4" class="image">
<input id="id-go-next-btn" type="image"
src="/smedia/Go-next-disabled.png" value="{% trans "Generate" %}"
- title="{% trans "Generate" %}" disabled="true" />
+ title="{% trans "Please fill in the form before trying to
proceed" %}" disabled="true" class="btn-disabled" />
</td>
</tr>
<tr class="field">
@@ -255,6 +257,7 @@ maps.{% endblocktrans %}</p>
</td></tr>
<tr class="byadmin field">
<td colspan="2">
+ {% trans "Did you mean : " %}
<ul id="result_nominatim_search">
</ul>
</td>
--
1.6.5.7
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Maposmatic-dev] [PATCH] Taking into accout sam`'s remarks :,
Pierre Mauduit <=