1 2var showMenu = function (e) { 3 //jQuery(e.target).toggleClass('active'); 4 jQuery('.nav-menu').addClass('active'); 5 console.log('mostrar menu oculto'); 6 7 e.preventDefault(); 8 e.stopPropagation(); 9 10 // Se vinvula aqu� el click fuera del menu, y se desvincula al cerrar o al clicar fuera 11 jQuery(document).on("click.outmenu", function(event) 12 { 13 console.log('se ha hecho un click en el documento'); 14 var $trigger = jQuery("#nav-menu"); 15 if (event.target.id !== 'nav-menu' && !$trigger.has(event.target).length && $trigger.hasClass('active')) 16 { 17 console.log("-> Se ha clicado fuera de un MENU"); 18 jQuery('.nav-menu').removeClass('active'); 19 20 jQuery(document).off("click.outmenu"); 21 } 22 }); 23 24} 25var hideMenu = function (e) { 26 jQuery('.nav-menu').removeClass('active'); 27 e.preventDefault(); 28 e.stopPropagation(); 29 30 jQuery(document).off("click.outmenu"); 31} 32 33jQuery(document).ready(function() 34{ 35// jQuery(document).on('click','#toggle-menu',showMenu); 36// jQuery(document).on("click",'.strip > a',hideMenu); 37 38/* Se pone que si se clica fuera de un flotante se 39 jQuery(document).on("click", function(event) 40 { 41 var $trigger2 = jQuery(".flotante"); 42 if (!$trigger2.has(event.target).length) 43 { 44 console.log("-> Se ha clicado fuera de un flotante"); 45 jQuery.each(jQuery('.flotantes .flotante'),function( i, flo ){ 46 47 var element = jQuery(flo).detach(); 48 jQuery('#' + element.data('parent')).append(element); 49 }); 50 } 51 }); 52 */ 53 54 // Sprites Icones 55 56// jQuery.get( "/sta/icons/symbol-defs.svg", function(data) { 57// var div = document.createElement("div"); 58// div.innerHTML = new XMLSerializer().serializeToString(data.documentElement); 59// document.body.insertBefore(div, document.body.childNodes[0]); 60// }); 61 62/* 63 jQuery.get( "/sta/icons/symbol-defs.svg", function(data) { 64 65 document.querySelector('meta[name="version"]').content 66 67 jQuery.ajax({ 68 url: "/sta/upload?getresource=icons", 69 success: function(data) { 70 var div = document.createElement("div"); 71 div.innerHTML = new XMLSerializer().serializeToString(data.documentElement); 72 document.body.insertBefore(div, document.body.childNodes[0]); 73 }, 74 cache: true 75 }); 76---------------------------------*/ 77 78 var ajax = new XMLHttpRequest(); 79 //ajax.open("GET", "/sta/icons/symbol-defs.svg", true); 80 ajax.open("GET", "/sta/upload?getresource=icons&md5=" + document.querySelector('meta[name="packiconsMD5"]').content, true); 81 ajax.send(); 82 ajax.onload = function(e) { 83 var div = document.createElement("div"); 84 div.innerHTML = ajax.responseText; 85 document.body.insertBefore(div, document.body.childNodes[0]); 86 } 87 88 89 90 replaceIMGSVG('body'); 91 92 console.log('svgs done!!!'); 93}); 94 95function replaceIMGSVG(root) 96{ 97 /* Replace all SVG images with inline SVG */ 98// jQuery(root + ' img[src$=".svg"]').each(function(){ 99// var $img = jQuery(this); 100// var imgID = $img.attr('id'); 101// var imgClass = $img.attr('class'); 102// var imgURL = $img.attr('src'); 103// 104// jQuery.get(imgURL, function(data) { 105// // Get the SVG tag, ignore the rest 106// var $svg = jQuery(data).find('svg'); 107// 108// // Add replaced image's ID to the new SVG 109// if(typeof imgID !== 'undefined') { 110// $svg = $svg.attr('id', imgID); 111// } 112// // Add replaced image's classes to the new SVG 113// if(typeof imgClass !== 'undefined') { 114// $svg = $svg.attr('class', imgClass+' replaced-svg'); 115// } 116// 117// // Remove any invalid XML tags as per http://validator.w3.org 118// $svg = $svg.removeAttr('xmlns:a'); 119// 120// // Replace image with new SVG 121// $img.replaceWith($svg); 122// 123// console.log('svg replaced ' + imgID); 124// 125// }, 'xml'); 126// }); 127} 128 129 130 131function setFlotantesResponsive() 132{ 133 jQuery(".ui-tooltip-content").parents('div').remove(); 134 onCesta = false; 135 136 setFlotanteResponsive('#userNav','#contenedorUsuario'); 137 setFlotanteResponsive('#cestaNav','#contenedorCesta'); 138 setFlotanteResponsive('#mensajesNav','#contenedorListaMensajes'); 139 140 /* 141 // si hay gestion de cesta
142 if (jQuery('#cestaNav')[0] != null) 143 { 144 if (jQuery('#contenedorCesta tr.numberMark').size() > 0) 145 { 146 var localID = ++accionesCesta; 147 //console.log('Marcar NUMERO action:' + accionesCesta); 148 var obj = jQuery('#contenedorCesta tr.numberMark td.numElementos'); 149 var value = obj.text(); 150 obj.html('<span>' + value + '</span>'); 151 mostrarCesta(); 152 var origen = jQuery('#numeroCesta'); 153 origen.effect('transfer',{ to: '#contenedorCesta tr.numberMark td.numElementos', className: 'transfer' }, 500, function(){ 154 blink('#contenedorCesta tr.numberMark td.numElementos span', 4000,function(){if (localID == accionesCesta) ocultarCesta(true);}); 155 }); 156 } 157 158 if (jQuery('#contenedorCesta tr.rowMark').size() > 0) 159 { 160 var localID = ++accionesCesta; 161 //console.log('Marcar FILA action:' + accionesCesta); 162 var obj = jQuery('#contenedorCesta tr.rowMark td.numElementos'); 163 var value = obj.text(); 164 obj.html('<span>' + value + '</span>'); 165 mostrarCesta(); 166 //jQuery('#numeroCesta').effect('transfer',{ to: '#contenedorCesta tr.numberMark', className: 'transfer' }, 1000, function(){} ); 167 jQuery('#contenedorCesta tr.rowMark td').hide().delay(600).fadeIn(1200); 168 blink('#contenedorCesta tr.rowMark td.numElementos span', 5000,function(){if (localID == accionesCesta) ocultarCesta(true);}); 169 170 //jQuery('#numeroCesta').effect('transfer',{ to: '#contenedorCesta tr.rowMark td.numElementos span', className: 'transfer' }, 1000, function(){} ); 171 172 } 173 } 174 */ 175} 176 177function setFlotanteResponsive(disparador,contenido) 178{ 179 var disparador = jQuery(disparador); 180 var contenido = jQuery(contenido) 181 var flotantesContaniner = jQuery('.flotantes'); 182 if (disparador[0] != null && contenido[0] != null ) 183 { 184 var config = { 185 over: function(){ 186 console.log("Se dispara el over:"); 187 jQuery.each(jQuery('.flotantes .flotante'),function( i, flo ){ 188 console.log("-> Se recolocan en su sitio lo contenidos"); 189 var element = jQuery(flo).detach(); 190 jQuery('#' + element.data('parent')).append(element); 191 }); 192 193 console.log("Se resetean los navItemStopOn:"); 194 jQuery('.navItem').removeClass('navItemStopOn'); 195 196 /* 197 if (contenido!= jQuery('#contenedorUsuario')) 198 { 199 //jQuery('#contenedorUsuario').hide(); 200 jQuery('#userNav').removeClass('navItemStopOn'); 201 var element = contenido.detach(); 202 jQuery('#userNav').append(element); 203 } 204 if (contenido!= jQuery('#contenedorCesta')) 205 { 206 //jQuery('#contenedorCesta').hide().removeClass('AlertOn'); 207 jQuery('#cestaNav').removeClass('navItemStopOn'); 208 var element = contenido.detach(); 209 jQuery('#cestaNav').append(element); 210 } 211 if (contenido!= jQuery('#contenedorListaMensajes')) 212 { 213 //jQuery('#contenedorListaMensajes').hide(); 214 jQuery('#mensajesNav').removeClass('navItemStopOn'); 215 var element = contenido.detach(); 216 jQuery('#mensajesNav').append(element); 217 } 218 */ 219 if (flotantesContaniner.is(":visible")) 220 { 221 console.log("Se reubica el Contenido"); 222 var element = contenido.detach(); 223 flotantesContaniner.append(element); 224 } 225 226 console.log("Se a�ade el class para mostrarlo si esta en el navitem"); 227 disparador.addClass('navItemStopOn'); 228 229 230 if (contenido.prop('id') == jQuery('#contenedorCesta').prop('id')) 231 { 232 onCesta = true; 233 //console.log('disparador de cesta, onCesta = ' + onCesta); 234 } 235 } 236 , 237 timeout: 500, // number = milliseconds delay before onMouseOut 238 out: function () { 239 console.log("Se dispara el salir:"); 240 241 /* 242 if (contenido.prop('id') == jQuery('#contenedorCesta').prop('id')) 243 { 244 245 //console.log('OCultar cesta por evento OUT, checkk onCesta = ' + onCesta); 246 //ocultarCesta(false); 247 // exceptuando el caso de timer estando en la cesta, los demas se quita. 248 disparador.removeClass('navItemStopOn'); 249 contenido.removeClass('AlertOn'); 250 onCesta = false; 251 } 252 else 253 { 254 255 disparador.removeClass('navItemStopOn'); 256 contenido.removeClass('AlertOn'); 257 } 258 */ 259 260 261 if (flotantesContaniner.is(":visible")) 262 { 263 if (!contenido.is(':hover')) 264 { 265 var element = contenido.detach(); 266 jQuery('#' + element.data('parent')).append(element); 267 } 268 } 269 else 270 { 271 272 273 //var element = contenido.detach(); 274 //jQuery('#' + element.data('parent')).append(element); 275 } 276 if (contenido.is(':hover')) 277 console.log('Se quita el navItem pero se est� hover!!!'); 278 disparador.removeClass('navItemStopOn'); 279 contenido.removeClass('AlertOn'); 280 281 282 } 283 }; 284 disparador.hoverIntent(config); 285 } 286} 287
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.