From 3ec1a7446a916bec135c060392013ebc743bdf31 Mon Sep 17 00:00:00 2001
From: cagataycivici <cagatay.civici@gmail.com>
Date: Sat, 2 May 2020 12:46:30 +0300
Subject: [PATCH] Cleanup p-c class

---
 src/components/checkbox/Checkbox.vue                 | 2 +-
 src/components/datatable/HeaderCheckbox.vue          | 2 +-
 src/components/datatable/RowCheckbox.vue             | 2 +-
 src/components/datatable/RowRadioButton.vue          | 2 +-
 src/components/multiselect/MultiSelect.vue           | 4 ++--
 src/components/radiobutton/RadioButton.vue           | 2 +-
 src/components/tree/TreeNode.vue                     | 2 +-
 src/components/treetable/TreeTableRow.vue            | 2 +-
 src/components/tristatecheckbox/TriStateCheckbox.vue | 2 +-
 src/components/utils/DomHandler.js                   | 3 ++-
 10 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/components/checkbox/Checkbox.vue b/src/components/checkbox/Checkbox.vue
index ccaca53c7..84fd985e5 100755
--- a/src/components/checkbox/Checkbox.vue
+++ b/src/components/checkbox/Checkbox.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="checkbox" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy">
         </div>
         <div ref="box" :class="['p-checkbox-box', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
-            <span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
+            <span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/datatable/HeaderCheckbox.vue b/src/components/datatable/HeaderCheckbox.vue
index 425663a62..06b4c6375 100755
--- a/src/components/datatable/HeaderCheckbox.vue
+++ b/src/components/datatable/HeaderCheckbox.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="checkbox" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
         </div>
         <div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
-            <span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
+            <span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/datatable/RowCheckbox.vue b/src/components/datatable/RowCheckbox.vue
index 5e1225da4..8e5e276ea 100755
--- a/src/components/datatable/RowCheckbox.vue
+++ b/src/components/datatable/RowCheckbox.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="checkbox" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
         </div>
         <div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
-            <span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
+            <span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/datatable/RowRadioButton.vue b/src/components/datatable/RowRadioButton.vue
index 8c0bf59ec..69b13d2cf 100755
--- a/src/components/datatable/RowRadioButton.vue
+++ b/src/components/datatable/RowRadioButton.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="radio" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
         </div>
         <div ref="box" :class="['p-radiobutton-box p-component', {'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
-            <span :class="['p-radiobutton-icon p-c', {'pi pi-circle-on': checked}]"></span>
+            <span :class="['p-radiobutton-icon', {'pi pi-circle-on': checked}]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/multiselect/MultiSelect.vue b/src/components/multiselect/MultiSelect.vue
index 41dff3cf9..295b471e1 100755
--- a/src/components/multiselect/MultiSelect.vue
+++ b/src/components/multiselect/MultiSelect.vue
@@ -22,7 +22,7 @@
                             <input type="checkbox" readonly @focus="onHeaderCheckboxFocus" @blur="onHeaderCheckboxBlur">
                         </div>
                         <div :class="['p-checkbox-box p-component', {'p-highlight': allSelected, 'p-focus': headerCheckboxFocused}]" role="checkbox" :aria-checked="allSelected">
-                            <span :class="['p-checkbox-icon p-c', {'pi pi-check': allSelected}]"></span>
+                            <span :class="['p-checkbox-icon', {'pi pi-check': allSelected}]"></span>
                         </div>
                     </div>
                     <div v-if="filter" class="p-multiselect-filter-container">
@@ -39,7 +39,7 @@
                             :aria-label="getOptionLabel(option)" :key="getOptionRenderKey(option)" @click="onOptionSelect($event, option)" @keydown="onOptionKeyDown($event, option)" :tabindex="tabindex||'0'">
                             <div class="p-checkbox p-component">
                                 <div :class="['p-checkbox-box p-component', {'p-highlight': isSelected(option)}]">
-                                    <span :class="['p-checkbox-icon p-c', {'pi pi-check': isSelected(option)}]"></span>
+                                    <span :class="['p-checkbox-icon', {'pi pi-check': isSelected(option)}]"></span>
                                 </div>
                             </div>
                             <slot name="option" :option="option" :index="i">
diff --git a/src/components/radiobutton/RadioButton.vue b/src/components/radiobutton/RadioButton.vue
index ea5e6a1f3..c3792ceb3 100755
--- a/src/components/radiobutton/RadioButton.vue
+++ b/src/components/radiobutton/RadioButton.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="radio" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy">
         </div>
         <div ref="box" :class="['p-radiobutton-box', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
-            <span :class="['p-radiobutton-icon p-c', {'pi pi-circle-on': checked}]"></span>
+            <span :class="['p-radiobutton-icon', {'pi pi-circle-on': checked}]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/tree/TreeNode.vue b/src/components/tree/TreeNode.vue
index 69edf53fa..9bc1f81db 100755
--- a/src/components/tree/TreeNode.vue
+++ b/src/components/tree/TreeNode.vue
@@ -297,7 +297,7 @@ export default {
             return ['p-checkbox-box', {'p-highlight': this.checked}];
         },
         checkboxIcon() {
-            return ['p-checkbox-icon p-c', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
+            return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
         },
         checkboxMode() {
             return this.selectionMode === 'checkbox' && this.node.selectable !== false;
diff --git a/src/components/treetable/TreeTableRow.vue b/src/components/treetable/TreeTableRow.vue
index 7fa3b6f0f..3ca3d7f5d 100755
--- a/src/components/treetable/TreeTableRow.vue
+++ b/src/components/treetable/TreeTableRow.vue
@@ -236,7 +236,7 @@ export default {
             return ['p-checkbox-box', {'p-highlight': this.checked, 'p-focus': this.checkboxFocused}];
         },
         checkboxIcon() {
-            return ['p-checkbox-icon p-c', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
+            return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
         },
         checked() {
             return this.selectionKeys ? this.selectionKeys[this.node.key] && this.selectionKeys[this.node.key].checked: false;
diff --git a/src/components/tristatecheckbox/TriStateCheckbox.vue b/src/components/tristatecheckbox/TriStateCheckbox.vue
index cacb148a2..94338d18a 100755
--- a/src/components/tristatecheckbox/TriStateCheckbox.vue
+++ b/src/components/tristatecheckbox/TriStateCheckbox.vue
@@ -4,7 +4,7 @@
            <input ref="input" type="checkbox" :checked="value === true" v-bind="$attrs" @focus="onFocus()" @blur="onBlur()" :aria-labelledby="ariaLabelledBy">
         </div>
         <div ref="box" :class="['p-checkbox-box', {'p-highlight': (value != null), 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="value === true">
-            <span :class="['p-checkbox-icon p-c', icon]"></span>
+            <span :class="['p-checkbox-icon', icon]"></span>
         </div>
     </div>
 </template>
diff --git a/src/components/utils/DomHandler.js b/src/components/utils/DomHandler.js
index 44084e30f..fc1335614 100755
--- a/src/components/utils/DomHandler.js
+++ b/src/components/utils/DomHandler.js
@@ -423,7 +423,8 @@ export default class DomHandler {
 
         return (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' ||
                 parentNode == 'INPUT' || parentNode == 'BUTTON' || parentNode == 'A' ||
-                this.hasClass(element, 'p-button') || this.hasClass(element.parentElement, 'p-button')
+                this.hasClass(element, 'p-button') || this.hasClass(element.parentElement, 'p-button') ||
+                this.hasClass(element.parentElement, 'p-checkbox') || this.hasClass(element.parentElement, 'p-radiobutton') 
         );
     }
 }
\ No newline at end of file