Skip to content

Commit

Permalink
Merge branch 'master_devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
sikora committed Apr 18, 2012
2 parents 2fe1fad + 068f6e9 commit 6061d01
Show file tree
Hide file tree
Showing 44 changed files with 23,646 additions and 230 deletions.
2 changes: 1 addition & 1 deletion Acao/acao.conf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</session>

<Model::Sedna>
url 172.30.116.22
url 172.31.4.2
db_name AcaoDb
login acao
password 12345
Expand Down
13 changes: 9 additions & 4 deletions Acao/lib/Acao/Model/XSD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ txn_method 'link_xsd' => authorized $role_listar => sub {
or not(boolean($x/xs:schema/xs:element/xs:annotation/xs:appinfo/cl:classificacoes/@validacao/string()))
order by $x/xs:schema/xs:element/xs:annotation/xs:appinfo/xhtml:label/text()
return ' . $xqueryret;

$self->sedna->execute($xq);
my $ret;
while ( my $item = $self->sedna->get_item() ) {
Expand Down Expand Up @@ -133,15 +133,20 @@ sub get_filter_classificacoes {
}

my @classificacoes = keys %classificacoes;
my $filter = join ' or ', map { 'cl:classificacao eq "' . $_ . '"' }
my $filter = join ' or ', map { 'cl:classificacao = "' . $_ . '"' }
map {
/$assuntos_dn$/
? substr( $_, 0, 0 - length($assuntos_dn) - 1 )
: $_
}
map { s/^\s+|\s+$//gs; $_ } @classificacoes;
map { s/^\s+|\s+$//gs; $_ } @classificacoes;


# acrescentando for mais interno para filtrar por N classificações
# 'for $y in $x'
#
$filter =
'[xs:schema/xs:element/xs:annotation/xs:appinfo/cl:classificacoes['
' for $y in $x[xs:schema/xs:element/xs:annotation/xs:appinfo/cl:classificacoes['
. $filter . ']]'
if $filter;

Expand Down
2 changes: 1 addition & 1 deletion Acao/root/auth/admin/schema/lista_xqueryret.tt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{$x/xs:element/xs:annotation/xs:appinfo/*/text()}
</td>
<td>
{replace($x/xs:element/xs:annotation/xs:appinfo/class:classificacoes/class:classificacao/text(),"cn="," ")}

</td>
<td>
{replace($x/@targetNamespace/string(), "^.*?_*v*(\d*)\.xsd.*$" , "$1")}
Expand Down
8 changes: 4 additions & 4 deletions Acao/root/static/js/xsdForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function getQtdNodeByName(xmlNode,numType,tagName) {

function static_type(type) {
if ( type == "xs:string" ||
type == "cpf" ||
type == "cadastroCPF" ||
type == "xs:float" ||
type == "xs:integer" ||
type == "xs:date" ||
Expand Down Expand Up @@ -845,13 +845,13 @@ function generateFormField(tagRaiz, xmlNode, type, namePattern, minOccurs, maxOc

var name = getValueAttributeByName(xmlNode, "name");
var inputName = namePattern + "__" + name;

var field;

if ( type == "xs:string" ) {
field = createFieldString(inputName, minOccurs, maxOccurs);
} else if ( type == "xs:float" ) {
field = createFieldFloat(inputName, minOccurs, maxOccurs);
} else if ( type == "cpf" ) {
} else if ( type == "cadastroCPF" ) {
field = createInput('text', inputName, inputName, '255', '[0-9]+');
} else if ( type == "xs:decimal" ) {
field = createFieldDecimal(inputName, minOccurs, maxOccurs);
Expand Down Expand Up @@ -1075,7 +1075,7 @@ function validateValue(type, value) {
return validateDate(value);
} else if (type == "xs:dateTime") {
return validateDateTime(value);
} else if (type == "cpf") {
} else if (type == "cadastroCPF") {
return verificaCPF(value);
} else {
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:class="http://schemas.fortaleza.ce.gov.br/acao/classificacao.xsd"
xmlns:idx="http://schemas.fortaleza.ce.gov.br/acao/indexhint.xsd"
xmlns:xsdext="http://schemas.fortaleza.ce.gov.br/xsdform/extensions.xsd"
xmlns="http://schemas.fortaleza.ce.gov.br/acao/coordenadoriajuventude-cadastro-org_mov_est.xsd"
targetNamespace="http://schemas.fortaleza.ce.gov.br/acao/coordenadoriajuventude-cadastro-org_mov_est.xsd"
elementFormDefault="qualified">

<xs:element name="OrganizacoesEst" type="OrganizacoesEst">
<xs:annotation>
<xs:appinfo>
<xhtml:label> FICHA DE CADASTRO DAS ORGANIZAÇÕES E MOVIMENTOS DE JUVENTUDE</xhtml:label>
<class:classificacoes>
<class:classificacao>cn=Juventude</class:classificacao>
</class:classificacoes>
<idx:index>
<idx:hint key="pessoa.nome" xpath="formPoliticaJuventude/nome" />
<idx:hint key="pessoa.nome" xpath="formPoliticaJuventude/nomeMae" />
</idx:index>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:complexType name="OrganizacoesEst">
<xs:sequence>
<xs:element name="organizacao" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Nome da Organização/SIGLA</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="endereco" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Endereço</xhtml:label>
</xs:appinfo>
<xsdext:extensions>
<xsdext:engine>autoComplete</xsdext:engine>
<xsdext:service>/logradouros</xsdext:service>
</xsdext:extensions>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="bairro" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Bairro</xhtml:label>
</xs:appinfo>
<xsdext:extensions>
<xsdext:engine>autoComplete</xsdext:engine>
<xsdext:service>/bairros</xsdext:service>
</xsdext:extensions>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="cidade" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Cidade</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="cep" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>CEP</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="fone" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Telefone</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="email" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Email</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="site" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Site</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="blog" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Blog</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="anoFundacao" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>Ano de fundação</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="cnpj" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>cnpj</xhtml:label>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

6 changes: 3 additions & 3 deletions acao-sde/sde-cadastroBeneficiados.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
</xs:annotation>
</xs:element>

<xs:complexType name="cpf">
<xs:complexType name="cadastroCPF" >
<xs:sequence>
<xs:element name="cpf" minOccurs="1">
<xs:element name="cpf" minOccurs="0">
<xs:annotation>
<xs:appinfo>
<xhtml:label>CPF</xhtml:label>
Expand Down Expand Up @@ -97,7 +97,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="cpf" type="cpf">
<xs:element name="cpf" type="cadastroCPF" minOccurs="1">
<xs:annotation>
<xs:appinfo>
<xhtml:label>CPF</xhtml:label>
Expand Down

This file was deleted.

Loading

0 comments on commit 6061d01

Please sign in to comment.