We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 54c3efb7 authored by tobyink's avatar tobyink

minor usability fixes

parent ba319aea
......@@ -6,4 +6,5 @@ RewriteRule ^artist/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&track=$2 [B,
RewriteRule ^artist/([^/]+)/album/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&album=$2&track=$3 [B,NC]
RewriteRule ^artist/([^/]+)/album/([^/]+)/?$ album.php?artist=$1&album=$2 [B,NC]
RewriteRule ^artist/([^/]+)/?$ artist.php?artist=$1 [B,NC]
RewriteRule ^country/([^/]+)/?$ location.php?country=$1 [B,NC]
RewriteRule ^logout login.php?action=logout [B,NC]
......@@ -26,6 +26,14 @@ function unrecognised ( msg )
return 0;
}
function UpdateLocationLabel ()
{
if ($('#location_uri')[0].value)
{
$('#location_uri_label').text($('#location_uri')[0].value);
}
}
function LocationCheck ()
{
if ( !$('#location').val() )
......@@ -97,9 +105,7 @@ function LocationCheck ()
$('#location_uri')[0].value = geoname;
$('#chooser_list').empty();
$('#chooser_list').hide();
$('#location_uri_label').text(
$(tg).closest('li').attr('data-geoname-name')
+ ' [' + $(tg).closest('li').attr('data-geoname-coords') + ']' );
UpdateLocationLabel();
$('#location_uri_label').addClass('ok');
$('#location_uri_label').removeClass('no');
}
......@@ -168,3 +174,5 @@ function webidLookup ()
"webid-finder",
"status=1,resizable=1,scrollbars=1,width=600,height=500");
}
UpdateLocationLabel();
......@@ -4,8 +4,6 @@
<p><strong>The form below is still <em>very</em> experimental. Using this may wreck your account!</strong></p>
<script type="text/javascript" src="{$base_url}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{$base_url}/js/edit_profile.js"></script>
<form action="{$base_url}/edit_profile.php" method="post" class="notcrazy">
<table>
<tr>
......@@ -14,14 +12,15 @@
<td>&nbsp;</td>
</tr>
<tr>
<th align="right" valign="top" rowspan="2"><label for="location">Location:</label></th>
<th align="right" valign="top"><label for="location">Location:</label></th>
<td><input name="location" id="location" value="{$location|escape:'html':'UTF-8'}" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<th align="right" valign="top"><label for="location_uri">Geoname:</label></th>
<td id="chooser">
<input type="hidden" name="location_uri" id="location_uri" value="{$location_uri|escape:'html':'UTF-8'}" />
<input type="button" value="Check ..." onclick="LocationCheck();" />
<input type="button" value="Find ..." onclick="LocationCheck();" />
<span id="location_uri_label"></span>
</td>
<td><a href="#dfn_location_uri" rel="glossary">What's this?</a></td>
......@@ -67,6 +66,9 @@
</table>
</form>
<script type="text/javascript" src="{$base_url}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{$base_url}/js/edit_profile.js"></script>
<h3>Help</h3>
<dl>
<dt id="dfn_location_uri">Location check</dt>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment