[Vtigercrm-commits] [vtiger-commits] r4066 - in /vtigercrm/trunk: Smarty/templates/ include/js/ include/utils/ modules/Accounts/ modules/Activities/ modules/Campaigns/ modules/Contacts/ modules/Emails/ modules/Faq/ modules/HelpDesk/ modules/Invoice/ modules/Leads/ modules/Notes/ modules/Potentials/ modules/PriceBooks/ modules/Products/ modules/PurchaseOrder/ modules/Quotes/ modules/SalesOrder/ modules/Vendors/ themes/blue/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 7 11:04:29 EST 2006
Author: saraj
Date: Tue Mar 7 09:03:44 2006
New Revision: 4066
Log:
freetagintegrated for all modules
Modified:
vtigercrm/trunk/Smarty/templates/DetailView.tpl
vtigercrm/trunk/include/js/dtlviewajax.js
vtigercrm/trunk/include/utils/DeleteUtils.php
vtigercrm/trunk/modules/Accounts/AccountsAjax.php
vtigercrm/trunk/modules/Activities/ActivitiesAjax.php
vtigercrm/trunk/modules/Campaigns/CampaignsAjax.php
vtigercrm/trunk/modules/Contacts/ContactsAjax.php
vtigercrm/trunk/modules/Emails/EmailsAjax.php
vtigercrm/trunk/modules/Faq/FaqAjax.php
vtigercrm/trunk/modules/HelpDesk/HelpDeskAjax.php
vtigercrm/trunk/modules/Invoice/InvoiceAjax.php
vtigercrm/trunk/modules/Leads/LeadsAjax.php
vtigercrm/trunk/modules/Notes/NotesAjax.php
vtigercrm/trunk/modules/Potentials/PotentialsAjax.php
vtigercrm/trunk/modules/PriceBooks/PriceBooksAjax.php
vtigercrm/trunk/modules/Products/ProductsAjax.php
vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrderAjax.php
vtigercrm/trunk/modules/Quotes/QuotesAjax.php
vtigercrm/trunk/modules/SalesOrder/SalesOrderAjax.php
vtigercrm/trunk/modules/Vendors/VendorsAjax.php
vtigercrm/trunk/themes/blue/style.css
Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Tue Mar 7 09:03:44 2006
@@ -93,13 +93,12 @@
<td valign=top><img src="themes/blue/images/showPanelTopLeft.gif"></td>
<td class="showPanelBg" valign=top width=100%>
<!-- PUBLIC CONTENTS STARTS-->
- <div class="small" style="padding:20px">
+ <div class="small" style="padding:20px" >
-
- <span class="lvtHeaderText"><font color="purple">[ {$ID} ] </font>{$NAME} - {$SINGLE_MOD} Information</span> <span id="vtbusy_info" style="display:none;"><img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span> <br>
- {$UPDATEINFO}
+ <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td>
+ <span class="lvtHeaderText"><font color="purple">[ {$ID} ] </font>{$NAME} - {$SINGLE_MOD} Information</span> <span id="vtbusy_info" style="display:none;"><img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span><td><td> </td></tr>
+ <tr><td>{$UPDATEINFO}</td><td align="right" width="400" nowrap> {$APP.LBL_TAG_FIELDS} <input class="textbox" type="text" id="txtbox_tagfields" name="textbox_First Name" value=""></input> <input name="button_tagfileds" type="button" class="small" value="Tag it" onclick="SaveTag('txtbox_tagfields','{$ID}','{$MODULE}')"/></td></tr>
<hr noshade size=1>
- <br>
<!-- Account details tabs -->
<table border=0 cellspacing=0 cellpadding=0 width=95% align=center>
@@ -437,6 +436,10 @@
</td>
</tr>
</table>
+ <br><br>
+ <table border=0 cellspacing=0 cellpadding=0 width=100% style="border:1px solid #ddddcc" class="small">
+ <tr><td><span id="tagfields"></span></td></tr>
+ </table>
</td>
</tr>
</table>
@@ -459,4 +462,17 @@
<script language="JavaScript" type="text/javascript">Carousel();</script>
{/if}
+<script>
+var data = "module={$MODULE}&action={$MODULE}Ajax&ajxaction=GETTAGCLOUD";
+var ajaxObj = new Ajax(ajaxTagCloudResp);
+ajaxObj.process("index.php?",data);
+function ajaxTagCloudResp(response)
+{ldelim}
+
+ var item = response.responseText;
+ getObj('tagfields').innerHTML = item;
+
+{rdelim}
+</script>
+
</td></tr></table></form>
Modified: vtigercrm/trunk/include/js/dtlviewajax.js
==============================================================================
--- vtigercrm/trunk/include/js/dtlviewajax.js (original)
+++ vtigercrm/trunk/include/js/dtlviewajax.js Tue Mar 7 09:03:44 2006
@@ -80,7 +80,8 @@
function dtlViewAjaxResponse(response)
{
var item = response.responseText;
- if(item.indexOf(":#:FAILURE")>-1)
+ alert(response.responseText)
+ if(item.indexOf(":#:FAILURE")>-1)
{
alert("Error while Editing");
}
@@ -166,3 +167,21 @@
showHide(dtlView,editArea); //show,hide
itsonview=false;
}
+
+
+function dtlViewAjaxTagResponse(response)
+{
+ var item = response.responseText;
+ getObj('tagfields').innerHTML = item;
+ hide("vtbusy_info");
+}
+
+function SaveTag(txtBox,crmId,module)
+{
+ var tagValue = document.getElementById(txtBox).value;
+ var data = "module=" + module + "&action=" + module + "Ajax&recordid=" + crmId + "&ajxaction=SAVETAG&tagfields=" +tagValue;
+
+ var ajaxObj = new Ajax(dtlViewAjaxTagResponse);
+ ajaxObj.process("index.php?",data);
+ show("vtbusy_info");
+}
Modified: vtigercrm/trunk/include/utils/DeleteUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DeleteUtils.php (original)
+++ vtigercrm/trunk/include/utils/DeleteUtils.php Tue Mar 7 09:03:44 2006
@@ -285,6 +285,10 @@
}
break;
endswitch;
+ global $current_user;
+ require_once('include/freetag/freetag.class.php');
+ $freetag=new freetag();
+ $freetag->delete_all_object_tags_for_user($current_user->id,$record);
if($return_module == $module)
{
$focus->mark_deleted($record);
Modified: vtigercrm/trunk/modules/Accounts/AccountsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/AccountsAjax.php (original)
+++ vtigercrm/trunk/modules/Accounts/AccountsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,49 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
+
?>
Modified: vtigercrm/trunk/modules/Activities/ActivitiesAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Activities/ActivitiesAjax.php (original)
+++ vtigercrm/trunk/modules/Activities/ActivitiesAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Campaigns/CampaignsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/CampaignsAjax.php (original)
+++ vtigercrm/trunk/modules/Campaigns/CampaignsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Contacts/ContactsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/ContactsAjax.php (original)
+++ vtigercrm/trunk/modules/Contacts/ContactsAjax.php Tue Mar 7 09:03:44 2006
@@ -46,4 +46,49 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
+
?>
Modified: vtigercrm/trunk/modules/Emails/EmailsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/EmailsAjax.php (original)
+++ vtigercrm/trunk/modules/Emails/EmailsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Faq/FaqAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/FaqAjax.php (original)
+++ vtigercrm/trunk/modules/Faq/FaqAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/HelpDesk/HelpDeskAjax.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/HelpDeskAjax.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/HelpDeskAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Invoice/InvoiceAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/InvoiceAjax.php (original)
+++ vtigercrm/trunk/modules/Invoice/InvoiceAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Leads/LeadsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/LeadsAjax.php (original)
+++ vtigercrm/trunk/modules/Leads/LeadsAjax.php Tue Mar 7 09:03:44 2006
@@ -46,4 +46,49 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
+
?>
Modified: vtigercrm/trunk/modules/Notes/NotesAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Notes/NotesAjax.php (original)
+++ vtigercrm/trunk/modules/Notes/NotesAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Potentials/PotentialsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Potentials/PotentialsAjax.php (original)
+++ vtigercrm/trunk/modules/Potentials/PotentialsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,49 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
+
?>
Modified: vtigercrm/trunk/modules/PriceBooks/PriceBooksAjax.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBooksAjax.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBooksAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Products/ProductsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Products/ProductsAjax.php (original)
+++ vtigercrm/trunk/modules/Products/ProductsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrderAjax.php
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrderAjax.php (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrderAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Quotes/QuotesAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/QuotesAjax.php (original)
+++ vtigercrm/trunk/modules/Quotes/QuotesAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrderAjax.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrderAjax.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrderAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/modules/Vendors/VendorsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/VendorsAjax.php (original)
+++ vtigercrm/trunk/modules/Vendors/VendorsAjax.php Tue Mar 7 09:03:44 2006
@@ -45,4 +45,48 @@
echo ":#:FAILURE";
}
}
+elseif($ajaxaction == "SAVETAG")
+{
+
+ require_once('include/freetag/freetag.class.php');
+ global $current_user;
+ $crmid = $_REQUEST["recordid"];
+ $module = $_REQUEST["module"];
+ $tagfields = $_REQUEST["tagfields"];
+ $userid = $current_user->id;
+ $freetag = new freetag();
+ if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
+ {
+ $freetag->tag_object($userid,$crmid,$tagfields,$module);
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }
+
+}
+elseif($ajaxaction == 'GETTAGCLOUD')
+{
+ require_once('include/freetag/freetag.class.php');
+ $freetag = new freetag();
+ $module = $_REQUEST["module"];
+ $useid = $current_user->id;
+ global $adb;
+ $query='select * from freetagged_objects where module = "'.$module .'"';
+ $result=$adb->query($query);
+ if($adb->num_rows($result) > 0)
+ {
+ if(trim($module) != "")
+ {
+ $tagcloud = $freetag->get_tag_cloud_html($module);
+ echo $tagcloud;
+ }else
+ {
+ $tagcloud = $freetag->get_tag_cloud_html();
+ echo $tagcloud;
+ }
+ }
+ else
+ {
+ echo '';
+ }
+}
?>
Modified: vtigercrm/trunk/themes/blue/style.css
==============================================================================
--- vtigercrm/trunk/themes/blue/style.css (original)
+++ vtigercrm/trunk/themes/blue/style.css Tue Mar 7 09:03:44 2006
@@ -980,3 +980,14 @@
color:#000000;
}
+a.tagLink{
+ color:#333333;
+ text-decoration:none;
+ font-family:arial, Helvetica, sans-serif;
+}
+
+a.tagLink:Hover{
+ color:#000000;
+ text-decoration:underline;
+}
+
More information about the vtigercrm-commits
mailing list