Some changes on the administration area

This commit is contained in:
Xavier Balderas 2011-08-22 10:20:44 +02:00
parent b1cd5255be
commit ef6482473d
5 changed files with 77 additions and 21 deletions

View File

@ -172,7 +172,7 @@ jQuery(document).ready(function($) {
// Validate number of uploaded files // Validate number of uploaded files
if (uploader.total.uploaded == 0) { if (uploader.total.uploaded == 0) {
// Files in queue upload them first // Files in queue upload them first
if (uploader.files.length > 0) { if (uploader.files.length >= 0) {
// When all files are uploaded submit form // When all files are uploaded submit form
uploader.bind('UploadProgress', function() { uploader.bind('UploadProgress', function() {
if (uploader.total.uploaded == uploader.files.length) if (uploader.total.uploaded == uploader.files.length)
@ -180,10 +180,12 @@ jQuery(document).ready(function($) {
}); });
uploader.start(); uploader.start();
} else } else {
// alert('You must at least upload one file.'); // alert('You must at least upload one file.');
e.preventDefault(); }
} }
}); });

View File

@ -31,6 +31,7 @@ jQuery(document).ready(function($) {
}; };
$.post(WP_Params.ajaxurl, data, function(response) { $.post(WP_Params.ajaxurl, data, function(response) {
result = $.parseJSON(response); result = $.parseJSON(response);
if (result){
$.each( result, function(i, m) { $.each( result, function(i, m) {
$('.map_canvas').gmap('addMarker', { 'position': new google.maps.LatLng(m.lat, m.lng) }).data('postid', m.id).click(function(){ $('.map_canvas').gmap('addMarker', { 'position': new google.maps.LatLng(m.lat, m.lng) }).data('postid', m.id).click(function(){
id=$(this).data('postid'); id=$(this).data('postid');
@ -49,6 +50,10 @@ jQuery(document).ready(function($) {
}); });
}) })
}); });
}
}); });
} }
}); });

View File

@ -35,14 +35,14 @@ function soundmap_init() {
'name' => __('Marks', 'soundmap'), 'name' => __('Marks', 'soundmap'),
'singular_name' => __('Mark', 'soundmap'), 'singular_name' => __('Mark', 'soundmap'),
'add_new' => _x('Add New', 'marker', 'soundmap'), 'add_new' => _x('Add New', 'marker', 'soundmap'),
'add_new_item' => __('Add New Marker'), 'add_new_item' => __('Add New Marker', 'soundmap'),
'edit_item' => __('Edit Marker'), 'edit_item' => __('Edit Marker', 'soundmap'),
'new_item' => __('New Marker'), 'new_item' => __('New Marker', 'soundmap'),
'all_items' => __('All Markers'), 'all_items' => __('All Markers', 'soundmap'),
'view_item' => __('View Marker'), 'view_item' => __('View Marker', 'soundmap'),
'search_items' => __('Search Markers'), 'search_items' => __('Search Markers', 'soundmap'),
'not_found' => __('No markers found'), 'not_found' => __('No markers found', 'soundmap'),
'not_found_in_trash' => __('No markers found in Trash'), 'not_found_in_trash' => __('No markers found in Trash', 'soundmap'),
'parent_item_colon' => '', 'parent_item_colon' => '',
'menu_name' => 'Markers' 'menu_name' => 'Markers'
); );

View File

@ -1,3 +1,50 @@
#map-page{width:100%; height:100%; position:absolute; top:0; left:0;}
#map{width:100%; height:100%;} #map-page{
position:absolute;
top:0;
left:0;
background-color: white;
width: 100%;
height: 100%;
min-width: 1200px;
}
#map{
height:100%;
width: 100%;
}
.map_canvas{width:100%; height:100%;} .map_canvas{width:100%; height:100%;}
#left{
height: 100%;
width: 75%;
position: relative;
float: left;
z-index: 100;
}
#right{
width: 25%;
height: 100%;
background: white url(img/shadow.png) repeat-y left;
overflow-y: auto;
float: right;
z-index: -1;
min-width: 300px;
}
#map-content{
padding: 20px 10px;
}
.logo{
text-align: center;
height: 50px;
padding-top: 20px;
}
.marker-window{
width:300px;
}

View File

@ -3,20 +3,22 @@
?> ?>
<div class="<?php post_class('', $marker_id) ?>"> <div <?php post_class('marker-window', $marker_id) ?>>
<div class="post-title"> <div class="post-title"><h3><?php echo get_the_title($marker_id); ?></h3></div>
<?php echo get_the_title($marker_id); ?>
</div>
<div class="post-content"> <div class="post-content">
<?php echo apply_filters('the_content',get_the_content()) ?> <?php echo apply_filters('the_content',get_the_content()) ?>
<hr> <hr>
<p><?php echo __('Author', 'soundmap') . ': ' . $info['m_author']; ?></p> <p class="marker-info"><?php echo __('Author', 'soundmap') . ': ' . $info['m_author']; ?></br>
<p><?php echo __('Date', 'soundmap') . ': ' . $info['m_date']; ?></p> <?php echo __('Date', 'soundmap') . ': ' . $info['m_date']; ?></p>
<hr> <hr>
<?php <?php
add_player_interface($info['m_files'], $marker_id); add_player_interface($info['m_files'], $marker_id);
?> ?>
<hr class="clear"> <hr class="clear">
<div class="marker-info">
<?php the_tags(__('Tags','soundmap') . ': ', ' | ', '</br>'); ?>
<?php echo __('Categories','soundmap') . ': '; the_category(' | '); ?>
</div>
</div> </div>
</div> </div>