Commit | Line | Data |
---|---|---|
dd8de1ec PH |
1 | <?php |
2 | /******************************************************************************** | |
3 | * include/plugin_forward.inc.php : The class for forwards | |
4 | * ------------------------------ | |
5 | * | |
6 | * This file is part of the philter distribution | |
7 | * Copyright: See COPYING files that comes with this distribution | |
8 | ********************************************************************************/ | |
9 | ||
10 | class FwdPlugin extends ActionPlugin { | |
11 | function FwdPlugin() { $this->ActionPlugin(); } | |
12 | function rtti() { return 1; } | |
13 | function name() { return "Forward To"; } | |
14 | ||
15 | function to_js() { | |
16 | $res = "function(Node, data) {\n" | |
17 | . " var i,j;\n" | |
18 | . " var select = document.createElement('select');\n" | |
19 | . " select.setAttribute('name', Node.name+'[1]');\n" | |
20 | . "\n" | |
21 | . " for(i=0,j=0; i<mail_pool.length; i++)\n" | |
22 | . " if(mail_pool[i])\n" | |
23 | . " select.options[j++] = new Option(mail_pool[i],i,false,(data[1]==i));\n" | |
24 | . "\n" | |
25 | . " Node.appendChild(document.createTextNode(' email : '));\n" | |
26 | . " Node.appendChild(select);\n" | |
27 | . "}"; | |
28 | ||
29 | return $res; | |
30 | } | |
dd8de1ec PH |
31 | } |
32 | ||
33 | /******************************************************************************** | |
34 | * $Id$ | |
35 | * vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100: | |
36 | ********************************************************************************/ | |
37 | ?> |