[pLog-svn] r4637 - plog/trunk/class/template/smarty/plugins
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Jan 30 18:12:49 EST 2007
Author: oscar
Date: 2007-01-30 18:12:49 -0500 (Tue, 30 Jan 2007)
New Revision: 4637
Modified:
plog/trunk/class/template/smarty/plugins/function.location_chooser.php
Log:
another small improvement
Modified: plog/trunk/class/template/smarty/plugins/function.location_chooser.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.location_chooser.php 2007-01-30 23:05:30 UTC (rev 4636)
+++ plog/trunk/class/template/smarty/plugins/function.location_chooser.php 2007-01-30 23:12:49 UTC (rev 4637)
@@ -34,7 +34,7 @@
// whether to use the location display icon next to the drop-down list
isset( $params["showDisplayLink"]) ? $showDisplayLink = true : $showDisplayLink = false;
- $code = "<select name=\"locationId\" id=\"locationId\" onChange=\"if(this.options[this.selectedIndex].value == -1) window.open('?op=locationChooser','Location Chooser','scrollbars=no,resizable=no,toolbar=no,height=530,width=590');\">";
+ $code = "<select name=\"locationId\" id=\"locationId\" onChange=\"if(this.options[this.selectedIndex].value == 0) window.open('?op=locationChooser','Location Chooser','scrollbars=no,resizable=no,toolbar=no,height=530,width=590');\">";
foreach( $locs as $loc ) {
$code .= "<option value=\"".$loc->getLatitude().",".$loc->getLongitude()."\"";
if( $default ) {
@@ -46,8 +46,11 @@
$code .= "(".$loc->getLatitude().",".$loc->getLongitude().")";
$code .= "</option>";
}
- $code .= "<option value=\"0\">-- Select --</option>";
- $code .= "<option value=\"-1\">$addNewString</option>";
+
+ if( count( $locs ) == 0 )
+ $code .= "<option value=\"0\">-- Select --</option>";
+
+ $code .= "<option value=\"0\">$addNewString</option>";
$code .= " </select>";
if( $showDisplayLink ) {
More information about the pLog-svn
mailing list