From 6d8842aa9dd1f417d8f82a20b027b761d881bdf6 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 11 Jan 2014 11:00:27 -0800 Subject: [PATCH] CRM-10773 - Tag form - remove unused js --- CRM/Tag/Form/Tag.php | 2 -- js/Common.js | 51 ---------------------------------- templates/CRM/Tag/Form/Tag.tpl | 7 ----- 3 files changed, 60 deletions(-) diff --git a/CRM/Tag/Form/Tag.php b/CRM/Tag/Form/Tag.php index ecf53180fa..cb1e8755ba 100644 --- a/CRM/Tag/Form/Tag.php +++ b/CRM/Tag/Form/Tag.php @@ -86,14 +86,12 @@ class CRM_Tag_Form_Tag extends CRM_Core_Form { foreach ($allTag as $tagID => $varValue) { if (in_array($tagID, $entityTag)) { $tagAttribute = array( - 'onclick' => "return changeRowColor(\"rowidtag_$tagID\")", 'checked' => 'checked', 'id' => "tag_{$tagID}", ); } else { $tagAttribute = array( - 'onclick' => "return changeRowColor(\"rowidtag_$tagID\")", 'id' => "tag_{$tagID}", ); } diff --git a/js/Common.js b/js/Common.js index 756147558c..961495c216 100644 --- a/js/Common.js +++ b/js/Common.js @@ -316,57 +316,6 @@ function on_load_init_checkboxes(form) { } } -/** - * Function to change the color of the class - * - * @param form - name of the form - * @param rowid - id of the ,
you want to change - * - * @access public - * @return null - */ -function changeRowColor(rowid, form) { - switch (document.getElementById(rowid).className) { - case 'even-row' : - document.getElementById(rowid).className = 'selected even-row'; - break; - case 'odd-row' : - document.getElementById(rowid).className = 'selected odd-row'; - break; - case 'selected even-row' : - document.getElementById(rowid).className = 'even-row'; - break; - case 'selected odd-row' : - document.getElementById(rowid).className = 'odd-row'; - break; - case 'form-item' : - document.getElementById(rowid).className = 'selected'; - break; - case 'selected' : - document.getElementById(rowid).className = 'form-item'; - } -} - -/** - * This function is to show the row with selected checkbox in different color - * @param form - name of form that checkboxes are part of - * - * @access public - * @return null - */ -function on_load_init_check(form) { - for (i = 0; i < document.forms[form].elements.length; i++) { - if (( document.forms[form].elements[i].type == 'checkbox' - && document.forms[form].elements[i].checked == true ) - || ( document.forms[form].elements[i].type == 'hidden' - && document.forms[form].elements[i].value == 1 )) { - var ss = document.forms[form].elements[i].id; - var row = 'rowid' + ss; - changeRowColor(row, form); - } - } -} - /** * reset all the radio buttons with a given name * diff --git a/templates/CRM/Tag/Form/Tag.tpl b/templates/CRM/Tag/Form/Tag.tpl index 93218b10f7..cb04d2f3aa 100644 --- a/templates/CRM/Tag/Form/Tag.tpl +++ b/templates/CRM/Tag/Form/Tag.tpl @@ -141,10 +141,3 @@
{include file="CRM/common/Tag.tpl" context="contactTab"}
- -{if $action eq 1 or $action eq 2 } - -{/if} -- 2.25.1