Adding new files for Dashboard and ancillary wobjects.
This commit is contained in:
parent
72619fb9c0
commit
e1f3c61946
136 changed files with 2751 additions and 0 deletions
94
lib/WebGUI/Asset/Wobject/MultiSearch.pm
Normal file
94
lib/WebGUI/Asset/Wobject/MultiSearch.pm
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
package WebGUI::Asset::Wobject::MultiSearch;
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
this software.
|
||||
-------------------------------------------------------------------
|
||||
http://www.plainblack.com info@plainblack.com
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Portions of the below are originally from Weather::Underground,
|
||||
and are not included in this copyright.
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
|
||||
use Tie::CPHash;
|
||||
use Tie::IxHash;
|
||||
use JSON;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Asset::Wobject;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(WebGUI::Asset::Wobject);
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 definition
|
||||
|
||||
defines wobject properties for MultiSearch instances
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
my $properties = {
|
||||
templateId =>{
|
||||
fieldType=>"template",
|
||||
tab=>"display",
|
||||
defaultValue=>'MultiSearchTmpl0000001',
|
||||
namespace=>"MultiSearch",
|
||||
hoverHelp=>WebGUI::International::get('article template description','Asset_Article'),
|
||||
label=>WebGUI::International::get(72,"Asset_Article")
|
||||
},
|
||||
predefinedSearches=>{
|
||||
fieldType=>"textarea",
|
||||
defaultValue=>"WebGUI",
|
||||
tab=>"properties",
|
||||
hoverHelp=>WebGUI::International::get('article template description','Asset_Article'),
|
||||
label=>WebGUI::International::get(72,"Asset_Article")
|
||||
},
|
||||
};
|
||||
push(@{$definition}, {
|
||||
tableName=>'MultiSearch',
|
||||
className=>'WebGUI::Asset::Wobject::MultiSearch',
|
||||
assetName=>'MultiSearch',
|
||||
# icon=>'MultiSearch.gif',
|
||||
autoGenerateForms=>1,
|
||||
properties=>$properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 view ( )
|
||||
|
||||
method called by the www_view method. Returns a processed template
|
||||
to be displayed within the page style
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my $self = shift;
|
||||
my %var = $self->get();
|
||||
#Set some template variables
|
||||
|
||||
#Build list of stocks as an array
|
||||
my $defaults = $self->getValue("predefinedSearches");
|
||||
|
||||
return $self->processTemplate(\%var, $self->get("templateId"));
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue