1//jQuery.noConflict(); 2 3 4if(typeof sIFR == "function"){ sIFR(); }; 5 6//jQuery 7jQuery(function(){ 8 9/////////////////////////////////////////////////////////////////////// 10// LAYOUT FUNCTIONS 11/////////////////////////////////////////////////////////////////////// 12 13 //PESQUISA 14 jQuery("input[ClientID='txtQuery']").focus(function(){ 15 if(jQuery(this).val()=='Pesquisa') jQuery(this).val(''); 16 }); 17 jQuery("input[ClientID='txtQuery']").blur(function(){ 18 if(!jQuery(this).val()) jQuery(this).val('Pesquisa'); 19 }); 20 21 22 23// //TABS 24// jQuery('ul.tabs li a').click(function(){ 25// jQuery('ul.tabs li a').removeClass('on'); 26// jQuery(this).toggleClass('on'); 27// var url = jQuery(this).attr('href'); 28// jQuery('.tabs_contents').fadeOut('fast', function(){ 29// jQuery(this).load(url+' .tabs_contents').fadeIn('fast'); 30// }); 31// return false; 32// }); 33 34// function tabToggles(){ 35// jQuery('dl.accordeon dd').hide(); 36// jQuery('dl.accordeon dd .on').show(); 37// } 38 39 var tabToggles = function(){ 40 jQuery("dl.accordeon dd").hide(); 41 jQuery("dl.accordeon dd .on").show(); 42 } 43 44// //TABS WIDE 45// jQuery('ul.tabs_wide li a').click(function(){ 46// jQuery('ul.tabs_wide li a').removeClass('on'); 47// jQuery(this).toggleClass('on'); 48// var url = jQuery(this).attr('href'); 49// jQuery('.tabs_wide_contents').fadeOut('fast', function(){ 50// jQuery(this).load(url+' .tabs_wide_contents', tabsWideToggles).fadeIn('fast'); 51// }); 52// return true; 53// }); 54 55// function tabsWideToggles(){ 56// jQuery('ul.table li .content').hide(); 57// jQuery('ul.table li .on').show(); 58// } 59 60 var tabsWideToggles = function(){ 61 //ACCORDEON 62 jQuery("div.accordeon:not('.on') a").addClass("off"); 63 jQuery("div.content:not('.on')").hide(); 64 //HIGHLIGHTS 65 jQuery(".highlight tr:visible:odd td").addClass("alternate"); 66 jQuery("table.highlight_basic_odd").highlightBasic("odd"); 67 jQuery("table.highlight_basic_even").highlightBasic("even"); 68 //CARTEIRAS 69 jQuery(".carteira:not('.on') a, .total:not('.on')").toggleClass("off"); 70 jQuery(".div_carteira_fundo_movimentos:not('.on')").hide(); 71 jQuery("th.fundo").toggleClass("off"); 72 } 73 74 //ACCORDEON DEFINITION LIST 75 jQuery('dl.accordeon dt a').toggleClass('off'); 76 jQuery('dl.accordeon dd').hide(); 77 jQuery('dl.accordeon dd .on').show(); 78 jQuery('dl.accordeon dt a').livequery('click', function(event){ 79 jQuery(this).parent().next().slideToggle("fast"); 80 jQuery(this).toggleClass('off'); 81 return false; 82 }); 83 84 //ACCORDEON TABLE 85 jQuery('ul.table li .accordeon').toggleClass('off'); 86 jQuery('div.total').toggleClass('off'); 87 jQuery('ul.table li .content').hide(); 88 jQuery('ul.table li .on').show().toggleClass('off'); 89 jQuery('ul.table li .accordeon').livequery('click', function(event){ 90 jQuery(this).next().slideToggle("fast"); 91 jQuery(this).toggleClass('off').prev('div.total').toggleClass('off'); 92 return false; 93 }); 94 95 //ACCORDEON TABLE (NEW) 96 jQuery("div.accordeon:not('.on') a").toggleClass("off"); 97 jQuery("div.content:not('.on')").hide(); 98 jQuery("div.accordeon a").livequery("click", function(event){ 99 event.preventDefault(); 100 jQuery(this).toggleClass("off").parent("div").next(".content").slideToggle(); 101 }); 102 103 //DATEPICKER 104 if(typeof jQuery.datepicker == 'object'){ 105 jQuery('input.picker').livequery(function(){ 106 jQuery('input.picker').datepicker(); 107 jQuery('input.picker').click(function() { 108 jQuery(this).datepicker({ showOn: 'focus' }).focus(); 109 }); 110 jQuery('button.picker').click(function(){ 111 jQuery(this).prev().datepicker('show'); 112 }); 113 }); 114 } 115 // rpinto 116 if (typeof jQuery.datepicker == 'object') { 117 jQuery(".datepicker").datepicker({ 118 dateFormat: "dd.mm.yy", changeMonth: true, changeYear: true 119 }); 120 jQuery("button.picker").click(function () { 121 $(this).prev().datepicker('show'); 122 }) 123 } 124 125 //AUTOFILL DATES 126 jQuery.fn.dateAutoFill = function(){ 127 var currentDate = new Date(); 128 var day = currentDate.getDate() 129 var month = currentDate.getMonth() 130 var year = currentDate.getFullYear() 131 if(day<10) day = '0'+day; 132 month = month + 1; 133 if(month<10) month = '0'+month; 134 jQuery("input[name='start']").livequery(function(){ 135 if(!jQuery(this).val()) jQuery(this).val(day + '.' + month + '.' + (year-1)); 136 }); 137 jQuery("input[name='end']").livequery(function(){ 138 if(!jQuery(this).val()) jQuery(this).val(day + '.' + month + '.' + year); 139 }); 140 } 141 142 /* 143 //SORT 144 var last_set_class = 'ascending'; 145 jQuery(".sort th").livequery('click', function(){ 146 if(jQuery(this).hasClass('ascending') ){ 147 jQuery(this).parent().children('th').removeClass('ascending descending'); 148 jQuery(this).addClass('descending'); 149 last_set_class = 'descending'; 150 } 151 else if(jQuery(this).hasClass('descending')){ 152 jQuery(this).parent().children('th').removeClass('ascending descending'); 153 jQuery(this).addClass('ascending'); 154 last_set_class = 'ascending'; 155 } 156 else if(!jQuery(this).hasClass('ascending') && !jQuery(this).hasClass('descending')){ 157 jQuery(this).parent().children('th').removeClass('ascending descending'); 158 jQuery(this).addClass(last_set_class); 159 } 160 return false; 161 }); 162*/ 163 164 //HIGHLIGHT 165 jQuery(".highlight tr.coluna:visible:odd td").addClass('alternate'); 166 jQuery(".highlight tr.coluna td").hover( 167 function(){ 168 table_id = jQuery(this).parents('table').attr('id'); 169 var i = jQuery(this).parent('tr.coluna').children('td').index(this); 170 jQuery(this).parent('tr.coluna').children('td').removeClass('alternate').addClass('highlight_bg'); 171 jQuery(this).addClass('highlight_this'); 172 jQuery('#'+table_id+' tr.coluna').each(function(){ 173 jQuery(this).children().each(function(n){ 174 if(n==i) jQuery(this).removeClass('alternate').addClass('highlight_bg'); 175 }); 176 }); 177 }, 178 function(){ 179 jQuery(this).removeClass('highlight_this'); 180 jQuery('#'+table_id+' tr.coluna').children().removeClass('highlight_bg'); 181 jQuery('#'+table_id+' tr.coluna:visible:odd td').addClass('alternate'); 182 } 183 ); 184 185 //HIGHLIGHT BASIC 186 jQuery.fn.highlightBasic = function(mode){ 187 jQuery(this).each(function(){ 188 jQuery(this).find("tr:"+mode+" td").addClass("alternate"); 189 }); 190 } 191 jQuery("table.highlight_basic_odd").highlightBasic("odd"); 192 jQuery("table.highlight_basic_even").highlightBasic("even"); 193 194 //CHECKBOXES AND RADIOBUTTONS 195 jQuery.fn.check = function(mode) { 196 var mode = mode || "on"; // if mode is undefined, use 'on' as default 197 return this.each(function(){ 198 switch(mode) { 199 case "on": 200 this.checked = true; 201 break; 202 case "off": 203 this.checked = false; 204 break; 205 case "toggle": 206 this.checked = !this.checked; 207 break; 208 } 209 }); 210 } 211
212/////////////////////////////////////////////////////////////////////// 213// LOGIN 214/////////////////////////////////////////////////////////////////////// 215 216 //LOGIN 217 if(jQuery("#header form.login").length){ 218 //ACTION 219 jQuery("a[rel='login']").click(function(){ 220 jQuery('#keyboard').removeClass('password').addClass('login'); 221 jQuery("#header form.login h3").html('Login'); 222 jQuery('div.buttons .user, div.buttons .login').fadeOut(); 223 jQuery('#header div.text form').hide(); 224 jQuery('#header div.text').show(); 225 jQuery('#header form.login').fadeIn(); 226 return false; 227 }); 228 //SUBMIT 229 jQuery("#header form.login").submit(function(){ 230 //VALIDATION 231 jQuery("#header form.login").validate({ 232 errorPlacement: function(error, element) { error.appendTo( element.prev().prev("label") ); }, 233 errorElement: "span", 234 rules: { 235 email: { required: true, email: true }, 236 password: { required: true, minlength: 6 } 237 }, 238 messages: { 239 email: { required: " (obrigatório)", email: " (e-mail inválido)" }, 240 password: { required: " (obrigatório)", minlength: " (mínimo 6 caracteres)" } 241 } 242 }); 243 if(jQuery("#header form.login").valid()){ 244 //hide_vkb(); 245 jQuery('#header form.login').fadeOut(function(){ 246 jQuery('div.loading').fadeIn(function(){ 247 //TODO: SUBSTITUIR POR LOGIN VERDADEIRO EM AJAX 248 jQuery('div.loading').animate({opacity: 1.0}, 2000).fadeOut(function(){ 249 if(location.href.indexOf('homepage/index_login_erro.html')>-1){ 250 jQuery("#header form.login").fadeIn(); 251 jQuery("#header form.login h3").append('<span class="error"> (dados de login inválidos!)</span>'); 252 } 253 else location.href='../homepage/index_login.html'; 254 }); 255 }); 256 }); 257 } 258 return false; 259 }); 260 } 261 262 //PASSWORD_RECOVERY 263 if(jQuery("#header form.password").length){ 264 //ACTION 265 jQuery("a[rel='password']").click(function(){ 266 //hide_vkb(); 267 jQuery('#header form.login').fadeOut('fast', function(){ 268 jQuery("#header form.password p").html('Indique o e-mail com que se registou.'); 269 jQuery("#header form.password label").show(); 270 jQuery("#header form.password input").val('').show(); 271 jQuery('#keyboard').addClass('password'); 272 jQuery('#header form.password').fadeIn(); 273 }); 274 return false; 275 }); 276 } 277 //SUBMIT 278 jQuery("#header form.password").submit(function(){ 279 //VALIDATION 280 jQuery("#header form.password").validate({ 281 errorPlacement: function(error, element) { error.appendTo( element.prev().prev("label") ); }, 282 errorElement: "span", 283 rules: { 284 email: { required: true, email: true } 285 }, 286 messages: { 287 email: { required: " (obrigatório)", email: " (e-mail inválido)" } 288 } 289 }); 290 if(jQuery("#header form.password").valid()){ 291 //hide_vkb(); 292 jQuery('#header form.password').fadeOut(function(){ 293 jQuery('div.loading').fadeIn(function(){ 294 //TODO: SUBSTITUIR POR RECUPERAÃÃO VERDADEIRA EM AJAX 295 jQuery('div.loading').animate({opacity: 1.0}, 2000).fadeOut(function(){ 296 jQuery("#header form.password p").html('Irá receber um email com os seus dados de login.'); 297 jQuery("#header form.password input, #header form.password label").hide(); 298 jQuery("#header form.password").fadeIn(); 299 jQuery("div.buttons .login").fadeIn(); 300 }); 301 }); 302 }); 303 } 304 return false; 305 }); 306}); 307 308/////////////////////////////////////////////////////////////////////// 309// VIRTUAL KEYBOARD 310/////////////////////////////////////////////////////////////////////// 311function show_vkb(){ 312 jQuery(function(jQuery) { 313 314// jQuery("#divHtmlBottomButtons:visible").fadeOut('fast'); 315// 316// if(jQuery("#header form.login").length || jQuery("#header form.password").length) jQuery(".buttons:visible").fadeOut('fast'); 317// jQuery(".keyboard_spacer:hidden").slideToggle(function(){ 318// jQuery('#keyboard:hidden').fadeIn('fast'); 319// }); 320// }); 321 //remoção do slide do botão de login devido ao teclado virtual ter sido movido de localização 322 //RPinto - 2010-04-12 323 if (jQuery("#header form.login").length || jQuery("#header form.password").length) jQuery(".buttons:visible").fadeOut('fast'); 324 jQuery('#keyboard:hidden').fadeIn('fast'); 325 }); 326}
327function hide_vkb(){ 328 jQuery(function(jQuery){ 329 330// jQuery("#divHtmlBottomButtons:hidden").fadeIn('fast'); 331 332// jQuery('#keyboard:visible').fadeOut('fast', function(){ 333// jQuery('.keyboard_spacer:visible').slideToggle(function(){ 334// if(jQuery("#header form.login").length || jQuery("#header form.password").length) jQuery(".buttons:hidden").fadeIn('fast'); 335// }); 336// }); 337// }); 338 //remoção do slide do botão de login devido ao teclado virtual ter sido movido de localização 339 //RPinto - 2010-04-12 340 jQuery('#keyboard:visible').fadeOut('fast', function() { 341 if (jQuery("#header form.login").length || jQuery("#header form.password").length) jQuery(".buttons:hidden").fadeIn('fast'); 342 }); 343 }); 344}
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.