plxdcma_rendericon_lefted 1.0.1 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js.js +10 -3
- package/package.json +1 -1
package/js.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
var daixons=0
|
|
2
|
+
function deletetheicon(l){
|
|
3
|
+
var h=document.getElementById(l)
|
|
4
|
+
h.parentNode.removeChild(h)
|
|
5
|
+
}
|
|
1
6
|
function icon_imagetitlesubtitle_left(data,isediting,section){
|
|
7
|
+
daixons=daixons+1
|
|
2
8
|
if(isediting == true && data == null){
|
|
3
9
|
var tb=`<div class="achievement-item" onclick='didRequestToAddAnIcon(${section})'>
|
|
4
10
|
<div class="achievement-icon">
|
|
@@ -8,17 +14,18 @@ function icon_imagetitlesubtitle_left(data,isediting,section){
|
|
|
8
14
|
</div>`
|
|
9
15
|
return tb
|
|
10
16
|
}
|
|
17
|
+
var htmlid=`daxicon_${daixons}`
|
|
11
18
|
var c=null
|
|
12
19
|
var ock=``
|
|
13
20
|
var deletingbtn=``
|
|
14
21
|
if(isediting){
|
|
15
22
|
ock=`onclick='replaceThisIcon(event.target)'`
|
|
16
23
|
c=`contentEditable='true'`
|
|
17
|
-
deletingbtn=`<i onclick='rendericon_removethisicon()' style='float:right' class="fa fa-trash" aria-hidden="true"></i>`
|
|
24
|
+
deletingbtn=`<i onclick='rendericon_removethisicon();deletetheicon("${htmlid}")' style='float:right' class="fa fa-trash" aria-hidden="true"></i>`
|
|
18
25
|
}
|
|
19
|
-
|
|
26
|
+
|
|
20
27
|
var h=`
|
|
21
|
-
<div class="achievement-item">
|
|
28
|
+
<div id="${htmlid}" class="achievement-item">
|
|
22
29
|
|
|
23
30
|
<div class="achievement-icon">
|
|
24
31
|
<i ${ock} cxtza='icon' class="${data.icon ?? "fas fa-trophy"}"></i>
|