first major round of EMS changes. much more to come late tonight.

This commit is contained in:
Matthew Wilson 2006-04-07 00:02:45 +00:00
parent f3404c319a
commit 2c60283ba3
27 changed files with 5196 additions and 33 deletions

View file

@ -547,23 +547,197 @@ sub addEMSTemplates {
## Display Template ##
my $template = <<EOT1;
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
<tmpl_if session.var.adminOn>
<p><tmpl_var controls></p>
<p><tmpl_var controls></p><br /><br />
</tmpl_if>
<tmpl_if canManageEvents>
<a href='<tmpl_var manageEvents.url>'><tmpl_var manageEvents.label></a>
</tmpl_if>
<a href="<tmpl_var checkout.url>"><tmpl_var checkout.label></a>
<style type="text/css">
.datacardtitle {
background: #3D5690;
color: white;
font-family: verdana;
font-weight: bold;
font-size:13px;
}
.leftnav{
padding: 1px 1px 1px 1px;
background: white;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
border: 2px #3D5690 ridge;
}
.leftnavon{
padding: 1px 1px 1px 1px;
background: yellow;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
border: 2px #3D5690 ridge;
}
.calendartitle {
background: #3D5690;
color: white;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.filter-select {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
width: 105px;
}
.compare-select {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
width: 76px;
}
.filter-text {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
width: 114px;
}
.smLink {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: blue;
}
#extendedSearchLayer {display: inline;}
</style>
<script type="text/javascript" src="<tmpl_var ems.wobject.dir>/script/dynamicForms.js"></script>
<script type="text/javascript">
<tmpl_var search.filters.options>
var advanced = 0;
var filterCount = 0;
function setSelectValue(selObj,newValue) {
for (var i=0; i<selObj.options.length; i++) {
selObj.options[i].selected = (selObj.options[i].value==newValue)?true:false;
}
}
function toggleAdvanced() {
var ids = ["cParams","cResults","cSearch"];
var toggle = "";
for (var i = 0; i < ids.length; i++) {
if(advanced == 1) {
toggle = "none";
}
document.getElementById(ids[i]).style.display=toggle;
}
advanced = (advanced == 1)?0:1;
return false;
}
function toggleTitle(obj) {
if (obj.checked) {
document.getElementById('cs_search_title_td').style.display='inline';
} else {
document.getElementById('cs_search_title_td').style.display='none';
}
}
function openWin (url, name, param) {
var newwin = window.open(url, name, param);
newwin.focus();
}
function buildFilterList() {
return "Custom Filter";
}
function stripDelim(value,delim) {
value = value.replace(/delim/g,"");
return value;
}
function unset(array, valueToUnset){
var output=new Array(0);
for(var i in array){
if(i==valueToUnset){continue;}
output[i]=array[i];
}
return output;
}
</script>
<div id="basicSearch"<tmpl_if isAdvSearch> style="display:none"</tmpl_if>>
<tmpl_var basicSearch.formHeader>
<div style="cursor:pointer" onclick="document.getElementById('basicSearch').style.display='none';document.getElementById('advSearch').style.display='';" ><a href="#">Switch To Advanced Search</a></div>
<table width="100%" border="0" padding="8"><tr><td>Search Keywords:</td><td><input name="searchKeywords" /></td></tr></table>
<tmpl_var search.formSubmit>
<tmpl_var search.formFooter>
</div>
<div id="advSearch"<tmpl_unless isAdvSearch> style="display:none"</tmpl_unless>>
<tmpl_var advSearch.formHeader>
<div style="cursor:pointer" onclick="document.getElementById('basicSearch').style.display='';document.getElementById('advSearch').style.display='none';" ><a href="#">Switch To Basic Search</a></div>
<table width="100%" border="0" padding="8">
<tbody id="filterbody">
<tr><td></td></tr>
</tbody>
</table>
<a href="#" onclick="addField();">Add another Filter Field</a>
<tmpl_var search.formSubmit>
<tmpl_var search.formFooter>
<script type="text/javascript">
// load autoSearch fields
for (var word in filterList) {
if (filterList[word]["autoSearch"]) {
var compa = addField();
setSelectValue(compa,word);
changeToType(word,filterCount);
}
}
</script>
</div>
<table width="100%" border="0" padding="8">
<tr><th><tmpl_var name.label></th>
<th><tmpl_var starts.label></th>
<th><tmpl_var ends.label></th>
<th><tmpl_var seats.label></th>
<th><tmpl_var price.label></th>
<th><tmpl_var requirement.label></th>
<th><tmpl_var addToCart.label></th></tr>
<tmpl_loop events_loop>
<tmpl_var event>
<tr><td><tmpl_var title>
</td><td><tmpl_var startDate.human>
</td><td><tmpl_var endDate.human>
</td><td><tmpl_var seatsRemaining>
</td><td><tmpl_var price>
</td><td><tmpl_var requirement>
</td><td><tmpl_unless eventIsFull><a href="<tmpl_var purchase.url>"><tmpl_var purchase.label></a><tmpl_else><tmpl_var purchase.label><br /></tmpl_unless>
</td></tr>
</tmpl_loop>
</table>
<tmpl_var paginateBar>
EOT1
## Event Template ##
@ -683,6 +857,7 @@ create table EventManagementSystem (
groupToAddEvents varchar(22),
groupToApproveEvents varchar(22),
globalPrerequisites tinyint default 1,
globalMetadata tinyint default 1,
primary key(assetId,revisionDate)
)
SQL1
@ -748,13 +923,42 @@ primary key(prerequisiteEventId)
)
SQL6
my $sql7 = <<SQL7;
create table EventManagementSystem_metaField (
fieldId varchar(22) not null,
assetId varchar(22),
name varchar(50),
label varchar(100),
dataType varchar(20),
visible tinyint default 0,
required tinyint default 0,
possibleValues text,
defaultValues text,
sequenceNumber int(5),
autoSearch tinyint default 0,
primary key(fieldId)
)
SQL7
my $sql8 = <<SQL8;
create table EventManagementSystem_metaData (
fieldId varchar(22) not null,
productId varchar(22) not null,
fieldData text,
primary key(fieldId,productId)
)
SQL8
$session->db->write($sql1);
$session->db->write($sql2);
$session->db->write($sql3);
$session->db->write($sql4);
$session->db->write($sql5);
$session->db->write($sql6);
$session->db->write($sql7);
$session->db->write($sql8);
}
#-------------------------------------------------

View file

@ -95,7 +95,11 @@ sub contentHandler {
my $t = [Time::HiRes::gettimeofday()];
$output = page($session);
$t = Time::HiRes::tv_interval($t) ;
$output =~ s/<\/title>/ : ${t} seconds<\/title>/i;
if ($output =~ /<\/title>/) {
$output =~ s/<\/title>/ : ${t} seconds<\/title>/i;
} else {
$session->output->print("\nPage generated in $t seconds.\n");
}
} else {
$output = page($session);
}

View file

@ -24,6 +24,227 @@ use WebGUI::Commerce::Item;
use WebGUI::Utility;
use Data::Dumper;
#-------------------------------------------------------------------
sub _getFieldHash {
my $self = shift;
return $self->{_fieldHash} if ($self->{_fieldHash});
my %hash;
tie %hash, "Tie::IxHash";
%hash = (
"eventName"=>{
name=>"Event Name",
type=>"text",
compare=>"text",
method=>"text",
columnName=>"title",
tableName=>"p",
initial=>1
},
"eventDescription"=>{
name=>"Description",
type=>"text",
compare=>"text",
method=>"text",
columnName=>"description",
tableName=>"p",
initial=>1
},
"maxAttendees"=>{
name=>"Max Attendees",
type=>"text",
compare=>"numeric",
method=>"integer",
columnName=>"maximumAttendees",
tableName=>"e",
initial=>1
},
"seatsAvailable"=>{
name=>"Seats Available",
type=>"text",
method=>"integer",
compare=>"numeric",
calculated=>1,
initial=>1
},
"price"=>{
name=>"Price",
type=>"text",
compare=>"numeric",
method=>"float",
columnName=>"price",
tableName=>"p",
initial=>1
},
"startDate"=>{
name=>"Starts",
type=>"dateTime",
compare=>"numeric",
method=>"dateTime",
columnName=>"startDate",
tableName=>"e",
initial=>1
},
"endDate"=>{
name=>"Ends",
type=>"dateTime",
compare=>"numeric",
method=>"dateTime",
columnName=>"endDate",
tableName=>"e",
initial=>1
},
"requirement"=>{
name=>"Requirement",
type=>"select",
list=>{''=>'Select One'},
# list=>$self->_getAllEvents(),
compare=>"boolean",
method=>"selectList",
calculated=>1,
initial=>1
}
);
# Add custom metadata fields to the list, matching the types up
# automatically.
my $fieldList = $self->getEventMetaDataArrayRef;
foreach my $field (@{$fieldList}) {
my $dataType = $field->{dataType};
my $compare = $self->_matchTypes($dataType);
my $type;
if ($dataType =~ /^date/i) {
$type = lcfirst($dataType);
} elsif ($compare eq 'text' || $compare eq 'numeric') {
$type = 'text';
} else {
$type = 'select';
}
$hash{$field->{fieldId}} = {
name=>$field->{name},
type=>$type,
method=>$dataType,
initial=>$field->{autoSearch},
compare=>$compare,
calculated=>1,
metadata=>1
};
if ($hash{$field->{fieldId}}->{type} eq 'select') {
$hash{$field->{fieldId}}->{list} = $self->_matchPairs($field->{possibleValues});
}
}
$self->{_fieldHash} = \%hash;
return $self->{_fieldHash};
}
#-------------------------------------------------------------------
sub _matchPairs {
my $self = shift;
my $options = shift;
my %hash;
tie %hash, 'Tie::IxHash';
$hash{''} = 'Select One';
foreach (split("\n",$options)) {
my $val = $_;
$val =~ s/\s//g;
$val =~ s/\n//g;
$hash{$val} = $val;
}
return \%hash;
}
#-------------------------------------------------------------------
sub _matchTypes {
my $self = shift;
my $dataType = lc(shift);
return 'text' if (
WebGUI::Utility::isIn($dataType, qw(
codearea
email
htmlarea
phone
text
textarea
url
zipcode
))
);
return 'numeric' if (
WebGUI::Utility::isIn($dataType, qw(
date
datetime
float
integer
interval
))
);
return 'boolean' if (
WebGUI::Utility::isIn($dataType, qw(
checkbox
combo
selectlist
checklist
contenttype
databaselink
fieldtype
group
ldaplink
radio
radiolist
selectbox
selectlist
template
timezone
yesno
))
);
return 'text';
}
#-------------------------------------------------------------------
sub buildMenu {
my $self = shift;
my $var = shift;
my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
my $fields = $self->_getFieldHash();
my $counter = 0;
my $js = "var filterList = {\n";
foreach my $fieldId (keys %{$fields}) {
my $field = $fields->{$fieldId};
$js .= ",\n" if($counter++ > 0);
my $fieldName = $field->{name};
my $fieldType = $field->{type};
my $compareType = $field->{compare};
my $autoSearch = $field->{initial};
$js .= qq|"$fieldId": {|;
$js .= qq| "name":"$fieldName"|;
$js .= qq| ,"type":"$fieldType"|;
$js .= qq| ,"compare":"$compareType"|;
$js .= qq| ,"autoSearch":"$autoSearch"|;
if($fieldType eq "select") {
my $list = $field->{list};
my $fieldList = "";
foreach my $key (keys %{$list}) {
$fieldList .= "," if($fieldList ne "");
my $value = $list->{$key};
$value =~ s/"/\"/g;
$fieldList .= qq|"$key":"$value"|
}
$js .= qq| ,"list":{ $fieldList }|;
}
$js .= q| }|;
}
$js .= "\n};\n";
$var->{'search.filters.options'} = $js;
$var->{'search.data.url'} = $self->getUrl;
}
#-------------------------------------------------------------------
=head2 checkConflicts ( )
@ -159,6 +380,13 @@ sub definition {
label=>$i18n->get('global prerequisite'),
hoverHelp=>$i18n->get('global prerequisite description')
},
globalMetadata =>{
fieldType=>"yesNo",
defaultValue=>1,
tab=>"properties",
label=>$i18n->get('global metadata'),
hoverHelp=>$i18n->get('global metadata description')
},
);
push(@{$definition}, {
assetName=>$i18n->get('assetName'),
@ -345,6 +573,64 @@ sub getPrerequisiteEventList {
return $self->session->db->buildHashRef($sql);
}
#------------------------------------------------------------------
=head2 getEventMetaDataArrayRef ( )
Returns an arrayref of hash references of the metadata fields.
Checks $self->get("globalMetadata") by default; otherwise uses the first parameter.
=head3 useGlobalMetadata
Whether or not to use the asset's global setting, and the override.
=cut
sub getEventMetaDataArrayRef {
my $self = shift;
my $useGlobalMetadata = shift;
my $productId = shift;
$useGlobalMetadata = ($useGlobalMetadata)?$useGlobalMetadata:$self->get("globalMetadata");
my $globalWhere = ($useGlobalMetadata == 0 || $useGlobalMetadata == 'false')?" where assetId='".$self->getId."'":'';
return $self->getEventMetaDataFields($productId) if $productId;
return $self->session->db->buildArrayRefOfHashRefs("select * from EventManagementSystem_metaField $globalWhere order by sequenceNumber, assetId");
}
#-------------------------------------------------------------------
=head2 getEventMetaDataFields ( productId )
Returns a hash reference containing all metadata field properties.
=head3 productId
Which product to get metadata for.
=cut
sub getEventMetaDataFields {
my $self = shift;
my $productId = shift;
my $useGlobalMetadata = shift;
my $globalWhere = ($useGlobalMetadata == 0 || $useGlobalMetadata == 'false')?" where f.assetId='".$self->getId."'":'';
my $sql = "select f.*, d.fieldData
from EventManagementSystem_metaField f
left join EventManagementSystem_metaData d on f.fieldId=d.fieldId and d.productId=".$self->session->db->quote($productId)." $globalWhere order by f.sequenceNumber";
tie my %hash, 'Tie::IxHash';
my $sth = $self->session->db->read($sql);
while( my $h = $sth->hashRef) {
foreach(keys %$h) {
$hash{$h->{fieldId}}{$_} = $h->{$_};
}
}
$sth->finish;
return \%hash;
}
#------------------------------------------------------------------
=head2 getRequiredEventName ( prerequisiteId )
@ -647,6 +933,12 @@ sub validateEditEventForm {
"maximumAttendees" => $i18n->get("add/edit event maximum attendees"),
);
my $mdFields = $self->getEventMetaDataFields;
foreach my $mdField (keys %{$mdFields}) {
next unless $mdFields->{$mdField}->{required};
$requiredFields{'metadata_'.$mdField} = $mdFields->{$mdField}->{name};
}
$errors = $self->checkRequiredFields(\%requiredFields);
#Check price greater than zero
@ -767,13 +1059,13 @@ sub www_deleteEvent {
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
#Remove this event as a prerequisite to any other event
$self->session->db->write("delete from EventManagementSystem_prerequisiteEvents where requiredProductId=?".
$self->session->db->write("delete from EventManagementSystem_prerequisiteEvents where requiredProductId=?",
[$eventId]);
$self->deleteOrphans;
#Remove the event
$self->deleteCollateral('EventManagementSystem_products', 'productId', $eventId);
$self->session->db->write("delete from products where productId=?",[$eventId]);
$self->deleteCollateral('products','productId',$eventId);
$self->reorderCollateral('EventManagementSystem_products', 'productId');
return $self->www_manageEvents;
@ -803,6 +1095,30 @@ sub www_deletePrerequisite {
#-------------------------------------------------------------------
=head2 www_edit ( )
Edit wobject method.
=cut
sub www_edit {
my $self = shift;
return $self->session->privilege->insufficient() unless $self->canEdit;
my ($tag) = ($self->get("className") =~ /::(\w+)$/);
my $tag2 = $tag;
$tag =~ s/([a-z])([A-Z])/$1 $2/g; #Separate studly caps
$tag =~ s/([A-Z]+(?![a-z]))/$1 /g; #Separate acronyms
$self->getAdminConsole->setHelp(lc($tag)." add/edit", "Asset_".$tag2);
my $i18n = WebGUI::International->new($self->session,'Asset_Wobject');
my $addEdit = ($self->session->form->process("func") eq 'add') ? $i18n->get('add') : $i18n->get('edit');
my $i18n2 = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEventMetadata'), $i18n2->get('manage event metadata'));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEvents'), $i18n2->get('manage events'));
return $self->getAdminConsole->render($self->getEditForm->print,$addEdit.' '.$self->getName);
}
#-------------------------------------------------------------------
=head2 www_editEvent ( errors )
Method to generate form to Add or Edit an events properties including prerequisite assignments and event approval.
@ -918,6 +1234,38 @@ sub www_editEvent {
-name => "approved",
-value => 0 || $event->{approved}
);
# add dynamically added metadata fields.
my $meta = {};
my $fieldList = $self->getEventMetaDataArrayRef;
if ($pid ne 'new') {
$meta = $self->getEventMetaDataFields($pid);
} else {
foreach my $field1 (@{$fieldList}) {
$meta->{$field1->{fieldId}} = $field1;
$meta->{$field1->{fieldId}}->{fieldData} = $field1->{defaultValues};
}
}
my $i18n3 = WebGUI::International->new($self->session, "Asset");
foreach my $field (@{$fieldList}) {
my $dataType = $meta->{$field->{fieldId}}{dataType};
my $options;
# Add a "Select..." option on top of a select list to prevent from
# saving the value on top of the list when no choice is made.
if($dataType eq "selectList") {
$options = {"", $i18n3->get("Select")};
}
$f->dynamicField(
name=>"metadata_".$meta->{$field->{fieldId}}{fieldId},
label=>$meta->{$field->{fieldId}}{name},
hoverHelp=>$meta->{$field->{fieldId}}{label},
value=>($self->session->form->process("metadata_".$meta->{$field->{fieldId}}{fieldId},$dataType) || $meta->{$field->{fieldId}}{fieldData}),
extras=>qq/title="$meta->{$field->{fieldId}}{label}"/,
possibleValues=>$meta->{$field->{fieldId}}{possibleValues},
options=>$options,
fieldType=>$dataType
);
}
my $prerequisiteList = $self->getPrerequisiteEventList($pid);
if ( scalar(keys %{$prerequisiteList}) > 0) {
@ -977,6 +1325,7 @@ sub www_editEvent {
my $output = $f->print;
$self->getAdminConsole->setHelp('add/edit event','Asset_EventManagementSystem');
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEvents'),$i18n->get("manage events"));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEventMetadata'), $i18n->get('manage event metadata'));
my $addEdit = ($pid eq "new" or !$pid) ? $i18n->get('add', 'Asset_Wobject') : $i18n->get('edit', 'Asset_Wobject');
return $self->getAdminConsole->render($output, $addEdit.' '.$i18n->get('event'));
}
@ -1005,13 +1354,20 @@ sub www_editEventSave {
$pid = $self->setCollateral("EventManagementSystem_products", "productId",
{
productId => $pid,
startDate => $self->session->datetime->humanToEpoch($self->session->form->get("startDate")),
endDate => $self->session->datetime->humanToEpoch($self->session->form->get("endDate")),
startDate => $self->session->form->process("startDate",'dateTime'),
endDate => $self->session->form->process("endDate",'dateTime'),
maximumAttendees => $self->session->form->get("maximumAttendees"),
approved => $self->session->form->get("approved")
},1,1
);
#Save the event metadata
my $mdFields = $self->getEventMetaDataFields;
foreach my $mdField (keys %{$mdFields}) {
my $value = $self->session->form->process("metadata_".$mdField,$mdFields->{$mdField}->{dataType});
$self->session->db->write("insert into EventManagementSystem_metaData values (".$self->session->db->quoteAndJoin([$mdField,$pid,$value]).") on duplicate key update fieldData=".$self->session->db->quote($value));
}
#Save the standard product data
$event = {
productId => $pid,
@ -1108,11 +1464,250 @@ sub www_manageEvents {
$self->getAdminConsole->setHelp('event management system manage events','Asset_EventManagementSystem');
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=editEvent;pid=new'), $i18n->get('add event'));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEventMetadata'), $i18n->get('manage event metadata'));
return $self->getAdminConsole->render($output, $i18n->get("manage events"));
}
#-------------------------------------------------------------------
=head2 www_manageEventMetadata ( )
Method to display the event metadata management console.
=cut
sub www_manageEventMetadata {
my $self = shift;
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
my $output;
my $metadataFields = $self->getEventMetaDataArrayRef('false');
my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
my $count = 0;
my $number = scalar(@{$metadataFields});
foreach my $row1 (@{$metadataFields}) {
my %row = %{$row1};
$count++;
$output .= "<div>".
$self->session->icon->delete('func=deleteEventMetaDataField;fieldId='.$row{fieldId},$self->getUrl,$i18n->get('confirm delete event metadata')).
$self->session->icon->edit('func=editEventMetaDataField;fieldId='.$row{fieldId}, $self->getUrl).
$self->session->icon->moveUp('func=moveEventMetaDataFieldUp;fieldId='.$row{fieldId}, $self->getUrl,($count == 1)?1:0);
$output .= $self->session->icon->moveDown('func=moveEventMetaDataFieldDown;fieldId='.$row{fieldId}, $self->getUrl,($count == $number)?1:0).
" ".$row{name}." ( ".$row{label}." )</div>";
}
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=editEventMetaDataField;fieldId=new'), $i18n->get("add new event metadata field"));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEvents'), $i18n->get('manage events'));
return $self->getAdminConsole->render($output, $i18n->get("manage event metadata"));
}
#-------------------------------------------------------------------
sub www_editEventMetaDataField {
my $self = shift;
my $fieldId = shift || $self->session->form->process("fieldId");
my $error = shift;
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
my $i18n2 = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
my $i18n = WebGUI::International->new($self->session,"WebGUIProfile");
my $f = WebGUI::HTMLForm->new($self->session, (
action => $self->getUrl."?func=editEventMetaDataFieldSave;fieldId=".$fieldId
));
my $data = {};
if ($error) {
# load submitted data.
$data = {
name => $self->session->form->process("name"),
label => $self->session->form->process("label"),
dataType => $self->session->form->process("dataType",'fieldType'),
visible => $self->session->form->process("visible",'yesNo'),
required => $self->session->form->process("required",'yesNo'),
possibleValues => $self->session->form->process("possibleValues",'textarea'),
defaultValues => $self->session->form->process("defaultValues",'textarea'),
};
$f->readOnly(
-name => 'error',
-label => 'Error:',
-value => '<span style="color:red;font-weight:bold">'.$error.'</span>',
);
} elsif ($fieldId ne 'new') {
$data = $self->session->db->quickHashRef("select * from EventManagementSystem_metaField where fieldId=?",[$fieldId]);
} else {
# new field defaults
$data = {
name => $i18n2->get('type name here'),
label => $i18n2->get('type label here'),
dataType => 'text',
visible => 0,
required => 0,
autoSearch => 0
};
}
$f->text(
-name => "name",
-label => $i18n->get(475),
-hoverHelp => $i18n->get('475 description'),,
-extras=>(($data->{name} eq $i18n2->get('type name here'))?' style="color:#bbbbbb" ':'').' onblur="if(!this.value){this.value=\''.$i18n2->get('type name here').'\';this.style.color=\'#bbbbbb\';}" onfocus="if(this.value == \''.$i18n2->get('type name here').'\'){this.value=\'\';this.style.color=\'\';}"',
-value => $data->{name},
);
$f->text(
-name => "label",
-label => $i18n->get(472),
-hoverHelp => $i18n->get('472 description'),
-value => $data->{label},
-extras=>(($data->{label} eq $i18n2->get('type label here'))?' style="color:#bbbbbb" ':'').' onblur="if(!this.value){this.value=\''.$i18n2->get('type label here').'\';this.style.color=\'#bbbbbb\';}" onfocus="if(this.value == \''.$i18n2->get('type label here').'\'){this.value=\'\';this.style.color=\'\';}"',
);
$f->yesNo(
-name=>"visible",
-label=>$i18n->get('473a'),
-hoverHelp=>$i18n->get('473a description'),
-value=>$data->{visible}
);
$f->yesNo(
-name=>"required",
-label=>$i18n->get(474),
-hoverHelp=>$i18n->get('474 description'),
-value=>$data->{required}
);
my $fieldType = WebGUI::Form::FieldType->new($self->session,
-name=>"dataType",
-label=>$i18n->get(486),
-hoverHelp=>$i18n->get('486 description'),
-value=>ucfirst $data->{dataType},
-defaultValue=>"Text",
);
my @profileForms = ();
foreach my $form ( sort @{ $fieldType->get("types") }) {
next if $form eq 'DynamicField';
my $cmd = join '::', 'WebGUI::Form', $form;
eval "use $cmd";
my $w = eval {"$cmd"->new($self->session)};
push @profileForms, $form if $w->get("profileEnabled");
}
$fieldType->set("types", \@profileForms);
$f->raw($fieldType->toHtmlWithWrapper());
$f->textarea(
-name => "possibleValues",
-label => $i18n->get(487),
-hoverHelp => $i18n->get('487 description'),
-value => $data->{possibleValues},
);
$f->textarea(
-name => "defaultValues",
-label => $i18n->get(488),
-hoverHelp => $i18n->get('488 description'),
-value => $data->{defaultValues},
);
$f->yesNo(
-name => "autoSearch",
-label => 'Initial Search Field',
-hoverHelp => 'Make this appear as a Filter Field on the Advanced Search screen by default',
-value => $data->{autoSearch},
);
my %hash;
foreach my $category (@{WebGUI::ProfileCategory->getCategories($self->session)}) {
$hash{$category->getId} = $category->getLabel;
}
$f->submit;
$self->getAdminConsole->setHelp('event management system manage events','Asset_EventManagementSystem');
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEventMetadata'), $i18n2->get('manage event metadata'));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=editEventMetaDataField;fieldId=new'), $i18n2->get("add new event metadata field"));
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=manageEvents'), $i18n->get('manage events'));
return $self->getAdminConsole->render($f->print, $i18n2->get("add new event metadata field"));
}
#-------------------------------------------------------------------
sub www_editEventMetaDataFieldSave {
my $self = shift;
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
my $error = '';
my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
foreach ('name','label') {
if ($self->session->form->get($_) eq "" ||
$self->session->form->get($_) eq $i18n->get('type name here') ||
$self->session->form->get($_) eq $i18n->get('type label here')) {
$error .= sprintf($i18n->get('null field error'),$_)."<br />";
}
}
return $self->www_editEventMetaDataField(undef,$error) if $error;
my $newId = $self->setCollateral("EventManagementSystem_metaField", "fieldId",{
fieldId=>$self->session->form->process('fieldId'),
name => $self->session->form->process("name"),
label => $self->session->form->process("label"),
dataType => $self->session->form->process("dataType",'fieldType'),
visible => $self->session->form->process("visible",'yesNo'),
required => $self->session->form->process("required",'yesNo'),
possibleValues => $self->session->form->process("possibleValues",'textarea'),
defaultValues => $self->session->form->process("defaultValues",'textarea'),
autoSearch => $self->session->form->process("autoSearch",'yesNo')
},1,1);
return $self->www_manageEventMetadata();
}
#-------------------------------------------------------------------
=head2 www_moveEventMetaDataFieldDown ( )
Method to move an event down one position in display order
=cut
sub www_moveEventMetaDataFieldDown {
my $self = shift;
my $eventId = $self->session->form->get("fieldId");
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
$self->moveCollateralDown('EventManagementSystem_metaField', 'fieldId', $eventId);
return $self->www_manageEventMetadata;
}
#-------------------------------------------------------------------
=head2 www_moveEventMetaDataFieldUp ( )
Method to move an event metdata field up one position in display order
=cut
sub www_moveEventMetaDataFieldUp {
my $self = shift;
my $eventId = $self->session->form->get("fieldId");
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
$self->moveCollateralUp('EventManagementSystem_metaField', 'fieldId', $eventId);
return $self->www_manageEventMetadata;
}
#-------------------------------------------------------------------
=head2 www_deleteEventMetaDataField ( )
Method to move an event metdata field up one position in display order
=cut
sub www_deleteEventMetaDataField {
my $self = shift;
my $eventId = $self->session->form->get("fieldId");
return $self->session->privilege->insufficient unless ($self->session->user->isInGroup($self->get("groupToAddEvents")));
$self->deleteCollateral('EventManagementSystem_metaField', 'fieldId', $eventId);
$self->reorderCollateral('EventManagementSystem_metaField', 'fieldId');
$self->deleteCollateral('EventManagementSystem_metaData', 'fieldId', $eventId); # deleteCollateral doesn't care about assetId.
return $self->www_manageEventMetadata;
}
#-------------------------------------------------------------------
=head2 www_moveEventDown ( )
Method to move an event down one position in display order
@ -1167,7 +1762,7 @@ sub www_saveRegistration {
city => $self->session->form->get("city", "text"),
state => $self->session->form->get("state", "text"),
zipCode => $self->session->form->get("zipCode", "text"),
country => $self->session->form->get("country", "selectList"),
country => join("\n",$self->session->form->get("country", "selectList")),
phone => $self->session->form->get("phoneNumber", "phone"),
email => $self->session->form->get("email", "email")
},0,0
@ -1183,7 +1778,6 @@ sub www_saveRegistration {
}
$counter++;
}
#use Data::Dumper; print "<pre>".Dumper($self->session)."</pre>";
return $self->www_view;
}
@ -1201,6 +1795,12 @@ sub prepareView {
my $templateId = $self->get("displayTemplateId");
my $template = WebGUI::Asset::Template->new($self->session, $templateId);
$template->prepare;
my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
my $language = $i18n->getLanguage(undef,"languageAbbreviation");
$self->session->style->setScript($self->session->config->get('extrasURL').'/calendar/calendar.js',{ type=>'text/javascript' });
$self->session->style->setScript($self->session->config->get('extrasURL').'/calendar/lang/calendar-'.$language.'.js',{ type=>'text/javascript' });
$self->session->style->setScript($self->session->config->get('extrasURL').'/calendar/calendar-setup.js',{ type=>'text/javascript' });
$self->session->style->setLink($self->session->config->get('extrasURL').'/calendar/calendar-win2k-1.css', { rel=>"stylesheet", type=>"text/css", media=>"all" });
$self->{_viewTemplate} = $template;
}
@ -1208,24 +1808,99 @@ sub prepareView {
sub view {
my $self = shift;
my %var;
my $keywords = $self->session->form->get("searchKeywords");
my @keys;
push(@keys,$keywords) if $keywords;
unless ($keywords =~ /^".*"$/) {
foreach (split(" ",$keywords)) {
push(@keys,$_) unless $keywords eq $_;
}
} else {
$keywords =~ s/"//g;
@keys = ($keywords);
}
my $searchPhrases;
if (scalar(@keys)) {
$searchPhrases = " and ( ";
my $count = 0;
foreach (@keys) {
$count++;
$searchPhrases .= ' and ' unless $count == 1;
my $val = $self->session->db->quote('%'.$_.'%');
$searchPhrases .= "(p.title like $val or p.description like $val)";
}
$searchPhrases .= " )";
}
if ($self->session->form->get("advSearch")) {
$searchPhrases = '';
my $fields = $self->_getFieldHash();
my $counter = 0;
for (my $cfilter = 1; $cfilter < 30; $cfilter++) {
my $value = $self->session->form->get("cfilter_t".$cfilter);
my $fieldId = $self->session->form->get("cfilter_s".$cfilter);
next if ($fieldId eq 'seatsAvailable' || $fieldId eq 'registration');
if ($value && defined $fields->{$fieldId}) {
my $compare = $self->session->form->get("cfilter_c".$cfilter);
#Format Value with Operator
$value =~ s/%//g;
my $field = $fields->{$fieldId};
if ($field->{type} =~ /^date/i) {
$value = $self->session->datetime->setToEpoch($value);
} else {
$value = lc($value);
}
if($compare eq "eq") {
$value = "=".$self->session->db->quote($value);
} elsif($compare eq "ne"){
$value = "<>".$self->session->db->quote($value);
} elsif($compare eq "notlike") {
$value = "not like ".$self->session->db->quote("%".$value."%");
} elsif($compare eq "starts") {
$value = "like ".$self->session->db->quote($value."%");
} elsif($compare eq "ends") {
$value = "like ".$self->session->db->quote("%".$value);
} elsif($compare eq "gt") {
$value = "> ".$value;
} elsif($compare eq "lt") {
$value = "< ".$value;
} elsif($compare eq "lte") {
$value = "<= ".$value;
} elsif($compare eq "gte") {
$value = ">= ".$value;
} elsif($compare eq "like") {
$value = " like ".$self->session->db->quote("%".$value."%");
}
$searchPhrases .= " and" if($counter);
$counter++;
unless ($compare eq 'numeric') {
$searchPhrases .= " lower(".$field->{tableName}.'.'.$field->{columnName}.") ".$value;
} else {
$searchPhrases .= " ".$field->{tableName}.'.'.$field->{columnName}." ".$value;
}
}
}
$searchPhrases &&= " and ( ".$searchPhrases." )";
}
my $i18n = WebGUI::International->new($self->session,'Asset_EventManagementSystem');
# Get the products available for sale for this page
my $sql = "select p.productId, p.title, p.description, p.price, p.templateId, e.approved, e.maximumAttendees
my $sql = "select p.productId, p.title, p.description, p.price, p.templateId, e.approved, e.maximumAttendees, e.startDate, e.endDate
from products as p, EventManagementSystem_products as e
where
p.productId = e.productId and approved=1
and e.assetId =".$self->session->db->quote($self->get("assetId"))."
and p.productId not in (select distinct(productId) from EventManagementSystem_prerequisites)";
and e.assetId =".$self->session->db->quote($self->get("assetId")).$searchPhrases;
# ."
# and p.productId not in (select distinct(productId) from EventManagementSystem_prerequisites)";
$var{'basicSearch.formHeader'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl.'?advSearch=0'});
$var{'advSearch.formHeader'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl.'?advSearch=1'});
$var{isAdvSearch} = $self->session->form->get('advSearch');
$var{'search.formFooter'} = WebGUI::Form::formFooter($self->session);
$var{'search.formSubmit'} = WebGUI::Form::submit($self->session, {value=>'Filter'});
my $p = WebGUI::Paginator->new($self->session,$self->getUrl,$self->get("paginateAfter"));
$p->setDataByQuery($sql);
my $eventData = $p->getPageData;
my @events;
#We are getting each events information, passing it to the *events* template and processing it
#The html returned from each events template is returned to the Event Manager Display Template for arranging
#how the events are displayed in relation to one another.
foreach my $event (@$eventData) {
my %eventFields;
@ -1237,16 +1912,18 @@ sub view {
$eventFields{'numberRegistered'} = $numberRegistered;
$eventFields{'maximumAttendees'} = $event->{'maximumAttendees'};
$eventFields{'seatsRemaining'} = $event->{'maximumAttendees'} - $numberRegistered;
$eventFields{'startDate.human'} = $self->session->datetime->epochToHuman($event->{'startDate'});
$eventFields{'endDate.human'} = $self->session->datetime->epochToHuman($event->{'endDate'});
$eventFields{'eventIsFull'} = ($eventFields{'seatsRemaining'} == 0);
if ($eventFields{'eventIsFull'}) {
$eventFields{'purchase.label'} = "Sold Out";;
$eventFields{'purchase.label'} = $i18n->get('sold out');
}
else {
$eventFields{'purchase.url'} = $self->getUrl('func=addToCart;pid='.$event->{'productId'});
$eventFields{'purchase.label'} = $i18n->get('add to cart');
}
push (@events, {'event' => $self->processTemplate(\%eventFields, $event->{'templateId'}) });
push (@events, {'event' => $self->processTemplate(\%eventFields, $event->{'templateId'}), %eventFields });
}
$var{'checkout.url'} = $self->getUrl('op=viewCart');
$var{'checkout.label'} = "Checkout";
@ -1261,7 +1938,8 @@ sub view {
$var{'canManageEvents'} = 0;
}
$p->appendTemplateVars(\%var);
$self->buildMenu(\%var);
$var{'ems.wobject.dir'} = $self->session->config->get("extrasURL")."/wobject/EventManagementSystem";
my $templateId = $self->get("displayTemplateId");
return $self->processTemplate(\%var, undef, $self->{_viewTemplate});
}

View file

@ -788,9 +788,11 @@ sub new {
my $self = {};
$self->{_session} = shift;
$self->{_groupId} = shift;
return $self->{_session}->{groupData}->{$self->{_groupId}} if $self->{_session}->{groupData}->{$self->{_groupId}};
my $override = shift;
bless $self, $class;
$self->_create($override) if ($self->{_groupId} eq "new");
$self->{_session}->{groupData}->{$self->{_groupId}} = $self;
return $self;
}
@ -1005,6 +1007,7 @@ sub set {
my $value = shift;
$self->get("groupId") unless ($self->{_group}); # precache group stuff
$self->{_group}{$name} = $value;
$self->session->{groupData}->{$self->getId} = undef;
$self->session->db->setRow("groups","groupId",{groupId=>$self->getId, $name=>$value, lastUpdated=>$self->session->datetime->time()});
}

View file

@ -169,7 +169,7 @@ If you want to add anything special to your form like javascript actions, or sty
=head3 enctype
The ecapsulation type for this form. This defaults to "multipart/form-data" and should probably never be changed.
The encapsulation type for this form. This defaults to "multipart/form-data" and should probably never be changed.
=head3 tableExtras

View file

@ -87,7 +87,7 @@ sub get {
my $output = eval($cmd);
$self->session->errorHandler->warn("Couldn't get value from ".$cmd." because ".$@) if ($@);
$output = $self->get($id,$namespace,"English") if ($output eq "" && $language ne "English");
return $output;
return $output || $id;
}
@ -210,7 +210,7 @@ sub new {
bless( {
_session => $session,
_namespace => $namespace,
_language => $language,
_language => ($language || $session->user->profileField('language')),
},$class);
}

View file

@ -199,6 +199,34 @@ sub buildHashRef {
return \%hash;
}
#-------------------------------------------------------------------
=head2 buildArrayRefOfHashRefs ( sql )
Builds an array reference of hash references of data
from a series of rows. Useful for returning many rows at once.
=head3 sql
An SQL query. The query must select at least two columns of data, the first being the key for the hash, the second being the value. If the query selects more than two columns, then the last column will be the value and the remaining columns will be joined together by a colon ":" to form a complex key. If the query selects only one column, then the key and the value will be the same.
=head3 params
An array reference containing values for any placeholder params used in the SQL query.
=cut
sub buildArrayRefOfHashRefs {
my @array;
my $sth = $_[0]->read($_[1],$_[2]);
while (my $data = $sth->hashRef) {
push(@array,$data);
}
$sth->finish;
return \@array;
}
#-------------------------------------------------------------------

View file

@ -17,6 +17,7 @@ package WebGUI::Session::ErrorHandler;
use strict;
use Log::Log4perl;
use Data::Dumper;
use Apache2::RequestUtil;
=head1 NAME
@ -387,6 +388,8 @@ sub showDebug {
my $text = $self->session->stow->get('debug_error');
$text =~ s/\n/\<br \/\>\n/g;
my $output = '<div style="text-align: left;background-color: #800000;color: #ffffff;">'.$text."</div>\n";
$text = $self->session->form->paramsHashRef();
$output .= '<div style="text-align: left;background-color: #ffffff;color: #000000;"><pre>Form Variables:'.Dumper($text)."</pre></div>\n" if(scalar(keys %{$text}));
$text = $self->session->stow->get('debug_warn');
$text =~ s/\n/\<br \/\>\n/g;
$output .= '<div style="text-align: left;background-color: #ffdddd;color: #000000;">'.$text."</div>\n";

View file

@ -167,11 +167,13 @@ Gets a hash ref of all the params passed in to this class, and their values. Thi
sub paramsHashRef {
my $self = shift;
unless ($self->{_paramsHashRef}) {
my $hash;
my %hash;
tie %hash, "Tie::IxHash";
foreach ($self->param) {
$hash->{$_} = $self->process($_);
my @arr = $self->process($_);
$hash{$_} = (scalar(@arr) > 1)?\@arr:$arr[0];
}
$self->{_paramsHashRef} = $hash;
$self->{_paramsHashRef} = \%hash;
}
return $self->{_paramsHashRef};
}

View file

@ -362,9 +362,13 @@ sub moveDown {
my $self = shift;
my $urlParams = shift;
my $pageURL = shift || $self->session->url->getRequestedUrl;
my $disabled = shift;
my $i18n = WebGUI::International->new($self->session,'Icon');
my $output = '<p style="display:inline;vertical-align:middle;"><a href="'.$self->session->url->gateway($pageURL,$urlParams).'">';
$output .= '<img src="'.$self->_getBaseURL().'moveDown.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Move Down').'" title="'.$i18n->get('Move Down').'" /></a></p>';
my $output = '<p style="display:inline;vertical-align:middle;">';
$output .= '<a href="'.$self->session->url->gateway($pageURL,$urlParams).'">' unless $disabled;
$output .= '<img src="'.$self->_getBaseURL().'moveDown.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Move Down').'" title="'.$i18n->get('Move Down').'" />';
$output .= '</a>' unless $disabled;
$output .= '</p>';
return $output;
}
@ -466,9 +470,13 @@ sub moveUp {
my $self = shift;
my $urlParams = shift;
my $pageURL = shift || $self->session->url->getRequestedUrl;
my $disabled = shift;
my $i18n = WebGUI::International->new($self->session,'Icon');
my $output = '<p style="display:inline;vertical-align:middle;"><a href="'.$self->session->url->gateway($pageURL,$urlParams).'">';
$output .= '<img src="'.$self->_getBaseURL().'moveUp.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Move Up').'" title="'.$i18n->get('Move Up').'" /></a></p>';
my $output = '<p style="display:inline;vertical-align:middle;">';
$output .= '<a href="'.$self->session->url->gateway($pageURL,$urlParams).'">' unless $disabled;
$output .= '<img src="'.$self->_getBaseURL().'moveUp.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Move Up').'" title="'.$i18n->get('Move Up').'" />';
$output .= '</a>' unless $disabled;
$output .= '</p>';
return $output;
}

View file

@ -279,6 +279,18 @@ our $I18N = { ##hashref of hashes
context => q|Link to add an event to the event manager|,
},
'manage event metadata' => {
message => q|Manage Event Metadata|,
lastUpdated => 1138908251,
context => q|Link to manage event metadata|,
},
'add new event metadata field' => {
message => q|Add new Event Metadata Field|,
lastUpdated => 1138908251,
context => q|In Manage Event Metadata screen|,
},
'null field error' => {
message => q|The %s field cannot be blank.|,
lastUpdated => 1138908251,
@ -426,6 +438,36 @@ allows you to edit events, delete events, or change their order.</p>
lastUpdated => 1131394072,
},
'global metadata' => {
message => q|Use Global Event Metadata|,
lastUpdated => 1140469381,
},
'global metadata description' => {
message => q|Whether or not to use all other Event Management Systems Metadata Fields when assigning metadata to events and searching for events.<br /><br />The management screen list of metadata fields for this asset will still remain limited to those created by this EMS asset.<br />|,
lastUpdated => 1140469381,
},
'type name here' => {
message => q|Type Name Here|,
lastUpdated => 1140469381,
},
'type label here' => {
message => q|Type Label Here|,
lastUpdated => 1140469381,
},
'sold out' => {
message => q|Sold Out|,
lastUpdated => 1140469381,
},
'confirm delete event metadata' => {
message => q|Are you certain you want to delete this metadata field? The metadata values for this field will be deleted from all events, including events in other EMS wobjects that are set to use global metadata.|,
lastUpdated => 1140469381,
},
};
1;

View file

@ -0,0 +1,158 @@
/********************************************************************************************
* BlueShoes Framework; This file is part of the php application framework.
* NOTE: This code is stripped (obfuscated). To get the clean documented code goto
* www.blueshoes.org and register for the free open source *DEVELOPER* version or
* buy the commercial version.
*
* In case you've already got the developer version, then this is one of the few
* packages/classes that is only available to *PAYING* customers.
* To get it go to www.blueshoes.org and buy a commercial version.
*
* @copyright www.blueshoes.org
* @author Samuel Blume <sam at blueshoes dot org>
* @author Andrej Arn <andrej at blueshoes dot org>
*/
if (!Bs_Objects) {var Bs_Objects = [];};function Bs_Button() {
this._id;this._objectId;this.id;this.group;this._status = 1;this.inactiveStyle = 3;this._imgPathDefault = '/_bsImages/buttons/';this.imgPath;this.imgName;this.height;this.width;this.backgroundColor;this.title;this.caption;this.action;this.cssClassDefault = 'bsBtnDefault';this.cssClassMouseOver = 'bsBtnMouseOver';this.cssClassMouseDown = 'bsBtnMouseDown';this._buttonBar;this.actualizeFromChildren = 0;this._childrenButtonBar;this._isDragAction;this._attachedEvents = new Array;this._constructor = function() {
this._id = Bs_Objects.length;Bs_Objects[this._id] = this;this._objectId = "Bs_Button_"+this._id;}
this.attachEvent = function(fire, e) {
if (typeof(e) == 'undefined') e = 'on';if (typeof(this._attachedEvents[e]) == 'undefined') this._attachedEvents[e] = new Array;this._attachedEvents[e][this._attachedEvents[e].length] = fire;}
this.attachFireOff = function(param) {
}
this.render = function() {
var isGecko = this._isGecko();var out = new Array;var containerStyle = new Array;out[out.length] = '<div style="display:inline; white-space:nowrap;">';var tagType = 'div';out[out.length] = '<' + tagType;out[out.length] = ' id="' + this._getId() + '"';if (typeof(this.title) != 'undefined') {
out[out.length] = ' title="' + this.title + '"';}
out[out.length] = ' unselectable="on"';captionType = typeof(this.caption);if (captionType != 'undefined') {
containerStyle[containerStyle.length] = 'width:auto';} else {
if (typeof(this.width) != 'undefined') containerStyle[containerStyle.length] = 'width:' + this.width + 'px';if (typeof(this.height) != 'undefined') containerStyle[containerStyle.length] = 'height:' + this.height + 'px';}
if (typeof(this.backgroundColor) != 'undefined') containerStyle[containerStyle.length] = 'background-color:' + this.backgroundColor;switch (this._status) {
case 0:
var filter = this._getInactiveStyleFilter();if (typeof(filter) == 'string') {
containerStyle[containerStyle.length] = 'filter:' + filter;}
case 1:
out[out.length] = ' class="' + this.cssClassDefault + '"';break;case 2:
out[out.length] = ' class="' + this.cssClassMouseDown + '"';break;}
out[out.length] = ' style="' + containerStyle.join(';') + '"';out[out.length] = ' onMouseOver="Bs_Objects['+this._id+'].mouseOver(this);"';out[out.length] = ' onMouseOut="Bs_Objects['+this._id+'].mouseOut(this);"';out[out.length] = ' onMouseDown="Bs_Objects['+this._id+'].mouseDown(this);"';out[out.length] = ' onMouseUp="Bs_Objects['+this._id+'].mouseUp(this);"';out[out.length] = '>';if (typeof(this.imgName) != 'undefined') {
var imgFullPath = '';imgFullPath += this._getImgPath();imgFullPath += this.imgName;if (this.imgName.substr(this.imgName.length -4) != '.gif') imgFullPath += '.gif';out[out.length] = '<img id="' + this._getId() + '_icon" src="' + imgFullPath + '"';if ((typeof(this.height) == 'undefined') || (this.height > 18)) out[out.length] = ' style="vertical-align:top;"';out[out.length] = '>';}
captionType = typeof(this.caption);if (captionType != 'undefined') {
if (captionType == 'string') {
out[out.length] = this.caption;} else {
out[out.length] = this.title;}
if (!isGecko) out[out.length] = '&nbsp;';}
if ((typeof(this._childrenButtonBar) != 'undefined') && (this.numberOfAttachedEvents('on') == 0)) {
this.group = this._objectId + '_pseudoGroup';var imgFullPath = '';if (this.imgPath) imgFullPath += this._getImgPath();imgFullPath += 'small_black_arrow_down.gif';out[out.length] = '&nbsp;<img src="' + imgFullPath + '" style="vertical-align:middle;">&nbsp;';var subBarString = this._childrenButtonBar.render();subBarString = '<div id="' + this._objectId + '_childBar" class="bsBtnMouseOver" style="width:auto; height:auto; display:none; position:absolute; left:50px; top:50px;">' + subBarString + '</div>';out[out.length] = subBarString;}
out[out.length] = '</' + tagType + '>';out[out.length] = '</div>';return out.join('');}
this.drawOut = function() {
document.writeln(this.render());}
this.drawInto = function(elm) {
if (typeof(elm) == 'string') {
elm = document.getElementById(elm);}
if (elm != null) {
var x = this.render(); //x = x.replace(/<nobr>/, '');
//x = x.replace(/<\/nobr>/, '');
x = x.replace(/<nobr>/, '<span style="white-space: nowrap">');
x = x.replace(/<\/nobr>/, '<\/span>');
elm.innerHTML = x;}
}
this.mouseOver = function(div) {
if (this._status == 2) return;if (this._status == 0) return;if (!this._isGecko()) {
div.className = this.cssClassMouseOver;}
this._fireEvent('over');}
this.mouseOut = function(div) {
if (this._status == 2) return;if (this._status == 0) return;if (!this._isGecko()) {
div.className = this.cssClassDefault;}
this._fireEvent('out');}
this.mouseDown = function(div) {
if (this._status == 0) return;this._isDragAction = false;div.className = this.cssClassMouseDown;}
this.mouseUp = function(div) {
if (this._status == 0) return;var doFireOn = true;var doFireOff = false;if (this._isGecko()) {
div.className = this.cssClassDefault;} else {
div.className = this.cssClassMouseOver;}
if (typeof(this.group) != 'undefined') {
if (this._status == 2) {
this._status = 1;doFireOn = false;doFireOff = true;} else {
div.className = this.cssClassMouseDown;this._status = 2;this._deactivateOtherGroupButtons();}
}
if (this._isDragAction) doFireOn = false;if (doFireOn) {
this._fireEvent('on');} else if (doFireOff) {
this._fireEvent('off');}
}
this.dragStart = function(div) {
if (this._status == 0) return false;this._isDragAction = true;div.className = this.cssClassMouseOver;return false;}
this._deactivateOtherGroupButtons = function() {
if (typeof(this._buttonBar) == 'undefined') return;for (var i=0; i<this._buttonBar._buttons.length; i++) {
var btnObj = this._buttonBar._buttons[i][0];if (typeof(btnObj) != 'object') continue;if ((btnObj.group == this.group)) {
if (btnObj._objectId == this._objectId) continue;btnObj._status = 1;btnDiv = document.getElementById(btnObj._getId());btnDiv.className = btnObj.cssClassDefault;}
}
}
this.setStatus = function(status) {
if (this._status == status) return;var oldStatus = this._status;this._status = status;var btnDiv = document.getElementById(this._getId());if (btnDiv != null) {
switch (status) {
case 0:
var filter = this._getInactiveStyleFilter();if (typeof(filter) == 'string') {
btnDiv.style.filter = filter;}
break;case 1:
btnDiv.className = this.cssClassDefault;break;case 2:
if (this._isGecko()) {
btnDiv.className = this.cssClassDefault;} else {
btnDiv.className = this.cssClassMouseDown;}
if (typeof(this.group) != 'undefined') {
this._deactivateOtherGroupButtons();}
break;}
}
if ((oldStatus == 0) && (this.inactiveStyle != 0)) {
btnDiv.style.filter = "";}
}
this.getStatus = function() {
return this._status;}
this.setTitle = function(title) {
var elm = document.getElementById(this._getId());if (elm != null) elm.title = title;this.title = title;}
this.setChildrenButtonBar = function(bar) {
bar._parentButton = this;this._childrenButtonBar = bar;}
this._isGecko = function() {
if (navigator.appName == "Microsoft Internet Explorer") return false; var x = navigator.userAgent.match(/gecko/i);
return (x);return false;}
this._fireEvent = function(e) {
if ((e == 'on') && (typeof(this._buttonBar) != 'undefined') && (typeof(this._buttonBar._parentButton) != 'undefined')) {
this._buttonBar._parentButton._fireEvent('off');if ((this._buttonBar._parentButton.actualizeFromChildren == 1) || (this._buttonBar._parentButton.actualizeFromChildren == 3)) {
var elm = document.getElementById(this._buttonBar._parentButton._getId() + '_icon');var imgFullPath = '';if (this.imgPath) imgFullPath += this.imgPath;imgFullPath += this.imgName;if (this.imgName.substr(this.imgName.length -4) != '.gif') imgFullPath += '.gif';elm.src = imgFullPath;}
}
if (((e == 'on') || (e == 'off')) && (typeof(this._childrenButtonBar) != 'undefined') && (this.numberOfAttachedEvents('on') == 0)) {
var elm = document.getElementById(this._objectId + '_childBar');if (elm != null) {
if (e == 'on') {
this._buttonBar.ignoreEvents = true;var pos = getAbsolutePos(document.getElementById(this._getId()));var plusPixel = (typeof(this.height) != 'undefined') ? parseInt(this.height) : 22;elm.style.top = (pos.y + plusPixel) + 'px';elm.style.left = pos.x + 'px';elm.style.display = 'block';} else {
this._buttonBar.ignoreEvents = false;elm.style.display = 'none';}
}
} else {
if (!this._attachedEvents[e]) return;for (var i=0; i<this._attachedEvents[e].length; i++) {
switch (typeof(this._attachedEvents[e][i])) {
case 'function':
this._attachedEvents[e][i](this);break;case 'string':
//var ev = this._attachedEvents[e][i].replace(/__THIS__/, this);
eval(this._attachedEvents[e][i]);break;default:
}
}
}
}
this.numberOfAttachedEvents = function(e) {
try {
return this._attachedEvents[e].length;} catch (ex) {
return 0;}
}
this._getId = function() {
if (typeof(this.id) != 'undefined') return this.id;return this._objectId + "_container";}
this._getInactiveStyleFilter = function() {
switch (this.inactiveStyle) {
case 0:
return false;break;case 1:
return 'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)';break;case 2:
return 'progid:DXImageTransform.Microsoft.BasicImage(opacity=.3)';break;default:
return 'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1) progid:DXImageTransform.Microsoft.BasicImage(opacity=.3)';}
}
this._getImgPath = function() {
if (typeof(this.imgPath) != 'undefined') {
return this.imgPath;} else if (typeof(this._buttonBar) != 'undefined') {
return this._buttonBar.imgPath;} else {
return this._imgPathDefault;}
}
this._constructor();}

View file

@ -0,0 +1,98 @@
/********************************************************************************************
* BlueShoes Framework; This file is part of the php application framework.
* NOTE: This code is stripped (obfuscated). To get the clean documented code goto
* www.blueshoes.org and register for the free open source *DEVELOPER* version or
* buy the commercial version.
*
* In case you've already got the developer version, then this is one of the few
* packages/classes that is only available to *PAYING* customers.
* To get it go to www.blueshoes.org and buy a commercial version.
*
* @copyright www.blueshoes.org
* @author Samuel Blume <sam at blueshoes dot org>
* @author Andrej Arn <andrej at blueshoes dot org>
*/
if (!Bs_Objects) {var Bs_Objects = [];};
function Bs_ButtonBar() {
this._id;
this._objectId;
this.imgPath = '/_bsImages/buttons/';
this.useHelpBar;
this.alignment = 'hor';
this.ignoreEvents = false;
this.helpBarStyle = "font-family:arial; font-size:11px; height:16px;";
this._buttons = new Array;
this._parentButton;
this._constructor = function() {
this._id = Bs_Objects.length;
Bs_Objects[this._id] = this;
this._objectId = "Bs_ButtonBar_"+this._id;
}
this.addButton = function(btn, helpBarText) {
btn._buttonBar = this;
this._buttons[this._buttons.length] = new Array(btn, helpBarText);
}
this.newGroup = function() {
this._buttons[this._buttons.length] = '|';
}
this.render = function() {
var out = new Array;
if (this._isGecko()) {
out[out.length] = '<div style="background-color: menu; padding: 2px">';
} else {
out[out.length] = '<div style="background-color:menu;">';
}
out[out.length] = '<div>';
for (var i=0; i<this._buttons.length; i++) {
if (this.alignment != 'hor') {
out[out.length] = '<div>';
}
if (this._buttons[i] == '|') {
out[out.length] = '<span class="' + ((this.alignment == 'hor') ? 'separatorForHorizontal' : 'separatorForVertical') + '"></span>';
} else {
var btn = this._buttons[i][0];
var helpBarDiv = false;
if (typeof(this.useHelpBar) == 'string') {
var helpBarDiv = this.useHelpBar;
} else if (this.useHelpBar) {
var helpBarDiv = this._objectId + '_helpBarDiv';
}
if (helpBarDiv != false) {
btn.attachEvent("document.getElementById('" + helpBarDiv + "').innerHTML = \"" + this._buttons[i][1] + "\";", 'over');
btn.attachEvent("document.getElementById('" + helpBarDiv + "').innerHTML = \"\";", 'out');
}
out[out.length] = btn.render();
}
if (this.alignment != 'hor') {
out[out.length] = '</div>';
}
}
out[out.length] = '</div>';
if (this.useHelpBar) {
if (this.useHelpBar == 2) {
out[out.length] = '<div style="' + this.helpBarStyle + '">';
out[out.length] = '<img align="middle" src="' + this.imgPath + 'bs_info.gif" border="0" onMouseOver="document.getElementById(\'' + helpBarDiv + '\').innerHTML = \'Move your mouse over the buttons to see the description here.\';" onMouseOut="document.getElementById(\'' + helpBarDiv + '\').innerHTML = \'\';"> ';
out[out.length] = '<span id="' + helpBarDiv + '"></span></div>';
} else if (this.useHelpBar == true) {
out[out.length] = '<div id="' + helpBarDiv + '" style="' + this.helpBarStyle + '"></div>';
}
}
out[out.length] = '</div>';
return out.join('');
}
this.drawOut = function() {
document.writeln(this.render());}
this.drawInto = function(elm) {
if (typeof(elm) == 'string') {
elm = document.getElementById(elm);}
if (elm) {
elm.innerHTML = this.render();}
}
this._isGecko = function() {
if (navigator.appName == "Microsoft Internet Explorer") return false; var x = navigator.userAgent.match(/gecko/i);
return (x);return false;}
this._constructor();}

View file

@ -0,0 +1,230 @@
var textCompareList = {
"eq":"equals",
"like":"contains",
"ne":"is not",
"notlike":"not like",
"starts":"starts with",
"ends":"ends with"
};
var numericCompareList = {
"eq":"=",
"ne":"is not",
"gt":">",
"lt":"<",
"gte":">=",
"lte":"<="
};
var booleanCompareList = {
"eq":"is",
"ne":"is not"
};
function addField() {
var tb = document.getElementById('filterbody');
filterCount++;
var newtr = document.createElement('tr');
newtr.setAttribute("id","cfilter_id"+filterCount);
//Create right table data
var newtd1 = document.createElement('td');
newtd1.className="searchDisplay";
//Add fields to choose from
var newDD = newtd1.appendChild(addFilterSelect());
//Create left table data
var newtd2 = document.createElement('td');
newtd2.className="searchDisplay";
newtd2.setAttribute("id","cfilter_td_"+filterCount);
//Add default compare select list
var compareSelect = addSelectList('cfilter_c'+filterCount,textCompareList);
compareSelect.className="compare-select";
newtd2.appendChild(compareSelect);
//Add default filter field
var filterText = addTextField('cfilter_t'+filterCount);
filterText.className="filter-text";
newtd2.appendChild(filterText);
//Add remove button
var filterButton = addButton('cbutton_'+filterCount,'-');
filterButton.className="button";
filterButton.onclick = removeField;
newtd2.appendChild(filterButton);
//Add tds to trs
newtr.appendChild(newtd1);
newtr.appendChild(newtd2);
//Add trs to tbody
tb.appendChild(newtr);
return newDD;
}
function getTarget(e) {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
return targ
}
function getFilterId(button) {
if(button == null) return;
var name = button.name;
var strs = name.split("_");
var end = strs[1];
if(isNaN(end)) {
end = end.substring(1,end.length);
}
return end;
}
function removeField (event) {
var button = getTarget(event);
var filterId = getFilterId(button);
var idName = "cfilter_id"+filterId;
removeElement('filterbody',idName);
}
function changeField (event) {
var button = getTarget(event);
var filterId = getFilterId(button);
var idName = 'cfilter_s'+filterId+'_id';
var sel = document.getElementById(idName);
var field = sel.options[sel.selectedIndex].value;
changeToType(field,filterId);
}
function changeToType(field,filterId) {
var fieldType = filterList[field]["type"];
var fieldCompare = filterList[field]["compare"];
var tr = document.getElementById("cfilter_id"+filterId);
var td = document.getElementById("cfilter_td_"+filterId);
//Remove old td
tr.removeChild(td);
//Create new td
var newtd = document.createElement('td');
newtd.className="searchDisplay";
newtd.setAttribute("id","cfilter_td_"+filterId);
//Add default compare select list
var arr;
if(fieldCompare == "text") {
arr = textCompareList;
} else if(fieldCompare == "numeric") {
arr = numericCompareList;
} else if(fieldCompare == "boolean") {
arr = booleanCompareList;
}
var compareSelect = addSelectList('cfilter_c'+filterId,arr);
compareSelect.className="compare-select";
newtd.appendChild(compareSelect);
var filterFieldName = 'cfilter_t'+filterId;
if(fieldType == "text") {
var filterField = addTextField(filterFieldName);
filterField.className="filter-text";
newtd.appendChild(filterField);
} else if(fieldType == "select") {
var filterField = addSelectList(filterFieldName,filterList[field]["list"]);
filterField.className="filter-text";
newtd.appendChild(filterField);
} else if(fieldType == "date") {
var filterField = addTextField(filterFieldName);
//filterField.setAttribute("id",dateFieldId);
filterField.className="filter-text";
newtd.appendChild(filterField);
} else if(fieldType == "dateTime") {
var filterField = addTextField(filterFieldName);
//filterField.setAttribute("id",dateFieldId);
filterField.className="filter-text";
newtd.appendChild(filterField);
}
//Add remove button
var filterButton = addButton('cbutton_'+filterId,'-');
filterButton.className="button";
filterButton.onclick = removeField;
newtd.appendChild(filterButton);
//Add new td to tr
tr.appendChild(newtd);
if(fieldType == "date") {
var dateFieldId = filterFieldName+"_id";
Calendar.setup({
"inputField":dateFieldId,
"ifFormat": "%Y-%m-%d",
"showsTime": false,
"timeFormat": "12",
"mondayFirst": false
});
}
if(fieldType == "dateTime") {
var dateFieldId = filterFieldName+"_id";
Calendar.setup({
"inputField":dateFieldId,
"ifFormat": "%Y-%m-%d %H:%M:%S",
"showsTime": true,
"step": 1,
"timeFormat": "12",
"mondayFirst": false
});
}
}
function addFilterSelect() {
var sel = document.createElement("select");
sel.setAttribute('name','cfilter_s'+filterCount);
sel.setAttribute('id','cfilter_s'+filterCount+'_id');
sel.className="filter-select";
sel.onchange=changeField;
//one way to write a function... you have to write it yourself!
//myOnChange = new Function("e", "location.href=myselect.options[myselect.selectedIndex].value");
//first option
for (var word in filterList) {
//listString += items[word] + ", ";
var opt = document.createElement("option");
opt.setAttribute("value",word);
opt.appendChild(document.createTextNode(filterList[word]["name"]));
sel.appendChild(opt);
}
return sel;
}
function addSelectList(fieldName,array) {
var sel = document.createElement("select");
sel.setAttribute('name',fieldName);
sel.setAttribute("id",fieldName+"_id");
for (var word in array) {
var opt = document.createElement("option");
opt.setAttribute("value",word);
opt.appendChild(document.createTextNode(array[word]));
sel.appendChild(opt);
}
return sel;
}
function addTextField(fieldName) {
var text = document.createElement("input");
text.setAttribute('type','text');
text.setAttribute('name',fieldName);
text.setAttribute("id",fieldName+"_id");
return text;
}
function addButton(name,value) {
var button = document.createElement('input');
button.setAttribute('type','button');
button.setAttribute('value',value);
button.setAttribute('name',name);
return button;
}
function removeElement(parent,child) {
var p = document.getElementById(parent);
var c = document.getElementById(child);
p.removeChild(c);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*****************************************************************
Page : locale_EN.js
Description : text for english version
Date : 20/04/05
Authors:Alessandro Viganò (avigano@Movinfo.it) / Filippo Zanardo (fzanardo@MOViNFO.it)
Copyright (C) 2005-2006 MOViNFO
MovTable is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
MovTable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************/
var getTextStrings= new Array()
getTextStrings["Nascondi Colonna"]="Hide Column"
getTextStrings["Mostra Colonne"]="Show Columns"
getTextStrings["Tutte"]="All"
getTextStrings["Filtro in base a selezione"]="Filter by selection"
getTextStrings["Filtro ad esclusione selezione"]="Filter out selection"
getTextStrings["Rimuovi filtro"]="Remove Filter"
getTextStrings["Ordinamento crescente"]="Ascending Order"
getTextStrings["Ordinamento decrescente"]="Descending order"
getTextStrings["Copia"]="Copy"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,115 @@
if (!Bs_Objects) {
var Bs_Objects = [];
};
function Bs_TabSet(outerElmId) {
var a = arguments;
this._outerElmId = (a.length>1) ? a[1] : a[0];
this._id;
this._objectId;
this.tabs = new Array;
this._activeTabIdx = 0;
this._onTabSelectEvent;
this._constructor = function(button) {
this._id = Bs_Objects.length;
Bs_Objects[this._id] = this;
this._objectId = "Bs_TabSet_"+this._id;
this._button = button;
}
this.addTab = function(caption, container) {
if (typeof(caption) == 'object') {
var o = caption;
} else {
var o = new Object;
o.caption = caption;
o.container = container;
}
o.tabIdx = this.tabs.length;this.tabs[o.tabIdx] = o;
}
this.render = function() {
var ret = new Array;
ret[ret.length] = '<div class="tabsetTabsDiv">';
ret[ret.length] = '<div style="width:2px; min-width:2px; display:inline;"></div>';
for (var i=0; i<this.tabs.length; i++) {
if (i == this._activeTabIdx) {
var cls = 'bsTabsetActive';
} else {
var cls = 'bsTabsetInactive';
if (this.tabs[i].container) this.tabs[i].container.style.display = 'none';
}
ret[ret.length] = '<div unselectable="On" id="' + this._objectId + '_tabCap_' + i + '" class="bsTabset ' + cls + '" style="display:inline;" onclick="Bs_Objects['+this._id+'].switchTo(' + i + ');">' + this.tabs[i].caption + '</div>';
}
ret[ret.length] = '<div style="width:50px; min-width:50px; display:inline;"></div>';
ret[ret.length] = '<div unselectable="On" style="display:inline;"><input type="submit" value="Save" class="tabButton"></div>'
ret[ret.length] = '</div>';
return ret.join('');
}
this.draw = function() {
var elem = document.getElementById(this._outerElmId + '_tabs');
if (elem) elem.innerHTML = this.render();
}
this.switchTo = function(theReg) {
newRegIdx = -1;
if (theReg=='') theReg = '0';
if (isNaN(parseInt(theReg))) {
for (var i=0; i<this.tabs.length; i++) {
if (this.tabs[i].caption == theReg) (newRegIdx = i);
}
} else {
newRegIdx = theReg;
}
if (newRegIdx<0) return;
for (var i=0; i<this.tabs.length; i++) {
var elem = document.getElementById(this._objectId + '_tabCap_' + i);
if (!elem) continue;if (newRegIdx == i) {
this._activeTabIdx = i;
elem.className = 'bsTabset bsTabsetActive';
this.tabs[i].container.style.display = 'block';
if (typeof(this.tabs[i].onFocus) != 'undefined') {
this._triggerFunction(this.tabs[i].onFocus);
}
this.fireOnTabSelect();
} else {
elem.className = 'bsTabset bsTabsetInactive';
this.tabs[i].container.style.display = 'none';
if (typeof(this.tabs[i].onBlur) != 'undefined') {
this._triggerFunction(this.tabs[i].onBlur);
}
}
}
}
this.getActiveTab = function() {
return this.tabs[this._activeTabIdx];
}
this.onTabSelect = function(yourEvent) {
this._onTabSelectEvent = yourEvent;
}
this.fireOnTabSelect = function() {
if (this._onTabSelectEvent) {
func = this._onTabSelectEvent;
if (this._onTabSelectEvent == 'string') {
eval(func);
} else {
func(this);
}
}
return true;
}
this._triggerFunction = function(func) {
if (typeof(func) == 'function') {
func();
} else if (typeof(func) == 'string') {
eval(func);
}
}
this._constructor();
}

View file

@ -0,0 +1,107 @@
.linedRow{
border-bottom: 1px black ridge;
}
.object_note {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
}
.system_message_table {
border: 1px 1px 1px 1px groove gray;
background:silver;
}
.system_message_cell {
font-size:11px;
color:black;
}
.system_message_title {
background:#003366;
font-size:13px;
color:white;
font-weight:bold;
border: 1px 1px 1px 1px white ridge;
font-weight:bold;
}
.tab {
border-left:1px groove #eeeeee;
border-bottom: 3px solid gray;
border-top:1px ridge silver;
border-right: 1px ridge whilte;
spacing-bottom:3px;
padding-top:3px;
background: #efefef;
color:black;
font-weight:bold;
width:90px;
}
.tab_selected {
border-left:1px groove #eeeeee;
border-bottom: 3px solid black;
border-top:1px ridge silver;
border-right: 1px ridge whilte;
background:#a2a2a2;
padding-top:3px;
font-weight:bold;
width:90px;
color:#f6f6f6;
cursor:hand;
}
.tab_hover {
border-left:1px groove #eeeeee;
border-bottom: 3px solid black;
border-top:1px ridge silver;
border-right: 1px ridge whilte;
background:white;
padding-top:3px;
font-weight:bold;
width:90px;
color:black;
cursor:hand;
}
.tabs_header{
font-weight:bold;
font-size:13px;
border-left:1px ridge black;
border-bottom: 3px solid black;
border-right: 1px ridge whilte;
padding: 2px 2px 2px 2px;
}
.calendar_row_data{
}
.calendar_week {
border: 1px groove black;
}
.calendar_week_cell {
border: 1px groove silver;
}
.calendar_weekday{
border: 1px ridge black;
height:100px;
}
.calendar_week_subheader{
border: 1px ridge black;
background:#EEEEEE;
font-weight:bold;
}
.calendar_inner_row{
border-bottom: 1px dotted silver;
}
.contactlistsmall {
border-bottom: 1px dotted black;
font-size:9px;
font-weight:normal;
color:gray;
background:#eeeeee;
}
.contactlistsmallover {
border-bottom: 1px dotted black;
font-size:9px;
font-weight:normal;
color:white;
background:silver;
cursor:hand;
}

View file

@ -0,0 +1,42 @@
.bsTabset {
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 2px outset;
font-family:arial,helvetica,sans-serif;
font-size: 12px;
background-color:#D6D3CE;
}
.bsTabsetActive {
border-bottom: 1px solid #D6D3CE;
cursor: default;
padding-top:3px;
padding-bottom:2px;
vertical-align:middle;
padding-left:5px;
padding-right:5px;
margin-left:-2px;
margin-right:-0px;
}
.bsTabsetInactive {
border-bottom: 1px solid white;
cursor: hand; cursor:pointer;
padding-top:1px;
padding-bottom:0px;
vertical-align : bottom;
padding-left:3px;
padding-right:3px;
margin-left:0px;
margin-right:0px;
background-color:#9F988C;
}
.tabsetContentDiv {
background-color:#D6D3CE;
border-left:1px solid white;
border-bottom:2px outset;
border-right:2px outset;
padding:2px;
}
.tabsetTabsDiv {
border-bottom:1px solid white;
background-color:transparent;
}

View file

@ -0,0 +1,170 @@
.text {
font-family: Arial , Times, Serif;
font-size: 12px;
color: #333333;
}
a.text:link {
color: #333333;
text-decoration: underline;
}
a.text:visited {
color: #333333;
text-decoration: underline;
}
a.text:hover {
color: #333333;
text-decoration: none;
}
body {
font-family: Arial , Times, Serif
}
.movtable th {
/*vertical-align: middle;*/
color: #FFFFFF;
font-size: 11px;
font-weight : bold;
background-color: #688097;
/*height: 38px; */
}
.movtable th img {
align: middle
}
.thdrag {
border-width: 50px 50px 50px 50px;
text-align:center; color: #333333;
font-size: 11px;
font-weight : bold;
background-color: #C3CCD5;
height: 25px;
display:table-cell;
background-image: url(images/cellpic3.gif)
}
.thdrag a {
color: #000000;
text-decoration: underline
}
.thdrag a:visited {
color: #000000;
text-decoration: underline
}
.movtable td {
white-space:nowrap;
text-overflow:ellipsis;
overflow: hidden;
}
.tdSelected {
background-color:yellow;
}
tr.movTableRow1{
background-color: #E4E4E4;
font-size: 12px;
}
tr.movTableRow2{
background-color: #F2F2F2;
font-size: 12px;
}
.movtable a {
color: #FFFFFF;
font-size: 11px;
font-weight : bold;
text-decoration: underline
}
.movtable a:visited {
text-decoration: underline
}
.movtable a:hover {
text-decoration: none
}
.movtable {
background-color: #FFFFFF;
border: 1px #688097 solid
}
form.movtable {
padding:3px;
background:#F4F3F3 ;
border:1px solid #8E8E8E;
margin-top:7px;
}
h2 {
font-size:14px;
font-weight: bold;
color: #343436;
}
input.btn{
color:#333333;
font-family:'trebuchet ms',helvetica,sans-serif;
font-size:75%;
background-color:#EBEEF1;
border:1px solid;
border-top-color:#C3CCD5;
border-left-color:#C3CCD5;
border-right-color:#333333;
border-bottom-color:#333333;
}
input.btnhov{
/*border-top-color:#c63;
border-left-color:#c63;
border-right-color:#930;
border-bottom-color:#930;*/
color:#71BFC6;
}
input.Special,textarea.Special {
font-family: Verdana;
color: #374451;
font-size: 11px;
/*background-color: #FAFACA;*/
}
select.Special {
font-family: Verdana;
color: #374451;
font-size: 11px;
/*background-color: #FAFACA;*/
}
#mov_nav {margin-top:7px}
#mov_filter{width:100%;
margin-top:7px;
padding:3px;
background:#F4F3F3 ;
border:1px solid #8E8E8E;
}
.titunderline
{
padding-left: 20px;
padding:5px;
color: #000000;
background: #DCDBDB;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;
}

View file

@ -0,0 +1,494 @@
#crmcalendar { }
/*body,td,li {
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
A {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:#333399;
font-weight:bold
}
A:hover {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:#333399;
background:#cccc66;
font-weight:bold;
}
A:visited {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:#333399;
font-weight:bold;
}
*/
td.searchDisplay {
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.header {
font-family: verdana;
font-size: 13px;
font-weight:bold;
}
.footnote {
font-family: verdana;
font-size: 9px;
font-weight: normal;
color: gray;
}
.select {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
width:190px;
}
.smselect {
font-family: verdana;
font-size: 10px;
font-weight: normal;
color: black;
width: 150px;
}
.button {
background: #47404C;
font-family: verdana;
font-size: 11px;
font-weight: bold;
color: white;
border: solid #D4D3D4 1px 1px 1px 1px;
width: 15px;
}
.button_login {
background: #47404C;
font-family: verdana;
font-size: 11px;
font-weight: bold;
color: white;
padding: 2px 10px 2px 10px;
border: solid #D4D3D4 1px 1px 1px 1px;
}
.datatitle {
padding: 1px 1px 1px 5px;
background: #688097;
color: white;
font-family: verdana;
font-weight: normal;
font-size:11px;
border-bottom: 1px ridge white groove;
}
.datafield {
padding: 1px 1px 1px 1px;
background: #EEEEEE;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
border-bottom: 1px ridge white groove;
}
.datacard {
padding: 1px 1px 1px 1px;
border: 1px solid #688097;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.datacardtitle {
background: silver;
color: black;
font-family: verdana;
font-weight: bold;
font-size:13px;
}
.datalist {
padding: 1px 1px 1px 1px;
border: 1px ridge black;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.datalistrow {
padding: 5px;
background: #F2F2F2;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
/*border-bottom: 1px ridge black;
border-left: 1px ridge black;*/
}
.journal {
padding: 1px 1px 1px 1px;
border: 1px ridge black;
background: #ffff99;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.journalrowtime {
padding: 1px 1px 1px 1px;
border-left: 1px ridge black;
border-bottom: 1px ridge black;
background: #ffff99;
color: black;
font-family: verdana;
font-weight: bold;
font-size:13px;
}
.journalrow {
padding: 1px 1px 1px 1px;
border-left: 1px ridge black;
border-bottom: 1px ridge black;
background: #ffff99;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.journalrowempty {
padding: 1px 1px 1px 1px;
border-left: 1px ridge black;
border-bottom: 1px ridge black;
background: #ffcc66;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.crmcalendar {
padding: 1px 1px 1px 1px;
border: 1px ridge black;
color: black;
font-family: verdana;
font-weight: normal;
font-size:10px;
}
.calendartitle {
background: #EEEEEE;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.calendarselected {
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: silver;
color: black;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.calendarcell {
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: #EEEEEE;
color: black;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.calendarcellfull {
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: #cccc00;
color: black;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.calendarcellfullselected {
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: yellow;
color: black;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.calendaremptycell {
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: white;
color: silver;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.navlink_selected {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:#663366;
font-weight:bold
}
A.navlink {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:white;
font-weight:bold
}
A.navlink:hover {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:yellow;
font-weight:bold;
}
A.navlink:visited {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:white;
font-weight:bold;
}
.status {
font-family: verdana;
font-size: 11px;
text-decoration: none;
color:white;
font-weight:bold;
}
.fieldset {
background:#ECEBED;
font-family: verdana;
font-size: 11px;
color:black;
font-weight:bold;
padding: 2px 2px 2px 2px;
}
.header {
color: black;
font-family: verdana;
font-weight: bold;
font-size:17px;
}
.listing_header {
padding: 1px 1px 1px 1px;
background: #ECEBED;
color: black;
font-family: verdana;
font-weight: bold;
font-size:12px;
}
.listing {
padding: 1px 1px 1px 1px;
background: #ECEBED;
color: black;
font-family: verdana;
font-weight: normal;
font-size:11px;
}
.listing_space {
padding: 0px 0px 0px 0px;
background: white;
}
.nav_white {
padding: 1px 2px 2px 2px;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.nav_dark {
padding: 2px 2px 2px 2px;
background: #7B7782;
color: white;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.nav_dark_on {
padding: 2px 2px 2px 2px;
border: 2px ridge red;
background: silver;
color: white;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.error_login {
color: red;
font-family: verdana;
font-weight: bold;
font-size:11px;
}
.title {
color: black;
font-family: verdana;
font-weight: bold;
font-size:14px;
}
A.small_link {
font-family: verdana;
font-size: 10px;
text-decoration: none;
color:navyblue;
font-weight:normal;
}
A.small_link:hover {
font-family: verdana;
font-size: 10px;
text-decoration: underline;
color:red;
font-weight:normal;
}
A.small_link:visited {
font-family: verdana;
font-size: 10px;
text-decoration: none;
color:navyblue;
font-weight:normal;
}
.borderedframe {
border: 1px ridge black;
scrollbar-3dlight-color : Aqua;
scrollbar-arrow-color : Black;
scrollbar-base-color : Fuchsia;
scrollbar-darkshadow-color : Gray;
scrollbar-face-color : Lime;
scrollbar-highlight-color : #FF1493;
scrollbar-shadow-color : #9400D3;
scrollbar-track-color : Blue;
}
.disabled {
background: #EEEEEE;
color: gray;
}
.searchhead {
background:#ECEBED;
color: black;
font-family: verdana;
font-size: 13px;
font-weight:bold;
}
.a2z{
border-left: 1px ridge silver;
border-bottom: 1px ridge silver;
background: white;
color: black;
font-family: verdana;
font-weight: bold;
font-size:10px;
}
.small{
color: black;
font-family: verdana;
font-weight: normal;
font-size:9px;
}
.headertable {
background:#00518B;
font-family: verdana;
font-weight: bold;
font-size: 9px;
color:white;
}
.headertable2 {
background:#B21BB0;
font-family: verdana;
font-weight: bold;
font-size: 9px;
color:white;
}
.headertext {
font-family: verdana;
font-weight: bold;
font-size: 9px;
color:white;
}
.topnavlink {
font-family: verdana;
font-size: 11px;
font-weight:bold;
}
A.topnavlink {
font-family: verdana;
font-size: 11px;
font-weight:bold;
}
A.topnavlink:hover {
font-family: verdana;
font-size: 11px;
font-weight:bold;
background:none;
}
A.topnavlink:visited {
font-family: verdana;
font-size: 11px;
font-weight:bold;
}
.leftnav{
padding: 1px 1px 1px 1px;
background: white;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
border: 1px black ridge;
cursor:hand;
}
.leftnavon{
padding: 1px 1px 1px 1px;
background: yellow;
color: black;
font-family: verdana;
font-weight: bold;
font-size:11px;
border: 1px black ridge;
cursor:hand;
}
.termswindow{
padding: 1px 1px 1px 1px;
border: 1px ridge black;
background: #f5f5f5;
color: black;
}
.treecell {
border-bottom: 1px groove silver;
}
input.btn{
color:#333333;
font-family:'trebuchet ms',helvetica,sans-serif;
background-color:#EBEEF1;
border:1px solid;
border-top-color:#C3CCD5;
border-left-color:#C3CCD5;
border-right-color:#333333;
border-bottom-color:#333333;
}
input.btnhov{
color:#71BFC6;
}

View file

@ -0,0 +1,186 @@
/*
Menu related selectors
*/
.jsdomenudiv {
background-color: #FFFFFF;
background-image: url(office_xp_menu_left.png);
background-repeat: repeat-y;
border: 1px solid #8A867A;
cursor: default;
padding-bottom: 1px;
padding-top: 1px;
position: absolute; /* Do not alter this line! */
visibility: hidden;
z-index: 10;
}
.jsdomenuitem {
background: transparent;
border: none;
color: #000000;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 3px;
padding-left: 30px;
padding-right: 15px;
padding-top: 3px;
position: relative; /* Do not alter this line! */
}
.jsdomenuitemdisabled {
background: transparent;
border: none;
color: #B5B5B5;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 3px;
padding-left: 30px;
padding-right: 15px;
padding-top: 3px;
position: relative; /* Do not alter this line! */
}
.jsdomenuitemover {
background-color: #C1D2EE;
border: 1px solid #316AC5;
color: #000000;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
margin-left: 1px;
margin-right: 1px;
padding-bottom: 2px;
padding-left: 28px;
padding-right: 15px;
padding-top: 2px;
position: relative; /* Do not alter this line! */
}
.jsdomenuarrow {
background-image: url(office_xp_arrow.png);
background-repeat: no-repeat; /* Do not alter this line! */
height: 7px;
position: absolute; /* Do not alter this line! */
right: 8px;
width: 4px;
}
.jsdomenuarrowover {
background-image: url(office_xp_arrow_o.png);
background-repeat: no-repeat; /* Do not alter this line! */
height: 7px;
position: absolute; /* Do not alter this line! */
right: 8px;
width: 4px;
}
.jsdomenusep {
padding-left: 28px;
}
.jsdomenusep hr {
}
/*
Menu bar related selectors
*/
.jsdomenubardiv {
background-color: #ECE9D8;
background-image: url(office_xp_divider.png);
background-position: left;
background-repeat: no-repeat;
border: 1px outset;
cursor: default;
padding-bottom: 3px;
padding-left: 1px;
padding-right: 1px;
padding-top: 3px;
position: absolute; /* Do not alter this line! */
visibility: visible;
}
.jsdomenubardragdiv {
cursor: move;
display: inline;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 2px;
padding-left: 5px;
padding-right: 5px;
padding-top: 2px;
position: relative; /* Do not alter this line! */
visibility: hidden;
width: 9px;
}
.jsdomenubaritem {
background-color: #EFEDDE;
border: none;
color: #000000;
display: inline;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 2px;
padding-left: 24px;
padding-right: 10px;
padding-top: 2px;
position: relative; /* Do not alter this line! */
}
.jsdomenubaritemover {
background-color: #C1D2EE;
border: 1px solid #316AC5;
color: #000000;
display: inline;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 2px;
padding-left: 23px;
padding-right: 9px;
padding-top: 2px;
position: relative; /* Do not alter this line! */
}
.jsdomenubaritemclick {
background-color: #EFEDDE;
border: 1px solid #8A867A;
color: #000000;
display: inline;
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
font-size: 12px;
padding-bottom: 2px;
padding-left: 23px;
padding-right: 9px;
padding-top: 2px;
position: relative; /* Do not alter this line! */
}
/*
Example of selectors for icons. Change the height and width to match the actual
height and width of the icon image.
*/
.icon1 {
background-image: url(icon1.png);
background-repeat: no-repeat; /* Do not alter this line! */
height: 16px;
left: 4px;
position: absolute; /* Do not alter this line! */
width: 16px;
}
.icon2 {
background-image: url(icon2.png);
background-repeat: no-repeat; /* Do not alter this line! */
height: 16px;
left: 4px;
position: absolute; /* Do not alter this line! */
width: 16px;
}
.icon3 {
background-image: url(icon3.png);
background-repeat: no-repeat; /* Do not alter this line! */
height: 16px;
left: 4px;
position: absolute; /* Do not alter this line! */
width: 16px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

View file

@ -0,0 +1,41 @@
/*
* !!!!!!!!!!!!!!!!!!!!!!!!!!
* deprecated, not used anymore! check win2k_ie.css
* !!!!!!!!!!!!!!!!!!!!!!!!!!
*/
.bsBtnDefault {
display:inline;
/*float:left;*/
width:24;
height:22;
background-color:menu;
padding-left:4px;
padding-top:3px;
}
.bsBtnMouseOver {
display:inline;
/*float:left;*/
width:24;
height:22;
background-color:menu;
padding-left:3px;
padding-top:2px;
border-left:1px solid white;
border-top:1px solid white;
border-right:1px solid #808080;
border-bottom:1px solid #808080;
}
.bsBtnMouseDown {
display:inline;
/*float:left;*/
width:24;
height:22;
background-color:menu;
padding-left:4px;
padding-top:3px;
border-left:1px solid #808080;
border-top:1px solid #808080;
border-right:1px solid white;
border-bottom:1px solid white;
}

View file

@ -0,0 +1,69 @@
.bsBtnDefault {
display:inline;
/*float:left;*/
width:24px;
height:22px;
background-color:Menu;
padding-left:4px;
padding-top:3px;
font-family: arial, helvetica;
font-size: 12px;
cursor: default;
display:inline;
}
.bsBtnMouseOver {
display:inline;
/*float:left;*/
width:24px;
height:22px;
background-color:Menu;
padding-left:3px;
padding-top:2px;
border-left:1px solid white;
border-top:1px solid white;
border-right:1px solid #808080;
border-bottom:1px solid #808080;
font-family: arial, helvetica;
font-size: 12px;
cursor: default;
display:inline;
}
.bsBtnMouseDown {
display:inline;
/*float:left;*/
width:24px;
height:22px;
background-color:Menu;
padding-left:4px;
padding-top:3px;
border-left:1px solid #808080;
border-top:1px solid #808080;
border-right:1px solid white;
border-bottom:1px solid white;
font-family: arial, helvetica;
font-size: 12px;
cursor: default;
display:inline;
}
/**
* vertical separator for a horizontal bar
*/
.separatorForHorizontal {
background-color: white;
height: 22px;
border-left: 1px inset;
width: 2px;
}
/**
* horizontal separator for a vertical bar
* todo: crap, too much room at the bottom, dunno why.
*/
.separatorForVertical {
margin-top:5px;
margin-bottom:0px;
padding-bottom:0px;
background-color: menu;
height: 0px;
border-top: 1px inset;
width: 22px;
}

View file

@ -0,0 +1,79 @@
SPAN.bsBtnDefault IMG {vertical-align: bottom; padding: 3px }
SPAN.bsBtnMouseDown IMG {vertical-align: bottom; padding: 4px 2px 2px 4px }
DIV.bsBtnDefault IMG {vertical-align: bottom; padding: 3px }
DIV.bsBtnMouseDown IMG {vertical-align: bottom; padding: 4px 2px 2px 4px }
SPAN.bsBtnDefault {
/* line-height: 24px;*/
background-color:Menu;
margin: 0px;
padding-left:0px;
padding-top:3px;
padding-bottom: 2px;
border: 1px solid Menu;
font-family: arial, helvetica;
font-size: 12px;
cursor: default;
}
DIV.bsBtnDefault {
/* line-height: 24px;*/
background-color:Menu;
margin: 0px;
padding-left:0px;
padding-top:3px;
padding-bottom: 2px;
border: 1px solid Menu;
font-family: arial, helvetica;
font-size: 12px;
cursor: default;
display:inline;
}
SPAN.bsBtnDefault:hover {
border-style: outset;
}
DIV.bsBtnDefault:hover {
border-style: outset;
}
SPAN.bsBtnMouseDown {
/* line-height: 24px;*/
background-color:Menu;
margin: 0px;
padding-left:0px;
padding-top:3px;
padding-bottom: 2px;
border: 1px inset Menu;
font-family: arial, helvetica;
font-size: 12px;
}
DIV.bsBtnMouseDown {
/* line-height: 24px;*/
background-color:Menu;
margin: 0px;
padding-left:0px;
padding-top:3px;
padding-bottom: 2px;
border: 1px inset Menu;
font-family: arial, helvetica;
font-size: 12px;
display:inline;
}
/**
* vertical separator for a horizontal bar
*/
.separatorForHorizontal {
line-height: 24px;
padding-top: 1px;
padding-bottom: 1px;
border: 1px inset Menu;
}
/**
* horizontal separator for a vertical bar
* todo: crap, too much room at the bottom, dunno why.
*/
.separatorForVertical {
line-height: 1px;
line-width: 22px;
padding-bottom: 0px;
border: 1px inset Menu;
}