-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpregSelectObj.php
More file actions
148 lines (129 loc) · 3.87 KB
/
Copy pathpregSelectObj.php
File metadata and controls
148 lines (129 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!---------------------------------------------- HTML ----------------------------------------------->
<div id="_pregSelectObj">
<div id="@pag_nro" class="container-fluid contenedor pregSelectObj">
<div class="alert alert-danger preg-contenedor">
<span class="preg-nro">PRIMERA PARTE: DOCENTES</span>
</div>
<div class="alert alert-info preg-contenedor">
<span class="glyph-icon flaticon-persona"></span>
<span class="preg-nro"></span>
<span class="preg">@preg_desc</span>
</div>
<div id="@objEsts" class="objEsts"></div>
<div class="botonera">
<button id="@btna_nro" type="button" class="btn btn-warning btn-atras"><span class="glyph-icon flaticon-atras"></span></button>
<span class="faltantes">@pgc/@pgt</span>
<button id="@btns_nro" type="button" class="btn btn-primary btn-sig"><span class="glyph-icon flaticon-siguiente"></span></button>
</div>
</div>
</div>
<div id="_objEstSel">
<div id="objEstSel" class="objEst">
<div><span class="glyph-icon flaticon-persona icono"></span><span class="objest-descripcion">@objDesc</span></div>
<div class="regla">
<div class="radios">
<span style="margin-right: 100px"></span>
<label class="label-selObj">NO</label><input type="radio" name="@objEstSelSI" value="0" data-toggle="tooltip" title="NO" checked>
<label class="label-selObj">SI</label><input type="radio" name="@objEstSelNO" value="1" data-toggle="tooltip" title="SI">
</div>
</div>
<hr>
</div>
</div>
<!---------------------------------------------- JAVASCRIPT ----------------------------------------------->
<script>
function crearPregSelectObj(id,pregDesc,objEst){
var html = $("#_pregSelectObj").html().replace("@pag_nro","pag_"+pagCon);
html = html.replace("@btns_nro","btns_"+pagCon);
html = html.replace("@btna_nro","btna_"+pagCon);
html = html.replace("@preg_titulo",pregCon);
html = html.replace("@preg_desc",pregDesc);
html = html.replace("@objEsts","objEsts_"+pagCon);
html = html.replace("@pgc",pagCon);
html = html.replace("@pgt",pagTot);
//hago append de la pagina
$("#encuesta").append(html);
//incorporo los objetos de estudio
for (var objCont = 0; objCont < objEst.length; objCont++) {
var html = $("#_objEstSel").html().replace("@objDesc",objEst[objCont].descrip);
html = html.replace("@objEstSelSI","objEstSel"+objEst[objCont].id_obj_estudio);
html = html.replace("@objEstSelNO","objEstSel"+objEst[objCont].id_obj_estudio);
$("#objEsts_"+pagCon).append(html);
}
//armo recolector
//incremento pagina
pagCon++;
}
function getPregSelectObj(objEst){
respS = [];
for (var cant = 0; cant < objEst.length; cant++) {
respObj ={};
respObj.objEst = objEst[cant].id_obj_estudio;
respObj.value = $("input[name=objEstSel"+respObj.objEst+"]:checked").val();
respS.push(respObj);
}
return respS;
}
</script>
<!---------------------------------------------- ESTILOS ----------------------------------------------->
<style>
.objEst span.icono:before {
position: relative;
overflow: hidden;
left:-20px;
top:5px;
}
.objEsts{
/* background: yellow; */
}
.objEst{
text-align: left;
}
.objest-descripcion{
position: relative;
font-weight: bold;
font-size:18px;
left:-10px;
top:5px;
}
.regla{
margin: 0 auto;
width: 100%;
}
.regla input[type='radio'] {
position:relative;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 25px;
height: 25px;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
background: #b1cfd7;
border: 2px solid #000000;
}
.regla input[type='radio']:checked{
position:relative;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 25px;
height:25px;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
background: #73d216;
}
.radios{
background: #e6ecf1;
width: 100%;
max-width: 350px;
}
.label-selObj{
position:relative;
font-size: 20px;
bottom:5px;
margin-right: 2px;
}
</style>