source: trunk/expressoMail1_2/inc/hook_settings.inc.php @ 1002

Revision 1002, 4.7 KB checked in by amuller, 15 years ago (diff)

Ticket #485 - Correção de assinatura com texto rico

  • Property svn:executable set to *
Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare - ExpressoMail Preferences                                    *
4        * http://www.expressolivre.org                                             *   
5        * Modified by Alexandre Felipe Muller de Souza <amuller@celepar.pr.gov.br> *
6        * --------------------------------------------                             *
7        *  This program is free software; you can redistribute it and/or modify it *
8        *  under the terms of the GNU General Public License as published by the   *
9        *  Free Software Foundation; either version 2 of the License, or (at your  *
10        *  option) any later version.                                              *
11        \**************************************************************************/
12include_once("fckeditor.php");
13$type = $_GET['type']; // FIX ME
14
15$default = array(
16        '25'    => '25',
17        '50'    => '50',
18        '75'    => '75',
19        '100'   => '100'
20);
21
22create_select_box(lang('What is the maximum number of messages per page?'),'max_email_per_page',$default,
23        'What is the maximum number of messages per page?');
24create_check_box(lang('Save deleted messages in trash folder?'),'save_deleted_msg','Save deleted messages in trash folder?');
25$default = array(
26        '1'    => lang('1 day'),
27        '2'    => lang('2 days'),
28        '3'    => lang('3 days'),
29        '4'   => lang('4 days'),
30        '5'   => lang('5 days')
31);
32
33create_select_box(lang('Delete trash messages after how many days?'),'delete_trash_messages_after_n_days',$default,lang('Delete trash messages after how many days?'));
34create_check_box(lang('Would you like to use local messages?'),'use_local_messages','');
35create_check_box(lang('Would you like to keep archived messages?'),'keep_archived_messages','');
36create_check_box(lang('Show previous message, after delete actual message?'),'delete_and_show_previous_message','');
37create_check_box(lang('Do you wanna receive an alert for new messages?'),'alert_new_msg','');
38create_check_box(lang('Show default view on main screen?'),'mainscreen_showmail','');
39create_check_box(lang('Do you want to use remove attachments function?'),'remove_attachments_function','');
40create_check_box(lang('Do you want to use important flag in email editor?'),'enable_important_flag','');
41
42//TODO use default folders from email admin
43$default = array(
44        'INBOX' =>      lang('INBOX'),
45        'INBOX/'.lang('Drafts') => lang('Drafts'),
46        'INBOX/'.lang('Sent')   => lang('Sent'),
47        'INBOX/'.lang('Trash')  => lang('Trash')
48);
49create_select_box(lang('Save sent messages in folder'),'save_in_folder',$default,'');
50create_check_box(lang('Hide menu folders?'),'check_menu','');
51
52$default = array(
53        '20' => lang('normal'),
54        '30' => lang('medium'),
55        '40' => lang('big')
56);
57
58create_select_box(lang('What is the height of the lines in the list of messages?'),'line_height',$default,'');
59$default = array(
60        '10' => lang('small'),
61        '11' => lang('normal'),
62        '15' => lang('big')
63);
64
65create_select_box(lang('What the font size in the list of messages?'),'font_size',$default,'');
66create_check_box(lang('Use dynamic contacts?'),'use_dynamic_contacts','');
67create_check_box(lang('Use shortcuts?'),'use_shotcuts','');
68create_check_box(lang('Auto save draft'),'auto_save_draft','');
69
70$default = array(
71        'text' => lang('simple text'),
72        'html' => lang('rich text')
73);
74
75create_select_box(lang('Signature Type'),'type_signature',$default,'','','','onchange="javascript:changeType(this.value);" onload="javascript:alert(this.value);"');
76
77if ($type == 'user' || $type == ''){
78        $oFCKeditor = new FCKeditor('html_signature');
79        $oFCKeditor->BasePath   = '../expressoMail1_2/js/fckeditor/';
80        $oFCKeditor->ToolbarSet = 'ExpressoLivre';
81
82        $vars = $GLOBALS['phpgw']->preferences->user[$appname];
83
84        create_html_code("signature","<div id='text_signature'>
85                <textarea rows='5' cols='50' id='user[signature]' name='user[signature]'>","</textarea></div>
86                <div style='display:none;' id='html_signature'>".$oFCKeditor->Create()."</div>
87                <script language='javascript'>
88document.getElementById('user[signature]').value  = '".$vars['signature']."';
89function changeType(value){
90        var html_signature = FCKeditorAPI.GetInstance(\"html_signature\");
91        if(value == 'text'){
92                document.getElementById('user[signature]').value = html_signature.GetHTML();
93                document.getElementById(\"text_signature\").style.display = '';
94                document.getElementById(\"html_signature\").style.display = 'none';
95        }
96        else if(value == 'html'){       
97                html_signature.SetHTML(document.getElementById('user[signature]').value);
98                document.getElementById(\"text_signature\").style.display = 'none';
99                document.getElementById(\"html_signature\").style.display  = '';
100        }
101}
102setTimeout('changeType(document.getElementsByName(\'user[type_signature]\')[0].value==\'html\'?\'html\':\'\')',2500);
103document.getElementById('user[signature]').value=document.getElementById('user[signature]').innerHTML;
104</script>");
105}
106?>
Note: See TracBrowser for help on using the repository browser.