diff --git a/lib/WebGUI/Asset/Event.pm b/lib/WebGUI/Asset/Event.pm index 76508dc78..70d33a51c 100644 --- a/lib/WebGUI/Asset/Event.pm +++ b/lib/WebGUI/Asset/Event.pm @@ -41,6 +41,14 @@ use WebGUI::DateTime; =head1 Methods +=cut + +#################################################################### + +=head2 addRevision ( ) + +Extent the method from the super class to handle iCalSequenceNumbers. + =cut sub addRevision { @@ -1698,6 +1706,12 @@ sub processPropertiesFromFormPost { #------------------------------------------------------------------- +=head2 purge ( ) + +Extent the method from the super class to delete all storage locations. + +=cut + sub purge { my $self = shift; my $sth = $self->session->db->read("select storageId from Event where assetId=?",[$self->getId]); @@ -1711,6 +1725,12 @@ sub purge { #------------------------------------------------------------------- +=head2 purgeRevision ( ) + +Extent the method from the super class to delete the storage location for this revision. + +=cut + sub purgeRevision { my $self = shift; $self->getStorageLocation->delete; @@ -1908,6 +1928,13 @@ sub view { #------------------------------------------------------------------- + +=head2 www_deleteFile ( ) + +Delete a file given in the form variable "filename" from the storage location. + +=cut + sub www_deleteFile { my $self = shift; $self->getStorageLocation->deleteFile($self->session->form->process("filename")) if $self->canEdit; diff --git a/lib/WebGUI/Asset/Wobject/Article.pm b/lib/WebGUI/Asset/Wobject/Article.pm index d2d0c4181..a266d4009 100644 --- a/lib/WebGUI/Asset/Wobject/Article.pm +++ b/lib/WebGUI/Asset/Wobject/Article.pm @@ -144,6 +144,12 @@ sub definition { #------------------------------------------------------------------- +=head2 duplicate ( ) + +Extend the super class to duplicate the storage location. + +=cut + sub duplicate { my $self = shift; my $newAsset = $self->SUPER::duplicate(@_); @@ -169,6 +175,14 @@ sub exportAssetData { #------------------------------------------------------------------- + +=head2 getStorageLocation ( ) + +Fetches the storage location for this asset. If it does not have one, +then make one. Build an internal cache of the storage object. + +=cut + sub getStorageLocation { my $self = shift; unless (exists $self->{_storageLocation}) { @@ -223,6 +237,13 @@ sub prepareView { #------------------------------------------------------------------- +=head2 processPropertiesFromFormPost ( ) + +Extend the super class to calculate total asset size from +any files stored in the storage location. + +=cut + sub processPropertiesFromFormPost { my $self = shift; $self->SUPER::processPropertiesFromFormPost(@_); @@ -235,6 +256,15 @@ sub processPropertiesFromFormPost { } #------------------------------------------------------------------- + +=head2 update ( ) + +Extend the super class to handle the storage location. Sets +the correct privileges and deletes the internally cached +Storage object. + +=cut + sub update { my $self = shift; my $previousStorageId = $self->get('storageId'); @@ -253,6 +283,12 @@ sub update { #------------------------------------------------------------------- +=head2 purge ( ) + +Extend the super class to delete all storage locations. + +=cut + sub purge { my $self = shift; my $sth = $self->session->db->read("select storageId from Article where assetId=?",[$self->getId]); @@ -280,6 +316,12 @@ sub purgeCache { #------------------------------------------------------------------- +=head2 purgeRevision ( ) + +Extend the super class to delete the storage location for this revision. + +=cut + sub purgeRevision { my $self = shift; $self->getStorageLocation->delete; diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm index 182903a53..7a41dbd93 100644 --- a/lib/WebGUI/Asset/Wobject/Navigation.pm +++ b/lib/WebGUI/Asset/Wobject/Navigation.pm @@ -84,6 +84,13 @@ sub definition { } #------------------------------------------------------------------- + +=head2 getEditForm ( ) + +Manually build the edit form due to javascript elements. + +=cut + sub getEditForm { my $self = shift; my $tabform = $self->SUPER::getEditForm; @@ -340,7 +347,7 @@ sub getToolbar { =head2 prepareView ( ) -See WebGUI::Asset::prepareView() for details. +Extend the superclass to add metadata and to preprocess the template. =cut @@ -354,6 +361,13 @@ sub prepareView { #------------------------------------------------------------------- + +=head2 view ( ) + +See WebGUI::Asset::view() for details. + +=cut + sub view { my $self = shift; # we've got to determine what our start point is based upon user conditions @@ -512,6 +526,13 @@ sub view { } #------------------------------------------------------------------- + +=head2 www_goBackToPage ( ) + +Do a redirect to the form parameter returnUrl if it exists. + +=cut + sub www_goBackToPage { my $self = shift; $self->session->http->setRedirect($self->session->form->process("returnUrl")) if ($self->session->form->process("returnUrl")); diff --git a/lib/WebGUI/Asset/Wobject/SQLReport.pm b/lib/WebGUI/Asset/Wobject/SQLReport.pm index b5bf32794..76b8bf3da 100644 --- a/lib/WebGUI/Asset/Wobject/SQLReport.pm +++ b/lib/WebGUI/Asset/Wobject/SQLReport.pm @@ -220,6 +220,13 @@ sub definition { } #------------------------------------------------------------------- + +=head2 getEditForm ( ) + +Manually make the edit form due to javascript for adding more queries. + +=cut + sub getEditForm { my $self = shift; my $tabform = $self->SUPER::getEditForm(); @@ -495,6 +502,14 @@ sub purgeCache { } #------------------------------------------------------------------- + +=head2 view ( ) + +See WebGUI::Asset::view() for details. This method also performs content caching +if the user is not in Admin Mode. + +=cut + sub view { my $self = shift; if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { diff --git a/lib/WebGUI/Asset/Wobject/Survey.pm b/lib/WebGUI/Asset/Wobject/Survey.pm index 243abfeed..6ff192a7b 100644 --- a/lib/WebGUI/Asset/Wobject/Survey.pm +++ b/lib/WebGUI/Asset/Wobject/Survey.pm @@ -1153,7 +1153,15 @@ sub www_submitQuestions { } #------------------------------------------------------------------- -sub getSummary{ + +=head2 getSummary + +Returns a copy of the summary stored in JSON, and the output of +the survey summary template. + +=cut + +sub getSummary { my $self = shift; my $summary = $self->responseJSON->showSummary(); my $out = $self->processTemplate( $summary, $self->get('surveySummaryTemplateId') ); @@ -1161,6 +1169,7 @@ sub getSummary{ return ($summary,$out); # return $self->session->style->process( $out, $self->get('styleTemplateId') ); } + #------------------------------------------------------------------- =head2 www_loadQuestions @@ -1752,7 +1761,7 @@ sub www_viewStatisticalOverview { #------------------------------------------------------------------- -=head2 www_exportTransposedResults () +=head2 www_exportSimpleResults () Exports transposed results in a tab deliniated file. diff --git a/lib/WebGUI/Form/HTMLArea.pm b/lib/WebGUI/Form/HTMLArea.pm index c7b2fc882..21505afa4 100644 --- a/lib/WebGUI/Form/HTMLArea.pm +++ b/lib/WebGUI/Form/HTMLArea.pm @@ -132,6 +132,14 @@ sub getValue { return WebGUI::HTML::cleanSegment($self->SUPER::getValue(@_)); } +#------------------------------------------------------------------- + +=head2 getValueAsHtml ( ) + +Calls getValueAsHtml from WebGUI::Form::Control + +=cut + sub getValueAsHtml { my $self = shift; return $self->WebGUI::Form::Control::getValueAsHtml(@_);