1 /*********************************************************************************
2 * SugarCRM Community Edition is a customer relationship management program developed by
3 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Affero General Public License version 3 as published by the
7 * Free Software Foundation with the addition of the following permission added
8 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
9 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
10 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * You should have received a copy of the GNU Affero General Public License along with
18 * this program; if not, see http://www.gnu.org/licenses or write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
23 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU Affero General Public License version 3.
29 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
32 * technical reasons, the Appropriate Legal Notices must display the words
33 * "Powered by SugarCRM".
34 ********************************************************************************/
39 var uw_check_msg = "";
40 //var uw_check_type = '';
41 var find_done = false;
43 function loadXMLDoc(url) {
45 // branch for native XMLHttpRequest object
46 if(window.XMLHttpRequest) {
48 req = new XMLHttpRequest();
52 // branch for IE/Windows ActiveX version
53 } else if(window.ActiveXObject) {
55 req = new ActiveXObject("Msxml2.XMLHTTP");
58 req = new ActiveXObject("Microsoft.XMLHTTP");
66 req.onreadystatechange = processReqChange;
67 req.open("GET", url, true);
75 ///// preflight scripts
76 function preflightToggleAll(cb) {
78 var form = document.getElementById('diffs');
80 if(cb.checked == true) {
84 for(i=0; i<form.elements.length; i++) {
85 if(form.elements[i].type == 'checkbox') {
86 form.elements[i].checked = checkAll;
93 function checkSqlStatus(done) {
94 var schemaSelect = document.getElementById('select_schema_change');
95 var hideShow = document.getElementById('show_sql_run');
96 var hideShowCB = document.getElementById('sql_run');
97 var nextButton = document.getElementById('next_button');
98 var schemaMethod = document.getElementById('schema');
99 document.getElementById('sql_run').checked = false;
101 if(schemaSelect.options[schemaSelect.selectedIndex].value == 'manual' && done == false) {
102 hideShow.style.display = 'block';
103 nextButton.style.display = 'none';
104 hideShowCB.disabled = false;
105 schemaMethod.value = 'manual';
108 hideShowCB.checked = true;
109 hideShowCB.disabled = true;
111 hideShow.style.display = 'none';
113 nextButton.style.display = 'inline';
114 schemaMethod.value = 'sugar';
119 function toggleDisplay(targ) {
120 target = document.getElementById("targ");
121 if(target.style.display == 'none') {
122 target.style.display = '';
124 target.style.display = 'none';
128 function verifyMerge(cb) {
129 if(cb.value == 'sugar') {
130 var challenge = "{$mod_strings['LBL_UW_OVERWRITE_DESC']}";
131 var answer = confirm(challenge);
134 cb.options[0].selected = true;