mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 20:30:11 +01:00
fixed a bug in the preview pane
This commit is contained in:
parent
c9b3396e39
commit
40172f56b5
@ -212,10 +212,10 @@ var Piler =
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* load the selected message to preview area
|
* load the selected message by position to preview area
|
||||||
*/
|
*/
|
||||||
|
|
||||||
view_message:function(pos)
|
view_message_by_pos:function(pos)
|
||||||
{
|
{
|
||||||
Piler.log("[view_message]", pos, Piler.Messages[pos]);
|
Piler.log("[view_message]", pos, Piler.Messages[pos]);
|
||||||
|
|
||||||
@ -230,6 +230,13 @@ var Piler =
|
|||||||
$('#e_' + id).attr('class', 'resultrow selected');
|
$('#e_' + id).attr('class', 'resultrow selected');
|
||||||
|
|
||||||
Piler.prev_message_id = id;
|
Piler.prev_message_id = id;
|
||||||
|
Piler.view_message(id);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
view_message:function(id)
|
||||||
|
{
|
||||||
|
Piler.log("[view_message]");
|
||||||
|
|
||||||
jQuery.ajax('/message.php/' + id, { cache: true })
|
jQuery.ajax('/message.php/' + id, { cache: true })
|
||||||
.done( function(a) {
|
.done( function(a) {
|
||||||
@ -381,7 +388,7 @@ var Piler =
|
|||||||
|
|
||||||
if ( x.nodeName == "DIV" && x.id.charAt( 0 ) == 'e' && x.id.charAt( 1 ) == '_' )
|
if ( x.nodeName == "DIV" && x.id.charAt( 0 ) == 'e' && x.id.charAt( 1 ) == '_' )
|
||||||
{
|
{
|
||||||
Piler.log("[fill_current_messages_array], i/id", i, x.id.substring(2, 1000));
|
Piler.log("[fill_current_messages_array], pos/id", i, x.id.substring(2, 1000));
|
||||||
|
|
||||||
u[i] = x.id.substring(2, 1000);
|
u[i] = x.id.substring(2, 1000);
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
<div id="e_<?php print $message['id']; ?>" class="resultrow new<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
|
<div id="e_<?php print $message['id']; ?>" class="resultrow new<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
|
||||||
<div class="resultcell restore"><input type="checkbox" id="r_<?php print $message['id']; ?>" name="r_<?php print $message['id']; ?>" value="iiii" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" /></div>
|
<div class="resultcell restore"><input type="checkbox" id="r_<?php print $message['id']; ?>" name="r_<?php print $message['id']; ?>" value="iiii" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" /></div>
|
||||||
<div class="resultcell id"><a href="#" onclick="Piler.view_message(<?php print $i; ?>);"><?php print ($page*$page_len) + $i + 1; ?>.</a></div>
|
<div class="resultcell id"><a href="#" onclick="Piler.view_message_by_pos(<?php print $i; ?>);"><?php print ($page*$page_len) + $i + 1; ?>.</a></div>
|
||||||
<div class="resultcell date"><?php print $message['date']; ?></div>
|
<div class="resultcell date"><?php print $message['date']; ?></div>
|
||||||
<div class="resultcell from"><?php if($message['from'] != $message['shortfrom']) { ?><span title="<?php print $message['from']; ?>"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
|
<div class="resultcell from"><?php if($message['from'] != $message['shortfrom']) { ?><span title="<?php print $message['from']; ?>"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
|
||||||
<div class="resultcell to"><?php if($message['to'] != $message['shortto']) { ?><span title="<?php print $message['to']; ?>"><?php print $message['shortto']; ?>*</span><?php } else { print $message['to']; } ?></div>
|
<div class="resultcell to"><?php if($message['to'] != $message['shortto']) { ?><span title="<?php print $message['to']; ?>"><?php print $message['shortto']; ?>*</span><?php } else { print $message['to']; } ?></div>
|
||||||
<div class="resultcell subject"><a href="#" <?php if($message['subject'] != $message['shortsubject']) { ?>title="<?php print $message['subject']; ?>"<?php } ?> onclick="Piler.view_message(<?php print $i; ?>);"><?php if($message['subject'] != $message['shortsubject']) { print $message['shortsubject']; } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" title="<?php print $text_conversation_available; ?>" onclick="$('#ref').val('<?php print $message['reference']; ?>'); Piler.expert(this);">[+]</span></a><?php } ?></div>
|
<div class="resultcell subject"><a href="#" <?php if($message['subject'] != $message['shortsubject']) { ?>title="<?php print $message['subject']; ?>"<?php } ?> onclick="Piler.view_message_by_pos(<?php print $i; ?>);"><?php if($message['subject'] != $message['shortsubject']) { print $message['shortsubject']; } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" title="<?php print $text_conversation_available; ?>" onclick="$('#ref').val('<?php print $message['reference']; ?>'); Piler.expert(this);">[+]</span></a><?php } ?></div>
|
||||||
|
|
||||||
<div class="resultcell size"><?php print $message['size']; ?></div>
|
<div class="resultcell size"><?php print $message['size']; ?></div>
|
||||||
<div class="resultcell end"><?php if($message['attachments'] > 0) { ?><img src="<?php print ICON_ATTACHMENT; ?>" alt="" width="16" height="18" /><?php } else { ?> <?php } ?></div>
|
<div class="resultcell end"><?php if($message['attachments'] > 0) { ?><img src="<?php print ICON_ATTACHMENT; ?>" alt="" width="16" height="18" /><?php } else { ?> <?php } ?></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user