[Vtigercrm-commits] [vtiger-commits] r7687 - /vtigercrm/trunk/Smarty/templates/Inventory/InventoryDetailView.tpl

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Jun 30 02:44:10 EDT 2006


Author: richie
Date: Fri Jun 30 00:44:06 2006
New Revision: 7687

Log:
Issue in delete tag in Inventory modules has been fixed

Modified:
    vtigercrm/trunk/Smarty/templates/Inventory/InventoryDetailView.tpl

Modified: vtigercrm/trunk/Smarty/templates/Inventory/InventoryDetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Inventory/InventoryDetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Inventory/InventoryDetailView.tpl Fri Jun 30 00:44:06 2006
@@ -13,6 +13,7 @@
 -->*}
 <script type="text/javascript" src="modules/{$MODULE}/{$SINGLE_MOD}.js"></script>
 <script language="JavaScript" type="text/javascript" src="include/js/dtlviewajax.js"></script>
+<script src="include/scriptaculous/scriptaculous.js" type="text/javascript"></script>
 <div id="convertleaddiv" style="display:block;position:absolute;left:225px;top:150px;"></div>
 <span id="crmspanid" style="display:none;position:absolute;"  onmouseover="show('crmspanid');">
    <a class="link"  align="right" href="javascript:;">{$APP.LBL_EDIT_BUTTON}</a>
@@ -27,6 +28,22 @@
 		alert("Please enter a tag");
 		return false;
 	{rdelim}
+{rdelim}
+function DeleteTag(id)
+{ldelim}
+	$("vtbusy_info").style.display="inline";
+	Effect.Fade('tag_'+id);
+	new Ajax.Request(
+		'index.php',
+                {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+                        method: 'post',
+                        postBody: "file=TagCloud&module={$MODULE}&action={$MODULE}Ajax&ajxaction=DELETETAG&tagid=" +id,
+                        onComplete: function(response) {ldelim}
+						getTagCloud();
+						$("vtbusy_info").style.display="none";
+                        {rdelim}
+                {rdelim}
+        );
 {rdelim}
 
 </script>
@@ -244,17 +261,21 @@
 {/if}
 
 <script>
-	new Ajax.Request(
-  	      'index.php',
-        	{ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
-	        method: 'post',
-        	postBody: 'module={$MODULE}&action={$MODULE}Ajax&file=TagCloud&ajxaction=GETTAGCLOUD',
-	        onComplete: function(response) {ldelim}
-        	                        $("tagfields").innerHTML=response.responseText;
-                	                $("txtbox_tagfields").value ='';
-                        	{rdelim}
-		{rdelim}
-	);
+function getTagCloud()
+{ldelim}
+new Ajax.Request(
+        'index.php',
+        {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+        method: 'post',
+        postBody: 'module={$MODULE}&action={$MODULE}Ajax&file=TagCloud&ajxaction=GETTAGCLOUD&recordid={$ID}',
+        onComplete: function(response) {ldelim}
+                                $("tagfields").innerHTML=response.responseText;
+                                $("txtbox_tagfields").value ='';
+                        {rdelim}
+        {rdelim}
+);
+{rdelim}
+getTagCloud();
 </script>
 
 	</td>





More information about the vtigercrm-commits mailing list