How to use el2.getAttribute method in Appium Xcuitest Driver

Best JavaScript code snippet using appium-xcuitest-driver

JS_FSE004.js

Source:JS_FSE004.js Github

copy

Full Screen

...73 select.options[select.options.length] = new Option(data.DESCRIPCIONSEMESTRE, data.CODIGOPROCESO);74 var txtcodigorol = $('#txtcodigoproceso').val(data.CODIGOPROCESO);75 var txtcodigorol = $('#txtcodigosemestre').val(data.CODIGOSEMESTRE);76 var el2 = document.getElementById("modaldataproceso");77 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),78 close = modal.querySelector('.md-close');79 function removeModal(hasPerspective) {80 classie.remove(modal, 'md-show');81 $('body').removeClass(el2.getAttribute('data-modal'));82 if (hasPerspective) {83 classie.remove(document.documentElement, 'md-perspective');84 }85 }86 function removeModalHandler() {87 removeModal(classie.has(el2, 'md-setperspective'));88 }89 ev.stopPropagation();90 removeModalHandler();91 });92}93var obtener_data_escuela = function(tbody, dataTable) {94 $(tbody).on("click", "button.btnseleccionarUsuario", function(ev) {95 var data = dataTable.row($(this).parents("tr")).data();96 var select = document.getElementById("txtcodigoescuela");97 select.options.length = 0;98 select.options[select.options.length] = new Option('Buscar', '');99 select.options[select.options.length] = new Option(data.DESCRIPCION, data.CODIGOESCUELA);100 var txtcodigorol = $('#txtcodigoescuela').val(data.CODIGOESCUELA);101 var el2 = document.getElementById("modaldataescuela");102 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),103 close = modal.querySelector('.md-close');104 function removeModal(hasPerspective) {105 classie.remove(modal, 'md-show');106 $('body').removeClass(el2.getAttribute('data-modal'));107 if (hasPerspective) {108 classie.remove(document.documentElement, 'md-perspective');109 }110 }111 function removeModalHandler() {112 removeModal(classie.has(el2, 'md-setperspective'));113 }114 ev.stopPropagation();115 removeModalHandler();116 });117}118$(document).ready(function() {119 consultar();120 listarProcesos();121 listarEscuelas();122});123function limpiar() {124 $('#txtcodigoprocesoescuela').val('');125 $('#txtcodigosemestre').val('');126 $('#txtfechainicio').val(ano + "-" + mes + "-" + dia);127 $('#txtfechafin').val(ano + "-" + mes + "-" + dia);128 $('#txtestado').val('');129 var forms = document.getElementById('user_form');130 forms.classList.remove('was-validated');131 document.getElementById('btnGuardarDatos').disabled = false;132 document.getElementById('modaldataproceso').disabled = false;133 document.getElementById('modaldataescuela').disabled = false;134 var select = document.getElementById("txtcodigoproceso");135 select.options.length = 0;136 select.options[select.options.length] = new Option('Buscar', '');137 var select2 = document.getElementById("txtcodigoescuela");138 select2.options.length = 0;139 select2.options[select2.options.length] = new Option('Buscar', '');140}141function consultar() {142 $('#btnNuevo').click(function() {143 limpiar();144 });145 $mensaje = getMessage();146 $("#message").html($mensaje);147 var dataTable = $('#res-config').DataTable({148 "destroy": true,149 "order": [150 [0, "desc"]151 ],152 "ajax": {153 url: "listarProcesosEscuelas",154 type: "POST",155 data: {156 txtprocesobuscar: $txtprocesobuscar.val()157 }158 },159 "columns": [{160 "title": "EDITAR",161 "render": function(data, type, row) {162 return "<center><button data-toggle='modal' data-target='#myModalVentana' type='button' class='editar btn btn-warning'><span class='feather icon-edit'></span></button></center>"163 },164 "width": 5165 }, {166 "title": "ELIMINAR",167 "render": function(data, type, row) {168 return "<center><button type='button' class='eliminar btn btn-danger' data-toggle='modal' data-target='#myModalEliminar'><span class='feather icon-trash-2'></span></button></center>"169 },170 "width": 5171 }, {172 "title": "CODIGO",173 "data": "CODIGOPROCESOESCUELA",174 "width": 5175 }, {176 "title": "CODIGOPROCESO",177 "data": "CODIGOPROCESO",178 "width": 5,179 "visible": false180 }, {181 "title": "CODIGOSEMESTRE",182 "data": "CODIGOSEMESTRE",183 "width": 5,184 "visible": false185 }, {186 "title": "SEMESTRE",187 "data": "DESCRIPCIONSEMESTRE",188 "width": 5189 }, {190 "title": "CODIGOESCUELA",191 "data": "CODIGOESCUELA",192 "width": 5,193 "visible": false194 }, {195 "title": "ESCUELA",196 "data": "DESCRIPCIONESCUELA",197 "width": 5198 }, {199 "title": "FECHA INICIO",200 "data": "FECHAINICIO",201 "width": 80202 }, {203 "title": "FECHA FIN",204 "data": "FECHAFIN",205 "width": 80206 }, {207 "title": "ESTADO",208 "data": "DESCRIPCIONESTADO",209 "width": 80210 }, {211 "title": "ESTADO",212 "data": "ESTADO",213 "width": 80,214 "visible": false215 }],216 dom: 'Bfrtip',217 buttons: [],218 "language": {219 "lengthMenu": "Mostrar _MENU_ postulaciones",220 "zeroRecords": "No se encontró ningún registro",221 "info": "_PAGE_ de _PAGES_",222 "infoEmpty": "No records available",223 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",224 "search": "Buscar:",225 "paginate": {226 "first": "Primero",227 "last": "Último",228 "next": "Siguiente",229 "previous": "Anterior"230 },231 },232 });233 obtener_data_editar("#res-config tbody", dataTable);234 obtener_data_eliminar("#res-config tbody", dataTable);235 $(document).on('click', '#btnResfrecar', function() {236 dataTable.ajax.reload();237 });238 239}240$(document).on('click', '#btnEliminarE', function() {241 _token = $('#_token').val();242 txtcodigoprocesoescuelaE = $('#txtcodigoprocesoescuelaE').val();243 txtcodigoprocesoE = $('#txtcodigoprocesoE').val();244 txtcodigosemestreE = $('#txtcodigosemestreE').val();245 txtcodigoescuelaE = $('#txtcodigoescuelaE').val();246 urlbase = $("body").attr('urlbase');247 url = urlbase + "/configuracion/eliminarProcesoEscuela";248 $.ajax({249 url: url,250 type: 'POST',251 dataType: 'json',252 data: {253 _token: _token,254 txtcodigoprocesoescuelaE: txtcodigoprocesoescuelaE,255 txtcodigoprocesoE: txtcodigoprocesoE,256 txtcodigosemestreE: txtcodigosemestreE,257 txtcodigoescuelaE: txtcodigoescuelaE258 },259 complete: function(response) {}260 }).then(function(data) {261 if (data.success == true) {262 $('#myModalEliminar').modal('hide');263 swal(data.message, "Hacer click!", "success");264 limpiar();265 var dataTable = $('#res-config').DataTable();266 dataTable.ajax.reload();267 var forms = document.getElementById('user_form');268 forms.classList.remove('was-validated');269 }270 });271 });272 $(document).on('submit', '#user_form', function(event) {273 event.preventDefault();274 _token = $('#_token').val();275 txtcodigo = $('#txtcodigoprocesoescuela').val();276 txtnombre = $('#txtnombre').val();277 var a = 0;278 var b = 0;279 var c = 0;280 var d = 0;281 var e = 0;282 var txtodigoproceso = $('#txtodigoproceso').val();283 var txtcodigoescuela = $('#txtcodigoescuela').val();284 var txtfechainicio = $('#txtfechainicio').val();285 var txtfechafin = $('#txtfechafin').val();286 var txtestado = $('#txtestado').val();287 if (txtodigoproceso == '') {288 a = 1;289 }290 if (txtcodigoescuela == '') {291 b = 1;292 }293 if (txtfechainicio == '') {294 c = 1;295 } else {296 if (txtfechainicio > txtfechafin) {297 c = 1;298 }299 }300 if (txtfechafin == '') {301 d = 1;302 } else {303 if (txtfechafin < txtfechainicio) {304 d = 1;305 }306 }307 if (txtestado == '') {308 e = 1;309 } else {310 if (txtestado == 3) {311 e = 1;312 }313 }314 var total = a + b + c + d + e;315 if (total == 0) {316 urlbase = $("body").attr('urlbase');317 if (txtcodigo == '') {318 url = urlbase + "/configuracion/insertarProcesoEscuela";319 } else {320 url = urlbase + "/configuracion/actualizarProcesoEscuela";321 }322 $.ajax({323 url: url,324 method: 'POST',325 data: new FormData(this),326 contentType: false,327 processData: false,328 complete: function(response) {}329 }).then(function(data) {330 if (data.success == true) {331 swal(data.message, "Hacer click!", "success");332 limpiar();333 var dataTable = $('#res-config').DataTable();334 dataTable.ajax.reload();335 var forms = document.getElementById('user_form');336 forms.classList.remove('was-validated');337 } else {338 var select2 = document.getElementById("txtcodigoescuela");339 select2.options.length = 0;340 select2.options[select2.options.length] = new Option('Buscar', '');341 $('#txtcodigoescuela').val('');342 swal("Error", data.message, "warning");343 var dataTable = $('#res-config').DataTable();344 dataTable.ajax.reload();345 }346 });347 } else {348 return false;349 }350 });351function getMessage() {352 $mensaje = "";353 switch ($tipo.val()) {354 default: $mensaje = "Listado de Parametros";355 }356 return $mensaje;357}358function pad(n, length) {359 var n = n.toString();360 while (n.length < length) n = "0" + n;361 return n;362}363function reFresh() {364 location.reload();365}366function mayus(e) {367 e.value = e.value.toUpperCase();368}369function listarProcesos() {370 var dataTable = $('#res-config2').DataTable({371 responsive: true,372 "pageLength": 5,373 "destroy": true,374 "order": [375 [0, "desc"]376 ],377 "ajax": {378 url: "listarProcesos",379 type: "POST",380 data: {}381 },382 "columns": [{383 "title": "ACCION",384 "render": function(data, type, row) {385 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"386 },387 "width": 1388 }, {389 "title": "CODIGO",390 "data": "CODIGOPROCESO",391 "width": 1392 }, {393 "title": "CODIGOSEMESTRE",394 "data": "CODIGOSEMESTRE",395 "width": 1,396 "visible": false397 }, {398 "title": "DESCRIPCION",399 "data": "DESCRIPCIONSEMESTRE",400 "width": 300401 }],402 dom: 'Bfrtip',403 buttons: [],404 "language": {405 "lengthMenu": "Mostrar _MENU_ postulaciones",406 "zeroRecords": "No se encontró ningún registro",407 "info": "_PAGE_ de _PAGES_",408 "infoEmpty": "No hay registros disponibles",409 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",410 "search": "Buscar:",411 "paginate": {412 "first": "Primero",413 "last": "Último",414 "next": "Siguiente",415 "previous": "Anterior"416 },417 },418 });419 obtener_data_proceso("#res-config2 tbody", dataTable);420}421function listarEscuelas() {422 var dataTable = $('#res-config3').DataTable({423 responsive: true,424 "pageLength": 5,425 "destroy": true,426 "order": [427 [0, "desc"]428 ],429 "ajax": {430 url: "listarEscuelas",431 type: "POST",432 data: {}433 },434 "columns": [{435 "title": "ACCION",436 "render": function(data, type, row) {437 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"438 },439 "width": 1440 }, {441 "title": "CODIGO",442 "data": "CODIGOESCUELA",443 "width": 1444 }, {445 "title": "DESCRIPCION",446 "data": "DESCRIPCION",447 "width": 300448 }],449 dom: 'Bfrtip',450 buttons: [],451 "language": {452 "lengthMenu": "Mostrar _MENU_ postulaciones",453 "zeroRecords": "No se encontró ningún registro",454 "info": "_PAGE_ de _PAGES_",455 "infoEmpty": "No hay registros disponibles",456 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",457 "search": "Buscar:",458 "paginate": {459 "first": "Primero",460 "last": "Último",461 "next": "Siguiente",462 "previous": "Anterior"463 },464 },465 });466 obtener_data_escuela("#res-config3 tbody", dataTable);467}468var ModalEffects = (function() {469 function init() {470 var overlay = document.querySelector('.md-overlay');471 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {472 var el2 = document.getElementById("modaldataproceso");473 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),474 close = modal.querySelector('.md-close');475 function removeModal(hasPerspective) {476 classie.remove(modal, 'md-show');477 $('body').removeClass(el2.getAttribute('data-modal'));478 if (hasPerspective) {479 classie.remove(document.documentElement, 'md-perspective');480 }481 }482 function removeModalHandler() {483 removeModal(classie.has(el2, 'md-setperspective'));484 }485 el2.addEventListener('click', function(ev) {486 classie.add(modal, 'md-show');487 $('body').addClass(el2.getAttribute('data-modal'));488 if (classie.has(el2, 'md-setperspective')) {489 setTimeout(function() {490 classie.add(document.documentElement, 'md-perspective');491 }, 25);492 }493 });494 close.addEventListener('click', function(ev) {495 ev.stopPropagation();496 removeModalHandler();497 });498 });499 }500 init();501})();502var ModalEffects = (function() {503 function init() {504 var overlay = document.querySelector('.md-overlay');505 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {506 var el2 = document.getElementById("modaldataescuela");507 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),508 close = modal.querySelector('.md-close');509 function removeModal(hasPerspective) {510 classie.remove(modal, 'md-show');511 $('body').removeClass(el2.getAttribute('data-modal'));512 if (hasPerspective) {513 classie.remove(document.documentElement, 'md-perspective');514 }515 }516 function removeModalHandler() {517 removeModal(classie.has(el2, 'md-setperspective'));518 }519 el2.addEventListener('click', function(ev) {520 classie.add(modal, 'md-show');521 $('body').addClass(el2.getAttribute('data-modal'));522 if (classie.has(el2, 'md-setperspective')) {523 setTimeout(function() {524 classie.add(document.documentElement, 'md-perspective');525 }, 25);526 }527 });528 close.addEventListener('click', function(ev) {529 ev.stopPropagation();530 removeModalHandler();531 });532 });533 }534 init();535})();...

Full Screen

Full Screen

JS_FSE700.js

Source:JS_FSE700.js Github

copy

Full Screen

...73 select.options[select.options.length] = new Option(data.DESCRIPCIONSEMESTRE, data.CODIGOPROCESO);74 var txtcodigorol = $('#txtcodigoproceso').val(data.CODIGOPROCESO);75 var txtcodigorol = $('#txtcodigosemestre').val(data.CODIGOSEMESTRE);76 var el2 = document.getElementById("modaldataproceso");77 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),78 close = modal.querySelector('.md-close');79 function removeModal(hasPerspective) {80 classie.remove(modal, 'md-show');81 $('body').removeClass(el2.getAttribute('data-modal'));82 if (hasPerspective) {83 classie.remove(document.documentElement, 'md-perspective');84 }85 }86 function removeModalHandler() {87 removeModal(classie.has(el2, 'md-setperspective'));88 }89 ev.stopPropagation();90 removeModalHandler();91 });92}93var obtener_data_escuela = function(tbody, dataTable) {94 $(tbody).on("click", "button.btnseleccionarUsuario", function(ev) {95 var data = dataTable.row($(this).parents("tr")).data();96 var select = document.getElementById("txtcodigoescuela");97 select.options.length = 0;98 select.options[select.options.length] = new Option('Buscar', '');99 select.options[select.options.length] = new Option(data.DESCRIPCION, data.CODIGOESCUELA);100 var txtcodigorol = $('#txtcodigoescuela').val(data.CODIGOESCUELA);101 var el2 = document.getElementById("modaldataescuela");102 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),103 close = modal.querySelector('.md-close');104 function removeModal(hasPerspective) {105 classie.remove(modal, 'md-show');106 $('body').removeClass(el2.getAttribute('data-modal'));107 if (hasPerspective) {108 classie.remove(document.documentElement, 'md-perspective');109 }110 }111 function removeModalHandler() {112 removeModal(classie.has(el2, 'md-setperspective'));113 }114 ev.stopPropagation();115 removeModalHandler();116 });117}118$(document).ready(function() {119 consultar();120 listarProcesos();121 listarEscuelas();122});123function limpiar() {124 $('#txtcodigoprocesoescuela').val('');125 $('#txtcodigosemestre').val('');126 $('#txtfechainicio').val(ano + "-" + mes + "-" + dia);127 $('#txtfechafin').val(ano + "-" + mes + "-" + dia);128 $('#txtestado').val('');129 var forms = document.getElementById('user_form');130 forms.classList.remove('was-validated');131 document.getElementById('btnGuardarDatos').disabled = false;132 document.getElementById('modaldataproceso').disabled = false;133 document.getElementById('modaldataescuela').disabled = false;134 var select = document.getElementById("txtcodigoproceso");135 select.options.length = 0;136 select.options[select.options.length] = new Option('Buscar', '');137 var select2 = document.getElementById("txtcodigoescuela");138 select2.options.length = 0;139 select2.options[select2.options.length] = new Option('Buscar', '');140}141function consultar() {142 $('#btnNuevo').click(function() {143 limpiar();144 });145 $mensaje = getMessage();146 $("#message").html($mensaje);147 var dataTable = $('#res-config').DataTable({148 "destroy": true,149 "order": [150 [0, "desc"]151 ],152 "ajax": {153 url: "listarProcesosEscuelas",154 type: "POST",155 data: {156 txtprocesobuscar: $txtprocesobuscar.val()157 }158 },159 "columns": [{160 "title": "EDITAR",161 "render": function(data, type, row) {162 return "<center><button data-toggle='modal' data-target='#myModalVentana' type='button' class='editar btn btn-warning'><span class='feather icon-edit'></span></button></center>"163 },164 "width": 5165 }, {166 "title": "ELIMINAR",167 "render": function(data, type, row) {168 return "<center><button type='button' class='eliminar btn btn-danger' data-toggle='modal' data-target='#myModalEliminar'><span class='feather icon-trash-2'></span></button></center>"169 },170 "width": 5171 }, {172 "title": "CODIGO",173 "data": "CODIGOPROCESOESCUELA",174 "width": 5175 }, {176 "title": "CODIGOPROCESO",177 "data": "CODIGOPROCESO",178 "width": 5,179 "visible": false180 }, {181 "title": "CODIGOSEMESTRE",182 "data": "CODIGOSEMESTRE",183 "width": 5,184 "visible": false185 }, {186 "title": "SEMESTRE",187 "data": "DESCRIPCIONSEMESTRE",188 "width": 5189 }, {190 "title": "CODIGOESCUELA",191 "data": "CODIGOESCUELA",192 "width": 5,193 "visible": false194 }, {195 "title": "ESCUELA",196 "data": "DESCRIPCIONESCUELA",197 "width": 5198 }, {199 "title": "FECHA INICIO",200 "data": "FECHAINICIO",201 "width": 80202 }, {203 "title": "FECHA FIN",204 "data": "FECHAFIN",205 "width": 80206 }, {207 "title": "ESTADO",208 "data": "DESCRIPCIONESTADO",209 "width": 80210 }, {211 "title": "ESTADO",212 "data": "ESTADO",213 "width": 80,214 "visible": false215 }],216 dom: 'Bfrtip',217 buttons: [],218 "language": {219 "lengthMenu": "Mostrar _MENU_ postulaciones",220 "zeroRecords": "No se encontró ningún registro",221 "info": "_PAGE_ de _PAGES_",222 "infoEmpty": "No records available",223 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",224 "search": "Buscar:",225 "paginate": {226 "first": "Primero",227 "last": "Último",228 "next": "Siguiente",229 "previous": "Anterior"230 },231 },232 });233 obtener_data_editar("#res-config tbody", dataTable);234 obtener_data_eliminar("#res-config tbody", dataTable);235 $(document).on('click', '#btnResfrecar', function() {236 dataTable.ajax.reload();237 });238 $(document).on('click', '#btnEliminarE', function() {239 _token = $('#_token').val();240 txtcodigoprocesoescuelaE = $('#txtcodigoprocesoescuelaE').val();241 txtcodigoprocesoE = $('#txtcodigoprocesoE').val();242 txtcodigosemestreE = $('#txtcodigosemestreE').val();243 txtcodigoescuelaE = $('#txtcodigoescuelaE').val();244 urlbase = $("body").attr('urlbase');245 url = urlbase + "/configuracion/eliminarProcesoEscuela";246 $.ajax({247 url: url,248 type: 'POST',249 dataType: 'json',250 data: {251 _token: _token,252 txtcodigoprocesoescuelaE: txtcodigoprocesoescuelaE,253 txtcodigoprocesoE: txtcodigoprocesoE,254 txtcodigosemestreE: txtcodigosemestreE,255 txtcodigoescuelaE: txtcodigoescuelaE256 },257 complete: function(response) {}258 }).then(function(data) {259 if (data.success == true) {260 $('#myModalEliminar').modal('hide');261 swal(data.message, "Hacer click!", "success");262 limpiar();263 dataTable.ajax.reload();264 var forms = document.getElementById('user_form');265 forms.classList.remove('was-validated');266 }267 });268 });269 $(document).on('submit', '#user_form', function(event) {270 event.preventDefault();271 _token = $('#_token').val();272 txtcodigo = $('#txtcodigoprocesoescuela').val();273 txtnombre = $('#txtnombre').val();274 var a = 0;275 var b = 0;276 var c = 0;277 var d = 0;278 var e = 0;279 var txtodigoproceso = $('#txtodigoproceso').val();280 var txtcodigoescuela = $('#txtcodigoescuela').val();281 var txtfechainicio = $('#txtfechainicio').val();282 var txtfechafin = $('#txtfechafin').val();283 var txtestado = $('#txtestado').val();284 if (txtodigoproceso == '') {285 a = 1;286 }287 if (txtcodigoescuela == '') {288 b = 1;289 }290 if (txtfechainicio == '') {291 c = 1;292 } else {293 if (txtfechainicio > txtfechafin) {294 c = 1;295 }296 }297 if (txtfechafin == '') {298 d = 1;299 } else {300 if (txtfechafin < txtfechainicio) {301 d = 1;302 }303 }304 if (txtestado == '') {305 e = 1;306 } else {307 if (txtestado == 3) {308 e = 1;309 }310 }311 var total = a + b + c + d + e;312 if (total == 0) {313 urlbase = $("body").attr('urlbase');314 if (txtcodigo == '') {315 url = urlbase + "/configuracion/insertarProcesoEscuela";316 } else {317 url = urlbase + "/configuracion/actualizarProcesoEscuela";318 }319 $.ajax({320 url: url,321 method: 'POST',322 data: new FormData(this),323 contentType: false,324 processData: false,325 complete: function(response) {}326 }).then(function(data) {327 if (data.success == true) {328 swal(data.message, "Hacer click!", "success");329 limpiar();330 dataTable.ajax.reload();331 var forms = document.getElementById('user_form');332 forms.classList.remove('was-validated');333 } else {334 var select2 = document.getElementById("txtcodigoescuela");335 select2.options.length = 0;336 select2.options[select2.options.length] = new Option('Buscar', '');337 $('#txtcodigoescuela').val('');338 swal("Error", data.message, "warning");339 dataTable.ajax.reload();340 }341 });342 } else {343 return false;344 }345 });346}347function getMessage() {348 $mensaje = "";349 switch ($tipo.val()) {350 default: $mensaje = "Listado de Parametros";351 }352 return $mensaje;353}354function pad(n, length) {355 var n = n.toString();356 while (n.length < length) n = "0" + n;357 return n;358}359function reFresh() {360 location.reload();361}362function mayus(e) {363 e.value = e.value.toUpperCase();364}365function listarProcesos() {366 var dataTable = $('#res-config2').DataTable({367 responsive: true,368 "pageLength": 5,369 "destroy": true,370 "order": [371 [0, "desc"]372 ],373 "ajax": {374 url: "listarProcesos",375 type: "POST",376 data: {}377 },378 "columns": [{379 "title": "ACCION",380 "render": function(data, type, row) {381 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"382 },383 "width": 1384 }, {385 "title": "CODIGO",386 "data": "CODIGOPROCESO",387 "width": 1388 }, {389 "title": "CODIGOSEMESTRE",390 "data": "CODIGOSEMESTRE",391 "width": 1,392 "visible": false393 }, {394 "title": "DESCRIPCION",395 "data": "DESCRIPCIONSEMESTRE",396 "width": 300397 }],398 dom: 'Bfrtip',399 buttons: [],400 "language": {401 "lengthMenu": "Mostrar _MENU_ postulaciones",402 "zeroRecords": "No se encontró ningún registro",403 "info": "_PAGE_ de _PAGES_",404 "infoEmpty": "No hay registros disponibles",405 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",406 "search": "Buscar:",407 "paginate": {408 "first": "Primero",409 "last": "Último",410 "next": "Siguiente",411 "previous": "Anterior"412 },413 },414 });415 obtener_data_proceso("#res-config2 tbody", dataTable);416}417function listarEscuelas() {418 var dataTable = $('#res-config3').DataTable({419 responsive: true,420 "pageLength": 5,421 "destroy": true,422 "order": [423 [0, "desc"]424 ],425 "ajax": {426 url: "listarEscuelas",427 type: "POST",428 data: {}429 },430 "columns": [{431 "title": "ACCION",432 "render": function(data, type, row) {433 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"434 },435 "width": 1436 }, {437 "title": "CODIGO",438 "data": "CODIGOESCUELA",439 "width": 1440 }, {441 "title": "DESCRIPCION",442 "data": "DESCRIPCION",443 "width": 300444 }],445 dom: 'Bfrtip',446 buttons: [],447 "language": {448 "lengthMenu": "Mostrar _MENU_ postulaciones",449 "zeroRecords": "No se encontró ningún registro",450 "info": "_PAGE_ de _PAGES_",451 "infoEmpty": "No hay registros disponibles",452 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",453 "search": "Buscar:",454 "paginate": {455 "first": "Primero",456 "last": "Último",457 "next": "Siguiente",458 "previous": "Anterior"459 },460 },461 });462 obtener_data_escuela("#res-config3 tbody", dataTable);463}464var ModalEffects = (function() {465 function init() {466 var overlay = document.querySelector('.md-overlay');467 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {468 var el2 = document.getElementById("modaldataproceso");469 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),470 close = modal.querySelector('.md-close');471 function removeModal(hasPerspective) {472 classie.remove(modal, 'md-show');473 $('body').removeClass(el2.getAttribute('data-modal'));474 if (hasPerspective) {475 classie.remove(document.documentElement, 'md-perspective');476 }477 }478 function removeModalHandler() {479 removeModal(classie.has(el2, 'md-setperspective'));480 }481 el2.addEventListener('click', function(ev) {482 classie.add(modal, 'md-show');483 $('body').addClass(el2.getAttribute('data-modal'));484 if (classie.has(el2, 'md-setperspective')) {485 setTimeout(function() {486 classie.add(document.documentElement, 'md-perspective');487 }, 25);488 }489 });490 close.addEventListener('click', function(ev) {491 ev.stopPropagation();492 removeModalHandler();493 });494 });495 }496 init();497})();498var ModalEffects = (function() {499 function init() {500 var overlay = document.querySelector('.md-overlay');501 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {502 var el2 = document.getElementById("modaldataescuela");503 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),504 close = modal.querySelector('.md-close');505 function removeModal(hasPerspective) {506 classie.remove(modal, 'md-show');507 $('body').removeClass(el2.getAttribute('data-modal'));508 if (hasPerspective) {509 classie.remove(document.documentElement, 'md-perspective');510 }511 }512 function removeModalHandler() {513 removeModal(classie.has(el2, 'md-setperspective'));514 }515 el2.addEventListener('click', function(ev) {516 classie.add(modal, 'md-show');517 $('body').addClass(el2.getAttribute('data-modal'));518 if (classie.has(el2, 'md-setperspective')) {519 setTimeout(function() {520 classie.add(document.documentElement, 'md-perspective');521 }, 25);522 }523 });524 close.addEventListener('click', function(ev) {525 ev.stopPropagation();526 removeModalHandler();527 });528 });529 }530 init();531})();...

Full Screen

Full Screen

JS_FSE701.js

Source:JS_FSE701.js Github

copy

Full Screen

...72 select.options[select.options.length] = new Option(data.DESCRIPCIONSEMESTRE, data.CODIGOPROCESO);73 var txtcodigorol = $('#txtcodigoproceso').val(data.CODIGOPROCESO);74 var txtcodigorol = $('#txtcodigosemestre').val(data.CODIGOSEMESTRE);75 var el2 = document.getElementById("modaldataproceso");76 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),77 close = modal.querySelector('.md-close');78 function removeModal(hasPerspective) {79 classie.remove(modal, 'md-show');80 $('body').removeClass(el2.getAttribute('data-modal'));81 if (hasPerspective) {82 classie.remove(document.documentElement, 'md-perspective');83 }84 }85 function removeModalHandler() {86 removeModal(classie.has(el2, 'md-setperspective'));87 }88 ev.stopPropagation();89 removeModalHandler();90 });91}92var obtener_data_escuela = function(tbody, dataTable) {93 $(tbody).on("click", "button.btnseleccionarUsuario", function(ev) {94 var data = dataTable.row($(this).parents("tr")).data();95 var select = document.getElementById("txtcodigoescuela");96 select.options.length = 0;97 select.options[select.options.length] = new Option('Buscar', '');98 select.options[select.options.length] = new Option(data.DESCRIPCION, data.CODIGOESCUELA);99 var txtcodigorol = $('#txtcodigoescuela').val(data.CODIGOESCUELA);100 var el2 = document.getElementById("modaldataescuela");101 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),102 close = modal.querySelector('.md-close');103 function removeModal(hasPerspective) {104 classie.remove(modal, 'md-show');105 $('body').removeClass(el2.getAttribute('data-modal'));106 if (hasPerspective) {107 classie.remove(document.documentElement, 'md-perspective');108 }109 }110 function removeModalHandler() {111 removeModal(classie.has(el2, 'md-setperspective'));112 }113 ev.stopPropagation();114 removeModalHandler();115 });116}117$(document).ready(function() {118 consultar();119 listarProcesos();120 listarEscuelas();121});122function limpiar() {123 $('#txtcodigoprocesoescuela').val('');124 $('#txtcodigosemestre').val('');125 $('#txtfechainicio').val(ano + "-" + mes + "-" + dia);126 $('#txtfechafin').val(ano + "-" + mes + "-" + dia);127 $('#txtestado').val('');128 var forms = document.getElementById('user_form');129 forms.classList.remove('was-validated');130 document.getElementById('btnGuardarDatos').disabled = false;131 document.getElementById('modaldataproceso').disabled = false;132 document.getElementById('modaldataescuela').disabled = false;133 var select = document.getElementById("txtcodigoproceso");134 select.options.length = 0;135 select.options[select.options.length] = new Option('Buscar', '');136 var select2 = document.getElementById("txtcodigoescuela");137 select2.options.length = 0;138 select2.options[select2.options.length] = new Option('Buscar', '');139}140function consultar() {141 $('#btnNuevo').click(function() {142 limpiar();143 });144 $mensaje = getMessage();145 $("#message").html($mensaje);146 var dataTable = $('#res-config').DataTable({147 "destroy": true,148 "order": [149 [0, "desc"]150 ],151 "ajax": {152 url: "listarProcesosEscuelas",153 type: "POST",154 data: {155 txtprocesobuscar: $txtprocesobuscar.val()156 }157 },158 "columns": [{159 "title": "EDITAR",160 "render": function(data, type, row) {161 return "<center><button data-toggle='modal' data-target='#myModalVentana' type='button' class='editar btn btn-warning'><span class='feather icon-edit'></span></button></center>"162 },163 "width": 5164 }, {165 "title": "ELIMINAR",166 "render": function(data, type, row) {167 return "<center><button type='button' class='eliminar btn btn-danger' data-toggle='modal' data-target='#myModalEliminar'><span class='feather icon-trash-2'></span></button></center>"168 },169 "width": 5170 }, {171 "title": "CODIGO",172 "data": "CODIGOPROCESOESCUELA",173 "width": 5174 }, {175 "title": "CODIGOPROCESO",176 "data": "CODIGOPROCESO",177 "width": 5,178 "visible": false179 }, {180 "title": "CODIGOSEMESTRE",181 "data": "CODIGOSEMESTRE",182 "width": 5,183 "visible": false184 }, {185 "title": "SEMESTRE",186 "data": "DESCRIPCIONSEMESTRE",187 "width": 5188 }, {189 "title": "CODIGOESCUELA",190 "data": "CODIGOESCUELA",191 "width": 5,192 "visible": false193 }, {194 "title": "ESCUELA",195 "data": "DESCRIPCIONESCUELA",196 "width": 5197 }, {198 "title": "FECHA INICIO",199 "data": "FECHAINICIO",200 "width": 80201 }, {202 "title": "FECHA FIN",203 "data": "FECHAFIN",204 "width": 80205 }, {206 "title": "ESTADO",207 "data": "DESCRIPCIONESTADO",208 "width": 80209 }, {210 "title": "ESTADO",211 "data": "ESTADO",212 "width": 80,213 "visible": false214 }],215 dom: 'Bfrtip',216 buttons: [],217 "language": {218 "lengthMenu": "Mostrar _MENU_ postulaciones",219 "zeroRecords": "No se encontró ningún registro",220 "info": "_PAGE_ de _PAGES_",221 "infoEmpty": "No records available",222 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",223 "search": "Buscar:",224 "paginate": {225 "first": "Primero",226 "last": "Último",227 "next": "Siguiente",228 "previous": "Anterior"229 },230 },231 });232 obtener_data_editar("#res-config tbody", dataTable);233 obtener_data_eliminar("#res-config tbody", dataTable);234 $(document).on('click', '#btnResfrecar', function() {235 dataTable.ajax.reload();236 });237 $(document).on('click', '#btnEliminarE', function() {238 _token = $('#_token').val();239 txtcodigoprocesoescuelaE = $('#txtcodigoprocesoescuelaE').val();240 txtcodigoprocesoE = $('#txtcodigoprocesoE').val();241 txtcodigosemestreE = $('#txtcodigosemestreE').val();242 txtcodigoescuelaE = $('#txtcodigoescuelaE').val();243 urlbase = $("body").attr('urlbase');244 url = urlbase + "/configuracion/eliminarProcesoEscuela";245 $.ajax({246 url: url,247 type: 'POST',248 dataType: 'json',249 data: {250 _token: _token,251 txtcodigoprocesoescuelaE: txtcodigoprocesoescuelaE,252 txtcodigoprocesoE: txtcodigoprocesoE,253 txtcodigosemestreE: txtcodigosemestreE,254 txtcodigoescuelaE: txtcodigoescuelaE255 },256 complete: function(response) {}257 }).then(function(data) {258 if (data.success == true) {259 $('#myModalEliminar').modal('hide');260 swal(data.message, "Hacer click!", "success");261 limpiar();262 dataTable.ajax.reload();263 var forms = document.getElementById('user_form');264 forms.classList.remove('was-validated');265 }266 });267 });268 $(document).on('submit', '#user_form', function(event) {269 event.preventDefault();270 _token = $('#_token').val();271 txtcodigo = $('#txtcodigoprocesoescuela').val();272 txtnombre = $('#txtnombre').val();273 var a = 0;274 var b = 0;275 var c = 0;276 var d = 0;277 var e = 0;278 var txtodigoproceso = $('#txtodigoproceso').val();279 var txtcodigoescuela = $('#txtcodigoescuela').val();280 var txtfechainicio = $('#txtfechainicio').val();281 var txtfechafin = $('#txtfechafin').val();282 var txtestado = $('#txtestado').val();283 if (txtodigoproceso == '') {284 a = 1;285 }286 if (txtcodigoescuela == '') {287 b = 1;288 }289 if (txtfechainicio == '') {290 c = 1;291 } else {292 if (txtfechainicio > txtfechafin) {293 c = 1;294 }295 }296 if (txtfechafin == '') {297 d = 1;298 } else {299 if (txtfechafin < txtfechainicio) {300 d = 1;301 }302 }303 if (txtestado == '') {304 e = 1;305 } else {306 if (txtestado == 3) {307 e = 1;308 }309 }310 var total = a + b + c + d + e;311 if (total == 0) {312 urlbase = $("body").attr('urlbase');313 if (txtcodigo == '') {314 url = urlbase + "/configuracion/insertarProcesoEscuela";315 } else {316 url = urlbase + "/configuracion/actualizarProcesoEscuela";317 }318 $.ajax({319 url: url,320 method: 'POST',321 data: new FormData(this),322 contentType: false,323 processData: false,324 complete: function(response) {}325 }).then(function(data) {326 if (data.success == true) {327 swal(data.message, "Hacer click!", "success");328 limpiar();329 dataTable.ajax.reload();330 var forms = document.getElementById('user_form');331 forms.classList.remove('was-validated');332 } else {333 var select2 = document.getElementById("txtcodigoescuela");334 select2.options.length = 0;335 select2.options[select2.options.length] = new Option('Buscar', '');336 $('#txtcodigoescuela').val('');337 swal("Error", data.message, "warning");338 dataTable.ajax.reload();339 }340 });341 } else {342 return false;343 }344 });345}346function getMessage() {347 $mensaje = "";348 switch ($tipo.val()) {349 default: $mensaje = "Listado de Parametros";350 }351 return $mensaje;352}353function pad(n, length) {354 var n = n.toString();355 while (n.length < length) n = "0" + n;356 return n;357}358function reFresh() {359 location.reload();360}361function mayus(e) {362 e.value = e.value.toUpperCase();363}364function listarProcesos() {365 var dataTable = $('#res-config2').DataTable({366 responsive: true,367 "pageLength": 5,368 "destroy": true,369 "order": [370 [0, "desc"]371 ],372 "ajax": {373 url: "listarProcesos",374 type: "POST",375 data: {}376 },377 "columns": [{378 "title": "ACCION",379 "render": function(data, type, row) {380 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"381 },382 "width": 1383 }, {384 "title": "CODIGO",385 "data": "CODIGOPROCESO",386 "width": 1387 }, {388 "title": "CODIGOSEMESTRE",389 "data": "CODIGOSEMESTRE",390 "width": 1,391 "visible": false392 }, {393 "title": "DESCRIPCION",394 "data": "DESCRIPCIONSEMESTRE",395 "width": 300396 }],397 dom: 'Bfrtip',398 buttons: [],399 "language": {400 "lengthMenu": "Mostrar _MENU_ postulaciones",401 "zeroRecords": "No se encontró ningún registro",402 "info": "_PAGE_ de _PAGES_",403 "infoEmpty": "No hay registros disponibles",404 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",405 "search": "Buscar:",406 "paginate": {407 "first": "Primero",408 "last": "Último",409 "next": "Siguiente",410 "previous": "Anterior"411 },412 },413 });414 obtener_data_proceso("#res-config2 tbody", dataTable);415}416function listarEscuelas() {417 var dataTable = $('#res-config3').DataTable({418 responsive: true,419 "pageLength": 5,420 "destroy": true,421 "order": [422 [0, "desc"]423 ],424 "ajax": {425 url: "listarEscuelas",426 type: "POST",427 data: {}428 },429 "columns": [{430 "title": "ACCION",431 "render": function(data, type, row) {432 return "<center><button title='Seleccionar' type='button' class='btnseleccionarUsuario btn btn-success md-close'><span class='feather icon-check-square'></span></button></center>"433 },434 "width": 1435 }, {436 "title": "CODIGO",437 "data": "CODIGOESCUELA",438 "width": 1439 }, {440 "title": "DESCRIPCION",441 "data": "DESCRIPCION",442 "width": 300443 }],444 dom: 'Bfrtip',445 buttons: [],446 "language": {447 "lengthMenu": "Mostrar _MENU_ postulaciones",448 "zeroRecords": "No se encontró ningún registro",449 "info": "_PAGE_ de _PAGES_",450 "infoEmpty": "No hay registros disponibles",451 "infoFiltered": "(Filtrado de un total de _MAX_ total registros)",452 "search": "Buscar:",453 "paginate": {454 "first": "Primero",455 "last": "Último",456 "next": "Siguiente",457 "previous": "Anterior"458 },459 },460 });461 obtener_data_escuela("#res-config3 tbody", dataTable);462}463var ModalEffects = (function() {464 function init() {465 var overlay = document.querySelector('.md-overlay');466 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {467 var el2 = document.getElementById("modaldataproceso");468 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),469 close = modal.querySelector('.md-close');470 function removeModal(hasPerspective) {471 classie.remove(modal, 'md-show');472 $('body').removeClass(el2.getAttribute('data-modal'));473 if (hasPerspective) {474 classie.remove(document.documentElement, 'md-perspective');475 }476 }477 function removeModalHandler() {478 removeModal(classie.has(el2, 'md-setperspective'));479 }480 el2.addEventListener('click', function(ev) {481 classie.add(modal, 'md-show');482 $('body').addClass(el2.getAttribute('data-modal'));483 if (classie.has(el2, 'md-setperspective')) {484 setTimeout(function() {485 classie.add(document.documentElement, 'md-perspective');486 }, 25);487 }488 });489 close.addEventListener('click', function(ev) {490 ev.stopPropagation();491 removeModalHandler();492 });493 });494 }495 init();496})();497var ModalEffects = (function() {498 function init() {499 var overlay = document.querySelector('.md-overlay');500 [].slice.call(document.querySelectorAll('.md-trigger')).forEach(function(el, i) {501 var el2 = document.getElementById("modaldataescuela");502 var modal = document.querySelector('#' + el2.getAttribute('data-modal')),503 close = modal.querySelector('.md-close');504 function removeModal(hasPerspective) {505 classie.remove(modal, 'md-show');506 $('body').removeClass(el2.getAttribute('data-modal'));507 if (hasPerspective) {508 classie.remove(document.documentElement, 'md-perspective');509 }510 }511 function removeModalHandler() {512 removeModal(classie.has(el2, 'md-setperspective'));513 }514 el2.addEventListener('click', function(ev) {515 classie.add(modal, 'md-show');516 $('body').addClass(el2.getAttribute('data-modal'));517 if (classie.has(el2, 'md-setperspective')) {518 setTimeout(function() {519 classie.add(document.documentElement, 'md-perspective');520 }, 25);521 }522 });523 close.addEventListener('click', function(ev) {524 ev.stopPropagation();525 removeModalHandler();526 });527 });528 }529 init();530})();...

Full Screen

Full Screen

modified.js

Source:modified.js Github

copy

Full Screen

...56 if (el.childNodes.length === index) {57 return null;58 } else {59 el2 = el.childNodes[index];60 if (el2.getAttribute && el2.getAttribute('data-id')) {61 id = el2.getAttribute('data-id');62 if (nodes[id].type === 'text' && el2.textContent === '') {63 return next_id(el, index + 1);64 } else {65 return id;66 }67 } else {68 return next_id(el, index + 1);69 }70 }71 };72 previous_id = function (el, index) {73 var el2;74 if (index === -1) {75 return null;76 } else {77 el2 = el.childNodes[index];78 if (el2.getAttribute && el2.getAttribute('data-id')) {79 return el2.getAttribute('data-id');80 } else {81 return previous_id(el, index - 1);82 }83 }84 };85 new_val = function (el, index) {86 var val, prev, node, next;87 val = null;88 prev = previous_id(el, index);89 if (prev) {90 node = nodes[prev];91 if (node.type === 'text') {92 val = nbe.lib.clone(node.val);93 }...

Full Screen

Full Screen

36497.user.js

Source:36497.user.js Github

copy

Full Screen

...38 while(el2)39 {40 if(el2 && el2.nodeName=="IMG")41 {42 cost[el2.getAttribute("src").substr(el2.getAttribute("src").lastIndexOf("/")+1,el2.getAttribute("src").lastIndexOf(".gif")-el2.getAttribute("src").lastIndexOf("/")-1)]=parseInt(el2.nextSibling.nodeValue);43 }44 el2=el2.nextSibling;45 }46 if(!cost[204]){cost[204]=0;}if(cost[204]==0 && res[204]==0){res[204]=1;}47 if(!cost[214]){cost[214]=0;}if(cost[214]==0 && res[214]==0){res[214]=1;}48 if(!cost[224]){cost[224]=0;}if(cost[224]==0 && res[224]==0){res[224]=1;}49 if(!cost[234]){cost[234]=0;}if(cost[234]==0 && res[234]==0){res[234]=1;}50 if(!cost[284]){cost[284]=0;}if(cost[284]==0 && res[284]==0){res[284]=1;}51 max=Math.min(res[204]/cost[204],res[214]/cost[214],res[224]/cost[224],res[234]/cost[234],res[284]/cost[284],max);52 str+=" <a class='userAnchor' href='javascript:void(0);' onClick='this.parentNode.firstChild.value="+max+";'>max</a>";53 str+=" <a class='userAnchor' href='javascript:void(0);' onClick='if(parseInt(this.parentNode.firstChild.value)<parseInt(this.parentNode.previousSibling.previousSibling.lastChild.innerHTML)){this.parentNode.firstChild.value=parseInt(this.parentNode.firstChild.value)+1;}'>+1</a>";54 str+="<style>.userAnchor{color:rgb(255,145,46);}.userAnchor:hover{color:red;text-decoration:none;}</style>";55 el.parentNode.setAttribute("align","center");56 el.parentNode.innerHTML+=str;57 }58 i++;59}6061i=0;str="";62while(el=document.getElementsByTagName("button").item(i))63{64 if(el.innerHTML.length==5)65 {66 var j=0,el2;67 while(el2=document.images[j])68 {69 if(el2.parentNode.parentNode.parentNode.nodeName=="TR" && !el2.getAttribute("rc") && el2.src.indexOf("q.gif")==-1)70 {71 el=document.createElement("img");72 el.setAttribute("src","q.gif");73 el.setAttribute("class","qq");74 el.setAttribute("onClick","hlp("+el2.src.substr(el2.src.lastIndexOf("/")+1,el2.src.lastIndexOf(".")-el2.src.lastIndexOf("/")-2)+");");75 el2.parentNode.insertBefore(el,el2.parentNode.firstChild.nextSibling);76 j++;77 }78 j++;79 }80 break;81 }82 i++;83}

Full Screen

Full Screen

FrontAdv_couplet01.js

Source:FrontAdv_couplet01.js Github

copy

Full Screen

...35 el1.style.left = l+'px';36 el1.style.top = t+'px';37 el2.style.position = 'absolute';38 if(userAgent.indexOf("firefox")>=1){39 el2.style.left = (window.getWidth() - r - 21 - parseInt(el2.getAttribute("width"))) +'px';40 }else{41 el2.style.left = (window.getWidth() - r - parseInt(el2.getAttribute("width"))) +'px';42 }43 44 el2.style.top = t+'px';45 if (relative) {46 el1.style.top = (window.getScrollTop() + t) +'px';47 el2.style.top = (window.getScrollTop() + t)+'px';48 function adjust() {49 el1.style.top = (window.getScrollTop() + t) +'px';50 el2.style.top = (window.getScrollTop() + t)+'px';51 el1.style.left = (window.getScrollLeft()+l)+'px';52 el2.style.left = (window.getWidth() + window.getScrollLeft() - r - parseInt(el2.getAttribute("width"))) +'px';53 if(userAgent.indexOf("firefox")>=1){54 el2.style.left = (window.getWidth() - r - 21 - parseInt(el2.getAttribute("width"))) +'px';55 }else{56 el2.style.left = (window.getWidth() - r - parseInt(el2.getAttribute("width"))) +'px';57 }58 }59 $(window).scroll(adjust);60 $(window).resize(adjust);61 } */62 var _f = function() {63 var e = el1.parentNode;64 e.parentNode.removeChild(e);65 };66 var closes = el1.parentNode.getElementsByTagName("div");67 for (var i=0, _e; _e=closes[i]; i++) {68 if (/shut/.test(_e.className)) _e.onclick = _f;69 }70 },...

Full Screen

Full Screen

done-sort.js

Source:done-sort.js Github

copy

Full Screen

...11 12 }13 tasksElements.sort((el1, el2) =>{14 return isAsc 15 ? dates[el2.getAttribute('data-id')] - dates[el1.getAttribute('data-id')]16 : dates[el1.getAttribute('data-id')] - dates[el2.getAttribute('data-id')]17 })18 19 }20 21 function sortTaskBytext(tasksElements) {22 let isAsc = openSelect.value == 'asc-text'23 tasksElements.sort((el1, el2) =>{24 let isMore = el2.querySelector('.text-to').textContent.toLowerCase() > el1.querySelector('.text-to').textContent.toLowerCase()25 if (isAsc){26 return isMore27 ? 128 : -129 } else {30 return isMore31 ? -132 : 133 }34 })35 }36 37 let openSelect = document.querySelector('.option-open')38 openSelect.addEventListener('change', function(){39 let tasksElements = document.querySelectorAll('.task-open .task-o')40 let tasksElementsArray = Array.from(tasksElements)41 let isTextSorting = ['asc-text', 'desc-text'].includes(openSelect.value)42 if (isTextSorting){43 sortTaskBytext(tasksElementsArray)44 } else {45 sortTaskBydate(tasksElementsArray)46 }47 48 49 openTaskopenSelection.innerHTML =""50 tasksElementsArray.forEach((el) =>{51 openTaskopenSelection.appendChild(el)52 })53 54 })55 56 let doneSelect = document.querySelector('.option-done')57 doneSelect.addEventListener('change', function(){58 let isAsc = doneSelect.value == 'asc'59 let tasksElements = document.querySelectorAll('.task-done .task-o')60 let tasksElementsArray = Array.from(tasksElements)61 let dates = {}62 for (let i = 0; i<tasksElements.length; i++){63 let dateElement = tasksElements[i].querySelector('.time-done')64 let date = Date.parse(dateElement.getAttribute('data-value'))65 let id = tasksElements[i].getAttribute('data-id')66 dates[id] = date67 } console.log(dates)68 tasksElementsArray.sort((el1, el2) =>{69 return isAsc 70 ? dates[el2.getAttribute('data-id')] - dates[el1.getAttribute('data-id')]71 : dates[el1.getAttribute('data-id')] - dates[el2.getAttribute('data-id')]72 })73 openTaskdoneSelection.innerHTML =""74 tasksElementsArray.forEach((el) =>{75 openTaskdoneSelection.appendChild(el)76 })77 78 })...

Full Screen

Full Screen

main.js

Source:main.js Github

copy

Full Screen

...19 var el=event.target.parentNode.parentNode;20 var el2=event.target.parentNode;21 if(el.getAttribute("Class")=="list2")22 { 23 if(el2.getAttribute("id")=="img1")24 window.location="河图.html";25 // window.open('2.html','_blank');26 else if(el2.getAttribute("id")=="img2")27 window.location="李志.html";28 // window.open('1.html','_blank');29 else if(el2.getAttribute("id")=="img3")30 window.location="林俊杰.html";31 // window.open('3.html','_blank');32 }33 if(el.getAttribute("Class")=="list3")34 nextPic();35 else if(el.getAttribute("Class")=="list1")36 prePic();37})38timer=setInterval(nextPic,2000);//每个两秒往下翻页39document.getElementsByClassName("main")[0].onmouseover=function(){40 clearInterval(timer);41}42document.getElementsByClassName("main")[0].onmouseout=function(){43 timer=setInterval(nextPic,2000);//每个两秒往下翻页...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1driver.findElementByAccessibilityId("el2").getAttribute("value");2driver.findElementByAccessibilityId("el2").getAttribute("label");3driver.findElementByAccessibilityId("el2").getAttribute("name");4driver.findElementByAccessibilityId("el2").getAttribute("type");5driver.findElementByAccessibilityId("el2").getAttribute("enabled");6driver.findElementByAccessibilityId("el2").getAttribute("visible");7driver.findElementByAccessibilityId("el2").getAttribute("valid");8driver.findElementByAccessibilityId("el2").getAttribute("hint");9driver.findElementByAccessibilityId("el2").getAttribute("path");10driver.findElementByAccessibilityId("el2").getAttribute("frame");11driver.findElementByAccessibilityId("el2").getAttribute("size");12driver.findElementByAccessibilityId("el2").getAttribute("selected");13driver.findElementByAccessibilityId("el2").getAttribute("visible");14driver.findElementByAccessibilityId("el2").getAttribute("accessibilityContainer");15driver.findElementByAccessibilityId("el2").getAttribute("accessible");16driver.findElementByAccessibilityId("el2").getAttribute("focusable");17driver.findElementByAccessibilityId("el2").getAttribute("focused");18driver.findElementByAccessibilityId("el2").getAttribute("class");19driver.findElementByAccessibilityId("el2").getAttribute("index");20driver.findElementByAccessibilityId("el2").getAttribute("package");21driver.findElementByAccessibilityId("el2").getAttribute("contentDescription");22driver.findElementByAccessibilityId("el2").getAttribute("checkable");23driver.findElementByAccessibilityId("el2").getAttribute("checked");24driver.findElementByAccessibilityId("el2").getAttribute("clickable");25driver.findElementByAccessibilityId("el2").getAttribute("longClickable");26driver.findElementByAccessibilityId("el2").getAttribute("scrollable");27driver.findElementByAccessibilityId("el2").getAttribute("password");28driver.findElementByAccessibilityId("el2").getAttribute("selected");29driver.findElementByAccessibilityId("el2").getAttribute("bounds");30driver.findElementByAccessibilityId("el2").getAttribute("enabled");31driver.findElementByAccessibilityId("el2").getAttribute("displayed");32driver.findElementByAccessibilityId("el2").getAttribute("selected");33driver.findElementByAccessibilityId("el2").getAttribute("text");34driver.findElementByAccessibilityId("el2").getAttribute("value");35driver.findElementByAccessibilityId("el2").getAttribute("resource-id");36driver.findElementByAccessibilityId("el2").getAttribute("content-desc");37driver.findElementByAccessibilityId("el2").getAttribute("className");38driver.findElementByAccessibilityId("

Full Screen

Using AI Code Generation

copy

Full Screen

1const wd = require('wd');2const chai = require('chai');3const chaiAsPromised = require('chai-as-promised');4chai.use(chaiAsPromised);5chai.should();6const {assert} = chai;7const {expect} = chai;8const desired = {9};10driver.init(desired)11 .then(() => driver.elementByAccessibilityId('myButton'))12 .then((el) => el.getAttribute('name'))13 .then((name) => name.should.equal('myButton'))14 .then(() => driver.quit());

Full Screen

Using AI Code Generation

copy

Full Screen

1var el2 = driver.findElement(By.id("myid"));2var attribute = el2.getAttribute("name");3var el2 = driver.findElement(By.id("myid"));4var attribute = el2.getAttribute("name");5var el2 = driver.findElement(By.id("myid"));6var attribute = el2.getAttribute("name");7var el2 = driver.findElement(By.id("myid"));8var attribute = el2.getAttribute("name");9var el2 = driver.findElement(By.id("myid"));10var attribute = el2.getAttribute("name");11var el2 = driver.findElement(By.id("myid"));12var attribute = el2.getAttribute("name");13var el2 = driver.findElement(By.id("myid"));14var attribute = el2.getAttribute("name");15var el2 = driver.findElement(By.id("myid"));16var attribute = el2.getAttribute("name");17var el2 = driver.findElement(By.id("myid"));18var attribute = el2.getAttribute("name");19var el2 = driver.findElement(By.id("myid"));20var attribute = el2.getAttribute("name");21var el2 = driver.findElement(By.id("myid"));22var attribute = el2.getAttribute("name");23var el2 = driver.findElement(By.id("myid"));24var attribute = el2.getAttribute("name");25var el2 = driver.findElement(By.id("myid"));26var attribute = el2.getAttribute("name");

Full Screen

Using AI Code Generation

copy

Full Screen

1var el2Value = el2.getAttribute("value");2console.log("el2Value = " + el2Value);3var el2Name = el2.getAttribute("name");4console.log("el2Name = " + el2Name);5var el2Label = el2.getAttribute("label");6console.log("el2Label = " + el2Label);7var el2Type = el2.getAttribute("type");8console.log("el2Type = " + el2Type);9var el2Enabled = el2.getAttribute("enabled");10console.log("el2Enabled = " + el2Enabled);11var el2Valid = el2.getAttribute("valid");12console.log("el2Valid = " + el2Valid);

Full Screen

Using AI Code Generation

copy

Full Screen

1var el2 = driver.findElementByAccessibilityId("Answer");2var el2Value = el2.getAttribute("value");3var el3 = driver.findElementByAccessibilityId("Question");4var el3Value = el3.getAttribute("value");5var el4 = driver.findElementByAccessibilityId("Answer");6var el4Value = el4.getAttribute("value");7var el5 = driver.findElementByAccessibilityId("Question");8var el5Value = el5.getAttribute("value");9var el6 = driver.findElementByAccessibilityId("Answer");10var el6Value = el6.getAttribute("value");11var el7 = driver.findElementByAccessibilityId("Question");12var el7Value = el7.getAttribute("value");13var el8 = driver.findElementByAccessibilityId("Answer");14var el8Value = el8.getAttribute("value");15var el9 = driver.findElementByAccessibilityId("Question");16var el9Value = el9.getAttribute("value");17var el10 = driver.findElementByAccessibilityId("Answer");18var el10Value = el10.getAttribute("value");

Full Screen

Using AI Code Generation

copy

Full Screen

1const wdio = require('webdriverio');2const options = {3 capabilities: {4 }5};6(async () => {7 const client = await wdio.remote(options);8 const attr = await el2.getAttribute('name');9 console.log(attr);10 await client.deleteSession();11})();

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium Xcuitest Driver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Sign up Free
_

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful