[Vtigercrm-commits] [vtiger-commits] r5040 - in /vtigercrm/trunk/modules/Webmails: ListView.php Save.php showOverviewUI.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Apr 8 07:55:25 EDT 2006
Author: mmbrich
Date: Sat Apr 8 05:55:24 2006
New Revision: 5040
Log:
added AJAX "add to vtiger" abilities for Quick View
Modified:
vtigercrm/trunk/modules/Webmails/ListView.php
vtigercrm/trunk/modules/Webmails/Save.php
vtigercrm/trunk/modules/Webmails/showOverviewUI.php
Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Sat Apr 8 05:55:24 2006
@@ -1,3 +1,18 @@
+<script type="text/javascript">
+function add_to_vtiger(mid) {
+ $("status").style.display="block";
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position:'front', scope: 'command', limit:1},
+ method: 'post',
+ postBody: 'module=Webmails&action=Save&mailid='+mid+'&ajax=true',
+ onComplete: function(t) {
+ $("status").style.display="none";
+ }
+ }
+ );
+}
+</script>
<?php
global $current_user;
require_once('Smarty_setup.php');
Modified: vtigercrm/trunk/modules/Webmails/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/Save.php (original)
+++ vtigercrm/trunk/modules/Webmails/Save.php Sat Apr 8 05:55:24 2006
@@ -88,8 +88,10 @@
$who = $adb->query_result($res,0,'first_name')." ".$adb->query_result($res,0,'last_name');
sendmail($to_address,$cc_address,$bcc_address,$emailaddr,$who,$subject,$msgData);
header("Location: index.php?action=$return_action&module=$return_module");
-} else
- header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
+} else {
+ if($_POST["ajax"] != "true")
+ header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
+}
return;
?>
Modified: vtigercrm/trunk/modules/Webmails/showOverviewUI.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/showOverviewUI.php (original)
+++ vtigercrm/trunk/modules/Webmails/showOverviewUI.php Sat Apr 8 05:55:24 2006
@@ -30,7 +30,7 @@
<input type="hidden" name="subject" value="<?php echo $webmail->subject;?>">
<input title="Save" class="small" onclick="this.form.action.value='EditView';this.form.reply.value='single';return true;" type="submit" name="button" value=" Reply " >
<input title="Save" class="small" onclick="this.form.action.value='EditView';this.form.reply.value='all';return true;" type="submit" name="button" value=" Reply To All " >
- <input title="Save" class="small" onclick="this.form.action.value='Save';return true;" type="submit" name="button" value=" Add to Vtiger " >
+ <input title="Save" class="small" onclick="add_to_vtiger(<?php echo $num;?>);return false;" type="submit" name="button" value=" Add to Vtiger " >
</form>
</td>
</tr>
More information about the vtigercrm-commits
mailing list