Add html files

This commit is contained in:
2025-05-12 15:45:02 +00:00
parent 82d5804ac4
commit 7ddd15c4fa
1224 changed files with 277606 additions and 0 deletions

View File

@@ -0,0 +1,156 @@
<!--
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
-->
<!-- BEGIN: main -->
<!-- BEGIN: SearchHeader -->
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tabForm">
<tr>
<td>
<form action="index.php" method="post" name="popup_query_form" id="the_form">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_CODE}&nbsp;&nbsp;<input type="text" name="code" size="20" class="dataField" value="{CODE}" /></td>
<td class="dataLabel" nowrap="nowrap">{MOD.LBL_NAME}&nbsp;&nbsp;<input type="text" name="name" size="20" class="dataField" value="{NAME}" /></td>
<td width="20%" align="right">
<input type="hidden" name="module" value="{MODULE_NAME}" />
<input type="hidden" name="action" value="Popup" />
<input type="hidden" name="query" value="true" />
<input type="hidden" name="request_data" value="{request_data}" />
<input type="hidden" name="record_id" value="" />
<input type="submit" name="button" class="button"
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
/* initialize the popup request from the parent */
if(window.document.forms['popup_query_form'].request_data.value == "")
{
window.document.forms['popup_query_form'].request_data.value
= JSON.stringify(window.opener.get_popup_request_data());
}
-->
</script>
<!-- END: SearchHeader -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listView">
<!-- BEGIN: list_nav_row -->
{PAGINATION}
<!-- END: list_nav_row -->
<tr height="20" class="listViewThS1">
<td scope="col" width="5%" class="listViewThS1" NOWRAP>{CHECKALL}</td>
<td scope="col" scope="col" width="15%" class="listViewThS1" NOWRAP>
<slot>
<a href="{ORDER_BY}code" class="listViewThLinkS1">{MOD.LBL_CODE}{arrow_start}{name_arrow}{arrow_end}</a>
</slot>
</td>
<td scope="col" scope="col" width="50%" class="listViewThS1" NOWRAP>
<slot>
<a href="{ORDER_BY}name" class="listViewThLinkS1">{MOD.LBL_NAME}{arrow_start}{name_arrow}{arrow_end}</a>
</slot>
</td>
<td scope="col" scope="col" width="35%" class="listViewThS1" NOWRAP>
<slot>
<a href="{ORDER_BY}selling_price" class="listViewThLinkS1">{MOD.LBL_SELLING_PRICE}{arrow_start}{name_arrow}{arrow_end}</a>
</slot>
</td>
</tr>
<!-- BEGIN: row -->
<tr height="20"
onmouseover="setPointer(this, '{ECMCALL.ID}', 'over', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmouseout="setPointer(this, '{ECMCALL.ID}', 'out', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');"
onmousedown="setPointer(this, '{ECMCALL.ID}', 'click', '{BG_COLOR}', '{BG_HILITE}', '{BG_CLICK}');">
<td class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}" valign='top'>{PREROW}</td>
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
<slot>
<{TAG.MAIN} href="#"
onclick="send_back('EcmCall','{ECMCALL.ID}');"
class="listViewTdLinkS1">{ECMCALL.CODE}</{TAG.MAIN}>
</slot>
</td>
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
<slot>
<{TAG.MAIN} href="#"
onclick="send_back('EcmCall','{ECMCALL.ID}');"
class="listViewTdLinkS1">{ECMCALL.NAME}</{TAG.MAIN}>
</slot>
</td>
<td scope="row" valign="top" class="{ROW_COLOR}S1" bgcolor="{BG_COLOR}">
<slot>
<{TAG.MAIN} href="#"
onclick="send_back('EcmCall','{ECMCALL.ID}');"
class="listViewTdLinkS1">{ECMCALL.SELLING_PRICE}</{TAG.MAIN}>
</slot>
</td>
</tr>
<tr>
<td colspan="20" class="listViewHRS1"></td>
</tr>
<!-- END: row -->
</table>
{ASSOCIATED_JAVASCRIPT_DATA}
<!-- END: main -->

263
modules/EcmCalls/SearchForm.html Executable file
View File

@@ -0,0 +1,263 @@
<!-- BEGIN: main -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel">{APP.LBL_CURRENT_USER_FILTER}
</td>
<td valign="top" class="dataField">
<span sugar='slot1b'>
<input name='current_user_only_basic' class="checkbox" type="checkbox" {CURRENT_USER_ONLY}>
</span sugar='slot'>
</td>
<td class="dataLabel" noWrap>
<span sugar='slot1'>{MOD.LBL_CALLDATE}</span sugar='slot'>
</td>
<td valign="top" class="dataField">
<span sugar='slot1b'>
<select id="calldate_basic" name="calldate_basic">{CALLDATE_BASIC}</select>
</span sugar='slot'>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- END: main -->
<!-- BEGIN: advanced -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="border-top: 0px none; margin-bottom: 4px" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dataLabel" width="15%" noWrap>
<span sugar='slot1'>{MOD.LBL_CALLDATE_FROM}</span sugar='slot'>
</td>
<td valign="top" width="35%" class="dataField">
<span sugar='slot1b'>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td nowrap>
<input autocomplete="off" type="text" id="call_date_from_advanced_date" value="{CALLDATEFROMADVANCED}" size="11" maxlength="10" title='{HELP}' tabindex="f" onblur="combo_call_date_from_advanced.update();">
<input type="hidden" id="call_date_from_advanced" name="call_date_from_advanced" value="{CALLDATEFROMADVANCED}">
<img border="0" src="themes/default/images/jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="call_date_from_advanced_trigger" align="absmiddle">&nbsp;
</td>
<td nowrap>
<div id="call_date_from_advanced_time_section"></div>
</td>
</tr>
<tr valign="middle">
<td nowrap>
<span class="dateFormat">{USER_DATEFORMAT}</span>
</td>
<td nowrap>
<span class="dateFormat">{TIME_FORMAT}</span>
</td>
</tr>
</table>
<script type="text/javascript" src="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js"></script>
<script type="text/javascript">
var combo_call_date_from_advanced = new Datetimecombo("{CALLDATEFROMADVANCED}", "call_date_from_advanced", "{TIME_FORMAT}", 'f', '', '');
//Render the remaining widget fields
text = combo_call_date_from_advanced.html('');
document.getElementById('call_date_from_advanced_time_section').innerHTML = text;
//Call eval on the update function to handle updates to calendar picker object
eval(combo_call_date_from_advanced.jsscript(''));
</script>
<script type="text/javascript">
Calendar.setup ({
onClose : update_call_date_from_advanced,
inputField : "call_date_from_advanced_date",
ifFormat : "{CALENDAR_FORMAT}",
daFormat : "{CALENDAR_FORMAT}",
button : "call_date_from_advanced_trigger",
singleClick : true,
step : 1
});
//Call update for first time to round hours and minute values
combo_call_date_from_advanced.update();
</script>
</span sugar='slot'>
</td>
<td class="dataLabel" width="15%" noWrap>
<span sugar='slot1'>{MOD.LBL_CALLDATE_TO}</span sugar='slot'>
</td>
<td valign="top" width="35%" class="dataField">
<span sugar='slot1b'>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td nowrap>
<input autocomplete="off" type="text" id="call_date_to_advanced_date" value="{CALLDATETOADVANCED}" size="11" maxlength="10" title='{HELP}' tabindex="f" onblur="combo_call_date_to_advanced.update();">
<input type="hidden" id="call_date_to_advanced" name="call_date_to_advanced" value="{CALLDATETOADVANCED}">
<img border="0" src="themes/default/images/jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="call_date_to_advanced_trigger" align="absmiddle">&nbsp;
</td>
<td nowrap>
<div id="call_date_to_advanced_time_section"></div>
</td>
</tr>
<tr valign="middle">
<td nowrap>
<span class="dateFormat">{USER_DATEFORMAT}</span>
</td>
<td nowrap>
<span class="dateFormat">{TIME_FORMAT}</span>
</td>
</tr>
</table>
<script type="text/javascript" src="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js"></script>
<script type="text/javascript">
var combo_call_date_to_advanced = new Datetimecombo("{CALLDATETOADVANCED}", "call_date_to_advanced", "{TIME_FORMAT}", 'f', '', '');
//Render the remaining widget fields
text = combo_call_date_to_advanced.html('');
document.getElementById('call_date_to_advanced_time_section').innerHTML = text;
//Call eval on the update function to handle updates to calendar picker object
eval(combo_call_date_to_advanced.jsscript(''));
</script>
<script type="text/javascript">
Calendar.setup ({
onClose : update_call_date_to_advanced,
inputField : "call_date_to_advanced_date",
ifFormat : "{CALENDAR_FORMAT}",
daFormat : "{CALENDAR_FORMAT}",
button : "call_date_to_advanced_trigger",
singleClick : true,
step : 1
});
//Call update for first time to round hours and minute values
combo_call_date_to_advanced.update();
</script>
</span sugar='slot'>
</td>
</tr>
<tr>
<td class="dataLabel" valign="top" style="vertical-align:top;" width="15%" noWrap>
<span sugar='slot1'>{MOD.LBL_FROM}</span sugar='slot'>
</td>
<td valign="top" width="35%" class="dataField" valign="top" style="vertical-align:top;">
<script language="javascript">
var parent_info = {PARENT_IDS_OBJECTS};
function clearSelectWithIds(select) {
if(!select) return;
while(select.options.length > 0) select.remove(0);
}
function addFieldToSelect(select,value,id,selected) {
var elOptNew = document.createElement('option');
elOptNew.text = value;
elOptNew.value = id;
if(selected && selected == 1) elOptNew.selected = true;
try {
return select.add(elOptNew,null); // standards compliant; doesn't work in IE
}
catch(ex) {
return select.add(elOptNew); // IE only
}
}
function fillSelectWithIds(select1,select2) {
clearSelectWithIds(select2);
if(select1.value == '') return;
for(x in parent_info['ids'][select1.value]) addFieldToSelect(select2,parent_info['ids'][select1.value][x],x,false);
}
</script>
<div style="height:10px;"></div>
<span sugar='slot1b' style="vertical-align:top;">
<select id="parent_from_advanced" name="parent_from_advanced" onchange="fillSelectWithIds(this,document.getElementById('parent_from_id_advanced'));">{PARENT_FROM_ADVANCED}</select>
&nbsp;&nbsp;
</span sugar='slot'>
<span sugar='slot1b'>
<select multiple="multiple" size="8" id="parent_from_id_advanced" name="parent_from_id_advanced[]">{PARENT_FROM_ID_ADVANCED}</select>
&nbsp;&nbsp;
</span sugar='slot'>
<span sugar='slot1b' style="vertical-align:top;">
<input type="checkbox" id="in_out_advanced" name="in_out_advanced" onclick="if(this.checked) { document.getElementById('parent_to_advanced').value = ''; document.getElementById('parent_to_advanced').onchange(); document.getElementById('parent_to_advanced').disabled=true; document.getElementById('parent_to_id_advanced').disabled=true; } else { document.getElementById('parent_to_advanced').disabled=false; document.getElementById('parent_to_id_advanced').disabled=false; }" {IN_OUT_ADVANCED} /> {MOD.LBL_IN_OUT_FROM}
</span sugar='slot'>
<div style="height:10px;"></div>
</td>
<td class="dataLabel" width="15%" valign="top" noWrap>
<span sugar='slot1'>{MOD.LBL_TO}</span sugar='slot'>
</td>
<td valign="top" width="35%" class="dataField">
<div style="height:10px;"></div>
<span sugar='slot1b'>
<select style="vertical-align:top;" id="parent_to_advanced" name="parent_to_advanced" onchange="fillSelectWithIds(this,document.getElementById('parent_to_id_advanced'));">{PARENT_TO_ADVANCED}</select>
&nbsp;&nbsp;
</span sugar='slot'>
<span sugar='slot1b'>
<select multiple="multiple" size="8" id="parent_to_id_advanced" name="parent_to_id_advanced[]">{PARENT_TO_ID_ADVANCED}</select>
</span sugar='slot'>
<div style="height:10px;"></div>
<script language="javascript">
document.getElementById('in_out_advanced').onclick();
</script>
</td>
</tr>
<tr>
<td width="15%" class="dataLabel">{APP.LBL_CURRENT_USER_FILTER}
</td>
<td valign="top" width="35%" class="dataField">
<span sugar='slot1b'>
<input name='current_user_only_advanced' class="checkbox" type="checkbox" {CURRENT_USER_ONLY_ADVANCED}>
</span sugar='slot'>
</td>
<td width="15%" class="dataLabel" noWrap>
<span sugar='slot1'>{MOD.LBL_CALLDATE}</span sugar='slot'>
</td>
<td width="35%" valign="top" class="dataField">
<span sugar='slot1b'>
<select id="calldate_advanced" name="calldate_advanced">{CALLDATE_ADVANCED}</select>
</span sugar='slot'>
</td>
</tr>
<tr>
<tr>
<td colspan='20'>&nbsp;
</td>
</tr>
<tr>
<td colspan='6'>
<a class='listViewTdLinkS1' onhover href='javascript:toggleInlineSearch()'><img src='{IMG_PATH}/advanced_search.gif' id='up_down_img' border=0>{APP.LNK_SAVED_VIEWS}</a><br>
<input type='hidden' id='showSSDIV' name='showSSDIV' value='{SHOWSSDIV}'><p>
<div style='{DISPLAYSS}' id='inlineSavedSearch' >
{SAVED_SEARCH}
</div>
</td>
</tr>
<tr>
<td colspan='5'>&nbsp;</td>
<td align=right><img border='0' src='{IMG_PATH}help.gif' onmouseover="return overlib(SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TEXT'), STICKY, MOUSEOFF,1000,WIDTH, 700, LEFT,CAPTION,'<div style=\'float:left\'>Working with Multiselects and Saved Searches</div>', CLOSETEXT, '<div style=\'float: right\'><img border=0 style=\'margin-left:2px; margin-right: 2px;\' src={IMG_PATH}close.gif></div>',CLOSETITLE, 'Close', CLOSECLICK,FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass');" ></td>
</tr>
</table>
</td>
</tr>
</table>
<script>
if(typeof(loadSSL_Scripts)=='function'){
loadSSL_Scripts();
}
</script>
<!-- END: advanced -->

90
modules/EcmCalls/Settings.html Executable file
View File

@@ -0,0 +1,90 @@
<!-- BEGIN: main -->
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<script type="text/javascript" src="modules/EcmCalls/MyTable.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmCalls/MyTable.css" />
<script type="text/javascript" src="modules/EcmCalls/Settings.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<form name="Settings" onsubmit="return ItemListSave(true);" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmCalls">
<input type="hidden" name="action" value="SettingsSave">
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
<input type="hidden" name="return_id" value="{RETURN_ID}">
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
<input type="hidden" id="phone_list" name="phone_list" value='{PHONE_LIST}' >
<td style="padding-bottom: 2px;">
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" tabindex="1" class="button"
onclick="this.form.action.value='SettingsSave';return check_form('Settings');"
type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" tabindex="1" class="button"
onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'"
type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
<td align='right'>{ADMIN_EDIT}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
<tr>
<td width="15%" class="dataLabel" valign="top"><span sugar='slot1'>{MOD.LBL_CENTRAL_AREACODE} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td width="35%" class="dataField"><span sugar='slot1b'><input name='central_areacode' tabindex="1" maxlength='10' value="{CENTRAL_AREACODE}"></span sugar='slot'></td>
</tr>
-->
<tr>
<td width="15%" valign="top" class="dataLabel">
<span sugar="slot4">{MOD.LBL_CENTRAL_TIMEZONE} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span>
</span sugar="slot"></td>
<td width="35%" class="dataField">
<span sugar="slot4b">
<select tabindex='1' name='central_timezone'>{CENTRAL_TIMEZONE_OPTIONS}</select>
</span sugar="slot"></td>
</tr>
<tr>
<td width="15%" class="dataLabel" valign="top" colspan="4"><span sugar='slot1'>{MOD.LBL_OWN_PHONES} </span sugar='slot'>
<div style="width:50%;border: 1px solid rgb(48,192,255);background-color:white;height:400px;max-height:400px;overflow:auto;">
<table class="positions" style="width:100%;" id="phonesTable">
<thead id="head">
<tr id="tr">
<td width="10%">No.</td>
<td width="20%">Number</td>
<td width="60%">Description</td>
<td width="10%">Options</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="padding-top: 2px">
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" tabindex="1" class="button" onclick="this.form.action.value='SettingsSave';return check_form('Settings');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" tabindex="1" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
</div>
</form>
{JAVASCRIPT}
<!-- END: main -->

View File

@@ -0,0 +1,293 @@
<!-- BEGIN: main -->
<script type="text/javascript" src="modules/EcmCalls/anMenu/anMenu.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmCalls/anMenu/anMenu.css" />
<div id="anMenu" class="anMenu" style="display:none;">
<form name="anMenuEdit">
<div id="anMenuHeader" class="anMenuHeader">
{MOD.LBL_ASSIGN_MENU_TITLE}
<img src="modules/EcmCalls/anMenu/close.gif" width="12" height="12" onClick="anMenuClose();" />
</div>
<div id="anMenuBody" class="anMenuBody">
<table>
<tr>
<td>
{MOD.LBL_ASSIGN_MENU_PARENT_NAME}:
</td>
<td>
<select id="an_menu_parent" name="an_menu_parent">
{AN_MENU_PARENT_OPTIONS}
</select>
<input type="text" name="an_menu_parent_name" id="an_menu_parent_name" class="sqsEnabled" autocomplete="off" />
<input type="hidden" name="an_menu_parent_id" id="an_menu_parent_id" />
<input type="button" id="an_menu_parent_select_button" value="{MOD.LBL_ASSIGN_MENU_SELECT_BUTTON}" />
<input type="button" id="an_menu_parent_clear_button" value="{MOD.LBL_ASSIGN_MENU_CLEAR_BUTTON}" />
<input type="button" id="an_menu_parent_create_button" value="{MOD.LBL_ASSIGN_MENU_CREATE_BUTTON}" />
</td>
</tr>
<tr>
<td>
{MOD.LBL_ASSIGN_MENU_PARENT_PHONE}:
</td>
<td>
<span id="an_menu_parent_phones_select">
{AN_MENU_PARENT_PHONES_OPTIONS}
</span>
</td>
</tr>
<tr>
<td>
{MOD.LBL_ASSIGN_MENU_NEW_NUMBER}:
</td>
<td>
<span id="an_menu_parent_phones_select">
<input type="text" name="an_menu_new_phone" id="an_menu_new_phone" style="width:250px" />
</span>
</td>
</tr>
<tr>
<td>
{MOD.LBL_ASSIGN_MENU_UPDATE_RECORDS}:
</td>
<td>
<span id="an_menu_parent_uaor">
<select name="an_menu_update_records" id="an_menu_update_records">{AN_MENU_UPDATE_RECORDS_OPTIONS}</select>
</span>
</td>
</tr>
</table>
</div>
<div id="anMenuFooter" class="anMenuFooter">
<div style="text-align:right;">
<span>
<input type="hidden" name="an_menu_old_parent" id="an_menu_old_parent" />
<input type="hidden" name="an_menu_old_parent_id" id="an_menu_old_parent_id" />
<input type="hidden" name="an_menu_old_parent_phone" id="an_menu_old_parent_phone" />
<input type="hidden" name="an_menu_ecmcall_record" id="an_menu_ecmcall_record" />
<input type="button" class="button" value="{MOD.LBL_ASSIGN_MENU_SAVE_BUTTON}" id="an_menu_parent_save_button" />
<input type="button" class="button" value="{MOD.LBL_ASSIGN_MENU_CANCEL_BUTTON}" onClick="anMenuClose();" />
</span>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="include/JSON.js"></script>
<script language="javascript">sqsWaitGif = "themes/default/images/sqsWait.gif";</script>
<script language="javascript">
if(typeof(sqs_objects) != "object") {
sqs_objects = new Object();
}
</script>
<script language="javascript" src="include/javascript/quicksearch.js"></script>
<script language="javascript" src="modules/EcmCalls/formloader.js"></script>
<script language="javascript">
function anMenuClose() {
anMenuClear();
var am = document.getElementById('anMenu');
if(am && am.style) am.style.display = 'none';
}
function anMenuClear() {
document.forms.anMenuEdit.an_menu_parent_name.value = "";
document.forms.anMenuEdit.an_menu_parent_id.value = "";
enableQS(false);
}
function anMenuParentIdChange() {
if(an_menu_parent_old_id != document.forms.anMenuEdit.an_menu_parent_id.value) {
an_menu_parent_old_id = document.forms.anMenuEdit.an_menu_parent_id.value;
anMenuParentChange();
}
}
function anMenuParentChange(noClear) {
var an_menu_parent = document.getElementById('an_menu_parent');
if(an_menu_parent.value == "Users") {
sqs_objects["an_menu_parent_name"] = sqs_objects_employee;
}
else {
sqs_objects["an_menu_parent_name"] = sqs_objects_other;
sqs_objects["an_menu_parent_name"]["modules"][0] = an_menu_parent.value;
}
enableQS(false);
YAHOO.util.Connect.asyncRequest(
'POST',
'index.php',
{
success: function(results) {
//alert(results.responseText);
if(results.responseText) {
var an_menu_parent_phones_select = document.getElementById('an_menu_parent_phones_select');
if(an_menu_parent_phones_select) {
an_menu_parent_phones_select.innerHTML = results.responseText;
}
}
},
failure: function(results) {}
},
'module=EcmCalls&action=AnMenu&anMenuAction=get'+an_menu_parent.value+'Select&to_pdf=1&an_menu_parent_id='+document.forms.anMenuEdit.an_menu_parent_id.value
);
}
var an_menu_parentFL;
var an_menu_dd;
var an_menu_parent_old_id = '';
YAHOO.util.Event.addListener(window, 'load', function() {
sqs_objects_other = {
"method":"query",
"modules":["Accounts"],
"group":"or",
"field_list":["name", "id"],
"populate_list":["an_menu_parent_name", "an_menu_parent_id"],
"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],
"limit":"30",
"order":"name",
"no_match_text":"No Match"
}
sqs_objects_employee = {
"method":"get_employee_array",
"modules":["Users"],
"group":"or",
"field_list":["name", "id"],
"populate_list":["an_menu_parent_name", "an_menu_parent_id"],
"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],
"limit":"30",
"order":"name",
"no_match_text":"No Match"
}
sqs_objects["an_menu_parent_name"] = sqs_objects_other;
enableQS(false);
var an_menu_parent = document.getElementById('an_menu_parent');
YAHOO.util.Event.addListener(an_menu_parent, 'change', function() { anMenuClear(); an_menu_parent_old_id = ''; anMenuParentChange(); } );
var an_menu_parent_select_button = document.getElementById('an_menu_parent_select_button');
YAHOO.util.Event.addListener(an_menu_parent_select_button, 'click', function() {
var sb = document.getElementById('an_menu_parent');
if(sb) {
var user_obj = {"call_back_function":"set_return","form_name":"anMenuEdit","field_to_name_array":{"id":"an_menu_parent_id","full_name":"an_menu_parent_name"}};
var other_obj = {"call_back_function":"set_return","form_name":"anMenuEdit","field_to_name_array":{"id":"an_menu_parent_id","name":"an_menu_parent_name"}};
if(sb.value == "Users") var select_obj = user_obj; else var select_obj = other_obj;
open_popup((sb.value == "Users" ? "Employees" : sb.value), 600, 400, "", true, false, select_obj, "single", true);
}
});
var an_menu_parent_clear_button = document.getElementById('an_menu_parent_clear_button');
YAHOO.util.Event.addListener(an_menu_parent_clear_button, 'click', function() {
anMenuClear();
});
an_menu_parentFL = new FormLoader();
an_menu_parentFL.load('EcmCalls','Parents','an_menu_parentFL');
an_menu_parentFL.onResponseData = function(data) {
//hideSmartInputFloater(true);
document.forms.anMenuEdit.an_menu_parent_id.value = data['id'];
if(document.forms.anMenuEdit.an_menu_parent.value == "Users")
data['name'] = data['user_name'];
document.forms.anMenuEdit.an_menu_parent_name.value = data['name'];
};
an_menu_parentFL.setEditDblClick(document.forms.anMenuEdit.an_menu_parent_name);
an_menu_parentFL.onEditDblClick = function() {
an_menu_parentFL.createModule=document.forms.anMenuEdit.an_menu_parent.value;
return "&fl_record="+document.forms.anMenuEdit.an_menu_parent_id.value+'&fl_'+document.forms.anMenuEdit.an_menu_parent_phone.value+'='+document.forms.anMenuEdit.an_menu_new_phone.value;
}
an_menu_parentFL.onButtonClick = function() {
an_menu_parentFL.createModule = document.forms.anMenuEdit.an_menu_parent.value;
if(document.forms.anMenuEdit.an_menu_parent.value == "Users") var nn = "sugar_user_name"; else var nn= "name";
return "&fl_"+nn+"="+document.forms.anMenuEdit.an_menu_parent_name.value+'&fl_'+document.forms.anMenuEdit.an_menu_parent_phone.value+'='+document.forms.anMenuEdit.an_menu_new_phone.value;
}
var an_menu_parent_create_button = document.getElementById('an_menu_parent_create_button');
YAHOO.util.Event.addListener(an_menu_parent_create_button, 'click', function() {
var sb = document.getElementById('an_menu_parent');
var cc_ = '';
if(sb) {
if(document.forms.anMenuEdit.an_menu_parent.value == "Users") var nn = "sugar_user_name"; else var nn= "name";
if(document.forms.anMenuEdit.an_menu_parent.value == "Contacts") {
var ccc = document.forms.anMenuEdit.an_menu_parent_name.value;
var cc_pos = ccc.indexOf(" ");
if(cc_pos != -1) {
var cc_ = '&fl_first_name='+ccc.substr(0,cc_pos)+'&fl_last_name='+ccc.substr(cc_pos+1,ccc.length);
}
}
window.open("index.php?module=EcmCalls&action=formloader&to_pdf=1&loaderAction=ViewForm&loaderFieldName=an_menu_parentFL&createModule="+sb.value+"&fl_"+nn+"="+document.forms.anMenuEdit.an_menu_parent_name.value+'&fl_'+document.forms.anMenuEdit.an_menu_parent_phone.value+'='+document.forms.anMenuEdit.an_menu_new_phone.value+cc_,"Create30","resizable=yes,scrollbars=no,status=no,height=540,width=700").focus();
}
});
an_menu_dd = new YAHOO.util.DD("anMenu");
an_menu_dd.setHandleElId("anMenuHeader");
var an_menu_parent_save_button = document.getElementById('an_menu_parent_save_button');
YAHOO.util.Event.addListener(an_menu_parent_save_button, 'click', function() {
var data = new Object();
data.an_menu_parent = document.forms.anMenuEdit.an_menu_parent.value;
data.an_menu_parent_phone = document.forms.anMenuEdit.an_menu_parent_phone.value;
data.an_menu_parent_id = document.forms.anMenuEdit.an_menu_parent_id.value;
data.an_menu_new_phone = document.forms.anMenuEdit.an_menu_new_phone.value;
data.an_menu_update_records = document.forms.anMenuEdit.an_menu_update_records.value;
data.an_menu_ecmcall_record = document.forms.anMenuEdit.an_menu_ecmcall_record.value;
data.an_menu_old_parent = document.forms.anMenuEdit.an_menu_old_parent.value;
data.an_menu_old_parent_id = document.forms.anMenuEdit.an_menu_old_parent_id.value;
data.an_menu_old_parent_phone = document.forms.anMenuEdit.an_menu_old_parent_phone.value;
data = JSON.stringifyNoSecurity(data);
var an_menu_parent = document.getElementById('an_menu_parent');
YAHOO.util.Connect.asyncRequest(
'POST',
'index.php',
{
success: function(results) {
//alert('>'+results.responseText+'<');
if(results.responseText) {
var ampid = document.getElementById('an_menu_parent_id');
if(results.responseText.indexOf(ampid.value) != -1) {
alert('{MOD.LBL_ASSIGN_MENU_SAVE_SUCCESS}');
anMenuClose();
window.location.reload();
}
}
},
failure: function(results) { alert('{MOD.LBL_ASSIGN_MENU_SAVE_FAILURE}'); }
},
'module=EcmCalls&action=AnMenu&anMenuAction=Save&to_pdf=1&an_menu_data='+data
);
});
setInterval(anMenuParentIdChange,500);
});
</script>
<!-- END: main -->