[Vtigercrm-commits] [vtiger-commits] r5961 - in /vtigercrm/trunk: Smarty/templates/ include/js/ include/utils/ modules/Emails/ modules/Users/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun May 14 11:16:46 EDT 2006
Author: don
Date: Sun May 14 09:16:36 2006
New Revision: 5961
Log:
email issues has been fixed
Modified:
vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl
vtigercrm/trunk/Smarty/templates/EmailContents.tpl
vtigercrm/trunk/Smarty/templates/Emails.tpl
vtigercrm/trunk/include/js/Mail.js
vtigercrm/trunk/include/utils/ListViewUtils.php
vtigercrm/trunk/modules/Emails/Email.js
vtigercrm/trunk/modules/Users/Popup_picker_emails.html
Modified: vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl Sun May 14 09:16:36 2006
@@ -90,7 +90,7 @@
{elseif $elements.2.0 eq 'subject'}
<tr>
<td class="lvtCol" style="padding: 5px;" align="right" nowrap><font color="red">*</font>{$elements.1.0} :</td>
- <td colspan="2" class="dvtCellLabel" style="padding: 5px;"><input type="text" class="txtBox" name="{$elements.2.0}" value="{$elements.3.0}"></td>
+ <td colspan="2" class="dvtCellLabel" style="padding: 5px;"><input type="text" class="txtBox" name="{$elements.2.0}" value="{$elements.3.0}" id="{$elements.2.0}"></td>
</tr>
{elseif $elements.2.0 eq 'filename'}
@@ -114,8 +114,8 @@
<tr>
<td colspan="3" class="lvtCol" style="padding: 5px;" align="center">
- <input title="Save [Alt+S]" accessKey="S" class="classBtn" onclick="this.form.action.value='Save';" type="submit" name="button" value="Save" >
- <input name="send" value=" Send " class="classBtn" type="submit" onclick="this.form.action.value='Save';this.form.send_mail.value='true';">
+ <input title="Save [Alt+S]" accessKey="S" class="classBtn" onclick="return email_validate(this.form,'save');" type="button" name="button" value="Save" >
+ <input name="send" value=" Send " class="classBtn" type="button" onclick="return email_validate(this.form,'send');">
<input name="cancel" value=" Cancel " class="classBtn" type="button" onClick="window.close()">
</td>
</tr>
@@ -123,4 +123,32 @@
</table>
</form>
</body>
+{literal}
+<script>
+function email_validate(oform,mode)
+{
+ if(oform.parent_name.value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0)
+ {
+ alert('No recipients were specified');
+ return false;
+ }
+ if(oform.subject.value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0)
+ {
+ if(email_sub = prompt('You did not specify a subject from this email. If you would like to provide one, please type it now','(no-Subject)'))
+ {
+ oform.subject.value = email_sub;
+ }else
+ {
+ return false;
+ }
+ }
+ if(mode == 'send')
+ {
+ oform.send_mail.value='true';
+ }
+ oform.action.value='Save';
+ oform.submit();
+}
+</script>
+{/literal}
</html>
Modified: vtigercrm/trunk/Smarty/templates/EmailContents.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/EmailContents.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/EmailContents.tpl Sun May 14 09:16:36 2006
@@ -20,8 +20,8 @@
{foreach key=id item=row from=$LISTENTITY}
<tr onmouseover="this.className='prvPrfHoverOn'" onmouseout="this.className='prvPrfHoverOff'">
<td>
- <input type="checkbox" name="selected_id" value= '{$id}' onClick=toggleSelectAll(this.name,"selectall")>
-</td>
+ <span><input type="checkbox" name="selected_id" value= '{$id}' onClick=toggleSelectAll(this.name,"selectall")>
+</span></td>
{foreach item=row_values from=$row}
<td><b>{$row_values}</b></td>
{/foreach}
Modified: vtigercrm/trunk/Smarty/templates/Emails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Emails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Emails.tpl Sun May 14 09:16:36 2006
@@ -36,21 +36,21 @@
function DeleteEmail(id)
{
if(confirm("Are you sure you want to delete ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxDelResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Emails&idlist="+id;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
+ {
+ show("status");
+ var ajaxObj = new Ajax(ajaxDelResponse);
+ var urlstring ="module=Users&action=massdelete&return_module=Emails&idlist="+id;
+ ajaxObj.process("index.php?",urlstring);
+ }
+ else
+ {
+ return false;
+ }
}
function ajaxDelResponse(response)
{
hide("status");
- document.getElementById("EmailDetails").innerHTML='';
+ document.getElementById('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top: 10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
document.getElementById("subjectsetter").innerHTML='';
document.getElementById("email_con").innerHTML=response.responseText;
}
Modified: vtigercrm/trunk/include/js/Mail.js
==============================================================================
--- vtigercrm/trunk/include/js/Mail.js (original)
+++ vtigercrm/trunk/include/js/Mail.js Sun May 14 09:16:36 2006
@@ -99,8 +99,16 @@
//added by rdhital for better emails
function set_return_emails(entity_id,email_id,parentname,emailadd){
+ if(emailadd != '')
+ {
window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|';
window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; ';
+ window.close();
+ }else
+ {
+ alert('The Record '+parentname+' does\'t have email id' );
+ return false;
+ }
}
//added by raju for emails
Modified: vtigercrm/trunk/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/ListViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/ListViewUtils.php Sun May 14 09:16:36 2006
@@ -1269,8 +1269,7 @@
//Change this index 0 - to get the fieldid based on email1 or email2
$fieldid = $adb->query_result($queryres,0,'fieldid');
- $value = '<a href="a" LANGUAGE=javascript onclick=\'set_return_emails('.$entity_id.','.$fieldid.',"'
- .$name.'","'.$emailaddress.'"); window.close(); \'>'.$name.'</a>';
+ $value = '<a href="a" LANGUAGE=javascript onclick=\'return set_return_emails('.$entity_id.','.$fieldid.',"'.$name.'","'.$emailaddress.'"); \'>'.$name.'</a>';
}elseif ($module=='Contacts' || $module=='Leads')
{
@@ -1287,7 +1286,7 @@
$fieldid = $adb->query_result($queryres,0,'fieldid');
//$value = '<a href="javascript: submitform('.$entity_id.');">'.$name.'</a>';
- $value = '<a href="a" LANGUAGE=javascript onclick=\'set_return_emails('.$entity_id.','.$fieldid.',"'.$name.'","'.$emailaddress.'"); window.close(); \'>'.$name.'</a>';
+ $value = '<a href="a" LANGUAGE=javascript onclick=\'return set_return_emails('.$entity_id.','.$fieldid.',"'.$name.'","'.$emailaddress.'"); \'>'.$name.'</a>';
}
Modified: vtigercrm/trunk/modules/Emails/Email.js
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.js (original)
+++ vtigercrm/trunk/modules/Emails/Email.js Sun May 14 09:16:36 2006
@@ -27,7 +27,8 @@
if (document.massdelete.selected_id.checked)
{
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
+ idstring = document.massdelete.selected_id.value+':';
+ xx = 1;
}
else
{
@@ -68,3 +69,4 @@
return false;
}
}
+
Modified: vtigercrm/trunk/modules/Users/Popup_picker_emails.html
==============================================================================
--- vtigercrm/trunk/modules/Users/Popup_picker_emails.html (original)
+++ vtigercrm/trunk/modules/Users/Popup_picker_emails.html Sun May 14 09:16:36 2006
@@ -86,7 +86,7 @@
<!-- BEGIN: row -->
<tr height=20 class={ROW_COLOR}>
<td WIDTH="2" class="blackLine"><IMG SRC="include/images/blank.gif">
- <td valign=TOP style="padding:0px 3px 0px 3px;" ><a href="a" LANGUAGE=javascript onclick='set_return_emails("{USER.ID}",-1,"{USER.FIRST_NAME} {USER.LAST_NAME}","{USER.EMAIL1}"); window.close()'>{USER.FIRST_NAME} {USER.LAST_NAME}</a></td>
+ <td valign=TOP style="padding:0px 3px 0px 3px;" ><a href="a" LANGUAGE=javascript onclick='return set_return_emails("{USER.ID}",-1,"{USER.FIRST_NAME} {USER.LAST_NAME}","{USER.EMAIL1}");'>{USER.FIRST_NAME} {USER.LAST_NAME}</a></td>
<td WIDTH="2" class="blackLine"><IMG SRC="include/images/blank.gif">
<td valign=TOP style="padding:0px 3px 0px 3px;" >{USER.USER_NAME}</td>
<td WIDTH="2" class="blackLine"><IMG SRC="include/images/blank.gif">
More information about the vtigercrm-commits
mailing list