metamaps--metamaps/app/views/maps/create.js.erb

23 lines
789 B
Plaintext

/*
* @file
* Javascript run on creation of a new map
*/
$('#map_name').val('');
$('#map_desc').val('');
$('#map_permission').val('commons');
$('#map_topicsToMap').val('0');
var tempForm = $('#new_map').html();
if (mapid == null) {
$('#new_map').html("Success! Do you want to <br> <a href='/maps/" + '<%= @map.id %>' + "'>Go to your new map?</a><br>or<br><a href='javascript:closeIt(); event.preventDefault();'>Stay on the Console?</a>");
}
else if (mapid != null) {
$('#new_map').html("Success! Do you want to <br> <a href='/maps/" + '<%= @map.id %>' + "'>Go to your new map?</a><br>or<br><a href='javascript:closeIt(); event.preventDefault();'>Stay on this map?</a>");
}
function closeIt() {
$('#new_map').fadeOut('fast', function(){
$('#new_map').html(tempForm);
});
}