1var tooltips = []; 2 3var appHome = angular.module("homeApp", []).config( 4 function($sceProvider) { 5 $sceProvider.enabled(false); 6 }); 7 8appHome.controller("HomeController", function($scope, $http, $sce){ 9 (function($){ 10 $.noConflict(); 11 $scope.urlVideo = ""; 12 $scope.disciplinesVis=$("#disciplinesVis").val(); 13 $scope.paisesVis=$("#paisesVis").val(); 14 $scope.dataArticlesCovid19=$("#dataArticlesCovid19").val(); 15 $scope.variable = "Variable de Angular JS"; 16 $scope.mensajeDiciplinas="mensaje vacio"; 17 $scope.tamScreen=""; 18 $scope.widthScreen= screen.width <= 600 ? 'movil' : 'pantalla'; 19 $scope.busqueda = { 20 tipo: "Art", 21 textoABuscar: "", 22 textoABuscarPandemics:"", 23 valorSelect: "", 24 textoAutnon: "", 25 textoAutinst: "" 26 }; 27 28 $scope.busquedaInstituciones = { 29 nombreABuscar: "" 30 }; 31 $scope.flag = false; 32 $scope.update; 33 $scope.pageLanguaje=""; 34 $scope.options = []; 35 $scope.t = []; 36 $scope.paises = []; 37 $scope.items=[]; 38 $scope.letters="A,B,C,D,F,G,H,I,J,K,L,M,N,Ã,O,P,Q,R,S,T,U,V,W,X,Y,Z"; 39 $scope.banCovid=false; 40 $scope.sectionDirection = getParametroURL("id"); 41 if($scope.sectionDirection=="accesso"){ 42 $(document).ready(function(){ 43 jQuery('html, body').animate({ 44 scrollTop: jQuery('#home-principios-valores').offset().top-40 45 }, 500, 'swing'); 46 47 }); 48 }else if($scope.sectionDirection=="servicios"){ 49 $(document).ready(function(){ 50 jQuery('html, body').animate({ 51 scrollTop: jQuery('#container-icons').offset().top-50 52 }, 500, 'swing'); 53 }); 54 }else if($scope.sectionDirection=="principios"){ 55 $(document).ready(function(){ 56 jQuery('html, body').animate({ 57 scrollTop: jQuery('#home-principios-valores').offset().top-50 58 }, 500, 'swing'); 59 }); 60 } 61 $scope.directDiamond=function(){ 62 $(document).ready(function(){ 63 jQuery('html, body').animate({ 64 scrollTop: jQuery('#home-modelo').offset().top-40 65 }, 500, 'swing'); 66 67 }); 68 } 69 70 71 $scope.cambiarSelect = function(){ 72 $scope.options = []; 73 if ($scope.busqueda.tipo == 'Are'){ 74 $scope.options = $scope.t.disciplines; 75 $scope.t.disciplines.forEach( function(valor, indice) { 76 var claveDisc=valor["value"]; 77 if(claveDisc!=""){ 78 var disciplinasJ=$scope.disciplinesVis.split("<<<"); 79 for(var i=0;i<=disciplinasJ.length;i++){ 80 var item=disciplinasJ[i]; 81 if(item!="" && typeof item !== "undefined" && item.split(",")[1]=="false" && claveDisc==item.split(",")[0]){ 82 $scope.options.splice($scope.options.map(function(e) { return e.value; }).indexOf(claveDisc),1); 83 } 84 } 85 } 86 }); 87 } 88 else if ($scope.busqueda.tipo == 'Pai'){ 89 $scope.options = $scope.t.countries; 90 $scope.t.countries.forEach( function(valor, indice) { 91 var cont=0; 92 $scope.arrayJCountryCollection.forEach( function(item, index) { 93 if(item.key==valor.value && item.totalOfJournals>0 && valor.value!=""){ 94 95 cont++; 96 }else if(item.key==valor.value && item.totalOfJournals<=0 && valor.value!=""){ 97 $scope.options.splice($scope.options.map(function(e) { return e.value; }).indexOf(valor.value),1); 98 99 } 100 }); 101 if(cont==0 && valor.value!=""){ 102 $scope.options.splice($scope.options.map(function(e) { return e.value; }).indexOf(valor.value),1); 103 104 } 105 }); 106 }else if($scope.busqueda.tipo == 'Aut'){ 107 $("#input-articulo").attr("placeholder",$scope.t.select.placeholderAutnon); 108 }else if($scope.busqueda.tipo == 'Rev'){ 109 $("#input-articulo").attr("placeholder",$scope.t.select.placeholderRev); 110 }else if($scope.busqueda.tipo == 'Ins'){ 111 $("#input-articulo").attr("placeholder",$scope.t.select.placeholderInst); 112 }else if($scope.busqueda.tipo == 'Art'){ 113 $("#input-articulo").attr("placeholder",$scope.t.select.placeholder); 114 } 115 } 116 $scope.findLetter=function(leter){ 117 var url='BusquedaRevistaPorNombre.oa?q='+leter; 118 window.open(url, '_blank'); 119 } 120 $scope.goAutnon=function(){ 121 if ($scope.busqueda.textoAutnon!=""){ 122 window.location.href = "/autorHome.oa?au="+$scope.busqueda.textoAutnon; 123 } 124 } 125 $scope.goAutinst=function(){ 126 if ($scope.busqueda.textoAutinst!=""){ 127 window.location.href = "/autorHome.oa?q="+$scope.busqueda.textoAutinst; 128 } 129 } 130 $scope.irA = function(){ 131 var path = ''; 132 var reload = false; 133 134 if ($scope.busqueda.tipo == 'Are'){ 135 path = 'area.oa?id=' + $scope.busqueda.valorSelect; 136 reload = true; 137 } 138 else if ($scope.busqueda.tipo == 'Pai'){ 139 path = 'pais.oa?id=' + $scope.busqueda.valorSelect+"&tipo=coleccion"; 140 reload = true; 141 } 142 else{ 143 if ($scope.busqueda.textoABuscar != ""){ 144 if ($scope.busqueda.tipo == 'Art'){
145 path = 'busquedaArticuloFiltros.oa?q=' + $scope.busqueda.textoABuscar; 146 } 147 else if ($scope.busqueda.tipo == 'Aut'){ 148 path = 'BusquedaAutorPorNombre.oa?filtBuscar=' + $scope.busqueda.textoABuscar; 149 } 150 else if ($scope.busqueda.tipo == 'Rev'){ 151 path = 'BusquedaRevistaPorNombre.oa?q=' + $scope.busqueda.textoABuscar; 152 } 153 else if ($scope.busqueda.tipo == 'Ins'){ 154 path = 'BusquedaInstitucionPorNombre.oa?b=' + $scope.busqueda.textoABuscar; 155 } 156 reload = true; 157 } 158 } 159 160 if (reload){ 161 window.location.href = path; 162 } 163 }; 164 $scope.findPandemics = function(){ 165 window.location.href = 'http://semantic.redalyc.org/epidemics/#/busqueda-general/' + $scope.busqueda.textoABuscarPandemics; 166 }; 167 168 169 170 $scope.institucionesBuscadas = []; 171 $scope.currentPage = 0; 172 $scope.pageSize = 5; 173 $scope.buscarInstituciones = function(){ 174 $http({ 175 url:"service/r2020/getInstitutions/" + $scope.busquedaInstituciones.nombreABuscar + "/1/50/0/default", 176 method:"GET" 177 }).then(function(response){ 178 $scope.institucionesBuscadas.length = 0; 179 for (var i = 0; i < response.data.resultados.length; i++){ 180 $scope.institucionesBuscadas.push({"key": response.data.resultados[i].clave, "name": response.data.resultados[i].nombre}); 181 } 182 $scope.institucionesBuscadas.length > 0 ? $scope.flag=false : $scope.flag=true; 183 },function(response){ 184 $scope.institucionesBuscadas.length = 0; 185 }); 186 } 187 188 $scope.getData = function () { 189 return $scope.institucionesBuscadas; 190 } 191 192 $scope.numberOfPages=function(){ 193 return Math.ceil($scope.getData().length/$scope.pageSize); 194 } 195 196 $scope.getLast = function(){ 197 var last = $scope.pageSize * ($scope.currentPage + 1); 198 return (last > $scope.institucionesBuscadas.length) ? $scope.institucionesBuscadas.length : last; 199 200 } 201 if(localStorage["lang"] == undefined){ 202 $scope.update = false; 203 localStorage.setItem("lang","es"); 204 } 205 206 $scope.refresh = function(){ 207 document.getElementById("item-seleccionado").value = "Art"; 208 $scope.busqueda.tipo = "Art"; 209 } 210 211 212 213 $scope.setTooltips = function(){ 214 tooltips = $scope.t.tooltips; 215 $("#input-articulo").attr("placeholder",$scope.t.select.placeholder); 216 $("#input-articulo-pandemics").attr("placeholder",$scope.t.select.placeholderPandemics); 217 $("#box-autor-nombre").attr("placeholder",$scope.t.select.placeholderAutnon); 218 $("#box-autor-inst").attr("placeholder",$scope.t.select.placeholderAutinst); 219 $("input#numbernews").val($scope.t.redalyc.icons.news); 220 $("input#reconsText").val($scope.t.header.reconslabel); 221 } 222 $scope.traducir = function(lang){ 223 lang=lang=="pt" ? "es" : lang; 224 localStorage.setItem("lang", lang); 225 $scope.pageLanguaje=lang; 226 $http.get("/redalyc/jsons/traducciones/home-"+lang+".json").then(function (data){ 227 //agregamos la informacion dle documento al scope 228 $scope.t = data.data; 229 console.log('data traducción', $scope.t) 230 $scope.refresh(); 231 if($scope.update){ 232 $scope.cienciasSociales = []; 233 $scope.cienciasNaturalesYExactas = []; 234 $scope.arteYHumanidades = []; 235 } 236 $scope.update = true; 237 $scope.setTooltips(); 238 (jQuery)("#overlay").attr("style","display:none"); 239 (jQuery)("#loading").attr("style","display:none"); 240 241 }).catch(function(status){ 242 console.log("Error - No se puede abrir el archivo"); 243 }); 244 } 245 $(document).ready(function(){ 246 //MapAutores("chartdiv2"); 247 if(screen.width <= 600){ 248 $scope.tamScreen="movil"; 249 console.log("movil"); 250 }else{ 251 $scope.tamScreen="pantalla"; 252 } 253 if($scope.tamScreen=="movil"){ 254 if($scope.pageLanguaje=="en"){ 255 $(".background-LAreferencia").click(function(evt){ 256 window.open("http://amelica.org/index.php/en/2022/08/17/redalyc-la-referencia-redclara-collaboration/", "_blank"); 257 }); 258 }else if($scope.pageLanguaje=="es"){ 259 $(".background-LAreferencia").click(function(evt){ 260 window.open("http://amelica.org/index.php/2022/08/16/colaboracion-redalyc-la-referencia-redclara/", "_blank"); 261 }); 262 } 263 } 264 }); 265 //Invocamos la metodo traducir 266 $scope.traducir(localStorage["lang"]); 267 })(jQuery); 268 $scope.urlVideos = function(urlVi) { 269 $scope.urlVideo = $sce.trustAsResourceUrl(urlVi); 270 } 271 272 $scope.openNav = function () { 273 document.getElementById("mySidepanel").classList.add("open"); 274 document.getElementById("menuResp").classList.add("expand"); 275 document.getElementById("abrir").classList.add("ocultar"); 276 } 277 278 $scope.closeNav = function () { 279 document.getElementById("mySidepanel").classList.remove("open"); 280 document.getElementById("menuResp").classList.remove("expand"); 281 document.getElementById("abrir").classList.remove("ocultar"); 282 } 283 284}); 285 286appHome.filter('startFrom', function() { 287 return function(input, start) { 288 start = +start; 289 return input.slice(start); 290 } 291}); 292 293 294function MapAutores(div) { 295 var map = AmCharts.makeChart(div, { 296 "type" : "map", 297 "zoomOnDoubleClick" : false, 298 "dataLoader" : { 299 "url" : "/redalyc/jsons/mapa/mapAutores.json", 300 "format" : "json" 301 }, 302 "areasSettings" : { 303 "color" : "#A4A4A4", 304 "selectedColor" : "#CC0000", 305 "balloonText" : "[[title]] [[customData]]" 306 }, 307 "zoomControl" : { 308 "zoomControlEnabled" : false, 309 "homeButtonEnabled" : false 310 } 311 }); 312} 313 314function getParametroURL(parametro){ 315 var parametros = window.parent.location.search.substring(1).split('&'); 316 317 for (var i = 0; i < parametros.length; i++){ 318 if (parametros[i].indexOf(parametro + '=') != -1){ 319 return decodeURI(parametros[i].split('=')[1]); 320 } 321 } 322 return ""; 323}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.