diff --git a/.includepath b/.includepath
new file mode 100644
index 0000000..3fcad69
--- /dev/null
+++ b/.includepath
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..884da94
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ otrs-new-ticket-wizard
+
+
+
+
+
+ org.epic.perleditor.perlbuilder
+
+
+
+
+
+ org.epic.perleditor.perlnature
+
+
diff --git a/CreateOpm.sh b/CreateOpm.sh
new file mode 100755
index 0000000..f533983
--- /dev/null
+++ b/CreateOpm.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+LOCAL="$PWD"
+cd /opt/otrs/bin
+./otrs.PackageManager.pl -a build -p "$LOCAL"/NewTicketWizard.sopm -o "$LOCAL"/
+cd $LOCAL
diff --git a/Kernel/Config/Files/NewTicketWizard.xml b/Kernel/Config/Files/NewTicketWizard.xml
new file mode 100644
index 0000000..92ead86
--- /dev/null
+++ b/Kernel/Config/Files/NewTicketWizard.xml
@@ -0,0 +1,213 @@
+
+
+
+
+ FrontendModuleRegistration for NewTicketWizard module.
+ Ticket
+ Frontend::Customer::ModuleRegistration
+
+
+ Module for creating custom new ticket interfaces
+ NewTicketWizard
+
+ New ticket wizard
+ New ticket
+ Action=NewTicketWizard
+ NewTicketWizard
+ Menu
+ 8400
+
+
+
+ NewTicketWizard.js
+ thirdparty/alpaca/alpaca-full.min.js
+ thirdparty/jquery-ui-1.10.3/jquery-ui.js
+ thirdparty/jquery-validate-1.11.1/jquery.validate.js
+ alpaca/alpaca-newticketwizard.css
+ alpaca/alpaca-jqueryui-newticketwizard.css
+
+
+
+
+
+
+ Frontend module registration for the agent interface.
+ Ticket
+ Frontend::Admin::ModuleRegistration
+
+
+ admin
+ Admin
+ Service forms
+ Admin
+
+ Kernel::Output::HTML::NavBarModuleAdmin
+ Service forms
+ Create and manage service forms.
+ Ticket
+ 900
+
+
+
+
+
+
+ Describe the form basic schema. See documentation for examples.
+
+ Descreva o esquema básico do formulário. Veja a documentação para maiores detalhes.
+
+ Ticket
+ Frontend::Customer::NewTicketWizard
+
+
+
+
+
+
+ Describe the form basic fields. See documentation for examples.
+
+ Descreva os campos básicos do formulário. Veja a documentação para maiores detalhes.
+
+ Ticket
+ Frontend::Customer::NewTicketWizard
+
+
+
+
+
+
+ When the queue comes from a field in the form, a prefix can be attached to the value while searching for the queue. A space is added between this and the queue name.
+
+ Prefixo para ser anexado ao valor do campo que tem a fila para enviar o chamado. Um espaço é adicionado entre o prefixo e o valor o campo.
+
+ Ticket
+ Frontend::Customer::NewTicketWizard
+
+ Primeiro nível -
+
+
+
+
+ Name of the field in the form which indicates the queue to send the form.
+ Nome do campo no formulário que indica para qual fila enviar o chamado.
+ Ticket
+ Frontend::Customer::NewTicketWizard
+
+ DF_unidade
+
+
+
+
+ Message to let the user choose a server.
+ Mensagem para o usuário selecionar um serviço.
+ Ticket
+ Frontend::Customer::NewTicketWizard
+
+ Escolha o serviço para o qual deseja suporte
+
+
+
\ No newline at end of file
diff --git a/Kernel/Language/pt_BR_NewTicketWizard.pm b/Kernel/Language/pt_BR_NewTicketWizard.pm
new file mode 100644
index 0000000..555b652
--- /dev/null
+++ b/Kernel/Language/pt_BR_NewTicketWizard.pm
@@ -0,0 +1,32 @@
+# --
+# Kernel/Modules/pt_BR_NewTicketWizard.pm - frontend module for creating custom new ticket interfaces
+# Translations
+#
+# Copyright (C) 2014 (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+package Kernel::Language::pt_BR_NewTicketWizard;
+
+use strict;
+use warnings;
+
+sub Data {
+ my $Self = shift;
+
+ $Self->{Translation}->{'Your ticket has been registered with the number: '} = 'Seu chamado foi registrado com sucesso! O número é: ';
+ $Self->{Translation}->{'New ticket wizard'} = 'Assistente de novo chamado';
+ $Self->{Translation}->{'New ticket'} = 'Novo chamado';
+ $Self->{Translation}->{'Service forms'} = 'Formulários de serviços';
+ $Self->{Translation}->{'Service form'} = 'Formulários de serviço';
+ $Self->{Translation}->{'Create and manage service forms.'} = 'Criar e gerenciar formulários de serviços';
+ $Self->{Translation}->{'Introduction'} = 'Introdução';
+ $Self->{Translation}->{'Form'} = 'Formulário';
+ $Self->{Translation}->{'Choose the service to ask for support'} = 'Escolha o serviço para o qual deseja suporte';
+ $Self->{Translation}->{'Ticket created'} = 'Chamado criado com sucesso';
+
+ return 1;
+}
+1;
\ No newline at end of file
diff --git a/Kernel/Modules/NewTicketWizard.pm b/Kernel/Modules/NewTicketWizard.pm
new file mode 100644
index 0000000..3a6f667
--- /dev/null
+++ b/Kernel/Modules/NewTicketWizard.pm
@@ -0,0 +1,320 @@
+# --
+# Kernel/Modules/NewTicketWizard.pm - frontend module for creating custom new ticket interfaces
+# Copyright (C) 2014 (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+package Kernel::Modules::NewTicketWizard;
+
+use strict;
+use warnings;
+
+use Kernel::System::ServiceForm;
+use Kernel::System::TicketWizard;
+use Kernel::System::CustomerUser;
+use Kernel::System::State;
+use Kernel::System::SystemAddress;
+use Kernel::System::Queue;
+use Kernel::System::Web::UploadCache;
+use Kernel::System::DynamicField;
+use Kernel::System::DynamicField::Backend;
+use Kernel::System::VariableCheck qw(:all);
+use Data::Dumper;
+
+sub new {
+ my ( $Type, %Param ) = @_;
+
+ # allocate new hash for object
+ my $Self = {%Param};
+ bless( $Self, $Type );
+
+ # check needed objects
+ for (
+ qw(ParamObject DBObject TicketObject LayoutObject LogObject QueueObject ConfigObject)
+ )
+ {
+ if ( !$Self->{$_} ) {
+ $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
+ }
+ }
+
+ # needed objects
+ $Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
+ $Self->{StateObject} = Kernel::System::State->new(%Param);
+ $Self->{SystemAddress} = Kernel::System::SystemAddress->new(%Param);
+ $Self->{UploadCacheObject} = Kernel::System::Web::UploadCache->new(%Param);
+ $Self->{DynamicFieldObject} = Kernel::System::DynamicField->new(%Param);
+ $Self->{BackendObject} = Kernel::System::DynamicField::Backend->new(%Param);
+ $Self->{TicketWizard} = Kernel::System::TicketWizard->new(%Param);
+ $Self->{ServiceFormObject} = Kernel::System::ServiceForm->new(%Param);
+ $Self->{ServiceObject} = Kernel::System::Service->new(%Param);
+
+ return $Self;
+}
+
+sub Run {
+ my ( $Self, %Param ) = @_;
+ my %Data = ();
+
+ # Build service chooser
+ my %Services = $Self->{ServiceObject}->ServiceList( UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'), );
+ my @ServicesCombo = ();
+
+ for my $serviceID ( keys %Services ) {
+ if ( grep { index( $Services{$_}, $Services{$serviceID} . "::" ) >= 0 } ( keys %Services ) ) {
+ my %serv = ();
+ $serv{Value} = $Services{$serviceID};
+ $serv{Key} = $serviceID;
+ $serv{Disabled} = 1;
+ push @ServicesCombo, \%serv;
+ }
+ else {
+ my %serv = ();
+ $serv{Value} = $Services{$serviceID};
+ $serv{Key} = $serviceID;
+ push @ServicesCombo, \%serv;
+ }
+ }
+
+ @ServicesCombo = sort { $a->{Value} . "::" cmp $b->{Value} . "::" } @ServicesCombo;
+
+ $Data{ServiceStrg} = $Self->{LayoutObject}->BuildSelection(
+ Data => \@ServicesCombo,
+ Name => 'ServiceID',
+ SelectedID => $Param{ServiceID},
+ Class => "Validate_Required " . ( $Param{Errors}->{ServiceIDInvalid} || '' ),
+ PossibleNone => 1,
+ TreeView => 1,
+ Sort => 'TreeView',
+ Translation => 0,
+ Max => 200
+ );
+ $Self->{Config} = $Self->{ConfigObject}->Get("Ticket::Frontend::Customer::NewTicketWizard");
+ my $msgChooseService = $Self->{Config}->{"MessageChooseService"};
+ $Data{MsgChooseService} = $msgChooseService;
+
+ if ( $Self->{ParamObject}->GetParam( Param => "Subaction" ) ) {
+ if ( $Self->{ParamObject}->GetParam( Param => "Subaction" ) eq "CreateTicket" ) {
+ return $Self->CreateTicket();
+ }
+ elsif ( $Self->{ParamObject}->GetParam( Param => "Subaction" ) eq "GetFormJSON" ) {
+ return $Self->GetFormJSON( ServiceID => $Self->{ParamObject}->GetParam( Param => "ServiceID" ) );
+ }
+ }
+ else {
+ my ( $schema, $fields ) = $Self->GetForm();
+
+ $Data{SchemaForm} = $schema;
+ $Data{FieldsForm} = $fields;
+
+ # build output
+ my $Output =
+ $Self->{LayoutObject}
+ ->CustomerHeader( Title => $Self->{LayoutObject}->{LanguageObject}->Get("New ticket wizard") );
+
+ $Output .= $Self->{LayoutObject}->CustomerNavigationBar();
+ $Output .= $Self->{LayoutObject}->Output(
+ Data => \%Data,
+ TemplateFile => 'NewTicketWizard',
+ );
+ $Output .= $Self->{LayoutObject}->CustomerFooter();
+ return $Output;
+ }
+}
+
+sub GetFormJSON {
+ my ( $Self, %Param ) = @_;
+ my %serviceForm;
+
+ if ( $Param{ServiceID} ) {
+ %serviceForm = $Self->{ServiceFormObject}->GetServiceForm( ServiceID => $Param{ServiceID} );
+ }
+
+ my ( $schema, $fields, $introduction ) = $Self->GetForm( ServiceForm => \%serviceForm );
+
+ return $Self->{LayoutObject}->Attachment(
+ ContentType => 'application/json; charset=' . $Self->{LayoutObject}->{Charset},
+ Content => "[{" . $schema . "}, {" . $fields . "}, \"" . $introduction . "\"]",
+ Type => 'inline',
+ NoCache => 1,
+ );
+}
+
+sub GetForm {
+ my ( $Self, %Param ) = @_;
+
+ my $schema = $Self->{TicketWizard}->GetBasicFieldsSchema();
+ my $fields = $Self->{TicketWizard}->GetBasicFieldsOptions();
+ my $introduction;
+
+ ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSValues(
+ Schema => $schema,
+ Options => $fields,
+ UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID')
+ );
+ ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSDynamicFields( Schema => $schema, Options => $fields );
+
+ if ( !$Param{ServiceForm} ) {
+ $schema =~ s/CF_SCHEMA//g;
+ $fields =~ s/CF_FORM//g;
+ $introduction = "";
+ }
+ else {
+ my %serviceForm = %{ $Param{ServiceForm} };
+ $introduction = $serviceForm{Introduction};
+
+ if ( !$Param{ServiceForm}{Schema} ) {
+ $schema =~ s/CF_SCHEMA//g;
+ $fields =~ s/CF_FORM//g;
+ }
+ else {
+ my $schemaForm = "," . $serviceForm{Schema};
+ my $fieldsForm = "," . $serviceForm{Form};
+ $schema =~ s/CF_SCHEMA/$schemaForm/g;
+ $fields =~ s/CF_FORM/$fieldsForm/g;
+ }
+ }
+
+ return ( $schema, $fields, $introduction );
+}
+
+sub GetQueueID() {
+ my ( $Self, %Param ) = @_;
+
+ # Gets default Queue
+ my $ConfigTicket = $Self->{ConfigObject}->Get("Ticket::Frontend::CustomerTicketMessage");
+ my $ConfigTicketWizard = $Self->{ConfigObject}->Get("Ticket::Frontend::Customer::NewTicketWizard");
+
+ my $QueueDefault = $ConfigTicket->{"QueueDefault"};
+ my $QueueID = $Self->{QueueObject}->QueueLookup( Queue => $QueueDefault );
+ my $Queue = $QueueDefault;
+
+ # Checks if there is a field for the queue
+ print STDERR Dumper($ConfigTicketWizard);
+
+ my $QueuePrefix = $ConfigTicketWizard->{"QueuePrefix"};
+ my $QueueField = $ConfigTicketWizard->{"QueueField"};
+ $Self->{LogObject}->Log( Priority => 'info', Message => "Searching queue for - $QueuePrefix ($QueueField)!" );
+
+ if ( $QueuePrefix && $QueueField ) {
+
+ my $QueueSelected = $Self->{ParamObject}->GetParam( Param => $QueueField );
+ my $QueueName = "$QueuePrefix $QueueSelected";
+ $Self->{LogObject}
+ ->Log( Priority => 'info', Message => "Searching queue for - $QueuePrefix ($QueueField) - [$QueueName]!" );
+
+ my %QueueList = reverse $Self->{QueueObject}->QueueList( Valid => 1 );
+
+ if ( $QueueList{$QueueName} ) {
+ $QueueID = $QueueList{$QueueName};
+ $Queue = $QueueName;
+ $Self->{LogObject}->Log( Priority => 'info', Message => "Custom queue found - $QueueName ($QueueID)!" );
+ }
+
+ }
+
+ return ( $Queue, $QueueID );
+}
+
+sub CreateTicket {
+ my ( $Self, %Param ) = @_;
+ my %Data = ();
+
+ # Queue
+ my ( $Queue, $QueueID ) = $Self->GetQueueID(%Param);
+ $Self->{Config} = $Self->{ConfigObject}->Get("Ticket::Frontend::CustomerTicketMessage");
+
+ my $TicketID = $Self->{TicketObject}->TicketCreate(
+ Title => $Self->{ParamObject}->GetParam( Param => "subject" ),
+ QueueID => $QueueID,
+ Priority => $Self->{Config}->{PriorityDefault},
+ Lock => 'unlock',
+ State => 'new',
+ ServiceID => $Self->{ParamObject}->GetParam( Param => "service" ),
+ TypeID => $Self->{ParamObject}->GetParam( Param => "type" ),
+ CustomerID => $Self->{UserCustomerID},
+ CustomerUser => $Self->{UserLogin},
+ OwnerID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+ UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+ );
+
+ my $MimeType = 'text/plain';
+ my $serviceFields = "\n\n";
+
+ # Service Fields
+ for ( $Self->{ParamObject}->GetParamNames() ) {
+ if ( substr( $_, 0, 3 ) eq "SF_" ) {
+ $serviceFields .= substr( $_, 3 ) . " = " . $Self->{ParamObject}->GetParam( Param => $_ ) . "\n";
+ }
+ }
+
+ # Dynamic Fields
+ for ( $Self->{ParamObject}->GetParamNames() ) {
+ if ( substr( $_, 0, 3 ) eq "DF_" ) {
+ my $Success = $Self->{BackendObject}->ValueSet(
+ DynamicFieldConfig => $Self->{DynamicFieldObject}->DynamicFieldGet( Name => substr( $_, 3 ) ),
+ ObjectID => $TicketID,
+ Value => $Self->{ParamObject}->GetParam( Param => $_ ),
+ UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+ );
+ }
+ }
+
+ # Create article
+ my $FullName = $Self->{CustomerUserObject}->CustomerName( UserLogin => $Self->{UserLogin}, );
+ my $From = "\"$FullName\" <$Self->{UserEmail}>";
+ my $ArticleID = $Self->{TicketObject}->ArticleCreate(
+ TicketID => $TicketID,
+ ArticleType => $Self->{Config}->{ArticleType},
+ SenderType => $Self->{Config}->{SenderType},
+ From => $From,
+ To => $Queue,
+ Subject => $Self->{ParamObject}->GetParam( Param => "subject" ),
+ Body => $Self->{ParamObject}->GetParam( Param => "description" ) . $serviceFields,
+ MimeType => $MimeType,
+ Charset => $Self->{LayoutObject}->{UserCharset},
+ UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+ HistoryType => $Self->{Config}->{HistoryType},
+ HistoryComment => $Self->{Config}->{HistoryComment} || '%%',
+ AutoResponseType => ( $Self->{ConfigObject}->Get('AutoResponseForWebTickets') )
+ ? 'auto reply'
+ : '',
+ OrigHeader => {
+ From => $From,
+ To => $Queue,
+ Subject => $Self->{ParamObject}->GetParam( Param => "subject" ),
+ Body => $Self->{ParamObject}->GetParam( Param => "description" ),
+ },
+ Queue => $Queue,
+ );
+
+ # Attachments
+ my %UploadStuff = $Self->{ParamObject}->GetUploadAll( Param => "attachment" );
+
+ # if (%UploadStuff) {
+ # print STDERR "\nTem anexo!\n";
+ $Self->{TicketObject}->ArticleWriteAttachment(
+ %UploadStuff,
+ ArticleID => $ArticleID,
+ UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+ );
+
+ # }
+
+ $Data{TicketNumber} = $Self->{TicketObject}->TicketNumberLookup( TicketID => $TicketID );
+
+ # build output
+ my $Output = $Self->{LayoutObject}->CustomerHeader( Title => "Ticket created" );
+ $Output .= $Self->{LayoutObject}->CustomerNavigationBar();
+ $Output .= $Self->{LayoutObject}->Output(
+ Data => \%Data,
+ TemplateFile => 'NewTicketWizardTicketCreated',
+ );
+ $Output .= $Self->{LayoutObject}->CustomerFooter();
+ return $Output;
+
+}
+
+1;
diff --git a/Kernel/Modules/NewTicketWizardServiceForm.pm b/Kernel/Modules/NewTicketWizardServiceForm.pm
new file mode 100644
index 0000000..a47aede
--- /dev/null
+++ b/Kernel/Modules/NewTicketWizardServiceForm.pm
@@ -0,0 +1,151 @@
+# --
+# Kernel/Modules/NewTicketWizard.pm - frontend module for customizing service forms
+# Copyright (C) 2014 (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+package Kernel::Modules::NewTicketWizardServiceForm;
+
+use strict;
+use warnings;
+
+use Kernel::System::VariableCheck qw(:all);
+use Data::Dumper;
+use Kernel::System::ServiceForm;
+use Kernel::System::Service;
+
+# TODO: Traducoes
+
+sub new {
+ my ( $Type, %Param ) = @_;
+
+ # allocate new hash for object
+ my $Self = {%Param};
+ bless( $Self, $Type );
+
+ # check needed objects
+ for (
+ qw(ParamObject DBObject LayoutObject LogObject ConfigObject)
+ )
+ {
+ if ( !$Self->{$_} ) {
+ $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
+ }
+ }
+
+ # needed objects
+ $Self->{SystemAddress} = Kernel::System::SystemAddress->new(%Param);
+ $Self->{BackendObject} = Kernel::System::DynamicField::Backend->new(%Param);
+ $Self->{ServiceObject} = Kernel::System::Service->new(%Param);
+ $Self->{ServiceFormObject} = Kernel::System::ServiceForm->new(%Param);
+
+ return $Self;
+}
+
+sub Run {
+
+ my ( $Self, %Param ) = @_;
+ my %Data = ();
+
+ if ( $Self->{ParamObject}->GetParam( Param => "Subaction" ) ) {
+ if ( $Self->{Subaction} eq 'ServiceEdit' ) {
+
+ # header
+ my $Output = $Self->{LayoutObject}->Header();
+ $Output .= $Self->{LayoutObject}->NavigationBar();
+
+ my %serviceForm =
+ $Self->{ServiceFormObject}
+ ->GetServiceForm( ServiceID => $Self->{ParamObject}->GetParam( Param => "ServiceID" ) );
+
+ $Data{Introduction} = $serviceForm{Introduction};
+ $Data{Form} = $serviceForm{Form};
+ $Data{Schema} = $serviceForm{Schema};
+ $Data{ServiceID} = $Self->{ParamObject}->GetParam( Param => "ServiceID" );
+
+ $Output .= $Self->{LayoutObject}->Output(
+ Data => \%Data,
+ TemplateFile => 'NewTicketWizardServiceFormEdit',
+ );
+
+ # html output
+ $Output .= $Self->{LayoutObject}->Footer();
+
+ return $Output;
+ }
+ elsif ( $Self->{Subaction} eq 'ServiceSave' ) {
+
+ # header
+ my $Output = $Self->{LayoutObject}->Header();
+ $Output .= $Self->{LayoutObject}->NavigationBar();
+
+ $Self->{ServiceFormObject}->SaveServiceForm(
+ ServiceID => $Self->{ParamObject}->GetParam( Param => "ServiceID" ),
+ Introduction => $Self->{ParamObject}->GetParam( Param => "Introduction" ),
+ Form => $Self->{ParamObject}->GetParam( Param => "Form" ),
+ Schema => $Self->{ParamObject}->GetParam( Param => "Schema" ),
+ );
+
+ return $Self->Overview();
+ }
+ }
+ else {
+ return $Self->Overview();
+ }
+}
+
+sub Overview {
+
+ my ( $Self, %Param ) = @_;
+
+ my %Data = ();
+
+ # build output
+ $Self->{LayoutObject}->Block(
+ Name => 'Overview',
+ Data => { %Param, },
+ );
+
+ $Self->{LayoutObject}->Block(
+ Name => 'OverviewList',
+ Data => { %Param, },
+ );
+
+ # get service list
+ my $ServiceList = $Self->{ServiceObject}->ServiceListGet(
+ Valid => 1,
+ UserID => $Self->{UserID},
+ );
+
+ # if there are any services defined, they are shown
+ if ( @{$ServiceList} ) {
+
+ # sort the service list by long service name
+ @{$ServiceList} = sort { $a->{Name} . '::' cmp $b->{Name} . '::' } @{$ServiceList};
+
+ for my $ServiceData ( @{$ServiceList} ) {
+ if (! grep { index($_->{Name}, $ServiceData->{Name} . "::") >= 0} @{$ServiceList} ) {
+
+ # output row
+ $Self->{LayoutObject}->Block(
+ Name => 'OverviewListRow',
+ Data => { %{$ServiceData} },
+ );
+ }
+ }
+ }
+
+ my $Output = $Self->{LayoutObject}->Header( Title => $Self->{LayoutObject}->{LanguageObject}->Get("Service Form") );
+
+ $Output .= $Self->{LayoutObject}->NavigationBar();
+ $Output .= $Self->{LayoutObject}->Output(
+ Data => \%Data,
+ TemplateFile => 'NewTicketWizardServiceForm',
+ );
+ $Output .= $Self->{LayoutObject}->Footer();
+ return $Output;
+}
+
+1;
diff --git a/Kernel/Output/HTML/Standard/NewTicketWizard.dtl b/Kernel/Output/HTML/Standard/NewTicketWizard.dtl
new file mode 100644
index 0000000..8420748
--- /dev/null
+++ b/Kernel/Output/HTML/Standard/NewTicketWizard.dtl
@@ -0,0 +1,42 @@
+# --
+# Kernel/Output/HTML/Standard/NewTicketWizard.dtl - template for new ticket wizard
+# Copyright (C) (2014) (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+
+
+$Data{"MsgChooseService"}
+
+
+
+
+
+
+
+
+
+
diff --git a/Kernel/Output/HTML/Standard/NewTicketWizardServiceForm.dtl b/Kernel/Output/HTML/Standard/NewTicketWizardServiceForm.dtl
new file mode 100644
index 0000000..475f5e5
--- /dev/null
+++ b/Kernel/Output/HTML/Standard/NewTicketWizardServiceForm.dtl
@@ -0,0 +1,47 @@
+# --
+# NewTicketWizardServiceForm.dtl - provides HTML form for NewTicketWizardServiceForm
+# Copyright (C) 2014 UFSC
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+
+
+
+
\ No newline at end of file
diff --git a/Kernel/Output/HTML/Standard/NewTicketWizardServiceFormEdit.dtl b/Kernel/Output/HTML/Standard/NewTicketWizardServiceFormEdit.dtl
new file mode 100644
index 0000000..f5e44af
--- /dev/null
+++ b/Kernel/Output/HTML/Standard/NewTicketWizardServiceFormEdit.dtl
@@ -0,0 +1,51 @@
+# --
+# NewTicketWizardServiceForm.dtl - provides HTML form for NewTicketWizardServiceForm
+# Copyright (C) 2014 UFSC
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+
+
+
+
$Text{"Edit Service"} : $QData{"Name"}
+
+
+
+
+
+
diff --git a/Kernel/Output/HTML/Standard/NewTicketWizardTicketCreated.dtl b/Kernel/Output/HTML/Standard/NewTicketWizardTicketCreated.dtl
new file mode 100644
index 0000000..dc923bf
--- /dev/null
+++ b/Kernel/Output/HTML/Standard/NewTicketWizardTicketCreated.dtl
@@ -0,0 +1,13 @@
+# --
+# Kernel/Output/HTML/Standard/NewTicketWizard.dtl - template for new ticket wizard
+# Copyright (C) (2013) (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+
+
$Text{"Your ticket has been registered with the number: "}$Data{"TicketNumber"}
+
+
+
\ No newline at end of file
diff --git a/Kernel/System/ServiceForm.pm b/Kernel/System/ServiceForm.pm
new file mode 100644
index 0000000..2431a5a
--- /dev/null
+++ b/Kernel/System/ServiceForm.pm
@@ -0,0 +1,109 @@
+# --
+# Kernel/System/ServiceForm.pm - core module
+# Copyright (C) (2013) (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+package Kernel::System::ServiceForm;
+
+use strict;
+use warnings;
+use utf8;
+use Kernel::System::Service;
+use Kernel::System::Type;
+use Kernel::System::YAML;
+use Data::Dumper;
+use Kernel::System::DynamicField;
+
+sub new {
+ my ( $Type, %Param ) = @_;
+
+ # allocate new hash for object
+ my $Self = {%Param};
+ bless( $Self, $Type );
+
+ # check needed objects
+ for (
+ qw(DBObject LayoutObject LogObject QueueObject ConfigObject)
+ )
+ {
+ if ( !$Self->{$_} ) {
+ $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
+ }
+ }
+
+ # required objects
+
+ return $Self;
+}
+
+=head
+
+Returns a service form
+
+=cut
+
+sub GetServiceForm {
+
+ my ( $Self, %Param ) = @_;
+
+ # get service form from db
+ $Self->{DBObject}->Prepare(
+ SQL => 'SELECT service_id, introduction, form, form_schema FROM service_form WHERE service_id = ?',
+ Bind => [ \$Param{ServiceID} ],
+ Limit => 1,
+ );
+
+ # fetch the result
+ my %ServiceData;
+ while ( my @Row = $Self->{DBObject}->FetchrowArray() ) {
+ $ServiceData{ServiceID} = $Row[0];
+ $ServiceData{Introduction} = $Row[1];
+ $ServiceData{Form} = $Row[2];
+ $ServiceData{Schema} = $Row[3];
+ }
+
+ return %ServiceData;
+}
+
+=head
+
+Saves a service form.
+
+=cut
+
+sub SaveServiceForm {
+
+ my ( $Self, %Param ) = @_;
+ for my $Argument (qw(ServiceID Introduction)) {
+ if ( !$Param{$Argument} ) {
+ $Self->{LogObject}->Log(
+ Priority => 'error',
+ Message => "Need $Argument!",
+ );
+ return;
+ }
+ }
+
+ my %serviceForm = $Self->GetServiceForm(ServiceID => $Param{ServiceID});
+ my $update = ($serviceForm{ServiceID});
+
+ if ($update) {
+ $Self->{DBObject}->Do(SQL => 'UPDATE service_form SET introduction=?,form=?,form_schema=? where service_id=?',
+ Bind => [
+ \$Param{Introduction}, \$Param{Form}, \$Param{Schema}, \$Param{ServiceID}
+ ]);
+ } else {
+ $Self->{DBObject}->Do(SQL => 'INSERT INTO service_form(service_id,introduction,form,form_schema) VALUES (?,?,?,?)',
+ Bind => [
+ \$Param{ServiceID}, \$Param{Introduction}, \$Param{Form}, \$Param{Schema}
+ ]);
+ }
+
+ return 1;
+
+}
+
+1;
diff --git a/Kernel/System/TicketWizard.pm b/Kernel/System/TicketWizard.pm
new file mode 100644
index 0000000..4036f0f
--- /dev/null
+++ b/Kernel/System/TicketWizard.pm
@@ -0,0 +1,183 @@
+# --
+# Kernel/System/TicketWizard.pm - core module
+# Copyright (C) (2013) (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+package Kernel::System::TicketWizard;
+
+use strict;
+use warnings;
+use utf8;
+use Kernel::System::Service;
+use Kernel::System::Type;
+use Kernel::System::YAML;
+use Data::Dumper;
+use Kernel::System::DynamicField;
+
+sub new {
+ my ( $Type, %Param ) = @_;
+
+ # allocate new hash for object
+ my $Self = {%Param};
+ bless( $Self, $Type );
+
+ # check needed objects
+ for (
+ qw(DBObject LayoutObject LogObject QueueObject ConfigObject)
+ )
+ {
+ if ( !$Self->{$_} ) {
+ $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
+ }
+ }
+
+ # required objects
+ $Self->{YAMLObject} = Kernel::System::YAML->new(%Param);
+ $Self->{ServiceObject} = Kernel::System::Service->new(%Param);
+ $Self->{TypeObject} = Kernel::System::Type->new(%Param);
+ $Self->{TicketObject} = Kernel::System::Ticket->new(%Param);
+ $Self->{DynamicFieldObject} = Kernel::System::DynamicField->new(%Param);
+
+ return $Self;
+}
+
+=head
+
+Returns fields structure for new ticket form wizard
+
+=cut
+
+sub GetBasicFieldsOptions {
+ my ( $Self, %Param ) = @_;
+ return $Self->{ConfigObject}->Get("Ticket::Frontend::Customer::NewTicketWizard")->{BasicForm};
+}
+
+=head
+
+Returns fields schema for new ticket wizard
+
+=cut
+
+sub GetBasicFieldsSchema {
+ my ( $Self, %Param ) = @_;
+ return $Self->{ConfigObject}->Get("Ticket::Frontend::Customer::NewTicketWizard")->{BasicSchema};
+}
+
+=head
+
+Replaces OTRS system field values (service and type)
+
+=cut
+
+sub ReplaceOTRSValues {
+ my ( $Self, %Param ) = @_;
+ my $schema = $Param{Schema};
+ my $options = $Param{Options};
+
+ my ( $serviceNames, $serviceIDs ) = $Self->GetOTRSServicesData();
+ $schema =~ s/OTRS_service_values/$serviceIDs/g;
+ $options =~ s/OTRS_service_labels/$serviceNames/g;
+
+ my ( $typeNames, $typeIDs ) = $Self->GetOTRSTypesData(UserID => $Param{UserID});
+ $schema =~ s/OTRS_type_values/$typeIDs/g;
+ $options =~ s/OTRS_type_labels/$typeNames/g;
+
+ return ( $schema, $options );
+}
+
+sub GetOTRSServicesData {
+ my ( $Self, %Param ) = @_;
+ my $services = $Self->{ServiceObject};
+
+ my %serviceList = $services->ServiceList( Valid => 1, UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID') );
+ my $serviceNames = "";
+ my $serviceIDs = "";
+
+ ###print STDERR "\n\n\n Servicos: " . Dumper(\%serviceList) . "\n\n\n";
+
+ foreach ( sort { ( $serviceList{$a} cmp $serviceList{$b} ) } keys %serviceList ) {
+ $serviceNames .= "\"$serviceList{$_}\",";
+ $serviceIDs .= "$_,";
+ }
+ $serviceNames = substr($serviceNames, 0, -1);
+ $serviceIDs = substr($serviceIDs, 0, -1);
+ return ( $serviceNames, $serviceIDs );
+}
+
+sub GetOTRSTypesData {
+ my ( $Self, %Param ) = @_;
+ my $ticketObject = $Self->{TicketObject};
+
+ my %typeList = $ticketObject->TicketTypeList( UserID => $Param{UserID} );
+ my $typeNames = "";
+ my $typeIDs = "";
+
+ foreach ( sort { ( $typeList{$a} cmp $typeList{$b} ) } keys %typeList ) {
+ $typeNames .= "\"$typeList{$_}\",";
+ $typeIDs .= "$_,";
+ }
+
+ $typeNames = substr($typeNames, 0, -1);
+ $typeIDs = substr($typeIDs, 0, -1);
+
+ return ( $typeNames, $typeIDs );
+}
+
+sub ReplaceOTRSDynamicFields {
+ my ( $Self, %Param ) = @_;
+ my $schema = $Param{Schema};
+ my $options = $Param{Options};
+
+ my $dfields = $Self->{DynamicFieldObject};
+ my @dfieldList = @{ $dfields->DynamicFieldListGet( Valid => 1 ) };
+
+ foreach (@dfieldList) {
+ my $campo = $_;
+
+ #Debug("campo", $campo);
+ my $name = $campo->{Name};
+ my $config = $campo->{Config};
+ my $type = $campo->{FieldType};
+ my $idFieldValues = "DF_" . $name . "_values";
+ my $idFieldLabels = "DF_" . $name . "_labels";
+ if ( $type eq "Dropdown" ) {
+ my ( $dfValues, $dfLabels ) = $Self->GetDynamicFieldValues( ConfigDF => $config );
+ $schema =~ s/$idFieldValues/$dfValues/g;
+ $options =~ s/$idFieldLabels/$dfLabels/g;
+ }
+ }
+
+ #Debug("schema", $schema);
+ #Debug("options", $options);
+ return ( $schema, $options );
+}
+
+sub Debug {
+ my ( $id, $value ) = @_;
+ ###print STDERR "\n\n $id =" . Dumper($value) . "\n";
+}
+
+sub GetDynamicFieldValues {
+ my ( $Self, %Param ) = @_;
+ my $config = $Param{ConfigDF};
+ my $values = $config->{PossibleValues};
+
+ my $dfValues = "";
+ my $dfLabels = "";
+
+ foreach ( sort { ( $values->{$a} cmp $values->{$b} ) } keys %{$values} ) {
+ $dfValues .= "\"$_\",";
+ $dfLabels .= "\"$values->{$_}\",";
+ }
+
+ $dfValues = substr($dfValues, 0, -1);
+ $dfLabels = substr($dfLabels, 0, -1);
+ Debug( "dfvalues", $dfValues );
+ return ( $dfValues, $dfLabels );
+
+}
+
+1;
diff --git a/NewTicketWizard.sopm b/NewTicketWizard.sopm
new file mode 100755
index 0000000..49f722c
--- /dev/null
+++ b/NewTicketWizard.sopm
@@ -0,0 +1,64 @@
+
+
+ NewTicketWizard
+ 1.0.5
+ 3.x.x
+ SeTIC
+ http://www.setic.ufsc.br
+ Free
+ Assistente de chamados
+
+ Versão 1.0.0 - Inicial
+ Versão 1.0.1 - Ajusta listagem de servicos do Service forms, correcao no formulario de edicao de servico
+ Versão 1.0.2 - Ajuste na hierarquia de servicos
+
+ Módulo instalado com sucesso!
+ New Ticket Wizard
+ New Ticket Wizard module installed successfully!
+ ?
+ ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/db_schema.sql b/db_schema.sql
new file mode 100644
index 0000000..1b44a6b
--- /dev/null
+++ b/db_schema.sql
@@ -0,0 +1 @@
+CREATE TABLE service_form(service_id int primary key, introduction text, form text, form_schema text);
\ No newline at end of file
diff --git a/var/httpd/htdocs/js/NewTicketWizard.js b/var/httpd/htdocs/js/NewTicketWizard.js
new file mode 100644
index 0000000..c1293b3
--- /dev/null
+++ b/var/httpd/htdocs/js/NewTicketWizard.js
@@ -0,0 +1,111 @@
+/**
+ * Variables
+ */
+
+var formAlpaca;
+
+
+/**
+ * Build the form options (layout)
+ * @param fields
+ * @param sendText
+ * @returns {___anonymous58_421}
+ */
+function buildOptions(fields, sendText, action) {
+ return {
+ "renderForm": true,
+ "fields": fields,
+ "form": {
+ "attributes" : {
+ "action" : action,
+ "method" : "post",
+ "enctype": "multipart/form-data"
+ },
+ "buttons": {
+ "submit": {
+ "value" : sendText
+ }
+ },
+ "toggleSubmitValidState": false
+
+ }
+ };
+}
+
+/**
+ * Build the form schema
+ *
+ * @param schema
+ * @returns {___anonymous510_571}
+ */
+function buildSchema(schema) {
+ return {
+ "type": "object",
+ "properties": schema
+ };
+}
+
+var postRenderCallback = function(form) {
+ formOptions = form.options.fields;
+ formAlpaca = form;
+
+ Object.keys(formOptions).forEach(function (key) {
+ var value = formOptions[key];
+
+ // Extension to set control width
+ if (value["control_width"]) {
+ $("[name='" + key + "']").width(value["control_width"]);
+ }
+ });
+
+ if (form) {
+ form.form.registerSubmitHandler(function(e, form) {
+ // validate the entire form (top control + all children)
+ form.validate(true);
+
+ // draw the validation state (top control + all children)
+ form.renderValidationState(true);
+
+ // now display something
+ if (form.isFormValid()) {
+ return true;
+ } else {
+ return false;
+ }
+ e.stopPropagation();
+ return false;
+ });
+ }
+};
+
+function carregaForm(dataForm, sendText, action) {
+ var url = "/otrs/customer.pl?Action=NewTicketWizard;Subaction=GetFormJSON";
+
+ if (!(typeof formAlpaca === 'undefined')) {
+ formAlpaca.destroy();
+ } else {
+ //$("#formTicket").find("select").val("");
+ }
+
+ url += ";ServiceID=" + $("#ServiceID").val();
+
+ $.getJSON(url, function(data) {
+ ////formOptions = data[1];
+ $("#serviceDescription").html(data[2]);
+ $("#serviceDescription").show();
+
+ $("#formTicket").alpaca({
+ "data": dataForm,
+ "schema": buildSchema(data[0]),
+ "options": buildOptions(data[1], sendText, action),
+ "postRender": postRenderCallback,
+ "view": "VIEW_JQUERYUI_CREATE",
+ "ui": "jquery-ui"
+ });
+
+ $("[name='service']").val($("#ServiceID").val());
+
+ }).fail(function(jqXHR, textStatus, errorThrown) {
+ alert(textStatus);
+ });
+}
diff --git a/var/httpd/htdocs/js/thirdparty/alpaca/alpaca-full.min.js b/var/httpd/htdocs/js/thirdparty/alpaca/alpaca-full.min.js
new file mode 100644
index 0000000..a475964
--- /dev/null
+++ b/var/httpd/htdocs/js/thirdparty/alpaca/alpaca-full.min.js
@@ -0,0 +1,72 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/
+(function(a,c,b){c[a]=b()})("Base",this,function(){var a=function(){};a.extend=function(c,f){var g=a.prototype.extend;a._prototyping=true;var e=new this();g.call(e,c);e.base=function(){};delete a._prototyping;var d=e.constructor;var b=e.constructor=function(){if(!a._prototyping){if(this._constructing||this.constructor===b){this._constructing=true;d.apply(this,arguments);delete this._constructing}else{if(arguments[0]!==null){return(arguments[0].extend||g).call(arguments[0],e)}}}};b.ancestor=this;b.extend=this.extend;b.forEach=this.forEach;b.implement=this.implement;b.prototype=e;b.toString=this.toString;b.valueOf=function(h){return(h==="object")?b:d.valueOf()};g.call(b,f);if(typeof b.init==="function"){b.init()}return b};a.prototype={extend:function(c,l){if(arguments.length>1){var g=this[c];if(g&&(typeof l==="function")&&(!g.valueOf||g.valueOf()!==l.valueOf())&&/\bbase\b/.test(l)){var b=l.valueOf();l=function(){var i=this.base||a.prototype.base;this.base=g;var h=b.apply(this,arguments);this.base=i;return h};l.valueOf=function(h){return(h==="object")?l:b};l.toString=a.toString}this[c]=l}else{if(c){var k=a.prototype.extend;if(!a._prototyping&&typeof this!=="function"){k=this.extend||k}var f={toSource:null};var j=["constructor","toString","valueOf"];for(var d=a._prototyping?0:1;dn.maxItems){w("There must be a maximum of "+n.maxItems+" in the array")}}else{if(n.properties||n.additionalProperties){h.concat(e(r,n.properties,v,n.additionalProperties))}}if(n.pattern&&typeof r=="string"&&!r.match(n.pattern)){w("does not match the regex pattern "+n.pattern)}if(n.maxLength&&typeof r=="string"&&r.length>n.maxLength){w("may only be "+n.maxLength+" characters long")}if(n.minLength&&typeof r=="string"&&r.lengthr){w("must have a minimum value of "+n.minimum)}if(typeof n.maximum!==undefined&&typeof r==typeof n.maximum&&n.maximum)[^>]*$|\{\{\! /,p={},e={},y,x={key:0,data:{}},w=0,q=0,g=[];function k(B,A,D,E){var C={data:E||(E===0||E===false)?E:(A?A.data:{}),_wrap:A?A._wrap:null,tmpl:null,parent:A||null,nodes:[],calls:c,nest:b,wrap:n,html:r,update:z};if(B){i.extend(C,B,{nodes:[],parent:A})}if(D){C.tmpl=D;C._ctnt=C._ctnt||C.tmpl(i,C);C.key=++w;(g.length?e:p)[w]=C}return C}i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(A,B){i.fn[A]=function(C){var F=[],I=i(C),E,G,D,J,H=this.length===1&&this[0].parentNode;y=p||{};if(H&&H.nodeType===11&&H.childNodes.length===1&&I.length===1){I[B](this[0]);F=this}else{for(G=0,D=I.length;G0?this.clone(true):this).get();i(I[G])[B](E);F=F.concat(E)}q=0;F=this.pushStack(F,A,I.selector)}J=y;y=null;i.tmpl.complete(J);return F}});i.fn.extend({tmpl:function(C,B,A){return i.tmpl(this[0],C,B,A)},tmplItem:function(){return i.tmplItem(this[0])},template:function(A){return i.template(A,this[0])},domManip:function(E,H,G,I){if(E[0]&&i.isArray(E[0])){var B=i.makeArray(arguments),A=E[0],F=A.length,C=0,D;while(C").join(">").split('"').join(""").split("'").join("'")}});i.extend(i.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(A){p={}},afterManip:function v(C,A,D){var B=A.nodeType===11?i.makeArray(A.childNodes):A.nodeType===1?[A]:[];D.call(C,A);o(B);q++}});function m(A,E,C){var D,B=C?i.map(C,function(F){return(typeof F==="string")?(A.key?F.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+h+'="'+A.key+'" $2'):F):m(F,A,F._ctnt)}):A;if(E){return B}B=B.join("");B.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(G,H,F,I){D=i(F).get();o(D);if(H){D=a(H).concat(D)}if(I){D=D.concat(a(I))}});return D?D:a(B)}function a(B){var A=document.createElement("div");A.innerHTML=B;return i.makeArray(A.childNodes)}function l(A){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+i.trim(A).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(I,C,G,D,E,J,F){var L=i.tmpl.tag[G],B,H,K;if(!L){throw"Unknown template tag: "+G}B=L._default||[];if(J&&!/\w$/.test(E)){E+=J;J=""}if(E){E=j(E);F=F?(","+j(F)+")"):(J?")":"");H=J?(E.indexOf(".")>-1?E+j(J):("("+E+").call($item"+F)):E;K=J?H:"(typeof("+E+")==='function'?("+E+").call($item):("+E+"))"}else{K=H=B.$1||"null"}D=j(D);return"');"+L[C?"close":"open"].split("$notnull_1").join(E?"typeof("+E+")!=='undefined' && ("+E+")!=null":"true").split("$1a").join(K).split("$1").join(H).split("$2").join(D||B.$2||"")+"__.push('"})+"');}return __;")}function s(B,A){B._wrap=m(B,true,i.isArray(A)?A:[u.test(A)?A:i(A).html()]).join("")}function j(A){return A?A.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function d(A){var B=document.createElement("div");B.appendChild(A.cloneNode(true));return B.innerHTML}function o(G){var I="_"+q,B,A,E={},F,D,C;for(F=0,D=G.length;F=0;C--){H(A[C])}H(B)}function H(O){var L,N=O,M,J,K;if((K=O.getAttribute(h))){while(N.parentNode&&(N=N.parentNode).nodeType===1&&!(L=N.getAttribute(h))){}if(L!==K){N=N.parentNode?(N.nodeType===11?0:(N.getAttribute(h)||0)):0;if(!(J=p[K])){J=e[K];J=k(J,p[N]||e[N]);J.key=++w;p[w]=J}if(q){P(K)}}O.removeAttribute(h)}else{if(q&&(J=i.data(O,"tmplItem"))){P(J.key);p[J.key]=J;N=i.data(O.parentNode,"tmplItem");N=N?N.key:0}}if(J){M=J;while(M&&M.key!=N){M.nodes.push(O);M=M.parent}delete J._ctnt;delete J._wrap;i.data(O,"tmplItem",J)}function P(Q){Q=Q+I;J=E[Q]=(E[Q]||k(J,p[J.parent.key+I]||J.parent))}}}function c(C,A,D,B){if(!C){return g.pop()}g.push({_:C,tmpl:A,item:this,data:D,options:B})}function b(A,C,B){return i.tmpl(i.template(A),C,B,this)}function n(C,A){var B=C.options||{};B.wrapped=A;return i.tmpl(i.template(C.tmpl),C.data,B,C.item)}function r(B,C){var A=this._wrap;return i.map(i(i.isArray(A)?A.join(""):A).filter(B||"*"),function(D){return C?D.innerText||D.textContent:D.outerHTML||d(D)})}function z(){var A=this.nodes;i.tmpl(null,null,null,this).insertBefore(A[0]);i(A).remove()}})(jQuery);function hoozit(a){if(a.constructor===String){return"string"}else{if(a.constructor===Boolean){return"boolean"}else{if(a.constructor===Number){if(isNaN(a)){return"nan"}else{return"number"}}else{if(typeof a==="undefined"){return"undefined"}else{if(a===null){return"null"}else{if(a instanceof Array){return"array"}else{if(a instanceof Date){return"date"}else{if(a instanceof RegExp){return"regexp"}else{if(typeof a==="object"){return"object"}else{if(a instanceof Function){return"function"}else{return undefined}}}}}}}}}}}function bindCallbacks(c,b,a){var d=hoozit(c);if(d){if(hoozit(b[d])==="function"){return b[d].apply(b,a)}else{return b[d]}}}var equiv=function(){var b;var c=[];var a=function(){function d(e,f){if(e instanceof f.constructor||f instanceof e.constructor){return f==e}else{return f===e}}return{string:d,"boolean":d,number:d,"null":d,"undefined":d,nan:function(e){return isNaN(e)},date:function(e,f){return hoozit(e)==="date"&&f.valueOf()===e.valueOf()},regexp:function(e,f){return hoozit(e)==="regexp"&&f.source===e.source&&f.global===e.global&&f.ignoreCase===e.ignoreCase&&f.multiline===e.multiline},"function":function(){var e=c[c.length-1];return e!==Object&&typeof e!=="undefined"},array:function(f,g){var h;var e;if(!(hoozit(f)==="array")){return false}e=g.length;if(e!==f.length){return false}for(h=0;h0){k=e(this[0]);return k.data(e.mask.dataName)()}n=e.extend({placeholder:e.mask.placeholder,completed:null},n);i=e.mask.definitions;m=[];o=h=j.length;l=null;e.each(j.split(""),function(p,q){if(q=="?"){h--;o=p}else{if(i[q]){m.push(new RegExp(i[q]));if(l===null){l=m.length-1}}else{m.push(null)}}});return this.trigger("unmask").each(function(){var y=e(this),t=e.map(j.split(""),function(C,B){if(C!="?"){return i[C]?n.placeholder:C}}),A=y.val();function x(B){while(++B=0&&!m[B]){}return B}function s(E,B){var D,C;if(E<0){return}for(D=E,C=x(B);D=h){n.completed.call(y)}}}E.preventDefault()}}}function q(D,B){var C;for(C=D;CF.length){break}}else{if(t[B]===F.charAt(pos)&&B!==o){pos++;E=B}}}if(C){w()}else{if(E+1=2){if(a.isObject(g[1])){E=g[1].data;s=g[1].schema;l=g[1].options;o=g[1].view;m=g[1].render;h=g[1].postRender;n=g[1].error;c=g[1].connector;z=g[1].dataSource;v=g[1].schemaSource;q=g[1].optionsSource;f=g[1].viewSource;if(g[1].ui){p.ui=g[1].ui}if(g[1].type){p.type=g[1].type}if(!a.isEmpty(g[1].notTopLevel)){k=g[1].notTopLevel}if(!a.isEmpty(g[1].isDynamicCreation)){D=g[1].isDynamicCreation}}else{E=g[1];if(a.isFunction(E)){E=E()}}}if(a.isEmpty(n)){n=a.defaultErrorCallback}if(a.isEmpty(c)){var y=a.getConnectorClass("default");c=new y("default")}if(e){if(a.isString(e)){e=b("#"+e)}}var A=c;if(k){var C=a.getConnectorClass("default");A=new C("default")}if(!l){l={}}if(a.isUndefined(l.focus)){l.focus=false}var r=function(i){if(l&&l.focus){if(l.focus===true){if(i.children&&i.children.length>0){if(i.children[0].field&&i.children[0].field[0]){b(i.children[0]).focus()}}}else{var F=i.getControlByPath(l.focus);if(F&&F.field){b(F).focus()}}}if(h){h(i)}};A.loadAll({data:E,schema:s,options:l,view:o,dataSource:z,schemaSource:v,optionsSource:q,viewSource:f},function(i,F,G,H){i=i?i:E;G=G?G:s;F=F?F:l;H=H?H:o;if(a.isEmpty(i)){if(a.isEmpty(G)&&(a.isEmpty(F)||a.isEmpty(F.type))){i="";if(a.isEmpty(F)){F="text"}else{if(l&&a.isObject(l)){F.type="text"}}}}return a.init(e,i,F,G,H,p,m,r,c,n,D)},function(i){n(i);return null});return b(e)};a.Fields={};a.Connectors={};b.extend(a,{VERSION:"0.1.0",makeArray:function(c){return Array.prototype.slice.call(c)},isFunction:function(c){return Object.prototype.toString.call(c)==="[object Function]"},isString:function(c){return(typeof c=="string")},isObject:function(c){if(c===true||c===false||a.isUndefined(c)||c===null){return false}return(typeof(c)==="object")&&(typeof(c.length)==="undefined")},isPlainObject:function(c){return b.isPlainObject(c)},isNumber:function(c){return(typeof c=="number")},isArray:function(c){if(c===true||c===false||a.isUndefined(c)||c===null){return false}return c.push&&c.slice},isBoolean:function(c){return(typeof c=="boolean")},isUndefined:function(c){return(typeof c=="undefined")},trim:function(d){var c=d;if(c&&a.isString(c)){c=c.replace(/^\s+|\s+$/g,"")}return c},safeDomParse:function(c){if(c&&a.isString(c)){c=a.trim(c);c=b(c)}return c},isEmpty:function(c){return a.isUndefined(c)||c===null},copyOf:function(d){var f=d;if(a.isArray(d)){f=[];for(var e=0;e");if(e){g.attr(e)}if(d){g.css(d)}if(h){for(var f in h){g.addClass(f)}}},elementFromTemplate:function(e,f){var d=e;if(f){for(var c in f){d=a.replaceAll(d,"${"+c+"}",f[c])}}return b(d)},generateId:function(){a.uniqueIdCounter++;return"alpaca"+a.uniqueIdCounter},later:function(l,e,n,h,i){l=l||0;e=e||{};var g=n,k=b.makeArray(h),j,c;if(typeof n==="string"){g=e[n]}if(!g){throw {name:"TypeError",message:"The function is undefined."}}j=function(){g.apply(e,k)};c=(i)?setInterval(j,l):setTimeout(j,l);return{id:c,interval:i,cancel:function(){if(this.interval){clearInterval(c)}else{clearTimeout(c)}}}},endsWith:function(d,c){return d.indexOf(c,d.length-c.length)!==-1},startsWith:function(d,c){return d.substr(0,c.length)===c},isUri:function(c){return a.isString(c)&&(a.startsWith(c,"http://")||a.startsWith(c,"https://")||a.startsWith(c,"/")||a.startsWith(c,"./")||a.startsWith(c,"../"))},traverseObject:function(c,g,f){if(a.isString(g)){g=g.split(".")}var e=null;var h=c;var d=null;do{d=g.shift();if(f&&d==f){d=g.shift()}if(!a.isEmpty(h[d])){h=h[d];if(g.length===0){e=h}}else{g=[]}}while(g.length>0);return e},each:function(f,e){if(a.isArray(f)){for(var d=0;d-1){var e=h.substring(0,c)+d[g]+h.substring(c+3);h=e}}}return h},compareObject:function(d,c){return equiv(d,c)},compareArrayContent:function(d,c){var e=d&&c&&(d.length==c.length);if(e){b.each(d,function(g,f){if(!e){return false}if(b.inArray(f,c)==-1){e=false}else{e=true}})}return e},isValEmpty:function(d){var c=false;if(a.isEmpty(d)){c=true}else{if(a.isString(d)&&d===""){c=true}if(a.isObject(d)&&b.isEmptyObject(d)){c=true}if(a.isArray(d)&&d.length===0){c=true}if(a.isNumber(d)&&isNaN(d)){c=true}}return c},init:function(c,g,p,f,l,d,n,j,e,i,k){var o=this;if(a.isObject(l)){var m=l.id;if(!m){l.id=this.generateViewId()}var h=l.parent;if(!h){l.parent="VIEW_WEB_EDIT"}this.registerView(l);l=l.id}this.compile(function(r){if(r.errors&&r.errors.length>0){for(var t=0;t3){k.type="select"}else{k.type="radio"}}else{k.type=a.defaultSchemaFieldMapping[e.type]}if(e.format&&a.defaultFormatFieldMapping[e.format]){k.type=a.defaultFormatFieldMapping[e.format]}}var i=a.getFieldClass(k.type);if(!i){g({message:"Unable to find field class for type: "+k.type,reason:"FIELD_INSTANTIATION_ERROR"});return null}return new i(c,f,k,e,j,d,g)},parseJSON:function(c){if(!c){return null}return b.parseJSON(c)},compile:function(d,g){var k=this;var f={errors:[],count:0,successCount:0};var i=function(l){if(f.errors.length===0){for(var m in l){k.normalizedViews[m]=l[m]}}d(f)};var h=function(n,p,m,o,q,r){var l=m.id;f.count++;if(p){f.errors.push({view:l,template:o,err:p})}else{f.successCount++;m.compiledTemplates[o]=q}if(f.count==r){i(n)}};var c=function(v,r,t,u,m){var s=r.id;var p=null;if(a.isObject(u)){p=u.type;u=u.template}if(!p){p="text/x-jquery-tmpl"}var q=a.TemplateEngineRegistry.find(p);if(!q){a.logError("Cannot find template engine for type: "+p);var l=new Error("Cannot find template engine for type: "+p);h(v,l,r,t,n,m)}var n=s+"_"+t;if(q.isCached(n)){h(v,null,r,t,n,m)}else{var o=r.compiledTemplates["view-"+u];if(o){u=a.TemplateCache[o]}q.compile(n,u,function(w,x){h(v,w,r,t,n,m)})}};var j=function(s){var m=[];for(var q in s){var p=s[q];p.compiledTemplates={};if(p.templates){for(var l in p.templates){var r=p.templates[l];m.push(function(v,u,x,w){return function(y){c(v,u,x,w,y)}}(s,p,"view-"+l,r))}}if(p.fields){for(var t in p.fields){if(p.fields[t].templates){for(var l in p.fields[t].templates){var r=p.fields[t].templates[l];m.push(function(v,u,x,w){return function(y){c(v,u,x,w,y)}}(s,p,"field-"+t+"-"+l,r))}}}}if(p.layout&&p.layout.template){var r=p.layout.template;m.push(function(v,u,x,w){return function(y){c(v,u,x,w,y)}}(s,p,"layoutTemplate",r))}if(p.globalTemplate){var r=p.globalTemplate;m.push(function(v,u,x,w){return function(y){c(v,u,x,w,y)}}(s,p,"globalTemplate",r))}}var n=m.length;for(var o=0;o0){j(m)}else{i(m)}};e()},getTemplateDescriptor:function(i,d,j){var c={};var m;var e;if(i.templates&&i.templates[d]){m=i.templates[d];e="view"}if(j&&j.path){var n=j.path;if(i&&i.fields&&i.fields[n]&&i.fields[n].templates&&i.fields[n].templates[d]){m=i.fields[n].templates[d];e="field"}}if(d=="globalTemplate"){m="globalTemplate";e="global"}if(d=="layoutTemplate"){m="layoutTemplate";e="layout"}c.template={};c.template.id=d;c.template.type=e;c.template.value=m;var g=null;var l=m;if(a.isObject(l)){g=l.type;l=l.template}if(!g){g="text/x-jquery-tmpl"}var h=a.TemplateEngineRegistry.find(g);if(!h){return a.throwDefaultError("Cannot find template engine for type: "+g)}c.engine={};c.engine.type=g;c.engine.id=h.id;var k=null;if(e=="view"){k="view-"+d}else{if(e=="field"){k="field-"+j.path+"-"+d}else{if(e=="layout"){k="layoutTemplate"}else{if(e=="global"){k="globalTemplate"}}}}c.compiledTemplateId=k;var f=i.compiledTemplates[k];if(!f||!h.isCached(f)){return null}c.cache={};c.cache.key=f;return c},tmpl:function(d,c,e){if(a.isString(d)){d=this.normalizedViews[d]}var i=c.engine.type;var h=c.compiledTemplateId;var g=a.TemplateEngineRegistry.find(i);if(!g){return a.throwDefaultError("Cannot find template engine for type: "+i)}var j=c.cache.key;var f=g.execute(j,e,function(k){return a.throwDefaultError("The compiled template: "+h+" for view: "+d.id+" failed to execute: "+JSON.stringify(k))});return a.safeDomParse(f)}});a.DEBUG=0;a.INFO=1;a.WARN=2;a.ERROR=3;a.logLevel=a.WARN;a.logDebug=function(c){a.log(a.DEBUG,c)};a.logInfo=function(c){a.log(a.INFO,c)};a.logWarn=function(c){a.log(a.WARN,c)};a.logError=function(c){a.log(a.ERROR,c)};a.log=function(f,c){var e={0:"debug",1:"info",2:"warn",3:"error"};if(a.logLevel<=f){var d=e[f];if(typeof console!=="undefined"&&console[d]){if("debug"==d){console.debug(c)}else{if("info"==d){console.info(c)}else{if("warn"==d){console.warn(c)}else{if("error"==d){console.error(c)}else{console.log(c)}}}}}}};a.checked=function(c,d){return a.attrProp(c,"checked",d)};a.attrProp=function(d,c,e){if(!(typeof(e)==="undefined")){if(b(d).prop){b(d).prop(c,e)}else{if(e){b(d).attr(c,e)}else{b(d).removeAttr(c)}}}if(b(d).prop){return b(d).prop(c)}return b(d).attr(c)};a.loadRefSchemaOptions=function(h,g,i){if(g.indexOf("#/definitions/")>-1){var d=g.substring(14);var c=null;if(h.schema.definitions){c=h.schema.definitions[d]}var f=null;if(h.options.definitions){f=h.options.definitions[d]}i(c,f)}else{var e=a.resolveReference(h.schema,h.options,g);if(e){i(e.schema,e.options)}else{i()}}};a.DEFAULT_ERROR_CALLBACK=function(c){if(c&&c.message){a.logError(c.message);throw new Error("Alpaca caught an error with the default error handler: "+c.message)}};a.defaultErrorCallback=a.DEFAULT_ERROR_CALLBACK;a.throwDefaultError=function(d){if(d&&a.isObject(d)){d=JSON.stringify(d)}var c={message:d};a.defaultErrorCallback(c)};a.throwErrorWithCallback=function(e,c){if(e&&a.isObject(e)){e=JSON.stringify(e)}var d={message:e};if(c){c(d)}else{a.defaultErrorCallback(d)}};a.resolveReference=function(g,e,h){if(g.id==h){var d={};if(g){d.schema=g}if(e){d.options=e}return d}else{if(g&&g.properties){for(var i in g.properties){var f=g.properties[i];var j=null;if(e&&e.fields&&e.fields[i]){j=e.fields[i]}var c=a.resolveReference(f,j,h);if(c){return c}}}}return null};b.alpaca=window.Alpaca=a;b.fn.alpaca=function(){var d=a.makeArray(arguments);var c=[].concat(this,d);return a.apply(this,c)};b.fn.outerHTML=function(c){if(c){return b("").append(this).html()}else{return b("").append(this.clone()).html()}};b.fn.swapWith=function(c){return this.each(function(){var d=b(c).clone();var e=b(this).clone();b(c).replaceWith(e);b(this).replaceWith(d)})};b.fn.attrProp=function(c,d){return a.attrProp(b(this),c,d)};b.event.special.destroyed={remove:function(c){if(c.handler){c.handler()}}}})(jQuery);(function(){Alpaca.TemplateEngineRegistry=function(){var a={};return{register:function(c,b){a[c]=b},find:function(d){var e=null;if(a[d]){e=a[d]}else{for(var f in a){var c=a[f].supportedMimetypes();for(var b=0;b"+b+"<\/script>"}Alpaca.logDebug("Compiling template: "+this.id+", cacheKey: "+c+", template: "+b);this.doCompile(c,b,d)},doCompile:function(c,b,d){},execute:function(e,b,f){Alpaca.logDebug("Executing template for cache key: "+e);var c=this.doExecute(e,b,f);var d=function(g){var h=Alpaca.safeDomParse(g);if(a(h).length==1){if(a(h)[0].nodeName.toLowerCase()=="script"){return a(h).html()}}return g};c=d(c);return c},doExecute:function(c,b,d){},fileExtension:function(){return"html"},supportedMimetypes:function(){return[]},isCached:function(b){}})})(jQuery);(function(a){Alpaca.JQueryTemplateEngine=Alpaca.AbstractTemplateEngine.extend({fileExtension:function(){return"html"},supportedMimetypes:function(){return["text/x-jquery-template","text/x-jquery-tmpl"]},doCompile:function(d,b,f){try{a.template(d,b)}catch(c){f(c);return}Alpaca.TemplateCache[d]=b;f()},doExecute:function(k,g,l){var m=this;var f=null;try{var b=a.tmpl(k,g);b=b.outerHTML();var d=-1;do{d=b.indexOf("_tmplitem=");if(d>-1){var c=b.indexOf(" ",d);if(c==-1){c=b.indexOf(">",d)}if(c==-1){l({message:"Should have found closing whitespace or '>' for _tmplitem attribute"});return}b=b.substring(0,d)+b.substring(c)}}while(d>-1);f=Alpaca.safeDomParse(b)}catch(h){l({message:h.message});return null}return f},isCached:function(b){return(Alpaca.TemplateCache[b]?true:false)}});Alpaca.TemplateEngineRegistry.register("tmpl",new Alpaca.JQueryTemplateEngine("tmpl"))})(jQuery);(function(a){Alpaca.EJSTemplateEngine=Alpaca.AbstractTemplateEngine.extend({fileExtension:function(){return"ejs"},supportedMimetypes:function(){return["text/x-ejs-template","text/x-ejs-tmpl"]},doCompile:function(f,c,g){var b=null;try{b=new EJS({name:f,text:c})}catch(d){g(d);return}Alpaca.TemplateCache[f]=b;g()},doExecute:function(g,c,h){var b=Alpaca.TemplateCache[g];var d=null;try{d=b.render(c)}catch(f){h(f);return null}return d},isCached:function(b){return(Alpaca.TemplateCache[b]?true:false)}});Alpaca.TemplateEngineRegistry.register("ejs",new Alpaca.EJSTemplateEngine("ejs"))})(jQuery);(function(a){Alpaca.HandlebarsTemplateEngine=Alpaca.AbstractTemplateEngine.extend({fileExtension:function(){return"html"},supportedMimetypes:function(){return["text/x-handlebars-template","text/x-handlebars-tmpl"]},doCompile:function(f,b,g){var c=null;try{c=Handlebars.compile(b)}catch(d){g(d);return}Alpaca.TemplateCache[f]=c;g()},doExecute:function(g,b,h){var d=Alpaca.TemplateCache[g];var c=null;try{c=d(b)}catch(f){h(f);return null}return c},isCached:function(b){return(Alpaca.TemplateCache[b]?true:false)}});Alpaca.TemplateEngineRegistry.register("handlebars",new Alpaca.HandlebarsTemplateEngine("handlebars"))})(jQuery);(function(b){var a=b.alpaca;a.styleInjections={};a.registerView({id:"VIEW_BASE",title:"Abstract base view",description:"Foundation view which provides an abstract view from which all other views extend.",messages:{countries:{afg:"Afghanistan",ala:"Aland Islands",alb:"Albania",dza:"Algeria",asm:"American Samoa",and:"Andorra",ago:"Angola",aia:"Anguilla",ata:"Antarctica",atg:"Antigua and Barbuda",arg:"Argentina",arm:"Armenia",abw:"Aruba",aus:"Australia",aut:"Austria",aze:"Azerbaijan",bhs:"Bahamas",bhr:"Bahrain",bgd:"Bangladesh",brb:"Barbados",blr:"Belarus",bel:"Belgium",blz:"Belize",ben:"Benin",bmu:"Bermuda",btn:"Bhutan",bol:"Bolivia",bih:"Bosnia and Herzegovina",bwa:"Botswana",bvt:"Bouvet Island",bra:"Brazil",iot:"British Indian Ocean Territory",brn:"Brunei Darussalam",bgr:"Bulgaria",bfa:"Burkina Faso",bdi:"Burundi",khm:"Cambodia",cmr:"Cameroon",can:"Canada",cpv:"Cape Verde",cym:"Cayman Islands",caf:"Central African Republic",tcd:"Chad",chl:"Chile",chn:"China",cxr:"Christmas Island",cck:"Cocos (Keeling), Islands",col:"Colombia",com:"Comoros",cog:"Congo",cod:"Congo, the Democratic Republic of the",cok:"Cook Islands",cri:"Costa Rica",hrv:"Croatia",cub:"Cuba",cyp:"Cyprus",cze:"Czech Republic",civ:"Cote d'Ivoire",dnk:"Denmark",dji:"Djibouti",dma:"Dominica",dom:"Dominican Republic",ecu:"Ecuador",egy:"Egypt",slv:"El Salvador",gnq:"Equatorial Guinea",eri:"Eritrea",est:"Estonia",eth:"Ethiopia",flk:"Falkland Islands (Malvinas),",fro:"Faroe Islands",fji:"Fiji",fin:"Finland",fra:"France",guf:"French Guiana",pyf:"French Polynesia",atf:"French Southern Territories",gab:"Gabon",gmb:"Gambia",geo:"Georgia",deu:"Germany",gha:"Ghana",gib:"Gibraltar",grc:"Greece",grl:"Greenland",grd:"Grenada",glp:"Guadeloupe",gum:"Guam",gtm:"Guatemala",ggy:"Guernsey",gin:"Guinea",gnb:"Guinea-Bissau",guy:"Guyana",hti:"Haiti",hmd:"Heard Island and McDonald Islands",vat:"Holy See (Vatican City State),",hnd:"Honduras",hkg:"Hong Kong",hun:"Hungary",isl:"Iceland",ind:"India",idn:"Indonesia",irn:"Iran, Islamic Republic of",irq:"Iraq",irl:"Ireland",imn:"Isle of Man",isr:"Israel",ita:"Italy",jam:"Jamaica",jpn:"Japan",jey:"Jersey",jor:"Jordan",kaz:"Kazakhstan",ken:"Kenya",kir:"Kiribati",prk:"Korea, Democratic People's Republic of",kor:"Korea, Republic of",kwt:"Kuwait",kgz:"Kyrgyzstan",lao:"Lao People's Democratic Republic",lva:"Latvia",lbn:"Lebanon",lso:"Lesotho",lbr:"Liberia",lby:"Libyan Arab Jamahiriya",lie:"Liechtenstein",ltu:"Lithuania",lux:"Luxembourg",mac:"Macao",mkd:"Macedonia, the former Yugoslav Republic of",mdg:"Madagascar",mwi:"Malawi",mys:"Malaysia",mdv:"Maldives",mli:"Mali",mlt:"Malta",mhl:"Marshall Islands",mtq:"Martinique",mrt:"Mauritania",mus:"Mauritius",myt:"Mayotte",mex:"Mexico",fsm:"Micronesia, Federated States of",mda:"Moldova, Republic of",mco:"Monaco",mng:"Mongolia",mne:"Montenegro",msr:"Montserrat",mar:"Morocco",moz:"Mozambique",mmr:"Myanmar",nam:"Namibia",nru:"Nauru",npl:"Nepal",nld:"Netherlands",ant:"Netherlands Antilles",ncl:"New Caledonia",nzl:"New Zealand",nic:"Nicaragua",ner:"Niger",nga:"Nigeria",niu:"Niue",nfk:"Norfolk Island",mnp:"Northern Mariana Islands",nor:"Norway",omn:"Oman",pak:"Pakistan",plw:"Palau",pse:"Palestinian Territory, Occupied",pan:"Panama",png:"Papua New Guinea",pry:"Paraguay",per:"Peru",phl:"Philippines",pcn:"Pitcairn",pol:"Poland",prt:"Portugal",pri:"Puerto Rico",qat:"Qatar",rou:"Romania",rus:"Russian Federation",rwa:"Rwanda",reu:"Reunion",blm:"Saint Barthelemy",shn:"Saint Helena",kna:"Saint Kitts and Nevis",lca:"Saint Lucia",maf:"Saint Martin (French part)",spm:"Saint Pierre and Miquelon",vct:"Saint Vincent and the Grenadines",wsm:"Samoa",smr:"San Marino",stp:"Sao Tome and Principe",sau:"Saudi Arabia",sen:"Senegal",srb:"Serbia",syc:"Seychelles",sle:"Sierra Leone",sgp:"Singapore",svk:"Slovakia",svn:"Slovenia",slb:"Solomon Islands",som:"Somalia",zaf:"South Africa",sgs:"South Georgia and the South Sandwich Islands",esp:"Spain",lka:"Sri Lanka",sdn:"Sudan",sur:"Suriname",sjm:"Svalbard and Jan Mayen",swz:"Swaziland",swe:"Sweden",che:"Switzerland",syr:"Syrian Arab Republic",twn:"Taiwan, Province of China",tjk:"Tajikistan",tza:"Tanzania, United Republic of",tha:"Thailand",tls:"Timor-Leste",tgo:"Togo",tkl:"Tokelau",ton:"Tonga",tto:"Trinidad and Tobago",tun:"Tunisia",tur:"Turkey",tkm:"Turkmenistan",tca:"Turks and Caicos Islands",tuv:"Tuvalu",uga:"Uganda",ukr:"Ukraine",are:"United Arab Emirates",gbr:"United Kingdom",usa:"United States",umi:"United States Minor Outlying Islands",ury:"Uruguay",uzb:"Uzbekistan",vut:"Vanuatu",ven:"Venezuela",vnm:"Viet Nam",vgb:"Virgin Islands, British",vir:"Virgin Islands, U.S.",wlf:"Wallis and Futuna",esh:"Western Sahara",yem:"Yemen",zmb:"Zambia",zwe:"Zimbabwe"},empty:"",required:"This field is required",valid:"",invalid:"This field is invalid",months:["January","February","March","April","May","June","July","August","September","October","November","December"],timeUnits:{SECOND:"seconds",MINUTE:"minutes",HOUR:"hours",DAY:"days",MONTH:"months",YEAR:"years"}}})})(jQuery);(function(b){var a=b.alpaca;a.styleInjections={};a.registerView({id:"VIEW_WEB_DISPLAY",parent:"VIEW_BASE",title:"Default Web Display View",description:"Default web edit view which goes though field hierarchy.",type:"view",platform:"web",displayReadonly:true,templates:{controlField:'
",arrayToolbar:"",arrayItemToolbar:""}});a.registerView({id:"VIEW_WEB_EDIT",parent:"VIEW_BASE",title:"Default Web Edit View",description:"Default web edit view which goes though field hierarchy.",type:"edit",platform:"web",displayReadonly:true,templates:{controlFieldOuterEl:"{{html this.html}}",controlFieldMessage:'
{{/each}}'}});a.registerView({id:"VIEW_WEB_CREATE",parent:"VIEW_WEB_EDIT",title:"Default Web Create View",description:"Default web create view which doesn't bind initial data.",type:"create",displayReadonly:false})})(jQuery);(function(c){var b=c.alpaca;var a={controlFieldOuterEl:'{{html this.html}}',controlFieldMessage:'
{{/if}}',fieldSetItemsContainer:"{{html this.html}}",fieldSet:'{{wrap(null, {}) Alpaca.fieldTemplate(this,"fieldSetOuterEl",true)}}{{html Alpaca.fieldTemplate(this,"fieldSetLegend")}}{{html Alpaca.fieldTemplate(this,"fieldSetHelper")}}{{wrap(null, {}) Alpaca.fieldTemplate(this,"fieldSetItemsContainer",true)}}{{/wrap}}{{/wrap}}',fieldSetItemContainer:'',itemLabel:'{{if options.itemLabel}}{{/if}}'};b.registerView({id:"VIEW_WEB_DISPLAY_LIST",parent:"VIEW_WEB_DISPLAY",title:"Web Display View List Style",description:"Web display view based on list styles.",legendStyle:"link",templates:a,styles:{},fields:{"/":{templates:{fieldSetItemsContainer:'{{html this.html}}',fieldSetItemContainer:''}}}});b.registerView({id:"VIEW_WEB_EDIT_LIST",parent:"VIEW_WEB_EDIT",title:"Web Edit View List Style",description:"Web edit view based on list styles.",legendStyle:"link",templates:a,styles:{},fields:{"/":{templates:{fieldSetItemsContainer:'{{html this.html}}',fieldSetItemContainer:''}}}});b.registerView({id:"VIEW_WEB_CREATE_LIST",parent:"VIEW_WEB_CREATE",title:"Web Create View List Style",description:"Web create view based on list styles.",legendStyle:"link",templates:a,styles:{},fields:{"/":{templates:{fieldSetItemsContainer:'{{html this.html}}',fieldSetItemContainer:''}}}})})(jQuery);(function(b){var a=b.alpaca;a.styleInjections["jquery-ui"]={field:function(c){c.addClass("ui-widget")},required:function(c){b('').prependTo(c)},error:function(c){c.addClass("ui-state-error")},errorMessage:function(c){c.addClass("ui-state-error-text")},removeError:function(c){c.removeClass("ui-state-error")},container:function(c){c.addClass("ui-widget-content")},wizardStatusBar:function(c){c.addClass("ui-widget-header ui-corner-all")},wizardCurrentStep:function(c){c.addClass("ui-state-highlight ui-corner-all")},wizardUnCurrentStep:function(c){c.removeClass("ui-state-highlight ui-corner-all")},containerExpandedIcon:"ui-icon-circle-arrow-s",containerCollapsedIcon:"ui-icon-circle-arrow-e",commonIcon:"ui-icon",addIcon:"ui-icon-circle-plus",removeIcon:"ui-icon-circle-minus",upIcon:"ui-icon-circle-arrow-n",downIcon:"ui-icon-circle-arrow-s",wizardPreIcon:"ui-icon-triangle-1-w",wizardNextIcon:"ui-icon-triangle-1-e",wizardDoneIcon:"ui-icon-triangle-1-e",buttonBeautifier:function(d,c,f){d.addClass("ui-button ui-widget ui-state-default ui-corner-all");if(f){d.addClass("ui-button-text-icon-primary")}else{d.addClass("ui-button-icon-only")}var e=d.html();d.attr("title",e);d.empty().append(''+e+"");d.hover(function(){if(!d.hasClass("alpaca-fieldset-array-item-toolbar-disabled")){b(this).addClass("ui-state-hover")}},function(){if(!d.hasClass("alpaca-fieldset-array-item-toolbar-disabled")){b(this).removeClass("ui-state-hover")}})}};a.registerView({id:"VIEW_JQUERYUI_DISPLAY",parent:"VIEW_WEB_DISPLAY",title:"Web Display View for jQuery UI",description:"Web Display View for jQuery UI",style:"jquery-ui",ui:"jquery-ui"});a.registerView({id:"VIEW_JQUERYUI_EDIT",parent:"VIEW_WEB_EDIT",title:"Web Edit View for jQuery UI",description:"Web Edit View for jQuery UI",style:"jquery-ui",ui:"jquery-ui"});a.registerView({id:"VIEW_JQUERYUI_CREATE",parent:"VIEW_WEB_CREATE",title:"Web Create View for jQuery UI",description:"Web Create View for jQuery UI",style:"jquery-ui",ui:"jquery-ui"});a.registerView({id:"VIEW_JQUERYUI_EDIT_LIST",parent:"VIEW_WEB_EDIT_LIST",title:"JQuery UI Edit View List Style",description:"JQuery UI edit view based on list styles.",style:"jquery-ui",ui:"jquery-ui"});a.registerView({id:"VIEW_JQUERYUI_CREATE_LIST",parent:"VIEW_WEB_CREATE_LIST",title:"JQuery UI Create View List Style",description:"JQuery UI create view based on list styles.",style:"jquery-ui",ui:"jquery-ui"})})(jQuery);(function(c){var b=c.alpaca;b.styleInjections["jquery-mobile"]={array:function(d){if(d){if(d.find('[data-role="fieldcontain"]').fieldcontain){d.find('[data-role="fieldcontain"]').fieldcontain();d.find('[data-role="fieldcontain"]').find("[type='radio'], [type='checkbox']").checkboxradio();d.find('[data-role="fieldcontain"]').find("button, [data-role='button'], [type='button'], [type='submit'], [type='reset'], [type='image']").not(".ui-nojs").button();d.find('[data-role="fieldcontain"]').find("input, textarea").not("[type='radio'], [type='checkbox'], button, [type='button'], [type='submit'], [type='reset'], [type='image']").textinput();d.find('[data-role="fieldcontain"]').find("input, select").filter("[data-role='slider'], [data-type='range']").slider();d.find('[data-role="fieldcontain"]').find("select:not([data-role='slider'])").selectmenu();d.find('[data-role="button"]').buttonMarkup();d.find('[data-role="controlgroup"]').controlgroup()}}}};b.registerView({id:"VIEW_MOBILE_DISPLAY",parent:"VIEW_WEB_DISPLAY",title:"Mobile DISPLAY View",description:"Mobile display view using JQuery Mobile Library",type:"view",platform:"mobile",style:"jquery-mobile",ui:"mobile",legendStyle:"link",toolbarStyle:"link",buttonType:"link",templates:{controlField:'
{{/if}}'};var c=function(f,g){var e=this;f.render(function(h){b("select,input,textarea",h.outerEl).addClass("input-xlarge");b("button:submit, button:reset, .alpaca-form-button").addClass("btn");if(g){g.call(e,h)}})};a.registerView({id:"VIEW_BOOTSTRAP_DISPLAY",parent:"VIEW_WEB_DISPLAY",title:"Display View for Bootstrap",description:"Display View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c});a.registerView({id:"VIEW_BOOTSTRAP_EDIT",parent:"VIEW_WEB_EDIT",title:"Edit View for Bootstrap",description:"Edit View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c});a.registerView({id:"VIEW_BOOTSTRAP_CREATE",parent:"VIEW_WEB_CREATE",title:"Create View for Bootstrap",description:"Create View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c});a.registerView({id:"VIEW_BOOTSTRAP_DISPLAY_LIST",parent:"VIEW_WEB_DISPLAY_LIST",title:"Display List View for Bootstrap",description:"Display List View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c});a.registerView({id:"VIEW_BOOTSTRAP_EDIT_LIST",parent:"VIEW_WEB_EDIT_LIST",title:"Edit List View for Bootstrap",description:"Edit List View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c});a.registerView({id:"VIEW_BOOTSTRAP_CREATE_LIST",parent:"VIEW_WEB_CREATE_LIST",title:"Create List View for Bootstrap",description:"Create List View for Bootstrap",style:"bootstrap",ui:"bootstrap",templates:d,render:c})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_WEB_EDIT_TABLE",parent:"VIEW_WEB_EDIT",title:"Web Edit View Table Style",description:"Web edit view based on table styles.",type:"edit",displayReadonly:true,collapsible:false,legendStyle:"link",templates:{controlFieldOuterEl:null,controlFieldLabel:'
'}}}});a.registerView({id:"VIEW_WEB_CREATE_TABLE",parent:"VIEW_WEB_EDIT_TABLE",title:"Default Web Create View Table Stle",description:"Default web create view (Table Style) which doesn't bind initial data.",type:"create",displayReadonly:false})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_WEB_EDIT_YAML",parent:"VIEW_WEB_EDIT",title:"Web Edit View List Style",description:"Web edit list styled to look like a YAML editor.",type:"edit",displayReadonly:true,collapsible:true,legendStyle:"link",templates:{controlFieldOuterEl:'{{html this.html}}',controlFieldMessage:'
{{/if}}',fieldSetItemsContainer:"{{html this.html}}",fieldSet:'{{wrap(null, {}) Alpaca.fieldTemplate(this,"fieldSetOuterEl",true)}}{{html Alpaca.fieldTemplate(this,"fieldSetLegend")}}{{html Alpaca.fieldTemplate(this,"fieldSetHelper")}}{{wrap(null, {}) Alpaca.fieldTemplate(this,"fieldSetItemsContainer",true)}}{{/wrap}}{{/wrap}}',fieldSetItemContainer:'',itemLabel:'{{if options.itemLabel}}{{/if}}'},styles:{},fields:{"/":{templates:{fieldSetItemsContainer:'{{html this.html}}',fieldSetItemContainer:''}}}})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_WEB_EDIT_INLINE",parent:"VIEW_WEB_EDIT",title:"Default Web Edit with fields inlining capabilities",description:"Edit template with form fields inlining capabilities, via options.inline level to display some forms parts inline. Useful to display for example an ArrayField containing ObjectField items in a compact manner.",type:"edit",platform:"web",style:"jquery-ui",displayReadonly:true,templates:{fieldSetOuterEl:'',fieldSetItemContainer:'',arrayItemToolbar:'
'}});a.registerView({id:"VIEW_WEB_EDIT_LAYOUT_TWO_COLUMN",parent:"VIEW_WEB_EDIT",title:"Web Edit View with Two-Column Layout",description:"Web edit default view with two-column layout.",layout:{template:"twoColumnLayout"}});a.registerView({id:"VIEW_WEB_EDIT_LIST_LAYOUT_TWO_COLUMN",parent:"VIEW_WEB_EDIT_LIST",title:"Web List Edit View with Two-Column Layout",description:"Web edit list view with two-column layout.",layout:{template:"twoColumnLayout"}})})(jQuery);(function(b){var a=b.alpaca;a.NormalizedView=Base.extend({constructor:function(c){this.id=c},normalize:function(){var l=a.views[this.id];if(!l){a.logError("View compilation failed - view not found: "+this.id);return false}var c=[];var g=l;while(g){c.push(g);var f=g.parent;if(f){var j=a.views[g.parent];if(!j){a.logError("View compilation failed - cannot find parent view: "+f+" for view: "+g.id);return false}g=j}else{g=null}}c=c.reverse();var k=function(p,o,q){var n=o[q];var i=p[q];if(!a.isUndefined(i)&&!a.isUndefined(n)){a.logDebug("View property: "+q+" already has value: "+i+" and overwriting to: "+n)}if(!a.isUndefined(n)){p[q]=n}};var h=function(p,o,q){var n=o[q];var i=p[q];if(!a.isUndefined(i)&&!a.isUndefined(n)){a.logDebug("View property: "+q+" already has function, overwriting")}if(!a.isUndefined(n)){p[q]=n}};var m=function(n,i,p){var o=i[p];if(o){if(!n[p]){n[p]={}}a.mergeObject2(o,n[p])}};for(var e=0;e1){f.each(function(l,j){if(b(this).attr("data-control")=="append"){g=b(this)}})}this.setEl(g);if(!this.singleLevelRendering){if(!this.isDisplayOnly()||(!this.isControlField)){this.renderField(function(){if(h){h(this)}})}else{if(h){h(this)}}}else{if(h){h(this)}}},renderField:function(c){},getStyleInjection:function(e,f,d,c){if(this.view.style&&a.styleInjections[this.view.style]&&a.styleInjections[this.view.style][e]){a.styleInjections[this.view.style][e].call(this,f,d,c)}},postRender:function(){if(this.view.type!="view"){this.getStyleInjection("field",this.getEl());this.getEl().addClass("alpaca-field");if(this.getEl().attr("id")===null){this.getEl().attr("id",this.getId()+"-field-outer")}if(a.isEmpty(this.getEl().attr("alpaca-field-id"))){this.getEl().attr("alpaca-field-id",this.getId())}if(this.schema.required){this.getEl().addClass("alpaca-field-required")}else{this.getEl().addClass("alpaca-field-optional")}if(this.options.readonly){this.getEl().addClass("alpaca-field-readonly");b(":input",this.getEl()).attr("readonly","readonly");b("select",this.getEl()).attr("disabled","disabled");b(":radio",this.getEl()).attr("disabled","disabled");b(":checkbox",this.getEl()).attr("disabled","disabled")}var d=function(j,g){if(g){var h=0;var k=null;if(a.isArray(g)){for(h=0;h-1){k=g.split(",");for(h=0;h-1){k=g.split(" ");for(h=0;h0){b.each(d,function(f,h){if(h.length>0){var g=e.view.getTemplateDescriptor("controlFieldMessage");if(g){e.messageElement=e.view.tmpl(g,{message:h});e.getStyleInjection("errorMessage",e.messageElement);if(e.hideInitValidationError){e.messageElement.addClass("alpaca-controlfield-message-hidden")}else{e.messageElement.addClass("alpaca-controlfield-message")}e.messageElement.attr("id",e.getId()+"-field-message-"+f);if(b(".alpaca-controlfield-message-container",e.getEl()).length){e.messageElement.appendTo(b(".alpaca-controlfield-message-container",e.getEl()))}else{e.messageElement.appendTo(e.getEl())}}e.getStyleInjection("tooltipErrorMessage",e.getEl(),h)}})}},renderValidationState:function(d){var c=function(g,n){if(this.options.validate){if(g&&this.children){for(var k=0;k0){if(c.attr("data-replace")=="true"){c.replaceWith(e)}else{e.appendTo(c)}}else{if(this.fieldContainer.attr("data-replace")=="true"){this.fieldContainer.replaceWith(e)}else{e.prependTo(this.fieldContainer)}}},postRender:function(){var d=b(".alpaca-controlfield-label",this.outerEl);if(d.length){this.labelDiv=d}var c=b(".alpaca-controlfield-helper",this.outerEl);if(c.length){this.helperDiv=c}this.base();this.outerEl.addClass("alpaca-controlfield")},_validateEnum:function(){if(this.schema["enum"]){var c=this.data;if(!this.schema.required&&a.isValEmpty(c)){return true}if(b.inArray(c,this.schema["enum"])>-1){return true}else{return false}}else{return true}},handleValidate:function(){var e=this.base();var d=this.validation;var c=this._validateEnum();d.invalidValueOfEnum={message:c?"":a.substituteTokens(this.view.getMessage("invalidValueOfEnum"),[this.schema["enum"].join(",")]),status:c};return e&&d.invalidValueOfEnum["status"]},initEvents:function(){this.base();var c=this;if(this.field){this.field.keypress(function(d){c.onKeyPress.call(c,d);c.trigger("keypress",d)});this.field.keyup(function(d){c.onKeyUp.call(c,d);c.trigger("keyup",d)});this.field.keydown(function(d){c.onKeyDown.call(c,d);c.trigger("keydown",d)});this.field.click(function(d){c.onClick.call(c,d);c.trigger("click",d)})}},onKeyPress:function(f){var c=this;var d=this.isValid();if(!d){window.setTimeout(function(){c.renderValidationState()},50)}},onKeyDown:function(c){},onKeyUp:function(c){},onClick:function(c){},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{"enum":{title:"Enumerated Values",description:"List of specific values for this property",type:"array"}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{"enum":{itemLabel:"Value",type:"array"}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{name:{title:"Field Name",description:"Field Name.",type:"string"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{name:{type:"text"}}})}});a.registerMessages({invalidValueOfEnum:"This field should have one of the values in {0}."})})(jQuery);(function(b){var a=b.alpaca;a.ContainerField=a.Field.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();var c=true;if(!a.isEmpty(this.view.collapsible)){c=this.view.collapsible}if(!a.isEmpty(this.options.collapsible)){c=this.options.collapsible}this.options.collapsible=c;var d="button";if(!a.isEmpty(this.view.legendStyle)){d=this.view.legendStyle}if(!a.isEmpty(this.options.legendStyle)){d=this.options.legendStyle}this.options.legendStyle=d;this.lazyLoading=false;if(!a.isEmpty(this.options.lazyLoading)){this.lazyLoading=this.options.lazyLoading;if(this.lazyLoading){this.options.collapsed=true}}this.children=[];this.childrenById=[];this.childrenByPropertyId=[];this.expandedIcon="";this.collapsedIcon="";this.commonIcon="";this.addIcon="";this.removeIcon="";this.upIcon="";this.downIcon="";if(this.view.style&&a.styleInjections[this.view.style]){if(a.styleInjections[this.view.style]["commonIcon"]){this.commonIcon=a.styleInjections[this.view.style]["commonIcon"]}if(a.styleInjections[this.view.style]["containerExpandedIcon"]){this.expandedIcon=a.styleInjections[this.view.style]["containerExpandedIcon"]}if(a.styleInjections[this.view.style]["containerCollapsedIcon"]){this.collapsedIcon=a.styleInjections[this.view.style]["containerCollapsedIcon"]}if(a.styleInjections[this.view.style]["buttonBeautifier"]){this.buttonBeautifier=a.styleInjections[this.view.style]["buttonBeautifier"]}if(a.styleInjections[this.view.style]["addIcon"]){this.addIcon=a.styleInjections[this.view.style]["addIcon"]}if(a.styleInjections[this.view.style]["removeIcon"]){this.removeIcon=a.styleInjections[this.view.style]["removeIcon"]}if(a.styleInjections[this.view.style]["upIcon"]){this.upIcon=a.styleInjections[this.view.style]["upIcon"]}if(a.styleInjections[this.view.style]["downIcon"]){this.downIcon=a.styleInjections[this.view.style]["downIcon"]}}},getDefaultFieldTemplateId:function(){return"fieldSet"},setDefaultTemplateDescriptor:function(){this.base()},addChild:function(d,c){if(!a.isEmpty(c)){this.children.splice(c,0,d)}else{this.children.push(d)}this.childrenById[d.getId()]=d;if(d.propertyId){this.childrenByPropertyId[d.propertyId]=d}d.parent=this},initEvents:function(){var d=this;if(this.labelDiv){if(this.options.collapsible){this.labelDiv.addClass("legend-expanded");this.fieldSetDiv.addClass("fieldset-expanded");var c=this.expandedIcon;if(!a.isEmpty(this.options.collapsed)&&this.options.collapsed){c=this.collapsedIcon;this.labelDiv.nextAll(".alpaca-fieldset-helper").slideToggle(500);this.labelDiv.nextAll(".alpaca-fieldset-items-container").slideToggle(500);this.labelDiv.nextAll(".alpaca-fieldset-array-toolbar").slideToggle(500);this.fieldSetDiv.toggleClass("fieldset-expanded");this.fieldSetDiv.toggleClass("fieldset-collapsed");this.labelDiv.toggleClass("legend-expanded");this.labelDiv.toggleClass("legend-collapsed")}if(this.options.legendStyle=="link"){b('').prependTo(this.labelDiv);this.labelDiv.click(function(){d.fieldSetDiv.toggleClass("fieldset-collapsed");d.fieldSetDiv.toggleClass("fieldset-expanded");b(this).toggleClass("legend-collapsed");b(this).toggleClass("legend-expanded");b(".alpaca-fieldset-legend-link",this).toggleClass(d.collapsedIcon).toggleClass(d.expandedIcon);b(this).nextAll(".alpaca-fieldset-helper").slideToggle(500);b(this).nextAll(".alpaca-fieldset-items-container").slideToggle(500);b(this).nextAll(".alpaca-fieldset-array-toolbar").slideToggle(500)})}if(this.options.legendStyle=="button"){if(this.buttonBeautifier){this.buttonBeautifier.call(this,this.labelDiv,c,true)}this.labelDiv.click(function(){d.fieldSetDiv.toggleClass("fieldset-collapsed");d.fieldSetDiv.toggleClass("fieldset-expanded");b(this).toggleClass("legend-collapsed");b(this).toggleClass("legend-expanded");b(".alpaca-fieldset-legend-button",this).toggleClass(d.collapsedIcon).toggleClass(d.expandedIcon);b(this).nextAll(".alpaca-fieldset-helper").slideToggle(500);b(this).nextAll(".alpaca-fieldset-items-container").slideToggle(500);b(this).nextAll(".alpaca-fieldset-array-toolbar").slideToggle(500)})}}}},clear:function(c){a.each(this.children,function(){this.clear(false)});if(!c){this.triggerUpdate()}},setDefault:function(){if(a.isEmpty(this.schema["default"])){a.each(this.children,function(){this.setDefault()})}else{this.setValue(this.schema["default"])}},destroy:function(){if(this.form){this.form.destroy(true);delete this.form}a.each(this.children,function(){this.destroy()});this.base()},renderItemContainer:function(k,j,f){var h=this;var g=this.view.getTemplateDescriptor("fieldSetItemContainer");if(g){var d=h.view.tmpl(g,{});if(d.attr("data-replace")=="true"){return this.fieldContainer}else{if(k){b("#"+k+"-item-container",this.outerEl).after(d)}else{var e=this.fieldContainer;var c=this.view.getLayout().bindings;if(c){var i=c[f];if(i&&b("#"+i,e).length>0){e=b("#"+i,e)}}d.appendTo(e)}}return d}else{return this.fieldContainer}},renderField:function(f){var g=this;this.getStyleInjection("container",this.outerEl);var d=b(".alpaca-fieldset-legend",this.outerEl);if(d.length){this.labelDiv=d}else{this.outerEl.addClass("alpaca-fieldset-no-legend")}var c=b(".alpaca-fieldset",this.outerEl);if(c.length){this.fieldSetDiv=c}else{this.fieldSetDiv=this.outerEl}var e=b(".alpaca-fieldset-items-container",this.outerEl);if(e.length){this.fieldContainer=e}else{this.fieldContainer=this.outerEl}if(!this.singleLevelRendering&&!this.lazyLoading){this.renderItems()}if(this.lazyLoading){if(this.labelDiv){b(this.labelDiv).click(function(){if(g.lazyLoading){g.renderItems();g.lazyLoading=false}})}}if(f){f()}},onDependentReveal:function(){for(var c=0;cthis.schema.maxLength){return false}}return true},disable:function(){if(this.field){this.field.disabled=true}},enable:function(){if(this.field){this.field.disabled=false}},focus:function(){if(this.field){this.field.focus()}},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{minLength:{title:"Minimal Length",description:"Minimal length of the property value.",type:"number"},maxLength:{title:"Maximum Length",description:"Maximum length of the property value.",type:"number"},pattern:{title:"Pattern",description:"Regular expression for the property value.",type:"string"}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{"default":{helper:"Field default value",type:"text"},minLength:{type:"integer"},maxLength:{type:"integer"},pattern:{type:"text"}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{size:{title:"Field Size",description:"Field size.",type:"number","default":40},maskString:{title:"Mask Expression",description:"Expression for the field mask. Field masking will be enabled if not empty.",type:"string"},placeholder:{title:"Field Placeholder",description:"Field placeholder.",type:"string"},typeahead:{title:"Type Ahead",description:"Provides configuration for the $.typeahead plugin if it is available. For full configuration options, see: https://github.com/twitter/typeahead.js"},allowOptionalEmpty:{title:"Allow Optional Empty",description:"Allows this non-required field to validate when the value is empty"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{size:{type:"integer"},maskString:{helper:"a - an alpha character;9 - a numeric character;* - an alphanumeric character",type:"text"},typeahead:{type:"object"},allowOptionalEmpty:{type:"checkbox"}}})},getTitle:function(){return"Single-Line Text"},getDescription:function(){return"Text field for single-line text."},getType:function(){return"string"},getFieldType:function(){return"text"}});a.registerTemplate("controlFieldText",'');a.registerMessages({invalidPattern:"This field should have pattern {0}",stringTooShort:"This field should contain at least {0} numbers or characters",stringTooLong:"This field should contain at most {0} numbers or characters"});a.registerFieldClass("text",a.Fields.TextField);a.registerDefaultSchemaFieldMapping("string","text")})(jQuery);(function(b){var a=b.alpaca;a.Fields.TextAreaField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.options.rows){this.options.rows=5}if(!this.options.cols){this.options.cols=40}this.controlFieldTemplateDescriptor=this.view.getTemplateDescriptor("controlFieldTextarea")},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-textarea")}},handleValidate:function(){var e=this.base();var d=this.validation;var c=this._validateWordCount();d.wordLimitExceeded={message:c?"":a.substituteTokens(this.view.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:c};return e&&d.wordLimitExceeded["status"]},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var d=this.data;if(d){var c=d.split(" ").length;if(c>this.options.wordlimit){return false}}}return true},setValue:function(c){b(this.field).val(c);this.base(c)},getValue:function(){return b(this.field).val()},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{rows:{title:"Rows",description:"Number of rows",type:"number","default":5},cols:{title:"Columns",description:"Number of columns",type:"number","default":40},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number","default":-1}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{rows:{type:"integer"},cols:{type:"integer"},wordlimit:{type:"integer"}}})},getTitle:function(){return"Multi-Line Text"},getDescription:function(){return"Textarea field for multiple line text."},getFieldType:function(){return"textarea"}});a.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded."});a.registerTemplate("controlFieldTextarea",'');a.registerFieldClass("textarea",a.Fields.TextAreaField)})(jQuery);(function(b){var a=b.alpaca;a.Fields.CheckBoxField=a.ControlField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.options.rightLabel){this.options.rightLabel=""}},onClick:function(c){this.renderValidationState()},renderField:function(d){var e=this;var c=this.view.getTemplateDescriptor("controlFieldCheckbox");if(c){this.field=e.view.tmpl(c,{id:this.getId(),name:this.name,options:this.options});this.injectField(this.field);this.field=b('input[id="'+this.getId()+'"]',this.field);if(this.data){this.setValue(true)}}if(d){d()}},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-checkbox")}},getValue:function(){return a.checked(this.field)},setValue:function(c){if(a.isString(c)){c=(c==="true")}a.checked(this.field,c);this.base(c)},disable:function(){this.field.disabled=true},enable:function(){this.field.disabled=false},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{rightLabel:{title:"Option Label",description:"Optional right-hand side label for checkbox field.",type:"string"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{rightLabel:{type:"text"}}})},getTitle:function(){return"Checkbox Field"},getDescription:function(){return"Checkbox Field for boolean data."},getType:function(){return"boolean"},getFieldType:function(){return"checkbox"}});a.registerTemplate("controlFieldCheckbox",'{{if options.rightLabel}}{{/if}}');a.registerFieldClass("checkbox",a.Fields.CheckBoxField);a.registerDefaultSchemaFieldMapping("boolean","checkbox")})(jQuery);(function(b){var a=b.alpaca;a.Fields.FileField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();this.controlFieldTemplateDescriptor=this.view.getTemplateDescriptor("controlFieldFile")},setValue:function(d){var c=this.field;this.field=b(".alpaca-filefield-control",this.fieldContainer);this.base(d);this.field=c},onChange:function(c){this.base(c);if(this.options.selectionHandler){this.processSelectionHandler(c.target.files)}},processSelectionHandler:function(g){if(g&&g.length>0){if(typeof(FileReader)!=="undefined"){var e=[];var f=0;var c=new FileReader();c.onload=(function(){var h=this;return function(j){var i=j.target.result;e.push(i);f++;if(f===g.length){h.options.selectionHandler.call(h,g,e)}}}).call(this);for(var d=0;d');a.registerFieldClass("file",a.Fields.FileField)})(jQuery);(function(b){var a=b.alpaca;a.Fields.ListField=a.ControlField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){var c=this;c.base();c.selectOptions=[];if(c.getEnum()){b.each(c.getEnum(),function(d,e){var f=e;if(c.options.optionLabels){if(!a.isEmpty(c.options.optionLabels[d])){f=c.options.optionLabels[d]}else{if(!a.isEmpty(c.options.optionLabels[e])){f=c.options.optionLabels[e]}}}c.selectOptions.push({value:e,text:f})})}},getEnum:function(){if(this.schema&&this.schema["enum"]){return this.schema["enum"]}},getValue:function(c){var d=this;if(a.isArray(c)){b.each(c,function(e,f){b.each(d.selectOptions,function(h,g){if(g.value==f){c[e]=g.value}})})}else{b.each(this.selectOptions,function(f,e){if(e.value==c){c=e.value}})}return c},renderField:function(e){var f=this;if(this.options.dataSource){if(a.isFunction(this.options.dataSource)){this.options.dataSource(this,function(){f._renderField(e)})}else{if(a.isUri(this.options.dataSource)){b.ajax({url:this.options.dataSource,type:"get",dataType:"json",success:function(h){var g=h;if(f.options.dsTransformer&&a.isFunction(f.options.dsTransformer)){g=f.options.dsTransformer(g)}if(g){if(a.isArray(g)){b.each(g,function(i,j){f.selectOptions.push({value:j,text:j})})}if(a.isObject(g)){b.each(g,function(i,j){f.selectOptions.push({value:i,text:j})})}}f._renderField(e)},error:function(g,i,h){f.errorCallback({message:"Unable to load data from uri : "+f.options.dataSource,stage:"DATASOURCE_LOADING_ERROR",details:{jqXHR:g,textStatus:i,errorThrown:h}})}})}else{var d=this.options.dataSource;if(f.options.dsTransformer&&a.isFunction(f.options.dsTransformer)){d=f.options.dsTransformer(d)}if(d){if(a.isArray(d)){b.each(d,function(g,h){f.selectOptions.push({value:h,text:h})})}if(a.isObject(d)){for(var c in d){f.selectOptions.push({value:c,text:d[c]})}}f._renderField(e)}}}}else{this._renderField(e)}},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{"enum":{title:"Enumeration",description:"List of field value options",type:"array",required:true}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{optionLabels:{title:"Option Labels",description:"Labels for options. It can either be a map object or an array field that maps labels to items defined by enum schema property one by one.",type:"array"},dataSource:{title:"Option Datasource",description:"Datasource for generating list of options.",type:"string"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{optionLabels:{itemLabel:"Label",type:"array"},dataSource:{type:"text"}}})}})})(jQuery);(function(b){var a=b.alpaca;a.Fields.RadioField=a.Fields.ListField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(this.options.name){this.name=this.options.name}else{if(!this.name){this.name=this.getId()+"-name"}}if(a.isUndefined(this.options.emptySelectFirst)){this.options.emptySelectFirst=false}},getValue:function(){var c=this.base(b("input:radio[name="+this.name+"]:checked",this.field).val());b.each(this.selectOptions,function(){if(String(this["value"])==c){c=this["value"]}});return c},setValue:function(c){if(c!=this.getValue()){b.each(b("input:radio[name="+this.name+"]",this.field),function(){if(b(this).val()==c){b(this).attr("checked","checked")}else{b(this).removeAttr("checked")}});if(this.options.emptySelectFirst){if(b("input:radio:checked",this.field).length===0){b("input:radio:first",this.field).attr("checked","checked")}}this.base(c)}},_renderField:function(d){var e=this;var c=this.view.getTemplateDescriptor("controlFieldRadio");if(c){this.field=e.view.tmpl(c,{id:this.getId(),options:this.options,selectOptions:this.selectOptions,required:this.schema.required,name:this.name,data:this.data});if(this.options.emptySelectFirst&&this.selectOptions&&this.selectOptions.length>0){this.data=this.selectOptions[0].value;if(b("input:radio:checked",this.field).length===0){b("input:radio:first",this.field).attr("checked","checked")}}if(this.options.vertical){b(".alpaca-controlfield-radio-item",this.field).css("display","block")}this.injectField(this.field)}if(d){d()}},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-radio")}},onClick:function(c){this.base(c);var d=this;a.later(25,this,function(){var e=d.getValue();d.setValue(e);d.renderValidationState()})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{name:{title:"Field name",description:"Field name.",type:"string"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":false},vertical:{title:"Position the radio selector items vertically",description:"When true, the radio selector items will be stacked vertically and not horizontally",type:"boolean","default":false}}})},getTitle:function(){return"Radio Group Field"},getDescription:function(){return"Radio Group Field with list of options."},getFieldType:function(){return"radio"}});a.registerTemplate("controlFieldRadio",'
');a.registerMessages({notEnoughItems:"The minimum number of items is {0}",tooManyItems:"The maximum number of items is {0}",valueNotUnique:"Values are not unique",notAnArray:"This value is not an Array"});a.registerFieldClass("array",a.Fields.ArrayField);a.registerDefaultSchemaFieldMapping("array","array")})(jQuery);(function(b){var a=b.alpaca;a.Fields.ObjectField=a.ContainerField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();this.wizardPreIcon="";this.wizardNextIcon="";this.wizardDoneIcon="";if(this.view.style&&a.styleInjections[this.view.style]){if(a.styleInjections[this.view.style]["wizardPreIcon"]){this.wizardPreIcon=a.styleInjections[this.view.style]["wizardPreIcon"]}if(a.styleInjections[this.view.style]["wizardNextIcon"]){this.wizardNextIcon=a.styleInjections[this.view.style]["wizardNextIcon"]}if(a.styleInjections[this.view.style]["wizardDoneIcon"]){this.wizardDoneIcon=a.styleInjections[this.view.style]["wizardDoneIcon"]}}if(a.isEmpty(this.data)){return}if(!a.isObject(this.data)){if(!a.isString(this.data)){return}else{try{this.data=a.parseJSON(this.data);if(!a.isObject(this.data)){a.logWarn("ObjectField parsed data but it was not an object: "+JSON.stringify(this.data));return}}catch(c){return}}}},setValue:function(f){if(!f||!a.isObject(f)){return}for(var c in this.childrenById){var g=this.childrenById[c].propertyId;var e=a.traverseObject(f,g);if(!a.isEmpty(e)){var d=this.childrenById[c];d.setValue(e)}}},getValue:function(){if(this.children.length===0&&!this.schema.required){return}var f={};for(var c=0;c1);if(n){n=a.copyOf(n);delete n.id}if(l){l=a.copyOf(l)}j(n,l,o)})}else{j(e,c)}},removeItem:function(d){this.children=b.grep(this.children,function(f,e){return(f.getId()!=d)});var c=this.childrenById[d];delete this.childrenById[d];if(c.propertyId){delete this.childrenByPropertyId[c.propertyId]}c.destroy();this.renderValidationState();this.triggerUpdate()},addItem:function(i,f,e,d,g,h){var j=this;var c=j.renderItemContainer(g,this,i);c.alpaca({data:d,options:e,schema:f,view:this.view.id?this.view.id:this.view,connector:this.connector,error:function(k){j.destroy();j.errorCallback.call(j,k)},notTopLevel:true,isDynamicCreation:(h||this.isDynamicCreation),render:function(l){l.parent=j;l.propertyId=i;if(j.path!="/"){l.path=j.path+"/"+i}else{l.path=j.path+i}l.render();c.attr("id",l.getId()+"-item-container");c.attr("alpaca-id",l.getId());c.addClass("alpaca-fieldset-item-container");if(a.isEmpty(g)){j.addChild(l)}else{var k=j.getIndex(g);if(k!=-1){j.addChild(l,k+1)}else{j.addChild(l)}}if(g){j.renderValidationState()}if(b(c).siblings().addBack().length>0){b(c).parent().removeClass("alpaca-fieldset-items-container-empty");b(c).siblings().addBack().removeClass("alpaca-item-container-first");b(c).siblings().addBack().removeClass("alpaca-item-container-last");b(c).siblings().addBack().first().addClass("alpaca-item-container-first");b(c).siblings().addBack().last().addClass("alpaca-item-container-last")}b(c).attr("data-alpaca-item-container-item-key",i);j.triggerUpdate()}})},renderItems:function(){var i=this;var f={};for(var g in i.data){f[g]=g}var j=i.data;if(i.schema&&i.schema.properties){j=i.schema.properties}var c=function(m){var n=[];for(var l in f){n.push(l)}if(n.length>0){a.logDebug("There were "+n.length+" extra data keys that were not part of the schema "+JSON.stringify(n))}for(var o in j){i.showOrHidePropertyBasedOnDependencies(o)}for(var o in j){i.bindDependencyFieldUpdateEvent(o)}i.renderValidationState()};var k=0;for(var h in j){k++}var d=0;for(var h in j){var e=null;if(i.data){e=i.data[h]}i.resolvePropertySchemaOptions(h,function(n,l,m){if(m){return a.throwErrorWithCallback("Circular reference detected for schema: "+n,i.errorCallback)}if(!n){a.logError("Unable to resolve schema for property: "+h)}i.addItem(h,n,l,e);delete f[h];d++;if(d===k){c()}})}},showOrHidePropertyBasedOnDependencies:function(f){var c=this;var e=this.childrenByPropertyId[f];if(!e){return a.throwErrorWithCallback("Missing property: "+f,c.errorCallback)}var d=this.determineAllDependenciesValid(f);if(d){e.show();e.onDependentReveal()}else{e.hide();e.onDependentConceal()}},determineAllDependenciesValid:function(g){var d=this;var f=this.childrenByPropertyId[g];if(!f){return a.throwErrorWithCallback("Missing property: "+g,d.errorCallback)}var c=f.schema.dependencies;if(!c){return true}var e=true;if(a.isString(c)){e=d.determineSingleDependencyValid(g,c)}else{if(a.isArray(c)){b.each(c,function(h,i){e=e&&d.determineSingleDependencyValid(g,i)})}}return e},bindDependencyFieldUpdateEvent:function(g){var d=this;var e=this.childrenByPropertyId[g];if(!e){return a.throwErrorWithCallback("Missing property: "+g,d.errorCallback)}var c=e.schema.dependencies;if(!c){return true}var f=function(j,i){var h=d.childrenByPropertyId[i];if(h){h.getEl().bind("fieldupdate",function(l){d.showOrHidePropertyBasedOnDependencies(j);for(var k in d.schema.properties){var n=d.schema.properties[k];if(n.dependencies){var m=d.childrenByPropertyId[k];if(a.isString(n.dependencies)&&n.dependencies==j){d.showOrHidePropertyBasedOnDependencies(k);m.triggerUpdate()}else{if(a.isArray(n.dependencies)){b.each(n.dependencies,function(o,p){if(p==j){d.showOrHidePropertyBasedOnDependencies(k);m.triggerUpdate()}})}}}}})}};if(a.isString(c)){f(g,c)}else{if(a.isArray(c)){b.each(c,function(h,i){f(g,i)})}}},determineSingleDependencyValid:function(h,j){var i=this.childrenByPropertyId[j];if(!i){return false}var f=false;var d=this.childrenByPropertyId[h].options.dependencies;if(!d||d.length===0){if(i.getType()==="boolean"&&!this.childrenByPropertyId[h].options.dependencies&&!i.data){f=false}else{f=!a.isValEmpty(i.data)}}else{var e=this.childrenByPropertyId[j];var c=e.data;if(e.getType()==="boolean"&&!c){c=false}if(!a.isEmpty(d[j])&&a.isFunction(d[j])){f=d[j].call(this,c)}else{f=true;if(a.isArray(d[j])){if(d[j]&&b.inArray(c,d[j])==-1){f=false}}else{if(!a.isEmpty(d[j])&&d[j]!=c){f=false}}}}var g=this.childrenByPropertyId[j];if(g&&g.isHidden()){f=false}return f},wizard:function(){var h=this;var f=this.outerEl;var d=b(".alpaca-wizard-step",f);var g=d.size();this.totalSteps=g;var e=[];if(this.wizardConfigs.stepTitles){e=this.wizardConfigs.stepTitles}else{d.each(function(k){var j={title:"",description:""};if(b(".alpaca-wizard-step-title",this)){j.title=b(".alpaca-wizard-step-title",this).html();b(".alpaca-wizard-step-title",this).hide()}if(b(".alpaca-wizard-step-description",this)){j.description=b(".alpaca-wizard-step-description",this).html();b(".alpaca-wizard-step-description",this).hide()}e.push(j)})}var c=this._renderWizardStatusBar(e);if(c){b(f).before(c)}d.each(function(o){var t=b(this).attr("id");var n="step"+o;var r=h.view.getTemplateDescriptor("wizardStep");if(r){var s=h.view.tmpl(r,{});s.attr("id",n);b(this).wrap(s)}var v=n+"-nav-bar";var q=h.view.getTemplateDescriptor("wizardNavBar");if(q){var j=h.view.tmpl(q,{});j.attr("id",v);j.addClass("alpaca-wizard-nav-bar");b(this).append(j)}var l={};var k=h.view.getLayout().bindings;for(var p in k){var u=k[p];if(u==t){l[p]=t}}var m=function(w,i){return function(){var x=true;if(h.wizardConfigs&&h.wizardConfigs.validation){if(i){b.each(i,function(z,y){x=x&h.childrenByPropertyId[z].validate();h.childrenByPropertyId[z].renderValidationState()})}}return x}}(o,l);if(o===0){h._createNextButton(o,true,m);h._selectStep(o)}else{if(o==g-1){b("#step"+o).hide();h._createPrevButton(o,false);h._createDoneButton(o,true,m)}else{b("#step"+o).hide();h._createPrevButton(o,false);h._createNextButton(o,true,m)}}})},autoWizard:function(){var l=this;var d=this.wizardConfigs.steps;if(!d){d=1}this.totalSteps=d;var e=this.wizardConfigs.bindings;if(!e){e={}}for(var k in this.childrenByPropertyId){if(!e.hasOwnProperty(k)){e[k]=1}}for(var j=0;j")}}},_createNextButton:function(f,c,d){if(this.wizardConfigs.buttons&&this.wizardConfigs.buttons.next){if(!this.wizardConfigs.buttons.next.validateOnClick){d=null}}var j="step"+f;var h=this;var g=this.view.getTemplateDescriptor("wizardNextButton");if(g){var e=h.view.tmpl(g,{});e.attr("id",j+"-button-next");e.addClass("alpaca-wizard-button-next");if(h.buttonBeautifier){h.buttonBeautifier.call(h,e,this.wizardNextIcon,true)}e.click(function(l,k,i){return function(){var m=true;if(i){m=i(l,k)}if(m){b("#"+l).hide();b("#step"+(k+1)).show();h._selectStep(k+1);if(h.wizardConfigs.buttons.next&&h.wizardConfigs.buttons.next.onClick){h.wizardConfigs.buttons.next.onClick()}}return false}}(j,f,d));b("#"+j+"-nav-bar").append(e);if(c){b("#"+j+"-nav-bar").parent().append("")}}},_createDoneButton:function(f,c,d){if(this.wizardConfigs.buttons&&this.wizardConfigs.buttons.done){if(!this.wizardConfigs.buttons.done.validateOnClick){d=null}}var j="step"+f;var h=this;var g=this.view.getTemplateDescriptor("wizardDoneButton");if(g){var e=h.view.tmpl(g,{});e.attr("id",j+"-button-done");e.addClass("alpaca-wizard-button-done");if(h.buttonBeautifier){h.buttonBeautifier.call(h,e,this.wizardDoneIcon,true)}e.click(function(l,k,i){return function(){var m=true;if(i){m=i(l,k)}if(m){b("#"+l+"-nav-bar").append(e);if(c){b("#"+l+"-nav-bar").parent().append("")}if(h.wizardConfigs.buttons.done&&h.wizardConfigs.buttons.done.onClick){h.wizardConfigs.buttons.done.onClick()}}return false}}(j,f,d));b("#"+j+"-nav-bar").append(e);if(c){b("#"+j+"-nav-bar").parent().append("")}}},_selectStep:function(d){var c=b("#"+this.getId()+"-wizard-status-bar li");c.removeClass("current current-has-next");this.getStyleInjection("wizardUnCurrentStep",c);var e=b("#stepDesc"+d);e.addClass("current");this.getStyleInjection("wizardCurrentStep",e);if(d');a.registerFieldClass("any",a.Fields.AnyField);a.registerDefaultSchemaFieldMapping("any","any")})(jQuery);(function(b){var a=b.alpaca;a.Fields.HiddenField=a.ControlField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.options.size){this.options.size=40}this.controlFieldTemplateDescriptor=this.view.getTemplateDescriptor("controlFieldHidden")},renderField:function(c){var d=this;if(this.controlFieldTemplateDescriptor){this.field=d.view.tmpl(this.controlFieldTemplateDescriptor,{id:this.getId(),name:this.name,options:this.options});this.injectField(this.field)}if(c){c()}},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-hidden")}},getValue:function(){return this.field.val()},setValue:function(c){if(a.isEmpty(c)){this.field.val("")}else{this.field.val(c)}this.base(c)},getTitle:function(){return"Hidden"},getDescription:function(){return"Field for a hidden HTML input"},getType:function(){return"string"},getFieldType:function(){return"hidden"}});a.registerTemplate("controlFieldHidden",'');a.registerFieldClass("hidden",a.Fields.HiddenField)})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_BASE",messages:{zh_CN:{required:"此域必须",invalid:"此域不合格",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],timeUnits:{SECOND:"秒",MINUTE:"分",HOUR:"时",DAY:"日",MONTH:"月",YEAR:"年"},notOptional:"此域非任选",disallowValue:"非法输入包括 {0}.",invalidValueOfEnum:"允许输入包括 {0}.",notEnoughItems:"最小个数 {0}",tooManyItems:"最大个数 {0}",valueNotUnique:"输入值不独特",notAnArray:"不是数组",invalidDate:"日期格式因该是 {0}",invalidEmail:"伊妹儿格式不对, ex: info@cloudcms.com",stringNotAnInteger:"不是整数.",invalidIPv4:"不是合法IP地址, ex: 192.168.0.1",stringValueTooSmall:"最小值是 {0}",stringValueTooLarge:"最大值是 {0}",stringValueTooSmallExclusive:"值必须大于 {0}",stringValueTooLargeExclusive:"值必须小于 {0}",stringDivisibleBy:"值必须能被 {0} 整除",stringNotANumber:"不是数字.",invalidPassword:"非法密码",invalidPhone:"非法电话号码, ex: (123) 456-9999",invalidPattern:"此域须有格式 {0}",stringTooShort:"此域至少长度 {0}",stringTooLong:"此域最多长度 {0}"}}})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_BASE",messages:{es_ES:{required:"Este campo es obligatorio",invalid:"Este campo es inválido",months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],timeUnits:{SECOND:"segundos",MINUTE:"minutos",HOUR:"horas",DAY:"días",MONTH:"meses",YEAR:"años"},notOptional:"Este campo no es opcional.",disallowValue:"{0} son los valores rechazados.",invalidValueOfEnum:"Este campo debe tener uno de los valores adentro {0}.",notEnoughItems:"El número mínimo de artículos es {0}",tooManyItems:"El número máximo de artículos es {0}",valueNotUnique:"Los valores no son únicos",notAnArray:"Este valor no es un arsenal",invalidDate:"Fecha inválida para el formato {0}",invalidEmail:"Email address inválido, ex: info@cloudcms.com",stringNotAnInteger:"Este valor no es un número entero.",invalidIPv4:"Dirección inválida IPv4, ex: 192.168.0.1",stringValueTooSmall:"El valor mínimo para este campo es {0}",stringValueTooLarge:"El valor míximo para este campo es {0}",stringValueTooSmallExclusive:"El valor de este campo debe ser mayor que {0}",stringValueTooLargeExclusive:"El valor de este campo debe ser menos que {0}",stringDivisibleBy:"El valor debe ser divisible cerca {0}",stringNotANumber:"Este valor no es un número.",invalidPassword:"Contraseña inválida",invalidPhone:"Número de teléfono inválido, ex: (123) 456-9999",invalidPattern:"Este campo debe tener patrón {0}",stringTooShort:"Este campo debe contener por lo menos {0} números o caracteres",stringTooLong:"Este campo debe contener a lo más {0} números o caracteres"}}})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_BASE",messages:{fr_FR:{required:"Ce champ est requis",invalid:"Ce champ est invalide",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],timeUnits:{SECOND:"secondes",MINUTE:"minutes",HOUR:"heures",DAY:"jours",MONTH:"mois",YEAR:"années"},notOptional:"Ce champ n'est pas optionnel.",disallowValue:"{0} sont des valeurs interdites.",invalidValueOfEnum:"Ce champ doit prendre une des valeurs suivantes : {0}.",notEnoughItems:"Le nombre minimum d'éléments est {0}",tooManyItems:"Le nombre maximum d'éléments est {0}",valueNotUnique:"Les valeurs sont uniques",notAnArray:"Cette valeur n'est pas une liste",invalidDate:"Cette date ne correspond pas au format {0}",invalidEmail:"Adresse de courriel invalide, ex: info@cloudcms.com",stringNotAnInteger:"Cette valeur n'est pas un nombre entier.",invalidIPv4:"Adresse IPv4 invalide, ex: 192.168.0.1",stringValueTooSmall:"La valeur minimale pour ce champ est {0}",stringValueTooLarge:"La valeur maximale pour ce champ est {0}",stringValueTooSmallExclusive:"La valeur doit-être supérieure à {0}",stringValueTooLargeExclusive:"La valeur doit-être inférieure à {0}",stringDivisibleBy:"La valeur doit-être divisible par {0}",stringNotANumber:"Cette valeur n'est pas un nombre.",invalidPassword:"Mot de passe invalide",invalidPhone:"Numéro de téléphone invalide, ex: (123) 456-9999",invalidPattern:"Ce champ doit correspondre au motif {0}",stringTooShort:"Ce champ doit contenir au moins {0} caractères",stringTooLong:"Ce champ doit contenir au plus {0} caractères"}}})})(jQuery);(function(b){var a=b.alpaca;a.registerView({id:"VIEW_BASE",messages:{de_AT:{required:"Eingabe erforderlich",invalid:"Eingabe invalid",months:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],timeUnits:{SECOND:"Sekunden",MINUTE:"Minuten",HOUR:"Stunden",DAY:"Tage",MONTH:"Monate",YEAR:"Jahre"},notOptional:"Dieses Feld ist nicht optional",disallowValue:"Diese Werte sind nicht erlaubt: {0}",invalidValueOfEnum:"Diese Feld sollte einen der folgenden Werte enthalten: {0}",notEnoughItems:"Die Mindestanzahl von Elementen ist {0}",tooManyItems:"Die Maximalanzahl von Elementen ist {0}",valueNotUnique:"Diese Werte sind nicht eindeutig",notAnArray:"Keine Liste von Werten",invalidDate:"Falsches Datumsformat: {0}",invalidEmail:"Ungültige e-Mail Adresse, z.B.: info@cloudcms.com",stringNotAnInteger:"Eingabe ist keine Ganz Zahl.",invalidIPv4:"Ungültige IPv4 Adresse, z.B.: 192.168.0.1",stringValueTooSmall:"Die Mindestanzahl von Zeichen ist {0}",stringValueTooLarge:"Die Maximalanzahl von Zeichen ist {0}",stringValueTooSmallExclusive:"Die Anzahl der Zeichen muss größer sein als {0}",stringValueTooLargeExclusive:"Die Anzahl der Zeichen muss kleiner sein als {0}",stringDivisibleBy:"Der Wert muss durch {0} dividierbar sein",stringNotANumber:"Die Eingabe ist keine Zahl",invalidPassword:"Ungültiges Passwort.",invalidPhone:"Ungültige Telefonnummer, z.B.: (123) 456-9999",invalidPattern:"Diese Feld stimmt nicht mit folgender Vorgabe überein {0}",stringTooShort:"Dieses Feld sollte mindestens {0} Zeichen enthalten",stringTooLong:"Dieses Feld sollte höchstens {0} Zeichen enthalten"}}})})(jQuery);
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/
+(function(b){var a=b.alpaca;a.Fields.AddressField=a.Fields.ObjectField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();this.schema={title:"Home Address",type:"object",properties:{street:{title:"Street",type:"array",items:{type:"string",maxLength:30,minItems:0,maxItems:3}},city:{title:"City",type:"string"},state:{title:"State",type:"string","enum":["AL","AK","AS","AZ","AR","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PW","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"]},zip:{title:"Zip Code",type:"string",pattern:/^(\d{5}(-\d{4})?)?$/}}};a.merge(this.options,{fields:{zip:{maskString:"99999",size:5},state:{optionLabels:["ALABAMA","ALASKA","AMERICANSAMOA","ARIZONA","ARKANSAS","CALIFORNIA","COLORADO","CONNECTICUT","DELAWARE","DISTRICTOFCOLUMBIA","FEDERATEDSTATESOFMICRONESIA","FLORIDA","GEORGIA","GUAM","HAWAII","IDAHO","ILLINOIS","INDIANA","IOWA","KANSAS","KENTUCKY","LOUISIANA","MAINE","MARSHALLISLANDS","MARYLAND","MASSACHUSETTS","MICHIGAN","MINNESOTA","MISSISSIPPI","MISSOURI","MONTANA","NEBRASKA","NEVADA","NEWHAMPSHIRE","NEWJERSEY","NEWMEXICO","NEWYORK","NORTHCAROLINA","NORTHDAKOTA","NORTHERNMARIANAISLANDS","OHIO","OKLAHOMA","OREGON","PALAU","PENNSYLVANIA","PUERTORICO","RHODEISLAND","SOUTHCAROLINA","SOUTHDAKOTA","TENNESSEE","TEXAS","UTAH","VERMONT","VIRGINISLANDS","VIRGINIA","WASHINGTON","WESTVIRGINIA","WISCONSIN","WYOMING"]}}});if(a.isEmpty(this.options.addressValidation)){this.options.addressValidation=true}},getAddress:function(){var d=this.getValue();if(this.view.type=="view"){d=this.data}var c="";if(d){if(d.street){b.each(d.street,function(e,f){c+=f+" "})}if(d.city){c+=d.city+" "}if(d.state){c+=d.state+" "}if(d.zip){c+=d.zip}}return c},renderField:function(c){this.base();var e=this;b(this.fieldContainer).addClass("alpaca-addressfield");if(this.options.addressValidation&&!this.isDisplayOnly()){b('').appendTo(this.fieldContainer);var d=b('
Google Map
').appendTo(this.fieldContainer);if(d.button){d.button({text:true})}d.click(function(){if(google&&google.maps){var g=new google.maps.Geocoder();var f=e.getAddress();if(g){g.geocode({address:f},function(k,i){if(i==google.maps.GeocoderStatus.OK){var j=e.getId()+"-map-canvas";if(b("#"+j).length===0){b("").appendTo(e.fieldContainer)}var l=new google.maps.Map(document.getElementById(e.getId()+"-map-canvas"),{zoom:10,center:k[0].geometry.location,mapTypeId:google.maps.MapTypeId.ROADMAP});var h=new google.maps.Marker({map:l,position:k[0].geometry.location})}else{e.displayMessage("Geocoding failed: "+i)}})}}else{e.displayMessage("Google Map API is not installed.")}}).wrap("");if(this.options.showMapOnLoad){d.click()}}if(c){c()}},isContainer:function(){return false},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":true},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})},getTitle:function(){return"Address"},getDescription:function(){return"Standard US Address with Street, City, State and Zip. Also comes with support for Google map."},getType:function(){return"any"},getFieldType:function(){return"address"}});a.registerFieldClass("address",a.Fields.AddressField)})(jQuery);(function(b){var a=b.alpaca;a.Fields.DateField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.options.dateFormat){this.options.dateFormat=a.defaultDateFormat}if(!this.options.dateFormatRegex){this.options.dateFormatRegex=a.regexps.date}},postRender:function(){this.base();if(this.field&&b.datepicker){var c=this.options.datepicker;if(!c){c={changeMonth:true,changeYear:true}}if(!c.dateFormat){c.dateFormat=this.options.dateFormat}this.field.datepicker(c);if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-date")}}},onChange:function(c){this.base();this.renderValidationState()},handleValidate:function(){var e=this.base();var d=this.validation;var c=this._validateDateFormat();d.invalidDate={message:c?"":a.substituteTokens(this.view.getMessage("invalidDate"),[this.options.dateFormat]),status:c};return e&&d.invalidDate["status"]},_validateDateFormat:function(){var c=this.field.val();if(b.datepicker){try{b.datepicker.parseDate(this.options.dateFormat,c);return true}catch(d){return false}}else{return c.match(this.options.dateFormatRegex)}},setValue:function(c){if(c===""){this.base(c);return}this.base(c)},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{format:{title:"Format",description:"Property data format",type:"string","default":"date","enum":["date"],readonly:true}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{format:{type:"text"}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{dateFormat:{title:"Date Format",description:"Date format",type:"string","default":a.defaultDateFormat},dateFormatRegex:{title:"Format Regular Expression",description:"Regular expression for validation date format",type:"string","default":a.regexps.date},datepicker:{title:"Date Picker options",description:"Optional configuration to be passed to jQuery UI DatePicker control",type:"any"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{dateFormat:{type:"text"},dateFormatRegex:{type:"text"},datetime:{type:"any"}}})},getTitle:function(){return"Date Field"},getDescription:function(){return"Date Field."},getFieldType:function(){return"date"}});a.registerMessages({invalidDate:"Invalid date for format {0}"});a.registerFieldClass("date",a.Fields.DateField);a.registerDefaultFormatFieldMapping("date","date")})(jQuery);(function(b){var a=b.alpaca;a.Fields.DatetimeField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base()},postRender:function(){var c=this;this.base();if(this.field){if(this.field.datetimepicker){this.field.hover(function(){if(!b(this).hasClass("hasDatepicker")){var d=c.options.timepicker;if(!d){d=c.options.timepicker}if(!d){d={changeYear:true,changeMonth:true}}b(this).datetimepicker(d)}});if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-datetime")}}}},setValue:function(c){if(c){if(a.isNumber()){c=new Date(c)}if(Object.prototype.toString.call(c)=="[object Date]"){this.base((c.getMonth()+1)+"/"+c.getDate()+"/"+c.getFullYear()+" "+c.getHours()+":"+c.getMinutes())}else{this.base(c)}}else{this.base(c)}},getValue:function(){return this.base()},getDatetime:function(){try{return this.field.datetimepicker("getDate")}catch(c){return this.getValue()}},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{timepicker:{title:"Timepicker options",description:"Options that are supported by the jQuery timepicker addon.",type:"any"}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{timepicker:{type:"any"}}})},getTitle:function(){return"Datetime Field"},getDescription:function(){return"Datetime Field based on Trent Richardson's jQuery timepicker addon."},getFieldType:function(){return"datetime"}});a.registerFieldClass("datetime",a.Fields.DatetimeField);a.registerDefaultFormatFieldMapping("datetime","datetime")})(jQuery);(function(b){var a=b.alpaca;a.Fields.EditorField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();this.controlFieldTemplateDescriptor=this.view.getTemplateDescriptor("controlFieldEditor")},postRender:function(){this.base();var d=this;if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-editor");b(this.fieldContainer).parent().css("width","100%");var e=this.options.aceHeight;if(e){b(this.fieldContainer).css("height",e)}var c=this.options.aceWidth;if(!c){c="100%"}b(this.fieldContainer).css("width",c)}var g=b(this.fieldContainer).find(".control-field-editor-el")[0];if(!ace&&window.ace){ace=window.ace}this.editor=ace.edit(g);var f=this.options.aceTheme;if(!f){f="ace/theme/chrome"}this.editor.setTheme(f);var i=this.options.aceMode;if(!i){i="ace/mode/json"}this.editor.getSession().setMode(i);this.editor.renderer.setHScrollBarAlwaysVisible(false);this.editor.setShowPrintMargin(false);this.editor.setValue(this.data);this.editor.clearSelection();if(this.options.aceFitContentHeight){var h=function(){var j=d.editor.getSession().getScreenLength()*d.editor.renderer.lineHeight+d.editor.renderer.scrollBar.getWidth();b(d.fieldContainer).height(j.toString()+"px");d.editor.resize()};h();d.editor.getSession().on("change",h)}if(this.schema.readonly){this.editor.setReadOnly(true)}b(g).bind("destroyed",function(){if(d.editor){d.editor.destroy();d.editor=null}})},destroy:function(){if(this.editor){this.editor.destroy();this.editor=null}this.base()},getEditor:function(){return this.editor},handleValidate:function(){var e=this.base();var d=this.validation;var c=this._validateWordCount();d.wordLimitExceeded={message:c?"":a.substituteTokens(this.view.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:c};return e&&d.wordLimitExceeded["status"]},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var d=this.editor.getValue();if(d){var c=d.split(" ").length;if(c>this.options.wordlimit){return false}}}return true},onDependentReveal:function(){this.editor.resize()},setValue:function(d){var c=this;if(this.editor){this.editor.setValue(d)}this.base(d)},getValue:function(){var c=null;if(this.editor){c=this.editor.getValue()}return c},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{aceTheme:{title:"ACE Editor Theme",description:"Specifies the theme to set onto the editor instance",type:"string","default":"ace/theme/twilight"},aceMode:{title:"ACE Editor Mode",description:"Specifies the mode to set onto the editor instance",type:"string","default":"ace/mode/javascript"},aceWidth:{title:"ACE Editor Height",description:"Specifies the width of the wrapping div around the editor",type:"string","default":"100%"},aceHeight:{title:"ACE Editor Height",description:"Specifies the height of the wrapping div around the editor",type:"string","default":"300px"},aceFitContentHeight:{title:"ACE Fit Content Height",description:"Configures the ACE Editor to auto-fit its height to the contents of the editor",type:"boolean","default":false},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number","default":-1}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{aceTheme:{type:"text"},aceMode:{type:"text"},wordlimit:{type:"integer"}}})},getTitle:function(){return"Editor"},getDescription:function(){return"Editor"},getFieldType:function(){return"editor"}});a.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded."});a.registerTemplate("controlFieldEditor",'');a.registerFieldClass("editor",a.Fields.EditorField)})(jQuery);(function(b){var a=b.alpaca;a.Fields.EmailField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.schema.pattern){this.schema.pattern=a.regexps.email}},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-email")}},handleValidate:function(){var d=this.base();var c=this.validation;if(!c.invalidPattern["status"]){c.invalidPattern["message"]=this.view.getMessage("invalidEmail")}return d},getSchemaOfSchema:function(){var c=(this.schema&&this.schema.pattern)?this.schema.pattern:a.regexps.email;return a.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":c,"enum":[c],readonly:true},format:{title:"Format",description:"Property data format",type:"string","default":"email","enum":["email"],readonly:true}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{format:{type:"text"}}})},getTitle:function(){return"Email Field"},getDescription:function(){return"Email Field."},getFieldType:function(){return"email"}});a.registerMessages({invalidEmail:"Invalid Email address e.g. info@cloudcms.com"});a.registerFieldClass("email",a.Fields.EmailField);a.registerDefaultFormatFieldMapping("email","email")})(jQuery);(function(b){var a=b.alpaca;a.Fields.IntegerField=a.Fields.NumberField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},getValue:function(){var c=this.field.val();if(a.isValEmpty(c)){return -1}else{return parseInt(c,10)}},onChange:function(c){this.base();if(this.slider){this.slider.slider("value",this.getValue())}},postRender:function(){this.base();var c=this;if(this.options.slider){if(!a.isEmpty(this.schema.maximum)&&!a.isEmpty(this.schema.minimum)){if(this.field){this.field.after('');this.slider=b("#slider",this.field.parent()).slider({value:this.getValue(),min:this.schema.minimum,max:this.schema.maximum,slide:function(d,e){c.setValue(e.value);c.renderValidationState()}})}}}if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-integer")}},handleValidate:function(){var d=this.base();var c=this.validation;if(!c.stringNotANumber["status"]){c.stringNotANumber["message"]=this.view.getMessage("stringNotAnInteger")}return d},_validateNumber:function(){var c=this.field.val();if(a.isValEmpty(c)){return true}var d=this.getValue();if(isNaN(d)){return false}if(!c.match(a.regexps.integer)){return false}return true},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{minimum:{title:"Minimum",description:"Minimum value of the property.",type:"integer"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"integer"},divisibleBy:{title:"Divisible By",description:"Property value must be divisible by this number.",type:"integer"}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{minimum:{helper:"Minimum value of the field.",type:"integer"},maximum:{helper:"Maximum value of the field.",type:"integer"},divisibleBy:{helper:"Property value must be divisible by this number.",type:"integer"}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{slider:{title:"Slider",description:"Generate jQuery UI slider control with the field if true.",type:"boolean","default":false}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{slider:{rightLabel:"Slider control ?",helper:"Generate slider control if selected.",type:"checkbox"}}})},getTitle:function(){return"Integer Field"},getDescription:function(){return"Field for integers."},getType:function(){return"integer"},getFieldType:function(){return"integer"}});a.registerMessages({stringNotAnInteger:"This value is not an integer."});a.registerFieldClass("integer",a.Fields.IntegerField);a.registerDefaultSchemaFieldMapping("integer","integer")})(jQuery);(function(b){var a=b.alpaca;a.Fields.IPv4Field=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();if(!this.schema.pattern){this.schema.pattern=a.regexps.ipv4}},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-ipv4")}},handleValidate:function(){var d=this.base();var c=this.validation;if(!c.invalidPattern["status"]){c.invalidPattern["message"]=this.view.getMessage("invalidIPv4")}return d},getSchemaOfSchema:function(){var c=(this.schema&&this.schema.pattern)?this.schema.pattern:a.regexps.ipv4;return a.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":c,readonly:true},format:{title:"Format",description:"Property data format",type:"string","enum":["ip-address"],"default":"ip-address",readonly:true}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{format:{type:"text"}}})},getTitle:function(){return"IP Address Field"},getDescription:function(){return"IP Address Field."},getFieldType:function(){return"ipv4"}});a.registerMessages({invalidIPv4:"Invalid IPv4 address, e.g. 192.168.0.1"});a.registerFieldClass("ipv4",a.Fields.IPv4Field);a.registerDefaultFormatFieldMapping("ip-address","ipv4")})(jQuery);(function(b){var a=b.alpaca;a.Fields.JSONField=a.Fields.TextAreaField.extend({constructor:function(f,j,h,i,e,d,g){this.base(f,j,h,i,e,d,g)},setValue:function(d){if(a.isObject(d)||typeof(d)=="object"){d=JSON.stringify(d,null,3)}this.base(d)},getValue:function(){var d=this.base();if(d&&a.isString(d)){d=JSON.parse(d)}return d},handleValidate:function(){var f=this.base();var e=this.validation;var d=this._validateJSON();e.stringNotAJSON={message:d.status?"":this.view.getMessage("stringNotAJSON")+" "+d.message,status:d.status};return f&&e.stringNotAJSON["status"]},_validateJSON:function(){var d=this.field.val();if(a.isValEmpty(d)){return{status:true}}try{var g=JSON.parse(d);this.setValue(JSON.stringify(g,null,3));return{status:true}}catch(f){return{status:false,message:f.message}}},postRender:function(){this.base();var d=this;if(this.field){this.field.bind("keypress",function(f){if(f.which==34){d.field.insertAtCaret('"')}if(f.which==123){d.field.insertAtCaret("}")}if(f.which==91){d.field.insertAtCaret("]")}});this.field.bind("keypress","Ctrl+l",function(){d.getEl().removeClass("alpaca-field-focused");d.renderValidationState()});this.field.attr("title","Type Ctrl+L to format and validate the JSON string.")}if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-json")}},getTitle:function(){return"JSON Editor"},getDescription:function(){return"Editor for JSON objects with basic validation and formatting."},getFieldType:function(){return"json"}});a.registerMessages({stringNotAJSON:"This value is not a valid JSON string."});a.registerFieldClass("json",a.Fields.JSONField);b.fn.insertAtCaret=function(d){return this.each(function(){if(document.selection){this.focus();sel=document.selection.createRange();sel.text=d;this.focus()}else{if(this.selectionStart||this.selectionStart=="0"){var f=this.selectionStart;var e=this.selectionEnd;var g=this.scrollTop;this.value=this.value.substring(0,f)+d+this.value.substring(e,this.value.length);this.focus();this.selectionStart=f;this.selectionEnd=f;this.scrollTop=g}else{this.value+=d;this.focus()}}})};jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};function c(e){if(typeof e.data!=="string"){return}var d=e.handler,f=e.data.toLowerCase().split(" ");e.handler=function(o){if(this!==o.target&&(/textarea|select/i.test(o.target.nodeName)||o.target.type==="text")){return}var j=o.type!=="keypress"&&jQuery.hotkeys.specialKeys[o.which],p=String.fromCharCode(o.which).toLowerCase(),m,n="",h={};if(o.altKey&&j!=="alt"){n+="alt+"}if(o.ctrlKey&&j!=="ctrl"){n+="ctrl+"}if(o.metaKey&&!o.ctrlKey&&j!=="meta"){n+="meta+"}if(o.shiftKey&&j!=="shift"){n+="shift+"}if(j){h[n+j]=true}else{h[n+p]=true;h[n+jQuery.hotkeys.shiftNums[p]]=true;if(n==="shift+"){h[jQuery.hotkeys.shiftNums[p]]=true}}for(var k=0,g=f.length;k');this.slider=b("#slider",this.field.parent()).slider({value:this.getValue(),min:this.schema.minimum,max:this.schema.maximum,slide:function(d,e){c.setValue(e.value);c.renderValidationState()}})}}}if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-integer")}},handleValidate:function(){var d=this.base();var c=this.validation;if(!c.stringNotANumber["status"]){c.stringNotANumber["message"]=this.view.getMessage("stringNotAnInteger")}return d},_validateNumber:function(){var c=this.field.val();if(a.isValEmpty(c)){return true}var d=this.getValue();if(isNaN(d)){return false}if(!c.match(a.regexps.integer)){return false}return true},getSchemaOfSchema:function(){return a.merge(this.base(),{properties:{minimum:{title:"Minimum",description:"Minimum value of the property.",type:"integer"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"integer"},divisibleBy:{title:"Divisible By",description:"Property value must be divisible by this number.",type:"integer"}}})},getOptionsForSchema:function(){return a.merge(this.base(),{fields:{minimum:{helper:"Minimum value of the field.",type:"integer"},maximum:{helper:"Maximum value of the field.",type:"integer"},divisibleBy:{helper:"Property value must be divisible by this number.",type:"integer"}}})},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{slider:{title:"Slider",description:"Generate jQuery UI slider control with the field if true.",type:"boolean","default":false}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{slider:{rightLabel:"Slider control ?",helper:"Generate slider control if selected.",type:"checkbox"}}})},getTitle:function(){return"Integer Field"},getDescription:function(){return"Field for integers."},getType:function(){return"integer"},getFieldType:function(){return"integer"}});a.registerMessages({stringNotAnInteger:"This value is not an integer."});a.registerFieldClass("integer",a.Fields.IntegerField);a.registerDefaultSchemaFieldMapping("integer","integer")})(jQuery);(function(b){var a=b.alpaca;a.Fields.LowerCaseField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-lowercase")}},setValue:function(d){var c=d.toLowerCase();if(c!=this.getValue()){this.base(c)}},onKeyPress:function(c){this.base(c);var d=this;a.later(25,this,function(){var e=d.getValue();d.setValue(e)})},getTitle:function(){return"Lowercase Text"},getDescription:function(){return"Text field for lowercase text."},getFieldType:function(){return"lowercase"}});a.registerFieldClass("lowercase",a.Fields.LowerCaseField);a.registerDefaultFormatFieldMapping("lowercase","lowercase")})(jQuery);(function(b){var a=b.alpaca;a.Fields.MapField=a.Fields.ArrayField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){this.base();a.mergeObject(this.options,{forceRevalidation:true});if(a.isEmpty(this.data)){return}if(!a.isArray(this.data)){if(a.isObject(this.data)){var c=[];b.each(this.data,function(d,e){var f=a.copyOf(e);f._key=d;c.push(f)});this.data=c}}},getValue:function(){if(this.children.length===0&&!this.schema.required){return}var f={};for(var e=0;e');a.registerMessages({invalidPassword:"Invalid Password"});a.registerFieldClass("password",a.Fields.PasswordField);a.registerDefaultFormatFieldMapping("password","password")})(jQuery);(function(b){var a=b.alpaca;a.Fields.PersonalNameField=a.Fields.TextField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-personalname")}},setValue:function(d){var e="";for(var c=0;cjQuery WYSIWYG plugin.",type:"any"},onDemand:{title:"On Demand",description:"If true, WYSIWYG editor will only be enabled when the field is hovered.",type:"boolean","default":false}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{wysiwyg:{type:"any"},onDemand:{type:"checkbox",rightLabel:"Make the editor on-demand?"}}})},getTitle:function(){return"Wysiwyg Editor"},getDescription:function(){return"Wysiwyg editor for multi-line text which is based on Akzhan Abdulin's jQuery WYSIWYG plugin."},getFieldType:function(){return"wysiwyg"}});a.registerFieldClass("wysiwyg",a.Fields.WysiwygField)})(jQuery);(function(b){var a=b.alpaca;a.Fields.StateField=a.Fields.SelectField.extend({constructor:function(e,i,g,h,d,c,f){this.base(e,i,g,h,d,c,f)},setup:function(){if(a.isUndefined(this.options.capitalize)){this.options.capitalize=false}if(a.isUndefined(this.options.includeStates)){this.options.includeStates=true}if(a.isUndefined(this.options.includeTerritories)){this.options.includeTerritories=true}if(a.isUndefined(this.options.format)){this.options.format="name"}if(this.options.format=="name"||this.options.format=="code"){}else{a.logError("The configured state format: "+this.options.format+" is not a legal value [name, code]");this.options.format="name"}var c=a.retrieveUSHoldings(this.options.includeStates,this.options.includeTerritories,(this.options.format=="code"),this.options.capitalize);this.schema["enum"]=c.keys;this.options.optionLabels=c.values;this.base()},postRender:function(){this.base();if(this.fieldContainer){this.fieldContainer.addClass("alpaca-controlfield-state")}},handleValidate:function(){var c=this.base();return c},getSchemaOfOptions:function(){return a.merge(this.base(),{properties:{format:{title:"Format",description:"How to represent the state values in the selector",type:"string","default":"name","enum":["name","code"],readonly:true},capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean","default":false,readonly:true},includeStates:{title:"Include States",description:"Whether to include the states of the United States",type:"boolean","default":true,readonly:true},includeTerritories:{title:"Include Territories",description:"Whether to include the territories of the United States",type:"boolean","default":true,readonly:true}}})},getOptionsForOptions:function(){return a.merge(this.base(),{fields:{format:{type:"text"},capitalize:{type:"checkbox"},includeStates:{type:"checkbox"},includeTerritories:{type:"checkbox"}}})},getTitle:function(){return"State Field"},getDescription:function(){return"Provides a dropdown selector of states and/or territories in the United States, keyed by their two-character code."},getFieldType:function(){return"state"}});a.registerFieldClass("state",a.Fields.StateField);a.registerDefaultFormatFieldMapping("state","state");a.retrieveUSHoldings=function(){var c=[];c.push({name:"Arkansas",code:"AK",state:true,territory:false});c.push({name:"Alabama",code:"AL",state:true,territory:false});c.push({name:"American Samoa",code:"AS",state:false,territory:true});c.push({name:"Arizona",code:"AR",state:true,territory:false});c.push({name:"California",code:"CA",state:true,territory:false});c.push({name:"Colorado",code:"CO",state:true,territory:false});c.push({name:"Connecticut",code:"CT",state:true,territory:false});c.push({name:"Delaware",code:"DE",state:true,territory:false});c.push({name:"Distict of Columbia",code:"DC",state:false,territory:true});c.push({name:"Federated States of Micronesia",code:"FM",state:false,territory:true});c.push({name:"Florida",code:"FL",state:true,territory:false});c.push({name:"Georgia",code:"GA",state:true,territory:false});c.push({name:"Guam",code:"GU",state:false,territory:true});c.push({name:"Georgia",code:"GA",state:true,territory:false});c.push({name:"Hawaii",code:"HI",state:true,territory:false});c.push({name:"Idaho",code:"ID",state:true,territory:false});c.push({name:"Illinois",code:"IL",state:true,territory:false});c.push({name:"Indiana",code:"IN",state:true,territory:false});c.push({name:"Iowa",code:"IA",state:true,territory:false});c.push({name:"Kansas",code:"KS",state:true,territory:false});c.push({name:"Kentucky",code:"KY",state:true,territory:false});c.push({name:"Louisiana",code:"LA",state:true,territory:false});c.push({name:"Maine",code:"ME",state:true,territory:false});c.push({name:"Marshall Islands",code:"MH",state:false,territory:true});c.push({name:"Maryland",code:"MD",state:true,territory:false});c.push({name:"Massachusetts",code:"MA",state:true,territory:false});c.push({name:"Michigan",code:"MI",state:true,territory:false});c.push({name:"Minnesota",code:"MN",state:true,territory:false});c.push({name:"Mississippi",code:"MS",state:true,territory:false});c.push({name:"Missouri",code:"MO",state:true,territory:false});c.push({name:"Montana",code:"MT",state:true,territory:false});c.push({name:"Nebraska",code:"NE",state:true,territory:false});c.push({name:"Nevada",code:"NV",state:true,territory:false});c.push({name:"New Hampshire",code:"NH",state:true,territory:false});c.push({name:"New Jersey",code:"NJ",state:true,territory:false});c.push({name:"New Mexico",code:"NM",state:true,territory:false});c.push({name:"New York",code:"NY",state:true,territory:false});c.push({name:"North Carolina",code:"NC",state:true,territory:false});c.push({name:"North Dakota",code:"ND",state:true,territory:false});c.push({name:"Northern Mariana Islands",code:"MP",state:true,territory:false});c.push({name:"Ohio",code:"OH",state:true,territory:false});c.push({name:"Oklahoma",code:"OK",state:true,territory:false});c.push({name:"Oregon",code:"OR",state:true,territory:false});c.push({name:"Palau",code:"PW",state:false,territory:true});c.push({name:"Pennsylvania",code:"PA",state:true,territory:false});c.push({name:"Puerto Rico",code:"PR",state:false,territory:true});c.push({name:"Rhode Island",code:"RI",state:true,territory:false});c.push({name:"South Carolina",code:"SC",state:true,territory:false});c.push({name:"South Dakota",code:"SD",state:true,territory:false});c.push({name:"Tennessee",code:"TN",state:true,territory:false});c.push({name:"Texas",code:"TX",state:true,territory:false});c.push({name:"Utah",code:"UT",state:true,territory:false});c.push({name:"Vermont",code:"VT",state:true,territory:false});c.push({name:"Virgin Islands",code:"VI",state:false,territory:true});c.push({name:"Virginia",code:"VA",state:true,territory:false});c.push({name:"Washington",code:"WA",state:true,territory:false});c.push({name:"West Virginia",code:"WV",state:true,territory:false});c.push({name:"Wisconsin",code:"WI",state:true,territory:false});c.push({name:"Wyoming",code:"WY",state:true,territory:false});return function(l,e,h,g){var m={keys:[],values:[]};for(var f=0;fspan.ui-icon,.alpaca-controlfield-message>span.ui-icon{float:left;margin-right:.3em}input,textarea,select{border:1px solid #555;padding:2px;font-size:1em;border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}input[type="checkbox"],input[type="radio"]{border:0}input[type="file"]{border:0;box-shadow:none}select{min-width:150px}input:focus,textarea:focus{outline:0;border:1px solid #058cf5}.alpaca-field-readonly input,.alpaca-field-readonly textarea,input[readonly],textarea[readonly]{background-color:#dcdcdc;cursor:default}DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu{background-color:white;border:1px #777 solid;padding-left:10px;margin-left:2px;padding-right:10px;color:#ccc}DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu P{font-size:1em}.tt-suggestion.tt-is-under-cursor{background-color:#ccc;color:#333}.alpaca-controlfield-email>span.ui-icon,.alpaca-controlfield-date>span.ui-icon,.alpaca-controlfield-phone>span.ui-icon{float:right;margin-left:.3em}.alpaca-controlfield-helper .alpaca-controlfield-helper-text,.alpaca-controlfield-message .alpaca-controlfield-message-text,.alpaca-controlfield-email>input,.alpaca-controlfield-date>input,.alpaca-controlfield-phone>input{line-height:16px}.alpaca-controlfield-address-mapcanvas{height:300px;width:300px;margin:10px}.alpaca-controlfield-checkbox{padding-top:.4em}.alpaca-controlfield-checkbox input{margin-right:1em}.alpaca-controlfield-checkbox{*padding-top:0}.alpaca-controlfield-radio{padding-top:.5em}.alpaca-controlfield-radio input{margin-right:.3em}.alpaca-controlfield-radio-label{margin-right:.3em}.alpaca-controlfield-file-custom-input{position:absolute;height:100px;cursor:pointer;background:transparent;border:0;opacity:0;-moz-opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 0);z-index:999}.alpaca-controlfield-file-custom{width:350px;cursor:pointer;overflow:hidden;padding:2px;position:relative}.alpaca-controlfield-file-custom-disabled{opacity:.5;filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 0);cursor:default}.alpaca-controlfield-file-custom-feedback{display:block;margin:1px 1px 1px 5px;font-style:italic;padding:.3em .6em}.alpaca-controlfield-file-custom-feedback-populated{font-style:normal;font-weight:bold;padding-left:20px}.alpaca-controlfield-editor{position:relative;width:100%;height:300px;border:1px #ccc solid}.alpaca-controlfield-editor .control-field-editor-el{position:absolute;top:0;bottom:0;left:0;right:0}.alpaca-controlfield .alpaca-controlfield-json textarea{font-family:"Courier New";font-size:.9em;font-style:italic}.alpaca-controlfield-hidden{display:none}.alpaca-fieldset{padding:4px;margin:4px;overflow:auto;position:relative}fieldset.alpaca-fieldset{margin-top:.5em;margin-right:0;margin-left:0;margin-bottom:.5em}legend.alpaca-fieldset-legend{font-size:1.1em;text-align:left;bottom:-1px}.alpaca-fieldset-legend{font-size:1.0em;font-weight:bold;text-align:left}.alpaca-fieldset-helper{padding-top:10px;padding-bottom:5px;clear:both}.alpaca-fieldset-items-container{padding-top:5px;clear:both}.alpaca-fieldset-legend-link{float:left;margin-right:.3em}.alpaca-fieldset-array-item-toolbar{padding:1px;margin:0 2px 0 2px;font-size:.75em}.alpaca-fieldset-array-toolbar{padding:10px 4px}.alpaca-fieldset-array-item-toolbar-disabled{opacity:.5}.alpaca-form{margin-top:15px;margin-left:15px}.alpaca-form-buttons-container{clear:both;display:block;margin:5px 0 5px 0}.alpaca-form-button-view-switcher{position:absolute;float:left;font-size:1em;padding:8px 3px 3px;zIndex:999999}.alpaca-form-button-view-switcher ul{listStyle:none;margin:0;padding:0;overflow:auto}.alpaca-form-button-view-switcher ul li{padding:2px;margin:1px;clear:left;float:left}.alpaca-form-button-view-switcher ul li a{text-decoration:none}.alpaca-form-buttons-container input{margin-right:4px}.alpaca-form-buttons-container input.alpaca-form-button:hover{background:#ffc}div.alpaca-fieldset{display:block;border:0;margin:1.5em 1em 1em 0}.alpaca-data-container{margin:5px 5px 5px 5px;padding:5px 5px 5px 5px;display:block}.alpaca-data{text-align:left;padding-left:10px}.alpaca-data-label{float:left;min-width:100px;clear:both;font-weight:bold;display:block}.alpaca-wizard-status-bar{list-style:none;overflow:hidden;margin:10px 0 10px 0;padding:0;counter-reset:step;float:left}.alpaca-wizard-status-bar li{float:left}.alpaca-wizard-status-bar li span{display:block;font-size:1.2em}.alpaca-wizard-status-bar li div{display:block;position:relative;padding:2px 25px 2px 30px}.alpaca-wizard-status-bar li div:before{font-size:1em;position:absolute;top:50%;left:5px;margin-top:-8px;text-align:center;font-weight:bold;padding:2px 6px;counter-increment:step;content:counter(step)}.alpaca-wizard-status-bar li div strong{font-weight:normal}.alpaca-wizard-title{font-size:1.2em;margin:0;padding:10px 0;font-weight:bold}.alpaca-wizard-desc{font-size:.9em;margin:0;padding:5px 0}.alpaca-wizard-step-title{font-size:1em;margin:0;padding:10px 0;text-decoration:underline;font-weight:bold}.alpaca-wizard-nav-bar{clear:both;float:right}fieldset.alpaca-view-web-list{border-left:none;border-bottom:0;border-right:0;padding-right:3em}fieldset.alpaca-view-web-list.fieldset-collapsed{border:solid 1px}.alpaca-view-web-list .alpaca-controlfield-label{display:inline-block;vertical-align:top;padding-top:.5em}.alpaca-view-web-list .alpaca-controlfield-label{width:130px}fieldset.alpaca-view-list legend{font-size:1.01em}.alpaca-controlfield.alpaca-view-web-list{display:inline-block}SPAN.alpaca-view-web-list label.alpaca-controlfield-label{font-size:1.0em;font-weight:bold!important;text-align:left;white-space:nowrap}.alpaca-view-web-list DIV.alpaca-controlfield-container{display:inline-block}.alpaca-controlfield-label-list-view{width:100px;display:inline-block;vertical-align:top;padding-top:.5em}.alpaca-fieldset-message-list-view{float:left;margin-right:.3em}.alpaca-controlfield-item-label-list-view{width:100px;display:inline-block;vertical-align:top;padding-top:.25em}ol.alpaca-fieldset-itemscontainer-list-view-top{padding-left:0}li.alpaca-fieldset-itemcontainer-list-view-top{list-style:none}.alpaca-fieldset-items-container-empty{padding-top:0;padding-bottom:0}.alpaca-layout-two-column-mask{overflow:auto;width:100%;min-width:600px;display:inline-block}.alpaca-layout-two-column-left{overflow:auto;display:inline-block;padding:5px;vertical-align:top}.alpaca-layout-two-column-right{overflow:auto;display:inline-block;padding:5px;vertical-align:top}fieldset.alpaca-fieldset-no-legend{border:0}fieldset.alpaca-view-web-edit-yaml.alpaca-fieldset{border:solid 1px;border-radius:5px;margin:1px 0 0 0;padding-top:4px;padding-bottom:2px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend span{display:none}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend{font-size:1em}fieldset.alpaca-view-web-edit-yaml.fieldset-collapsed{border:0;margin:1px 1px 1px 1px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-expanded:after{content:url("./images/down.png");padding-left:5px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-collapsed:after{content:url("./images/left.png");padding-left:5px}fieldset.alpaca-view-web-edit-yaml span:not(.alpaca-field-focused) div.alpaca-controlfield-text input{background:0;border:0;box-shadow:none;margin-top:2px;margin-left:2px;margin-bottom:2px;margin-right:2px}fieldset.alpaca-view-web-edit-yaml{font-family:courier;padding-right:1em;padding-top:0}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-checkbox{margin-top:4px;margin-bottom:4px}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-select{margin-bottom:1px}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-radio div.alpaca-controlfield-radio{padding-top:3px;padding-bottom:4px}fieldset.alpaca-view-web-edit-yaml>input,fieldset.alpaca-view-web-edit-yaml>select,fieldset.alpaca-view-web-edit-yaml>label{font-family:courier}span.alpaca-view-web-edit-yaml .alpaca-controlfield-label{width:175px;padding-top:3px;padding-left:3px;display:inline-block;vertical-align:top}span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container{padding-top:0;padding-bottom:0}span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container>input,span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container>select{padding:1px 1px 1px 1px}fieldset.alpaca-view-web-edit-yaml span.alpaca-field{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}fieldset.alpaca-view-web-edit-yaml ol.alpaca-fieldset-items-container{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}fieldset.alpaca-view-web-edit-yaml div.alpaca-fieldset-array-item-toolbar{position:absolute;z-index:99999;right:15px}fieldset.alpaca-view-web-edit-yaml .ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:2px}.alpaca-inline .alpaca-inline-item-container{float:left}.alpaca-inline-item-container .alpaca-inline .alpaca-fieldset,.alpaca-inline-item-container .alpaca-fieldset.alpaca-inline{margin:0 1.5em;padding:0}.alpaca-inline-item-container .alpaca-fieldset-array-item-toolbar{width:60px;float:right;margin-top:.7em}.alpaca-inline .alpaca-fieldset-items-container{margin:0 1em;padding:0}.alpaca-inline select{min-width:0}#module-settings input:focus,textarea:focus{border-width:1px}
\ No newline at end of file
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-extras.min.css b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-extras.min.css
new file mode 100644
index 0000000..b892e52
--- /dev/null
+++ b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-extras.min.css
@@ -0,0 +1,22 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/
\ No newline at end of file
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui-newticketwizard.css b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui-newticketwizard.css
new file mode 100644
index 0000000..6a05f83
--- /dev/null
+++ b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui-newticketwizard.css
@@ -0,0 +1,43 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/
+/**
+ * Fix for jQuery datepicker initial state issue.
+ */
+#ui-datepicker-div
+{
+ display: none;
+ background-color:white;
+ z-index: 9999999 !important;
+ width: 22em !important;
+}
+
+/* Fix for Chrome issue with Button text */
+.ui-button .ui-button-text {
+ white-space: nowrap;
+}
+
+.ui-datepicker
+{
+ z-index: 100;
+}
+
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui.min.css b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui.min.css
new file mode 100644
index 0000000..9d3f596
--- /dev/null
+++ b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-jqueryui.min.css
@@ -0,0 +1,22 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/#ui-datepicker-div{display:none;background-color:white;z-index:9999999!important;width:22em!important}.ui-button .ui-button-text{white-space:nowrap}.ui-datepicker{z-index:100}
\ No newline at end of file
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-newticketwizard.css b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-newticketwizard.css
new file mode 100644
index 0000000..695e629
--- /dev/null
+++ b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca-newticketwizard.css
@@ -0,0 +1,945 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/
+.alpaca-hover {
+}
+
+.alpaca-clear {
+ clear: both;
+}
+
+/** Abstract Field **/
+.alpaca-field {
+ padding-top: 0px;
+}
+
+.alpaca-field-required {
+}
+
+.alpaca-field-optional {
+}
+
+.alpaca-field-valid {
+}
+
+.alpaca-field-invalid {
+}
+
+.alpaca-field-readonly {
+}
+
+/**
+ * Control Field
+ */
+.alpaca-controlfield {
+ display: block;
+ padding: 2px;
+ margin: 2px;
+ vertical-align: middle;
+}
+
+.alpaca-controlfield * {
+ /*background: transparent;*/
+}
+
+.alpaca-controlfield-container {
+ display: block;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+
+.alpaca-controlfield-label
+{
+ font-size: 1.0em;
+ font-weight: bold;
+ text-align: right;
+ margin-left: 1px;
+ float: left;
+ width: 100px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ vertical-align: middle;
+}
+
+.alpaca-controlfield-helper {
+ font-size: 0.75em;
+ margin-top: 2px;
+}
+
+.alpaca-controlfield-message {
+ font-size: 0.85em;
+}
+
+.alpaca-controlfield-message-hidden {
+ display: none;
+}
+
+.alpaca-field-message-container {
+}
+
+.alpaca-field-required span.ui-icon-star {
+ float: left;
+ margin-right: 0.3em;
+}
+
+.alpaca-controlfield-helper > span.ui-icon, .alpaca-controlfield-message > span.ui-icon {
+ float: left;
+ margin-right: .3em;
+}
+
+/**
+ * Form Controls
+ */
+input, textarea, select {
+ border: 1px solid #555;
+ padding: 2px;
+ font-size: 1em;
+ border-radius: 2px;
+ -khtml-border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
+}
+
+input[type="checkbox"], input[type="radio"] {
+ border: 0px;
+}
+
+input[type="file"] {
+ border: none;
+ box-shadow: none;
+}
+
+select {
+ min-width: 150px;
+}
+
+input:focus, textarea:focus {
+ outline: none;
+ border: 1px solid #058cf5;
+}
+
+.alpaca-field-readonly input, .alpaca-field-readonly textarea, input[readonly], textarea[readonly] {
+ background-color: #dcdcdc;
+ cursor: default;
+}
+
+/* BEGIN styles for Text Field */
+
+.alpaca-controlfield-text {
+}
+
+DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu
+{
+ background-color: white;
+ border: 1px #777 solid;
+ padding-left: 10px;
+ margin-left: 2px;
+ padding-right: 10px;
+ color: #ccc;
+}
+
+DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu P
+{
+ font-size: 1em;
+}
+
+.tt-suggestion.tt-is-under-cursor
+{
+ background-color: #ccc;
+ color: #333;
+}
+
+/* END styles for Text Field */
+
+/* BEGIN styles for Date Field, Phone Field, Password Field and Email Field */
+
+.alpaca-controlfield-date {
+}
+
+.alpaca-controlfield-date input {
+/* background: url("./images/alpaca-icons.png") no-repeat right -5px;*/
+}
+
+.alpaca-controlfield-phone {
+}
+
+.alpaca-controlfield-phone input {
+/* background: url("./images/alpaca-icons.png") no-repeat right -85px;*/
+}
+
+.alpaca-controlfield-email {
+}
+
+.alpaca-controlfield-email input {
+/* background: url("./images/alpaca-icons.png") no-repeat right -45px;*/
+}
+
+.alpaca-controlfield-time {
+}
+
+.alpaca-controlfield-time input {
+/* background: url("./images/alpaca-icons.png") no-repeat right -125px;*/
+}
+
+.alpaca-controlfield-password {
+}
+
+.alpaca-controlfield-email > span.ui-icon, .alpaca-controlfield-date > span.ui-icon, .alpaca-controlfield-phone > span.ui-icon {
+ float: right;
+ margin-left: .3em;
+}
+
+.alpaca-controlfield-helper .alpaca-controlfield-helper-text, .alpaca-controlfield-message .alpaca-controlfield-message-text, .alpaca-controlfield-email > input, .alpaca-controlfield-date > input, .alpaca-controlfield-phone > input {
+ line-height: 16px;
+}
+
+/* END styles for Date Field, Phone Field, Password Field and Email Field */
+
+/* BEGIN styles for Address Map Field */
+
+.alpaca-controlfield-address-mapcanvas {
+ height: 300px;
+ width: 300px;
+ margin: 10px;
+}
+
+/* END styles for Address Map Field */
+
+/* BEGIN styles for Checkbox Field */
+
+.alpaca-controlfield-checkbox {
+ padding-top: 0.4em;
+}
+
+.alpaca-controlfield-checkbox input {
+ margin-right: 1em;
+}
+
+/* IE < 8 */
+.alpaca-controlfield-checkbox {
+ *padding-top: 0;
+}
+
+/* END styles for Checkbox Field */
+
+/* BEGIN styles for Radio Field */
+
+.alpaca-controlfield-radio {
+ padding-top: 0.5em;
+}
+
+.alpaca-controlfield-radio input {
+ margin-right: 0.3em;
+}
+
+.alpaca-controlfield-radio-label {
+ margin-right: 0.3em;
+}
+
+/* END styles for Radio Field */
+
+/* BEGIN styles for Select Field */
+
+.alpaca-controlfield-select {
+}
+
+/* END styles for Select Field */
+
+/* BEGIN styles for Number Field */
+
+.alpaca-controlfield-number {
+}
+
+/* END styles for Number Field */
+
+/* BEGIN styles for Integer Field */
+
+.alpaca-controlfield-integer {
+}
+
+/* END styles for Integer Field */
+
+/* BEGIN styles for Textarea Field */
+
+.alpaca-controlfield-textarea {
+}
+
+/* END styles for Textarea Field */
+
+/* BEGIN styles for WYSIWYG Field */
+
+.alpaca-controlfield-wysiwyg {
+}
+
+/* END styles for WYSIWYG Field */
+
+/* BEGIN styles for Button Field */
+
+.alpaca-controlfield-button {
+}
+
+/* END styles for Button Field */
+
+/* BEGIN styles for File Field */
+
+.alpaca-controlfield-file {
+}
+
+.alpaca-controlfield-file-custom-input {
+ position: absolute;
+ height: 100px;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ opacity: 0;
+ -moz-opacity: 0;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 0);
+ z-index: 999;
+}
+
+.alpaca-controlfield-file-custom {
+ width: 350px;
+ cursor: pointer;
+ overflow: hidden;
+ padding: 2px;
+ position: relative;
+}
+
+.alpaca-controlfield-file-custom-disabled {
+ opacity: .5;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 0);
+ cursor: default;
+}
+
+.alpaca-controlfield-file-custom-feedback {
+ display: block;
+ margin: 1px 1px 1px 5px;
+ font-style: italic;
+ padding: .3em .6em;
+}
+
+.alpaca-controlfield-file-custom-feedback-populated {
+ font-style: normal;
+ font-weight: bold;
+ padding-left: 20px;
+}
+
+/* END styles for File Field */
+
+/* BEGIN styles for Editor Field */
+
+.alpaca-controlfield-editor
+{
+ position: relative;
+ width: 100%;
+ height: 300px;
+ border: 1px #ccc solid;
+}
+
+.alpaca-controlfield-editor .control-field-editor-el
+{
+ position:absolute;
+ top:0;
+ bottom:0;
+ left: 0;
+ right:0
+}
+
+/* END styles for Editor Field */
+
+/* BEGIN styles for JSON Field */
+
+.alpaca-controlfield .alpaca-controlfield-json textarea {
+ font-family: "Courier New";
+ font-size: 0.9em;
+ font-style: italic;
+}
+
+/* END styles for JSON Field */
+
+/* BEGIN styles for Hidden Field */
+.alpaca-controlfield-hidden {
+ display: none;
+}
+/* END styles for Hidden Field */
+
+/* BEGIN styles for Container Field (Fieldset) */
+
+.alpaca-fieldset {
+ padding: 4px;
+ margin: 4px;
+ overflow: auto;
+ position: relative;
+}
+
+fieldset.alpaca-fieldset {
+ /*margin: 0.5em 1em 1em 0px;*/
+ margin-top: 0.5em;
+ margin-right: 0px;
+ margin-left: 0px;
+ margin-bottom: 0.5em;
+}
+
+legend.alpaca-fieldset-legend {
+ font-size: 1.1em;
+ text-align: left;
+ bottom: -1px;
+}
+
+.alpaca-fieldset-legend {
+ font-size: 1.0em;
+ font-weight: bold;
+ text-align: left;
+}
+
+.alpaca-fieldset-helper {
+ padding-top: 10px;
+ padding-bottom: 5px;
+ clear: both;
+}
+
+.alpaca-fieldset-items-container {
+ padding-top: 5px;
+ /**padding-bottom: 5px;**/
+ clear: both;
+}
+
+.alpaca-fieldset-legend-link {
+ float: left;
+ margin-right: 0.3em;
+}
+
+/* END styles for Container Field (Fieldset) */
+
+/* BEGIN styles for Array Field */
+
+.alpaca-fieldset-array-item-toolbar {
+ padding: 1px;
+ margin: 0px 2px 0px 2px;
+ font-size: 0.75em;
+}
+
+.alpaca-fieldset-array-toolbar {
+ padding: 10px 4px;
+}
+
+.alpaca-fieldset-array-item-toolbar-disabled {
+ opacity: .5;
+}
+
+.alpaca-fieldset-array-item-toolbar-add {
+}
+
+.alpaca-fieldset-array-item-toolbar-remove {
+}
+
+.alpaca-fieldset-array-item-toolbar-up {
+}
+
+.alpaca-fieldset-array-item-toolbar-down {
+}
+
+/* END styles for Array Field */
+
+/* BEGIN styles for Form */
+
+.alpaca-form {
+ margin-top: 15px;
+ margin-left: 15px;
+}
+
+.alpaca-form-buttons-container {
+ clear: both;
+ display: block;
+ margin: 5px 0 5px 0;
+ text-align: center;
+}
+
+.alpaca-form-button {
+}
+
+.alpaca-form-button-print {
+}
+
+.alpaca-form-button-reload {
+}
+
+.alpaca-form-button-save {
+}
+
+.alpaca-form-button-view-switcher {
+ position: absolute;
+ float: left;
+ font-size: 1em;
+ padding: 8px 3px 3px;
+ zIndex: 999999;
+}
+
+.alpaca-form-button-view-switcher ul {
+ listStyle: none;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+}
+
+.alpaca-form-button-view-switcher ul li {
+ padding: 2px;
+ margin: 1px;
+ clear: left;
+ float: left;
+}
+
+.alpaca-form-button-view-switcher ul li a {
+ text-decoration: none;
+}
+
+.alpaca-form-buttons-container input {
+ margin-right: 4px;
+}
+
+.alpaca-form-buttons-container input.alpaca-form-button:hover {
+ background: #FFFFCC;
+}
+
+/* END styles for Form */
+
+/* BEGIN styles for VIEW: DISPLAY */
+
+div.alpaca-fieldset {
+ display: block;
+ border: none;
+ margin: 1.5em 1em 1em 0px;
+}
+
+div.alpaca-fieldset-legend {
+}
+
+.alpaca-data-container {
+ margin: 5px 5px 5px 5px;
+ padding: 5px 5px 5px 5px;
+ display: block;
+}
+
+.alpaca-data {
+ text-align: left;
+ padding-left: 10px;
+}
+
+.alpaca-data-label {
+ float: left;
+ min-width: 100px;
+ clear: both;
+ font-weight: bold;
+ display: block;
+}
+
+/* END styles for VIEW: DISPLAY */
+
+/* BEGIN styles for Wizard */
+
+.alpaca-wizard-status-bar {
+ list-style: none;
+ overflow: hidden;
+ margin: 10px 0px 10px 0px;
+ padding: 0px;
+ counter-reset: step;
+ float: left;
+}
+
+.alpaca-wizard-status-bar li {
+ float: left;
+}
+
+.alpaca-wizard-status-bar li span {
+ display: block;
+ font-size: 1.2em;
+}
+
+.alpaca-wizard-status-bar li div {
+ display: block;
+ position: relative;
+ padding: 2px 25px 2px 30px;
+}
+
+.alpaca-wizard-status-bar li div:before {
+ font-size: 1em;
+ position: absolute;
+ top: 50%;
+ left: 5px;
+ margin-top: -8px;
+ text-align: center;
+ font-weight: bold;
+ padding: 2px 6px;
+ counter-increment: step;
+ content: counter(step);
+}
+
+.alpaca-wizard-status-bar li div strong {
+ font-weight: normal
+}
+
+.alpaca-wizard-status-bar li.current {
+}
+
+.alpaca-wizard-status-bar li.current-has-next {
+}
+
+.alpaca-wizard-title {
+ font-size: 1.2em;
+ margin: 0px;
+ padding: 10px 0px;
+ font-weight: bold;
+}
+
+.alpaca-wizard-desc {
+ font-size: 0.9em;
+ margin: 0px;
+ padding: 5px 0px;
+}
+
+.alpaca-wizard-step-title {
+ font-size: 1em;
+ margin: 0px;
+ padding: 10px 0px;
+ text-decoration: underline;
+ font-weight: bold;
+}
+
+.alpaca-wizard-nav-bar {
+ clear: both;
+ float: right;
+}
+
+.alpaca-wizard-button {
+}
+
+.alpaca-wizard-button:hover {
+}
+
+.alpaca-wizard-button-back {
+}
+
+.alpaca-wizard-button-next {
+}
+
+/* END styles for Wizard */
+
+/** BEGIN view-web-list **/
+
+fieldset.alpaca-view-web-list
+{
+ border-left: none;
+ border-bottom: none;
+ border-right: none;
+ padding-right: 3em;
+}
+
+fieldset.alpaca-view-web-list.fieldset-collapsed
+{
+ border: solid 1px;
+}
+
+.alpaca-view-web-list .alpaca-controlfield-label {
+ display: inline-block;
+ vertical-align: top;
+ padding-top: 0.5em;
+}
+
+.alpaca-view-web-list .alpaca-controlfield-label {
+ width: 130px;
+}
+
+fieldset.alpaca-view-list legend {
+ /* to make chrome not wrapping text */
+ font-size: 1.01em
+}
+
+.alpaca-controlfield.alpaca-view-web-list
+{
+ display:inline-block;
+}
+
+SPAN.alpaca-view-web-list label.alpaca-controlfield-label
+{
+ font-size: 1.0em;
+ font-weight: bold !important;
+ text-align: left;
+ white-space: nowrap;
+}
+
+.alpaca-view-web-list DIV.alpaca-controlfield-container
+{
+ display:inline-block;
+}
+
+.alpaca-controlfield-label-list-view {
+ width: 100px;
+ display: inline-block;
+ vertical-align: top;
+ padding-top: 0.5em;
+}
+
+.alpaca-fieldset-message-list-view {
+ float: left;
+ margin-right: .3em;
+}
+
+.alpaca-controlfield-item-label-list-view {
+ width: 100px;
+ display: inline-block;
+ vertical-align: top;
+ padding-top: 0.25em;
+}
+
+ol.alpaca-fieldset-itemscontainer-list-view-top {
+ padding-left :0;
+}
+
+li.alpaca-fieldset-itemcontainer-list-view-top {
+ list-style:none;
+}
+
+.alpaca-item-container-first
+{
+
+}
+
+.alpaca-item-container-last
+{
+
+}
+
+.alpaca-fieldset-items-container-empty
+{
+ padding-top: 0px;
+ padding-bottom: 0px;
+}
+
+/** END view-web-list **/
+
+/* BEGIN styles for VIEW: TWO COLUMN */
+
+.alpaca-layout-two-column-mask {
+ overflow: auto;
+ width: 100%;
+ min-width: 600px;
+ display: inline-block;
+}
+
+.alpaca-layout-two-column-left {
+ overflow: auto;
+ display: inline-block;
+ padding: 5px;
+ vertical-align: top;
+}
+
+.alpaca-layout-two-column-right {
+ overflow: auto;
+ display: inline-block;
+ padding: 5px;
+ vertical-align: top;
+}
+
+
+fieldset.alpaca-fieldset-no-legend {
+ border: none;
+}
+
+/* END styles for VIEW: TWO COLUMN */
+
+/* BEGIN styles for VIEW: VIEW_WEB_EDIT_YAML */
+
+fieldset.alpaca-view-web-edit-yaml.alpaca-fieldset {
+ border: solid 1px;
+ border-radius: 5px;
+ margin: 1px 0 0 0;
+ padding-top: 4px;
+ padding-bottom: 2px;
+}
+
+/*hide the arrow icon before the fieldset name*/
+fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend span {
+ display: none;
+}
+
+/* make the fonts the right size */
+fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend {
+ font-size: 1em;
+}
+
+fieldset.alpaca-view-web-edit-yaml.fieldset-collapsed {
+ border: none;
+ margin: 1px 1px 1px 1px;
+}
+
+fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-expanded:after {
+ content: url("./images/down.png");
+ padding-left: 5px;
+}
+fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-collapsed:after {
+ content: url("./images/left.png");
+ padding-left: 5px;
+}
+
+/*sort out the text boxes so that they disappear when not focused */
+fieldset.alpaca-view-web-edit-yaml span:not(.alpaca-field-focused) div.alpaca-controlfield-text input {
+ background: none;
+ border: none;
+ box-shadow: none;
+ margin-top: 2px;
+ margin-left: 2px;
+ margin-bottom: 2px;
+ margin-right: 2px;
+}
+
+fieldset.alpaca-view-web-edit-yaml {
+ font-family: courier;
+ padding-right: 1em;
+ padding-top: 0px;
+}
+
+fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-checkbox {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-select {
+ margin-bottom: 1px;
+}
+fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-radio div.alpaca-controlfield-radio {
+ padding-top: 3px;
+ padding-bottom: 4px;
+}
+
+fieldset.alpaca-view-web-edit-yaml > input,
+fieldset.alpaca-view-web-edit-yaml > select,
+fieldset.alpaca-view-web-edit-yaml > label
+{
+ font-family: courier;
+}
+
+span.alpaca-view-web-edit-yaml .alpaca-controlfield-label {
+ width: 175px;
+ padding-top: 0px;
+ padding-left: 3px;
+ display: inline-block;
+ vertical-align: top;
+}
+
+span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container {
+ padding-top: 0px;
+ padding-bottom: 0px;
+}
+
+span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container > input,
+span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container > select
+{
+ padding: 1px 1px 1px 1px;
+}
+
+fieldset.alpaca-view-web-edit-yaml span.alpaca-field {
+ padding-top: 0px;
+ padding-bottom: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+fieldset.alpaca-view-web-edit-yaml ol.alpaca-fieldset-items-container {
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+}
+
+
+/* make the array item toolbar float, without displacing any other elements */
+fieldset.alpaca-view-web-edit-yaml div.alpaca-fieldset-array-item-toolbar {
+ position: absolute;
+ z-index: 99999;
+ right: 15px;
+}
+
+
+fieldset.alpaca-view-web-edit-yaml .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text {
+ padding: 2px;
+}
+
+/* END styles for the view VIEW_WEB_EDIT_YAML */
+
+/* BEGIN styles for the view VIEW_WEB_EDIT_INLINE */
+
+.alpaca-inline .alpaca-inline-item-container {
+ float: left;
+}
+
+.alpaca-inline-item-container .alpaca-inline .alpaca-fieldset, .alpaca-inline-item-container .alpaca-fieldset.alpaca-inline {
+ margin: 0 1.5em;
+ padding: 0;
+}
+
+.alpaca-inline-item-container .alpaca-fieldset-array-item-toolbar {
+ width: 60px;
+ float: right;
+ margin-top: 0.7em;
+}
+
+.alpaca-inline .alpaca-fieldset-items-container {
+ margin: 0em 1em;
+ padding: 0;
+}
+
+.alpaca-inline select {
+ min-width: 0px;
+}
+
+#module-settings input:focus, textarea:focus {
+ border-width: 1px;
+}
+
+
+fieldset DIV {
+ padding-top: 0px !important;
+ vertical-align: middle !important;
+}
+
+
+/* To Remove up/down buttons on items
+
+.alpaca-inline-item-container .alpaca-fieldset-array-item-toolbar .alpaca-fieldset-array-item-toolbar-up,
+.alpaca-inline-item-container .alpaca-fieldset-array-item-toolbar .alpaca-fieldset-array-item-toolbar-down {
+{
+ display: none;
+}
+*/
+
+/* To hide labels of inlined fields
+
+.alpaca-inline-item-container .alpaca-inline .alpaca-controlfield-label, .alpaca-inline-item-container .alpaca-inline .alpaca-fieldset-legend {
+ display: none;
+}
+
+*/
+
+/* END styles for VIEW: VIEW_WEB_EDIT_INLINE */
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca.min.css b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca.min.css
new file mode 100644
index 0000000..cc62c90
--- /dev/null
+++ b/var/httpd/htdocs/skins/Customer/default/css/alpaca/alpaca.min.css
@@ -0,0 +1,22 @@
+/*!
+Alpaca Version 1.1.1
+
+Copyright 2013 Gitana Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information, please contact Gitana Software, Inc. at this
+address:
+
+ info@gitanasoftware.com
+*/.alpaca-clear{clear:both}.alpaca-controlfield{display:block;padding:2px;margin:2px}.alpaca-controlfield-container{display:block;padding-top:4px;padding-bottom:4px}.alpaca-controlfield-label{font-size:1.0em;font-weight:bold;text-align:left;margin-left:1px}.alpaca-controlfield-helper{font-size:.75em;margin-top:2px}.alpaca-controlfield-message{font-size:.85em}.alpaca-controlfield-message-hidden{display:none}.alpaca-field-required span.ui-icon-star{float:left;margin-right:.3em}.alpaca-controlfield-helper>span.ui-icon,.alpaca-controlfield-message>span.ui-icon{float:left;margin-right:.3em}input,textarea,select{border:1px solid #555;padding:2px;font-size:1em;border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}input[type="checkbox"],input[type="radio"]{border:0}input[type="file"]{border:0;box-shadow:none}select{min-width:150px}input:focus,textarea:focus{outline:0;border:1px solid #058cf5}.alpaca-field-readonly input,.alpaca-field-readonly textarea,input[readonly],textarea[readonly]{background-color:#dcdcdc;cursor:default}DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu{background-color:white;border:1px #777 solid;padding-left:10px;margin-left:2px;padding-right:10px;color:#ccc}DIV.alpaca-controlfield-text .twitter-typeahead .tt-dropdown-menu P{font-size:1em}.tt-suggestion.tt-is-under-cursor{background-color:#ccc;color:#333}.alpaca-controlfield-email>span.ui-icon,.alpaca-controlfield-date>span.ui-icon,.alpaca-controlfield-phone>span.ui-icon{float:right;margin-left:.3em}.alpaca-controlfield-helper .alpaca-controlfield-helper-text,.alpaca-controlfield-message .alpaca-controlfield-message-text,.alpaca-controlfield-email>input,.alpaca-controlfield-date>input,.alpaca-controlfield-phone>input{line-height:16px}.alpaca-controlfield-address-mapcanvas{height:300px;width:300px;margin:10px}.alpaca-controlfield-checkbox{padding-top:.4em}.alpaca-controlfield-checkbox input{margin-right:1em}.alpaca-controlfield-checkbox{*padding-top:0}.alpaca-controlfield-radio{padding-top:.5em}.alpaca-controlfield-radio input{margin-right:.3em}.alpaca-controlfield-radio-label{margin-right:.3em}.alpaca-controlfield-file-custom-input{position:absolute;height:100px;cursor:pointer;background:transparent;border:0;opacity:0;-moz-opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 0);z-index:999}.alpaca-controlfield-file-custom{width:350px;cursor:pointer;overflow:hidden;padding:2px;position:relative}.alpaca-controlfield-file-custom-disabled{opacity:.5;filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 0);cursor:default}.alpaca-controlfield-file-custom-feedback{display:block;margin:1px 1px 1px 5px;font-style:italic;padding:.3em .6em}.alpaca-controlfield-file-custom-feedback-populated{font-style:normal;font-weight:bold;padding-left:20px}.alpaca-controlfield-editor{position:relative;width:100%;height:300px;border:1px #ccc solid}.alpaca-controlfield-editor .control-field-editor-el{position:absolute;top:0;bottom:0;left:0;right:0}.alpaca-controlfield .alpaca-controlfield-json textarea{font-family:"Courier New";font-size:.9em;font-style:italic}.alpaca-controlfield-hidden{display:none}.alpaca-fieldset{padding:4px;margin:4px;overflow:auto;position:relative}fieldset.alpaca-fieldset{margin-top:.5em;margin-right:0;margin-left:0;margin-bottom:.5em}legend.alpaca-fieldset-legend{font-size:1.1em;text-align:left;bottom:-1px}.alpaca-fieldset-legend{font-size:1.0em;font-weight:bold;text-align:left}.alpaca-fieldset-helper{padding-top:10px;padding-bottom:5px;clear:both}.alpaca-fieldset-items-container{padding-top:5px;clear:both}.alpaca-fieldset-legend-link{float:left;margin-right:.3em}.alpaca-fieldset-array-item-toolbar{padding:1px;margin:0 2px 0 2px;font-size:.75em}.alpaca-fieldset-array-toolbar{padding:10px 4px}.alpaca-fieldset-array-item-toolbar-disabled{opacity:.5}.alpaca-form{margin-top:15px;margin-left:15px}.alpaca-form-buttons-container{clear:both;display:block;margin:5px 0 5px 0}.alpaca-form-button-view-switcher{position:absolute;float:left;font-size:1em;padding:8px 3px 3px;zIndex:999999}.alpaca-form-button-view-switcher ul{listStyle:none;margin:0;padding:0;overflow:auto}.alpaca-form-button-view-switcher ul li{padding:2px;margin:1px;clear:left;float:left}.alpaca-form-button-view-switcher ul li a{text-decoration:none}.alpaca-form-buttons-container input{margin-right:4px}.alpaca-form-buttons-container input.alpaca-form-button:hover{background:#ffc}div.alpaca-fieldset{display:block;border:0;margin:1.5em 1em 1em 0}.alpaca-data-container{margin:5px 5px 5px 5px;padding:5px 5px 5px 5px;display:block}.alpaca-data{text-align:left;padding-left:10px}.alpaca-data-label{float:left;min-width:100px;clear:both;font-weight:bold;display:block}.alpaca-wizard-status-bar{list-style:none;overflow:hidden;margin:10px 0 10px 0;padding:0;counter-reset:step;float:left}.alpaca-wizard-status-bar li{float:left}.alpaca-wizard-status-bar li span{display:block;font-size:1.2em}.alpaca-wizard-status-bar li div{display:block;position:relative;padding:2px 25px 2px 30px}.alpaca-wizard-status-bar li div:before{font-size:1em;position:absolute;top:50%;left:5px;margin-top:-8px;text-align:center;font-weight:bold;padding:2px 6px;counter-increment:step;content:counter(step)}.alpaca-wizard-status-bar li div strong{font-weight:normal}.alpaca-wizard-title{font-size:1.2em;margin:0;padding:10px 0;font-weight:bold}.alpaca-wizard-desc{font-size:.9em;margin:0;padding:5px 0}.alpaca-wizard-step-title{font-size:1em;margin:0;padding:10px 0;text-decoration:underline;font-weight:bold}.alpaca-wizard-nav-bar{clear:both;float:right}fieldset.alpaca-view-web-list{border-left:none;border-bottom:0;border-right:0;padding-right:3em}fieldset.alpaca-view-web-list.fieldset-collapsed{border:solid 1px}.alpaca-view-web-list .alpaca-controlfield-label{display:inline-block;vertical-align:top;padding-top:.5em}.alpaca-view-web-list .alpaca-controlfield-label{width:130px}fieldset.alpaca-view-list legend{font-size:1.01em}.alpaca-controlfield.alpaca-view-web-list{display:inline-block}SPAN.alpaca-view-web-list label.alpaca-controlfield-label{font-size:1.0em;font-weight:bold!important;text-align:left;white-space:nowrap}.alpaca-view-web-list DIV.alpaca-controlfield-container{display:inline-block}.alpaca-controlfield-label-list-view{width:100px;display:inline-block;vertical-align:top;padding-top:.5em}.alpaca-fieldset-message-list-view{float:left;margin-right:.3em}.alpaca-controlfield-item-label-list-view{width:100px;display:inline-block;vertical-align:top;padding-top:.25em}ol.alpaca-fieldset-itemscontainer-list-view-top{padding-left:0}li.alpaca-fieldset-itemcontainer-list-view-top{list-style:none}.alpaca-fieldset-items-container-empty{padding-top:0;padding-bottom:0}.alpaca-layout-two-column-mask{overflow:auto;width:100%;min-width:600px;display:inline-block}.alpaca-layout-two-column-left{overflow:auto;display:inline-block;padding:5px;vertical-align:top}.alpaca-layout-two-column-right{overflow:auto;display:inline-block;padding:5px;vertical-align:top}fieldset.alpaca-fieldset-no-legend{border:0}fieldset.alpaca-view-web-edit-yaml.alpaca-fieldset{border:solid 1px;border-radius:5px;margin:1px 0 0 0;padding-top:4px;padding-bottom:2px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend span{display:none}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend{font-size:1em}fieldset.alpaca-view-web-edit-yaml.fieldset-collapsed{border:0;margin:1px 1px 1px 1px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-expanded:after{content:url("./images/down.png");padding-left:5px}fieldset.alpaca-view-web-edit-yaml legend.alpaca-fieldset-legend.legend-collapsed:after{content:url("./images/left.png");padding-left:5px}fieldset.alpaca-view-web-edit-yaml span:not(.alpaca-field-focused) div.alpaca-controlfield-text input{background:0;border:0;box-shadow:none;margin-top:2px;margin-left:2px;margin-bottom:2px;margin-right:2px}fieldset.alpaca-view-web-edit-yaml{font-family:courier;padding-right:1em;padding-top:0}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-checkbox{margin-top:4px;margin-bottom:4px}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-select{margin-bottom:1px}fieldset.alpaca-view-web-edit-yaml div.alpaca-controlfield-radio div.alpaca-controlfield-radio{padding-top:3px;padding-bottom:4px}fieldset.alpaca-view-web-edit-yaml>input,fieldset.alpaca-view-web-edit-yaml>select,fieldset.alpaca-view-web-edit-yaml>label{font-family:courier}span.alpaca-view-web-edit-yaml .alpaca-controlfield-label{width:175px;padding-top:3px;padding-left:3px;display:inline-block;vertical-align:top}span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container{padding-top:0;padding-bottom:0}span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container>input,span.alpaca-view-web-edit-yaml div.alpaca-controlfield-container>select{padding:1px 1px 1px 1px}fieldset.alpaca-view-web-edit-yaml span.alpaca-field{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}fieldset.alpaca-view-web-edit-yaml ol.alpaca-fieldset-items-container{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}fieldset.alpaca-view-web-edit-yaml div.alpaca-fieldset-array-item-toolbar{position:absolute;z-index:99999;right:15px}fieldset.alpaca-view-web-edit-yaml .ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:2px}.alpaca-inline .alpaca-inline-item-container{float:left}.alpaca-inline-item-container .alpaca-inline .alpaca-fieldset,.alpaca-inline-item-container .alpaca-fieldset.alpaca-inline{margin:0 1.5em;padding:0}.alpaca-inline-item-container .alpaca-fieldset-array-item-toolbar{width:60px;float:right;margin-top:.7em}.alpaca-inline .alpaca-fieldset-items-container{margin:0 1em;padding:0}.alpaca-inline select{min-width:0}#module-settings input:focus,textarea:focus{border-width:1px}
\ No newline at end of file
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/alpaca-icons.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/alpaca-icons.png
new file mode 100644
index 0000000..32ac87a
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/alpaca-icons.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/date.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/date.png
new file mode 100644
index 0000000..f107e3f
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/date.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/down.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/down.png
new file mode 100644
index 0000000..9cce47c
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/down.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/email.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/email.png
new file mode 100644
index 0000000..17a8607
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/email.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/left.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/left.png
new file mode 100644
index 0000000..15a13d0
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/left.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/phone.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/phone.png
new file mode 100644
index 0000000..4a12b67
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/phone.png differ
diff --git a/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/time.png b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/time.png
new file mode 100644
index 0000000..0b5e880
Binary files /dev/null and b/var/httpd/htdocs/skins/Customer/default/css/alpaca/images/time.png differ
--
libgit2 0.21.2