source: trunk/contactcenter/templates/default/full_add.tpl @ 5669

Revision 5669, 15.3 KB checked in by angelo, 12 years ago (diff)

Ticket #2518 - Correcao em elementos da janela cadastro e alteracao de contatos

  • Property svn:executable set to *
Line 
1{cc_api}
2
3<!-- JS MESSAGES -->
4<!--input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}"-->
5<!--input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}"-->
6<!--input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}"-->
7<!-- END JS MESSAGES -->
8
9
10<!-- WINDOW CONTACT -->
11<iframe id="cc_photo_frame" style="position: absolute; top: 0px; left: 0px; visibility:hidden"></iframe>
12<input id="cc_contact_title" type="hidden" value="{cc_contact_title}">
13<input id="cc_contact_personal" type="hidden" value="{cc_contact_personal}">
14<input id="cc_contact_addrs" type="hidden" value="{cc_contact_addrs}">
15<input id="cc_contact_grps" type="hidden" value="{cc_contact_grps}">
16<input id="cc_contact_conns" type="hidden" value="{emails_telephones}">
17<input id="cc_pd_full_name" name="{cc_pd_full_name}" type="hidden">
18<input id="cc_pd_sex" name="{cc_pd_sex}" type="hidden">
19<input id="cc_addr_other" name="{cc_addr_other}" type="hidden">
20<input id="cc_addr_po_box" name="{cc_addr_po_box}" type="hidden">
21<!-- _PERSONAL DATA -->
22<div id="cc_contact_tab_0" class="row_off div_cc_contact_tab" style="left:-498;top:-347;position: absolute;visibility: hidden;height:197px">
23        <form id="cc_full_add_form_personal">
24        <input id="cc_full_add_contact_id" type="text" style="display: none">
25        <table align="center" width="498px" height="197px" class="row_off" border="0">
26                <tr class="row_off">
27                        <td align="right">{cc_pd_select_photo}:</td>
28                        <td align="left" colspan="2">
29                                <!-- Mozilla Method -->
30                                <input id="cc_pd_select_photo" type="file" accept="image/gif,image/jpeg,image/png" name="cc_pd_photo" onchange="Element('cc_pd_photo').src = 'file://'+Element('cc_pd_select_photo').value">
31                                <!-- IE Method -->
32                                <input id="cc_pd_select_photo_t" type="text" name="cc_pd_select_photo_t" readonly>
33                                <input id="cc_pd_select_photo_b" type="button" style="width: 60px" value="{cc_pd_select_photo_b}" onclick="Element('cc_photo_frame').contentWindow.document.all['cc_photo_input'].click();">
34                        </td>
35                        <td align="center" colspan="2" rowspan="3"><img id="cc_pd_photo" src="templates/default/images/photo.png" border="0" width="60px" height="80px"></td>
36                </tr>
37                <tr class="row_on">
38                        <td align="right">{cc_pd_alias}:</td>
39                        <td align="left" colspan="2"><input id="cc_pd_alias" name="{cc_pd_alias}" type="text" style="width:175px;z-index:-1" value="" maxlength="30"></td>
40                </tr>
41                <tr style="display:none" class="row_off">
42                        <td align="right">{cc_pd_prefix}:</td>
43                        <td align="left" colspan="2"><select id="cc_pd_prefix" name="{cc_pd_prefix}" style="width: 175px;"><option value='0'>{cc_pd_choose_prefix}</option></select></td>
44                </tr>
45                <tr class="row_on">
46                        <td align="right">{cc_pd_given_names}:</td>
47                        <td align="left" colspan="2"><input id="cc_pd_given_names" name="{cc_pd_given_names}" type="text" style="width: 175px;" value="" maxlength="100"></td>
48                </tr>
49                <tr class="row_on">
50                        <td align="right">{cc_pd_family_names}:</td>
51                        <td align="left"><input id="cc_pd_family_names" name="{cc_pd_family_names}" type="text" style="width: 175px;" value="" maxlength="100"></td>
52                <tr class="row_on">
53                        <td align="right">{cc_pd_birthdate}:</td>
54                        <td align="left">
55                                <input id="cc_pd_birthdate_0" style="text-align: center;" title="{cc_pd_birthdate_0}" name="{cc_pd_birthdate_0}" type="text" maxlength="{cc_pd_birth_size_0}" size="{cc_pd_birth_size_0}">
56                                <input id="cc_pd_birthdate_1" style="text-align: center;" title="{cc_pd_birthdate_1}" name="{cc_pd_birthdate_1}" type="text" maxlength="{cc_pd_birth_size_1}" size="{cc_pd_birth_size_1}">
57                                <input id="cc_pd_birthdate_2" style="text-align: center;" title="{cc_pd_birthdate_2}" name="{cc_pd_birthdate_2}" type="text" maxlength="{cc_pd_birth_size_2}" size="{cc_pd_birth_size_2}">
58                        </td>
59                </tr>
60                </tr>
61                <tr style="display:none" class="row_off">
62                        <td align="right">{cc_pd_suffix}:</td>
63                        <td align="left" colspan="3"><select id="cc_pd_suffix" name="{cc_pd_suffix}" style="width: 175px;"><option value="0">{cc_pd_choose_suffix}</option></select></td>
64                </tr>
65                <tr class="row_on">
66                        <td align="right">{cc_pd_gpg_finger_print}:</td>
67                        <td colspan="3" align="left"><input id="cc_pd_gpg_finger_print" name="{cc_pd_gpg_finger_print}" type="text" style="width: 350px;" value="" maxlength=""></td>
68                </tr>
69                <tr class="row_off">
70                        <td align="right">{cc_pd_notes}:</td>
71                        <td colspan="3" align="left"><textarea id="cc_pd_notes" name="{cc_pd_notes}" style="width: 350px; height: 60px;"></textarea></td>
72                </tr>
73        </table>
74        </form>
75</div>
76
77<!-- _ADDRESSES -->
78<div id="cc_contact_tab_1" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:197px;">
79        <form id="cc_full_add_form_addrs">
80        <table align="center" width="498px" height="197px" border="0">
81                <tr class="row_off">
82                        <td align="right">{cc_addr_types}:</td>
83                        <td align="left" colspan="3">
84                                <select id="cc_addr_types" name="{cc_addr_types}" style="width: 200px;" onchange="updateAddressFields()">
85                                        <option value="_NONE_">{cc_addr_choose_types}</option>
86                                </select>
87                        </td>
88                </tr>
89                <tr class="row_on">
90                        <td align="right">{cc_addr_countries}:</td>
91                        <td align="left" colspan="3">
92                                <select id="cc_addr_countries" name="{cc_addr_countries}" style="width: 200px;" onchange="updateAddrStates()">
93                                        <option value="_NONE_">{cc_addr_choose_countries}</option>
94                                        {cc_addr_country_list}
95                                </select>
96                        </td>
97                </tr>
98                <tr class="row_off">
99                        <td align="right">{cc_addr_states}:</td>
100                        <td align="left" colspan="3">
101                                <select id="cc_addr_states" name="{cc_addr_states}" style="width: 200px;" onchange="updateAddrCities();">
102                                        <option value="_NONE_">{cc_addr_choose_states}</option>
103                                </select>
104                                <input id="cc_addr_states_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewStateOnMouseOver();" onmouseout="updateAddrNewStateOnMouseOut();">
105                        </td>
106                </tr>
107                <tr class="row_on">
108                        <td align="right">{cc_addr_cities}:</td>
109                        <td align="left" colspan="3">
110                                <select id="cc_addr_cities" style="width: 200px;" onchange="updateAddrFillingFields();">
111                                        <option value="_NONE_">{cc_addr_choose_cities}</option>
112                                </select>
113                                <input id="cc_addr_cities_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewCityOnMouseOver();" onmouseout="updateAddrNewCityOnMouseOut();">
114                        </td>
115                </tr>
116                <tr class="row_off">
117                        <td align="right">{cc_addr_1}:</td>
118                        <td align="left"><input id="cc_addr_1" name="{cc_addr_1}" style="width: 200px;" type="text" name="" value="" maxlength="60"></td>
119                        <td align="right">{cc_addr_complement}:</td>
120                        <td align="left"><input id="cc_addr_complement" name="{cc_addr_complement}" style="width: 100px;" type="text" name="" value="" maxlength="30"></td>
121                </tr>
122                <tr class="row_on">
123                        <td align="right">{cc_addr_2}:</td>
124                        <td align="left"><input id="cc_addr_2" name="{cc_addr_2}" style="width: 200px;" type="text" name="" value="" maxlength="60"></td>
125                        <td align="right">{cc_addr_postal_code}:</td>
126                        <td align="left"><input id="cc_addr_postal_code" name="{cc_addr_postal_code}"style="width: 70px;" type="text" name="" value="" maxlength="15"></td>
127                </tr>
128                <tr class="row_off">
129                        <td align="right">{cc_addr_is_default}:</td>
130                        <td colspan="3" align="left"><input id="cc_addr_is_default" type="checkbox" name=""></td>
131                </tr>
132                <tr style="visibility: hidden; position: absolute;">
133                        <td><input id="cc_addr_id" type="hidden"></td>
134                </tr>
135        </table>
136        </form>
137</div>
138
139<!-- _CONNECTIONS -->
140<div id="cc_contact_tab_2" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
141        <table align="left" width="100%"  height="247px" border=0>
142        <tbody>
143                <tr class="th" width="100%" align="center" height="10px">
144                        <td width="60px" noWrap><input type="radio"  name="cc_conn_type" id="cc_conn_type_1" value="Email" onclick="javascript:updateConnFields();">{email}</td>
145                        <td width="60px" noWrap><input type="radio" name="cc_conn_type" id="cc_conn_type_2" value="Telefone" onclick="javascript:updateConnFields();">{telephone}</td>
146                        <td width="*" align="left"><select style="width:160px" id="cc_conn_type_sel" onchange="javascript:connAddNewLine();"><option value="-1">{choose_email_telephone}</option></select></td>
147                </tr>
148                <tr class="row_off">                   
149                        <td valign="top" colspan="4" width="100%" style="border: 0px solid black" cellpadding="0" cellspacing="0">
150                                <table align="left" width="100%" style="border: 0px solid black">
151                                <tbody id="cc_conn">&nbsp;
152                                        <!-- Code inside here is inserted dynamically -->
153                                </tbody>                               
154                                </table>
155                        </td>
156                </tr>
157        </tbody>
158        <tbody>
159                <tr>
160                        <td align="center" colspan="4">&nbsp;</td>
161                </tr>
162        </tbody>
163        </table>
164        <div style="z-index:10000;position: absolute;display:none; top: 170px; left: 78px;" id="div_cc_conn_is_default"> {cc_default} &nbsp;<select id="cc_email_default" name="cc_email_default" disabled style="display:none"></select><select id="cc_phone_default" name="cc_phone_default" disabled style="display:none"></select></div>
165</div>
166
167<!-- _GROUPS -->
168<div id="cc_contact_groups_tab" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
169        <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
170                <tr>
171                        <td  align="right">
172                                <table border="0" cellpadding="0" cellspacing="0">
173                                        <tr height="30" class="th">
174                                                <td  align="center">{cc_grps_available}</td>                                   
175                                        </tr>
176                                        <tr height="30" class="th">
177                                                <td  align="right"><select  id="id_grps_available" multiple name="grps_available[]" style="width:200px" size="10"></select></td>
178                                        </tr>
179                                </table>
180                        </td>
181                        <td id="buttons" width="95" align="center">
182                                <button type="button" onClick="javascript:selectGroup()"><img src="../phpgwapi/templates/celepar/images/add.png" style="vertical-align: middle;" >&nbsp;{txt_add}</button>
183                                <br><br>
184                                <button type="button" onClick="javascript:deselectGroup()"><img src="../phpgwapi/templates/celepar/images/rem.png" style="vertical-align: middle;" >&nbsp;{txt_rem}</button>
185                        </td>
186                        <td  align="left">
187                                <table border="0" cellpadding="0" cellspacing="0">
188                                        <tr height="30" class="th">
189                                                <td  align="center">{cc_grps_selected}</td>                                     
190                                        </tr>
191                                        <tr height="30" class="th">
192                                                <td  align="left"><select  id="id_grps_selected" multiple name="grps_selected[]" style="width:200px" size="10"></select></td>
193                                        </tr>
194                                </table>
195                        </td>
196                </tr>
197        </table>
198</div>
199
200<!-- _BOTTOM BUTTONS -->
201<div align="center" id="cc_contact_tab_buttons" style="position: absolute; visibility: hidden; top: 280px; left: 0px; width: 498px; height: 50px; border: 0px solid black">
202        <table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
203                <tr class="row_off" id="cc_contact_sharing">
204                        <td >{cc_contact_shared}: </td>
205                        <td colspan="2">
206                                        <select id="cc_contact_shared_types" name="{cc_contact_shared}" style="width: 390px;">
207                                                <option value="_NONE_">{cc_contact_shared_types}</option>
208                                        </select>
209                        </td>
210                </tr>
211        </table>
212        <table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
213                <tr>
214                        <td align="center">
215                                <input id="cc_contact_save" style="width: 100px; cursor: pointer;" type="button" value="{cc_contact_save}" onclick="javascript:postFullAdd();">
216                                <input id="cc_contact_reset" style="width: 100px; cursor: pointer;" type="button" value="{cc_contact_reset}" onclick="javascript:resetFullAdd();">
217                                <input id="cc_contact_cancel" style="width: 100px; cursor: pointer;" type="button" value="{cc_contact_cancel}" onclick="javascript:closeFullAdd();">
218                        </td>
219                </tr>
220        </table>
221</div>
222
223<script type="text/javascript">
224<!--
225//      Overloading some methods for fix cursor problem in Firefox.
226        if(!is_ie) {
227                dJSWin.prototype.close = function() {           
228                        dJSWin.state = 0;
229                        dd.elements[this.title.id].hide();
230                        if ( dd_div = document.getElementById('divScrollMain'))
231                                Element("divScrollMain").style.overflow = 'auto';       
232                }
233                dJSWin.prototype.open = function() {
234                        this.moveTo(window.innerWidth/2 + window.pageXOffset - dd.elements[this.title.id].w/2,
235                            window.innerHeight/2 + window.pageYOffset - dd.elements[this.clientArea.id].h/2);
236                        dd.elements[this.title.id].maximizeZ();
237                        dd.elements[this.title.id].show();
238                        if ( dd_div = document.getElementById('divScrollMain'))
239                                dd_div.style.overflow = 'hidden';
240                }
241        }       
242               
243        var fullAdd_onload = document.body.onload;
244        var tabs;
245        var fullAddWin;
246        var photo_frame, photo_form, photo_input;       
247
248        __f = function(e)
249        {
250               
251                tabs = new dTabsManager({'id': 'cc_contact_tab', 'width': '500px'});
252               
253                tabs.addTab({'id': 'cc_contact_tab_0',
254                                         'name': Element('cc_contact_personal').value,
255                                         'selectedClass': 'tab_box_active',
256                                         'unselectedClass': 'tab_box'});
257                                         
258                tabs.addTab({'id': 'cc_contact_tab_2',
259                                         'name': Element('cc_contact_conns').value,
260                                         'selectedClass': 'tab_box_active',
261                                         'unselectedClass': 'tab_box'});
262
263                tabs.addTab({'id': 'cc_contact_tab_1',
264                                         'name': Element('cc_contact_addrs').value,
265                                         'selectedClass': 'tab_box_active',
266                                         'unselectedClass': 'tab_box'});
267                tabs.addTab({'id': 'cc_contact_groups_tab',
268                                         'name': Element('cc_contact_grps').value,
269                                         'selectedClass': 'tab_box_active',
270                                         'unselectedClass': 'tab_box'});                         
271
272                fullAddWin = new dJSWin({'id': 'cc_full_add_window',
273                                         'content_id': 'cc_contact_tab',
274                                         'win_class': 'row_off',
275                                         'width': '500px',
276                                         'height': '320px',
277                                         'title_color': '#3978d6',
278                                         'title': Element('cc_contact_title').value,
279                                         'title_text_color': 'white',
280                                         'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
281                                         'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_groups_tab','cc_contact_tab_buttons'),
282                                         'border': true});
283
284                fullAddWin.draw();
285
286                if (is_ie)
287                {
288                        Element('cc_photo_frame').src = 'cc_photo_frame.html';
289                        Element('cc_pd_select_photo').style.display='none';
290                        fullAddWin.open();
291                        tabs._showTab('cc_contact_tab_0');
292                        fullAddWin.close();
293                }
294                else
295                {
296                        Element('cc_pd_select_photo_t').style.display='none';
297                        Element('cc_pd_select_photo_b').style.display='none';                   
298                }
299        };
300
301        if (is_ie) // || is_moz1_6)
302        {
303                       
304                document.body.onload = function(e) { setTimeout('__f()', 10); fullAdd_onload ? setTimeout('fullAdd_onload()'): false;};
305        }
306        else
307        {
308//              __f();
309        }
310
311//-->
312</script>
313<!-- END WINDOW CONTACT -->
314
315
316
317
318
319
320
321
322
323
324<!-- RELATIONS
325<div id="cc_contact_tab_3" class="row_off div_cc_contact_tab">
326        <table align="center" width="500px" height="100%" cellpadding="2" cellspacing="0" border="0">
327                <tr class="row_off">
328                        <td align="right"><input style="width: 240px;" type="text"></td>
329                        <td align="left"><input style="width: 150px;" type="button" value="{cc_btn_search}"></td>
330                </tr>
331                <tr class="row_on">
332                        <td align="left">{cc_results}:</td>
333                        <td align="left">{cc_is_my}:</td>
334                </tr>
335                <tr class="row_off">
336                        <td align="right"><select style="width: 240px; height: 150px;" multiple></select></td>
337                        <td align="left"><select id="cc_rels_type" style="width: 240px; height: 150px;" multiple></select></td>
338                </tr>
339                <tr class="row_on">
340                        <td align="right"><input style="width: 150px;" type="button" value="{cc_add_relation}"></td>
341                        <td align="left"><input style="width: 150px;" type="button" value="{cc_del_relation}"></td>
342                </tr>
343                <tr class="row_off">
344                        <td align="center" colspan="2"><select style="width: 480px; height: 120px;" multiple></select></td>
345                </tr>
346        </table>
347</div>
348-->
Note: See TracBrowser for help on using the repository browser.