Dirty conversion of Navigation to Moose.
This commit is contained in:
parent
b12ed7ef47
commit
0ef94945a7
1 changed files with 63 additions and 67 deletions
|
|
@ -12,82 +12,78 @@ package WebGUI::Asset::Wobject::Navigation;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Tie::IxHash;
|
use Tie::IxHash;
|
||||||
use WebGUI::Asset::Wobject;
|
|
||||||
use WebGUI::Form;
|
use WebGUI::Form;
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
use WebGUI::SQL;
|
use WebGUI::SQL;
|
||||||
use WebGUI::TabForm;
|
use WebGUI::TabForm;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
|
|
||||||
our @ISA = qw(WebGUI::Asset::Wobject);
|
use WebGUI::Definition::Asset;
|
||||||
|
extends 'WebGUI::Asset::Wobject';
|
||||||
|
attribute assetName => ["assetName", 'Asset_Navigation'];
|
||||||
|
attribute icon => 'navigation.gif';
|
||||||
|
attribute tableName => 'Navigation';
|
||||||
|
|
||||||
|
property templateId => (
|
||||||
#-------------------------------------------------------------------
|
label => ['1096', 'Asset_Navigation'],
|
||||||
sub definition {
|
hoverHelp => ['1096 description', 'Asset_Navigation'],
|
||||||
my $class = shift;
|
|
||||||
my $session = shift;
|
|
||||||
my $definition = shift;
|
|
||||||
my $i18n = WebGUI::International->new($session,"Asset_Navigation");
|
|
||||||
push(@{$definition}, {
|
|
||||||
assetName=>$i18n->get("assetName"),
|
|
||||||
icon=>'navigation.gif',
|
|
||||||
tableName=>'Navigation',
|
|
||||||
className=>'WebGUI::Asset::Wobject::Navigation',
|
|
||||||
properties=>{
|
|
||||||
templateId => {
|
|
||||||
label => $i18n->get(1096),
|
|
||||||
fieldType => "template",
|
fieldType => "template",
|
||||||
defaultValue => 'PBtmpl0000000000000048'
|
default => 'PBtmpl0000000000000048',
|
||||||
},
|
);
|
||||||
mimeType => {
|
property mimeType => (
|
||||||
label => $i18n->get('mimeType'),
|
label => ['mimeType', 'Asset_Navigation'],
|
||||||
|
hoverHelp => ['mimeType description', 'Asset_Navigation'],
|
||||||
fieldType => "mimeType",
|
fieldType => "mimeType",
|
||||||
defaultValue => 'text/html'
|
default => 'text/html',
|
||||||
},
|
);
|
||||||
assetsToInclude => {
|
property assetsToInclude => (
|
||||||
fieldType =>'checkList',
|
fieldType => 'checkList',
|
||||||
defaultValue =>"descendants"
|
default => "descendants",
|
||||||
},
|
label => ["Relatives To Include", 'Asset_Navigation'],
|
||||||
startType => {
|
hoverHelp => ["Relatives To Include description", 'Asset_Navigation'],
|
||||||
fieldType=>'selectBox',
|
);
|
||||||
defaultValue=>"relativeToCurrentUrl"
|
property startType => (
|
||||||
},
|
fieldType => 'selectBox',
|
||||||
startPoint=>{
|
default => "relativeToCurrentUrl",
|
||||||
fieldType=>'text',
|
label => ["Start Point Type", 'Asset_Navigation'],
|
||||||
defaultValue=>0
|
hoverHelp => ["Start Point Type description", 'Asset_Navigation'],
|
||||||
},
|
);
|
||||||
ancestorEndPoint=>{
|
property startPoint => (
|
||||||
fieldType=>'selectBox',
|
fieldType => 'text',
|
||||||
defaultValue=>55
|
default => 0,
|
||||||
},
|
label => ["Start Point", 'Asset_Navigation'],
|
||||||
descendantEndPoint=>{
|
hoverHelp => ["Start Point description", 'Asset_Navigation'],
|
||||||
fieldType=>'selectBox',
|
);
|
||||||
defaultValue=>55
|
property ancestorEndPoint => (
|
||||||
},
|
noFormPost => 1,
|
||||||
showSystemPages => {
|
fieldType => 'selectBox',
|
||||||
label => $i18n->get(30),
|
default => 55,
|
||||||
fieldType => 'yesNo',
|
);
|
||||||
defaultValue => 0,
|
property descendantEndPoint => (
|
||||||
},
|
noFormPost => 1,
|
||||||
showHiddenPages => {
|
fieldType => 'selectBox',
|
||||||
label => $i18n->get(31),
|
default => 55,
|
||||||
fieldType => 'yesNo',
|
);
|
||||||
defaultValue => 0,
|
property showSystemPages => (
|
||||||
},
|
label => [30, 'Asset_Navigation'],
|
||||||
showUnprivilegedPages => {
|
fieldType => 'yesNo',
|
||||||
label => $i18n->get(32),
|
default => 0,
|
||||||
fieldType => 'yesNo',
|
);
|
||||||
defaultValue => 0,
|
property showHiddenPages => (
|
||||||
},
|
label => [31, 'Asset_Navigation'],
|
||||||
reversePageLoop => {
|
fieldType => 'yesNo',
|
||||||
label => $i18n->get('reverse page loop'),
|
default => 0,
|
||||||
fieldType => 'yesNo',
|
);
|
||||||
defaultValue => 0,
|
property showUnprivilegedPages => (
|
||||||
},
|
label => [32, 'Asset_Navigation'],
|
||||||
}
|
fieldType => 'yesNo',
|
||||||
});
|
default => 0,
|
||||||
return $class->SUPER::definition($session, $definition);
|
);
|
||||||
}
|
property reversePageLoop => (
|
||||||
|
label => ['reverse page loop', 'Asset_Navigation'],
|
||||||
|
fieldType => 'yesNo',
|
||||||
|
default => 0,
|
||||||
|
);
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue