From a1542271224f17cb2217da8aa4f1df9f3eefa70d Mon Sep 17 00:00:00 2001 From: Wouter van Oijen Date: Sun, 21 May 2006 11:01:41 +0000 Subject: [PATCH] fixed one more whitespace problem reported by test --- lib/WebGUI/Asset.pm | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 4c6f49b25..66690a42e 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -44,7 +44,7 @@ Package to manipulate items in WebGUI's asset system. Replaces Collateral. An asset is the basic class of content in WebGUI. This handles security, urls, and other basic information common to all content items. A lineage is a concatenated series of sequence numbers, each six digits long, that explain an asset's position in its familiy tree. Lineage describes who the asset's ancestors are, how many ancestors the asset has in its family tree (lineage length), and the asset's position (rank) amongst its siblings. In addition, lineage provides enough information about an asset to generate a list of its siblings and descendants. - + use WebGUI::Asset; =head1 METHODS @@ -66,7 +66,7 @@ The session variable. =head3 userId -Unique hash identifier for a user. If not supplied, current user. +Unique hash identifier for a user. If not supplied, current user. =head3 groupId @@ -94,7 +94,7 @@ Verifies group and user permissions to be able to edit asset. Returns 1 if owner =head3 userId -Unique hash identifier for a user. If not supplied, current user. +Unique hash identifier for a user. If not supplied, current user. =cut @@ -792,7 +792,7 @@ sub getMenuTitle { my $self = shift; if ($self->get("menuTitle") eq "" || lc($self->get("menuTitle")) eq "untitled") { return $self->getName; - } + } return $self->get("menuTitle"); } @@ -880,7 +880,7 @@ sub getTitle { my $self = shift; if ($self->get("title") eq "" || lc($self->get("title")) eq "untitled") { return $self->getName; - } + } return $self->get("title"); } @@ -956,8 +956,8 @@ sub getToolbarState { Returns the UI Level specified in the asset definition or from the config file if it's overridden. And if neither of those is specified, then it returns 1. -=cut - +=cut + sub getUiLevel { my $self = shift; my $definition = $self->get("className")->definition($self->session); @@ -1031,7 +1031,7 @@ sub getValue { #------------------------------------------------------------------- -=head2 indexContent ( ) +=head2 indexContent ( ) Returns an indexer object for this asset. When this method is called the asset's base content gets stored in the index. This method is often overloaded so that a particular asset can insert additional content other than the basic properties. Such uses include indexing attached files or collateral data. @@ -1046,10 +1046,10 @@ sub indexContent { #------------------------------------------------------------------- - + =head2 logView ( ) - -Logs the view of this asset to the passive profiling mechanism. + +Logs the view of this asset to the passive profiling mechanism. =cut @@ -1139,7 +1139,7 @@ sub manageAssets { assetManager.AddButton("'.$i18n->get("copy").'","copyList","manageAssets"); assetManager.AddButton("'.$i18n->get("duplicate").'","duplicateList","manageAssets"); assetManager.initializeDragEventHandlers(); - assetManager.Write(); + assetManager.Write(); var assetListSelectAllToggle = false; function toggleAssetListSelectAll(form){ assetListSelectAllToggle = assetListSelectAllToggle ? false : true; @@ -1154,26 +1154,26 @@ sub manageAssets { $self->session->output->print($output,1); $output = ''; foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets","assetContainers")}) { - $output .= '

'.$link->{label}.'

+ $output .= '

'.$link->{label}.'

'.$link->{label}.' '; $output .= $self->session->icon->edit("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype}); $output .= '
'; } $output .= '
'; foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets")}) { - $output .= '

'.$link->{label}.'

+ $output .= '

'.$link->{label}.'

'.$link->{label}.' '; $output .= $self->session->icon->edit("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype}); $output .= '
'; } $output .= '
'; foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets","utilityAssets")}) { - $output .= '

'.$link->{label}.'

+ $output .= '

'.$link->{label}.'

'.$link->{label}.' '; $output .= $self->session->icon->edit("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype}); $output .= '
'; } - $output .= ''; + $output .= ''; $self->session->output->print($output); $output = ''; my %options; @@ -1208,7 +1208,7 @@ sub manageAssets { $self->session->output->print($output); $output = '
'.$i18n->get("packages").''; foreach my $asset (@{$self->getPackageList}) { - $output .= '

'.$asset->getName.'

+ $output .= '

'.$asset->getName.'

getId).'">'.$asset->getTitle.' ' .$self->session->icon->edit("func=edit;proceed=manageAssets",$asset->get("url")) .$self->session->icon->export("func=exportPackage",$asset->get("url")) @@ -1219,10 +1219,10 @@ sub manageAssets { .'' .WebGUI::Form::submit($self->session, {value=>$i18n->get("import"), extras=>'style="font-size: 10px;"'}) .WebGUI::Form::formFooter($self->session); - $output .= '
+ $output .= '
  -
+ '; $self->session->output->print($output); return undef; @@ -1293,7 +1293,7 @@ sub manageAssetsSearch { name=>'assetId', value=>$child->getId }) - ."',".$edit."contextMenu.draw()," + ."',".$edit."contextMenu.draw()," ."'getUrl("func=manageAssets&manage=1")."\">".$title ."','getIcon(1)."\" style=\"border: 0px;\" alt=\"".$child->getName."\" /> ".$child->getName ."','".$self->session->datetime->epochToHuman($child->get("revisionDate")) @@ -1307,7 +1307,7 @@ sub manageAssetsSearch { $output .= 'assetManager.AddButton("'.$i18n->get("delete").'","deleteList","manageAssets"); assetManager.AddButton("'.$i18n->get("cut").'","cutList","manageAssets"); assetManager.AddButton("'.$i18n->get("copy").'","copyList","manageAssets"); - assetManager.Write(); + assetManager.Write(); var assetListSelectAllToggle = false; function toggleAssetListSelectAll(form){ assetListSelectAllToggle = assetListSelectAllToggle ? false : true; @@ -1332,13 +1332,13 @@ A reference to the current session. =head3 assetId -The assetId of the asset you're creating an object reference for. Must not be blank. +The assetId of the asset you're creating an object reference for. Must not be blank. =head3 className By default we'll use whatever class it is called by like WebGUI::Asset::File->new(), so WebGUI::Asset::File would be used. -=head3 revisionDate +=head3 revisionDate An epoch date that represents a specific version of an asset. By default the most recent version will be used. @@ -1353,8 +1353,8 @@ sub new { my $assetRevision = $session->stow->get("assetRevision"); my $revisionDate = shift || $assetRevision->{$assetId}{$session->scratch->get("versionTag")||'_'}; unless ($revisionDate) { - ($revisionDate) = $session->db->quickArray("select max(revisionDate) from assetData where assetId=? and - (status='approved' or status='archived' or tagId=?) order by assetData.revisionDate", + ($revisionDate) = $session->db->quickArray("select max(revisionDate) from assetData where assetId=? and + (status='approved' or status='archived' or tagId=?) order by assetData.revisionDate", [$assetId, $session->scratch->get("versionTag")]); $assetRevision->{$assetId}{$session->scratch->get("versionTag")||'_'} = $revisionDate; $session->stow->set("assetRevision",$assetRevision); @@ -1373,7 +1373,7 @@ sub new { my $properties = $cache->get; if (exists $properties->{assetId}) { # got properties from cache - } else { + } else { my $sql = "select * from asset"; foreach my $definition (@{$class->definition($session)}) { $sql .= " left join ".$definition->{tableName}." on asset.assetId=" @@ -1434,7 +1434,7 @@ sub newByDynamicClass { =head2 newByPropertyHashRef ( session, properties ) -Constructor. +Constructor. =head3 session @@ -1474,7 +1474,7 @@ A reference to the current session. =head3 url -Optional string representing a URL. +Optional string representing a URL. =head3 revisionDate @@ -1570,7 +1570,7 @@ sub processPropertiesFromFormPost { #------------------------------------------------------------------- -=head2 processTemplate ( vars, templateId, template ) +=head2 processTemplate ( vars, templateId, template ) Returns the content generated from this template. @@ -1580,7 +1580,7 @@ A hash reference containing variables and loops to pass to the template engine. =head3 templateId -An id referring to a particular template in the templates table. +An id referring to a particular template in the templates table. =head3 template @@ -1691,7 +1691,7 @@ sub setSize { #------------------------------------------------------------------- -=head2 toggleToolbar ( ) +=head2 toggleToolbar ( ) Toggles a toolbar to a special state so that custom toolbars can be rendered under special circumstances. This is mostly useful for macros that wish to proxy an asset but not display the toolbar. @@ -1768,7 +1768,7 @@ Adds a new Asset based upon the class of the current form. Returns the Asset cal sub www_add { my $self = shift; - my %prototypeProperties; + my %prototypeProperties; my $class = $self->session->form->process("class","className"); if ($self->session->form->process('prototype')) { my $prototype = WebGUI::Asset->new($self->session, $self->session->form->process("prototype"),$class);