init
This commit is contained in:
56
modules/Connectors/Connector.js
Normal file
56
modules/Connectors/Connector.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
function run_test(source_id){var callback={success:function(data){var resultDiv=document.getElementById(source_id+'_result');resultDiv.innerHTML='<b>'+data.responseText+'</b>';},failure:function(data){var resultDiv=document.getElementById(source_id+'_result');resultDiv.innerHTML='<b>'+SUGAR.language.get('app_strings','ERROR_UNABLE_TO_RETRIEVE_DATA')+'</b>';},timeout:300000}
|
||||
var resultDiv=document.getElementById(source_id+'_result');resultDiv.innerHTML='<img src=themes/default/images/sqsWait.gif>';document.ModifyProperties.source_id.value=source_id;document.ModifyProperties.action.value='RunTest';YAHOO.util.Connect.setForm(document.ModifyProperties);var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php?module=Connectors',callback);document.ModifyProperties.action.value='SaveModifyProperties';}
|
||||
var widgetTimout;function dswidget_open(elt){var wdiget_div=document.getElementById('dswidget_div');var objX=findPosX(elt);var objY=findPosY(elt);wdiget_div.style.top=(objY+15)+'px';wdiget_div.style.left=(objX)+'px';wdiget_div.style.display='block';}
|
||||
function dswidget_close(){widgetTimout=setTimeout("hide_widget()",500);}
|
||||
function hide_widget(){var wdiget_div=document.getElementById('dswidget_div');wdiget_div.style.display='none';}
|
||||
function clearButtonTimeout(){if(widgetTimout){clearTimeout(widgetTimout);}}
|
||||
function findPosX(obj)
|
||||
{var curleft=0;if(obj.offsetParent)
|
||||
{while(obj.offsetParent)
|
||||
{curleft+=obj.offsetLeft;obj=obj.offsetParent;}
|
||||
if(obj!=null)
|
||||
curleft+=obj.offsetLeft;}
|
||||
else if(obj.x)
|
||||
curleft+=obj.x;return curleft;}
|
||||
function findPosY(obj)
|
||||
{var curtop=0;if(obj.offsetParent)
|
||||
{while(obj.offsetParent)
|
||||
{curtop+=obj.offsetTop;obj=obj.offsetParent;}
|
||||
if(obj!=null)
|
||||
curtop+=obj.offsetTop;}
|
||||
else if(obj.y)
|
||||
curtop+=obj.y;return curtop;}
|
||||
50
modules/Connectors/ConnectorRecord.php
Executable file
50
modules/Connectors/ConnectorRecord.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
class ConnectorRecord extends MergeRecord{
|
||||
var $object_name = 'ConnectorRecord';
|
||||
var $module_dir = 'Connector';
|
||||
|
||||
|
||||
function ConnectorRecord($merge_module = '', $merge_id = '') {
|
||||
parent::MergeRecord($merge_module, $merge_id);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
37
modules/Connectors/Forms.php
Executable file
37
modules/Connectors/Forms.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
?>
|
||||
88
modules/Connectors/InstallDefaultConnectors.php
Executable file
88
modules/Connectors/InstallDefaultConnectors.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$default_connectors = array (
|
||||
'ext_rest_linkedin' =>
|
||||
array (
|
||||
'id' => 'ext_rest_linkedin',
|
||||
'name' => 'LinkedIn©',
|
||||
'enabled' => true,
|
||||
'directory' => 'modules/Connectors/connectors/sources/ext/rest/linkedin',
|
||||
'modules' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
$default_modules_sources = array (
|
||||
'Accounts' =>
|
||||
array (
|
||||
'ext_rest_linkedin' => 'ext_rest_linkedin',
|
||||
),
|
||||
'Contacts' =>
|
||||
array (
|
||||
'ext_rest_linkedin' => 'ext_rest_linkedin',
|
||||
),
|
||||
'Leads' =>
|
||||
array (
|
||||
'ext_rest_linkedin' => 'ext_rest_linkedin',
|
||||
),
|
||||
'Prospects' =>
|
||||
array (
|
||||
'ext_rest_linkedin' => 'ext_rest_linkedin',
|
||||
),
|
||||
);
|
||||
|
||||
if(!file_exists('custom/modules/Connectors/metadata')) {
|
||||
mkdir_recursive('custom/modules/Connectors/metadata');
|
||||
}
|
||||
|
||||
if(!write_array_to_file('connectors', $default_connectors, 'custom/modules/Connectors/metadata/connectors.php')) {
|
||||
$GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/connectors.php');
|
||||
}
|
||||
|
||||
if(!write_array_to_file('modules_sources', $default_modules_sources, 'custom/modules/Connectors/metadata/display_config.php')) {
|
||||
$GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/display_config.php');
|
||||
}
|
||||
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
if(!ConnectorUtils::updateMetaDataFiles()) {
|
||||
$GLOBALS['log']->fatal('Cannot update metadata files for connectors');
|
||||
}
|
||||
|
||||
?>
|
||||
62
modules/Connectors/Menu.php
Executable file
62
modules/Connectors/Menu.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
$actions = array('ModifyProperties', 'ModifyDisplay',
|
||||
'ModifyMapping', 'ConnectorSettings');
|
||||
if(in_array($GLOBALS['action'], $actions)){
|
||||
$module_menu[]=Array("index.php?module=Connectors&action=ConnectorSettings", $mod_strings['LBL_ADMINISTRATION_MAIN'],"icon_Connectors");
|
||||
$module_menu[]=Array("index.php?module=Connectors&action=ModifyProperties", $mod_strings['LBL_MODIFY_PROPERTIES_TITLE'],"icon_ConnectorConfig_16");
|
||||
$module_menu[]=Array("index.php?module=Connectors&action=ModifyDisplay", $mod_strings['LBL_MODIFY_DISPLAY_TITLE'],"icon_ConnectorEnable_16");
|
||||
$module_menu[]=Array("index.php?module=Connectors&action=ModifyMapping", $mod_strings['LBL_MODIFY_MAPPING_TITLE'],"icon_ConnectorMap_16");
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['merge_module']) && ($GLOBALS['action'] == 'Step1' || $GLOBALS['action'] == 'Step2')) {
|
||||
$merge_module = $_REQUEST['merge_module'];
|
||||
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], $merge_module);
|
||||
if(file_exists("custom/modules/{$merge_module}/Menu.php")) {
|
||||
require("custom/modules/{$merge_module}/Menu.php");
|
||||
} else if(file_exists("modules/{$merge_module}/Menu.php")) {
|
||||
require("modules/{$merge_module}/Menu.php");
|
||||
}
|
||||
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], $GLOBALS['module']);
|
||||
}
|
||||
|
||||
?>
|
||||
59
modules/Connectors/action_view_map.php
Executable file
59
modules/Connectors/action_view_map.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$action_view_map['retrievesource']= 'retrievesource';
|
||||
$action_view_map['step1']= 'step1';
|
||||
$action_view_map['step2']= 'step2';
|
||||
|
||||
//Admin main page
|
||||
$action_view_map['connectorsettings'] = 'connectorsettings';
|
||||
|
||||
//Admin pages for the connector properties
|
||||
$action_view_map['modifyproperties'] = 'modifyproperties';
|
||||
$action_view_map['sourceproperties']= 'sourceproperties';
|
||||
|
||||
//Admin pages to enable/disable connector for modules
|
||||
$action_view_map['modifydisplay'] = 'modifydisplay';
|
||||
$action_view_map['displayproperties'] = 'displayproperties';
|
||||
|
||||
//Admin pages to modify search field mapping for connectors
|
||||
$action_view_map['modifysearch'] = 'modifysearch';
|
||||
$action_view_map['searchproperties'] = 'searchproperties';
|
||||
|
||||
//Admin pages to modify field mapping for the connectors
|
||||
$action_view_map['modifymapping'] = 'modifymapping';
|
||||
$action_view_map['mappingproperties'] = 'mappingproperties';
|
||||
?>
|
||||
59
modules/Connectors/connectors/formatters/ext/rest/linkedin/linkedin.php
Executable file
59
modules/Connectors/connectors/formatters/ext/rest/linkedin/linkedin.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/connectors/formatters/default/formatter.php');
|
||||
|
||||
class ext_rest_linkedin_formatter extends default_formatter {
|
||||
|
||||
public function getDetailViewFormat() {
|
||||
$mapping = $this->getSourceMapping();
|
||||
$mapping_name = !empty($mapping['beans'][$this->_module]['name']) ? $mapping['beans'][$this->_module]['name'] : '';
|
||||
|
||||
if(!empty($mapping_name)) {
|
||||
$this->_ss->assign('mapping_name', $mapping_name);
|
||||
return $this->fetchSmarty();
|
||||
}
|
||||
|
||||
$GLOBALS['log']->error($GLOBALS['app_strings']['ERR_MISSING_MAPPING_ENTRY_FORM_MODULE']);
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getIconFilePath() {
|
||||
return 'modules/Connectors/connectors/formatters/ext/rest/linkedin/tpls/linkedin.gif';
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
79
modules/Connectors/connectors/formatters/ext/rest/linkedin/tpls/default.tpl
Executable file
79
modules/Connectors/connectors/formatters/ext/rest/linkedin/tpls/default.tpl
Executable file
@@ -0,0 +1,79 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<div style="visibility:hidden;" id="linkedin_popup_div"></div>
|
||||
<script src="{{$config.properties.company_url}}" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="{sugar_getjspath file='include/connectors/formatters/default/company_detail.js'}"></script>
|
||||
{literal}
|
||||
<style type="text/css">
|
||||
.yui-panel .hd {
|
||||
background-color:#3D77CB;
|
||||
border-color:#FFFFFF #FFFFFF #000000;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
color:#000000;
|
||||
font-size:100%;
|
||||
font-weight:bold;
|
||||
line-height:100%;
|
||||
padding:4px;
|
||||
white-space:nowrap;
|
||||
}
|
||||
</style>
|
||||
{/literal}
|
||||
<script type="text/javascript">
|
||||
function show_ext_rest_linkedin(event)
|
||||
{literal}
|
||||
{
|
||||
|
||||
var xCoordinate = event.clientX;
|
||||
var yCoordinate = event.clientY;
|
||||
var isIE = document.all?true:false;
|
||||
|
||||
if(isIE) {
|
||||
xCoordinate = xCoordinate + document.body.scrollLeft;
|
||||
yCoordinate = yCoordinate + document.body.scrollTop;
|
||||
}
|
||||
|
||||
{/literal}
|
||||
|
||||
cd = new CompanyDetailsDialog("linkedin_popup_div", '<div id="linkedin_div"></div>', xCoordinate, yCoordinate);
|
||||
cd.setHeader("{$fields.{{$mapping_name}}.value}");
|
||||
cd.display();
|
||||
linked_in_popup = new LinkedIn.CompanyInsiderBox("linkedin_div", "{$fields.{{$mapping_name}}.value}");
|
||||
{literal}
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
||||
46
modules/Connectors/connectors/sources/ext/rest/linkedin/config.php
Executable file
46
modules/Connectors/connectors/sources/ext/rest/linkedin/config.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
// created: 2008-10-03 14:31:59
|
||||
$config = array (
|
||||
'name' => 'LinkedIn©',
|
||||
'order' => 1,
|
||||
'properties' =>
|
||||
array (
|
||||
'company_url'=>'http://www.linkedin.com/companyInsider?script&useBorder=no',
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
'LBL_LICENSING_INFO' => '', //'LinkedIn© licensing info...',
|
||||
|
||||
'LBL_NAME' => 'Company Name',
|
||||
|
||||
//Configuration labels
|
||||
'company_url' => 'URL',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
'LBL_LICENSING_INFO' => '', //'LinkedIn© licensing info...',
|
||||
|
||||
'LBL_NAME' => 'Nazwa firmy',
|
||||
|
||||
//Configuration labels
|
||||
'company_url' => 'Adres URL',
|
||||
);
|
||||
|
||||
?>
|
||||
68
modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php
Executable file
68
modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/connectors/sources/ext/rest/rest.php');
|
||||
class ext_rest_linkedin extends ext_rest {
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->_enable_in_wizard = false;
|
||||
$this->_enable_in_hover = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* getItem
|
||||
*
|
||||
* As the linked in connector does not have a true API call, we simply
|
||||
* override this abstract method
|
||||
*/
|
||||
public function getItem($args=array(), $module=null){}
|
||||
|
||||
|
||||
/*
|
||||
* getList
|
||||
*
|
||||
* As the linked in connector does not have a true API call, we simply
|
||||
* override this abstract method
|
||||
*/
|
||||
public function getList($args=array(), $module=null){}
|
||||
|
||||
|
||||
public function __destruct(){
|
||||
parent::__destruct();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
53
modules/Connectors/connectors/sources/ext/rest/linkedin/mapping.php
Executable file
53
modules/Connectors/connectors/sources/ext/rest/linkedin/mapping.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$mapping = array(
|
||||
'beans' => array (
|
||||
'Accounts' => array (
|
||||
'name'=>'name',
|
||||
),
|
||||
'Contacts' => array (
|
||||
'name'=>'account_name',
|
||||
),
|
||||
'Leads' => array (
|
||||
'name'=>'account_name',
|
||||
),
|
||||
'Prospects' => array(
|
||||
'name'=>'account_name',
|
||||
)
|
||||
),
|
||||
);
|
||||
?>
|
||||
58
modules/Connectors/connectors/sources/ext/rest/linkedin/vardefs.php
Executable file
58
modules/Connectors/connectors/sources/ext/rest/linkedin/vardefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['ext_rest_linkedin'] = array(
|
||||
|
||||
'comment' => 'vardefs for linkedin connector',
|
||||
'fields' => array (
|
||||
'id' =>
|
||||
array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'comment' => 'Unique identifier',
|
||||
'hidden' => true,
|
||||
),
|
||||
'name'=> array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'varchar',
|
||||
'hover' => true,
|
||||
'comment' => 'The name of the company',
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2009 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1 -->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
'LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfocompany/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' .
|
||||
'ZoomInfo© dostarcza sporo informacji o ponad 45 milionach zatrudnionych w ponad 5 milionach przedsiębiorstw. Zobacz więcej na <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>',
|
||||
|
||||
'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez Zoominfo© Firma; API: Nazwa firmy, Miasto, Wokjewództwo (stan) i kraj.',
|
||||
|
||||
|
||||
//vardef labels
|
||||
'LBL_COMPANY_ID' => 'ID',
|
||||
'LBL_COMPANY_NAME' => 'Nazwa firmy',
|
||||
'LBL_STREET' => 'Ulica',
|
||||
'LBL_CITY' => 'Miasto',
|
||||
'LBL_ZIP' => 'Kod pocztowy',
|
||||
'LBL_STATE' => 'Województwo',
|
||||
'LBL_COUNTRY' => 'Kraj',
|
||||
'LBL_INDUSTRY' => 'Branża',
|
||||
'LBL_WEBSITE' => 'Strona www',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
|
||||
//Configuration labels
|
||||
'company_search_url' => 'Adres URL firmy',
|
||||
'company_detail_url' => 'Adres URL szczegółów o firmie',
|
||||
'api_key' => 'Klucz API',
|
||||
|
||||
//Other labels
|
||||
'ERROR_LBL_CONNECTION_PROBLEM' => 'Błąd: Nie można połączyć się z serwerem Zoominfo - Company connector.',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2009 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1 -->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
'LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfoperson/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' .
|
||||
'ZoomInfo© dostarcza sporo informacji o ponad 45 milionach zatrudnionych w ponad 5 milionach przedsiębiorstw. Zobacz więcej na <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>',
|
||||
|
||||
'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez Zoominfo© Osoba; API: Imię, Nazwisko i adres email.',
|
||||
|
||||
//vardef labels
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_EMAIL' => 'Adres email',
|
||||
'LBL_FIRST_NAME' => 'Imię',
|
||||
'LBL_LAST_NAME' => 'Nazwisko',
|
||||
'LBL_JOB_TITLE' => 'Stanowisko',
|
||||
'LBL_IMAGE_URL' => 'Adres URL zdjęcia',
|
||||
'LBL_SUMMARY_URL' => 'Adres URL podsumowania',
|
||||
'LBL_COMPANY_NAME' => 'Nazwa firmy',
|
||||
|
||||
//Configuration labels
|
||||
'url' => 'Adres URL',
|
||||
'api_key' => 'Klucz API',
|
||||
|
||||
//Other labels
|
||||
'ERROR_LBL_CONNECTION_PROBLEM' => 'Błąd: Nie można połączyć się z serwerem Zoominfo - Company connector.',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
|
||||
'LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/soap/hoovers/images/hooversLogo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' .
|
||||
'Hoovers© dostarcza za darmo aktualnych informacji o przedsiębiorstwach dla użytkowników produktów SugarCRM. Aby zasięgnąć pełniejszych informacji i raportów na temat firm, fabryk i ich kierownictwa, wejdź na stronę <a href="http://www.hoovers.com" target="_blank">http://www.hoovers.com</a>.</td></tr></table>',
|
||||
|
||||
//search mapping information shown in config screen
|
||||
'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez wyszukiwanie API Hoovers©: Nazwa firmy, Miasto, Województwo, Kraj i Kod pocztowy.',
|
||||
|
||||
//vardef labels
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_NAME' => 'Nazwa firmy',
|
||||
/*
|
||||
'LBL_DUNS' => 'DUNS',
|
||||
'LBL_PARENT_DUNS' => 'Parent DUNS',
|
||||
*/
|
||||
'LBL_STREET' => 'Ulica',
|
||||
'LBL_ADDRESS_STREET1' => 'Dodatkowa ulica',
|
||||
'LBL_ADDRESS_STREET2' => 'Dodatkowa ulica',
|
||||
'LBL_CITY' => 'Miasto',
|
||||
'LBL_STATE' => 'Województwo',
|
||||
'LBL_COUNTRY' => 'Kraj',
|
||||
'LBL_ZIP' => 'Kod pocztowy',
|
||||
'LBL_FINSALES' => 'Roczna sprzedaż',
|
||||
'LBL_LOCATION_TYPE' => 'Typ lokalizacji',
|
||||
'LBL_HQPHONE' => 'Telefon do biura',
|
||||
'LBL_COMPANY_TYPE' => 'Typ firmy',
|
||||
'LBL_TOTAL_EMPLOYEES' => 'Liczba zatrudnionych',
|
||||
|
||||
|
||||
//Configuration labels
|
||||
'hoovers_endpoint' => 'Endpoint URL',
|
||||
'hoovers_wsdl' => 'Adres WSDL URL',
|
||||
'hoovers_api_key' => 'Klucz API',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s: ______________________________________..
|
||||
*******************************************************************************/
|
||||
|
||||
$connector_strings = array (
|
||||
//licensing information shown in config screen
|
||||
'LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="http://www.jigsaw.com/images/cornerstone/header/jigsawLogo.jpg" border="0"></td><td width="65%" class="dataLabel">' .
|
||||
'Jigsaw© dostarcza darmowych danych o firmach dla wszystkich użytkowników SugarCRM – nie jest wymagana rejestracja! ' .
|
||||
'Zarejestrowani użytkownicy mogą używać katalogu Jigsaw©, zawierającego ponad 10 milionów kontaktów biznesowych, ' .
|
||||
'każdy składający się z nazwy, tytułu, adresu email i numeru telefonu. ' .
|
||||
'Przyłącz się na <a style="cursor:pointer" href="http://www.jigsaw.com" target="_blank">http://www.jigsaw.com</a>.</td></tr>',
|
||||
|
||||
//vardef labels
|
||||
'LBL_ID' => 'ID firmy',
|
||||
'LBL_COMPANY_NAME' => 'Nazwa firmy',
|
||||
'LBL_CITY' => 'Miasto',
|
||||
'LBL_STREET' => 'Ulica',
|
||||
'LBL_STATE' => 'Województwo',
|
||||
'LBL_ZIP' => 'Kod pocztowy',
|
||||
'LBL_COUNTRY' => 'Kraj',
|
||||
'LBL_PHONE' => 'Numer telefonu',
|
||||
'LBL_SIC_CODE' => 'Kod SIC',
|
||||
'LBL_REVENUE' => 'Roczny obrót',
|
||||
'LBL_REVENUE_RANGE' => 'Spodziewany roczny obrót',
|
||||
'LBL_OWNERSHIP' => 'Właściciel',
|
||||
'LBL_WEBSITE' => 'Strona WWW',
|
||||
'LBL_LINKED_IN_JIGSAW' => 'Strona firmy w Jigsaw',
|
||||
'LBL_INDUSTRY1' => 'Podstawowa działalność',
|
||||
'LBL_STOCK_SYMBOL' => 'Stock Symbol',
|
||||
'LBL_STOCK_EXCHANGE' => 'Stock Exchange',
|
||||
'LBL_CREATED_ON' => 'Data utworzenia profilu',
|
||||
'LBL_EMPLOYEE_COUNT' => 'Liczba zatrudnionych',
|
||||
'LBL_EMPLOYEE_RANGE' => 'Headcount Range',
|
||||
|
||||
//Error messages
|
||||
'ERROR_API_CALL' => 'Błąd: ',
|
||||
|
||||
//Configuration labels
|
||||
'range_end' => 'Osiągnięto maksymalną liczbę wyników na stronie',
|
||||
'jigsaw_wsdl' => 'Adres WSDL URL',
|
||||
'jigsaw_api_key' => 'Klucz API',
|
||||
);
|
||||
|
||||
?>
|
||||
633
modules/Connectors/controller.php
Executable file
633
modules/Connectors/controller.php
Executable file
@@ -0,0 +1,633 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
require_once('include/connectors/ConnectorFactory.php');
|
||||
require_once('include/MVC/Controller/SugarController.php');
|
||||
|
||||
class ConnectorsController extends SugarController {
|
||||
|
||||
var $admin_actions = array('ConnectorSettings', 'DisplayProperties', 'MappingProperties', 'ModifyMapping', 'ModifyDisplay', 'ModifyProperties',
|
||||
'ModifySearch', 'SearchProperties', 'SourceProperties',
|
||||
'SavedModifyDisplay', 'SaveModifyProperties', 'SaveModifySearch');
|
||||
|
||||
|
||||
function process() {
|
||||
if(!is_admin($GLOBALS['current_user']) && in_array($this->action, $this->admin_actions)) {
|
||||
$this->hasAccess = false;
|
||||
}
|
||||
parent::process();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* When the user clicks the Search button, the form is posted back here and this action sets the
|
||||
* search parameters in the session. Once this call returns, the tabs will then call RetrieveSource to load
|
||||
* the data that was saved in the session.
|
||||
*
|
||||
*/
|
||||
function action_SetSearch(){
|
||||
if(empty($_REQUEST)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->view = 'ajax';
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$searchdefs = ConnectorUtils::getSearchDefs();
|
||||
$merge_module = $_REQUEST['merge_module'];
|
||||
$record_id = $_REQUEST['record'];
|
||||
$searchDefs = isset($searchdefs) ? $searchdefs : array();
|
||||
unset($_SESSION['searchDefs'][$merge_module][$record_id]);
|
||||
$sMap = array();
|
||||
|
||||
$search_source = $_REQUEST['source_id'];
|
||||
$source_instance = ConnectorFactory::getInstance($search_source);
|
||||
$source_map = $source_instance->getModuleMapping($merge_module);
|
||||
$module_fields = array();
|
||||
foreach($_REQUEST as $search_term => $val){
|
||||
if(!empty($source_map[$search_term])){
|
||||
$module_fields[$source_map[$search_term]] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($module_fields as $search_term => $val){
|
||||
foreach($searchDefs as $source => $modules){
|
||||
if(empty($sMap[$source])){
|
||||
$instance = ConnectorFactory::getInstance($source);
|
||||
$sMap[$source] = array_flip($instance->getModuleMapping($merge_module));
|
||||
}
|
||||
|
||||
if(!empty($sMap[$source][$search_term])){
|
||||
$source_key = $sMap[$source][$search_term];
|
||||
$_SESSION['searchDefs'][$merge_module][$record_id][$source][$source_key] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This action it meant to handle the hover action on the listview.
|
||||
*
|
||||
*/
|
||||
function action_RetrieveSourceDetails() {
|
||||
$this->view = 'ajax';
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$record_id = $_REQUEST['record_id'];
|
||||
|
||||
if(empty($source_id) || empty($record_id)) {
|
||||
//display error here
|
||||
return;
|
||||
}
|
||||
$source = ConnectorFactory::getInstance($source_id);
|
||||
$module = $_SESSION['merge_module'];
|
||||
|
||||
$result = $source->fillBean(array('id' => $record_id), $module);
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$connector_strings = ConnectorUtils::getConnectorStrings($source_id);
|
||||
|
||||
$fields = $source->getModuleMapping($module);
|
||||
$fieldDefs = $source->getFieldDefs();
|
||||
$str = '';
|
||||
|
||||
foreach($fields as $key=>$field){
|
||||
|
||||
$label = $field;
|
||||
if(isset($fieldDefs[$key])) {
|
||||
$label = isset($connector_strings[$fieldDefs[$key]['vname']]) ? $connector_strings[$fieldDefs[$key]['vname']] : $label;
|
||||
}
|
||||
|
||||
$val = $result->$field;
|
||||
if(!empty($val)){
|
||||
if(strlen($val) > 50) {
|
||||
$val = substr($val, 0, 47) . '...';
|
||||
}
|
||||
$str .= $label . ': ' . $val.'<br/>';
|
||||
}
|
||||
}
|
||||
global $theme;
|
||||
$json = getJSONobj();
|
||||
$retArray = array();
|
||||
|
||||
$retArray['body'] = !empty($str) ? str_replace(array("\rn", "\r", "\n"), array('','','<br />'), $str) : $GLOBALS['mod_strings']['ERROR_NO_ADDITIONAL_DETAIL'];
|
||||
$retArray['caption'] = "<div style='float:left'>{$GLOBALS['app_strings']['LBL_ADDITIONAL_DETAILS']}</div>";
|
||||
$retArray['width'] = (empty($results['width']) ? '300' : $results['width']);
|
||||
$retArray['theme'] = $theme;
|
||||
echo 'result = ' . $json->encode($retArray);
|
||||
}
|
||||
|
||||
|
||||
function action_GetSearchForm(){
|
||||
$this->view = 'ajax';
|
||||
if(!empty($_REQUEST['source_id'])){
|
||||
//get the search fields and return the search form
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$searchdefs = ConnectorUtils::getSearchDefs();
|
||||
$merge_module = $_REQUEST['merge_module'];
|
||||
$seed = loadBean($merge_module);
|
||||
$_searchDefs = isset($searchdefs) ? $searchdefs : array();
|
||||
$_trueFields = array();
|
||||
$source = $_REQUEST['source_id'];
|
||||
|
||||
$searchLabels = ConnectorUtils::getConnectorStrings($source);
|
||||
$record = $_REQUEST['record'];
|
||||
$sourceObj = SourceFactory::getSource($source);
|
||||
$field_defs = $sourceObj->getFieldDefs();
|
||||
|
||||
if(!empty($_searchDefs[$source][$merge_module])) {
|
||||
foreach($_searchDefs[$source][$merge_module] as $key) {
|
||||
if(!empty($_SESSION['searchDefs'][$merge_module][$record][$source][$key])){
|
||||
$_trueFields[$key]['value'] = $_SESSION['searchDefs'][$merge_module][$record][$source][$key];
|
||||
}else{
|
||||
$_trueFields[$key]['value'] = '';
|
||||
}
|
||||
if(!empty($field_defs[$key]) && isset($searchLabels[$field_defs[$key]['vname']])){
|
||||
$_trueFields[$key]['label'] = $searchLabels[$field_defs[$key]['vname']];
|
||||
}else{
|
||||
$_trueFields[$key]['label'] = $key;
|
||||
}
|
||||
}//foreach
|
||||
}//fi
|
||||
|
||||
$ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$ss->assign('search_fields', $_trueFields);
|
||||
$ss->assign('source_id', $source);
|
||||
$ss->assign('fields', $seed->field_defs);
|
||||
$ss->assign('module', $merge_module);
|
||||
$ss->assign('RECORD', $record);
|
||||
$ss->assign('APP', $GLOBALS['app_strings']);
|
||||
$ss->assign('MOD', $GLOBALS['mod_strings']);
|
||||
echo $ss->fetch('modules/Connectors/tpls/search_form.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function pre_save(){}
|
||||
function post_save(){}
|
||||
|
||||
|
||||
function action_CallRest() {
|
||||
$this->view = 'ajax';
|
||||
|
||||
if(false === ($result=@file_get_contents($_REQUEST['url']))) {
|
||||
echo '';
|
||||
} else if(!empty($_REQUEST['xml'])){
|
||||
$values = array();
|
||||
$p = xml_parser_create();
|
||||
xml_parse_into_struct($p, $result, $values);
|
||||
xml_parser_free($p);
|
||||
$json = getJSONobj();
|
||||
echo $json->encode($values);
|
||||
} else {
|
||||
echo $result;
|
||||
}
|
||||
}
|
||||
|
||||
function action_CallSoap() {
|
||||
$this->view = 'ajax';
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$module = $_REQUEST['module_id'];
|
||||
$return_params = explode(',', $_REQUEST['fields']);
|
||||
require_once('include/connectors/ConnectorFactory.php');
|
||||
$component = ConnectorFactory::getInstance($source_id);
|
||||
$beans = $component->fillBeans($_REQUEST, $module);
|
||||
if(!empty($beans) && !empty($return_params)) {
|
||||
$results = array();
|
||||
$count = 0;
|
||||
foreach($beans as $bean) {
|
||||
foreach($return_params as $field) {
|
||||
$results[$count][$field] = $bean->$field;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
echo $json->encode($results);
|
||||
} else {
|
||||
echo '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function action_DefaultSoapPopup() {
|
||||
$this->view = 'ajax';
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$module = $_REQUEST['module_id'];
|
||||
$id = $_REQUEST['record_id'];
|
||||
$mapping = $_REQUEST['mapping'];
|
||||
|
||||
$mapping = explode(',', $mapping);
|
||||
//Error checking
|
||||
|
||||
//Load bean
|
||||
$bean = loadBean($module);
|
||||
$bean->retrieve($id);
|
||||
|
||||
require_once('include/connectors/ConnectorFactory.php');
|
||||
$component = ConnectorFactory::getInstance($source_id);
|
||||
//Create arguments
|
||||
$args = array();
|
||||
$field_defs = $bean->getFieldDefinitions();
|
||||
foreach($field_defs as $id=>$field) {
|
||||
if(!empty($bean->$id)) {
|
||||
$args[$id] = $bean->$id;
|
||||
}
|
||||
}
|
||||
|
||||
$beans = $component->fillBeans($args, $module);
|
||||
if(!empty($beans) && !empty($mapping)) {
|
||||
$results = array();
|
||||
$count = 0;
|
||||
foreach($beans as $bean) {
|
||||
foreach($mapping as $field) {
|
||||
$results[$count][$field] = $bean->$field;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
echo $json->encode($results);
|
||||
} else {
|
||||
$GLOBALS['log']->error($GLOBALS['app_strings']['ERR_MISSING_MAPPING_ENTRY_FORM_MODULE']);
|
||||
echo '';
|
||||
}
|
||||
}
|
||||
|
||||
function action_SaveModifyProperties() {
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
$sources = array();
|
||||
$properties = array();
|
||||
foreach($_REQUEST as $name=>$value) {
|
||||
if(preg_match("/^source[0-9]+$/", $name, $matches)) {
|
||||
$source_id = $value;
|
||||
$properties = array();
|
||||
foreach($_REQUEST as $arg=>$val) {
|
||||
if(preg_match("/^{$source_id}_(.*?)$/", $arg, $matches2)) {
|
||||
$properties[$matches2[1]] = $val;
|
||||
}
|
||||
}
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
if(!empty($properties)) {
|
||||
$source->setProperties($properties);
|
||||
$source->saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
ConnectorUtils::updateMetaDataFiles();
|
||||
// BEGIN SUGAR INT
|
||||
if(empty($_REQUEST['from_unit_test'])) {
|
||||
// END SUGAR INT
|
||||
header("Location: index.php?action=ConnectorSettings&module=Connectors");
|
||||
// BEGIN SUGAR INT
|
||||
}
|
||||
// END SUGAR INT
|
||||
}
|
||||
|
||||
function action_SaveModifyDisplay() {
|
||||
if(empty($_REQUEST['display_sources'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
$connectors = ConnectorUtils::getConnectors();
|
||||
$connector_keys = array_keys($connectors);
|
||||
|
||||
$modules_sources = ConnectorUtils::getDisplayConfig();
|
||||
|
||||
$sources = array();
|
||||
$values = array();
|
||||
$new_modules_sources = array();
|
||||
|
||||
if(!empty($_REQUEST['display_values'])) {
|
||||
$display_values = explode(',', $_REQUEST['display_values']);
|
||||
foreach($display_values as $value) {
|
||||
$entry = explode(':', $value);
|
||||
$new_modules_sources[$entry[1]][$entry[0]] = $entry[0];
|
||||
}
|
||||
}
|
||||
|
||||
//These are the sources that were modified.
|
||||
//We only update entries for these sources that have been changed
|
||||
$display_sources = explode(',', $_REQUEST['display_sources']);
|
||||
foreach($display_sources as $source) {
|
||||
$sources[$source] = $source;
|
||||
} //foreach
|
||||
|
||||
$removedModules = array();
|
||||
|
||||
//Unset entries that have all sources removed
|
||||
foreach($modules_sources as $module=>$source_entries) {
|
||||
foreach($source_entries as $source_id) {
|
||||
if(!empty($sources[$source_id]) && empty($new_modules_sources[$module][$source_id])) {
|
||||
unset($modules_sources[$module][$source_id]);
|
||||
$removedModules[$module] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$removedModules = array_keys($removedModules);
|
||||
foreach($removedModules as $key){
|
||||
if(empty($new_modules_sources[$key])){
|
||||
ConnectorUtils::cleanMetaDataFile($key);
|
||||
}
|
||||
}
|
||||
|
||||
//Update based on new_modules_sources
|
||||
foreach($new_modules_sources as $module=>$enabled_sources) {
|
||||
//If the module is not in $modules_sources add it there
|
||||
if(empty($modules_sources[$module])) {
|
||||
$modules_sources[$module] = $enabled_sources;
|
||||
} else {
|
||||
foreach($enabled_sources as $source_id) {
|
||||
if(empty($modules_sources[$module][$source_id])) {
|
||||
$modules_sources[$module][$source_id] = $source_id;
|
||||
}
|
||||
} //foreach
|
||||
}
|
||||
} //foreach
|
||||
|
||||
//Should we just remove entries where all sources are disabled?
|
||||
$unset_modules = array();
|
||||
foreach($modules_sources as $module=>$mapping) {
|
||||
if(empty($mapping)) {
|
||||
$unset_modules[] = $module;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($unset_modules as $mod) {
|
||||
unset($modules_sources[$mod]);
|
||||
}
|
||||
|
||||
if(!write_array_to_file('modules_sources', $modules_sources, CONNECTOR_DISPLAY_CONFIG_FILE)) {
|
||||
//Log error and return empty array
|
||||
$GLOBALS['log']->fatal("Cannot write \$modules_sources to " . CONNECTOR_DISPLAY_CONFIG_FILE);
|
||||
}
|
||||
|
||||
$sources_modules = array();
|
||||
foreach($modules_sources as $module=>$source_entries) {
|
||||
foreach($source_entries as $id) {
|
||||
$sources_modules[$id][$module] = $module;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Now update the searchdefs and field mapping entries accordingly
|
||||
require('modules/Connectors/metadata/searchdefs.php');
|
||||
$originalSearchDefs = $searchdefs;
|
||||
$connectorSearchDefs = ConnectorUtils::getSearchDefs();
|
||||
|
||||
$searchdefs = array();
|
||||
foreach($sources_modules as $source_id=>$modules) {
|
||||
foreach($modules as $module) {
|
||||
$searchdefs[$source_id][$module] = !empty($connectorSearchDefs[$source_id][$module]) ? $connectorSearchDefs[$source_id][$module] : (!empty($originalSearchDefs[$source_id][$module]) ? $originalSearchDefs[$source_id][$module] : array());
|
||||
}
|
||||
}
|
||||
|
||||
//Write the new searchdefs out
|
||||
if(!write_array_to_file('searchdefs', $searchdefs, 'custom/modules/Connectors/metadata/searchdefs.php')) {
|
||||
$GLOBALS['log']->fatal("Cannot write file custom/modules/Connectors/metadata/searchdefs.php");
|
||||
}
|
||||
|
||||
//Unset the $_SESSION['searchDefs'] variable
|
||||
if (isset($_SESSION['searchDefs'])) {
|
||||
unset($_SESSION['searchDefs']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Clear mapping file if needed (this happens when all modules are removed from a source
|
||||
foreach($sources as $id) {
|
||||
if(empty($sources_modules[$source])) {
|
||||
//Now write the new mapping entry to the custom folder
|
||||
$dir = $connectors[$id]['directory'];
|
||||
if(!preg_match('/^custom\//', $dir)) {
|
||||
$dir = 'custom/' . $dir;
|
||||
}
|
||||
|
||||
if(!file_exists("{$dir}")) {
|
||||
mkdir_recursive("{$dir}");
|
||||
}
|
||||
|
||||
if(!write_array_to_file('mapping', array('beans'=>array()), "{$dir}/mapping.php")) {
|
||||
$GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php");
|
||||
}
|
||||
} //if
|
||||
} //foreach
|
||||
|
||||
//Now update the field mapping entries
|
||||
foreach($sources_modules as $id=>$modules) {
|
||||
$source = SourceFactory::getSource($id);
|
||||
$mapping = $source->getMapping();
|
||||
$mapped_modules = array_keys($mapping['beans']);
|
||||
|
||||
foreach($mapped_modules as $module) {
|
||||
if(empty($sources_modules[$id][$module])) {
|
||||
unset($mapping['beans'][$module]);
|
||||
}
|
||||
}
|
||||
|
||||
//Remove modules from the mapping entries
|
||||
foreach($modules as $module) {
|
||||
if(empty($mapping['beans'][$module])) {
|
||||
$originalMapping = $source->getOriginalMapping();
|
||||
if(empty($originalMapping['beans'][$module])) {
|
||||
$defs = $source->getFieldDefs();
|
||||
$keys = array_keys($defs);
|
||||
$new_mapping_entry = array();
|
||||
foreach($keys as $key) {
|
||||
$new_mapping_entry[$key] = '';
|
||||
}
|
||||
$mapping['beans'][$module] = $new_mapping_entry;
|
||||
} else {
|
||||
$mapping['beans'][$module] = $originalMapping['beans'][$module];
|
||||
}
|
||||
} //if
|
||||
|
||||
} //foreach
|
||||
|
||||
//Now write the new mapping entry to the custom folder
|
||||
$dir = $connectors[$id]['directory'];
|
||||
if(!preg_match('/^custom\//', $dir)) {
|
||||
$dir = 'custom/' . $dir;
|
||||
}
|
||||
|
||||
if(!file_exists("{$dir}")) {
|
||||
mkdir_recursive("{$dir}");
|
||||
}
|
||||
|
||||
if(!write_array_to_file('mapping', $mapping, "{$dir}/mapping.php")) {
|
||||
$GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php");
|
||||
}
|
||||
|
||||
} //foreach
|
||||
|
||||
ConnectorUtils::updateMetaDataFiles();
|
||||
// BEGIN SUGAR INT
|
||||
if(empty($_REQUEST['from_unit_test'])) {
|
||||
// END SUGAR INT
|
||||
header("Location: index.php?action=ConnectorSettings&module=Connectors");
|
||||
// BEGIN SUGAR INT
|
||||
}
|
||||
// END SUGAR INT
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* action_SaveModifyMapping
|
||||
*/
|
||||
function action_SaveModifyMapping() {
|
||||
$mapping_sources = !empty($_REQUEST['mapping_sources']) ? explode(',', $_REQUEST['mapping_sources']) : array();
|
||||
$mapping_values = !empty($_REQUEST['mapping_values']) ? explode(',', $_REQUEST['mapping_values']) : array();
|
||||
|
||||
//Build the source->module->fields mapping
|
||||
$source_modules_fields = array();
|
||||
foreach($mapping_values as $id) {
|
||||
$parts = explode(':', $id);
|
||||
$key_vals = explode('=', $parts[2]);
|
||||
//Note the strtolwer call... we are lowercasing the key values
|
||||
$source_modules_fields[$parts[0]][$parts[1]][strtolower($key_vals[0])] = $key_vals[1];
|
||||
} //foreach
|
||||
|
||||
foreach($mapping_sources as $source_id) {
|
||||
if(empty($source_modules_fields[$source_id])) {
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
$mapping = $source->getMapping();
|
||||
foreach($mapping['beans'] as $module=>$entry) {
|
||||
$source_modules_fields[$source_id][$module] = array();
|
||||
}
|
||||
}
|
||||
} //foreach
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$source_entries = ConnectorUtils::getConnectors();
|
||||
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
foreach($source_modules_fields as $id=>$mapping_entry) {
|
||||
//Insert the id mapping
|
||||
foreach($mapping_entry as $module=>$entry) {
|
||||
$mapping_entry[$module]['id'] = 'id';
|
||||
}
|
||||
|
||||
$source = SourceFactory::getSource($id);
|
||||
$mapping = $source->getMapping();
|
||||
$mapping['beans'] = $mapping_entry;
|
||||
|
||||
//Now write the new mapping entry to the custom folder
|
||||
$dir = $source_entries[$id]['directory'];
|
||||
if(!preg_match('/^custom\//', $dir)) {
|
||||
$dir = 'custom/' . $dir;
|
||||
}
|
||||
|
||||
if(!file_exists("{$dir}")) {
|
||||
mkdir_recursive("{$dir}");
|
||||
}
|
||||
|
||||
if(!write_array_to_file('mapping', $mapping, "{$dir}/mapping.php")) {
|
||||
$GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php");
|
||||
}
|
||||
}
|
||||
|
||||
//Rewrite the metadata files
|
||||
ConnectorUtils::updateMetaDataFiles();
|
||||
|
||||
// BEGIN SUGAR INT
|
||||
if(empty($_REQUEST['from_unit_test'])) {
|
||||
// END SUGAR INT
|
||||
header("Location: index.php?action=ConnectorSettings&module=Connectors");
|
||||
// BEGIN SUGAR INT
|
||||
}
|
||||
// END SUGAR INT
|
||||
}
|
||||
|
||||
|
||||
function action_RunTest() {
|
||||
$this->view = 'ajax';
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
$properties = array();
|
||||
foreach($_REQUEST as $name=>$value) {
|
||||
if(preg_match("/^{$source_id}_(.*?)$/", $name, $matches)) {
|
||||
$properties[$matches[1]] = $value;
|
||||
}
|
||||
}
|
||||
$source->setProperties($properties);
|
||||
$source->saveConfig();
|
||||
|
||||
//Call again and call init
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
$source->init();
|
||||
|
||||
global $mod_strings;
|
||||
try {
|
||||
if($source->isRequiredConfigFieldsForButtonSet() && $source->test()) {
|
||||
echo $mod_strings['LBL_TEST_SOURCE_SUCCESS'];
|
||||
} else {
|
||||
echo $mod_strings['LBL_TEST_SOURCE_FAILED'];
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
$GLOBALS['log']->fatal($ex->getMessage());
|
||||
echo $ex->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* action_RetrieveSources
|
||||
* Returns a JSON encoded format of the Connectors that are configured for the system
|
||||
*
|
||||
*/
|
||||
function action_RetrieveSources() {
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$this->view = 'ajax';
|
||||
$sources = ConnectorUtils:: getConnectors();
|
||||
$results = array();
|
||||
foreach($sources as $id=>$entry) {
|
||||
$results[$id] = !empty($entry['name']) ? $entry['name'] : $id;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
echo $json->encode($results);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
117
modules/Connectors/language/en_us.lang.php
Executable file
117
modules/Connectors/language/en_us.lang.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
|
||||
'LBL_ADD_MODULE' => 'Add',
|
||||
'LBL_ADDRCITY' => 'City',
|
||||
'LBL_ADDRCOUNTRY' => 'Country',
|
||||
'LBL_ADDRCOUNTRY_ID' => 'Country Id',
|
||||
'LBL_ADDRSTATEPROV' => 'State',
|
||||
'LBL_ADMINISTRATION' => 'Connector Administration',
|
||||
'LBL_ADMINISTRATION_MAIN' => 'Connector Settings',
|
||||
'LBL_AVAILABLE' => 'Available',
|
||||
'LBL_BACK' => '< Back',
|
||||
'LBL_COMPANY_ID' => 'Company Id',
|
||||
'LBL_CONFIRM_CONTINUE_SAVE' => 'Some required fields have been left blank. Proceed to save changes?',
|
||||
'LBL_CONNECTOR' => 'Connector',
|
||||
'LBL_CONNECTOR_FIELDS' => 'Connector Fields',
|
||||
'LBL_DATA' => 'Data',
|
||||
'LBL_DEFAULT' => 'Default',
|
||||
'LBL_DELETE_MAPPING_ENTRY' => 'Are you sure you want to delete this entry?',
|
||||
'LBL_DISABLED' => 'Disabled',
|
||||
'LBL_DUNS' => 'DUNS',
|
||||
'LBL_EMPTY_BEANS' => 'No matches were found for your search criteria.',
|
||||
'LBL_ENABLED' => 'Enabled',
|
||||
'LBL_FINSALES' => 'Finsales',
|
||||
'LBL_MARKET_CAP' => 'Market Cap',
|
||||
'LBL_MERGE' => 'Merge',
|
||||
'LBL_MODIFY_DISPLAY_TITLE' => 'Enable Connectors',
|
||||
'LBL_MODIFY_DISPLAY_DESC' => 'Select which modules are enabled for each connector.',
|
||||
'LBL_MODIFY_DISPLAY_PAGE_TITLE' => 'Connector Settings: Enable Connectors',
|
||||
'LBL_MODULE_FIELDS' => 'Module Fields',
|
||||
'LBL_MODIFY_MAPPING_TITLE' => 'Map Connector Fields',
|
||||
'LBL_MODIFY_MAPPING_DESC' => 'Map connector fields to module fields in order to determine what connector data can be viewed and merged into the module records.',
|
||||
'LBL_MODIFY_MAPPING_PAGE_TITLE' => 'Connector Settings: Map Connector Fields',
|
||||
'LBL_MODIFY_PROPERTIES_TITLE' => 'Set Connector Properties',
|
||||
'LBL_MODIFY_PROPERTIES_DESC' => 'Configure the properties for each connector, including URLs and API keys.',
|
||||
'LBL_MODIFY_PROPERTIES_PAGE_TITLE' => 'Connector Settings: Set Connector Properties',
|
||||
'LBL_MODIFY_SEARCH_TITLE' => 'Manage Connector Search',
|
||||
'LBL_MODIFY_SEARCH' => 'Search',
|
||||
'LBL_MODIFY_SEARCH_DESC' => 'Select the connector fields to use to search for data for each module.',
|
||||
'LBL_MODIFY_SEARCH_PAGE_TITLE' => 'Connector Settings: Manage Connector Search',
|
||||
'LBL_MODULE_NAME' => 'Connectors',
|
||||
'LBL_NO_PROPERTIES' => 'There are no configurable properties for this connector.',
|
||||
'LBL_PARENT_DUNS' => 'Parent DUNS',
|
||||
'LBL_PREVIOUS' => '< Back',
|
||||
'LBL_QUOTE' => 'Quote',
|
||||
'LBL_RECNAME' => 'Company Name',
|
||||
'LBL_RESET_TO_DEFAULT' => 'Reset to Default',
|
||||
'LBL_RESET_TO_DEFAULT_CONFIRM' => 'Are you sure you want to reset to the default configuration?',
|
||||
'LBL_RESET_BUTTON_TITLE' => 'Reset [Alt+R]',
|
||||
'LBL_RESULT_LIST' => 'Data List',
|
||||
'LBL_RUN_WIZARD' => 'Run Wizard',
|
||||
'LBL_SAVE' => 'Save',
|
||||
'LBL_SEARCHING_BUTTON_LABEL' => 'Searching...',
|
||||
'LBL_SHOW_IN_LISTVIEW' => 'Show In Merge Listview',
|
||||
'LBL_SMART_COPY' => 'Smart Copy',
|
||||
'LBL_SUMMARY' => 'Summary',
|
||||
'LBL_STEP1' => 'Search and View Data',
|
||||
'LBL_STEP2' => 'Merge Records with',
|
||||
'LBL_TEST_SOURCE' => 'Test Connector',
|
||||
'LBL_TEST_SOURCE_FAILED' => 'Test Failed',
|
||||
'LBL_TEST_SOURCE_RUNNING' => 'Performing Test...',
|
||||
'LBL_TEST_SOURCE_SUCCESS' => 'Test Successful',
|
||||
'LBL_TITLE' => 'Data Merge',
|
||||
'LBL_ULTIMATE_PARENT_DUNS' => 'Ultimate Parent DUNS',
|
||||
|
||||
'ERROR_RECORD_NOT_SELECTED' => 'Error: Please select a record from the list before proceeding.',
|
||||
'ERROR_EMPTY_WRAPPER' => 'Error: Unable to retrieve wrapper instance for the source [{$source_id}]',
|
||||
'ERROR_EMPTY_SOURCE_ID' => 'Error: Source Id not specified or empty.',
|
||||
'ERROR_EMPTY_RECORD_ID' => 'Error: Record Id not specified or empty.',
|
||||
'ERROR_NO_ADDITIONAL_DETAIL' => 'Error: No additional details were found for the record.',
|
||||
'ERROR_NO_SEARCHDEFS_DEFINED' => 'No modules have been enabled for this connector. Select a module for this connector in the Enable Connectors page.',
|
||||
'ERROR_NO_SEARCHDEFS_MAPPED' => 'Error: There are no connectors enabled that have search fields defined.',
|
||||
'ERROR_NO_SOURCEDEFS_FILE' => 'Error: No sourcedefs.php file could be found.',
|
||||
'ERROR_NO_SOURCEDEFS_SPECIFIED' => 'Error: No sources were specified from which to retrieve data.',
|
||||
'ERROR_NO_CONNECTOR_DISPLAY_CONFIG_FILE' => 'Error: There are no connectors mapped to this module.',
|
||||
'ERROR_NO_SEARCHDEFS_MAPPING' => 'Error: There are no search fields defined for the module and connector. Please contact the system administrator.',
|
||||
'ERROR_NO_FIELDS_MAPPED' => 'Error: You must map at least one Connector field to a module field for each module entry.',
|
||||
'ERROR_NO_DISPLAYABLE_MAPPED_FIELDS' => 'Error: There are no module fields that have been mapped for display in the results. Please contact the system administrator.',
|
||||
);
|
||||
|
||||
?>
|
||||
51
modules/Connectors/language/pl.help.ModifySearch.html
Executable file
51
modules/Connectors/language/pl.help.ModifySearch.html
Executable file
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Wyszukiwanie w łącznikach</h1>
|
||||
<br>
|
||||
<p>Użyj tej strony, aby wybrać pola, za pomocą których użytkownicy będą mogli wyszukać dane źródłowe. To, ile pól wybierzesz jest limitowane parametrami Wyszukiwania, jakie są wspierane przez dane źródło.<br>
|
||||
<p>Jigsaw wspiera tylko Nazwę firmy. Hoovers wspiera Nazwę firmy, Miasto, Województwo, Kraj i Kod pocztowy.<br>
|
||||
<p>Kliknij <span class="helpButton">Zachowaj</span> by zapisać mapowania; kliknij <span class="helpButton">Skasuj</span>, aby opuścić formularz bez zapisywania mapowań.
|
||||
52
modules/Connectors/language/pl_pl.help.ConnectorSettings.html
Executable file
52
modules/Connectors/language/pl_pl.help.ConnectorSettings.html
Executable file
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Ustawienia łączników</h1>
|
||||
<br>
|
||||
<p>Użyj tej strony do zarządzania łącznikami do zewnętrznych źródeł danych.<br>
|
||||
<ul>
|
||||
<li><span class="helpButton">Konfiguracja właściwości łącznika</span>. Wybierz tę opcję, aby skonfigurować adres URL i klucze API łącznika.
|
||||
<li><span class="helpButton">Włącz łączniki</span>. Ta opcja włącza łączniki w modułach Sugar.
|
||||
<li><span class="helpButton">Mapuj pola łączników</span>. Za pomocą tej opcji skonfigurujesz mapowania pól pomiędzy łącznikiem a modułem Sugar.
|
||||
<li><span class="helpButton">Zarządzaj wyszukiwaniem w łącznikach</span>. Używając tej opcji określasz które pola źródeł danych będą dostępne do przeszukania przez użytkowników.
|
||||
</ul>
|
||||
|
||||
45
modules/Connectors/language/pl_pl.help.ModifyDisplay.html
Executable file
45
modules/Connectors/language/pl_pl.help.ModifyDisplay.html
Executable file
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Włączenie łączników</h1>
|
||||
<br>
|
||||
Użyj tej strony do włączenia łączników źródeł zewnętrznych dla modułów Sugar.<br>
|
||||
<p>Możesz włączyć łączniki dla dowolnego modułu standardowego, pojawiającego się w Studio, lub własnego, są one zaprojektowane dla modułów typu firma, lub osoba, takich jak Klienci, Wizytówki i Kontakty. Moduł musi również mieć standardowy widok szczegółowy.<br>
|
||||
<p>Aby włączyć łącznik dla modułu, we właściwej zakładce łącznika przeciągnij moduł z listy Wyłączonych do listy Włączonych.<br>
|
||||
<p>Kliknij <span class="helpButton">Zachowaj</span>, aby zapisać zmiany ustawień. Kliknij <span class="helpButton">Skasuj</span> aby opuścić formularz bez zapisywania ustawień.
|
||||
47
modules/Connectors/language/pl_pl.help.ModifyMapping.html
Executable file
47
modules/Connectors/language/pl_pl.help.ModifyMapping.html
Executable file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Mapowanie pól łączników</h1>
|
||||
<br>
|
||||
<p>Użycie tej opcji mapuje dane z pól w źródłach danych do pól w łącznikach, włączonych w modułach Sugar. Dla łączników, które są instalowane wraz z aplikacją, odpowiednie pola są mapowane domyślnie. Możesz zmienić te mapowania, lub dodać nowe pola.<br>
|
||||
<p>Aby zmienić domyślne mapowania, lub dodać nowe pola, wybierz pola aplikacji z listy rozwijalnej, odpowiedniej dla pola w łączniku we właściwej belce łącznika.<br>
|
||||
<p>Kliknij <span class="helpButton">Zachowaj</span>, aby zapisać zmiany mapowań. Kliknij <span class="helpButton">Skasuj</span> aby opuścić formularz bez zapisywania mapowań.
|
||||
62
modules/Connectors/language/pl_pl.help.ModifyProperties.html
Executable file
62
modules/Connectors/language/pl_pl.help.ModifyProperties.html
Executable file
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Konfiguracja właściwości łącznika</h1>
|
||||
<br>
|
||||
Użyj tej strony, aby skonfigurować adresy URL i klucze API dla łączników.
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>Na tej stronie są wyświetlone zakładki dla łączników, jakie dostarcza aplikacja. <br>Zakładki dla dowolnych innych łączników, które zainstalujesz, również wyświetlą się na tej stronie.<br>
|
||||
<p>Możesz ustawić następujące parametry konfiguracji łączników:<br>
|
||||
<ul>
|
||||
<li><span class="helpButton">Adres URL</span>. Jeśli adres URL łącznika zmienił się - wprowadź nowy.<br>
|
||||
|
||||
<br>The Endpoint URL field on the Hoover's tab displays the URL to the actual location to which soap calls are made.
|
||||
<li><span class="helpButton">Klucze API</span>. Musisz posiadać klucze API, aby używać łączników do Jigsaw i Hoovers. Aplikacja Sugar dostarcza ships with wstępne klucze API dla obu łączników.
|
||||
<li><span class="helpButton">Maksymalna liczba na liście wyników</span>. Aby zmienić liczbę wyników wyświetlanych na stronie, wprowadź pożądaną liczbę. Wartość domyślna to 20 rekordów na stronę.
|
||||
|
||||
</ul>
|
||||
<p>Kliknij <span class="helpButton">Zachowaj</span>, aby zapisać zmiany ustawień. Kliknij <span class="helpButton">Skasuj</span> aby opuścić formularz bez zapisywania ustawien.
|
||||
53
modules/Connectors/language/pl_pl.help.Step1.html
Executable file
53
modules/Connectors/language/pl_pl.help.Step1.html
Executable file
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Wyszukaj i pokaż dane</h1>
|
||||
<br>
|
||||
<p>Użyj tej strony aby wyszukać dane w źródłach danych za pomocą słów kluczowych.<br>
|
||||
<ol>
|
||||
<li>Kliknij zakładkę łącznika źródła danych, którego chcesz użyć.
|
||||
<li>Wprowadź słowo kluczowe w panelu wyszukiwania i kliknij <span class="helpButton">Wyszukaj</span>.
|
||||
<br>Wynik wyszukiwania wyświetli się wewnątrz zakładki łącznika źródła danych.
|
||||
<li>Aby zobaczyć dane rekordu źródła danych w okienku pop-up, zawierających dodatkowe dane, które mogą nie być dostępne w widoku listy, umieść kursor na dolnej strzałce, przylegającej do klawisza Wybierz.
|
||||
<li>Z wyświetlonych poniżej wyników wyszukiwania, wybierz rekordy źródła danych, których dane chcesz scalić z rekordami Sugar.
|
||||
<li>Aby scalić dane, kliknij <span class="helpButton">Scal</span>.
|
||||
</ol>
|
||||
|
||||
50
modules/Connectors/language/pl_pl.help.Step2.html
Executable file
50
modules/Connectors/language/pl_pl.help.Step2.html
Executable file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Scalanie rekordów</h1>
|
||||
<br>
|
||||
<p>Użyj tej strony do scalania informacji, pochodzących z zewnętrznych źródeł danych z danymi zawartymi w rekordach aplikacji Sugar. Kolumna, umieszczona najbardziej z lewej strony wyświetla dane istniejące w rekordach Sugar. Kolumna po prawej - wybrane dane z zewnętrznych źródeł.<br>
|
||||
<ol>
|
||||
<li>Aby scalić dane z określonym polem aplikacji, kliknij odpowiadający jej przycisk ze strzałką skierowaną w lewo. Aby scalić dane ze wszystkich pól, kliknj przycisk <span class="helpButton">Sprytna kopia</span>.
|
||||
<br>Jeśli masz do scalenia dane pochodzące z dwóch, lub więcej źródeł danych, Sprytna kopia scali dane najpierw z kolumny, umieszczonej najbardziej z prawej strony. Dane po scaleniu wyświetlą się w lewej kolumnie.
|
||||
<li>Kliknij <span class="helpButton">Zachowaj</span>, aby zatwierdzić dane wprowadzone do rekordu aplikacji Sugar.
|
||||
</ol>
|
||||
115
modules/Connectors/language/pl_pl.lang.php
Executable file
115
modules/Connectors/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
|
||||
'LBL_ADD_MODULE' => 'Dodaj',
|
||||
'LBL_ADDRCITY' => 'Miasto',
|
||||
'LBL_ADDRCOUNTRY' => 'Kraj',
|
||||
'LBL_ADDRCOUNTRY_ID' => 'ID kraju',
|
||||
'LBL_ADDRSTATEPROV' => 'Województwo',
|
||||
'LBL_ADMINISTRATION' => 'Administracja łącznikami',
|
||||
'LBL_ADMINISTRATION_MAIN' => 'Ustawienia łącznika',
|
||||
'LBL_AVAILABLE' => 'Dostępne',
|
||||
'LBL_BACK' => '< Z powrotem',
|
||||
'LBL_COMPANY_ID' => 'ID przedsiębiorstwa',
|
||||
'LBL_CONNECTOR' => 'Łącznik',
|
||||
'LBL_CONNECTOR_FIELDS' => 'Pola łącznika',
|
||||
'LBL_DATA' => 'Dane',
|
||||
'LBL_DEFAULT' => 'Domyślne',
|
||||
'LBL_DELETE_MAPPING_ENTRY' => 'Czy na pewno chcesz usunąć ten wpis?',
|
||||
'LBL_DISABLED' => 'Niedostępne',
|
||||
'LBL_DUNS' => 'DUNS',
|
||||
'LBL_EMPTY_BEANS' => 'Nie znaleziono wyników pasujących do zadanych kryteriów wyszukiwania.',
|
||||
'LBL_ENABLED' => 'Włączone',
|
||||
'LBL_FINSALES' => 'Finsales',
|
||||
'LBL_MARKET_CAP' => 'Market Cap',
|
||||
'LBL_MERGE' => 'Połącz',
|
||||
'LBL_MODIFY_DISPLAY_TITLE' => 'Włącz łączniki',
|
||||
'LBL_MODIFY_DISPLAY_DESC' => 'Wybierz, które łączniki zostaną włączone dla których modułów.',
|
||||
'LBL_MODIFY_DISPLAY_PAGE_TITLE' => 'Ustawienia łączników: Włączanie łączników',
|
||||
'LBL_MODULE_FIELDS' => 'Pola modułu',
|
||||
'LBL_MODIFY_MAPPING_TITLE' => 'Mapowanie pól łączników',
|
||||
'LBL_MODIFY_MAPPING_DESC' => 'Mapuj pola łączników do pól modułów w celu określnia, które dane łącznika będą widoczne i połączone z rekordami modułu.',
|
||||
'LBL_MODIFY_MAPPING_PAGE_TITLE' => 'Ustawienia łączników: Mapuj pola łączników',
|
||||
'LBL_MODIFY_PROPERTIES_TITLE' => 'Konfiguracja właściwości łącznika',
|
||||
'LBL_MODIFY_PROPERTIES_DESC' => 'Konfiguruj właściwości dla każdego łącznika, również adresy URL i klucze API.',
|
||||
'LBL_MODIFY_PROPERTIES_PAGE_TITLE' => 'Ustawienia łączników: Ustawienia właściwości łącznika',
|
||||
'LBL_MODIFY_SEARCH_TITLE' => 'Zarządzaj wyszukiwaniem w łącznikach',
|
||||
'LBL_MODIFY_SEARCH' => 'Wyszukaj',
|
||||
'LBL_MODIFY_SEARCH_DESC' => 'Wybierz pola łącznika, które będą przeszukiwane dla każdego modułu.',
|
||||
'LBL_MODIFY_SEARCH_PAGE_TITLE' => 'Ustawienia łączników: Zarządzanie wyszukiwaniem w łącznikach',
|
||||
'LBL_MODULE_NAME' => 'Łączniki',
|
||||
'LBL_NO_PROPERTIES' => 'Nie ma konfigurowalnych właściwości dla tego łącznika.',
|
||||
'LBL_PARENT_DUNS' => 'Nadrzędne DUNS',
|
||||
'LBL_PREVIOUS' => '< Z powrotem',
|
||||
'LBL_QUOTE' => 'Zapytanie',
|
||||
'LBL_RECNAME' => 'Nazwa firmy',
|
||||
'LBL_RESET_TO_DEFAULT' => 'Wróć do domyślnych ustawień',
|
||||
'LBL_RESET_TO_DEFAULT_CONFIRM' => 'Czy na pewno chcesz powrócić do domyślnych ustawień?',
|
||||
'LBL_RESET_BUTTON_TITLE' => 'Reset [Alt+R]',
|
||||
'LBL_RESULT_LIST' => 'Lista danych',
|
||||
'LBL_RUN_WIZARD' => 'Uruchom kreator',
|
||||
'LBL_SAVE' => 'Zachowaj',
|
||||
'LBL_SEARCHING_BUTTON_LABEL' => 'Wyszukiwanie...',
|
||||
'LBL_SHOW_IN_LISTVIEW' => 'Pokaż w widoku scalania',
|
||||
'LBL_SMART_COPY' => 'Sprytna kopia',
|
||||
'LBL_SUMMARY' => 'Podsumowanie',
|
||||
'LBL_STEP1' => 'Wyszukaj i pokaż dane',
|
||||
'LBL_STEP2' => 'Scal rekordy z',
|
||||
'LBL_TEST_SOURCE' => 'Sprawdź działanie łącznika',
|
||||
'LBL_TEST_SOURCE_FAILED' => 'Test nie powiódł się',
|
||||
'LBL_TEST_SOURCE_RUNNING' => 'Przeprowadzam test...',
|
||||
'LBL_TEST_SOURCE_SUCCESS' => 'Test zakończony powodzeniem',
|
||||
'LBL_TITLE' => 'Scalanie danych',
|
||||
'LBL_ULTIMATE_PARENT_DUNS' => 'Ultimate Parent DUNS',
|
||||
|
||||
'ERROR_RECORD_NOT_SELECTED' => 'Błąd: Wybierz przed kontynuacją wybierz rekord z listy.',
|
||||
'ERROR_EMPTY_WRAPPER' => 'Error: Unable to retrieve wrapper instance for the source [{$source_id}]',
|
||||
'ERROR_EMPTY_SOURCE_ID' => 'Błąd: ID źródła nie określone, lub puste.',
|
||||
'ERROR_EMPTY_RECORD_ID' => 'Błąd: ID Rekordu nie określone, lub puste.',
|
||||
'ERROR_NO_ADDITIONAL_DETAIL' => 'Błąd: Nie znaleziono dodatkowych szczegółów dla tego rekordu.',
|
||||
'ERROR_NO_SEARCHDEFS_DEFINED' => 'Żadne moduły nie zostały włączone dla tego łącznika. Wybierz moduł dla tego łącznika na stronie <b>Włączanie łączników</b>.',
|
||||
'ERROR_NO_SOURCEDEFS_FILE' => 'Błąd: Nie odnaleziono pliku sourcedefs.php.',
|
||||
'ERROR_NO_SOURCEDEFS_SPECIFIED' => 'Bład: Nie określono źródeł, z których należało pobrać dane.',
|
||||
'ERROR_NO_CONNECTOR_DISPLAY_CONFIG_FILE' => 'Bład: Nie ma łączników zamapowanych do tego modułu.',
|
||||
'ERROR_NO_SEARCHDEFS_MAPPING' => 'Bład: Nie ma zdefiniowanych pól wyszukiwania dla modułu i łącznika. Skontaktuj się z administratorem systemu.',
|
||||
'ERROR_NO_FIELDS_MAPPED' => 'Błąd: Musisz zamapować co najmniej jedno pole łącznika do pola modułu dla każdego wybranego modułu.',
|
||||
'ERROR_NO_DISPLAYABLE_MAPPED_FIELDS' => 'Bład: Nie ma zdefiniowanych pól modułu, które zostały zamapowane do wyświetlenia w wynikach . Skontaktuj się z administratorem systemu.',
|
||||
);
|
||||
|
||||
?>
|
||||
42
modules/Connectors/metadata/searchdefs.php
Executable file
42
modules/Connectors/metadata/searchdefs.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchdefs = array(
|
||||
|
||||
|
||||
)
|
||||
?>
|
||||
101
modules/Connectors/tpls/administration.tpl
Executable file
101
modules/Connectors/tpls/administration.tpl
Executable file
@@ -0,0 +1,101 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<table class='edit view small' width="100%" border="0" cellspacing="1" cellpadding="0" >
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
<table border="0" cellspacing="2" cellpadding="0" >
|
||||
<tr valign='top'>
|
||||
<td><img src="{$IMG}icon_ConnectorConfig.gif" name="connectorConfig" onclick="document.location.href='index.php?module=Connectors&action=ModifyProperties';"
|
||||
onMouseOver="document.connectorConfig.src='{$IMG}icon_ConnectorConfigOver.gif'"
|
||||
onMouseOut="document.connectorConfig.src='{$IMG}icon_ConnectorConfig.gif'"></td>
|
||||
<td> </td>
|
||||
<td><b>{$mod.LBL_MODIFY_PROPERTIES_TITLE}</b><br/>
|
||||
{$mod.LBL_MODIFY_PROPERTIES_DESC}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2> </td>
|
||||
</tr>
|
||||
<tr valign='top'>
|
||||
<td><img src="{$IMG}icon_ConnectorEnable.gif" name="enableImage" onclick="document.location.href='index.php?module=Connectors&action=ModifyDisplay';"
|
||||
onMouseOver="document.enableImage.src='{$IMG}icon_ConnectorEnableOver.gif'"
|
||||
onMouseOut="document.enableImage.src='{$IMG}icon_ConnectorEnable.gif'"></td>
|
||||
<td> </td>
|
||||
<td><b>{$mod.LBL_MODIFY_DISPLAY_TITLE}</b><br/>
|
||||
{$mod.LBL_MODIFY_DISPLAY_DESC}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="10%"> </td>
|
||||
<td width="35%">
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr valign='top'>
|
||||
<td><img src="{$IMG}icon_ConnectorMap.gif" name="connectorMapImg" onclick="document.location.href='index.php?module=Connectors&action=ModifyMapping';"
|
||||
onMouseOver="document.connectorMapImg.src='{$IMG}icon_ConnectorMapOver.gif'"
|
||||
onMouseOut="document.connectorMapImg.src='{$IMG}icon_ConnectorMap.gif'"></td>
|
||||
<td> </td>
|
||||
<td><b>{$mod.LBL_MODIFY_MAPPING_TITLE}</b><br/>
|
||||
{$mod.LBL_MODIFY_MAPPING_DESC}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign='top'>
|
||||
<td>
|
||||
<img src="{$IMG}icon_ConnectorSearchFields.gif" name="connectorSearchImg" onclick="document.location.href='index.php?module=Connectors&action=ModifySearch';"
|
||||
onMouseOver="document.connectorSearchImg.src='{$IMG}icon_ConnectorSearchFieldsOver.gif'"
|
||||
onMouseOut="document.connectorSearchImg.src='{$IMG}icon_ConnectorSearchFields.gif'">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
{* BEGIN SUGARCRM flav=pro || flav=sales ONLY *}
|
||||
<b>{$mod.LBL_MODIFY_SEARCH_TITLE}</b><br/>
|
||||
{$mod.LBL_MODIFY_SEARCH_DESC}
|
||||
{* END SUGARCRM flav=pro || flav=sales ONLY *}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td width="20%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
206
modules/Connectors/tpls/display_properties.tpl
Executable file
206
modules/Connectors/tpls/display_properties.tpl
Executable file
@@ -0,0 +1,206 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<table id="{$source_id}" class="sources_table" border="0" cellspacing="1" cellpadding="1">
|
||||
<tr>
|
||||
<td width="33%">
|
||||
<span><b>{$mod.LBL_ENABLED}</b></span>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<span><b>{$mod.LBL_DISABLED}</b></span>
|
||||
</td>
|
||||
<td width="33%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="{$source_id}:enabled_div" class="enabled_module_workarea">
|
||||
<ul id="{$source_id}:enabled_ul" class="module_draglist">
|
||||
{foreach from=$enabled_modules item=module}
|
||||
<li id="{$source_id}:{$module}" class="noBullet2">{$module}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="{$source_id}:disabled_div" class="disabled_module_workarea">
|
||||
<ul id="{$source_id}:disabled_ul" class="module_draglist">
|
||||
{foreach from=$disabled_modules item=module}
|
||||
<li id="{$source_id}:{$module}" class="noBullet2">{$module}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
|
||||
var Dom = YAHOO.util.Dom;
|
||||
var Event = YAHOO.util.Event;
|
||||
var DDM = YAHOO.util.DragDropMgr;
|
||||
|
||||
(function() {
|
||||
|
||||
YAHOO.example.DDApp = {
|
||||
init: function() {
|
||||
{/literal}
|
||||
new YAHOO.util.DDTarget("{$source_id}:enabled_ul");
|
||||
new YAHOO.util.DDTarget("{$source_id}:disabled_ul");
|
||||
|
||||
{foreach from=$enabled_modules item=module}
|
||||
new YAHOO.example.DDList("{$source_id}:{$module}");
|
||||
{/foreach}
|
||||
|
||||
{foreach from=$disabled_modules item=module}
|
||||
new YAHOO.example.DDList("{$source_id}:{$module}");
|
||||
{/foreach}
|
||||
{literal}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
YAHOO.example.DDList = function(id, sGroup, config) {
|
||||
YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, config);
|
||||
var el = this.getDragEl();
|
||||
Dom.setStyle(el, "opacity", 0.67);
|
||||
this.goingUp = false;
|
||||
this.lastY = 0;
|
||||
};
|
||||
|
||||
|
||||
YAHOO.extend(YAHOO.example.DDList, YAHOO.util.DDProxy, {
|
||||
startDrag: function(x, y) {
|
||||
// make the proxy look like the source element
|
||||
var dragEl = this.getDragEl();
|
||||
var clickEl = this.getEl();
|
||||
Dom.setStyle(clickEl, "visibility", "hidden");
|
||||
dragEl.innerHTML = clickEl.innerHTML;
|
||||
Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color"));
|
||||
Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor"));
|
||||
Dom.setStyle(dragEl, "border", "2px solid gray");
|
||||
},
|
||||
|
||||
endDrag: function(e) {
|
||||
|
||||
var srcEl = this.getEl();
|
||||
var proxy = this.getDragEl();
|
||||
|
||||
// Show the proxy element and animate it to the src element's location
|
||||
Dom.setStyle(proxy, "visibility", "");
|
||||
var a = new YAHOO.util.Motion(
|
||||
proxy, {
|
||||
points: {
|
||||
to: Dom.getXY(srcEl)
|
||||
}
|
||||
},
|
||||
0.2,
|
||||
YAHOO.util.Easing.easeOut
|
||||
)
|
||||
var proxyid = proxy.id;
|
||||
var thisid = this.id;
|
||||
|
||||
// Hide the proxy and show the source element when finished with the animation
|
||||
a.onComplete.subscribe(function() {
|
||||
Dom.setStyle(proxyid, "visibility", "hidden");
|
||||
Dom.setStyle(thisid, "visibility", "");
|
||||
});
|
||||
a.animate();
|
||||
},
|
||||
|
||||
onDragDrop: function(e, id) {
|
||||
// If there is one drop interaction, the li was dropped either on the list,
|
||||
// or it was dropped on the current location of the source element.
|
||||
if (typeof(DDM.interactionInfo) != 'undefined' && DDM.interactionInfo.drop.length === 1) {
|
||||
|
||||
// The position of the cursor at the time of the drop (YAHOO.util.Point)
|
||||
var pt = DDM.interactionInfo.point;
|
||||
|
||||
// The region occupied by the source element at the time of the drop
|
||||
var region = DDM.interactionInfo.sourceRegion;
|
||||
// Check to see if we are over the source element's location. We will
|
||||
// append to the bottom of the list once we are sure it was a drop in
|
||||
// the negative space (the area of the list without any list items)
|
||||
if (!region.intersect(pt)) {
|
||||
var destEl = Dom.get(id);
|
||||
var destDD = DDM.getDDById(id);
|
||||
destEl.appendChild(this.getEl());
|
||||
destDD.isEmpty = false;
|
||||
DDM.refreshCache();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onDrag: function(e) {
|
||||
|
||||
// Keep track of the direction of the drag for use during onDragOver
|
||||
var y = Event.getPageY(e);
|
||||
|
||||
if (y < this.lastY) {
|
||||
this.goingUp = true;
|
||||
} else if (y > this.lastY) {
|
||||
this.goingUp = false;
|
||||
}
|
||||
|
||||
this.lastY = y;
|
||||
},
|
||||
|
||||
onDragOver: function(e, id) {
|
||||
var srcEl = this.getEl();
|
||||
var destEl = Dom.get(id);
|
||||
|
||||
if (destEl.nodeName.toLowerCase() == "li") {
|
||||
var orig_p = srcEl.parentNode;
|
||||
var p = destEl.parentNode;
|
||||
if (this.goingUp) {
|
||||
p.insertBefore(srcEl, destEl); // insert above
|
||||
} else {
|
||||
p.insertBefore(srcEl, destEl.nextSibling); // insert below
|
||||
}
|
||||
DDM.refreshCache();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Event.onDOMReady(YAHOO.example.DDApp.init, YAHOO.example.DDApp, true);
|
||||
|
||||
|
||||
})();
|
||||
{/literal}
|
||||
</script>
|
||||
81
modules/Connectors/tpls/listview.tpl
Executable file
81
modules/Connectors/tpls/listview.tpl
Executable file
@@ -0,0 +1,81 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<script type='text/javascript' src='{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}'></script>
|
||||
<script type='text/javascript' src='{sugar_getjspath file='include/javascript/sugar_3.js'}'></script>
|
||||
|
||||
<table cellpadding='0' cellspacing='0' width='100%' border='0' class='list view'>
|
||||
<tr>
|
||||
<th width="5%">{$APP.LBL_SELECT_BUTTON_LABEL}</td>
|
||||
{foreach from=$displayColumns key=colHeader item=params}
|
||||
{if $colHeader != 'id'}
|
||||
<th width="{$params.width}%" nowrap>
|
||||
{sugar_translate label=$params.label module=$module}
|
||||
</th>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<th width="1%"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
{foreach name=rowIteration from=$DATA key=id item=bean}
|
||||
{counter name="offset" print=false}
|
||||
{if $smarty.foreach.rowIteration.iteration is odd}
|
||||
{assign var='_bgColor' value=$bgColor[0]}
|
||||
{assign var='_rowColor' value=$rowColor[0]}
|
||||
{assign var='_class' value='oddListRowS1'}
|
||||
{else}
|
||||
{assign var='_bgColor' value=$bgColor[1]}
|
||||
{assign var='_rowColor' value=$rowColor[1]}
|
||||
{assign var='_class' value='evenListRowS1'}
|
||||
{/if}
|
||||
|
||||
<tr height='20' onmouseover="setPointer(this, '{$rowData.id}', 'over', '{$_bgColor}', '{$bgHilite}', '');" onmouseout="setPointer(this, '{$rowData.ID}', 'out', '{$_bgColor}', '{$bgHilite}', '');" onmousedown="setPointer(this, '{$rowData.id}', 'click', '{$_bgColor}', '{$bgHilite}', '');" class="{$_class}">
|
||||
<td valign="top" scope="row" NOWRAP>
|
||||
<input vertical-align="middle" type="radio" name="{$source_id}_id" value="{$bean->data_source_id}">
|
||||
|
||||
</td>
|
||||
{foreach from=$displayColumns key=colHeader item=params}
|
||||
{if $colHeader != 'id'}
|
||||
<td valign="top" scope="row">{sugar_connector_display bean=$bean field=$colHeader source=$source_id}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td scope="row"><span id='adspan_{$bean->id}' onmouseout="return clear_source_details()" onmouseover="get_source_details('{$source_id}', '{$bean->id}', 'adspan_{$bean->id}')" onmouseout="return nd(1000);" vertical-align="middle"><img src="{sugar_getimagepath file="info_inline.png"}" vertical-align="middle"></span></td>
|
||||
</tr>
|
||||
|
||||
|
||||
{/foreach}
|
||||
</table>
|
||||
84
modules/Connectors/tpls/mapping_properties.tpl
Executable file
84
modules/Connectors/tpls/mapping_properties.tpl
Executable file
@@ -0,0 +1,84 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<div id="{$source_id}_add_tables" class="sources_table_div">
|
||||
{foreach from=$display_data key=module item=data}
|
||||
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td colspan="2"><span><font size="3">{$module}</font></span></td></tr>
|
||||
<tr>
|
||||
<td width="150px"><b>{$mod.LBL_CONNECTOR_FIELDS}</b></td>
|
||||
<td><b>{$mod.LBL_MODULE_FIELDS}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" name="{$module}" id="{$module}" class="mapping_table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{foreach from=$data.field_keys key=field_id item=field}
|
||||
{if $field_id != 'id'}
|
||||
<div id="{$source_id}:{$module}:{$field}_div" style="width:500px; display:block; cursor:pointer">
|
||||
<table border="0" cellpadding="1" cellspacing="1">
|
||||
<tr>
|
||||
<td width="150px">
|
||||
{$field}
|
||||
</td>
|
||||
<td>
|
||||
<select id="{$source_id}:{$module}:{$field_id}">
|
||||
<option value="">---</option>
|
||||
{foreach from=$data.available_fields key=available_field_id item=available_field}
|
||||
<option value="{$available_field_id}" {if $data.field_mapping.$field_id == $available_field_id}SELECTED{/if}>{$available_field}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr/>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{if $empty_mapping}
|
||||
<h3>{$mod.ERROR_NO_SEARCHDEFS_DEFINED}</h3>
|
||||
{/if}
|
||||
|
||||
187
modules/Connectors/tpls/modify_display.tpl
Executable file
187
modules/Connectors/tpls/modify_display.tpl
Executable file
@@ -0,0 +1,187 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
|
||||
<script type="text/javascript" src="{sugar_getjspath file='modules/Connectors/Connector.js'}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
|
||||
|
||||
|
||||
{literal}
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var _sourceArray = new Array();
|
||||
|
||||
var SourceTabs = {
|
||||
|
||||
init : function() {
|
||||
_tabView = new YAHOO.widget.TabView();
|
||||
|
||||
{/literal}
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
{literal}
|
||||
tab = new YAHOO.widget.Tab({
|
||||
label: '{/literal}{$source.name}{literal} ',
|
||||
dataSrc: {/literal}'index.php?module=Connectors&action=DisplayProperties&source_id={$source.id}'{literal},
|
||||
cacheData: true,
|
||||
{/literal}
|
||||
{if $source_count == 1}
|
||||
active: true
|
||||
{else}
|
||||
active: false
|
||||
{/if}
|
||||
{literal}
|
||||
});
|
||||
_tabView.addTab(tab);
|
||||
tab.addListener('contentChange', SourceTabs.tabContentChanged);
|
||||
_sourceArray[{/literal}{$source_count}{literal}-1] = '{/literal}{$source.id}{literal}';
|
||||
{/literal}
|
||||
{/foreach}
|
||||
{literal}
|
||||
_tabView.appendTo('container');
|
||||
//_tabView.addListener('contentChange', SourceTabs.tabContentChanged);
|
||||
_tabView.addListener('beforeActiveTabChange', SourceTabs.tabIndexChanged);
|
||||
},
|
||||
|
||||
tabContentChanged: function(info) {
|
||||
tab = _tabView.get('activeTab');
|
||||
SUGAR.util.evalScript(tab.get('content'));
|
||||
},
|
||||
|
||||
tabIndexChanged : function(info){
|
||||
|
||||
},
|
||||
|
||||
fitContainer: function() {
|
||||
_tabView = SourceTabs.getTabView();
|
||||
content_div = _tabView.getElementsByClassName('yui-content', 'div')[0];
|
||||
content_div.style.overflow='auto';
|
||||
content_div.style.height='405px';
|
||||
},
|
||||
|
||||
getTabView : function() {
|
||||
return _tabView;
|
||||
}
|
||||
}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.init);
|
||||
</script>
|
||||
{/literal}
|
||||
<form name="ModifyDisplay" method="POST">
|
||||
<input type="hidden" name="modify" value="true">
|
||||
<input type="hidden" name="module" value="Connectors">
|
||||
<input type="hidden" name="action" value="SaveModifyDisplay">
|
||||
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
<input type="hidden" name="source{$source_count}" value="{$source.id}">
|
||||
{/foreach}
|
||||
<input type="hidden" name="display_values" value="">
|
||||
<input type="hidden" name="display_sources" value="">
|
||||
<input type="hidden" name="reset_to_default" value="">
|
||||
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="calculateValues();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyDisplay.action.value='ConnectorSettings'; document.ModifyDisplay.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td>
|
||||
<div >
|
||||
<div id="container" style="height: 465px">
|
||||
</div>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="calculateValues();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyDisplay.action.value='ConnectorSettings'; document.ModifyDisplay.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
function calculateValues() {
|
||||
tabview = SourceTabs.getTabView();
|
||||
display_vals = ''
|
||||
source_vals = '';
|
||||
sources = new Array();
|
||||
//Get the source divs
|
||||
elements = tabview.getElementsByClassName('sources_table', 'table');
|
||||
for(el in elements) {
|
||||
if(typeof elements[el] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
source_vals += ',' + elements[el].id;
|
||||
|
||||
}
|
||||
|
||||
//Get the enabled div elements
|
||||
elements = tabview.getElementsByClassName('enabled_module_workarea', 'div');
|
||||
for(el in elements) {
|
||||
if(typeof elements[el] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
//Get the li elements
|
||||
enabled_list = YAHOO.util.Dom.getElementsByClassName('noBullet2', 'li', elements[el]);
|
||||
for(li in enabled_list) {
|
||||
if(typeof enabled_list[li] != 'function') {
|
||||
display_vals += ',' + enabled_list[li].getAttribute('id');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.ModifyDisplay.display_values.value = display_vals != '' ? display_vals.substr(1,display_vals.length) : '';
|
||||
document.ModifyDisplay.display_sources.value = source_vals != '' ? source_vals.substr(1, source_vals.length) : '';
|
||||
}
|
||||
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
|
||||
{/literal}
|
||||
</script>
|
||||
182
modules/Connectors/tpls/modify_mapping.tpl
Executable file
182
modules/Connectors/tpls/modify_mapping.tpl
Executable file
@@ -0,0 +1,182 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
|
||||
<script type="text/javascript" src="{sugar_getjspath file='modules/Connectors/Connector.js'}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
|
||||
|
||||
{literal}
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var _sourceArray = new Array();
|
||||
|
||||
var SourceTabs = {
|
||||
|
||||
init : function() {
|
||||
_tabView = new YAHOO.widget.TabView();
|
||||
|
||||
{/literal}
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
{literal}
|
||||
tab = new YAHOO.widget.Tab({
|
||||
label: '{/literal}{$source.name}{literal} ',
|
||||
dataSrc: {/literal}'index.php?module=Connectors&action=MappingProperties&source_id={$source.id}'{literal},
|
||||
cacheData: true,
|
||||
{/literal}
|
||||
{if $source_count == 1}
|
||||
active: true
|
||||
{else}
|
||||
active: false
|
||||
{/if}
|
||||
{literal}
|
||||
});
|
||||
_sourceArray[{/literal}{$source_count}{literal}-1] = '{/literal}{$source.id}';
|
||||
tab.addListener('contentChange', SourceTabs.tabContentChanged);
|
||||
tab.id = '{$source.id}';
|
||||
_tabView.addTab(tab);
|
||||
{/foreach}
|
||||
{literal}
|
||||
_tabView.appendTo('container');
|
||||
},
|
||||
|
||||
tabContentChanged: function(info) {
|
||||
tab = _tabView.get('activeTab');
|
||||
SUGAR.util.evalScript(tab.get('content'));;
|
||||
},
|
||||
|
||||
fitContainer: function() {
|
||||
_tabView = SourceTabs.getTabView();
|
||||
content_div = _tabView.getElementsByClassName('yui-content', 'div')[0];
|
||||
content_div.style.overflow='auto';
|
||||
content_div.style.height='405px';
|
||||
},
|
||||
|
||||
getTabView : function() {
|
||||
return _tabView;
|
||||
}
|
||||
}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.init);
|
||||
</script>
|
||||
{/literal}
|
||||
<form name="ModifyMapping" method="POST" onsubmit="return calculateValues();">
|
||||
<input type="hidden" name="modify" value="true">
|
||||
<input type="hidden" name="module" value="Connectors">
|
||||
<input type="hidden" name="action" value="SaveModifyMapping">
|
||||
<input type="hidden" name="source_id" value="">
|
||||
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
<input type="hidden" name="source{$source_count}" value="{$source.id}">
|
||||
{/foreach}
|
||||
<input type="hidden" name="mapping_values" value="">
|
||||
<input type="hidden" name="mapping_sources" value="">
|
||||
<input type="hidden" name="reset_to_default" value="">
|
||||
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyMapping.action.value='ConnectorSettings'; document.ModifyMapping.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td>
|
||||
<div>
|
||||
<div id="container" style="height: 465px">
|
||||
</div>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyMapping.action.value='ConnectorSettings'; document.ModifyMapping.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
function calculateValues() {
|
||||
tabview = SourceTabs.getTabView();
|
||||
mapping_vals = ''
|
||||
source_vals = '';
|
||||
sources = new Array();
|
||||
//Get the source divs
|
||||
elements = tabview.getElementsByClassName('sources_table_div', 'div');
|
||||
for(el in elements) {
|
||||
|
||||
//Fix for IE6
|
||||
if(typeof elements[el] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
div_id = elements[el].getAttribute('id');
|
||||
source_id = div_id.substr(0, div_id.indexOf('_add_tables'));
|
||||
if(sources[source_id] == null) {
|
||||
sources[source_id] = source_id;
|
||||
source_vals += ',' + source_id;
|
||||
}
|
||||
}
|
||||
|
||||
//Get the table elements
|
||||
tables = tabview.getElementsByClassName('mapping_table', 'table');
|
||||
for(t in tables) {
|
||||
|
||||
//Fix for IE6
|
||||
if(typeof tables[t] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
select_elements = tables[t].getElementsByTagName("select");
|
||||
for(el in select_elements) {
|
||||
select_dom = document.getElementById(select_elements[el].id);
|
||||
if(select_dom != null && select_elements[el].value != '') {
|
||||
mapping_vals += ',' + select_elements[el].getAttribute('id') + '=' + select_elements[el].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
document.ModifyMapping.mapping_values.value = mapping_vals != '' ? mapping_vals.substr(1, mapping_vals.length) : '';
|
||||
document.ModifyMapping.mapping_sources.value = source_vals != '' ? source_vals.substr(1, source_vals.length) : '';
|
||||
return true;
|
||||
}
|
||||
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
|
||||
</script>
|
||||
{/literal}
|
||||
154
modules/Connectors/tpls/modify_properties.tpl
Executable file
154
modules/Connectors/tpls/modify_properties.tpl
Executable file
@@ -0,0 +1,154 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
|
||||
<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
|
||||
<script type="text/javascript" src="{sugar_getjspath file='modules/Connectors/Connector.js'}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
|
||||
|
||||
{literal}
|
||||
|
||||
<script language="javascript">
|
||||
var _tabView;
|
||||
var _timer;
|
||||
var _sourceArray = new Array();
|
||||
var SourceTabs = {
|
||||
|
||||
init : function() {
|
||||
_tabView = new YAHOO.widget.TabView();
|
||||
|
||||
{/literal}
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
{literal}
|
||||
tab = new YAHOO.widget.Tab({
|
||||
label: '{/literal}{$source.name}{literal} ',
|
||||
dataSrc: {/literal}'index.php?module=Connectors&action=SourceProperties&source_id={$source.id}&to_pdf=true'{literal},
|
||||
cacheData: true,
|
||||
{/literal}
|
||||
{if $source_count == 1}
|
||||
active: true
|
||||
{else}
|
||||
active: false
|
||||
{/if}
|
||||
{literal}
|
||||
});
|
||||
{/literal}
|
||||
_tabView.addTab(tab);
|
||||
tab.id = '{$source.id}';
|
||||
//tab.addListener('beforeContentChange', SourceTabs.tabClicked);
|
||||
tab.addListener('click', SourceTabs.afterContentChange);
|
||||
_sourceArray[{$source_count}-1] = '{$source.id}';
|
||||
{/foreach}
|
||||
{literal}
|
||||
_tabView.appendTo('container');
|
||||
},
|
||||
|
||||
afterContentChange: function(info) {
|
||||
|
||||
if(typeof validate != 'undefined') {
|
||||
validate = new Array();
|
||||
validate["ModifyProperties"] = new Array();
|
||||
}
|
||||
|
||||
tab = _tabView.get('activeTab');
|
||||
if(typeof tab.get('content') != 'undefined') {
|
||||
SUGAR.util.evalScript(tab.get('content'));
|
||||
clearTimeout(_timer);
|
||||
} else {
|
||||
_timer = setTimeout(SourceTabs.afterContentChange, 1000);
|
||||
}
|
||||
},
|
||||
|
||||
fitContainer: function() {
|
||||
content_div = _tabView.getElementsByClassName('yui-content', 'div')[0];
|
||||
content_div.style.overflow='auto';
|
||||
content_div.style.height='405px';
|
||||
}
|
||||
}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.init);
|
||||
</script>
|
||||
{/literal}
|
||||
<form name="ModifyProperties" method="POST">
|
||||
<input type="hidden" name="modify" value="true">
|
||||
<input type="hidden" name="module" value="Connectors">
|
||||
<input type="hidden" name="action" value="SaveModifyProperties">
|
||||
<input type="hidden" name="source_id" value="">
|
||||
<input type="hidden" name="reset_to_default" value="">
|
||||
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
<input type="hidden" name="source{$source_count}" value="{$source.id}">
|
||||
{/foreach}
|
||||
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" onclick="return check_form('ModifyProperties') || confirm('{$mod.LBL_CONFIRM_CONTINUE_SAVE}');">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyProperties.action.value='ConnectorSettings'; document.ModifyProperties.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td class="tabDetailViewDF">
|
||||
<div >
|
||||
<div id="container" style="height: 465px">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" onclick="return check_form('ModifyProperties') || confirm('{$mod.LBL_CONFIRM_CONTINUE_SAVE}');">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyProperties.action.value='ConnectorSettings'; document.ModifyProperties.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
|
||||
{/literal}
|
||||
|
||||
{foreach name=required_fields from=$REQUIRED_FIELDS key=id item=fields}
|
||||
{foreach from=$fields key=field_key item=field_label}
|
||||
addToValidate("ModifyProperties", "{$id}_{$field_key}", "alpha", true, "{$field_label}");
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</script>
|
||||
183
modules/Connectors/tpls/modify_search.tpl
Executable file
183
modules/Connectors/tpls/modify_search.tpl
Executable file
@@ -0,0 +1,183 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
|
||||
<script type="text/javascript" src="{sugar_getjspath file='modules/Connectors/Connector.js'}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
|
||||
|
||||
{literal}
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var _sourceArray = new Array();
|
||||
|
||||
var SourceTabs = {
|
||||
|
||||
init : function() {
|
||||
_tabView = new YAHOO.widget.TabView();
|
||||
|
||||
{/literal}
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{foreach name=connectors from=$SOURCES item=source}
|
||||
{counter assign=source_count}
|
||||
{literal}
|
||||
tab = new YAHOO.widget.Tab({
|
||||
label: '{/literal}{$source.name}{literal} ',
|
||||
dataSrc: {/literal}'index.php?module=Connectors&action=SearchProperties&source_id={$source.id}'{literal},
|
||||
cacheData: true,
|
||||
{/literal}
|
||||
{if $source_count == 1}
|
||||
active: true
|
||||
{else}
|
||||
active: false
|
||||
{/if}
|
||||
{literal}
|
||||
});
|
||||
_sourceArray[{/literal}{$source_count}{literal}-1] = '{/literal}{$source.id}';
|
||||
tab.addListener('contentChange', SourceTabs.tabContentChanged);
|
||||
tab.id = '{$source.id}';
|
||||
_tabView.addTab(tab);
|
||||
{/foreach}
|
||||
{literal}
|
||||
_tabView.appendTo('container');
|
||||
},
|
||||
|
||||
tabContentChanged: function(info) {
|
||||
tab = _tabView.get('activeTab');
|
||||
SUGAR.util.evalScript(tab.get('content'));
|
||||
},
|
||||
|
||||
fitContainer: function() {
|
||||
_tabView = SourceTabs.getTabView();
|
||||
content_div = _tabView.getElementsByClassName('yui-content', 'div')[0];
|
||||
content_div.style.overflow='auto';
|
||||
content_div.style.height='405px';
|
||||
},
|
||||
|
||||
getTabView : function() {
|
||||
return _tabView;
|
||||
}
|
||||
}
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.init);
|
||||
</script>
|
||||
{/literal}
|
||||
<form name="ModifySearch" method="POST">
|
||||
<input type="hidden" name="modify" value="true">
|
||||
<input type="hidden" name="module" value="Connectors">
|
||||
<input type="hidden" name="action" value="SaveModifySearch">
|
||||
<input type="hidden" name="source_id" value="">
|
||||
|
||||
{counter assign=source_count start=0 print=0}
|
||||
{if count($SOURCES) == 0}
|
||||
{$MOD.ERROR_NO_SEARCHDEFS_MAPPED}
|
||||
{else}
|
||||
{foreach name=connectors from=$SOURCES key=name item=source}
|
||||
{counter assign=source_count}
|
||||
<input type="hidden" name="source{$source_count}" value="{$source.id}">
|
||||
{/foreach}
|
||||
{/if}
|
||||
<input type="hidden" name="search_values" value="">
|
||||
<input type="hidden" name="search_sources" value="">
|
||||
<input type="hidden" name="reset_to_default" value="">
|
||||
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="calculateValues();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifySearch.action.value='ConnectorSettings'; document.ModifySearch.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td>
|
||||
<div>
|
||||
<div id="container" style="height: 465px">
|
||||
</div>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0">
|
||||
<tr><td>
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button" onclick="calculateValues();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifySearch.action.value='ConnectorSettings'; document.ModifySearch.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
function calculateValues() {
|
||||
tabview = SourceTabs.getTabView();
|
||||
search_vals = ''
|
||||
source_vals = '';
|
||||
sources = new Array();
|
||||
//Get the source divs
|
||||
elements = tabview.getElementsByClassName('sources_table_div', 'div');
|
||||
for(el in elements) {
|
||||
if(typeof elements[el] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
div_id = elements[el].getAttribute('id');
|
||||
source_id = div_id.substr(0, div_id.indexOf('_add_tables'));
|
||||
if(sources[source_id] == null) {
|
||||
sources[source_id] = source_id;
|
||||
source_vals += ',' + source_id;
|
||||
}
|
||||
}
|
||||
|
||||
//Get the enabled div elements
|
||||
elements = tabview.getElementsByClassName('enabled_workarea', 'div');
|
||||
for(el in elements) {
|
||||
if(typeof elements[el] == 'function') {
|
||||
continue;
|
||||
}
|
||||
|
||||
//Get the li elements
|
||||
enabled_list = YAHOO.util.Dom.getElementsByClassName('noBullet2', 'li', elements[el]);
|
||||
for(li in enabled_list) {
|
||||
if(typeof enabled_list[li] != 'function') {
|
||||
search_vals += ',' + enabled_list[li].getAttribute('id');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.ModifySearch.search_values.value = search_vals != '' ? search_vals.substr(1,search_vals.length) : '';
|
||||
document.ModifySearch.search_sources.value = source_vals != '' ? source_vals.substr(1, source_vals.length) : '';
|
||||
}
|
||||
|
||||
YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
|
||||
{/literal}
|
||||
</script>
|
||||
71
modules/Connectors/tpls/search_form.tpl
Executable file
71
modules/Connectors/tpls/search_form.tpl
Executable file
@@ -0,0 +1,71 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
<table class="h3Row" width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<h3>{$mod.LBL_MODIFY_SEARCH}</h3></td><td width='100%'>
|
||||
<IMG height='1' width='1' src='include/images/blank.gif' alt=''>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<form name='SearchForm' method='POST' id='SearchForm'>
|
||||
<input type='hidden' name='source_id' id='source_id' value='{$source_id}' />
|
||||
<input type='hidden' name='merge_module' value='{$module}' />
|
||||
<input type='hidden' name='record' value='{$RECORD}' />
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="tabForm">
|
||||
{if !empty($search_fields) }
|
||||
<tr>
|
||||
{counter assign=field_count start=0 print=0}
|
||||
{foreach from=$search_fields key=field_name item=field_value}
|
||||
{counter assign=field_count}
|
||||
{if ($field_count % 3 == 1 && $field_count != 1)}
|
||||
</tr><tr>
|
||||
{/if}
|
||||
<td nowrap="nowrap" width='10%' class="dataLabel">
|
||||
{$field_value.label}:
|
||||
</td>
|
||||
<td nowrap="nowrap" width='30%' class="dataField">
|
||||
<input type='text' onkeydown='checkKeyDown(event);' name='{$field_name}' value='{$field_value.value}'/>
|
||||
</td>
|
||||
{/foreach}
|
||||
{else}
|
||||
{$mod.ERROR_NO_SEARCHDEFS_MAPPING}
|
||||
{/if}
|
||||
</table>
|
||||
<input type='button' name='btn_search' id='btn_search' title="{$APP.LBL_SEARCH_BUTTON_LABEL}" accessKey="{$APP.LBL_SEARCH_BUTTON_KEY}" class="button" onClick="javascript:SourceTabs.search();" value=" {$APP.LBL_SEARCH_BUTTON_LABEL} "/>
|
||||
<input type='button' name='btn_clear' title="{$APP.LBL_CLEAR_BUTTON_LABEL}" accessKey="{$APP.LBL_CLEAR_BUTTON_KEY}" class="button" onClick="javascript:SourceTabs.clearForm();" value="{$APP.LBL_CLEAR_BUTTON_LABEL}"/>
|
||||
</form>
|
||||
220
modules/Connectors/tpls/search_properties.tpl
Executable file
220
modules/Connectors/tpls/search_properties.tpl
Executable file
@@ -0,0 +1,220 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
|
||||
<div id="{$source_id}_add_tables" class="sources_table_div">
|
||||
{foreach from=$display_data key=module item=data}
|
||||
<table border="0" cellspacing="1" cellpadding="1" name="{$module}" id="{$module}">
|
||||
<tr>
|
||||
<td colspan="2"><span><font size="3">{$module}</font></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{$mod.LBL_DEFAULT}</b></td>
|
||||
<td><b>{$mod.LBL_AVAILABLE}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="enabled_workarea" id="{$source_id}:{$module}:enabled_div">
|
||||
<ul class="draglist" id="{$source_id}:{$module}:enabled_ul">
|
||||
{foreach from=$data.enabled key=enabled_id item=enabled_value}
|
||||
<li class="noBullet2" id="{$source_id}:{$module}:{$enabled_id}">{$enabled_value}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="disabled_workarea" id="{$source_id}:{$module}:disabled_div">
|
||||
<ul class="draglist" id="{$source_id}:{$module}:disabled_ul">
|
||||
{foreach from=$data.disabled key=disabled_id item=disabled_value}
|
||||
<li class="noBullet2" id="{$source_id}:{$module}:{$disabled_id}">{$disabled_value}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
|
||||
var Dom = YAHOO.util.Dom;
|
||||
var Event = YAHOO.util.Event;
|
||||
var DDM = YAHOO.util.DragDropMgr;
|
||||
|
||||
(function() {
|
||||
|
||||
YAHOO.example.DDApp = {
|
||||
init: function() {
|
||||
{/literal}
|
||||
{foreach from=$modules_sources key=module item=field_defs}
|
||||
new YAHOO.util.DDTarget("{$source_id}:{$module}:enabled_ul");
|
||||
new YAHOO.util.DDTarget("{$source_id}:{$module}:disabled_ul");
|
||||
{foreach from=$field_defs key=index item=field}
|
||||
new YAHOO.example.DDList("{$source_id}:{$module}:{$index}");
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{literal}
|
||||
}
|
||||
};
|
||||
|
||||
YAHOO.example.DDList = function(id, sGroup, config) {
|
||||
YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, config);
|
||||
var el = this.getDragEl();
|
||||
Dom.setStyle(el, "opacity", 0.67);
|
||||
this.goingUp = false;
|
||||
this.lastY = 0;
|
||||
};
|
||||
|
||||
|
||||
YAHOO.extend(YAHOO.example.DDList, YAHOO.util.DDProxy, {
|
||||
startDrag: function(x, y) {
|
||||
// make the proxy look like the source element
|
||||
var dragEl = this.getDragEl();
|
||||
var clickEl = this.getEl();
|
||||
Dom.setStyle(clickEl, "visibility", "hidden");
|
||||
dragEl.innerHTML = clickEl.innerHTML;
|
||||
Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color"));
|
||||
Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor"));
|
||||
Dom.setStyle(dragEl, "border", "2px solid gray");
|
||||
Dom.setStyle(dragEl, "cursor", "pointer");
|
||||
},
|
||||
|
||||
endDrag: function(e) {
|
||||
|
||||
var srcEl = this.getEl();
|
||||
var proxy = this.getDragEl();
|
||||
|
||||
// Show the proxy element and animate it to the src element's location
|
||||
Dom.setStyle(proxy, "visibility", "");
|
||||
var a = new YAHOO.util.Motion(
|
||||
proxy, {
|
||||
points: {
|
||||
to: Dom.getXY(srcEl)
|
||||
}
|
||||
},
|
||||
0.2,
|
||||
YAHOO.util.Easing.easeOut
|
||||
)
|
||||
var proxyid = proxy.id;
|
||||
var thisid = this.id;
|
||||
|
||||
// Hide the proxy and show the source element when finished with the animation
|
||||
a.onComplete.subscribe(function() {
|
||||
Dom.setStyle(proxyid, "visibility", "hidden");
|
||||
Dom.setStyle(thisid, "visibility", "");
|
||||
});
|
||||
a.animate();
|
||||
},
|
||||
|
||||
onDragDrop: function(e, id) {
|
||||
// If there is one drop interaction, the li was dropped either on the list,
|
||||
// or it was dropped on the current location of the source element.
|
||||
if (typeof(DDM.interactionInfo) != 'undefined' && DDM.interactionInfo.drop.length === 1) {
|
||||
|
||||
// The position of the cursor at the time of the drop (YAHOO.util.Point)
|
||||
var pt = DDM.interactionInfo.point;
|
||||
|
||||
// The region occupied by the source element at the time of the drop
|
||||
var region = DDM.interactionInfo.sourceRegion;
|
||||
// Check to see if we are over the source element's location. We will
|
||||
// append to the bottom of the list once we are sure it was a drop in
|
||||
// the negative space (the area of the list without any list items)
|
||||
if (!region.intersect(pt)) {
|
||||
var destEl = Dom.get(id);
|
||||
var destDD = DDM.getDDById(id);
|
||||
destEl.appendChild(this.getEl());
|
||||
destDD.isEmpty = false;
|
||||
DDM.refreshCache();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onDrag: function(e) {
|
||||
|
||||
// Keep track of the direction of the drag for use during onDragOver
|
||||
var y = Event.getPageY(e);
|
||||
|
||||
if (y < this.lastY) {
|
||||
this.goingUp = true;
|
||||
} else if (y > this.lastY) {
|
||||
this.goingUp = false;
|
||||
}
|
||||
|
||||
this.lastY = y;
|
||||
},
|
||||
|
||||
onDragOver: function(e, id) {
|
||||
var srcEl = this.getEl();
|
||||
var destEl = Dom.get(id);
|
||||
|
||||
if (destEl.nodeName.toLowerCase() == "li") {
|
||||
var orig_p = srcEl.parentNode;
|
||||
var p = destEl.parentNode;
|
||||
if (this.goingUp) {
|
||||
p.insertBefore(srcEl, destEl); // insert above
|
||||
} else {
|
||||
p.insertBefore(srcEl, destEl.nextSibling); // insert below
|
||||
}
|
||||
DDM.refreshCache();
|
||||
} else if(destEl.nodeName.toLowerCase() == "ul") {
|
||||
var p = destEl.parentNode;
|
||||
blank_list = p.lastChild;
|
||||
if(!blank_list.id) {
|
||||
destEl.appendChild(srcEl);
|
||||
} else {
|
||||
blank_list.insertBefore(srcEl, destEl.nextSibling);
|
||||
}
|
||||
DDM.refreshCache();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
YAHOO.util.Event.onDOMReady(function(){
|
||||
YAHOO.example.DDApp.init();
|
||||
});
|
||||
|
||||
})();
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{if $no_searchdefs_defined}
|
||||
<h3>{$mod.ERROR_NO_SEARCHDEFS_DEFINED}</h3>
|
||||
{/if}
|
||||
81
modules/Connectors/tpls/source_properties.tpl
Executable file
81
modules/Connectors/tpls/source_properties.tpl
Executable file
@@ -0,0 +1,81 @@
|
||||
{*
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
*}
|
||||
|
||||
<br/>
|
||||
{if !empty($connector_language.LBL_LICENSING_INFO)}
|
||||
{$connector_language.LBL_LICENSING_INFO}
|
||||
{/if}
|
||||
<br/>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" >
|
||||
{if !empty($properties)}
|
||||
{foreach from=$properties key=name item=value}
|
||||
<tr>
|
||||
<td class="dataLabel" width="35%">
|
||||
{$connector_language[$name]}:
|
||||
{if isset($required_properties[$name])}
|
||||
<span class="required">*</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="dataLabel" width="65%">
|
||||
<input type="text" id="{$source_id}_{$name}" name="{$source_id}_{$name}" size="75" value="{$value}"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $hasTestingEnabled}
|
||||
<tr>
|
||||
<td class="dataLabel" colspan="2">
|
||||
<input id="{$source_id}_test_button" type="button" class="button" value=" {$mod.LBL_TEST_SOURCE} " onclick="run_test('{$source_id}');">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" colspan="2">
|
||||
<span id="{$source_id}_result"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="dataLabel" colspan="2"> </td>
|
||||
<td class="dataLabel" colspan="2">{$mod.LBL_NO_PROPERTIES}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
{foreach from=$required_properties key=id item=label}
|
||||
addToValidate("ModifyProperties", "{$source_id}_{$id}", "alpha", true, "{$label}");
|
||||
{/foreach}
|
||||
</script>
|
||||
76
modules/Connectors/views/view.connectorsettings.php
Executable file
76
modules/Connectors/views/view.connectorsettings.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
class ViewConnectorSettings extends SugarView
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
global $mod_strings;
|
||||
|
||||
return array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
$mod_strings['LBL_ADMINISTRATION_MAIN']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTab()
|
||||
*/
|
||||
protected function _getModuleTab()
|
||||
{
|
||||
return 'Administration';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
global $mod_strings, $app_strings;
|
||||
|
||||
echo $this->getModuleTitle();
|
||||
|
||||
$this->ss->assign('mod', $mod_strings);
|
||||
$this->ss->assign('app', $app_strings);
|
||||
$this->ss->assign('IMG', 'themes/default/images/');
|
||||
$this->ss->display('modules/Connectors/tpls/administration.tpl');
|
||||
}
|
||||
}
|
||||
111
modules/Connectors/views/view.displayproperties.php
Executable file
111
modules/Connectors/views/view.displayproperties.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewDisplayProperties extends ViewList
|
||||
{
|
||||
/**
|
||||
* @see SugarView::process()
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
$this->options['show_all'] = false;
|
||||
$this->options['show_javascript'] = true;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
parent::process();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$source = $_REQUEST['source_id'];
|
||||
$sources = ConnectorUtils::getConnectors();
|
||||
$modules_sources = ConnectorUtils::getDisplayConfig();
|
||||
//$json = getJSONobj();
|
||||
|
||||
$enabled_modules = array();
|
||||
$disabled_modules = array();
|
||||
|
||||
//Find all modules this source has been enabled for
|
||||
foreach($modules_sources as $module=>$mapping) {
|
||||
foreach($modules_sources[$module] as $entry) {
|
||||
if($entry == $source) {
|
||||
$enabled_modules[$module] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
global $moduleList, $beanList;
|
||||
//Do filtering here?
|
||||
$count = 0;
|
||||
global $current_user;
|
||||
$access = get_admin_modules_for_user($current_user);
|
||||
$d = dir('modules');
|
||||
while($e = $d->read()){
|
||||
if(substr($e, 0, 1) == '.' || !is_dir('modules/' . $e))continue;
|
||||
if(empty($enabled_modules[$e]) && file_exists('modules/' . $e . '/metadata/studio.php') && file_exists('modules/' . $e . '/metadata/detailviewdefs.php') && isset($GLOBALS [ 'beanList' ][$e]) && (in_array($e, $access) || is_admin($current_user))) // installed modules must also exist in the beanList
|
||||
{
|
||||
$disabled_modules[$e] = $e;
|
||||
}
|
||||
}
|
||||
|
||||
asort($enabled_modules);
|
||||
asort($disabled_modules);
|
||||
|
||||
//$enabled = $json->encode($enabled_modules);
|
||||
//$disabled = $json->encode($disabled_modules);
|
||||
//$script = "addTable('{$module}', '{$enabled}', '{$disabled}', '{$source}', '{$GLOBALS['theme']}');\n";
|
||||
//$this->ss->assign('new_modules_sources', $modules_sources);
|
||||
//$this->ss->assign('dynamic_script', $script);
|
||||
|
||||
$this->ss->assign('enabled_modules', $enabled_modules);
|
||||
$this->ss->assign('disabled_modules', $disabled_modules);
|
||||
$this->ss->assign('source_id', $source);
|
||||
$this->ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$this->ss->assign('APP', $GLOBALS['app_strings']);
|
||||
$this->ss->assign('theme', $GLOBALS['theme']);
|
||||
echo $this->ss->fetch('modules/Connectors/tpls/display_properties.tpl');
|
||||
}
|
||||
}
|
||||
157
modules/Connectors/views/view.mappingproperties.php
Executable file
157
modules/Connectors/views/view.mappingproperties.php
Executable file
@@ -0,0 +1,157 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewMappingProperties extends ViewList
|
||||
{
|
||||
/**
|
||||
* @see SugarView::process()
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
$this->options['show_all'] = false;
|
||||
$this->options['show_javascript'] = true;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
parent::process();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
$connector_strings = ConnectorUtils::getConnectorStrings($_REQUEST['source_id']);
|
||||
$sources = ConnectorUtils::getConnectors();
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
$is_enabled = ConnectorUtils::isSourceEnabled($source_id);
|
||||
$script = '';
|
||||
$display_data = array();
|
||||
if($is_enabled) {
|
||||
$mapping = $source->getMapping();
|
||||
$source_defs = $source->getFieldDefs();
|
||||
|
||||
//Create the Javascript code to dynamically add the tables
|
||||
$json = getJSONobj();
|
||||
foreach($mapping['beans'] as $module=>$field_mapping) {
|
||||
|
||||
$mod_strings = return_module_language($GLOBALS['current_language'], $module);
|
||||
$bean = loadBean($module);
|
||||
if ( !is_object($bean) )
|
||||
continue;
|
||||
$field_defs = $bean->getFieldDefinitions();
|
||||
$available_fields = array();
|
||||
|
||||
$labels = array();
|
||||
$duplicate_labels = array();
|
||||
foreach($field_defs as $id=>$def) {
|
||||
|
||||
//We are filtering out some fields here
|
||||
if($def['type'] == 'relate' || $def['type'] == 'link' || (isset($def['dbType']) && $def['dbType'] == 'id')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if(isset($def['vname'])) {
|
||||
$available_fields[$id] = !empty($mod_strings[$def['vname']]) ? $mod_strings[$def['vname']] : $id;
|
||||
} else {
|
||||
$available_fields[$id] = $id;
|
||||
}
|
||||
|
||||
//Remove the ':' character in some labels
|
||||
if(preg_match('/\:$/', $available_fields[$id])) {
|
||||
$available_fields[$id] = substr($available_fields[$id], 0, strlen($available_fields[$id])-1);
|
||||
}
|
||||
|
||||
if(isset($labels[$available_fields[$id]])) {
|
||||
$duplicate_labels[$labels[$available_fields[$id]]] = $labels[$available_fields[$id]];
|
||||
$duplicate_labels[$id] = $id;
|
||||
} else {
|
||||
$labels[$available_fields[$id]] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($duplicate_labels as $id) {
|
||||
$available_fields[$id] = $available_fields[$id] . " ({$id})";
|
||||
}
|
||||
|
||||
asort($available_fields);
|
||||
|
||||
$field_keys = array();
|
||||
$field_values = array();
|
||||
|
||||
$source_fields = array();
|
||||
foreach($field_mapping as $id=>$field) {
|
||||
if(!empty($source_defs[$id])) {
|
||||
$source_fields[$id] = $source_defs[$id];
|
||||
}
|
||||
}
|
||||
$source_fields = array_merge($source_fields, $source_defs);
|
||||
|
||||
foreach($source_fields as $id=>$def) {
|
||||
if(empty($def['hidden'])){
|
||||
$field_keys[strtolower($id)] = !empty($connector_strings[$source_fields[$id]['vname']]) ? $connector_strings[$source_fields[$id]['vname']] : $id;
|
||||
$field_values[] = !empty($field_mapping[strtolower($id)]) ? $field_mapping[strtolower($id)] : '';
|
||||
}
|
||||
}
|
||||
|
||||
$display_data[$module] = array('field_keys' => $field_keys,
|
||||
'field_values' => $field_values,
|
||||
'available_fields' => $available_fields,
|
||||
'field_mapping' => $field_mapping);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ss->assign('display_data', $display_data);
|
||||
$this->ss->assign('empty_mapping', empty($display_data) ? true : false);
|
||||
$this->ss->assign('dynamic_script', $script);
|
||||
$this->ss->assign('sources', $sources);
|
||||
$this->ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$this->ss->assign('APP', $GLOBALS['app_strings']);
|
||||
$this->ss->assign('source_id', $source_id);
|
||||
$this->ss->assign('source_name', $sources[$source_id]['name']);
|
||||
$this->ss->assign('theme', $GLOBALS['theme']);
|
||||
|
||||
echo $this->ss->fetch('modules/Connectors/tpls/mapping_properties.tpl');
|
||||
}
|
||||
}
|
||||
81
modules/Connectors/views/view.modifydisplay.php
Executable file
81
modules/Connectors/views/view.modifydisplay.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewModifyDisplay extends SugarView
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
global $mod_strings;
|
||||
|
||||
return array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
"<a href='index.php?module=Connectors&action=ConnectorSettings'>".$mod_strings['LBL_ADMINISTRATION_MAIN']."</a>",
|
||||
$mod_strings['LBL_MODIFY_DISPLAY_TITLE']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTab()
|
||||
*/
|
||||
protected function _getModuleTab()
|
||||
{
|
||||
return 'Administration';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
$sources = ConnectorUtils::getConnectors();
|
||||
$this->ss->assign('SOURCES', $sources);
|
||||
$this->ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$this->ss->assign('APP', $GLOBALS['app_strings']);
|
||||
$this->ss->assign('theme', $GLOBALS['theme']);
|
||||
|
||||
echo $this->getModuleTitle();
|
||||
$this->ss->display('modules/Connectors/tpls/modify_display.tpl');
|
||||
}
|
||||
}
|
||||
82
modules/Connectors/views/view.modifymapping.php
Executable file
82
modules/Connectors/views/view.modifymapping.php
Executable file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewModifyMapping extends SugarView
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
global $mod_strings;
|
||||
|
||||
return array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
"<a href='index.php?module=Connectors&action=ConnectorSettings'>".$mod_strings['LBL_ADMINISTRATION_MAIN']."</a>",
|
||||
$mod_strings['LBL_MODIFY_MAPPING_TITLE']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTab()
|
||||
*/
|
||||
protected function _getModuleTab()
|
||||
{
|
||||
return 'Administration';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
global $mod_strings, $app_strings;
|
||||
$this->ss->assign('mod', $mod_strings);
|
||||
$this->ss->assign('APP', $app_strings);
|
||||
$connectors = ConnectorUtils::getConnectors(true);
|
||||
|
||||
$this->ss->assign('SOURCES', $connectors);
|
||||
echo $this->getModuleTitle();
|
||||
$this->ss->display('modules/Connectors/tpls/modify_mapping.tpl');
|
||||
}
|
||||
}
|
||||
95
modules/Connectors/views/view.modifyproperties.php
Executable file
95
modules/Connectors/views/view.modifyproperties.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
class ViewModifyProperties extends SugarView
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
global $mod_strings;
|
||||
|
||||
return array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
"<a href='index.php?module=Connectors&action=ConnectorSettings'>".$mod_strings['LBL_ADMINISTRATION_MAIN']."</a>",
|
||||
$mod_strings['LBL_MODIFY_PROPERTIES_TITLE']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTab()
|
||||
*/
|
||||
protected function _getModuleTab()
|
||||
{
|
||||
return 'Administration';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
global $mod_strings, $app_strings;
|
||||
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
$this->ss->assign('mod', $mod_strings);
|
||||
$this->ss->assign('APP', $app_strings);
|
||||
$connectors = ConnectorUtils::getConnectors(true);
|
||||
$required_fields = array();
|
||||
//Get required fields for first connector only
|
||||
foreach($connectors as $id=>$entry) {
|
||||
$s = SourceFactory::getSource($id);
|
||||
$connector_strings = ConnectorUtils::getConnectorStrings($id);
|
||||
$fields = $s->getRequiredConfigFields();
|
||||
foreach($fields as $field_id) {
|
||||
$label = isset($connector_strings[$field_id]) ? $connector_strings[$field_id] : $field_id;
|
||||
$required_fields[$id][$field_id]=$label;
|
||||
}
|
||||
break;
|
||||
}
|
||||
$this->ss->assign('SOURCES', $connectors);
|
||||
$this->ss->assign('REQUIRED_FIELDS', $required_fields);
|
||||
echo $this->getModuleTitle();
|
||||
$this->ss->display('modules/Connectors/tpls/modify_properties.tpl');
|
||||
}
|
||||
}
|
||||
89
modules/Connectors/views/view.modifysearch.php
Executable file
89
modules/Connectors/views/view.modifysearch.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewModifySearch extends SugarView
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
global $mod_strings;
|
||||
|
||||
return array(
|
||||
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
|
||||
"<a href='index.php?module=Connectors&action=ConnectorSettings'>".$mod_strings['LBL_ADMINISTRATION_MAIN']."</a>",
|
||||
$mod_strings['LBL_MODIFY_SEARCH_TITLE']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTab()
|
||||
*/
|
||||
protected function _getModuleTab()
|
||||
{
|
||||
return 'Administration';
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
global $mod_strings, $app_strings;
|
||||
$sugar_smarty = new Sugar_Smarty();
|
||||
$this->ss->assign('mod', $mod_strings);
|
||||
$this->ss->assign('APP', $app_strings);
|
||||
$connectors = ConnectorUtils::getConnectors();
|
||||
foreach($connectors as $id=>$source) {
|
||||
$s = SourceFactory::getSource($id);
|
||||
if(!$s->isEnabledInWizard()) {
|
||||
unset($connectors[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ss->assign('SOURCES', $connectors);
|
||||
echo $this->getModuleTitle();
|
||||
$this->ss->display('modules/Connectors/tpls/modify_search.tpl');
|
||||
}
|
||||
}
|
||||
125
modules/Connectors/views/view.searchproperties.php
Executable file
125
modules/Connectors/views/view.searchproperties.php
Executable file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Contacts module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
|
||||
class ViewSearchProperties extends ViewList
|
||||
{
|
||||
/**
|
||||
* @see SugarView::process()
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
$this->options['show_all'] = false;
|
||||
$this->options['show_javascript'] = true;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
parent::process();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$connector_strings = ConnectorUtils::getConnectorStrings($source_id);
|
||||
$is_enabled = ConnectorUtils::isSourceEnabled($source_id);
|
||||
$modules_sources = array();
|
||||
$sources = ConnectorUtils::getConnectors();
|
||||
$display_data = array();
|
||||
|
||||
if($is_enabled) {
|
||||
$searchDefs = ConnectorUtils::getSearchDefs();
|
||||
$searchDefs = !empty($searchDefs[$_REQUEST['source_id']]) ? $searchDefs[$_REQUEST['source_id']] : array();
|
||||
|
||||
$source = SourceFactory::getSource($_REQUEST['source_id']);
|
||||
$field_defs = $source->getFieldDefs();
|
||||
|
||||
|
||||
//Create the Javascript code to dynamically add the tables
|
||||
$json = getJSONobj();
|
||||
foreach($searchDefs as $module=>$fields) {
|
||||
|
||||
$disabled = array();
|
||||
$enabled = array();
|
||||
|
||||
$enabled_fields = array_flip($fields);
|
||||
$field_keys = array_keys($field_defs);
|
||||
|
||||
foreach($field_keys as $index=>$key) {
|
||||
if(!empty($field_defs[$key]['hidden']) || empty($field_defs[$key]['search'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!isset($enabled_fields[$key])) {
|
||||
$disabled[$key] = !empty($connector_strings[$field_defs[$key]['vname']]) ? $connector_strings[$field_defs[$key]['vname']] : $key;
|
||||
} else {
|
||||
$enabled[$key] = !empty($connector_strings[$field_defs[$key]['vname']]) ? $connector_strings[$field_defs[$key]['vname']] : $key;
|
||||
}
|
||||
}
|
||||
|
||||
$modules_sources[$module] = array_merge($enabled, $disabled);
|
||||
asort($disabled);
|
||||
$display_data[$module] = array('enabled' => $enabled, 'disabled' => $disabled);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ss->assign('no_searchdefs_defined', !$is_enabled);
|
||||
$this->ss->assign('display_data', $display_data);
|
||||
$this->ss->assign('modules_sources', $modules_sources);
|
||||
$this->ss->assign('sources', $sources);
|
||||
$this->ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$this->ss->assign('APP', $GLOBALS['app_strings']);
|
||||
$this->ss->assign('source_id', $_REQUEST['source_id']);
|
||||
$this->ss->assign('theme', $GLOBALS['theme']);
|
||||
$this->ss->assign('connector_language', $connector_strings);
|
||||
echo $this->ss->fetch('modules/Connectors/tpls/search_properties.tpl');
|
||||
}
|
||||
}
|
||||
87
modules/Connectors/views/view.sourceproperties.php
Executable file
87
modules/Connectors/views/view.sourceproperties.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Contacts module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class ViewSourceProperties extends ViewList {
|
||||
|
||||
function ViewSourceProperties(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function process() {
|
||||
parent::process();
|
||||
}
|
||||
|
||||
function display() {
|
||||
require_once('include/connectors/sources/SourceFactory.php');
|
||||
require_once('include/connectors/utils/ConnectorUtils.php');
|
||||
|
||||
$source_id = $_REQUEST['source_id'];
|
||||
$connector_language = ConnectorUtils::getConnectorStrings($source_id);
|
||||
$source = SourceFactory::getSource($source_id);
|
||||
$properties = $source->getProperties();
|
||||
|
||||
$required_fields = array();
|
||||
$config_fields = $source->getRequiredConfigFields();
|
||||
$fields = $source->getRequiredConfigFields();
|
||||
foreach($fields as $field_id) {
|
||||
$label = isset($connector_language[$field_id]) ? $connector_language[$field_id] : $field_id;
|
||||
$required_fields[$field_id]=$label;
|
||||
}
|
||||
|
||||
$this->ss->assign('required_properties', $required_fields);
|
||||
$this->ss->assign('source_id', $source_id);
|
||||
$this->ss->assign('properties', $properties);
|
||||
$this->ss->assign('mod', $GLOBALS['mod_strings']);
|
||||
$this->ss->assign('app', $GLOBALS['app_strings']);
|
||||
$this->ss->assign('connector_language', $connector_language);
|
||||
$this->ss->assign('hasTestingEnabled', $source->hasTestingEnabled());
|
||||
echo $this->ss->fetch('modules/Connectors/tpls/source_properties.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user