Add TPL files
This commit is contained in:
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>
|
||||
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>
|
||||
Reference in New Issue
Block a user