PageSourceSearch

http://festas2012.sanjoaninas.com/_vo/scripts/funcsAux.js

js sanjoaninas.com collected 2026-10-02 14:24:12 UTC 1,373 bytes, 43 lines download raw bytes

1/**
2 * Retornar todos os elementos de um form
3 * @param form mixed  Id do objecto form ou o proprio objecto
4 * @param csselems string  Selectores css dos elemtnos a seleccionar,
5 * por defeito retorna todos inputs excepto do tipo submit, textareas e selects
6 */
7function funcsAuxRetElemsForm(form, cssElems){
8  if(!cssElems)
9    cssElems='input:not([type=submit]), select, textarea';
10  form=$(form);
11  var elems=form ? form.getElements(cssElems) : [];
12  return elems;
13}
14
15/**
16 * Deseleccionar todas as options seleccionadas
17 */
18function funcsAuxDeSeleccionarOptions(idSelect){
19  $(idSelect).getSelected().each(function(opcao){opcao.selected=false});
20}
21/**
22 * Seleccionar determinadas options de  um select
23 *
24 * @param idSelect string  Id do objecto select ou o proprio objecto
25 * @param optionsASelecc Array  Valores das options a seleccionar
26 * @param seleccionar bool Se true selecciona, se false deselecciona
27 */
28function funcsAuxSeleccionarOptions(idSelect, optionsASelecc, seleccionar){
29  var aSeleccionar=
30       $(idSelect).getElements('option').filter(
31        function(obj){
32          return optionsASelecc.contains(obj.value);
33        });
34  aSeleccionar.each(function(opcao){opcao.selected=seleccionar});
35}
36/**
37* Retorna o equivalente ao URL_SITE que usamos em php
38*
39* @return string
40*/
41function funcsAuxUrlSite(){
42	return location.protocol+'//'+location.host;
43}

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.