plxdcma_rendericon_teammember 1.0.1
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/css.css +13 -0
- package/init.js +34 -0
- package/js.js +72 -0
- package/package.json +6 -0
package/css.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
.team-member{
|
|
3
|
+
background: white; padding: 2rem; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
|
4
|
+
}
|
|
5
|
+
.team-member > img{
|
|
6
|
+
width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; border: 4px solid #dc2626;
|
|
7
|
+
}
|
|
8
|
+
.team-member > h4{
|
|
9
|
+
font-size: 1.5rem; font-weight: 600; color: #1f2937; margin-bottom: 0.5rem;
|
|
10
|
+
}
|
|
11
|
+
.team-member > p{
|
|
12
|
+
color: #dc2626; font-weight: 500; margin-bottom: 1rem;
|
|
13
|
+
}
|
package/init.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var plxdcma_standarinit=require(`plxdcma_standarinit`)
|
|
2
|
+
var fs=require(`fs`)
|
|
3
|
+
var path=require(`path`)
|
|
4
|
+
var myux=require(`plxdcma_myux`)
|
|
5
|
+
var plxdcma_iconrendererprotocol=require(`plxdcma_iconrendererprotocol`)
|
|
6
|
+
module.exports.use=function(req){
|
|
7
|
+
if(req.__myAppInternals.teammember == null){
|
|
8
|
+
myux.use(req)
|
|
9
|
+
plxdcma_iconrendererprotocol.use(req)
|
|
10
|
+
req.__myAppInternals.teammember=true
|
|
11
|
+
if(req.__myAppInternals.paths == null){
|
|
12
|
+
req.__myAppInternals.paths=[]
|
|
13
|
+
}
|
|
14
|
+
req.__myAppInternals.paths.push(`<script src="/myux/icons/Tm_Icon.js"></script>`)
|
|
15
|
+
req.__myAppInternals.paths.push(`<link rel="stylesheet" href="/myux/icons/Tm_Icon.css">`)
|
|
16
|
+
if(req.__myAppInternals.modals == null){
|
|
17
|
+
req.__myAppInternals.modals=[]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
plxdcma_standarinit.use(function(app){
|
|
22
|
+
app.get(`/myux/icons/Tm_Icon.js`,function(req,res){
|
|
23
|
+
fs.readFile(path.join(__dirname,"js.js"),"utf8",function(err,html){
|
|
24
|
+
res.write(html)
|
|
25
|
+
res.end()
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
app.get(`/myux/icons/Tm_Icon.css`,function(req,res){
|
|
29
|
+
fs.readFile(path.join(__dirname,"css.css"),"utf8",function(err,html){
|
|
30
|
+
res.write(html)
|
|
31
|
+
res.end()
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
})
|
package/js.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var daciconx=0
|
|
2
|
+
|
|
3
|
+
function asignTeamMember(data,targetid){
|
|
4
|
+
var strct=data
|
|
5
|
+
var details=data.data
|
|
6
|
+
var targethtml=document.getElementById(targetid)
|
|
7
|
+
var target=targethtml
|
|
8
|
+
var image=document.getElementById(`${targetid}_image`)
|
|
9
|
+
var nmbre=document.getElementById(`${targetid}_nombre`)
|
|
10
|
+
var sbtl=document.getElementById(`${targetid}_subtitle`)
|
|
11
|
+
//d.innerHTML=`Asignado`
|
|
12
|
+
console.log(`data - data x0x0x0x0`)
|
|
13
|
+
console.log(data)
|
|
14
|
+
if(details == null){
|
|
15
|
+
image.src=`/images/user4.jpeg?height=200&width=200`
|
|
16
|
+
nmbre.innerHTML=`[Nombre]`
|
|
17
|
+
sbtl.innerHTML=`[Titulo]`
|
|
18
|
+
}else{
|
|
19
|
+
image.src=`/images/${details.imageurl}m.png`
|
|
20
|
+
nmbre.innerHTML=details.nombre
|
|
21
|
+
sbtl.innerHTML=`[Titulo]`
|
|
22
|
+
}
|
|
23
|
+
var original=target.originalIcon
|
|
24
|
+
if(original == null){
|
|
25
|
+
original={}
|
|
26
|
+
target.originalIcon=original
|
|
27
|
+
}
|
|
28
|
+
var t = strct.tags ?? strct.icon;
|
|
29
|
+
for(var each in t){
|
|
30
|
+
original[each]=t[each]
|
|
31
|
+
}
|
|
32
|
+
console.log(`original`)
|
|
33
|
+
console.log(original)
|
|
34
|
+
}
|
|
35
|
+
function teammembericon(data,isediting,section){
|
|
36
|
+
if(data == null && isediting){
|
|
37
|
+
var xz=`<div class="team-member" onclick='didRequestToAddAnIcon(${section})' style="background: white; padding: 2rem; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1);">
|
|
38
|
+
<h3><i class='fa fa-plus'></i></h3>
|
|
39
|
+
</div>`
|
|
40
|
+
return xz
|
|
41
|
+
}
|
|
42
|
+
var htmliconid=`ic_${daciconx}`
|
|
43
|
+
daciconx=daciconx+1;
|
|
44
|
+
|
|
45
|
+
var cstring=``
|
|
46
|
+
if(isediting){
|
|
47
|
+
cstring=`onclick='didTapedMemberIcon("${htmliconid}",${section},${isediting})'`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log(`teammembericon data`)
|
|
51
|
+
console.log(data)
|
|
52
|
+
|
|
53
|
+
var userid=data.user
|
|
54
|
+
var mdata;
|
|
55
|
+
var imagenurl=""
|
|
56
|
+
var nombre=`[NOMBRe]`
|
|
57
|
+
for(var each in Usuarios){
|
|
58
|
+
var ux=Usuarios[each]
|
|
59
|
+
if(ux.id == userid){
|
|
60
|
+
mdata=ux
|
|
61
|
+
nombre=mdata.nombre
|
|
62
|
+
imagenurl=mdata.imageurl
|
|
63
|
+
break
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var xz=`<div id="${htmliconid}" ${cstring} class="team-member" style="background: white; padding: 2rem; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1);">
|
|
67
|
+
<img cxtza='image' id='${htmliconid}_image' src="/images/${imagenurl}m.png" alt="Director General" style="width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; border: 4px solid #dc2626;">
|
|
68
|
+
<h4 cxtza='nombre' id='${htmliconid}_nombre' style="font-size: 1.5rem; font-weight: 600; color: #1f2937; margin-bottom: 0.5rem;">${nombre}</h4>
|
|
69
|
+
<p cxtza='subtitulo' id='${htmliconid}_subtitle' class="position" style="color: #dc2626; font-weight: 500; margin-bottom: 1rem;">Presidente</p>
|
|
70
|
+
</div>`
|
|
71
|
+
return xz
|
|
72
|
+
}
|