2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
41 <script type="text/javascript">
43 function save_checks(offset) {
44 checked_ids = Array();
45 for (i = 0; i < document.MassUpdate.elements.length; i++){
46 if(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {
48 temp_string += '"' + document.MassUpdate.elements[i].value + '": {';
49 for(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {
50 temp_string += '"' + the_key + '":"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '",';
52 temp_string = temp_string.substring(0,temp_string.length - 1);
54 checked_ids.push(temp_string);
57 document.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');
58 document.MassUpdate.action.value = 'ContactAddressPopup';
59 document.MassUpdate.Contacts_CONTACT_offset.value = offset;
60 document.MassUpdate.submit();
64 // reassigned the saved data from the saved checks
65 if(typeof(document.MassUpdate) != 'undefined' && document.MassUpdate.saved_associated_data.value != '') {
67 for(the_key in temp_array) {
68 associated_javascript_data[the_key] = temp_array[the_key];
72 // save checks across pages for multiselects
73 if(typeof(document.MassUpdate) != "undefined") {
74 checked_items = Array();
75 inputs_array = document.MassUpdate.elements;
77 for(wp = 0 ; wp < inputs_array.length; wp++) {
78 if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
79 checked_items.push(inputs_array[wp].value);
82 for(i in checked_items) {
83 for(wp = 0 ; wp < inputs_array.length; wp++) {
84 if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
85 inputs_array[wp].checked = true;
93 <!-- BEGIN: list_nav_row -->
94 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
96 <!-- END: list_nav_row -->
98 <td scope="col" NOWRAP>{CHECKALL}</td>
99 <td scope="col" width="20%" nowrap="nowrap"><a href="{ORDER_BY}last_name" class="listViewThLinkS1">{MOD.LBL_LIST_CONTACT_NAME}{arrow_start}{last_name_arrow}{arrow_end}</a></td>
100 <td scope="col" width="35%" nowrap="nowrap"><a href="{ORDER_BY}primary_address_street" class="listViewThLinkS1">{MOD.LBL_PRIMARY_ADDRESS}{arrow_start}{email1_arrow}{arrow_end}</a></td>
101 <td scope="col" width="40%" nowrap="nowrap">{MOD.LBL_LIST_ACCOUNT_NAME}</td>
104 <tr height="20" class="{ROW_COLOR}S1">
105 <td valign="top">{PREROW}</td>
106 <td scope='row' valign="top"><a href="#" onclick="send_back('Contacts','{CONTACT.ID}');">{CONTACT.FIRST_NAME} {CONTACT.LAST_NAME}</a></td>
108 <slot>{CONTACT.PRIMARY_ADDRESS_STREET}<br>
109 {CONTACT.PRIMARY_ADDRESS_CITY} {CONTACT.PRIMARY_ADDRESS_STATE} {CONTACT.PRIMARY_ADDRESS_POSTALCODE}<br>
110 {CONTACT.PRIMARY_ADDRESS_COUNTRY}</slot>
111 <td valign="top">{CONTACT.ACCOUNT_NAME}</td>
115 {ASSOCIATED_JAVASCRIPT_DATA}