From 583f1c8d80c42195d0ee41f30a885e13d777b79f Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 08 Nov 2005 15:18:56 -0500 Subject: [PATCH] Added reply-to-all function (submitted by Julien Brette) --- program/include/main.inc | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 9248caa..adb0b88 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -248,6 +248,9 @@ $OUTPUT->set_charset($CONFIG['charset']); else rcmail_set_locale($sess_user_lang); + + // add some basic label to client + rcube_add_label('loading'); } @@ -401,6 +404,16 @@ } +// overwrite action variable +function rcmail_overwrite_action($action) + { + global $OUTPUT, $JS_OBJECT_NAME; + $GLOBALS['_action'] = $action; + + $OUTPUT->add_script(sprintf("\n%s.set_env('action', '%s');", $JS_OBJECT_NAME, $action)); + } + + function show_message($message, $type='notice') { global $OUTPUT, $JS_OBJECT_NAME, $REMOTE_REQUEST; @@ -490,6 +503,20 @@ } +// add a localized label to the client environment +function rcube_add_label() + { + global $OUTPUT, $JS_OBJECT_NAME; + + $arg_list = func_get_args(); + foreach ($arg_list as $i => $name) + $OUTPUT->add_script(sprintf("%s.add_label('%s', '%s');", + $JS_OBJECT_NAME, + $name, + rep_specialchars_output(rcube_label($name), 'js'))); + } + + // ************** template parsing and gui functions ************** @@ -546,6 +573,7 @@ // replace all strings ($varname) with the content of the according global variable function parse_with_globals($input) { + $GLOBALS['__comm_path'] = $GLOBALS['COMM_PATH']; $output = preg_replace('/\$(__[a-z0-9_\-]+)/e', '$GLOBALS["\\1"]', $input); return $output; } -- Gitblit v1.9.1