summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-25 08:40:31 +0000
committeralecpl <alec@alec.pl>2012-04-25 08:40:31 +0000
commit76248c7b6e5060107536de2c4e287667b02b3b0e (patch)
tree2d5834e02f6ad637567abdbca4d66ddba32f8ff8 /program/js/app.js
parentfbe7b71b0f6139f38cb95802201d38ff38c266eb (diff)
- Improved all headers viewer (mostly in Larry skin)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 9521fb964..fa4220f51 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -224,7 +224,7 @@ function rcube_webmail()
this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list', 'forward',
'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'download',
- 'print', 'load-attachment', 'load-headers', 'forward-attachment'];
+ 'print', 'load-attachment', 'show-headers', 'hide-headers', 'forward-attachment'];
if (this.env.action == 'show' || this.env.action == 'preview') {
this.enable_command(this.env.message_commands, this.env.uid);
@@ -580,10 +580,6 @@ function rcube_webmail()
this.list_contacts(props);
break;
- case 'load-headers':
- this.load_headers(obj);
- break;
-
case 'sort':
var sort_order, sort_col = props;
@@ -1109,7 +1105,7 @@ function rcube_webmail()
default:
var func = command.replace(/-/g, '_');
if (this[func] && typeof this[func] === 'function') {
- ret = this[func](props);
+ ret = this[func](props, obj);
}
break;
}
@@ -5850,14 +5846,14 @@ function rcube_webmail()
};
// display all-headers row and fetch raw message headers
- this.load_headers = function(elem)
+ this.show_headers = function(props, elem)
{
if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box || !this.env.uid)
return;
$(elem).removeClass('show-headers').addClass('hide-headers');
$(this.gui_objects.all_headers_row).show();
- elem.onclick = function() { rcmail.hide_headers(elem); };
+ elem.onclick = function() { rcmail.command('hide-headers', '', elem); };
// fetch headers only once
if (!this.gui_objects.all_headers_box.innerHTML) {
@@ -5867,14 +5863,14 @@ function rcube_webmail()
};
// hide all-headers row
- this.hide_headers = function(elem)
+ this.hide_headers = function(props, elem)
{
if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box)
return;
$(elem).removeClass('hide-headers').addClass('show-headers');
$(this.gui_objects.all_headers_row).hide();
- elem.onclick = function() { rcmail.load_headers(elem); };
+ elem.onclick = function() { rcmail.command('show-headers', '', elem); };
};