Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (6 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 16: | Rivi 16: | ||
function <!--{$id|default:Formfixer|escape:'html'}-->_func() { | function <!--{$id|default:Formfixer|escape:'html'}-->_func() { | ||
var sub = '<!--{$sub|default:X|escape:'urlpathinfo'}-->'; | |||
var base = '<!--{$base|default:X|escape:'urlpathinfo'}-->'; | |||
if (sub != 'X') { jQuery('.jwName').first().val(decodeURIComponent(sub)); } | |||
if (base != 'X') { jQuery('input.jwParent').first().val(decodeURIComponent(base)); } | |||
var coords = jQuery('.jwCoords').first().val(); | |||
var coordsArr = coords.split(','); | |||
var lon = parseFloat( coordsArr[1] ); | |||
var lat = parseFloat( coordsArr[0] ); | |||
if (!jQuery('.jwLat').first().val()) { jQuery('.jwLat').first().val(lat); } | |||
if (!jQuery('.jwLon').first().val()) { jQuery('.jwLon').first().val(lon); } | |||
if (!jQuery('.jwWKT').first().val()) { | |||
jQuery('.jwWKT').first().val('GEOMETRYCOLLECTION(POINT(' + lon + ' ' + lat + '))'); | |||
} | |||
if (!jQuery('.jwZoom').first().val()) { | |||
jQuery('.jwZoom').first().val('13'); | |||
} | |||
jQuery( '.jwImageSelect_focalpointX, .jwImageSelect_focalpointY' ).each( function() { | |||
const me = jQuery( this ); | |||
if ( !me.val() ) { me.val( '50' ); } | |||
}); | |||
} | } | ||
} | } | ||
</script></includeonly> | </script></includeonly> | ||


