added scrolling feature with up/down arrows

This commit is contained in:
SJ
2012-09-12 09:51:35 +02:00
parent 604ff565e1
commit 0ff9e77c5f
5 changed files with 298 additions and 2 deletions

View File

@ -81,6 +81,7 @@
.row.savedsearch { display: table-row; text-align: right; }
.resultrow { display: table-row; height: 18px; }
.resultrow.odd { background: #f5f5f5; }
.resultrow.selected { border: 2px solid black; }
.resultrow.spam { color: #aaa; }
.cell1 { display: table-cell; height: 25px; text-align: left; padding: 3px; font: bold 12px Arial, sans-serif; width: 80px; }

View File

@ -25,6 +25,7 @@
var email_search_url = '<?php print SITE_URL; ?>/index.php?route=group/email&';
var group_search_url = '<?php print SITE_URL; ?>/index.php?route=group/group&';
var folder_search_url = '<?php print SITE_URL; ?>/index.php?route=folder/folder&';
var message_loader_url = '<?php print SITE_URL; ?>message.php/';
</script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
@ -32,6 +33,8 @@
<script type="text/javascript" src="/view/javascript/rc1.js"></script>
<script type="text/javascript" src="/view/javascript/rc2.js"></script>
<script type="text/javascript" src="/view/javascript/shortcut.js"></script>
<style type="text/css">
/*#mailcontframe { height: 341px; }
#mailpreviewframe { top: 351px; }
@ -41,6 +44,24 @@
<script type="text/javascript">
var split = new rcube_webmail();
shortcut.add("Down", function() {
move_message_list_scrollbar('down');
},{
'type':'keydown',
'propagate':true,
'target':document
});
shortcut.add("Up", function() {
move_message_list_scrollbar('up');
},{
'type':'keydown',
'propagate':true,
'target':document
});
</script>

View File

@ -44,10 +44,10 @@
<div id="e_<?php print $message['id']; ?>" class="resultrow<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
<div class="cell5 restore"><input type="checkbox" id="r_<?php print $message['id']; ?>" name="r_<?php print $message['id']; ?>" value="iiii" checked="checked" class="restorebox" /></div>
<div class="cell5 id"><a href="#" onclick="script:load_url_with_get('<?php print SITE_URL; ?>message.php/<?php print $message['id']; ?>', 'mailpreviewframe'); return false;"><?php print ($page*$page_len) + $i; ?>.</a></div>
<div class="cell5 id"><a href="#" onclick="script:load_url_with_get('<?php print SITE_URL; ?>message.php/<?php print $message['id']; ?>', 'mailpreviewframe'); current_message_serial = <?php print $i; ?>; return false;"><?php print ($page*$page_len) + $i; ?>.</a></div>
<div class="cell5 date"><?php print $message['date']; ?></div>
<div class="cell5 from"><?php if($message['from'] != $message['shortfrom']) { ?><a href="#" title="<?php print preg_replace("/&/", "&amp;", $message['from']); ?>"><?php print $message['shortfrom']; ?></a><?php } else { print $message['from']; } ?></div>
<div class="cell5 subject"><a href="#" <?php if($message['subject'] != $message['shortsubject']) { ?>title="<?php print preg_replace("/&/", "&amp;", $message['subject']); ?>"<?php } ?> onclick="script:load_url_with_get('<?php print SITE_URL; ?>message.php/<?php print $message['id']; ?>', 'mailpreviewframe'); return false;"><?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="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count, ''), 0); a = document.getElementById('ref'); a.value=''; return false;">[+]</span></a><?php } ?></div>
<div class="cell5 subject"><a href="#" <?php if($message['subject'] != $message['shortsubject']) { ?>title="<?php print preg_replace("/&/", "&amp;", $message['subject']); ?>"<?php } ?> onclick="script:load_url_with_get('<?php print SITE_URL; ?>message.php/<?php print $message['id']; ?>', 'mailpreviewframe'); current_message_serial = <?php print $i; ?>; return false;"><?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="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count, ''), 0); a = document.getElementById('ref'); a.value=''; return false;">[+]</span></a><?php } ?></div>
<div class="cell5 size"><?php print $message['size']; ?></div>
<div class="cell5"><?php if($message['attachments'] > 0) { ?><img src="<?php print ICON_ATTACHMENT; ?>" alt="" width="16" height="18" /><?php } else { ?>&nbsp;<?php } ?></div>