[Vtigercrm-commits] [vtiger-commits] r9541 - /vtigercrm/branches/5.0.1/Smarty/templates/ListEmailTemplates.tpl

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Sep 28 08:15:00 EDT 2006


Author: jerrydgeorge
Date: Thu Sep 28 06:14:52 2006
New Revision: 9541

Log:
If Email Selected then hide the Add button --By Vashini

Modified:
    vtigercrm/branches/5.0.1/Smarty/templates/ListEmailTemplates.tpl

Modified: vtigercrm/branches/5.0.1/Smarty/templates/ListEmailTemplates.tpl
==============================================================================
--- vtigercrm/branches/5.0.1/Smarty/templates/ListEmailTemplates.tpl (original)
+++ vtigercrm/branches/5.0.1/Smarty/templates/ListEmailTemplates.tpl Thu Sep 28 06:14:52 2006
@@ -9,10 +9,43 @@
   *
  ********************************************************************************/
 -->*}
+
 <script language="JAVASCRIPT" type="text/javascript" src="include/js/smoothscroll.js"></script>
 <script>
+function ifselected()
+{ldelim}
+  
+      
+      var sel =document.massdelete.selected_id.length;
+      var returnval=false;
+      
+     for(i=0; i < sel; i++)
+     {ldelim}
+     
+      if(document.massdelete.selected_id[i].checked == true)
+        {ldelim}
+            returnval=true;
+            break;
+        {rdelim}
+        
+      {rdelim}
+      
+      
+          if(returnval==true)
+           {ldelim}
+               document.getElementById("myProfile").style.display="none";
+           {rdelim}
+          else
+           {ldelim}
+              document.getElementById("myProfile").style.display="block";
+          {rdelim}
+    	
+{rdelim}
+
+
 function massDelete()
 {ldelim}
+        
         x = document.massdelete.selected_id.length;
         idstring = "";
 
@@ -22,11 +55,15 @@
                 if (document.massdelete.selected_id.checked)
                {ldelim}
                         document.massdelete.idlist.value=document.massdelete.selected_id.value+';';
+                          
+                        
 			xx=1;
                 {rdelim}
                 else
                 {ldelim}
+                         document.massdelete.profile.style.display="none";
                         alert("Please select at least one entity");
+                        
                         return false;
                 {rdelim}
         {rdelim}
@@ -103,7 +140,7 @@
 					<table border=0 cellspacing=0 cellpadding=5 width=100% class="listTableTopButtons">
 					<tr>
 						<td class=small><input type="submit" value="{$UMOD.LBL_DELETE}" onclick="return massDelete();" class="crmButton delete small"></td>
-						<td class=small align=right><input class="crmButton create small" type="submit" value="{$UMOD.LBL_NEW_TEMPLATE}" name="profile"  class="classBtn" onclick="this.form.action.value='createemailtemplate';this.form.parenttab.value='Settings';"></td>
+						<td class=small align=right id="new_template"><div id = "myProfile"><input class="crmButton create small" type="submit" value="{$UMOD.LBL_NEW_TEMPLATE}" name="profile"  class="classBtn" onclick="this.form.action.value='createemailtemplate';this.form.parenttab.value='Settings';"></div></td>
 					</tr>
 					</table>
 					<table border="0" cellspacing="0" cellpadding="5" width="100%" class="listTable">
@@ -117,7 +154,7 @@
 					{foreach name=emailtemplate item=template from=$TEMPLATES}
 					<tr>
 						<td class="listTableRow small" valign=top>{$smarty.foreach.emailtemplate.iteration}</td>
-						<td class="listTableRow small" valign=top><input type="checkbox" name="selected_id" value="{$template.templateid}" onClick=toggleSelectAll(this.name,"selectall") class=small></td>
+						<td class="listTableRow small" valign=top><input type="checkbox" name="selected_id" value="{$template.templateid}" onClick="ifselected(); " class=small></td>
 						<td class="listTableRow small" valign=top>
 							<a href="index.php?module=Users&action=detailviewemailtemplate&parenttab=Settings&templateid={$template.templateid}" ><b>{$template.templatename}</b></a>
 						</td>





More information about the vtigercrm-commits mailing list